mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-08-30 13:26:58 +00:00
Simplify optArgs constructors
This commit is contained in:
@@ -356,22 +356,6 @@ CalibPressureAdvancePattern::PatternSettings::PatternSettings() {
|
|||||||
perim_speed = cpap.speed_adjust(cpap.m_speed_perimeter);
|
perim_speed = cpap.speed_adjust(cpap.m_speed_perimeter);
|
||||||
}
|
}
|
||||||
|
|
||||||
CalibPressureAdvancePattern::DrawLineOptArgs::DrawLineOptArgs() {
|
|
||||||
extrusion_multiplier = PatternSettings::extrusion_multiplier;
|
|
||||||
height = PatternSettings::layer_height;
|
|
||||||
line_width = PatternSettings::line_width;
|
|
||||||
speed = PatternSettings::perim_speed;
|
|
||||||
comment = "Print line";
|
|
||||||
}
|
|
||||||
|
|
||||||
CalibPressureAdvancePattern::DrawBoxOptArgs::DrawBoxOptArgs() {
|
|
||||||
is_filled = false;
|
|
||||||
num_perimeters = PatternSettings::anchor_perimeters;
|
|
||||||
height = PatternSettings::first_layer_height;
|
|
||||||
line_width = PatternSettings::anchor_line_width;
|
|
||||||
speed = PatternSettings::first_layer_speed;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CalibPressureAdvancePattern::delta_modify_start(PatternCalc& pc)
|
void CalibPressureAdvancePattern::delta_modify_start(PatternCalc& pc)
|
||||||
{
|
{
|
||||||
pc.pattern_start_x = -pc.pattern_start_x;
|
pc.pattern_start_x = -pc.pattern_start_x;
|
||||||
|
|||||||
@@ -191,24 +191,42 @@ private:
|
|||||||
int perim_speed;
|
int perim_speed;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct DrawLineOptArgs : PatternSettings {
|
struct DrawLineOptArgs {
|
||||||
DrawLineOptArgs();
|
public:
|
||||||
|
DrawLineOptArgs() {
|
||||||
|
extrusion_multiplier = _ps.extrusion_multiplier;
|
||||||
|
height = _ps.layer_height;
|
||||||
|
line_width = _ps.line_width;
|
||||||
|
speed = _ps.perim_speed;
|
||||||
|
comment = "Print line";
|
||||||
|
};
|
||||||
|
|
||||||
double extrusion_multiplier;
|
double extrusion_multiplier;
|
||||||
double height;
|
double height;
|
||||||
double line_width;
|
double line_width;
|
||||||
int speed;
|
int speed;
|
||||||
std::string comment;
|
std::string comment;
|
||||||
|
private:
|
||||||
|
PatternSettings _ps = PatternSettings();
|
||||||
};
|
};
|
||||||
|
|
||||||
struct DrawBoxOptArgs : PatternSettings {
|
struct DrawBoxOptArgs {
|
||||||
DrawBoxOptArgs();
|
public:
|
||||||
|
DrawBoxOptArgs() {
|
||||||
|
is_filled = false;
|
||||||
|
num_perimeters = _ps.anchor_perimeters;
|
||||||
|
height = _ps.first_layer_height;
|
||||||
|
line_width = _ps.anchor_line_width;
|
||||||
|
speed = _ps.first_layer_speed;
|
||||||
|
};
|
||||||
|
|
||||||
bool is_filled;
|
bool is_filled;
|
||||||
int num_perimeters;
|
int num_perimeters;
|
||||||
double height;
|
double height;
|
||||||
double line_width;
|
double line_width;
|
||||||
double speed;
|
double speed;
|
||||||
|
private:
|
||||||
|
PatternSettings _ps = PatternSettings();
|
||||||
};
|
};
|
||||||
|
|
||||||
void delta_modify_start(PatternCalc& pc);
|
void delta_modify_start(PatternCalc& pc);
|
||||||
|
|||||||
Reference in New Issue
Block a user