mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-16 19:28:14 -06:00
3D object positioning
This commit is contained in:
parent
a82f95e903
commit
fcfb3b98bc
16 changed files with 217 additions and 91 deletions
|
@ -184,4 +184,18 @@ Line::to_SV_pureperl() const {
|
|||
}
|
||||
#endif
|
||||
|
||||
Pointf3
|
||||
Linef3::intersect_plane(double z) const
|
||||
{
|
||||
return Pointf3(
|
||||
this->a.x + (this->b.x - this->a.x) * (z - this->a.z) / (this->b.z - this->a.z),
|
||||
this->a.y + (this->b.y - this->a.y) * (z - this->a.z) / (this->b.z - this->a.z),
|
||||
z
|
||||
);
|
||||
}
|
||||
|
||||
#ifdef SLIC3RXS
|
||||
REGISTER_CLASS(Linef3, "Linef3");
|
||||
#endif
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue