mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-13 01:37:53 -06:00
gyroid & 3Dhoneycomb: now 'connected lines' follow the perimeters
This commit is contained in:
parent
8e4f777bd3
commit
86fbb9a095
5 changed files with 377 additions and 77 deletions
|
@ -124,6 +124,13 @@ public:
|
|||
double ccw_angle(const Point &p1, const Point &p2) const;
|
||||
Point projection_onto(const MultiPoint &poly) const;
|
||||
Point projection_onto(const Line &line) const;
|
||||
|
||||
double distance_to(const Point &point) const { return (point - *this).cast<double>().norm(); }
|
||||
double distance_to_square(const Point &point) const {
|
||||
double dx = (point.x() - this->x());
|
||||
double dy = (point.y() - this->y());
|
||||
return dx*dx + dy*dy;
|
||||
}
|
||||
};
|
||||
|
||||
namespace int128 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue