mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-01-01 20:40:41 -07:00
ENH: add max print z in placeholder
jira: none Signed-off-by: xun.zhang <xun.zhang@bambulab.com> Change-Id: I55caf23b11cc0194f9c155364e6bb02e298f9392 (cherry picked from commit 724c9b0eb5e73517c921ea809bb7f7e82325130b)
This commit is contained in:
parent
d6a8f881de
commit
b636bbaf2f
1 changed files with 8 additions and 0 deletions
|
|
@ -2608,6 +2608,14 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
|
|||
this->placeholder_parser().set("in_head_wrap_detect_zone", !intersection_pl(project_polys, {head_wrap_detect_zone}).empty());
|
||||
}
|
||||
|
||||
{
|
||||
coordf_t max_print_z = 0;
|
||||
for (auto& obj : print.objects()) {
|
||||
max_print_z = std::max(max_print_z, (*std::max_element(obj->layers().begin(), obj->layers().end(), [](Layer* a, Layer* b) { return a->print_z < b->print_z; }))->print_z);
|
||||
}
|
||||
this->placeholder_parser().set("max_print_z", new ConfigOptionInt(std::ceil(max_print_z)));
|
||||
}
|
||||
|
||||
BoundingBoxf mesh_bbox(m_config.bed_mesh_min, m_config.bed_mesh_max);
|
||||
auto mesh_margin = m_config.adaptive_bed_mesh_margin.value;
|
||||
mesh_bbox.min = mesh_bbox.min.cwiseMax((bbox.min.array() - mesh_margin).matrix());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue