Creating a wire from array of coordinates

I am just getting started writting my first OpenCASCADE application. I would like to create an application that would get an array of doubles and then it would create a wire connecting the points in the array. I have looked through all the examples and they assume that the number of edges on the wire is always known. It seems that one could do this several ways but I would like to know what the best way of doing it is. Since I am not very familiar with OpenCASCADE, I would appreciate if you could give a small code sample.

Thanks
Joan

Patrik Mueller's picture

Hi,

perhaps you can use "BRepBuilderAPI_MakePolygon()"?

HTH,

Patrik

Joan Puig's picture

Thanks, for your suggestion. I was trying to create edges and merge them, clearly a bad approach.

For future reference, this is the code sample that does it.

BRepBuilderAPI_MakePolygon polygon;
for (i=0; i