Alban_de_Chasteigner:
ToPoint()
I don’t think Dynamo does any rounding -
the XYZ ToPoint method is here:
{
xyz.Enabled = true;
return Autodesk.DesignScript.Geometry.BoundingBox.ByCornersCoordinateSystem(
xyz.Min.ToPoint(convertUnits), xyz.Max.ToPoint(convertUnits),
xyz.Transform.ToCoordinateSystem(convertUnits));
}
public static Autodesk.DesignScript.Geometry.Point ToPoint(this XYZ xyz, bool convertUnits = true)
{
var pt = Autodesk.DesignScript.Geometry.Point.ByCoordinates(xyz.X, xyz.Y, xyz.Z);
return convertUnits ? pt.InDynamoUnits() : pt;
}
public static Autodesk.DesignScript.Geometry.Point ToProtoType(this Autodesk.Revit.DB.Point point, bool convertUnits = true)
{
return point.Coord.ToPoint(convertUnits);
}
public static Vector ToVector(this XYZ xyz, bool convertUnits = false)
{
the InDynamoUnits does do a scale though depending on Revit units:
which as has been stated, will create noise with floating point numbers.
If you mean you see the displayed number in Dynamo’s preview as rounded - that is possible, but I don’t think that rounding has actually been applied to the point - it’s just for display AFAIK.
If you see it in Revit, then I’m not sure.
3 Likes
Springs.Number.ToString package node helped, you see the difference between what Dynamo shows and what the number it really is:
First list is what is done in Revit, second list is fixed with script.
Disgusting Revit numbers, most annoying thing I ever resolved in Dynamo.
3 Likes