mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-15 18:58:00 -06:00
Finalization of avoid crossing perimeters algorithm
EdgeGrid::Grid is used to find the intersection of a path with a polygon. Simplification of find path. Calculation of boundaries that not be crossed.
This commit is contained in:
parent
074406647a
commit
46bae74e48
2 changed files with 215 additions and 38 deletions
|
@ -54,7 +54,7 @@ public:
|
|||
|
||||
virtual Polyline travel_to(const GCode &gcodegen, const Point &point);
|
||||
|
||||
private:
|
||||
protected:
|
||||
// For initializing the regions to avoid.
|
||||
static Polygons collect_contours_all_layers(const PrintObjectPtrs& objects);
|
||||
|
||||
|
@ -85,13 +85,20 @@ private:
|
|||
const size_t end_idx,
|
||||
const Point &intersection_first,
|
||||
const Point &intersection_last);
|
||||
static ExPolygons get_boundary(const Layer &layer);
|
||||
|
||||
Polyline simplify_travel(const Polyline &travel, const GCode &gcodegen);
|
||||
|
||||
Polygons m_boundaries;
|
||||
EdgeGrid::Grid m_grid;
|
||||
public:
|
||||
AvoidCrossingPerimeters2() : AvoidCrossingPerimeters() {}
|
||||
|
||||
virtual ~AvoidCrossingPerimeters2() = default;
|
||||
|
||||
virtual Polyline travel_to(const GCode &gcodegen, const Point &point) override;
|
||||
|
||||
void init_layer(const Layer &layer);
|
||||
};
|
||||
|
||||
class OozePrevention {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue