Hi all!
Is there a way for to get the GUID from a Brep through ghpython code in grasshopper?
Hi all!
Is there a way for to get the GUID from a Brep through ghpython code in grasshopper?
@Mahdiyar Let’s say I created the Brep structure in the code itself, so I am not inputting anything, is there a function that could convert the brep structure into a guid?
I guess you’re looking for ObjectTable.AddBrep:
import Rhino.Geometry as rg
from scriptcontext import doc
brep = rg.Brep.CreateFromSphere(rg.Sphere(rg.Point3d.Origin, 10.0))
id = doc.Objects.AddBrep(brep)
print id
a = id
GUID.gh (6.7 KB)