OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::WipeTowerData Struct Reference

#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/libslic3r/Print.hpp>

Collaboration diagram for Slic3r::WipeTowerData:

Classes

struct  WipeTowerMeshData

Public Member Functions

void clear ()
void construct_mesh (float width, float depth, float height, float brim_width, bool is_rib_wipe_tower, float rib_width, float rib_length, bool fillet_wall, float cone_angle=0.f)

Public Attributes

ToolOrdering & tool_ordering
std::unique_ptr< std::vector< WipeTower::ToolChangeResult > > priming
std::vector< std::vector< WipeTower::ToolChangeResult > > tool_changes
std::unique_ptr< WipeTower::ToolChangeResult > final_purge
std::vector< float > used_filament
int number_of_toolchanges
float depth
float width
std::vector< std::pair< float, float > > z_and_depth_pairs
float brim_width
float height
BoundingBoxf bbx
Vec2f rib_offset
std::optional< WipeTowerMeshData > wipe_tower_mesh_data

Private Member Functions

 WipeTowerData (ToolOrdering &tool_ordering)
 WipeTowerData (const WipeTowerData &)=delete
WipeTowerData & operator= (const WipeTowerData &)=delete

Friends

class Print

Detailed Description


Class Documentation

◆ Slic3r::WipeTowerData::WipeTowerMeshData

struct Slic3r::WipeTowerData::WipeTowerMeshData
Collaboration diagram for Slic3r::WipeTowerData::WipeTowerMeshData:
Class Members
Polygon bottom
TriangleMesh real_brim_mesh
TriangleMesh real_wipe_tower_mesh

Constructor & Destructor Documentation

◆ WipeTowerData() [1/2]

Slic3r::WipeTowerData::WipeTowerData ( ToolOrdering & tool_ordering)
inlineprivate
void clear()
Definition Print.hpp:930
ToolOrdering & tool_ordering
Definition Print.hpp:911

References clear(), and tool_ordering.

Referenced by WipeTowerData(), and operator=().

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

◆ WipeTowerData() [2/2]

Slic3r::WipeTowerData::WipeTowerData ( const WipeTowerData & )
privatedelete

References WipeTowerData().

Here is the call graph for this function:

Member Function Documentation

◆ clear()

void Slic3r::WipeTowerData::clear ( )
inline
930 {
931 priming.reset(nullptr);
932 tool_changes.clear();
933 final_purge.reset(nullptr);
934 used_filament.clear();
936 depth = 0.f;
937 width = 0.f;
938 brim_width = 0.f;
939 height = 0.f;
940 rib_offset = Vec2f::Zero();
941 wipe_tower_mesh_data = std::nullopt;
942 }
std::vector< float > used_filament
Definition Print.hpp:916
std::unique_ptr< WipeTower::ToolChangeResult > final_purge
Definition Print.hpp:915
std::optional< WipeTowerMeshData > wipe_tower_mesh_data
Definition Print.hpp:929
std::unique_ptr< std::vector< WipeTower::ToolChangeResult > > priming
Definition Print.hpp:913
float brim_width
Definition Print.hpp:925
float depth
Definition Print.hpp:920
std::vector< std::vector< WipeTower::ToolChangeResult > > tool_changes
Definition Print.hpp:914
float height
Definition Print.hpp:926
float width
Definition Print.hpp:923
int number_of_toolchanges
Definition Print.hpp:917
Vec2f rib_offset
Definition Print.hpp:928

References brim_width, depth, final_purge, height, number_of_toolchanges, priming, rib_offset, tool_changes, used_filament, width, and wipe_tower_mesh_data.

Referenced by WipeTowerData().

Here is the caller graph for this function:

◆ construct_mesh()

void Slic3r::WipeTowerData::construct_mesh ( float width,
float depth,
float height,
float brim_width,
bool is_rib_wipe_tower,
float rib_width,
float rib_length,
bool fillet_wall,
float cone_angle = 0.f )
7208{
7210 float first_layer_height=0.08; //brim height
7211 if (width < EPSILON || depth < EPSILON || height < EPSILON) return;
7212 if (cone_angle > EPSILON && (!is_rib_wipe_tower || rib_length < EPSILON)) {
7213 // Cone tower: the base bulges past the body box; this bottom polygon feeds the
7214 // containment checks, so it must carry the bulge and the brim (cone not lofted).
7215 wipe_tower_mesh_data->real_wipe_tower_mesh = make_cube(width, depth, height);
7217 auto brim_bottom = offset(wipe_tower_mesh_data->bottom, scaled(brim_width));
7218 if (!brim_bottom.empty())
7219 wipe_tower_mesh_data->bottom = brim_bottom.front();
7220 wipe_tower_mesh_data->real_brim_mesh = WipeTower::its_make_rib_brim(wipe_tower_mesh_data->bottom, first_layer_height);
7221 } else if (!is_rib_wipe_tower || rib_length < EPSILON) {
7222 wipe_tower_mesh_data->real_wipe_tower_mesh = make_cube(width, depth, height);
7223 wipe_tower_mesh_data->real_brim_mesh = make_cube(width + 2 * brim_width, depth + 2 * brim_width, first_layer_height);
7224 wipe_tower_mesh_data->real_brim_mesh.translate({-brim_width, -brim_width, 0});
7227 } else {
7228 wipe_tower_mesh_data->real_wipe_tower_mesh = WipeTower::its_make_rib_tower(width, depth, height, rib_length, rib_width, fillet_wall);
7229 wipe_tower_mesh_data->bottom = WipeTower::rib_section(width, depth, rib_length, rib_width, fillet_wall);
7230 auto brim_bottom = offset(wipe_tower_mesh_data->bottom, scaled(brim_width));
7231 if (!brim_bottom.empty())
7232 wipe_tower_mesh_data->bottom = brim_bottom.front();
7233 wipe_tower_mesh_data->real_brim_mesh = WipeTower::its_make_rib_brim(wipe_tower_mesh_data->bottom, first_layer_height);
7234 wipe_tower_mesh_data->real_wipe_tower_mesh.translate(Vec3f(rib_offset[0], rib_offset[1],0));
7235 wipe_tower_mesh_data->real_brim_mesh.translate(Vec3f(rib_offset[0], rib_offset[1], 0));
7236 wipe_tower_mesh_data->bottom.translate(scaled(Vec2f(rib_offset[0], rib_offset[1])));
7237 }
7238 //wipe_tower_mesh_data->real_wipe_tower_mesh.write_ascii("../wipe_tower_mesh.obj");
7239 //wipe_tower_mesh_data->real_brim_mesh.write_ascii("../wipe_tower_brim_mesh.obj");
7240}
#define EPSILON
Definition ColorUtils.cpp:64
static Polygon cone_base_polygon(double width, double depth, double height, double angle_deg)
Definition WipeTower2.cpp:2167
static Polygon rib_section(float width, float depth, float rib_length, float rib_width, bool fillet_wall)
Definition WipeTower.cpp:1878
static TriangleMesh its_make_rib_tower(float width, float depth, float height, float rib_length, float rib_width, bool fillet_wall)
Definition WipeTower.cpp:1920
static TriangleMesh its_make_rib_brim(const Polygon &brim, float layer_height)
Definition WipeTower.cpp:1950
TriangleMesh make_cube(double x, double y, double z)
Definition TriangleMesh.hpp:378
BoundingBox scaled(const BoundingBoxf &bb)
Definition BoundingBox.hpp:284
Eigen::Matrix< float, 3, 1, Eigen::DontAlign > Vec3f
Definition Point.hpp:65
Slic3r::Polygons offset(const Slic3r::Polygon &polygon, const float delta, JoinType joinType, double miterLimit)
Definition ClipperUtils.cpp:582
Eigen::Matrix< float, 2, 1, Eigen::DontAlign > Vec2f
Definition Point.hpp:64

References brim_width, Slic3r::WipeTower2::cone_base_polygon(), construct_mesh(), depth, EPSILON, height, Slic3r::WipeTower::its_make_rib_brim(), Slic3r::WipeTower::its_make_rib_tower(), Slic3r::make_cube(), Slic3r::offset(), rib_offset, Slic3r::WipeTower::rib_section(), Slic3r::scaled(), width, and wipe_tower_mesh_data.

Referenced by construct_mesh().

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

◆ operator=()

WipeTowerData & Slic3r::WipeTowerData::operator= ( const WipeTowerData & )
privatedelete

References WipeTowerData().

Here is the call graph for this function:

◆ Print

friend class Print
friend

References Print.

Referenced by Print.

Member Data Documentation

◆ bbx

◆ brim_width

◆ depth

◆ final_purge

std::unique_ptr<WipeTower::ToolChangeResult> Slic3r::WipeTowerData::final_purge

Referenced by Slic3r::GCode::_do_export(), and clear().

◆ height

float Slic3r::WipeTowerData::height

Referenced by clear(), and construct_mesh().

◆ number_of_toolchanges

int Slic3r::WipeTowerData::number_of_toolchanges

◆ priming

◆ rib_offset

◆ tool_changes

std::vector<std::vector<WipeTower::ToolChangeResult> > Slic3r::WipeTowerData::tool_changes

◆ tool_ordering

ToolOrdering& Slic3r::WipeTowerData::tool_ordering

Referenced by WipeTowerData().

◆ used_filament

std::vector<float> Slic3r::WipeTowerData::used_filament

◆ width

◆ wipe_tower_mesh_data

◆ z_and_depth_pairs

std::vector<std::pair<float, float> > Slic3r::WipeTowerData::z_and_depth_pairs

The documentation for this struct was generated from the following files:
  • /home/runner/work/OrcaSlicer/OrcaSlicer/src/libslic3r/Print.hpp
  • /home/runner/work/OrcaSlicer/OrcaSlicer/src/libslic3r/Print.cpp