Twisted rail in RhinoCommon

We create the intersection between a 3D surface and a plane, then we do a Rhino.Geometry.SweepOneRail using the intersection curve as the rail. In one particular case, we obtained a twisted rail. Dividing the rail into many small segments, we’ve noticed that there is a specific point where the twist happens.

Do you have any advice to avoid this to ensure that the rail is always on the correct side of the surface?

Thank you very much!

Hi Cristina,

Can I assume that using just Rhino command to perform this will produce the correct result?

Is it possible to get the geometry and some sample source code, that I can run here, that will reproduce the incorrect result?


– Dale

Hi Dale,

Thank you very much for the prompt reply!
I have sent the code to your email, hope that is OK.

Thank you again!

Hi Cristina,

Of course that’s fine. :wink:

I’ll try to take a look at the source and files this afternoon.

– Dale

Hi everybody!

Dale helped us fix the above issue, and in case somebody else gets the same problem, the solution was not to include in the code the option Roadlike Top during the SweepOneRail.

Thank you again, Dale!