mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-21 21:58:03 -06:00
Rework of hooks adding
This commit is contained in:
parent
0b4733f656
commit
53975eeaa3
3 changed files with 109 additions and 30 deletions
|
@ -100,6 +100,13 @@ bool Line::clip_with_bbox(const BoundingBox &bbox)
|
|||
return result;
|
||||
}
|
||||
|
||||
void Line::offset(double offset)
|
||||
{
|
||||
Vector offset_vector = (offset * this->vector().cast<double>().normalized()).cast<coord_t>();
|
||||
this->a -= offset_vector;
|
||||
this->b += offset_vector;
|
||||
}
|
||||
|
||||
Vec3d Linef3::intersect_plane(double z) const
|
||||
{
|
||||
auto v = (this->b - this->a).cast<double>();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue