mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-06-14 07:52:56 +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);
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
pc.pattern_start_x = -pc.pattern_start_x;
|
||||
|
||||
@@ -191,24 +191,42 @@ private:
|
||||
int perim_speed;
|
||||
};
|
||||
|
||||
struct DrawLineOptArgs : PatternSettings {
|
||||
DrawLineOptArgs();
|
||||
struct 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 height;
|
||||
double line_width;
|
||||
int speed;
|
||||
std::string comment;
|
||||
private:
|
||||
PatternSettings _ps = PatternSettings();
|
||||
};
|
||||
|
||||
struct DrawBoxOptArgs : PatternSettings {
|
||||
DrawBoxOptArgs();
|
||||
struct 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;
|
||||
int num_perimeters;
|
||||
double height;
|
||||
double line_width;
|
||||
double speed;
|
||||
private:
|
||||
PatternSettings _ps = PatternSettings();
|
||||
};
|
||||
|
||||
void delta_modify_start(PatternCalc& pc);
|
||||
|
||||
Reference in New Issue
Block a user