mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-14 22:25:55 +08:00
Minor fixes to sla print steps
This commit is contained in:
parent
53e358f32c
commit
7e74f781c6
@ -205,6 +205,8 @@ void SLAPrint::Steps::generate_preview(SLAPrintObject &po, SLAPrintObjectStep st
|
|||||||
if (cgalmeshptr) {
|
if (cgalmeshptr) {
|
||||||
m = MeshBoolean::cgal::cgal_to_indexed_triangle_set(*cgalmeshptr);
|
m = MeshBoolean::cgal::cgal_to_indexed_triangle_set(*cgalmeshptr);
|
||||||
handled = true;
|
handled = true;
|
||||||
|
} else {
|
||||||
|
BOOST_LOG_TRIVIAL(warning) << "CSG mesh is not egligible for proper CGAL booleans!";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Normal cgal processing failed. If there are no negative volumes,
|
// Normal cgal processing failed. If there are no negative volumes,
|
||||||
@ -290,7 +292,7 @@ void SLAPrint::Steps::generate_preview(SLAPrintObject &po, SLAPrintObjectStep st
|
|||||||
m = generate_preview_vdb(po, step);
|
m = generate_preview_vdb(po, step);
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(po.m_preview_meshes[step].empty());
|
assert(!po.m_preview_meshes[step]);
|
||||||
|
|
||||||
if (!m.empty())
|
if (!m.empty())
|
||||||
po.m_preview_meshes[step] =
|
po.m_preview_meshes[step] =
|
||||||
@ -376,7 +378,7 @@ void SLAPrint::Steps::hollow_model(SLAPrintObject &po)
|
|||||||
po.m_hollowing_data.reset(new SLAPrintObject::HollowingData());
|
po.m_hollowing_data.reset(new SLAPrintObject::HollowingData());
|
||||||
po.m_hollowing_data->interior = std::move(interior);
|
po.m_hollowing_data->interior = std::move(interior);
|
||||||
|
|
||||||
indexed_triangle_set m = sla::get_mesh(*po.m_hollowing_data->interior);
|
indexed_triangle_set &m = sla::get_mesh(*po.m_hollowing_data->interior);
|
||||||
|
|
||||||
if (!m.empty()) {
|
if (!m.empty()) {
|
||||||
// simplify mesh lossless
|
// simplify mesh lossless
|
||||||
@ -390,7 +392,8 @@ void SLAPrint::Steps::hollow_model(SLAPrintObject &po)
|
|||||||
// Put the interior into the target mesh as a negative
|
// Put the interior into the target mesh as a negative
|
||||||
po.m_mesh_to_slice
|
po.m_mesh_to_slice
|
||||||
.emplace(slaposHollowing,
|
.emplace(slaposHollowing,
|
||||||
csg::CSGPart{std::make_shared<indexed_triangle_set>(std::move(m)), csg::CSGType::Difference});
|
csg::CSGPart{std::make_shared<indexed_triangle_set>(m),
|
||||||
|
csg::CSGType::Difference});
|
||||||
|
|
||||||
generate_preview(po, slaposHollowing);
|
generate_preview(po, slaposHollowing);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user