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?
–Mitch
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
curves=[]
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
scriptcontext.doc.Views.Redraw()
return curves
if( __name__ == "__main__" ):
curves=selectCurves()
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
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.