I have an issue with SubD surfaces in Rhino, maybe @pascal or @BrianJ could weigh in?
Thank you in advance for your assistance.
Is the Rhino command “PackSubDFaces” available in Rhinocommon?
I used brep = mysubd.ToBrep(Rhino.Geometry.SubDToBrepOptions.DefaultPacked) which is not the same as “PackSubDFaces” command.
More details about the problem:
I create a SubD in rhino with 3 creases
I delete all the creases
I use brep=mysubd.ToBrep(Rhino.Geometry.SubDToBrepOptions.DefaultPacked) to convert subd to brep. But the result is a polysurface, whereas I need one continuous surface.
To get one surface I use the rhino command “PackSubDFaces” that cleans up the SubD geometry and then I reassign the SubD to grasshopper one more time resulting in one continuous surface.
I want to do the 4th step in RhinoCommon to avoid manually calling Rhino command.
Hi @Lina , so if you have MergeSurface Brep.MergeSurfaces();output from Brep, you have one Untrimmed Surface.
But I think it would be better if SubDPack builds it and optional package should add Rhino Api (Sdk).and PackSubDFaces should add to Sdk Rhino Api
Thanks for sharing your insight. Merging the faces is a good way of working around this.
I would still like to understand the issue of why SubDFaces remain split after the creases are removed and if the Rhino command “PackSubDFaces” is/will be available in RhinoCommon.
I’ve asked the developers about PackSubDFaces in RhinoCommon. In the meantime, I found two other solutions to your issue… either by using SubDivide on the SubD manually, that SubD will then create a single surface when converted to a Brep. Or within the GH file extract the SubD control net and then remake the SubD like this first…
How did you create this SubD? Was it a symmetrical SubD (from the Radiate command) at some point?
It looks like the face packing that is used in the ToNURBS transformation is valid but not as good as it could be. ToNURBS updates the face packing cache only if it is not valid (PackFaces is a way to force this update); I’m trying to understand at which point our code should have decided to force computing a new face packing.
I extruded a periodic SubD-friendly curve into a SubD, then added additional edge loops and modified the surface.
While modeling I added creases, then decided to remove them, but the SubD face packs remained divided. This might be useful in some cases, but in this instance, I wanted to convert the SubD into a single untrimmed NURBS Surface and apply common surface tools in Grasshopper.
I restored the default packing manually, using the PackSubDFaces in Rhino, no issues here, but it would be very useful to have that option accessible in Grasshopper as well.
Thank you for the details, it must the creases at the origin of that behavior as you said. I’ve opened issue to track our work on this: RH-69765 SubD Face packing: removing a crease could invalidate packing cache.
PackSubdFaces will make its way into RhinoCommon too as Dale said.