Windows 10 ships with "3D Builder", a Universal App that contains utility functions to prepare STL, OBJ, 3DS, and other files that represent geometries for 3D printing.
In particular, they have triangle mesh functions there that:
- "Detect" when a mesh is not suitable for 3D printing;
- "Repair" so that the mesh isn't right it prepares it, by removing internal faces, closing "holes" in the outer surface, etc.;
- "Simplify" by removing redundant triangles, such as those found to be adjacent and co-planar; and
- "Plane Cut", slicing a mesh through an arbitrarily positioned plane and filling in a surface on that plane to re-enclose the geometry, sometimes followed by a "Detect" and "Repair".
Every copy of Windows 8.1 and 10 has this utility at no additional cost. That says to me that the functions are well-known and as far as I've been able to test, reliable for virtually all inputs to the 3D printing use case. I used some of the messiest STL files I could find to prove this thing.
Which algorithms did they use for those functions? Where are they found for a .NET/WPF/UWP environment?
More to the point, did they expose the functions in an API I can use for a slightly dissimilar use case?
In the builder the functions look like this:
Simplify (the tractor top and sides have fewer facets):
Slice, UI before processing:
Slice, after processing and then one "Simplify" pass: