![]() |
Prusa Slicer 2.6.0
|
#include <src/libnest2d/include/libnest2d/nester.hpp>
Inheritance diagram for libnest2d::_Nester< PlacementStrategy, SelectionStrategy >:Public Types | |
| using | Item = typename PlacementStrategy::Item |
| using | ShapeType = typename Item::ShapeType |
| using | ItemRef = std::reference_wrapper< Item > |
| using | TPlacer = PlacementStrategyLike< PlacementStrategy > |
| using | BinType = typename TPlacer::BinType |
| using | PlacementConfig = typename TPlacer::Config |
| using | SelectionConfig = typename TSel::Config |
| using | Coord = TCoord< TPoint< typename Item::ShapeType > > |
| using | PackGroup = _PackGroup< typename Item::ShapeType > |
| using | ResultType = PackGroup |
Public Member Functions | |
| template<class TBinType = BinType, class PConf = PlacementConfig, class SConf = SelectionConfig> | |
| _Nester (TBinType &&bin, Coord min_obj_distance=0, const PConf &pconfig=PConf(), const SConf &sconfig=SConf()) | |
| Constructor taking the bin as the only mandatory parameter. | |
| void | configure (const PlacementConfig &pconf) |
| void | configure (const SelectionConfig &sconf) |
| void | configure (const PlacementConfig &pconf, const SelectionConfig &sconf) |
| void | configure (const SelectionConfig &sconf, const PlacementConfig &pconf) |
| template<class It > | |
| ItemIteratorOnly< It, size_t > | execute (It from, It to) |
| Arrange an input sequence of _Item-s. | |
| _Nester & | progressIndicator (ProgressFunction func) |
| Set a progress indicator function object for the selector. | |
| _Nester & | stopCondition (StopCondition fn) |
| Set a predicate to tell when to abort nesting. | |
| const PackGroup & | lastResult () const |
| int | lastPackedBinId () const |
Private Types | |
| using | TSel = SelectionStrategyLike< SelectionStrategy > |
| using | SItem = typename SelectionStrategy::Item |
| using | TPItem = remove_cvref_t< Item > |
| using | TSItem = remove_cvref_t< SItem > |
| template<class It > | |
| using | TVal = remove_ref_t< typename It::value_type > |
| template<class It , class Out > | |
| using | ItemIteratorOnly = enable_if_t< std::is_convertible< TVal< It > &, TPItem & >::value, Out > |
Private Attributes | |
| TSel | selector_ |
| BinType | bin_ |
| PlacementConfig | pconfig_ |
| Coord | min_obj_distance_ |
| StopCondition | stopfn_ |
The _Nester is the front-end class for the libnest2d library. It takes the input items and changes their transformations to be inside the provided bin.
| using libnest2d::_Nester< PlacementStrategy, SelectionStrategy >::BinType = typename TPlacer::BinType |
| using libnest2d::_Nester< PlacementStrategy, SelectionStrategy >::Coord = TCoord<TPoint<typename Item::ShapeType> > |
| using libnest2d::_Nester< PlacementStrategy, SelectionStrategy >::Item = typename PlacementStrategy::Item |
|
private |
| using libnest2d::_Nester< PlacementStrategy, SelectionStrategy >::ItemRef = std::reference_wrapper<Item> |
| using libnest2d::_Nester< PlacementStrategy, SelectionStrategy >::PackGroup = _PackGroup<typename Item::ShapeType> |
| using libnest2d::_Nester< PlacementStrategy, SelectionStrategy >::PlacementConfig = typename TPlacer::Config |
| using libnest2d::_Nester< PlacementStrategy, SelectionStrategy >::ResultType = PackGroup |
| using libnest2d::_Nester< PlacementStrategy, SelectionStrategy >::SelectionConfig = typename TSel::Config |
| using libnest2d::_Nester< PlacementStrategy, SelectionStrategy >::ShapeType = typename Item::ShapeType |
|
private |
|
private |
| using libnest2d::_Nester< PlacementStrategy, SelectionStrategy >::TPlacer = PlacementStrategyLike<PlacementStrategy> |
|
private |
|
private |
|
private |
|
inline |
Constructor taking the bin as the only mandatory parameter.
| bin | The bin shape that will be used by the placers. The type of the bin should be one that is supported by the placer type. |
References libnest2d::SelectionStrategyLike< SelectionStrategy >::configure(), and libnest2d::_Nester< PlacementStrategy, SelectionStrategy >::selector_.
Here is the call graph for this function:
|
inline |
References libnest2d::_Nester< PlacementStrategy, SelectionStrategy >::pconfig_.
|
inline |
References libnest2d::SelectionStrategyLike< SelectionStrategy >::configure(), libnest2d::_Nester< PlacementStrategy, SelectionStrategy >::pconfig_, and libnest2d::_Nester< PlacementStrategy, SelectionStrategy >::selector_.
Here is the call graph for this function:
|
inline |
References libnest2d::SelectionStrategyLike< SelectionStrategy >::configure(), and libnest2d::_Nester< PlacementStrategy, SelectionStrategy >::selector_.
Here is the call graph for this function:
|
inline |
References libnest2d::SelectionStrategyLike< SelectionStrategy >::configure(), libnest2d::_Nester< PlacementStrategy, SelectionStrategy >::pconfig_, and libnest2d::_Nester< PlacementStrategy, SelectionStrategy >::selector_.
Here is the call graph for this function:
|
inline |
Arrange an input sequence of _Item-s.
To get the result, call the translation(), rotation() and binId() methods of each item. If only the transformed polygon is needed, call transformedShape() to get the properly transformed shapes.
The number of groups in the pack group is the number of bins opened by the selection algorithm.
References libnest2d::_Nester< PlacementStrategy, SelectionStrategy >::bin_, libnest2d::SelectionStrategyLike< SelectionStrategy >::getResult(), libnest2d::_Nester< PlacementStrategy, SelectionStrategy >::min_obj_distance_, libnest2d::_Nester< PlacementStrategy, SelectionStrategy >::pconfig_, and libnest2d::_Nester< PlacementStrategy, SelectionStrategy >::selector_.
Referenced by Slic3r::arrangement::AutoArranger< TBin >::operator()().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
References libnest2d::SelectionStrategyLike< SelectionStrategy >::lastPackedBinId(), and libnest2d::_Nester< PlacementStrategy, SelectionStrategy >::selector_.
Here is the call graph for this function:
|
inline |
References libnest2d::SelectionStrategyLike< SelectionStrategy >::getResult(), and libnest2d::_Nester< PlacementStrategy, SelectionStrategy >::selector_.
Here is the call graph for this function:
|
inline |
Set a progress indicator function object for the selector.
References libnest2d::SelectionStrategyLike< SelectionStrategy >::progressIndicator(), and libnest2d::_Nester< PlacementStrategy, SelectionStrategy >::selector_.
Here is the call graph for this function:
|
inline |
Set a predicate to tell when to abort nesting.
References libnest2d::_Nester< PlacementStrategy, SelectionStrategy >::selector_, libnest2d::SelectionStrategyLike< SelectionStrategy >::stopCondition(), and libnest2d::_Nester< PlacementStrategy, SelectionStrategy >::stopfn_.
Here is the call graph for this function:
|
private |
|
private |
|
private |
Referenced by libnest2d::_Nester< PlacementStrategy, SelectionStrategy >::configure(), libnest2d::_Nester< PlacementStrategy, SelectionStrategy >::configure(), libnest2d::_Nester< PlacementStrategy, SelectionStrategy >::configure(), and libnest2d::_Nester< PlacementStrategy, SelectionStrategy >::execute().
|
private |
Referenced by libnest2d::_Nester< PlacementStrategy, SelectionStrategy >::_Nester(), libnest2d::_Nester< PlacementStrategy, SelectionStrategy >::configure(), libnest2d::_Nester< PlacementStrategy, SelectionStrategy >::configure(), libnest2d::_Nester< PlacementStrategy, SelectionStrategy >::configure(), libnest2d::_Nester< PlacementStrategy, SelectionStrategy >::execute(), libnest2d::_Nester< PlacementStrategy, SelectionStrategy >::lastPackedBinId(), libnest2d::_Nester< PlacementStrategy, SelectionStrategy >::lastResult(), libnest2d::_Nester< PlacementStrategy, SelectionStrategy >::progressIndicator(), and libnest2d::_Nester< PlacementStrategy, SelectionStrategy >::stopCondition().
|
private |