mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 19:33:47 +00:00
Refactored ClipperUtils API for a more consistent arguments convention
This commit is contained in:
@@ -41,7 +41,7 @@ MotionPlanner::initialize()
|
||||
Polygons outer_holes;
|
||||
for (ExPolygons::const_iterator island = this->islands.begin(); island != this->islands.end(); ++island) {
|
||||
this->inner.push_back(ExPolygonCollection());
|
||||
offset_ex(*island, this->inner.back(), -MP_INNER_MARGIN);
|
||||
offset(*island, &this->inner.back().expolygons, -MP_INNER_MARGIN);
|
||||
|
||||
outer_holes.push_back(island->contour);
|
||||
}
|
||||
@@ -49,7 +49,7 @@ MotionPlanner::initialize()
|
||||
// grow island contours in order to prepare holes of the outer environment
|
||||
// This is actually wrong because it might merge contours that are close,
|
||||
// thus confusing the island check in shortest_path() below
|
||||
//offset(outer_holes, outer_holes, +MP_OUTER_MARGIN);
|
||||
//offset(outer_holes, &outer_holes, +MP_OUTER_MARGIN);
|
||||
|
||||
// generate outer contour as bounding box of everything
|
||||
Points points;
|
||||
@@ -59,12 +59,12 @@ MotionPlanner::initialize()
|
||||
|
||||
// grow outer contour
|
||||
Polygons contour;
|
||||
offset(bb.polygon(), contour, +MP_OUTER_MARGIN);
|
||||
offset(bb.polygon(), &contour, +MP_OUTER_MARGIN);
|
||||
assert(contour.size() == 1);
|
||||
|
||||
// make expolygon for outer environment
|
||||
ExPolygons outer;
|
||||
diff(contour, outer_holes, outer);
|
||||
diff(contour, outer_holes, &outer);
|
||||
assert(outer.size() == 1);
|
||||
this->outer = outer.front();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user