![]() |
Prusa Slicer 2.6.0
|
#include <src/libnest2d/include/libnest2d/nester.hpp>
Inheritance diagram for libnest2d::SelectionStrategyLike< SelectionStrategy >:Public Types | |
| using | RawShape = typename SelectionStrategy::ShapeType |
| using | Item = _Item< RawShape > |
| using | PackGroup = _PackGroup< RawShape > |
| using | Config = typename SelectionStrategy::Config |
Public Member Functions | |
| void | configure (const Config &config) |
| Provide a different configuration for the selection strategy. | |
| void | progressIndicator (ProgressFunction fn) |
| A function callback which should be called whenever an item or a group of items where successfully packed. | |
| void | stopCondition (StopCondition cond) |
| template<class TPlacer , class TIterator , class TBin = typename PlacementStrategyLike<TPlacer>::BinType, class PConfig = typename PlacementStrategyLike<TPlacer>::Config> | |
| void | packItems (TIterator first, TIterator last, TBin &&bin, PConfig &&config=PConfig()) |
| A method to start the calculation on the input sequence. | |
| const PackGroup & | getResult () const |
| Get the items for a particular bin. | |
| int | lastPackedBinId () const |
| void | clear () |
Private Attributes | |
| SelectionStrategy | impl_ |
A wrapper interface (trait) class for any selections strategy provider.
| using libnest2d::SelectionStrategyLike< SelectionStrategy >::Config = typename SelectionStrategy::Config |
| using libnest2d::SelectionStrategyLike< SelectionStrategy >::Item = _Item<RawShape> |
| using libnest2d::SelectionStrategyLike< SelectionStrategy >::PackGroup = _PackGroup<RawShape> |
| using libnest2d::SelectionStrategyLike< SelectionStrategy >::RawShape = typename SelectionStrategy::ShapeType |
|
inline |
References libnest2d::SelectionStrategyLike< SelectionStrategy >::impl_.
|
inline |
Provide a different configuration for the selection strategy.
Note that it depends on the particular placer implementation how it reacts to config changes in the middle of a calculation.
| config | The configuration object defined by the selection strategy. |
References libnest2d::SelectionStrategyLike< SelectionStrategy >::impl_.
Referenced by libnest2d::_Nester< PlacementStrategy, SelectionStrategy >::_Nester(), libnest2d::_Nester< PlacementStrategy, SelectionStrategy >::configure(), libnest2d::_Nester< PlacementStrategy, SelectionStrategy >::configure(), and libnest2d::_Nester< PlacementStrategy, SelectionStrategy >::configure().
Here is the caller graph for this function:
|
inline |
Get the items for a particular bin.
| binIndex | The index of the requested bin. |
References libnest2d::SelectionStrategyLike< SelectionStrategy >::impl_.
Referenced by libnest2d::_Nester< PlacementStrategy, SelectionStrategy >::execute(), and libnest2d::_Nester< PlacementStrategy, SelectionStrategy >::lastResult().
Here is the caller graph for this function:
|
inline |
References libnest2d::SelectionStrategyLike< SelectionStrategy >::impl_.
Referenced by libnest2d::_Nester< PlacementStrategy, SelectionStrategy >::lastPackedBinId().
Here is the caller graph for this function:
|
inline |
A method to start the calculation on the input sequence.
| TPlacer | The only mandatory template parameter is the type of placer compatible with the PlacementStrategyLike interface. |
| first,last | The first and last iterator if the input sequence. It can be only an iterator of a type convertible to Item. |
| bin. | The shape of the bin. It has to be supported by the placement strategy. |
| An | optional config object for the placer. |
References libnest2d::SelectionStrategyLike< SelectionStrategy >::impl_.
|
inline |
A function callback which should be called whenever an item or a group of items where successfully packed.
| fn | A function callback object taking one unsigned integer as the number of the remaining items to pack. |
References libnest2d::SelectionStrategyLike< SelectionStrategy >::impl_.
Referenced by libnest2d::_Nester< PlacementStrategy, SelectionStrategy >::progressIndicator().
Here is the caller graph for this function:
|
inline |
References libnest2d::SelectionStrategyLike< SelectionStrategy >::impl_.
Referenced by libnest2d::_Nester< PlacementStrategy, SelectionStrategy >::stopCondition().
Here is the caller graph for this function:
|
private |
Referenced by libnest2d::SelectionStrategyLike< SelectionStrategy >::clear(), libnest2d::SelectionStrategyLike< SelectionStrategy >::configure(), libnest2d::SelectionStrategyLike< SelectionStrategy >::getResult(), libnest2d::SelectionStrategyLike< SelectionStrategy >::lastPackedBinId(), libnest2d::SelectionStrategyLike< SelectionStrategy >::packItems(), libnest2d::SelectionStrategyLike< SelectionStrategy >::progressIndicator(), and libnest2d::SelectionStrategyLike< SelectionStrategy >::stopCondition().