NurbsCurve.FrameAt() provide plane with floating number at

Hello i am creating a grid of line and on the middle of the line i retrive the plane.
everithing is good untill i get a line of lenght 725 or 735.
in that situation i get a plane like this:
Origin=593,2307.5,0 XAxis=3.1361886268032E-16,1,0, YAxis=1,-3.1361886268032E-16,0, ZAxis=0,0,-1
while i will expect a plane like this
Origin=318,207,0 XAxis=0,1,0, YAxis=0,0,1, ZAxis=1,0,0
the line.direction is in both case;

some snippet of the code:

nurbsCurve = self.Line.ToNurbsCurve()
bl,PlaneCrv = nurbsCurve.FrameAt(self.Line.Length/2)
if bl:#
        pl = PlaneCrv ## sometimes this plane have a float of E-16 
        v = self.Line.Direction         
        StaticPlane = Rhino.Geometry.Plane.WorldZX
        Transformation = Rhino.Geometry.Transform.PlaneToPlane (StaticPlane,pl)
   self.MoveGeometry(Transformation )

Could you perhaps show where the plane is and where it’s supposed to be (with like a screenshot). I’m not fully getting the problem.

Hi @sbranca,

This is the correct approach:

lineCurve = Rhino.Geometry.LineCurve(self.Line)
t = lineCurve.NormalizedLengthParameter(0.5)
rc, plane = lineCurve.FrameAt(t)
if rc:
    # todo...

– Dale

thank you very much!