mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-07-14 05:11:50 +08:00
#852 decimals for xyz & e are now configurable
This commit is contained in:
parent
55e6eadc9f
commit
201c6120b6
@ -37,3 +37,5 @@ group:Retraction when tool is disabled (advanced settings for multi-extruder set
|
|||||||
setting:idx:retract_restart_extra_toolchange
|
setting:idx:retract_restart_extra_toolchange
|
||||||
group:Preview
|
group:Preview
|
||||||
reset_to_filament_color
|
reset_to_filament_color
|
||||||
|
group:Gcode
|
||||||
|
setting:gcode_precision_e
|
@ -15,6 +15,7 @@ group:silent_mode_event:Firmware
|
|||||||
setting:gcode_flavor
|
setting:gcode_flavor
|
||||||
setting:silent_mode
|
setting:silent_mode
|
||||||
setting:remaining_times
|
setting:remaining_times
|
||||||
|
setting:gcode_precision_xyz
|
||||||
group:Cooling fan
|
group:Cooling fan
|
||||||
line:Speedup
|
line:Speedup
|
||||||
setting:label$Speedup time:fan_speedup_time
|
setting:label$Speedup time:fan_speedup_time
|
||||||
|
@ -10,8 +10,8 @@
|
|||||||
#define FLAVOR_IS_NOT(val) this->config.gcode_flavor != val
|
#define FLAVOR_IS_NOT(val) this->config.gcode_flavor != val
|
||||||
#define COMMENT(comment) if (this->config.gcode_comments && !comment.empty()) gcode << " ; " << comment;
|
#define COMMENT(comment) if (this->config.gcode_comments && !comment.empty()) gcode << " ; " << comment;
|
||||||
#define PRECISION(val, precision) std::fixed << std::setprecision(precision) << (val)
|
#define PRECISION(val, precision) std::fixed << std::setprecision(precision) << (val)
|
||||||
#define XYZF_NUM(val) PRECISION(val, 3)
|
#define XYZF_NUM(val) PRECISION(val, this->config.gcode_precision_xyz.value)
|
||||||
#define E_NUM(val) PRECISION(val, 5)
|
#define E_NUM(val) PRECISION(val, this->config.gcode_precision_e.get_at(m_tool->id()))
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|
||||||
|
@ -666,7 +666,9 @@ const std::vector<std::string>& Preset::printer_options()
|
|||||||
"fan_kickstart",
|
"fan_kickstart",
|
||||||
"fan_speedup_overhangs",
|
"fan_speedup_overhangs",
|
||||||
"fan_speedup_time",
|
"fan_speedup_time",
|
||||||
"gcode_flavor", "use_relative_e_distances",
|
"gcode_flavor",
|
||||||
|
"gcode_precision_xyz",
|
||||||
|
"use_relative_e_distances",
|
||||||
"use_firmware_retraction", "use_volumetric_e", "variable_layer_height",
|
"use_firmware_retraction", "use_volumetric_e", "variable_layer_height",
|
||||||
"min_length",
|
"min_length",
|
||||||
//FIXME the print host keys are left here just for conversion from the Printer preset to Physical Printer preset.
|
//FIXME the print host keys are left here just for conversion from the Printer preset to Physical Printer preset.
|
||||||
|
@ -120,6 +120,8 @@ bool Print::invalidate_state_by_config_options(const std::vector<t_config_option
|
|||||||
"gap_fill_speed",
|
"gap_fill_speed",
|
||||||
"gcode_comments",
|
"gcode_comments",
|
||||||
"gcode_label_objects",
|
"gcode_label_objects",
|
||||||
|
"gcode_precision_xyz",
|
||||||
|
"gcode_precision_e",
|
||||||
"infill_acceleration",
|
"infill_acceleration",
|
||||||
"layer_gcode",
|
"layer_gcode",
|
||||||
"min_fan_speed",
|
"min_fan_speed",
|
||||||
|
@ -1876,6 +1876,20 @@ void PrintConfigDef::init_fff_params()
|
|||||||
def->mode = comAdvanced;
|
def->mode = comAdvanced;
|
||||||
def->set_default_value(new ConfigOptionBool(1));
|
def->set_default_value(new ConfigOptionBool(1));
|
||||||
|
|
||||||
|
def = this->add("gcode_precision_xyz", coInt);
|
||||||
|
def->label = L("xyz decimals");
|
||||||
|
def->category = OptionCategory::output;
|
||||||
|
def->tooltip = L("Choose how many digit after the dot for xyz coordinates.");
|
||||||
|
def->mode = comExpert;
|
||||||
|
def->set_default_value(new ConfigOptionInt(3));
|
||||||
|
|
||||||
|
def = this->add("gcode_precision_e", coInts);
|
||||||
|
def->label = L("Extruder decimals");
|
||||||
|
def->category = OptionCategory::output;
|
||||||
|
def->tooltip = L("Choose how many digit after the dot for extruder moves.");
|
||||||
|
def->mode = comExpert;
|
||||||
|
def->set_default_value(new ConfigOptionInts{ 5 });
|
||||||
|
|
||||||
def = this->add("high_current_on_filament_swap", coBool);
|
def = this->add("high_current_on_filament_swap", coBool);
|
||||||
def->label = L("High extruder current on filament swap");
|
def->label = L("High extruder current on filament swap");
|
||||||
def->category = OptionCategory::general;
|
def->category = OptionCategory::general;
|
||||||
@ -4182,6 +4196,7 @@ void PrintConfigDef::init_extruder_option_keys()
|
|||||||
"extruder_offset",
|
"extruder_offset",
|
||||||
"extruder_fan_offset",
|
"extruder_fan_offset",
|
||||||
"extruder_temperature_offset",
|
"extruder_temperature_offset",
|
||||||
|
"gcode_precision_e",
|
||||||
"tool_name",
|
"tool_name",
|
||||||
"retract_length",
|
"retract_length",
|
||||||
"retract_lift",
|
"retract_lift",
|
||||||
|
@ -1046,6 +1046,8 @@ public:
|
|||||||
ConfigOptionBool gcode_comments;
|
ConfigOptionBool gcode_comments;
|
||||||
ConfigOptionEnum<GCodeFlavor> gcode_flavor;
|
ConfigOptionEnum<GCodeFlavor> gcode_flavor;
|
||||||
ConfigOptionBool gcode_label_objects;
|
ConfigOptionBool gcode_label_objects;
|
||||||
|
ConfigOptionInt gcode_precision_xyz;
|
||||||
|
ConfigOptionInts gcode_precision_e;
|
||||||
ConfigOptionString layer_gcode;
|
ConfigOptionString layer_gcode;
|
||||||
ConfigOptionString feature_gcode;
|
ConfigOptionString feature_gcode;
|
||||||
ConfigOptionFloat max_print_speed;
|
ConfigOptionFloat max_print_speed;
|
||||||
@ -1154,6 +1156,8 @@ protected:
|
|||||||
OPT_PTR(gcode_comments);
|
OPT_PTR(gcode_comments);
|
||||||
OPT_PTR(gcode_flavor);
|
OPT_PTR(gcode_flavor);
|
||||||
OPT_PTR(gcode_label_objects);
|
OPT_PTR(gcode_label_objects);
|
||||||
|
OPT_PTR(gcode_precision_xyz);
|
||||||
|
OPT_PTR(gcode_precision_e);
|
||||||
OPT_PTR(layer_gcode);
|
OPT_PTR(layer_gcode);
|
||||||
OPT_PTR(feature_gcode);
|
OPT_PTR(feature_gcode);
|
||||||
OPT_PTR(max_print_speed);
|
OPT_PTR(max_print_speed);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user