diff options
author | Alessandro Ranellucci <aar@cpan.org> | 2015-01-19 20:53:04 +0300 |
---|---|---|
committer | Alessandro Ranellucci <aar@cpan.org> | 2015-01-19 20:53:04 +0300 |
commit | 8791f5a493d476c3e42a4d5c91f5a4b182fe2b18 (patch) | |
tree | c04dd0a73b8b30509791617539c7765d09307658 /xs/src/libslic3r/ExPolygon.cpp | |
parent | c9cdae1a9659496f06066eb612e2baf55edfe4c4 (diff) |
Cleanup of some method signatures and of XS return types
Diffstat (limited to 'xs/src/libslic3r/ExPolygon.cpp')
-rw-r--r-- | xs/src/libslic3r/ExPolygon.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/xs/src/libslic3r/ExPolygon.cpp b/xs/src/libslic3r/ExPolygon.cpp index 2c5246aad..9a4215864 100644 --- a/xs/src/libslic3r/ExPolygon.cpp +++ b/xs/src/libslic3r/ExPolygon.cpp @@ -167,9 +167,11 @@ ExPolygon::medial_axis(double max_width, double min_width, Polylines* polylines) Slic3r::Geometry::MedialAxis ma(max_width, min_width); // populate list of segments for the Voronoi diagram - this->contour.lines(&ma.lines); - for (Polygons::const_iterator hole = this->holes.begin(); hole != this->holes.end(); ++hole) - hole->lines(&ma.lines); + ma.lines = this->contour.lines(); + for (Polygons::const_iterator hole = this->holes.begin(); hole != this->holes.end(); ++hole) { + Lines lines = hole->lines(); + ma.lines.insert(ma.lines.end(), lines.begin(), lines.end()); + } // compute the Voronoi diagram ma.build(polylines); @@ -384,10 +386,11 @@ ExPolygon::triangulate_p2t(Polygons* polygons) const Lines ExPolygon::lines() const { - Lines lines; - this->contour.lines(&lines); - for (Polygons::const_iterator h = this->holes.begin(); h != this->holes.end(); ++h) - h->lines(&lines); + Lines lines = this->contour.lines(); + for (Polygons::const_iterator h = this->holes.begin(); h != this->holes.end(); ++h) { + Lines hole_lines = h->lines(); + lines.insert(lines.end(), hole_lines.begin(), hole_lines.end()); + } return lines; } |