add mesh simplification.

SPE-1072 
Working but flipped normals with the interior.
Testing on treefrog passed
Oversampling for hollowed mesh should not be less than 3x
Flip back normals after simplify and remove redundant test code.
This commit is contained in:
tamasmeszaros 2020-01-23 10:57:51 +01:00
parent 63b0eec5a9
commit f8a5796ca5
11 changed files with 875 additions and 44 deletions

View file

@ -23,6 +23,7 @@ class TriangleMesh
public:
TriangleMesh() : repaired(false) {}
TriangleMesh(const Pointf3s &points, const std::vector<Vec3crd> &facets);
explicit TriangleMesh(const indexed_triangle_set &M);
void clear() { this->stl.clear(); this->its.clear(); this->repaired = false; }
bool ReadSTLFile(const char* input_file) { return stl_open(&stl, input_file); }
bool write_ascii(const char* output_file) { return stl_write_ascii(&this->stl, output_file, ""); }