mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-24 07:03:59 -06:00
parent
b27e18c970
commit
598ac290a1
3 changed files with 7 additions and 8 deletions
|
@ -3779,7 +3779,7 @@ GLCanvas3D::WipeTowerInfo GLCanvas3D::get_wipe_tower_info() const
|
||||||
m_config->opt_float("wipe_tower_y"));
|
m_config->opt_float("wipe_tower_y"));
|
||||||
wti.m_rotation = (M_PI/180.) * m_config->opt_float("wipe_tower_rotation_angle");
|
wti.m_rotation = (M_PI/180.) * m_config->opt_float("wipe_tower_rotation_angle");
|
||||||
const BoundingBoxf3& bb = vol->bounding_box();
|
const BoundingBoxf3& bb = vol->bounding_box();
|
||||||
wti.m_bb_size = Vec2d(bb.size().x(), bb.size().y());
|
wti.m_bb = BoundingBoxf{to_2d(bb.min), to_2d(bb.max)};
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -665,8 +665,8 @@ public:
|
||||||
class WipeTowerInfo {
|
class WipeTowerInfo {
|
||||||
protected:
|
protected:
|
||||||
Vec2d m_pos = {std::nan(""), std::nan("")};
|
Vec2d m_pos = {std::nan(""), std::nan("")};
|
||||||
Vec2d m_bb_size = {0., 0.};
|
|
||||||
double m_rotation = 0.;
|
double m_rotation = 0.;
|
||||||
|
BoundingBoxf m_bb;
|
||||||
friend class GLCanvas3D;
|
friend class GLCanvas3D;
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
@ -677,7 +677,7 @@ public:
|
||||||
|
|
||||||
inline const Vec2d& pos() const { return m_pos; }
|
inline const Vec2d& pos() const { return m_pos; }
|
||||||
inline double rotation() const { return m_rotation; }
|
inline double rotation() const { return m_rotation; }
|
||||||
inline const Vec2d bb_size() const { return m_bb_size; }
|
inline const Vec2d bb_size() const { return m_bb.size(); }
|
||||||
|
|
||||||
void apply_wipe_tower() const;
|
void apply_wipe_tower() const;
|
||||||
};
|
};
|
||||||
|
|
|
@ -30,11 +30,10 @@ public:
|
||||||
ArrangePolygon get_arrange_polygon() const
|
ArrangePolygon get_arrange_polygon() const
|
||||||
{
|
{
|
||||||
Polygon ap({
|
Polygon ap({
|
||||||
{coord_t(0), coord_t(0)},
|
{scaled(m_bb.min)},
|
||||||
{scaled(m_bb_size(X)), coord_t(0)},
|
{scaled(m_bb.max.x()), scaled(m_bb.min.y())},
|
||||||
{scaled(m_bb_size)},
|
{scaled(m_bb.max)},
|
||||||
{coord_t(0), scaled(m_bb_size(Y))},
|
{scaled(m_bb.min.x()), scaled(m_bb.max.y())}
|
||||||
{coord_t(0), coord_t(0)},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
ArrangePolygon ret;
|
ArrangePolygon ret;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue