CERN Accelerating science

You are here

Collinear facet detection

When CAD programs export STL files, sometimes they include "null" polygons that have all nodes on a single line. This is a bug of the exporting program, most probably caused by the fact that coordinates can be stored with more precision in the memory than in a file.

For example, the following two polygons are NULL polygons:


  • ‚ÄčPoint1 (0,0,0)
  • Point2 (1,0,0)
  • Point3 (1,0,0)

This is invalid because point 2 and 3 are on the same coordinates, thus it is not a triangle.


  • Point1 (0,0,0)
  • Point2 (1,0,0)
  • Point2 (2,0,0)

This is invalid because all points are on the line (0,0,0) -> (2,0,0).

As the above collinearity is the most frequent cause of "non-simple polygons", this is now detected when loading a file. You will get an option to delete them:


If, after deleting these, there are other non-simple polygons, you will of course get the old dialog offering to vertex-shift those.

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer