mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-11-02 20:51:23 -07:00
ENH: reorder print area to reduce travel time
Signed-off-by: qing.zhang <qing.zhang@bambulab.com> Change-Id: I8fd5c505a42ae850d91c061d4df08257fb03c8c8
This commit is contained in:
parent
10838680dd
commit
5ae0adde16
3 changed files with 18 additions and 1 deletions
|
|
@ -1057,6 +1057,16 @@ void chain_and_reorder_extrusion_paths(std::vector<ExtrusionPath> &extrusion_pat
|
|||
reorder_extrusion_paths(extrusion_paths, chain_extrusion_paths(extrusion_paths, start_near));
|
||||
}
|
||||
|
||||
std::vector<size_t> chain_expolygons(const ExPolygons &input_exploy) {
|
||||
Points points;
|
||||
for (const ExPolygon &exploy : input_exploy) {
|
||||
BoundingBox bbox;
|
||||
bbox = get_extents(exploy);
|
||||
points.push_back(bbox.center());
|
||||
}
|
||||
return chain_points(points);
|
||||
}
|
||||
|
||||
std::vector<size_t> chain_points(const Points &points, Point *start_near)
|
||||
{
|
||||
auto segment_end_point = [&points](size_t idx, bool /* first_point */) -> const Point& { return points[idx]; };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue