Generating a "mesh-like" SweepOneRail

Dear all,

I am using the SweepOneRail class in order to generate the surface above. There are two section curves (the thick black lines) and a rail curve (hidden here).

Instead of generating a NURBS, I would like to generate a mesh out of the same geometrical transformation.
Please note that I am not interested in post-rationalizing this surface but in generating the mesh upfront. So in other words, I would like to get only the planes - or intermediate cross-sections - from this geometrical transformation and not the surface. I would like to be able to play with the resolution of those, increase and decrease locally the density of the planes/cross-sections.

Besides the SweepOneRail class, I couldn’t find any interpolation method that takes into account two profile curves as well as a rail curve. I tried to browse a bit openNURBS for some source code, but this was unsuccessful.

Does anyone here might know how I could perform such operation, and indicate me the maths behind the SweepOneRail class in order to retrieve only the planes?

Best,

Paul

Hi Paul,

You don’t find the code that generates the rail frames in openNURBS, as this is part of core Rhino.

Have you tried using Rhino.Geometry.Curve.PerpendicularFrameAt()?

– Dale

Hi Dale,

Thank you for your reply.

Unfortunately the two profile curves are oriented in a way that differs from the perpendicular frames of the rail curve.

I will try to tweak their orientation, but ultimately I think I would need to find a way to interpolate the two end frames along the rail curve, as SweepOneRail is actually doing…

Any other hints on this?

Paul

Hi Paul,

I believe the Sweep1 command creates rail frames using the same code behind Rhino.Geometry.Curve.PerpendicularFrameAt().

I’ll need to see some sample geometry - what you have and what you trying to accomplish - to be of more help.

Thanks,

– Dale

Hi Dale,

Thanks for the help.
I finally managed to do what I initially wanted. The Rhino.Geometry.Curve.PerpendicularFrameAt() method actually worked.
I also had to interpolate the profiles on the XY plane and remap them onto the perpendicular frames of the input rail (see definition attached).

However - as the picture above illustrates - the final result doesn’t match perfectly what is generated with the SweepOneRail method (red surface). I would be interested to know where the difference is coming from, even if I am satisfied with the final mesh produced.

Best,

Paul

SweepQuadMesh.gh (8.2 KB)