Use mesh boolean in the backend to drill holes.

This commit is contained in:
tamasmeszaros 2020-01-09 11:19:52 +01:00 committed by Lukas Matena
parent ef30270048
commit 6b0af43665
4 changed files with 39 additions and 40 deletions

View file

@ -80,6 +80,13 @@ public:
// Ready after this->is_step_done(slaposHollowing) is true
const TriangleMesh& hollowed_interior_mesh() const;
// Get the mesh that is going to be printed with all the modifications
// like hollowing and drilled holes.
const TriangleMesh & get_mesh_to_print() const {
bool is_hollowing = m_config.hollowing_enable.getBool() && m_hollowing_data;
return is_hollowing ? m_hollowing_data->hollow_mesh_with_holes : transformed_mesh();
}
// This will return the transformed mesh which is cached
const TriangleMesh& transformed_mesh() const;
@ -318,7 +325,7 @@ private:
public:
TriangleMesh interior;
// std::vector<drillpoints>
mutable TriangleMesh hollow_mesh_with_holes; // caching the complete hollowed mesh
};
std::unique_ptr<HollowingData> m_hollowing_data;