Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
Slic3r::LinesBucket Class Reference

#include <src/libslic3r/GCode/ConflictChecker.hpp>

+ Collaboration diagram for Slic3r::LinesBucket:

Public Member Functions

 LinesBucket (std::vector< ExtrusionPaths > &&paths, int id, Points offsets)
 
 LinesBucket (LinesBucket &&)=default
 
bool valid () const
 
void raise ()
 
double curHeight () const
 
LineWithIDs curLines () const
 

Private Attributes

double _curHeight = 0.0
 
unsigned _curPileIdx = 0
 
std::vector< ExtrusionPaths_piles
 
int _id
 
Points _offsets
 

Friends

bool operator> (const LinesBucket &left, const LinesBucket &right)
 
bool operator< (const LinesBucket &left, const LinesBucket &right)
 
bool operator== (const LinesBucket &left, const LinesBucket &right)
 

Detailed Description

Constructor & Destructor Documentation

◆ LinesBucket() [1/2]

Slic3r::LinesBucket::LinesBucket ( std::vector< ExtrusionPaths > &&  paths,
int  id,
Points  offsets 
)
inline
39: _piles(paths), _id(id), _offsets(offsets) {}
std::vector< ExtrusionPaths > _piles
Definition ConflictChecker.hpp:34
int _id
Definition ConflictChecker.hpp:35
Points _offsets
Definition ConflictChecker.hpp:36

◆ LinesBucket() [2/2]

Slic3r::LinesBucket::LinesBucket ( LinesBucket &&  )
default

Member Function Documentation

◆ curHeight()

double Slic3r::LinesBucket::curHeight ( ) const
inline
50{ return _curHeight; }
double _curHeight
Definition ConflictChecker.hpp:31

References _curHeight.

◆ curLines()

LineWithIDs Slic3r::LinesBucket::curLines ( ) const
inline
52 {
53 LineWithIDs lines;
54 for (const ExtrusionPath &path : _piles[_curPileIdx]) {
55 Polyline check_polyline;
56 for (int i = 0; i < (int)_offsets.size(); ++i) {
57 check_polyline = path.polyline;
58 check_polyline.translate(_offsets[i]);
59 Lines tmpLines = check_polyline.lines();
60 for (const Line& line : tmpLines) { lines.emplace_back(line, _id, i, path.role()); }
61 }
62 }
63 return lines;
64 }
unsigned _curPileIdx
Definition ConflictChecker.hpp:32
std::vector< Line > Lines
Definition Line.hpp:17
std::vector< LineWithID > LineWithIDs
Definition ConflictChecker.hpp:26

References _curPileIdx, _id, _offsets, _piles, Slic3r::Polyline::lines(), and Slic3r::MultiPoint::translate().

+ Here is the call graph for this function:

◆ raise()

void Slic3r::LinesBucket::raise ( )
inline
44 {
45 if (valid()) {
46 if (_piles[_curPileIdx].empty() == false) { _curHeight += _piles[_curPileIdx].front().height; }
48 }
49 }
bool valid() const
Definition ConflictChecker.hpp:42
bool empty(const BoundingBoxBase< PointType, PointsType > &bb)
Definition BoundingBox.hpp:229

References _curHeight, _curPileIdx, _piles, Slic3r::empty(), and valid().

+ Here is the call graph for this function:

◆ valid()

bool Slic3r::LinesBucket::valid ( ) const
inline
42{ return _curPileIdx < _piles.size(); }

References _curPileIdx, and _piles.

Referenced by raise().

+ Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ operator<

bool operator< ( const LinesBucket left,
const LinesBucket right 
)
friend
67{ return left._curHeight < right._curHeight; }

◆ operator==

bool operator== ( const LinesBucket left,
const LinesBucket right 
)
friend
68{ return left._curHeight == right._curHeight; }

◆ operator>

bool operator> ( const LinesBucket left,
const LinesBucket right 
)
friend
66{ return left._curHeight > right._curHeight; }

Member Data Documentation

◆ _curHeight

double Slic3r::LinesBucket::_curHeight = 0.0
private

Referenced by curHeight(), and raise().

◆ _curPileIdx

unsigned Slic3r::LinesBucket::_curPileIdx = 0
private

Referenced by curLines(), raise(), and valid().

◆ _id

int Slic3r::LinesBucket::_id
private

Referenced by curLines().

◆ _offsets

Points Slic3r::LinesBucket::_offsets
private

Referenced by curLines().

◆ _piles

std::vector<ExtrusionPaths> Slic3r::LinesBucket::_piles
private

Referenced by curLines(), raise(), and valid().


The documentation for this class was generated from the following file: