OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::GUI::WipeTower Class Reference
Inheritance diagram for Slic3r::GUI::WipeTower:
Collaboration diagram for Slic3r::GUI::WipeTower:

Public Member Functions

 WipeTower (const GLCanvas3D::WipeTowerInfo &wti)
 WipeTower (GLCanvas3D::WipeTowerInfo &&wti)
void apply_arrange_result (const Vec2d &tr, double rotation, int item_id)
ArrangePolygon get_arrange_polygon () const
 operator bool () const
const Vec2d & pos () const
double rotation () const
const Vec2d bb_size () const
void apply_wipe_tower () const
void apply_wipe_tower (Vec2d pos, double rot) const

Protected Attributes

Vec2d m_pos = {std::nan(""), std::nan("")}
double m_rotation = 0.
BoundingBoxf m_bb
int m_plate_idx = -1

Detailed Description

Constructor & Destructor Documentation

◆ WipeTower() [1/2]

Slic3r::GUI::WipeTower::WipeTower ( const GLCanvas3D::WipeTowerInfo & wti)
inlineexplicit
109 : GLCanvas3D::WipeTowerInfo(wti)
110 {}

References Slic3r::GUI::GLCanvas3D::WipeTowerInfo::GLCanvas3D.

Here is the call graph for this function:

◆ WipeTower() [2/2]

Slic3r::GUI::WipeTower::WipeTower ( GLCanvas3D::WipeTowerInfo && wti)
inlineexplicit
113 : GLCanvas3D::WipeTowerInfo(std::move(wti))
114 {}

References Slic3r::GUI::GLCanvas3D::WipeTowerInfo::GLCanvas3D.

Here is the call graph for this function:

Member Function Documentation

◆ apply_arrange_result()

void Slic3r::GUI::WipeTower::apply_arrange_result ( const Vec2d & tr,
double rotation,
int item_id )
inline
117 {
120 }
double m_rotation
Definition GLCanvas3D.hpp:1341
Vec2d m_pos
Definition GLCanvas3D.hpp:1340
void apply_wipe_tower() const
Definition GLCanvas3D.hpp:1356
double rotation() const
Definition GLCanvas3D.hpp:1353
constexpr Eigen::Matrix< Tout, 2, EigenArgs... > unscaled(const Slic3r::Point &v) noexcept
Definition Arrange.cpp:81

References Slic3r::GUI::GLCanvas3D::WipeTowerInfo::apply_wipe_tower(), Slic3r::GUI::GLCanvas3D::WipeTowerInfo::m_pos, Slic3r::GUI::GLCanvas3D::WipeTowerInfo::m_rotation, Slic3r::GUI::GLCanvas3D::WipeTowerInfo::rotation(), and Slic3r::unscaled().

Here is the call graph for this function:

◆ apply_wipe_tower() [1/2]

void Slic3r::GUI::GLCanvas3D::WipeTowerInfo::apply_wipe_tower ( ) const
inlineinherited

References apply_wipe_tower(), m_pos, and m_rotation.

Referenced by Slic3r::GUI::WipeTower::apply_arrange_result(), apply_wipe_tower(), and apply_wipe_tower().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ apply_wipe_tower() [2/2]

void Slic3r::GUI::GLCanvas3D::WipeTowerInfo::apply_wipe_tower ( Vec2d pos,
double rot ) const
inherited
12826{
12827 // BBS: add partplate logic
12828 DynamicConfig& proj_cfg = wxGetApp().preset_bundle->project_config;
12829 Vec3d plate_origin = wxGetApp().plater()->get_partplate_list().get_plate(m_plate_idx)->get_origin();
12830 ConfigOptionFloat wipe_tower_x(pos(X) - plate_origin(0));
12831 ConfigOptionFloat wipe_tower_y(pos(Y) - plate_origin(1));
12832
12833 ConfigOptionFloats* wipe_tower_x_opt = proj_cfg.option<ConfigOptionFloats>("wipe_tower_x", true);
12834 ConfigOptionFloats* wipe_tower_y_opt = proj_cfg.option<ConfigOptionFloats>("wipe_tower_y", true);
12835 wipe_tower_x_opt->set_at(&wipe_tower_x, m_plate_idx, 0);
12836 wipe_tower_y_opt->set_at(&wipe_tower_y, m_plate_idx, 0);
12837
12838 //q->update();
12839}
void set_at(const ConfigOption *rhs, size_t i, size_t j) override
Definition Config.hpp:451
const Vec2d & pos() const
Definition GLCanvas3D.hpp:1352
int m_plate_idx
Definition GLCanvas3D.hpp:1344
zaa_minimize_perimeter_height ConfigOptionFloat
Definition PrintConfig.hpp:1954
Eigen::Matrix< double, 3, 1, Eigen::DontAlign > Vec3d
Definition Point.hpp:68
@ Y
Definition libslic3r.h:142
@ X
Definition libslic3r.h:141
zaa_minimize_perimeter_height wipe_tower_y((ConfigOptionFloat, prime_tower_width))((ConfigOptionFloat
ConfigOptionFloatsTempl< false > ConfigOptionFloats
Definition Config.hpp:1015

References apply_wipe_tower(), m_plate_idx, Slic3r::ConfigBase::option(), pos(), Slic3r::ConfigOptionVector< double >::set_at(), Slic3r::wipe_tower_y(), Slic3r::X, and Slic3r::Y.

Here is the call graph for this function:

◆ bb_size()

const Vec2d Slic3r::GUI::GLCanvas3D::WipeTowerInfo::bb_size ( ) const
inlineinherited
1354{ return m_bb.size(); }
BoundingBoxf m_bb
Definition GLCanvas3D.hpp:1342

References m_bb.

◆ get_arrange_polygon()

ArrangePolygon Slic3r::GUI::WipeTower::get_arrange_polygon ( ) const
inline
123 {
124 Polygon ap({
125 {scaled(m_bb.min)},
126 {scaled(m_bb.max.x()), scaled(m_bb.min.y())},
127 {scaled(m_bb.max)},
128 {scaled(m_bb.min.x()), scaled(m_bb.max.y())}
129 });
130
131 ArrangePolygon ret;
132 ret.poly.contour = std::move(ap);
133 ret.translation = scaled(m_pos);
134 ret.rotation = m_rotation;
135 //BBS
136 ret.name = "WipeTower";
137 ret.is_virt_object = true;
138 ret.is_wipe_tower = true;
139 ++ret.priority;
140
141 BOOST_LOG_TRIVIAL(debug) << " arrange: wipe tower info:" << m_bb << ", m_pos: " << m_pos.transpose();
142
143 return ret;
144 }
Polygon contour
Definition ExPolygon.hpp:42
arrangement::ArrangePolygon ArrangePolygon
Definition ArrangeJob.cpp:51
BoundingBox scaled(const BoundingBoxf &bb)
Definition BoundingBox.hpp:284
Slic3r::Polygon Polygon
Definition Emboss.cpp:101
ExPolygon poly
Definition Arrange.hpp:59

References Slic3r::GUI::GLCanvas3D::WipeTowerInfo::m_bb, Slic3r::GUI::GLCanvas3D::WipeTowerInfo::m_pos, Slic3r::GUI::GLCanvas3D::WipeTowerInfo::m_rotation, and Slic3r::scaled().

Referenced by Slic3r::GUI::get_wipetower_arrange_poly().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator bool()

Slic3r::GUI::GLCanvas3D::WipeTowerInfo::operator bool ( ) const
inlineinherited
1348 {
1349 return !std::isnan(m_pos.x()) && !std::isnan(m_pos.y());
1350 }

References m_pos.

◆ pos()

const Vec2d & Slic3r::GUI::GLCanvas3D::WipeTowerInfo::pos ( ) const
inlineinherited
1352{ return m_pos; }

References m_pos.

Referenced by apply_wipe_tower().

Here is the caller graph for this function:

◆ rotation()

double Slic3r::GUI::GLCanvas3D::WipeTowerInfo::rotation ( ) const
inlineinherited
1353{ return m_rotation; }

References m_rotation.

Referenced by Slic3r::GUI::WipeTower::apply_arrange_result().

Here is the caller graph for this function:

Member Data Documentation

◆ m_bb

BoundingBoxf Slic3r::GUI::GLCanvas3D::WipeTowerInfo::m_bb
protectedinherited

◆ m_plate_idx

int Slic3r::GUI::GLCanvas3D::WipeTowerInfo::m_plate_idx = -1
protectedinherited

◆ m_pos

Vec2d Slic3r::GUI::GLCanvas3D::WipeTowerInfo::m_pos = {std::nan(""), std::nan("")}
protectedinherited

◆ m_rotation

double Slic3r::GUI::GLCanvas3D::WipeTowerInfo::m_rotation = 0.
protectedinherited

The documentation for this class was generated from the following file:
  • /home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/GUI/Jobs/ArrangeJob.cpp