mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 19:33:47 +00:00
Treat internal and external perimeters the same for the purpose of ZAA
This commit is contained in:
@@ -89,21 +89,23 @@ static bool contour_extrusion_path(LayerRegion *region, const sla::IndexedMesh &
|
|||||||
min_down = -(height + 0.1);
|
min_down = -(height + 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
double slope_rad = slope_from_normal(normal);
|
if (is_perimeter(path.role())) {
|
||||||
double slope_degrees = slope_rad * 180.0 / M_PI;
|
double slope_rad = slope_from_normal(normal);
|
||||||
|
double slope_degrees = slope_rad * 180.0 / M_PI;
|
||||||
|
|
||||||
if (d > min_down && minimize_perimeter_height_angle > 0 && minimize_perimeter_height_angle < slope_degrees && path.role() == erExternalPerimeter) {
|
if (d > min_down && minimize_perimeter_height_angle > 0 && minimize_perimeter_height_angle < slope_degrees) {
|
||||||
double adjustment = follow_slope_down(slope_rad, half_width);
|
double adjustment = follow_slope_down(slope_rad, half_width);
|
||||||
if (adjustment > 0) {
|
if (adjustment > 0) {
|
||||||
throw RuntimeError("ContourZ: got positive adjustment");
|
throw RuntimeError("ContourZ: got positive adjustment");
|
||||||
}
|
}
|
||||||
d += adjustment;
|
d += adjustment;
|
||||||
if (d < min_down) {
|
if (d < min_down) {
|
||||||
d = min_down;
|
d = min_down;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (d > max_up + 0.03 || d < min_down) {
|
if (d > max_up + 0.03 || d < min_down) {
|
||||||
d = 0;
|
d = 0;
|
||||||
} else {
|
} else {
|
||||||
if (d > max_up) {
|
if (d > max_up) {
|
||||||
@@ -111,12 +113,12 @@ static bool contour_extrusion_path(LayerRegion *region, const sla::IndexedMesh &
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (path.role() == erExternalPerimeter && d > 0) {
|
if (is_perimeter(path.role()) && d > 0) {
|
||||||
// do not increase height of external perimeters as this may create an appearance of a seam
|
// do not increase height of perimeters as this may create an appearance of a seam
|
||||||
d = 0;
|
d = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (std::abs(d) > EPSILON) {
|
if (std::abs(d) > EPSILON) {
|
||||||
was_contoured = true;
|
was_contoured = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user