mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-25 07:34:03 -06:00
Fixed some obvious mistakes and applied strict type checking to SurfaceCollections too
This commit is contained in:
parent
a831f5b176
commit
3a3e53b59b
5 changed files with 20 additions and 7 deletions
|
@ -6,7 +6,8 @@ namespace Slic3r {
|
|||
|
||||
ExPolygon::operator Polygons() const
|
||||
{
|
||||
Polygons polygons(this->holes.size() + 1);
|
||||
Polygons polygons;
|
||||
polygons.reserve(this->holes.size() + 1);
|
||||
polygons.push_back(this->contour);
|
||||
for (Polygons::const_iterator it = this->holes.begin(); it != this->holes.end(); ++it) {
|
||||
polygons.push_back(*it);
|
||||
|
@ -64,7 +65,7 @@ ExPolygon::is_valid() const
|
|||
bool
|
||||
ExPolygon::contains_line(const Line* line) const
|
||||
{
|
||||
Polylines pl(1);
|
||||
Polylines pl;
|
||||
pl.push_back(*line);
|
||||
|
||||
Polylines pl_out;
|
||||
|
@ -85,7 +86,8 @@ ExPolygon::contains_point(const Point* point) const
|
|||
Polygons
|
||||
ExPolygon::simplify_p(double tolerance) const
|
||||
{
|
||||
Polygons pp(this->holes.size() + 1);
|
||||
Polygons pp;
|
||||
pp.reserve(this->holes.size() + 1);
|
||||
|
||||
// contour
|
||||
Polygon p = this->contour;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue