mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-15 02:37:51 -06:00
Rework of hooks adding
This commit is contained in:
parent
0b4733f656
commit
53975eeaa3
3 changed files with 109 additions and 30 deletions
|
@ -75,6 +75,8 @@ public:
|
|||
double ccw(const Point& point) const { return point.ccw(*this); }
|
||||
// Clip a line with a bounding box. Returns false if the line is completely outside of the bounding box.
|
||||
bool clip_with_bbox(const BoundingBox &bbox);
|
||||
// Resize a line from both sides by the offset.
|
||||
void offset(double offset);
|
||||
|
||||
static inline double distance_to_squared(const Point &point, const Point &a, const Point &b) { return line_alg::distance_to_squared(Line{a, b}, Vec<2, coord_t>{point}); }
|
||||
static double distance_to(const Point &point, const Point &a, const Point &b) { return sqrt(distance_to_squared(point, a, b)); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue