How to convert .stl to .stp

I am attempting to interface a software package with Solidworks. I am able to get a file out of the separate software in either .stl/.sat/.wrl formats. I would like to be able to convert one of these file formats (preferable .stl, but I can make anything work) to step so that I can read it into Solidworks in a useful format. I have attempted to read the step standard, but am having trouble getting over the learning curve. Has anyone had any success with this conversion?

Rob Bachrach's picture

It all depends on what is aceptable. Using OCC, you can read the STL file (StlAPI_Reader). Then, create faces from the STL file by creating vertices, edges, and faces from the points, lines, and triangles of the STL mesh. Then, write these faces to a STEP file using STEPControl_Writer. This will write out a bunch of triangular faces. If you need more, you can try sewing the faces into shells or combining coplanar faces to make larger faces. These options have been discussed many times on this forum. For starters, you may want to look at the thread: