diff options
author | enricoturri1966 <enricoturri@seznam.cz> | 2020-07-28 10:48:55 +0300 |
---|---|---|
committer | enricoturri1966 <enricoturri@seznam.cz> | 2020-07-28 10:48:55 +0300 |
commit | d9228ee82cc541f997da7a731893c44a59023445 (patch) | |
tree | d87ac596bd0adff08bad1fe3b6b7f0474615a979 /src/libslic3r/ExtrusionEntity.cpp | |
parent | 14366800e2feac3ce075a317e0895e43411dfc4c (diff) |
GCodeProcessor -> Human readable extrusion roles in gcode
Diffstat (limited to 'src/libslic3r/ExtrusionEntity.cpp')
-rw-r--r-- | src/libslic3r/ExtrusionEntity.cpp | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/libslic3r/ExtrusionEntity.cpp b/src/libslic3r/ExtrusionEntity.cpp index d629a3c89..b2c5e1350 100644 --- a/src/libslic3r/ExtrusionEntity.cpp +++ b/src/libslic3r/ExtrusionEntity.cpp @@ -331,4 +331,40 @@ std::string ExtrusionEntity::role_to_string(ExtrusionRole role) return ""; } +ExtrusionRole ExtrusionEntity::string_to_role(const std::string& role) +{ + if (role == L("Perimeter")) + return erPerimeter; + else if (role == L("External perimeter")) + return erExternalPerimeter; + else if (role == L("Overhang perimeter")) + return erOverhangPerimeter; + else if (role == L("Internal infill")) + return erInternalInfill; + else if (role == L("Solid infill")) + return erSolidInfill; + else if (role == L("Top solid infill")) + return erTopSolidInfill; + else if (role == L("Ironing")) + return erIroning; + else if (role == L("Bridge infill")) + return erBridgeInfill; + else if (role == L("Gap fill")) + return erGapFill; + else if (role == L("Skirt")) + return erSkirt; + else if (role == L("Support material")) + return erSupportMaterial; + else if (role == L("Support material interface")) + return erSupportMaterialInterface; + else if (role == L("Wipe tower")) + return erWipeTower; + else if (role == L("Custom")) + return erCustom; + else if (role == L("Mixed")) + return erMixed; + else + return erNone; +} + } |