Plane Curve Intersection Fails


#1

Hi,

When I run the attached Rhino Script and try to intersect the scripted plane with the curve (polyline) in the attached Rhino file (in Rhino 5 32bit) I get the output “Oh Dear”, i.e. the intersection fails.

Is this a bug or am I missing something?

Thanks!
Michael

PlaneCurveIntersect.rvb(314 Bytes) TestCurve.3dm(31.9 KB)


PlaneCurveIntersection failures under RhinoScript
Filenames of uploaded files
#2

Hmm, does seem like a bug here - only happens with line-like curves that cross the plane at right angles. It is also happening in other planes in my tests here…

OTOH, it is working in Python

import rhinoscriptsyntax as rs

crv=rs.GetObject("Get curve",4,True)
#plane=rs.WorldZXPlane()
plane=rs.PlaneFromNormal((0,2,0),(0,1,0))
result=rs.PlaneCurveIntersection(plane, crv)
if result:
    pt=result[0][1]
    print "Intersection is at {0},{1},{2}".format(pt.X,pt.Y,pt.Z)
else:
    print "Oh Dear..."

I guess someone like Dale needs to come in on this one…

–Mitch


(Dale Fugier) #3

Yep, definitely a bug. I have fixed this for the forthcoming SR6. Since the curve is really just a line, you can use LinePlaneIntersection (instead)…