mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -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
|
@ -229,7 +229,7 @@ convex_hull(Points points)
|
|||
|
||||
hull.points.resize(k);
|
||||
|
||||
assert( hull.points.front().coincides_with(hull.points.back()) );
|
||||
assert( hull.points.front() == hull.points.back() );
|
||||
hull.points.pop_back();
|
||||
}
|
||||
|
||||
|
@ -910,7 +910,7 @@ MedialAxis::build(ThickPolylines* polylines)
|
|||
assert(polyline.width.size() == polyline.points.size()*2 - 2);
|
||||
|
||||
// prevent loop endpoints from being extended
|
||||
if (polyline.first_point().coincides_with(polyline.last_point())) {
|
||||
if (polyline.first_point() == polyline.last_point()) {
|
||||
polyline.endpoints.first = false;
|
||||
polyline.endpoints.second = false;
|
||||
}
|
||||
|
@ -1003,7 +1003,7 @@ MedialAxis::validate_edge(const VD::edge_type* edge)
|
|||
// this could maybe be optimized (checking inclusion of the endpoints
|
||||
// might give false positives as they might belong to the contour itself)
|
||||
if (this->expolygon != NULL) {
|
||||
if (line.a.coincides_with(line.b)) {
|
||||
if (line.a == line.b) {
|
||||
// in this case, contains(line) returns a false positive
|
||||
if (!this->expolygon->contains(line.a)) return false;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue