Hi there,
Is there an instruction to generate closed polysurfaces from boundary planes or surfaces in rhinoscirpt syntax? I mean something similar to the “CreateSolid” instruction from Rhino?
Thanks
Hi there,
Is there an instruction to generate closed polysurfaces from boundary planes or surfaces in rhinoscirpt syntax? I mean something similar to the “CreateSolid” instruction from Rhino?
Thanks
i think Rhino.CreateSolid is what you need.
Unfortunately, this method has not been implemented yet in python rhinoscriptsyntax… So if you use python, you can either select your existing objects and then run rs.Command("_CreateSolid")
, or you will have to dive into RhinoCommmon and use the Brep.CreateSolid() method…
Sample code:
import rhinoscriptsyntax as rs
import scriptcontext as sc
import Rhino
objIDs=rs.GetObjects("Select some breps",8+16,preselect=True)
if objIDs:
tol=sc.doc.ModelAbsoluteTolerance
breps=[sc.doc.Objects.Find(objID).Geometry for objID in objIDs]
result=Rhino.Geometry.Brep.CreateSolid(breps,tol)
if result:
newIDs=[sc.doc.Objects.AddBrep(brep) for brep in result]
#optional
rs.DeleteObjects(objIDs)
sc.doc.Views.Redraw()
HTH, --Mitch
Hi Helvetosaur,
Awesome! Works great, even in ghPython!
Many thanks