mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 07:27:41 -06:00
ENH: add placeholder first_layer_center_no_wipe_tower
This placeholder can be used for smooth timelapse of i3 type printers. Change-Id: I953a437a7733835d850812565ff5f31b83292912 (cherry picked from commit 5d5b528541490a9ef762fdad6590b6cddeee2a5b)
This commit is contained in:
parent
489fb85927
commit
d9101bc104
1 changed files with 8 additions and 0 deletions
|
@ -1771,6 +1771,14 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
|
|||
m_placeholder_parser.set("first_layer_print_min", new ConfigOptionFloats({bbox.min.x() - plate_offset.x(), bbox.min.y() - plate_offset.y()}));
|
||||
m_placeholder_parser.set("first_layer_print_max", new ConfigOptionFloats({bbox.max.x() - plate_offset.x(), bbox.max.y() - plate_offset.y()}));
|
||||
m_placeholder_parser.set("first_layer_print_size", new ConfigOptionFloats({ bbox.size().x(), bbox.size().y() }));
|
||||
// get center without wipe tower
|
||||
BoundingBoxf bbox_wo_wt;// bounding box without wipe tower
|
||||
for (auto& objPtr : print.objects()) {
|
||||
BBoxData data;
|
||||
bbox_wo_wt.merge(unscaled(objPtr->get_first_layer_bbox(data.area, data.layer_height, data.name)));
|
||||
}
|
||||
auto center = bbox_wo_wt.center();
|
||||
m_placeholder_parser.set("first_layer_center_no_wipe_tower", new ConfigOptionFloats(center.x(),center.y()));
|
||||
}
|
||||
|
||||
int max_chamber_temp = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue