OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::GUI::GLCanvas3D::WipeTowerInfo Class Reference

#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/GUI/GLCanvas3D.hpp>

Inheritance diagram for Slic3r::GUI::GLCanvas3D::WipeTowerInfo:
Collaboration diagram for Slic3r::GUI::GLCanvas3D::WipeTowerInfo:

Public Member Functions

 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

Friends

class GLCanvas3D

Detailed Description

Member Function Documentation

◆ apply_wipe_tower() [1/2]

void Slic3r::GUI::GLCanvas3D::WipeTowerInfo::apply_wipe_tower ( ) const
inline
double m_rotation
Definition GLCanvas3D.hpp:1341
Vec2d m_pos
Definition GLCanvas3D.hpp:1340
void apply_wipe_tower() const
Definition GLCanvas3D.hpp:1356

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
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
inline
1354{ return m_bb.size(); }
BoundingBoxf m_bb
Definition GLCanvas3D.hpp:1342

References m_bb.

◆ operator bool()

Slic3r::GUI::GLCanvas3D::WipeTowerInfo::operator bool ( ) const
inline
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
inline
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
inline
1353{ return m_rotation; }

References m_rotation.

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

Here is the caller graph for this function:

◆ GLCanvas3D

friend class GLCanvas3D
friend

Member Data Documentation

◆ m_bb

BoundingBoxf Slic3r::GUI::GLCanvas3D::WipeTowerInfo::m_bb
protected

◆ m_plate_idx

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

◆ m_pos

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

◆ m_rotation

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

The documentation for this class was generated from the following files:
  • /home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/GUI/GLCanvas3D.hpp
  • /home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/GUI/GLCanvas3D.cpp