Trying to select


#1
arrsurface = Rhino.GetObject("Select Single Surface, Note: Single Extracted Surface...", 8)
If IsNull(arrCurves) Then Rhino.DeleteLayer "Work" :Exit Sub

I can’t grab a surface from a joined poly object, like “extract surface” does. Or like “Orient on surface” does you are able to use a particular surface from a poly object, or just a surface. I have a couple ideas in a way I might be able to use extract surface. But I thought I would ask before going off into left field.

thanks Mark Phillips


#2

Hi Mark,

you might set subobjects=True for subobject selection. See here for the the details of GetObject. Note that it does not return a surface id in this case but an ObjRef class.

c.


#3

Hi Mark,

@clement’s sample would work only if you use Python and your sample is from RhinoScript.
In that case you’ll have to extract/copy extract the surface first to work with it. I don’t think there is a way to get subobject in RhinoScript yet.

–jarek


#4

@Jarek, oh yeah sorry i’ve been just looking at the category and should have noticed that hungarian notation in the script code above is not python :wink:

I remember an old hack i wrote in RhinoScript (rvb) to prompt to extract a surface from a polysurface. It still works in most cases but there are drawbacks for sure:

ExtractSurfaceFromPolySrf.rvb (1.0 KB)

c.