Print: a slice preview (one layer as the printer makes it, any layer height); fry_print layer N; tests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Nexoniarz 2026-10-21 07:53:54 +02:00
commit 67866ed0fb
4 changed files with 62 additions and 1 deletions

View file

@ -178,6 +178,9 @@ bool overhangs(const Mesh& m, int face, float overhang, float bedZ);
int closeHoles(Mesh& m);
// Turns faces so each piece's all face the same way, outwards; how many were turned.
int faceOutward(Mesh& m);
// Where a level plane at height z cuts the shape: the pieces of its outline there (a slicer's
// layer), each from one face.
std::vector<std::pair<glm::vec3, glm::vec3>> sliceAt(const Mesh& m, float z);
// Made ready to print, as far as it can be without guessing: points in the same place joined (an
// STL's corners come apart), faces with no area gone, faces there twice once (back to back: both
// gone, an inside wall), faces turned the same way, holes closed. What it did.