Coordinates form surface trims

Hi,

I’m trying to take global coordinates from trims of surfaces, however I met some problems.
Please check the pictures, First thing is, that some elements have been mirrored, other have been scaled.
But I think related problem is, that, although this section is on longitudinal coordinate of around X = 236 meter, after translation I get data in X= 0 to X = 6 meters.

What I do is (in big simplification):

foreach (var trim in loop.Trims)
{
var rebuilt = trim.Fit(2, 0.001, -1);

var polyLineCurve = rebuilt.ToPolyline(…);

        var listOfVertices = new List<Vertex>();

        for (int i = 0; i < polyLineCurve.PointCount - 1; i++)
        {
            Point3d vertex = polyLineCurve.Point(i);
            var hcmVertex = new Vertex();

            hcmVertex.x = Math.Round(vertex.X, 4);
            hcmVertex.y = Math.Round(vertex.Y, 4);
            hcmVertex.z = Math.Round(vertex.Z, 4);

            listOfVertices.Add(hcmVertex);
        }

}

What is it that you are trying to accomplish? Have you tried BrepLoop.To3dCurve()?

Brep brep; // defined elsewhere
foreach(BrepLoop l in brep.Loops)
{
    // this is a 3D curve representing the brep edge
    Curve edgeCurve = l.To3dCurve();
}

I think that what you are doing is looking at the UV trim curves (that is, the parameter curves, not the 3d curves). That’s why you get these scaling and translation effects.

I am trying to get 3d points around boundary. I think I have checked to3dCurve before, but let me check it again.

This worked, thanks Menno.