Control edge continuity using SweepTwoRail or similar in RhinoCommon?

Hi all,

I am trying to create a surface with G2 continuity with its adjacent faces. In Rhino, there is a “edge continuity” option in Sweep2 command. However, I could not find similar option in SweepTwoRail class. Is there a method where I can perform a sweep2 (or equivalent approach to construct a four-edge-surface) and control the edge continuity?

Thanks in advance.

Hi @Zhang_Kai,

you might look into CreateNetworkSurface and pass brep edges instead of curves.

_
c.

Hi Clement,

Thanks for the reply!
Actually I had already tried exactly what you suggested(sorry I forgot to mention it in the beginning). The problem for that is the NetworkSurface result is not as smooth as the manual Sweep2. Please see the edge continuity comparison here. The Sweep2 in Rhino one clearly has better continuity and the surface looks more clean.


The NetworkSurface result is not bad but I am just thinking if there is a better way to do it.

Hi @Zhang_Kai, i believe CreateNetworkSrf and CreateBlendSurface are the only possible methods to control continuity at the moment. The latter might get you better continuity along the long edges but lacks at the shorter ones. A Sweep2 with continuity whould be welcome here to.

_
c.

Hi Clement, yeah I think you are right. I am just a bit surprised that there is no such option in SweepTwoRail class. I will try to make one custom Sweep2 with continuity option, or try to manipulate the control points to match the continuity…
Anyway thanks again!