Hi!

RailClone's corner bevel algorithm ensures that the

**longest **side is always equal to the X length of the segment's bounding box. This will result in segments that are of equal size in plan view:

However if the spline zigzags you will get the appearance you describe, with geometry of differing X Dimensions when viewed from one side.

If you wish to work around this, there is a solution that uses an expression and some trigonometry to keep the posts the same length on the same side. Be aware though the that on the reverse side the posts will still differ in length, and the effect will be more pronounced. It isn't physically possible to keep the posts the same size on one side without the reverse side showing differences.

To keep maintain a consistent x dimension for posts on one side, we will resize some segments to compensate for the bevel algorithm. To calculate the new dimensions, we need to work out the size shown below in green and add it to the original size of the segment.

This new size will "push" the segment away from the corner and maintain the same sizes on one side of the spline. To do this, follow these steps.

- Create a node graph as shown below.

- In the Arithmetic 1 operator, change the mode to
**Expression ** and enter the following:

*if(XVertexWideAngle>pi,*

tan(radToDeg((XVertexWideAngle-pi)/2))*(Input1),

0)

Briefly this is testing the angle at the vertex and if it is larger the Pi Radians (180 degrees), it will return the length shown in green in the diagram above. It calculates this by halving the angle of the corner ((radToDeg((XVertexWideAngle-pi)/2)) and using this with a tangent function (tan() )and the Y Size (input1) of the segment to calculate the new distance.

If the Angle is less that 180 degrees it will return 0

- The second Arithmetic operator then adds the value from the previous step to the existing X Size of the segment to return the new length required to maintain a consistent size on one side.

I've attached a sample file for you to take a look at. Please let me know if you have any further questions or anything requires further clarification.

Many thanks,

Paul