OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::arrangement::ArrangePolygon Struct Reference

Input/Output structure for the arrange() function. The poly field will not be modified during arrangement. Instead, the translation and rotation fields will mark the needed transformation for the polygon to be in the arranged position. These can also be set to an initial offset and rotation. More...

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

Collaboration diagram for Slic3r::arrangement::ArrangePolygon:

Public Member Functions

void apply ()
 Helper function to call the setter with the arrange data arguments.
bool is_arranged () const
 Test if arrange() was called previously and gave a successful result.
ExPolygon transformed_poly () const

Public Attributes

ExPolygon poly
Vec2crd translation {0, 0}
 The 2D silhouette to be arranged.
double rotation {0.0}
 The translation of the poly.
coord_t inflation = 0
 The rotation of the poly in radians.
int bed_idx {UNARRANGED}
 Arrange with inflated polygon.
int priority {0}
 To which logical bed does poly belong...
int locked_plate { -1 }
bool is_virt_object { false }
bool is_extrusion_cali_object { false }
bool is_wipe_tower { false }
bool has_tree_support {false}
int row {0}
int col {0}
std::vector< int > extrude_ids {}
int filament_temp_type { -1 }
 extruder_id for least extruder switch
int bed_temp {0}
int print_temp {0}
 bed temperature for different material judge
int first_bed_temp { 0 }
 print temperature for different material judge
int first_print_temp { 0 }
 first layer bed temperature for different material judge
int vitrify_temp { 0 }
 first layer print temperature for different material judge
int itemid { 0 }
int is_applied { 0 }
double height { 0 }
double z_min { 0 }
double z_max { 0 }
bool has_z_range { false }
bool is_bed_exclusion { false }
std::vector< int > bed_exclusion_extruder_ids {}
int bed_exclusion_extruder_id { -1 }
double brim_width { 0 }
std::string name
std::vector< double > allowed_rotations = {0.}
std::function< void(const ArrangePolygon &)> setter = nullptr
 Optional setter function which can store arbitrary data in its closure.

Detailed Description

Input/Output structure for the arrange() function. The poly field will not be modified during arrangement. Instead, the translation and rotation fields will mark the needed transformation for the polygon to be in the arranged position. These can also be set to an initial offset and rotation.

The bed_idx field will indicate the logical bed into which the polygon belongs: UNARRANGED means no place for the polygon (also the initial state before arrange), 0..N means the index of the bed. Zero is the physical bed, larger than zero means a virtual bed.

Member Function Documentation

◆ apply()

void Slic3r::arrangement::ArrangePolygon::apply ( )
inline

Helper function to call the setter with the arrange data arguments.

106 {
107 if (setter && !is_applied) {
108 setter(*this);
109 is_applied = 1;
110 }
111 }
std::function< void(const ArrangePolygon &)> setter
Optional setter function which can store arbitrary data in its closure.
Definition Arrange.hpp:103
int is_applied
Definition Arrange.hpp:82

References is_applied, and setter.

Referenced by Slic3r::GUI::ArrangeJob::finalize().

Here is the caller graph for this function:

◆ is_arranged()

bool Slic3r::arrangement::ArrangePolygon::is_arranged ( ) const
inline

Test if arrange() was called previously and gave a successful result.

114{ return bed_idx != UNARRANGED; }
static const constexpr int UNARRANGED
A logical bed representing an object not being arranged. Either the arrange has not yet successfully ...
Definition Arrange.hpp:47
int bed_idx
Arrange with inflated polygon.
Definition Arrange.hpp:63

References bed_idx, and Slic3r::arrangement::UNARRANGED.

◆ transformed_poly()

ExPolygon Slic3r::arrangement::ArrangePolygon::transformed_poly ( ) const
inline
117 {
118 ExPolygon ret = poly;
119 ret.rotate(rotation);
120 ret.translate(translation.x(), translation.y());
121
122 return ret;
123 }
ExPolygon poly
Definition Arrange.hpp:59
Vec2crd translation
The 2D silhouette to be arranged.
Definition Arrange.hpp:60
double rotation
The translation of the poly.
Definition Arrange.hpp:61

