Can’t get a text object to show its correct location, Sum times!

I am running the code below on a selected annotation and it is giving me a weird value in Y for the Origin (should be 0 is -1.77635683940025E-15). I can run it on the rest of the text objects and it is showing their location correctly. It looks like it is correct in the BoxEdit panel although it is -0.128.

When I relocate the text, it sometimes works. I can duplicate what I think is the error by copying the text and placing it again along the x axis.

Please let me know where I am going wrong it grabbing the location for annotation using the TextObject TextGeometry or AnnotationGeometry Plane.

Thanks

Steve

TextGeometry.Plane: Origin=18,-1.77635683940025E-15,0 XAxis=1,0,0, YAxis=0,1,0, ZAxis=0,0,1
AnnotationGeometry.Plane: Origin=18,-1.77635683940025E-15,0 XAxis=1,0,0, YAxis=0,1,0, ZAxis=0,0,1

            var rhinoTextObjectList = Doc.Objects.GetSelectedObjects(false, false).OfType<TextObject>();
            foreach (var i in rhinoTextObjectList)
            {
                RhinoApp.WriteLine($"TextGeometry.Plane: {i.TextGeometry.Plane}");
                RhinoApp.WriteLine($"AnnotationGeometry.Plane: {i.AnnotationGeometry.Plane}");
            }

Your printout says -1.77635683940025E-15, not -1.776. The value -1.77635683940025E-15 is pretty much 0, since it is 0.00000000000000177635683940025. If your model tolerance is even something tight like 0.0001 I wouldn’t be fixated too much on it not being 0.0, especially considering the fact that you’re working with computers, and floating point representation is what it is. For fun run _EditPythonScript, add an empty script, paste in the code line print((0.1+0.1+0.1)==0.3), and run the script. As a human you’d expect the result to print True

Nathan

Thanks, grid snap was on so I jest wanted to make sure I was going about this in the best way possible. This will be used to group and sort data so it look like I will need a user tollarance value.

Thanks again

Steve