Hi again,
I’m trying to get 3d points from loops (trims), but I only get them in their local coordinate system. How can I get points in world coordinate system?
This is what I do:
foreach (var trim in loop.Trims)
{
var maxAngleRadians = 5 * Math.PI / 180;
var polyLine = trim.ToPolyline(0, 0, maxAngleRadians, 0.05, 0, 0, 5, 1000, true);
var listOfPoints = polyLine.ToNurbsCurve().Points;
for (int i = 0; i < listOfPoints.Count - 1; i++)
{
Point3d vertex = listOfPoints[i].Location;
var hcmVertex = new Vertex();
hcmVertex.x = vertex.X;
hcmVertex.y = vertex.Y;
hcmVertex.z = vertex.Z;
listOfVertices.Add(hcmVertex);
}
}