#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/libslic3r/CustomGCode.hpp>
◆ from_json()
| void Slic3r::CustomGCode::Item::from_json |
( |
const nlohmann::json & | j | ) |
|
14 {
15 std::string type_str;
16 j.at("type").get_to(type_str);
17 std::map<std::string,Type> str2type = { {
"ColorChange",
ColorChange },
24 if (str2type.find(type_str) != str2type.end())
25 type = str2type[type_str];
26 j.at(
"print_z").get_to(
print_z);
27 j.at(
"color").get_to(
color);
29 if(j.contains("extra"))
30 j.at(
"extra").get_to(
extra);
31}
@ PausePrint
Definition CustomGCode.hpp:20
@ ToolChange
Definition CustomGCode.hpp:21
@ Template
Definition CustomGCode.hpp:22
@ Custom
Definition CustomGCode.hpp:23
@ ColorChange
Definition CustomGCode.hpp:19
@ Unknown
Definition CustomGCode.hpp:24
std::string extra
Definition CustomGCode.hpp:47
double print_z
Definition CustomGCode.hpp:40
int extruder
Definition CustomGCode.hpp:42
Type type
Definition CustomGCode.hpp:41
std::string color
Definition CustomGCode.hpp:45
References color, Slic3r::CustomGCode::ColorChange, Slic3r::CustomGCode::Custom, extra, extruder, Slic3r::CustomGCode::PausePrint, print_z, Slic3r::CustomGCode::Template, Slic3r::CustomGCode::ToolChange, type, and Slic3r::CustomGCode::Unknown.
Referenced by Slic3r::CustomGCode::Info::from_json().
◆ operator!=()
| bool Slic3r::CustomGCode::Item::operator!= |
( |
const Item & | rhs | ) |
const |
|
inline |
38{ return ! (*this == rhs); }
◆ operator<()
| bool Slic3r::CustomGCode::Item::operator< |
( |
const Item & | rhs | ) |
const |
|
inline |
◆ operator==()
| bool Slic3r::CustomGCode::Item::operator== |
( |
const Item & | rhs | ) |
const |
|
inline |
31 {
32 return (rhs.print_z == this->print_z ) &&
33 (rhs.type == this->
type ) &&
34 (rhs.extruder == this->extruder ) &&
35 (rhs.color == this->
color ) &&
36 (rhs.extra == this->extra );
37 }
References color, extra, extruder, print_z, and type.
◆ color
| std::string Slic3r::CustomGCode::Item::color |
◆ extra
| std::string Slic3r::CustomGCode::Item::extra |
◆ extruder
| int Slic3r::CustomGCode::Item::extruder |
◆ print_z
| double Slic3r::CustomGCode::Item::print_z |
◆ type
| Type Slic3r::CustomGCode::Item::type |
The documentation for this struct was generated from the following files: