1
0
mirror of https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git synced 2026-07-20 09:34:26 +00:00

Rework of hooks adding

This commit is contained in:
Lukáš Hejl
2020-10-10 22:25:51 +02:00
parent 0b4733f656
commit 53975eeaa3
3 changed files with 109 additions and 30 deletions
+7
View File
@@ -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>();