STL to IGES

I apologise if this is a simple question: I have a surface outline in .STL format and I need to convert it to IGES format. I've been told opencascade can do this, but I can't find any information about how.

I'd appreciate any help

Thank you

Adam Gibson

Stephane Routelous's picture

Hi,

you can use :
RWStl to read your STL file ( take care, the vrsion in OpenCASCADE 4.0 official is bugged, you have to take the developpement version ).
You get a Handle+StlMesh_Mesh object containing the triangles.
the fastest and easiest way is the following:
Create an empty compound
loop on all the triangles
{
make a face with the 3 points of the triangle
Add the face to the compound
}
Here, the compound contains all the triangles of your mesh
Write the compound in an IGES file using the standard way as in the samples.

HTH,

Stephane

Stephane
http://www.exotk.org