@shanew06 wrote:
Hi,
I have a problem, I think, with the CurveNormal function in both Python and VBScript.
I’ve attached an example 3DM file which contains a curve. This curve was generated by projecting a straight line (not a curve) onto a surface from above (Z direction).
Using the curve analysis tools you’ll notice a slight curve to the line in approximately the Z-X plane.
You’ll also notice that the line is straight when viewed from the Top view (s expected).Now when I run a python or VB script using the CurveNormal function as per:
import rhinoscriptsyntax as rs
object = rs.GetObject(“Select a planar curve”)
if rs.IsCurve(object) and rs.IsCurvePlanar(object):
normal = rs.CurveNormal(object)
if normal: print “Curve Normal:”, normalI get a result close to [0,0,1]
This does not seem correct as I would expect it to be something more around [0,1,0]Could someone please review and let me know if I’m crazy or not? Thx.
p.s. If I take the same curve and rotate it in the Top view so that it is parallel to the X-axis, I get the Normal value I would expect!
CurvePlane.3dm (439.3 KB)Many Thanks,
Shane.
Posts: 1
Participants: 1