Quantcast
Viewing all articles
Browse latest Browse all 4140

Select a set of brep edges

Gianpaolo Savio wrote:

Hi all,
I need to select a set of edges of a brep in order to run a fillet by a Python script.
I wrote the following in order to select the edges, but nothing is selected:

import Rhino
import scriptcontext

def edgeB():
    filter = Rhino.DocObjects.ObjectType.PolysrfFilter
    rc, objref = Rhino.Input.RhinoGet.GetOneObject("Select first set of polysurfaces", False, filter)
    if rc != Rhino.Commands.Result.Success: return rc
    if not objref: return Rhino.Commands.Result.Failure
    brep = objref.Brep()
    bre = objref.Object()
    edgelist=brep.Edges
    for i in edgelist:
        if i.Degree>1:
            print bre.SelectSubObject(i.ComponentIndex(),True,True)
scriptcontext.doc.Views.Redraw()
edgeB()

There something wrong in my script?
Thanks,
g

Posts: 9

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 4140

Trending Articles