mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-22 16:21:24 -06:00
No tests were covering randomize-start, which was not working anymore after recent ExtrusionLoop refactoring. #2028
This commit is contained in:
parent
47940a712d
commit
69002b8ea2
12 changed files with 87 additions and 37 deletions
|
@ -72,23 +72,21 @@ ExtrusionPath::is_perimeter() const
|
|||
{
|
||||
return this->role == erPerimeter
|
||||
|| this->role == erExternalPerimeter
|
||||
|| this->role == erOverhangPerimeter
|
||||
|| this->role == erContourInternalPerimeter;
|
||||
|| this->role == erOverhangPerimeter;
|
||||
}
|
||||
|
||||
bool
|
||||
ExtrusionPath::is_fill() const
|
||||
{
|
||||
return this->role == erFill
|
||||
|| this->role == erSolidFill
|
||||
|| this->role == erTopSolidFill;
|
||||
return this->role == erInternalInfill
|
||||
|| this->role == erSolidInfill
|
||||
|| this->role == erTopSolidInfill;
|
||||
}
|
||||
|
||||
bool
|
||||
ExtrusionPath::is_bridge() const
|
||||
{
|
||||
return this->role == erBridge
|
||||
|| this->role == erInternalBridge
|
||||
return this->role == erBridgeInfill
|
||||
|| this->role == erOverhangPerimeter;
|
||||
}
|
||||
|
||||
|
|
|
@ -11,19 +11,25 @@ class ExPolygonCollection;
|
|||
class ExtrusionEntityCollection;
|
||||
class Extruder;
|
||||
|
||||
/* Each ExtrusionRole value identifies a distinct set of { extruder, speed } */
|
||||
enum ExtrusionRole {
|
||||
erPerimeter,
|
||||
erExternalPerimeter,
|
||||
erOverhangPerimeter,
|
||||
erContourInternalPerimeter,
|
||||
erFill,
|
||||
erSolidFill,
|
||||
erTopSolidFill,
|
||||
erBridge,
|
||||
erInternalBridge,
|
||||
erInternalInfill,
|
||||
erSolidInfill,
|
||||
erTopSolidInfill,
|
||||
erBridgeInfill,
|
||||
erGapFill,
|
||||
erSkirt,
|
||||
erSupportMaterial,
|
||||
erGapFill,
|
||||
};
|
||||
|
||||
/* Special flags describing loop */
|
||||
enum ExtrusionLoopRole {
|
||||
elrDefault,
|
||||
elrExternalPerimeter,
|
||||
elrContourInternalPerimeter,
|
||||
};
|
||||
|
||||
class ExtrusionEntity
|
||||
|
@ -47,7 +53,7 @@ class ExtrusionPath : public ExtrusionEntity
|
|||
float width;
|
||||
float height;
|
||||
|
||||
ExtrusionPath() : mm3_per_mm(-1), width(-1), height(-1) {};
|
||||
ExtrusionPath(ExtrusionRole role) : role(role), mm3_per_mm(-1), width(-1), height(-1) {};
|
||||
ExtrusionPath* clone() const;
|
||||
void reverse();
|
||||
Point first_point() const;
|
||||
|
@ -74,7 +80,9 @@ class ExtrusionLoop : public ExtrusionEntity
|
|||
{
|
||||
public:
|
||||
ExtrusionPaths paths;
|
||||
ExtrusionLoopRole role;
|
||||
|
||||
ExtrusionLoop(ExtrusionLoopRole role = elrDefault) : role(role) {};
|
||||
operator Polygon() const;
|
||||
ExtrusionLoop* clone() const;
|
||||
bool make_clockwise();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue