mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-07-31 00:22:00 +08:00
Fixed inconsistency between extra safe scheduling and less safe schedule checking - checking must always succeed
This commit is contained in:
parent
dcec8429bb
commit
230728f1a1
@ -470,6 +470,15 @@ Slic3r::Polygon scaleUp_PolygonForSlicer(coord_t scale_factor, const Polygon &po
|
||||
}
|
||||
|
||||
|
||||
Slic3r::Polygon truncate_PolygonAsSeenBySequentialSolver(coord_t scale_factor, const Slic3r::Polygon &polygon)
|
||||
{
|
||||
Slic3r::Polygon scale_down_polygon = scaleDown_PolygonForSequentialSolver(scale_factor, polygon);
|
||||
Slic3r::Polygon scale_up_polygon = scaleUp_PolygonForSlicer(scale_factor, scale_down_polygon);
|
||||
|
||||
return scale_up_polygon;
|
||||
}
|
||||
|
||||
|
||||
void ground_PolygonByBoundingBox(Slic3r::Polygon &polygon)
|
||||
{
|
||||
BoundingBox polygon_box = get_extents(polygon);
|
||||
@ -610,9 +619,30 @@ void decimate_PolygonForSequentialSolver(double DP_tolerance,
|
||||
{
|
||||
if (extra_safety)
|
||||
{
|
||||
grow_PolygonForContainedness(center_x, center_y, decimated_polygon);
|
||||
Slic3r::Polygon prefinal_polygon = decimated_polygon;
|
||||
|
||||
while (true)
|
||||
{
|
||||
grow_PolygonForContainedness(center_x, center_y, decimated_polygon);
|
||||
Slic3r::Polygon truncated_polygon = truncate_PolygonAsSeenBySequentialSolver(SEQ_SLICER_SCALE_FACTOR, decimated_polygon);
|
||||
|
||||
bool trunc_contains = true;
|
||||
for (unsigned int i = 0; i < prefinal_polygon.points.size(); ++i)
|
||||
{
|
||||
if (!Slic3r::contains(truncated_polygon, prefinal_polygon.points[i], false))
|
||||
{
|
||||
trunc_contains = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (trunc_contains)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -106,7 +106,9 @@ Slic3r::Polygon scaleUp_PolygonForSlicer(const Slic3r::Polygon &polygon);
|
||||
Slic3r::Polygon scaleUp_PolygonForSlicer(coord_t scale_factor, const Slic3r::Polygon &polygon);
|
||||
|
||||
Slic3r::Polygon scaleUp_PolygonForSlicer(const Slic3r::Polygon &polygon, double x_pos, double y_pos);
|
||||
Slic3r::Polygon scaleUp_PolygonForSlicer(coord_t scale_factor, const Slic3r::Polygon &polygon, double x_pos, double y_pos);
|
||||
Slic3r::Polygon scaleUp_PolygonForSlicer(coord_t scale_factor, const Slic3r::Polygon &polygon, double x_pos, double y_pos);
|
||||
|
||||
Slic3r::Polygon truncate_PolygonAsSeenBySequentialSolver(coord_t scale_factor, const Slic3r::Polygon &polygon);
|
||||
|
||||
void ground_PolygonByBoundingBox(Slic3r::Polygon &polygon);
|
||||
void ground_PolygonByFirstPoint(Slic3r::Polygon &polygon);
|
||||
|
Loading…
x
Reference in New Issue
Block a user