OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::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::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()

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
std::function< void(const ArrangePolygon &)> setter
Optional setter function which can store arbitrary data in its closure.
Definition Arrange.hpp:103

◆ is_arranged()

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

◆ transformed_poly()

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

Member Data Documentation

◆ allowed_rotations

100{0.};

◆ bed_exclusion_extruder_id

◆ bed_exclusion_extruder_ids

◆ bed_idx

Arrange with inflated polygon.

63{UNARRANGED};

◆ bed_temp

◆ brim_width

95{ 0 }; // brim width

◆ col

◆ extrude_ids

◆ filament_temp_type

extruder_id for least extruder switch

75{ -1 };

◆ first_bed_temp

print temperature for different material judge

78{ 0 };

◆ first_print_temp

first layer bed temperature for different material judge

79{ 0 };

◆ has_tree_support

◆ has_z_range

86{ false }; // whether z_min / z_max are authoritative

◆ height

83{ 0 }; // item height

◆ inflation

The rotation of the poly in radians.

◆ is_applied

82{ 0 }; // transform has been applied

◆ is_bed_exclusion

87{ false }; // conditional bed-exclusion obstacle

◆ is_extrusion_cali_object

◆ is_virt_object

◆ is_wipe_tower

◆ itemid

81{ 0 }; // item id in the vector, used for accessing all possible params like extrude_id

◆ locked_plate

◆ name

◆ poly

◆ print_temp

bed temperature for different material judge

77{0};

◆ priority

To which logical bed does poly belong...

64{0};

◆ rotation

The translation of the poly.

61{0.0};

◆ row

◆ setter

Optional setter function which can store arbitrary data in its closure.

◆ translation

The 2D silhouette to be arranged.

60{0, 0};

◆ vitrify_temp

first layer print temperature for different material judge

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

◆ z_max

85{ 0 }; // highest occupied Z coordinate

◆ z_min

84{ 0 }; // lowest occupied Z coordinate

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