![]() |
Prusa Slicer 2.6.0
|
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 <src/libslic3r/Arrange.hpp>
Collaboration diagram for Slic3r::arrangement::ArrangePolygon:Public Member Functions | |
| void | apply () const |
| 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... | |
| std::vector< double > | allowed_rotations = {0.} |
| std::function< void(const ArrangePolygon &)> | setter = nullptr |
| Optional setter function which can store arbitrary data in its closure. | |
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.
|
inline |
Helper function to call the setter with the arrange data arguments.
References setter.
|
inline |
Test if arrange() was called previously and gave a successful result.
References bed_idx, and Slic3r::arrangement::UNARRANGED.
|
inline |
References poly, Slic3r::ExPolygon::rotate(), rotation, Slic3r::ExPolygon::translate(), and translation.
Referenced by Slic3r::GUI::FillBedJob::prepare().
Here is the call graph for this function:
Here is the caller graph for this function:| std::vector<double> Slic3r::arrangement::ArrangePolygon::allowed_rotations = {0.} |
| int Slic3r::arrangement::ArrangePolygon::bed_idx {UNARRANGED} |
Arrange with inflated polygon.
Referenced by is_arranged(), Slic3r::GUI::FillBedJob::prepare(), and Slic3r::arrangement::process_arrangeable().
| coord_t Slic3r::arrangement::ArrangePolygon::inflation = 0 |
The rotation of the poly in radians.
Referenced by Slic3r::arrangement::process_arrangeable(), and Slic3r::GUI::update_arrangepoly_slaprint().
| ExPolygon Slic3r::arrangement::ArrangePolygon::poly |
| int Slic3r::arrangement::ArrangePolygon::priority {0} |
To which logical bed does poly belong...
Referenced by Slic3r::GUI::FillBedJob::prepare(), and Slic3r::arrangement::process_arrangeable().
| double Slic3r::arrangement::ArrangePolygon::rotation {0.0} |
The translation of the poly.
Referenced by Slic3r::get_arrange_poly(), Slic3r::ModelInstance::get_arrange_polygon(), Slic3r::arrangement::process_arrangeable(), and transformed_poly().
| std::function<void(const ArrangePolygon&)> Slic3r::arrangement::ArrangePolygon::setter = nullptr |
Optional setter function which can store arbitrary data in its closure.
Referenced by apply(), Slic3r::GUI::get_arrange_poly(), Slic3r::GUI::ArrangeJob::get_arrange_poly_(), and Slic3r::GUI::FillBedJob::prepare().
| Vec2crd Slic3r::arrangement::ArrangePolygon::translation {0, 0} |
The 2D silhouette to be arranged.
Referenced by Slic3r::get_arrange_poly(), Slic3r::ModelInstance::get_arrange_polygon(), Slic3r::arrangement::process_arrangeable(), and transformed_poly().