SweepOneRail on Closed Curve

I have been writing a RhinoCommon (c#) plugin to convert the native file format of Gravity Sketch into native Rhino Geometry.

Due to the limited nature of available features in OpenNURBS, we are working on a Rhino Import plugin, rather than a .3dm export plugin.

The issue we have come across is that we are trying to perform a SweepOneRail where you specify multiple profiles along the curve to match our geometry creation. This works perfectly for any NURBSCurve we throw at it, and any set of profiles.

However, as soon as you close the curve, SweepOneRail.PerformSweep silently returns null breps, regardless of any other parameters.

Is there a reason for this? or some way to get more detailed information as to why it is failing?

Thanks!

Daniel

Have you tried setting SweepOneRail.ClosedSweep = true?

Alternatively, have you tried the Brep.CreateFromSweep function?

http://developer.rhino3d.com/5/api/RhinoCommonWin/html/M_Rhino_Geometry_Brep_CreateFromSweep_3.htm

Yep, SweepOneRail.ClosedSweep has no effect.

Brep.CreateFromSweep does not allow you to provide profiles along the entire length of the Sweep

We are using this method:

http://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_Geometry_SweepOneRail_PerformSweep_3.htm

However even using a much simpler method to test

http://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_Geometry_SweepOneRail_PerformSweep.htm

Does not seem to work either.

Huh, strange. Is it possible that you post an example of your code and of the geometry that you’re trying to sweep so we can have a go at trying this too?

Not that it probably matters in this case, but note that you’re referencing Rhino 6 docs. http://developer.rhino3d.com/5/api/RhinoCommon/html/M_Rhino_Geometry_SweepOneRail_PerformSweep_3.htm is the Rhino 5 docs. (notice the /5/ in front of the api in the URL)…

Hi,
I am having a similar problem to Carpetheaddev, I am not sure if was in the end sorted out. I post my gh python in case anybody wants to have a look.
basically when the ClosedSweep option is on True it doesn´t produce any result.

sweep test.gh (5.1 KB)

Hi @Federico_Giacomarra,

Let me know if the attached helps.

sweep_test_fixed.gh (14.0 KB)

– Dale