GetEdgeCurves Hangs with transform message

This Rhinoscript code will hang a while

Dim arrEdges
arrEdges = Rhino.GetEdgeCurves(,,, True)
rhino.command "_ProjectToCPlane _Yes"

Is there a better route ?

Thx,
Keith

Hmm, that seems odd, if I run that here on a couple edges of a simple box, I get the BOX deforming along with the projected edges. It’s almost as if the edges of the box itself are internally selected along with the duplicated edge curves. Maybe that’s why Rhino is hanging on you?

This seemed to work without deforming the box:

    Dim arrEdges
    Call Rhino.GetEdgeCurves(,,, True)
    Rhino.Command "HistoryPurge All"
    Rhino.Command "SelLast"
    Rhino.command "_ProjectToCPlane _Yes"

or a slightly more rhinoscripty version

Call Main()
Sub Main()
    Dim arrEdges,plane,xform
    Call Rhino.GetEdgeCurves(,,, True)
    arrEdges = Rhino.SelectedObjects()
    If IsArray(arrEdges) Then
        plane = Rhino.ViewCPlane()
        xform = Rhino.XformPlanarProjection(plane)
        Call Rhino.TransformObjects(arrEdges, xform, False)
    End If
End Sub

But that’s just a hack workaround for what looks like a bug…
@dale ?

–Mitch

1 Like

Thanks for your time Mitch, that is a great help.

:beers:
Keith

http://mcneel.myjetbrains.com/youtrack/issue/RH-32912