mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-16 02:02:42 -07:00
Extend medial axis endpoints to fill the entire length. Includes fix for a minor memory leak caused by usage of old signature for Line::point_at()
This commit is contained in:
@@ -148,6 +148,12 @@ ExPolygon::medial_axis(double max_width, double min_width, Polylines* polylines)
|
||||
// compute the Voronoi diagram
|
||||
ma.build(polylines);
|
||||
|
||||
// extend initial and final segments of each polyline (they will be clipped)
|
||||
for (Polylines::iterator polyline = polylines->begin(); polyline != polylines->end(); ++polyline) {
|
||||
polyline->extend_start(max_width);
|
||||
polyline->extend_end(max_width);
|
||||
}
|
||||
|
||||
// clip segments to our expolygon area
|
||||
intersection(*polylines, *this, *polylines);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user