References poly, Slic3r::ExPolygon::rotate(), rotation, Slic3r::ExPolygon::translate(), and translation.

Referenced by Slic3r::ImexArranger::crosses_keep_out(), and Slic3r::GUI::FillBedJob::prepare().

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

Member Data Documentation

◆ allowed_rotations

std::vector<double> Slic3r::arrangement::ArrangePolygon::allowed_rotations = {0.}
100{0.};

◆ bed_exclusion_extruder_id

int Slic3r::arrangement::ArrangePolygon::bed_exclusion_extruder_id { -1 }

◆ bed_exclusion_extruder_ids

◆ bed_idx

◆ bed_temp

int Slic3r::arrangement::ArrangePolygon::bed_temp {0}
76{0};

Referenced by Slic3r::get_instance_arrange_poly().

◆ brim_width

double Slic3r::arrangement::ArrangePolygon::brim_width { 0 }
95{ 0 }; // brim width

Referenced by Slic3r::get_instance_arrange_poly().

◆ col

◆ extrude_ids

std::vector<int> Slic3r::arrangement::ArrangePolygon::extrude_ids {}

◆ filament_temp_type

int Slic3r::arrangement::ArrangePolygon::filament_temp_type { -1 }

extruder_id for least extruder switch

75{ -1 };

Referenced by Slic3r::get_instance_arrange_poly(), and Slic3r::arrangement::process_arrangeable().

◆ first_bed_temp

int Slic3r::arrangement::ArrangePolygon::first_bed_temp { 0 }

print temperature for different material judge

78{ 0 };

Referenced by Slic3r::get_instance_arrange_poly(), and Slic3r::arrangement::process_arrangeable().

◆ first_print_temp

int Slic3r::arrangement::ArrangePolygon::first_print_temp { 0 }

first layer bed temperature for different material judge

79{ 0 };

Referenced by Slic3r::get_instance_arrange_poly().

◆ has_tree_support

bool Slic3r::arrangement::ArrangePolygon::has_tree_support {false}
70{false};

Referenced by Slic3r::get_instance_arrange_poly().

◆ has_z_range

bool Slic3r::arrangement::ArrangePolygon::has_z_range { false }

◆ height

◆ inflation

coord_t Slic3r::arrangement::ArrangePolygon::inflation = 0

◆ is_applied

int Slic3r::arrangement::ArrangePolygon::is_applied { 0 }
82{ 0 }; // transform has been applied

Referenced by apply().

◆ is_bed_exclusion

bool Slic3r::arrangement::ArrangePolygon::is_bed_exclusion { false }
87{ false }; // conditional bed-exclusion obstacle

Referenced by Slic3r::GUI::PartPlateList::preprocess_exclude_areas(), and Slic3r::arrangement::process_arrangeable().

◆ is_extrusion_cali_object

bool Slic3r::arrangement::ArrangePolygon::is_extrusion_cali_object { false }

◆ is_virt_object

◆ is_wipe_tower

bool Slic3r::arrangement::ArrangePolygon::is_wipe_tower { false }

◆ itemid

int Slic3r::arrangement::ArrangePolygon::itemid { 0 }

◆ locked_plate

◆ name

◆ poly

◆ print_temp

int Slic3r::arrangement::ArrangePolygon::print_temp {0}

bed temperature for different material judge

77{0};

Referenced by Slic3r::get_instance_arrange_poly(), and Slic3r::arrangement::process_arrangeable().

◆ priority

int Slic3r::arrangement::ArrangePolygon::priority {0}

◆ rotation

◆ row

◆ setter

std::function<void(const ArrangePolygon&)> Slic3r::arrangement::ArrangePolygon::setter = nullptr

◆ translation

◆ vitrify_temp

int Slic3r::arrangement::ArrangePolygon::vitrify_temp { 0 }

first layer print temperature for different material judge

80{ 0 }; // max bed temperature for material compatibility, which is usually the filament vitrification temp

Referenced by Slic3r::get_instance_arrange_poly(), and Slic3r::arrangement::process_arrangeable().

◆ z_max

double Slic3r::arrangement::ArrangePolygon::z_max { 0 }

◆ z_min

double Slic3r::arrangement::ArrangePolygon::z_min { 0 }

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