mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
Information from DoubleSlider is saved to Model
GCode creating can work with that values.
This commit is contained in:
parent
6ac53aa4f3
commit
70ef0f25ef
10 changed files with 193 additions and 43 deletions
|
@ -745,6 +745,32 @@ public:
|
|||
ModelObjectPtrs objects;
|
||||
// Wipe tower object.
|
||||
ModelWipeTower wipe_tower;
|
||||
|
||||
// Extensions for
|
||||
struct CustomGCode
|
||||
{
|
||||
CustomGCode(double height, const std::string& code, int extruder) :
|
||||
height(height), gcode(code), extruder(extruder) {}
|
||||
|
||||
bool operator<(const CustomGCode& other) const { return other.height > this->height; }
|
||||
bool operator==(const CustomGCode& other) const
|
||||
{
|
||||
return (other.height == this->height) &&
|
||||
(other.gcode == this->gcode) &&
|
||||
(other.extruder == this->extruder );
|
||||
}
|
||||
bool operator!=(const CustomGCode& other) const
|
||||
{
|
||||
return (other.height != this->height) ||
|
||||
(other.gcode != this->gcode) ||
|
||||
(other.extruder != this->extruder );
|
||||
}
|
||||
|
||||
double height;
|
||||
std::string gcode;
|
||||
int extruder;
|
||||
};
|
||||
std::vector<CustomGCode> custom_gcode_per_height;
|
||||
|
||||
// Default constructor assigns a new ID to the model.
|
||||
Model() { assert(this->id().valid()); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue