![]() |
Prusa Slicer 2.6.0
|
#include <src/libslic3r/Arachne/BeadingStrategy/BeadingStrategy.hpp>
Inheritance diagram for Slic3r::Arachne::BeadingStrategy:
Collaboration diagram for Slic3r::Arachne::BeadingStrategy:Classes | |
| struct | Beading |
Public Member Functions | |
| BeadingStrategy (coord_t optimal_width, double wall_split_middle_threshold, double wall_add_middle_threshold, coord_t default_transition_length, float transitioning_angle=pi_div(3)) | |
| BeadingStrategy (const BeadingStrategy &other) | |
| virtual | ~BeadingStrategy ()=default |
| virtual Beading | compute (coord_t thickness, coord_t bead_count) const =0 |
| virtual coord_t | getOptimalThickness (coord_t bead_count) const |
| virtual coord_t | getTransitionThickness (coord_t lower_bead_count) const |
| virtual coord_t | getOptimalBeadCount (coord_t thickness) const =0 |
| virtual coord_t | getTransitioningLength (coord_t lower_bead_count) const |
| virtual float | getTransitionAnchorPos (coord_t lower_bead_count) const |
| virtual std::vector< coord_t > | getNonlinearThicknesses (coord_t lower_bead_count) const |
| virtual std::string | toString () const |
| double | getSplitMiddleThreshold () const |
| double | getTransitioningAngle () const |
Protected Attributes | |
| std::string | name |
| coord_t | optimal_width |
| double | wall_split_middle_threshold |
| Optimal bead width, nominal width off the walls in 'ideal' circumstances. | |
| double | wall_add_middle_threshold |
| Threshold when a middle wall should be split into two, as a ratio of the optimal wall width. | |
| coord_t | default_transition_length |
| Threshold when a new middle wall should be added between an even number of walls, as a ratio of the optimal wall width. | |
| double | transitioning_angle |
| The length of the region to smoothly transfer between bead counts. | |
Mostly virtual base class template.
Strategy for covering a given (constant) horizontal model thickness with a number of beads.
The beads may have different widths.
TODO: extend with printing order?
| struct Slic3r::Arachne::BeadingStrategy::Beading |
The beading for a given horizontal model thickness.
Collaboration diagram for Slic3r::Arachne::BeadingStrategy::Beading:| Class Members | ||
|---|---|---|
| vector< coord_t > | bead_widths | |
| coord_t | left_over | The distance of the toolpath location of each bead from the outline. |
| vector< coord_t > | toolpath_locations | The line width of each bead from the outer inset inward. |
| coord_t | total_thickness | |
| Slic3r::Arachne::BeadingStrategy::BeadingStrategy | ( | coord_t | optimal_width, |
| double | wall_split_middle_threshold, | ||
| double | wall_add_middle_threshold, | ||
| coord_t | default_transition_length, | ||
| float | transitioning_angle = pi_div(3) |
||
| ) |
References name.
| Slic3r::Arachne::BeadingStrategy::BeadingStrategy | ( | const BeadingStrategy & | other | ) |
|
virtualdefault |
|
pure virtual |
Retrieve the bead widths with which to cover a given thickness.
Requirement: Given a constant bead_count the output of each bead width must change gradually along with the thickness.
bead_count might be different from the BeadingStrategy::optimal_bead_count Implemented in Slic3r::Arachne::DistributedBeadingStrategy, Slic3r::Arachne::LimitedBeadingStrategy, Slic3r::Arachne::OuterWallInsetBeadingStrategy, Slic3r::Arachne::RedistributeBeadingStrategy, and Slic3r::Arachne::WideningBeadingStrategy.
|
virtual |
Get the locations in a bead count region where BeadingStrategy::compute exhibits a bend in the widths. Ordered from lower thickness to higher.
This is used to insert extra support bones into the skeleton, so that the resulting beads in long trapezoids don't linearly change between the two ends.
Reimplemented in Slic3r::Arachne::WideningBeadingStrategy.
Referenced by Slic3r::Arachne::SkeletalTrapezoidation::generateExtraRibs().
Here is the caller graph for this function:
|
pure virtual |
The number of beads should we ideally usefor a given model thickness
Implemented in Slic3r::Arachne::DistributedBeadingStrategy, Slic3r::Arachne::LimitedBeadingStrategy, Slic3r::Arachne::OuterWallInsetBeadingStrategy, Slic3r::Arachne::RedistributeBeadingStrategy, and Slic3r::Arachne::WideningBeadingStrategy.
Referenced by Slic3r::Arachne::SkeletalTrapezoidation::filterNoncentralRegions(), Slic3r::Arachne::SkeletalTrapezoidation::generateTransitionMids(), and Slic3r::Arachne::SkeletalTrapezoidation::updateBeadCount().
Here is the caller graph for this function:The ideal thickness for a given
| bead_count |
Reimplemented in Slic3r::Arachne::LimitedBeadingStrategy, Slic3r::Arachne::OuterWallInsetBeadingStrategy, Slic3r::Arachne::RedistributeBeadingStrategy, and Slic3r::Arachne::WideningBeadingStrategy.
References optimal_width.
Referenced by getTransitionAnchorPos(), and getTransitionThickness().
Here is the caller graph for this function:| double Slic3r::Arachne::BeadingStrategy::getSplitMiddleThreshold | ( | ) | const |
References wall_split_middle_threshold.
|
virtual |
The fraction of the transition length to put between the lower end of the transition and the point where the unsmoothed bead count jumps.
Transitions are used to smooth out the jumps in integer bead count; the jumps turn into ramps which could be positioned relative to the jump location.
Reimplemented in Slic3r::Arachne::LimitedBeadingStrategy, Slic3r::Arachne::RedistributeBeadingStrategy, and Slic3r::Arachne::WideningBeadingStrategy.
References getOptimalThickness(), and getTransitionThickness().
Referenced by Slic3r::Arachne::SkeletalTrapezoidation::filterTransitionMids(), and Slic3r::Arachne::SkeletalTrapezoidation::generateTransitionEnds().
Here is the call graph for this function:
Here is the caller graph for this function:| double Slic3r::Arachne::BeadingStrategy::getTransitioningAngle | ( | ) | const |
References transitioning_angle.
Referenced by Slic3r::Arachne::SkeletalTrapezoidation::updateIsCentral().
Here is the caller graph for this function:
|
virtual |
The length of the transitioning region along the marked / significant regions of the skeleton.
Transitions are used to smooth out the jumps in integer bead count; the jumps turn into ramps with some incline defined by their length.
Reimplemented in Slic3r::Arachne::LimitedBeadingStrategy, Slic3r::Arachne::OuterWallInsetBeadingStrategy, Slic3r::Arachne::RedistributeBeadingStrategy, and Slic3r::Arachne::WideningBeadingStrategy.
References default_transition_length.
Referenced by Slic3r::Arachne::SkeletalTrapezoidation::dissolveNearbyTransitions(), Slic3r::Arachne::SkeletalTrapezoidation::filterTransitionMids(), and Slic3r::Arachne::SkeletalTrapezoidation::generateTransitionEnds().
Here is the caller graph for this function:
|
virtual |
The model thickness at which BeadingStrategy::optimal_bead_count transitions from lower_bead_count to lower_bead_count + 1
Reimplemented in Slic3r::Arachne::LimitedBeadingStrategy, Slic3r::Arachne::OuterWallInsetBeadingStrategy, Slic3r::Arachne::RedistributeBeadingStrategy, and Slic3r::Arachne::WideningBeadingStrategy.
References getOptimalThickness(), wall_add_middle_threshold, and wall_split_middle_threshold.
Referenced by Slic3r::Arachne::SkeletalTrapezoidation::generateTransitionMids(), getTransitionAnchorPos(), and Slic3r::Arachne::SkeletalTrapezoidation::updateIsCentral().
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
|
protected |
Threshold when a new middle wall should be added between an even number of walls, as a ratio of the optimal wall width.
Referenced by getTransitioningLength().
|
protected |
|
protected |
|
protected |
The length of the region to smoothly transfer between bead counts.
The maximum angle between outline segments smaller than which we are going to add transitions Equals 180 - the "limit bisector angle" from the paper
Referenced by getTransitioningAngle().
|
protected |
Threshold when a middle wall should be split into two, as a ratio of the optimal wall width.
Referenced by Slic3r::Arachne::DistributedBeadingStrategy::getOptimalBeadCount(), and getTransitionThickness().
|
protected |
Optimal bead width, nominal width off the walls in 'ideal' circumstances.
Referenced by Slic3r::Arachne::DistributedBeadingStrategy::getOptimalBeadCount(), getSplitMiddleThreshold(), and getTransitionThickness().