mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-08 14:34:04 -06:00
Bugfix: seam_position = aligned failed in certaim circumstances because of faulty concave points detection. Includes regression test
This commit is contained in:
parent
1674108bac
commit
5dcc1eab79
6 changed files with 54 additions and 3 deletions
|
@ -55,6 +55,12 @@ Point::coincides_with(const Point &point) const
|
|||
return this->x == point.x && this->y == point.y;
|
||||
}
|
||||
|
||||
bool
|
||||
Point::coincides_with_epsilon(const Point &point) const
|
||||
{
|
||||
return std::abs(this->x - point.x) < SCALED_EPSILON && std::abs(this->y - point.y) < SCALED_EPSILON;
|
||||
}
|
||||
|
||||
int
|
||||
Point::nearest_point_index(const Points &points) const
|
||||
{
|
||||
|
|
|
@ -33,6 +33,7 @@ class Point
|
|||
void translate(double x, double y);
|
||||
void rotate(double angle, const Point ¢er);
|
||||
bool coincides_with(const Point &point) const;
|
||||
bool coincides_with_epsilon(const Point &point) const;
|
||||
int nearest_point_index(const Points &points) const;
|
||||
int nearest_point_index(const PointConstPtrs &points) const;
|
||||
int nearest_point_index(const PointPtrs &points) const;
|
||||
|
|
|
@ -37,6 +37,8 @@
|
|||
%code{% RETVAL = new Point(THIS->projection_onto(*line)); %};
|
||||
Clone<Point> negative()
|
||||
%code{% RETVAL = new Point(THIS->negative()); %};
|
||||
bool coincides_with_epsilon(Point* point)
|
||||
%code{% RETVAL = THIS->coincides_with_epsilon(*point); %};
|
||||
|
||||
%{
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue