Equivalent to "CreateSolid" instruction in rhinoscript

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?

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:
    breps=[sc.doc.Objects.Find(objID).Geometry for objID in objIDs]
    if result:
        newIDs=[sc.doc.Objects.AddBrep(brep) for brep in result]

HTH, --Mitch

1 Like

Hi Helvetosaur,

Awesome! Works great, even in ghPython!

Many thanks :slight_smile: