mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-13 15:19:03 +08:00
Fix layer_z for feature_gcode
This commit is contained in:
parent
c12542d832
commit
da3e64c1c9
@ -3944,7 +3944,7 @@ std::string GCode::_before_extrude(const ExtrusionPath &path, const std::string
|
||||
config.set_key_value("extrusion_role", new ConfigOptionString(extrusion_role_to_string_for_parser(path.role())));
|
||||
config.set_key_value("last_extrusion_role", new ConfigOptionString(extrusion_role_to_string_for_parser(m_last_extrusion_role)));
|
||||
config.set_key_value("layer_num", new ConfigOptionInt(m_layer_index + 1));
|
||||
config.set_key_value("layer_z", new ConfigOptionFloat(m_config.z_offset.value));
|
||||
config.set_key_value("layer_z", new ConfigOptionFloat(m_layer == nullptr ? m_last_height : m_layer->print_z));
|
||||
gcode += this->placeholder_parser_process("feature_gcode",
|
||||
m_config.feature_gcode.value, m_writer.tool()->id(), &config)
|
||||
+ "\n";
|
||||
|
@ -2491,7 +2491,8 @@ void PrintConfigDef::init_fff_params()
|
||||
def->label = L("After layer change G-code");
|
||||
def->category = OptionCategory::customgcode;
|
||||
def->tooltip = L("This custom code is inserted at every extrusion type change."
|
||||
"Note that you can use placeholder variables for all Slic3r settings as well as [extrusion_role], [layer_num] and [layer_z] that can take these string values:"
|
||||
"Note that you can use placeholder variables for all Slic3r settings as well as [last_extrusion_role], [extrusion_role], [layer_num] and [layer_z]."
|
||||
" The 'extrusion_role' strings can take these string values:"
|
||||
" { Perimeter, ExternalPerimeter, OverhangPerimeter, InternalInfill, SolidInfill, TopSolidInfill, BridgeInfill, GapFill, Skirt, SupportMaterial, SupportMaterialInterface, WipeTower, Mixed }."
|
||||
" Mixed is only used when the role of the extrusion is not unique, not exactly inside another category or not known.");
|
||||
def->cli = "feature-gcode";
|
||||
|
Loading…
x
Reference in New Issue
Block a user