Avoid multiselection dialog when picking closed seam edge?

Hi all,

When using RhinoGet to pick a surface edge:

msg="Pick a surface seam edge"
rc, objref = Rhino.Input.RhinoGet.GetOneObject(msg,False,filter)

Is there any way to further limit the choice to closed seam edges (like the seam on a cylinder or pipe) and avoid the multi-selection box that comes up?

I see ChooseOneQuestion (=False?) but I don’t know if that’s the way and how I should use it…


I also tried the following, but still get the multi-selection box…

import Rhino
import rhinoscriptsyntax as rs
import scriptcontext as sc

def TestGetSeamEdge():
    go = Rhino.Input.Custom.GetObject()
    go.SetCommandPrompt("Select seam edge of tube")
    go.GeometryFilter = Rhino.DocObjects.ObjectType.EdgeFilter
    go.GeometryAttributeFilter = se_filter
    if go.CommandResult() != Rhino.Commands.Result.Success:
        return go.CommandResult()
    objGeo = go.Object(0).Geometry()
    print objGeo

If a pick is ambiguous, then you will always see the “choose one object” dialog.

Also, by default, if a call to GetObject is permitted to select different parts of the same object, like a polysurface and an edge of that polysurface, then the top-most object is automatically selected. If you want the choose-one-object mechanism to include pop up in these cases, then call ChooseOneQuestion = true before calling GetObjects.

OK, thanks Dale, but then how does for example the DupEdge command manage to not have the popup come up when picking on joined surface edges like a box edge (or a seam edge for that matter)…? It is that type of functionality I am looking for.


This is somewhat equivalent to DupEdge:

import Rhino
import scriptcontext

def TestDupEdge():
    go = Rhino.Input.Custom.GetObject()
    go.SetCommandPrompt("Select edges to duplicate")
    go.GeometryFilter = Rhino.DocObjects.ObjectType.Curve
    go.GeometryAttributeFilter = Rhino.Input.Custom.GeometryAttributeFilter.EdgeCurve
    if (go.CommandResult() == Rhino.Commands.Result.Success):
        for i in range(0, go.ObjectCount):
            ref = go.Object(i)
            edge = ref.Edge()
            crv = edge.DuplicateCurve()



instead of


Eliminates the popup, thanks!



doesn’t seem (seam) to be able to restrict it to seam edges at that point…

Oh, well… thanks anyway!


Seems to work here on a Brep cylinder.

Hi Dale,

Yes, it lets me pick the seam edge but it also lets me pick just about any other joined edge as well on a Brep object… I assume those are “manifold” edges as opposed to “seam” edges, it is not restricting the pick to seam edges… This seems like a bug (or a “limitation”) to me…

Added: oh, and using Rhino.DocObjects.ObjectType.Curve also allows me to pick curves, which I don’t want.



Hi Mitch

Try this:

filter= Rhino.DocObjects.ObjectType.Curve
    rc, objrefs = Rhino.Input.RhinoGet.GetOneObject("Seleziona Curva o Edge", False, filter)
    if rc!=Rhino.Commands.Result.Success: return 

Ciao Vittorio

go.SubObjectSelect = False;

Has the opposite effect that I want, with that you can only select curves, not edges. If set True, can still select other edges besides seam edges…