Use triangle removal only for visualized mesh
This commit is contained in:
parent
82954ba715
commit
527e675294
@ -324,4 +324,9 @@ void hollow_mesh(TriangleMesh &mesh, const Interior &interior, int flags)
|
||||
mesh.require_shared_vertices();
|
||||
}
|
||||
|
||||
void remove_inside_triangles(TriangleMesh &mesh, const Interior &interior)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}} // namespace Slic3r::sla
|
||||
|
@ -81,6 +81,8 @@ void hollow_mesh(TriangleMesh &mesh, const HollowingConfig &cfg, int flags = 0);
|
||||
// Hollowing prepared in "interior", merge with original mesh
|
||||
void hollow_mesh(TriangleMesh &mesh, const Interior &interior, int flags = 0);
|
||||
|
||||
void remove_inside_triangles(TriangleMesh &mesh, const Interior &interior);
|
||||
|
||||
void cut_drainholes(std::vector<ExPolygons> & obj_slices,
|
||||
const std::vector<float> &slicegrid,
|
||||
float closing_radius,
|
||||
|
@ -85,6 +85,10 @@ public:
|
||||
// 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 {
|
||||
return (m_hollowing_data && is_step_done(slaposDrillHoles)) ? m_hollowing_data->hollow_mesh_with_holes_trimmed : transformed_mesh();
|
||||
}
|
||||
|
||||
const TriangleMesh & get_mesh_to_slice() const {
|
||||
return (m_hollowing_data && is_step_done(slaposDrillHoles)) ? m_hollowing_data->hollow_mesh_with_holes : transformed_mesh();
|
||||
}
|
||||
|
||||
@ -330,6 +334,7 @@ private:
|
||||
|
||||
sla::InteriorPtr interior;
|
||||
mutable TriangleMesh hollow_mesh_with_holes; // caching the complete hollowed mesh
|
||||
mutable TriangleMesh hollow_mesh_with_holes_trimmed;
|
||||
};
|
||||
|
||||
std::unique_ptr<HollowingData> m_hollowing_data;
|
||||
|
@ -166,7 +166,10 @@ void SLAPrint::Steps::drill_holes(SLAPrintObject &po)
|
||||
// holes that are no longer on the frontend.
|
||||
TriangleMesh &hollowed_mesh = po.m_hollowing_data->hollow_mesh_with_holes;
|
||||
hollowed_mesh = po.transformed_mesh();
|
||||
sla::hollow_mesh(hollowed_mesh, *po.m_hollowing_data->interior/*, sla::hfRemoveInsideTriangles*/);
|
||||
sla::hollow_mesh(hollowed_mesh, *po.m_hollowing_data->interior);
|
||||
|
||||
TriangleMesh &mesh_view = po.m_hollowing_data->hollow_mesh_with_holes_trimmed;
|
||||
sla::remove_inside_triangles(mesh_view, *po.m_hollowing_data->interior);
|
||||
|
||||
if (! needs_drilling) {
|
||||
BOOST_LOG_TRIVIAL(info) << "Drilling skipped (no holes).";
|
||||
@ -213,7 +216,7 @@ void SLAPrint::Steps::drill_holes(SLAPrintObject &po)
|
||||
// same imaginary grid (the height vector argument to TriangleMeshSlicer).
|
||||
void SLAPrint::Steps::slice_model(SLAPrintObject &po)
|
||||
{
|
||||
const TriangleMesh &mesh = po.get_mesh_to_print();
|
||||
const TriangleMesh &mesh = po.get_mesh_to_slice();
|
||||
|
||||
// We need to prepare the slice index...
|
||||
|
||||
@ -303,7 +306,7 @@ void SLAPrint::Steps::support_points(SLAPrintObject &po)
|
||||
// If supports are disabled, we can skip the model scan.
|
||||
if(!po.m_config.supports_enable.getBool()) return;
|
||||
|
||||
const TriangleMesh &mesh = po.get_mesh_to_print();
|
||||
const TriangleMesh &mesh = po.get_mesh_to_slice();
|
||||
|
||||
if (!po.m_supportdata)
|
||||
po.m_supportdata.reset(new SLAPrintObject::SupportData(mesh));
|
||||
|
Loading…
Reference in New Issue
Block a user