TriangleMesh newly only holds indexed_triangle_set and
TriangleMeshStats. TriangleMeshStats contains an excerpt of stl_stats.
TriangleMeshStats are updated when initializing with indexed_triangle_set.
Admesh triangle mesh fixing is newly only used when loading an STL.
AMF / 3MF / OBJ file formats are already indexed triangle sets, thus
they are no more converted to admesh stl_file format, nor fixed
through admesh repair machinery. When importing AMF / 3MF / OBJ files,
volume is calculated and if negative, all faces are flipped. Also
a bounding box and number of open edges is calculated.
Implemented its_number_of_patches(), its_num_open_edges()
Optimized its_split(), its_is_splittable() using a visitor pattern.
Reworked QHull integration into TriangleMesh:
1) Face normals were not right.
2) Indexed triangle set is newly emitted instead of duplicating
vertices for each face.
Fixed cut_mesh(): Orient the triangulated faces correctly.
project() call should always come AFTER cmake_minimum_required(). This caused various hard-to-debug issues when searching for packages.
Newer CMake versions complain that compatibility is broken with v2.6
1) Octree is built directly from the triangle mesh by checking
overlap of a triangle with an octree cell. This shall produce
a tighter octree with less dense cells.
2) The same method is used for both the adaptive / support cubic infill,
where for the support cubic infill the non-overhang triangles are
ignored.
The AABB tree is no more used.
3) Optimized extraction of continuous infill lines in O(1) instead of O(n^2)
On little-endian hosts, stl_internal_reverse_quads will be called before
it is declared. Move the declaration up to the beginning of the file to
fix build breakage seen on an s390x host.
Fix of 2.1.0-rc: Loading MMU STL's results in object placement off the plater (#2868)
It has been broken with 9abef2241d
when trying to fix "Error on importing stl" #2813
namely:
1) Whitespaces are allowed at the end of lines
2) A freeform is allowed after "endloop", "endfacet" and "endsolid", if separated
from the keyword by a whitespace. Some ASCII STL exporters likely add their
annotations in there.
Fixes "Error on importing stl" #2813
starting from the objects of lowest ObjectID.
(convex hulls are recoverable as well as the indexed triangle sets
inside the TriangleMeshes or the triangle connectivity information).
Now the top most snapshot (the temp one taken before Undo jump) will
never be released.