Scripting - rhinocommon join surfaces

scripting

#1

I found a Brep.JoinBreps There is also a Curve.JoinCurves. But I need Surface.JoinSurfaces, or if that isn’t possible I need a way to convert surfaces to Breps. Why is there seemingly no way to join surfaces in rhinocommon?


(Pascal Golay) #2

Hello - ToBrep() should do it: https://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_Geometry_Surface_ToBrep.htm

-Pascal


#3

I’m also very curious as to why the conversion is necessary. What makes surfaces unjoinable?


(Pascal Golay) #4

Surfaces do not have all the same information as breps - a face list, etc. Joining needs all that stuff for its book keeping. On the other hand surfaces have U and V directions and control points and all sorts of stuff not directly represented in the brep.

-Pascal


#5

So when in the GUI users “join surfaces”, rhino secretly converts the surfaces to breps, joins them, then converts them back?


(Pascal Golay) #6

Yeah in Rhino there is no distinction - a single surface is always still part of a brep, with one face.

-Pascal


#7

Thanks!