mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-18 04:08:02 -06:00
Changing the internal representation of Point / Pointf / Point3 / Pointf3 to Eigen Matrix types:
Changed the Point3 / Pointf3 to derive from the Eigen Vec3crd / Vec3d. Replaced the Point::concide_with() method calls with == operator. Reduced some compiler warnings.
This commit is contained in:
parent
f34252a27b
commit
3b89717149
19 changed files with 187 additions and 174 deletions
|
@ -595,26 +595,26 @@ Polylines _clipper_pl(ClipperLib::ClipType clipType, const Polygons &subject, co
|
|||
to recombine continuous polylines. */
|
||||
for (size_t i = 0; i < retval.size(); ++i) {
|
||||
for (size_t j = i+1; j < retval.size(); ++j) {
|
||||
if (retval[i].points.back().coincides_with(retval[j].points.front())) {
|
||||
if (retval[i].points.back() == retval[j].points.front()) {
|
||||
/* If last point of i coincides with first point of j,
|
||||
append points of j to i and delete j */
|
||||
retval[i].points.insert(retval[i].points.end(), retval[j].points.begin()+1, retval[j].points.end());
|
||||
retval.erase(retval.begin() + j);
|
||||
--j;
|
||||
} else if (retval[i].points.front().coincides_with(retval[j].points.back())) {
|
||||
} else if (retval[i].points.front() == retval[j].points.back()) {
|
||||
/* If first point of i coincides with last point of j,
|
||||
prepend points of j to i and delete j */
|
||||
retval[i].points.insert(retval[i].points.begin(), retval[j].points.begin(), retval[j].points.end()-1);
|
||||
retval.erase(retval.begin() + j);
|
||||
--j;
|
||||
} else if (retval[i].points.front().coincides_with(retval[j].points.front())) {
|
||||
} else if (retval[i].points.front() == retval[j].points.front()) {
|
||||
/* Since Clipper does not preserve orientation of polylines,
|
||||
also check the case when first point of i coincides with first point of j. */
|
||||
retval[j].reverse();
|
||||
retval[i].points.insert(retval[i].points.begin(), retval[j].points.begin(), retval[j].points.end()-1);
|
||||
retval.erase(retval.begin() + j);
|
||||
--j;
|
||||
} else if (retval[i].points.back().coincides_with(retval[j].points.back())) {
|
||||
} else if (retval[i].points.back() == retval[j].points.back()) {
|
||||
/* Since Clipper does not preserve orientation of polylines,
|
||||
also check the case when last point of i coincides with last point of j. */
|
||||
retval[j].reverse();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue