Pick faces of multiple object

Hi there,

New try today, I’d like to be able to pick several faces of different closed polysurfaces in my model.
I’ve tried to use the getobjects function with a custom_filter. But getobjects doesn’t allow subobjects selection and I need to extract from multiple polysurfaces.
For example, the command _MoveFace does it the way i’d like to do.
Would you know a workaround for this ?

Thanks for your help.

Baptiste

I’ve found a way in another thread :


import Rhino
import scriptcontext
import rhinoscriptsyntax as rs

class GetBrepFaces(Rhino.Input.Custom.GetObject):

    def __init__(self):
        self.GeometryFilter = Rhino.DocObjects.ObjectType.Surface
        self.SubObjectSelect = True

    def CustomGeometryFilter(self, rhObject, geoBase, ci):
        print 'rhobj' , rhObject
        print 'geoBase', geoBase
        print 'ci', ci
        if ci.ComponentIndexType ==  Rhino.Geometry.ComponentIndexType.BrepFace and rhObject != None:
            print 'Face Idx: {}'.format(ci.Index)
        return True

go = GetBrepFaces()
go.SetCommandPrompt('Select FACE')
go.GetMultiple(1,0)

1 Like