When I use SweepTwoRails where the arcs starting points are opposite of the sweep shape the sweep does not occur between the rails when the profile is on the end points of the arcs and the sweep shape extends beyond the arcs.
When running the code, select the outermost arc, then the innermost arc, then the horizontal profile line.
i think this has always been like that. The regular _Sweep2 command does some cleanup of the rail directions which Rhino.Geometry.SweepTwoRails and Rhino.Geometry.Brep.CreateFromSweep do not automatically. You could script something though, eg. set (flip) the rail directions so they start near your first sweep section curve.
@clement - Thanks. I didn’t want to have to jerry-rig it. It’s just odd if you use a line that goes from the end point of one arc to the end point of the other arc then it works fine. I tested polylines as well and they don’t work regardless of what the sweep shape is.
Can this be fixed sometime?
Is there an easy way to flip an object (arcs or polylines) based on their starting and ending points?
I am not sure, it would require some changes to both methods. Since it does not do any adjustments i got used to do them on my own. Things can get quite involved if you need to preserve directions (normals) of the outcome or if the rails are closed. Alsa, the section direction decides in which direction the resulting surface normal will point to…
Maybe something like below helps, it adjusts rail directions without changing them in the rhino document.
@clement - After I implemented the Reverse method, the PointAtStart and PointAtEnd in code have changed, however the actual object in Rhino has not. What if I wanted to reverse / flip the actual Rhino Object…what would I do?
Hi @Mike24, to get the (probably reversed) rail curves into the Rhino document as they have been used by the SweepTwoRail method you could add this at the end of the script: