diff --git a/lib/Slic3r/GUI/2DBed.pm b/lib/Slic3r/GUI/2DBed.pm index ebbc70b6b..0891a4836 100644 --- a/lib/Slic3r/GUI/2DBed.pm +++ b/lib/Slic3r/GUI/2DBed.pm @@ -1,4 +1,5 @@ # Bed shape dialog +# still used by the Slic3r::GUI::Controller::ManualControlDialog Perl module. package Slic3r::GUI::2DBed; use strict; diff --git a/xs/src/libslic3r/Line.hpp b/xs/src/libslic3r/Line.hpp index 7c5e16ca4..39c2e1ff1 100644 --- a/xs/src/libslic3r/Line.hpp +++ b/xs/src/libslic3r/Line.hpp @@ -28,7 +28,7 @@ public: double length() const { return (b - a).cast().norm(); } Point midpoint() const { return (this->a + this->b) / 2; } bool intersection_infinite(const Line &other, Point* point) const; - bool coincides_with(const Line &line) const { return this->a == line.a && this->b == line.b; } + bool operator==(const Line &rhs) const { return this->a == rhs.a && this->b == rhs.b; } double distance_to(const Point &point) const; double perp_distance_to(const Point &point) const; bool parallel_to(double angle) const; diff --git a/xs/src/libslic3r/Point.hpp b/xs/src/libslic3r/Point.hpp index c53c10f4d..19c1ac368 100644 --- a/xs/src/libslic3r/Point.hpp +++ b/xs/src/libslic3r/Point.hpp @@ -269,7 +269,6 @@ public: typedef coordf_t coord_type; explicit Pointf3() { (*this)(0) = (*this)(1) = (*this)(2) = 0.; } -// explicit Pointf3(coord_t x, coord_t y, coord_t z) { (*this)(0) = x; (*this)(1) = y; (*this)(2) = z; } explicit Pointf3(coordf_t x, coordf_t y, coordf_t z) { (*this)(0) = x; (*this)(1) = y; (*this)(2) = z; } // This constructor allows you to construct Pointf from Eigen expressions template diff --git a/xs/src/perlglue.cpp b/xs/src/perlglue.cpp index 9813f02d5..dbaf35ae4 100644 --- a/xs/src/perlglue.cpp +++ b/xs/src/perlglue.cpp @@ -495,7 +495,7 @@ void from_SV(SV* point_sv, Point* point) AV* point_av = (AV*)SvRV(point_sv); // get a double from Perl and round it, otherwise // it would get truncated - (*point) = Point(lrint(SvNV(*av_fetch(point_av, 0, 0))), lrint(SvNV(*av_fetch(point_av, 1, 0)))); + (*point) = Point(SvNV(*av_fetch(point_av, 0, 0)), SvNV(*av_fetch(point_av, 1, 0))); } void from_SV_check(SV* point_sv, Point* point) diff --git a/xs/src/xsinit.h b/xs/src/xsinit.h index c07e50b9d..e32717532 100644 --- a/xs/src/xsinit.h +++ b/xs/src/xsinit.h @@ -77,6 +77,7 @@ extern "C" { #endif /* _MSC_VER */ #undef Zero #undef Packet +#undef _ } #endif diff --git a/xs/xsp/Line.xsp b/xs/xsp/Line.xsp index ccbe97458..f7437de01 100644 --- a/xs/xsp/Line.xsp +++ b/xs/xsp/Line.xsp @@ -69,7 +69,7 @@ Line::coincides_with(line_sv) CODE: Line line; from_SV_check(line_sv, &line); - RETVAL = THIS->coincides_with(line); + RETVAL = (*THIS) == line; OUTPUT: RETVAL