mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-23 22:54:08 -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
|
@ -56,11 +56,11 @@ MultiPoint::is_valid() const
|
|||
}
|
||||
|
||||
Points
|
||||
MultiPoint::_douglas_peucker(Points &points, double tolerance)
|
||||
MultiPoint::_douglas_peucker(const Points &points, const double tolerance)
|
||||
{
|
||||
Points results;
|
||||
double dmax = 0;
|
||||
int index = 0;
|
||||
size_t index = 0;
|
||||
Line full(points.front(), points.back());
|
||||
for (Points::const_iterator it = points.begin() + 1; it != points.end(); ++it) {
|
||||
double d = it->distance_to(full);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue