mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 11:23:42 +00:00
FIX: withdraw support enforcers on vertical faces
JIRA: studio-2274 Now support enforcer on vertical faces function is invalid. Previous enhancement of support enforcer on vertical faces brounght more conficts than benefits. Change-Id: Icbb0df3995d8ac8b3c22dda1bd4615da78af963b (cherry picked from commit bca003cbc35791838484afe4032276be8fa91db0)
This commit is contained in:
@@ -753,9 +753,7 @@ inline std::pair<SlabLines, SlabLines> slice_slabs_make_lines(
|
||||
const std::vector<float> &zs,
|
||||
bool top,
|
||||
bool bottom,
|
||||
const ThrowOnCancel throw_on_cancel_fn,
|
||||
// BBS: solve conflicts (see declaration) and most elegant way I can get
|
||||
SlabSlicingConfig config)
|
||||
const ThrowOnCancel throw_on_cancel_fn)
|
||||
{
|
||||
std::pair<SlabLines, SlabLines> out;
|
||||
SlabLines &lines_top = out.first;
|
||||
@@ -774,7 +772,7 @@ inline std::pair<SlabLines, SlabLines> slice_slabs_make_lines(
|
||||
|
||||
tbb::parallel_for(
|
||||
tbb::blocked_range<int>(0, int(indices.size())),
|
||||
[&vertices, &indices, &face_neighbors, &face_edge_ids, num_edges, &face_orientation, &zs, top, bottom, &lines_top, &lines_bottom, &lines_mutex_top, &lines_mutex_bottom, throw_on_cancel_fn, &config]
|
||||
[&vertices, &indices, &face_neighbors, &face_edge_ids, num_edges, &face_orientation, &zs, top, bottom, &lines_top, &lines_bottom, &lines_mutex_top, &lines_mutex_bottom, throw_on_cancel_fn]
|
||||
(const tbb::blocked_range<int> &range) {
|
||||
for (int face_idx = range.begin(); face_idx < range.end(); ++ face_idx) {
|
||||
if ((face_idx & 0x0ffff) == 0)
|
||||
@@ -793,7 +791,7 @@ inline std::pair<SlabLines, SlabLines> slice_slabs_make_lines(
|
||||
slice_facet_with_slabs<true>(vertices, indices, face_idx, neighbors, edge_ids, num_edges, zs, lines_top, lines_mutex_top);
|
||||
}
|
||||
// BBS: add vertical faces option
|
||||
if (bottom && (fo == FaceOrientation::Down || (config.isVertical && fo == FaceOrientation::Vertical) || fo == FaceOrientation::Degenerate)) {
|
||||
if (bottom && (fo == FaceOrientation::Down || fo == FaceOrientation::Degenerate)) {
|
||||
Vec3i neighbors = face_neighbors[face_idx];
|
||||
// Reset neighborship of this triangle in case the other triangle is oriented backwards from this one.
|
||||
for (int i = 0; i < 3; ++ i)
|
||||
@@ -1898,8 +1896,7 @@ void slice_mesh_slabs(
|
||||
const Transform3d &trafo,
|
||||
std::vector<Polygons> *out_top,
|
||||
std::vector<Polygons> *out_bottom,
|
||||
std::function<void()> throw_on_cancel,
|
||||
SlabSlicingConfig config)
|
||||
std::function<void()> throw_on_cancel)
|
||||
{
|
||||
BOOST_LOG_TRIVIAL(debug) << "slice_mesh_slabs to polygons";
|
||||
|
||||
@@ -1978,7 +1975,7 @@ void slice_mesh_slabs(
|
||||
std::vector<Vec3i> face_edge_ids = its_face_edge_ids(mesh, face_neighbors, true, &num_edges);
|
||||
std::pair<SlabLines, SlabLines> lines = slice_slabs_make_lines(
|
||||
vertices_transformed, mesh.indices, face_neighbors, face_edge_ids, num_edges, face_orientation, zs,
|
||||
out_top != nullptr, out_bottom != nullptr, throw_on_cancel, config);
|
||||
out_top != nullptr, out_bottom != nullptr, throw_on_cancel);
|
||||
|
||||
throw_on_cancel();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user