Rhinoscript: DupEdge equivalent


I probably looked right at it and missed it, but is there a version of Rhino.DuplicateEdgeCurves which finds one or more single edges of a surface.

I know you guys want to keep categories to a minimum, do you think there is merit in further splitting Scripting into RhinoScript and RhinoPython?


There is Rhino.GetEdgeCurves - for user picking of edges - which has not been implemented in Python yet, although there is probably a RhinoCommon workaround that can be constructed. Is that what you’re asking about?


Thanks Mitch, I knew it would be there somewhere, that’s exaclty what I was looking for.


Hi BrianM

try the below code:

import Rhino
import scriptcontext
import rhinoscriptsyntax as rs
def selectCurves():    
    rc, objref = Rhino.Input.RhinoGet.GetMultipleObjects("Base curves", False, Rhino.DocObjects.ObjectType.Curve)
    #objref  sono i riferimenti alle curve o edge selezionati
    if rc!=Rhino.Commands.Result.Success: return     
    for curve in objref:
        curva = curve.Curve() 
        if not curva: return 
        cc=scriptcontext.doc.Objects.AddCurve(curva) # crea una curva copia dell'elemento selezionato e ritorna id
        curves.append(cc) # crea lista id curve       
    return curves
if( __name__ == "__main__" ): 

Ciao Vittorio

(Steve Baer) #5

There will be a GetEdgeCurves in SR6 for python. If you want to play with it before SR6 is available, you can get the updated userinterface.py file for rhinoscriptsyntax at



Thank you Vittorio for the ready to go script.


Thanks for adding GetEdgeCurves Steve. I haven’t started using Python yet, the way you have documented the Rhinoscript interface on Github should make the transition pretty straightforward.

Another matter, is there a method in python to arrange the layers, in the layer panel, in alphabetical order, i.e. the equivalent of clicking the layer table header in the panel.

Arrange Layers through SDK