mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-15 15:25:52 +08:00
Fix requesting z_offset from sla printer
This commit is contained in:
parent
98702a0060
commit
7106a76287
@ -741,11 +741,14 @@ void Preview::update_layers_slider(const std::vector<double>& layers_z, bool kee
|
|||||||
|
|
||||||
Plater* plater = wxGetApp().plater();
|
Plater* plater = wxGetApp().plater();
|
||||||
CustomGCode::Info ticks_info_from_model = plater->model().custom_gcode_per_print_z;
|
CustomGCode::Info ticks_info_from_model = plater->model().custom_gcode_per_print_z;
|
||||||
//add z-shift from gcode output
|
if (wxGetApp().preset_bundle && wxGetApp().preset_bundle->printers.get_edited_preset().config.option("z_offset"))
|
||||||
const float z_shift = wxGetApp().preset_bundle->printers.get_edited_preset().config.opt_float("z_offset");
|
{
|
||||||
if (can_display_gcode() && z_shift != 0) {
|
//add z-shift from gcode output
|
||||||
for (CustomGCode::Item& tick : ticks_info_from_model.gcodes) {
|
const float z_shift = wxGetApp().preset_bundle->printers.get_edited_preset().config.opt_float("z_offset");
|
||||||
tick.print_z += z_shift;
|
if (can_display_gcode() && z_shift != 0) {
|
||||||
|
for (CustomGCode::Item& tick : ticks_info_from_model.gcodes) {
|
||||||
|
tick.print_z += z_shift;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//check incoherencies
|
//check incoherencies
|
||||||
|
Loading…
x
Reference in New Issue
Block a user