mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-25 07:34:03 -06: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:
parent
52de292a48
commit
ed8a2f7330
8 changed files with 54 additions and 10 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue