Sweep2Rail handling closed curves as rails


I am trying make a swept surface with 1 or 2 closed curves and custom cross section lines (connecting the 2 curves) with the Rhino.Geometry.Brep.CreateFromSweep RhinoCommon command. My algorithm works fine, if the two curves are not closed, but with either of them closed, the sweep fails. I tried to do the same thing within Rhino with 2 simple closed curves (Circle and Hexagon) as rails and 3 cross section lines where the first and the last overlapping and it did not work either. I know, that with 1 cross section line, it works fine, but I need my custom sections. With segmentation the surface could be created, but I am curious as to wheter there is a more simple solution, beacuse I would like to offset this surface to create one solid.


Gabor Toth

Can you post your geometry, both the input curves and what you expect as a result?

While making the pictures of my geometry, I realized, that I did not set closed parameter to true. It solved the problem. Anyways, thanks for the fast reply.