Grasshopper SubD Conversion Issue

Hi, There seems to be an inconsistent result when converting SubD’s to NURBS between Rhino and Grasshopper. While Rhino converts uniform SubD’s to a nice singular surface, Grasshopper seems to break up the SubD to multiple surfaces. This is a large limitation as it prevents SubD Objects to be used as in intermediary form allowing to go back and fourth between meshes, SubDs and surfaces in Grasshopper. I am attaching a .gh file that displays the behavior:

Sorry I was not sure weather this is a SubD issue or a Grasshopper issue. I would really appreciate it if this could be looked at. Thank you!

SubD (9.5 KB)

You are not performing the same operation there. Plugging into the surface container is not a smart method, meaning it just literally translates each subD face to a Nurbs face. What you are missing is that the Rhino _ToNurbs command has a Faces=Packed option which is on by default (click subD options in command line when running ToNurbs to see it). Grasshopper does not yet have this component but it should, currently it is in Rhinocommon. See C# component attached:

Brep toNurbs = x.ToBrep(SubDToBrepOptions.DefaultPacked);

SubD Conversion (10.3 KB)

I dunno who adds components to GH anymore, seems an important one to have in the subD category @DavidRutten @DanielPiker @dan @Trav


Hi - That feature request is on the list as RH-61955. I’ve added this thread to be notified.


Thank you @Michael_Pryor and @wim so much for clearing up the issue! The C# script is super handy for now although it breaks when dealing with multiple packed surfaces, but the python script I found at the Issue 114295 which @wim had pointed out seems to work fine in both instances, I couldn’t tell the difference in the syntax but I really appreciate the help. Hope this gets into the GH core soon. :pray:

@wim Thanks for pointing me to that thread and sorry if this is a duplicate :grimacing: the python script in the thread does the trick for now. :pray:

Hmnn, you have an example? The C# and Python are using the same exact code and no extras, so dunno why that would be. I cant reproduce it.

IAC-Team (Thanks) and @Mahdiyar (Thanks) have programmed SubD components for Grasshopper, please try it. SubDToNurbs have PackFaces and GCon options…

1 Like

Nice yea, I considered putting them in Pufferfish when they first came to Rhinocommon as well but then I saw a bunch in youtrack. I am pretty sure these are all going to just be a part of Grasshopper’s subD tab soon since they are all base subD functions so I didn’t bother. Thanks for putting it out there for now and cool class!

1 Like

SubDToNurbs IntegerValues for connection
G0 = 0
G1 = 1
G1X = 3
G2 = 2