mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-06-03 02:22:46 +00:00
Performance improvements of the MotionPlanner
(rewrote the Dijkstra shortest path algorithm to use a binary priority heap instead of a dumb O(n^2) algorithm, added some bounding box tests to avoid expensive in-polygon tests if possible).
This commit is contained in:
@@ -34,15 +34,17 @@ public:
|
||||
// we enable it by default for the first travel move in print
|
||||
bool disable_once;
|
||||
|
||||
AvoidCrossingPerimeters();
|
||||
~AvoidCrossingPerimeters();
|
||||
void init_external_mp(const ExPolygons &islands);
|
||||
void init_layer_mp(const ExPolygons &islands);
|
||||
AvoidCrossingPerimeters() : use_external_mp(false), use_external_mp_once(false), disable_once(true) {}
|
||||
~AvoidCrossingPerimeters() {}
|
||||
|
||||
void init_external_mp(const ExPolygons &islands) { m_external_mp = Slic3r::make_unique<MotionPlanner>(islands); }
|
||||
void init_layer_mp(const ExPolygons &islands) { m_layer_mp = Slic3r::make_unique<MotionPlanner>(islands); }
|
||||
|
||||
Polyline travel_to(GCode &gcodegen, Point point);
|
||||
|
||||
|
||||
private:
|
||||
MotionPlanner* _external_mp;
|
||||
MotionPlanner* _layer_mp;
|
||||
std::unique_ptr<MotionPlanner> m_external_mp;
|
||||
std::unique_ptr<MotionPlanner> m_layer_mp;
|
||||
};
|
||||
|
||||
class OozePrevention {
|
||||
|
||||
Reference in New Issue
Block a user