mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-22 14:13:57 -06:00
New slice_mesh() variant slicing with a single plane only, running
on a single thread only (not parallelized). The new slice_mesh() is used to calculate contour of objects sunken below the print bed.
This commit is contained in:
parent
8df2525355
commit
eb6392dccd
5 changed files with 131 additions and 27 deletions
|
@ -302,7 +302,7 @@ void GLVolume::SinkingContours::update()
|
|||
#if ALG_SLICE == ALG_SLICE_MESH
|
||||
MeshSlicingParams slicing_params;
|
||||
slicing_params.trafo = m_parent.world_matrix();
|
||||
std::vector<Polygons> list_of_polys = slice_mesh(mesh.its, std::vector<float>{ 0.0f }, slicing_params);
|
||||
Polygons polygons = slice_mesh(mesh.its, 0.0f, slicing_params);
|
||||
|
||||
auto append_polygon = [this](const Polygon& polygon, GUI::GLModel::InitializationData& data) {
|
||||
if (!polygon.empty()) {
|
||||
|
@ -326,11 +326,9 @@ void GLVolume::SinkingContours::update()
|
|||
|
||||
m_model.reset();
|
||||
GUI::GLModel::InitializationData init_data;
|
||||
for (const Polygons& polygons : list_of_polys) {
|
||||
for (const Polygon& polygon : polygons) {
|
||||
// contour
|
||||
append_polygon(polygon, init_data);
|
||||
}
|
||||
for (const Polygon& polygon : polygons) {
|
||||
// contour
|
||||
append_polygon(polygon, init_data);
|
||||
}
|
||||
#else
|
||||
MeshSlicingParamsEx slicing_params;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue