Error in STL (stereo litography) files

I have built some models using opencascade, and exported them to STL format.
I found two problems in the files:
1. The files contained triangles that had two coincident vertices, and their normals were set to (0,0,0). I made another version of the STL file, by deleting the invalid triangles from the file.
2. Both versions of STL opened correctly in Solidworks, although the first one gave me a warning regarding the invalid triangles.
3. Also, both files whould not print in a rapid prototyping machine. But when resaving the stl in Solidworks the file whould print without any problem.

Has anyone had those problems too?
Is anyone familiar with a bug in the STL exporter?
Can this problem be easily fixed by some scanning and repairing of the exported file?
Can anyone recommend a free opensource tool/library for repairing stl files?

Note: when exporting primitives such as spheres or boxes, things worked correctly.


Matthias Teich's picture

Hi moshe,

I also have problems with the normals when I export files with the StlAPI_Writer. Did you find any solution?

Best regards,