mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-20 05:07:51 -06:00
Ported simplify() to XS and removed dependency on Boost::Geometry::Utils
This commit is contained in:
parent
df8d889481
commit
132d170f73
8 changed files with 25 additions and 12 deletions
|
@ -3,11 +3,19 @@
|
|||
namespace Slic3r {
|
||||
|
||||
void
|
||||
simplify(double tolerance)
|
||||
SurfaceCollection::simplify(double tolerance)
|
||||
{
|
||||
for (Surfaces::iterator it = this->surfaces.begin(); it != this->surfaces.end(); ++it) {
|
||||
throw "Unimplemented";
|
||||
Surfaces ss;
|
||||
for (Surfaces::const_iterator it_s = this->surfaces.begin(); it_s != this->surfaces.end(); ++it_s) {
|
||||
ExPolygons expp;
|
||||
it_s->expolygon.simplify(tolerance, expp);
|
||||
for (ExPolygons::const_iterator it_e = expp.begin(); it_e != expp.end(); ++it_e) {
|
||||
Surface s = *it_s;
|
||||
s.expolygon = *it_e;
|
||||
ss.push_back(s);
|
||||
}
|
||||
}
|
||||
this->surfaces = ss;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue