mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-17 11:47:54 -06:00
ENH: export calibration bbox
when exporting all sliced file Change-Id: I5cb085422f1114eacf5e11dce57f1ceb4d2113a4 Signed-off-by: Stone Li <stone.li@bambulab.com>
This commit is contained in:
parent
9f95436b56
commit
d1021e6861
2 changed files with 19 additions and 4 deletions
|
@ -223,6 +223,8 @@ public:
|
||||||
|
|
||||||
ThumbnailData cali_thumbnail_data;
|
ThumbnailData cali_thumbnail_data;
|
||||||
PlateBBoxData cali_bboxes_data;
|
PlateBBoxData cali_bboxes_data;
|
||||||
|
static const int cali_thumbnail_width = 2560;
|
||||||
|
static const int cali_thumbnail_height = 2560;
|
||||||
|
|
||||||
//set the plate's index
|
//set the plate's index
|
||||||
void set_index(int index);
|
void set_index(int index);
|
||||||
|
|
|
@ -5561,6 +5561,21 @@ void Plater::priv::on_process_completed(SlicingProcessCompletedEvent &evt)
|
||||||
//BBS: remove this update here, will be updated in update_fff_scene later
|
//BBS: remove this update here, will be updated in update_fff_scene later
|
||||||
//this->object_list_changed();
|
//this->object_list_changed();
|
||||||
|
|
||||||
|
// BBS, Generate calibration thumbnail for current plate
|
||||||
|
if (preview) {
|
||||||
|
// generate calibration data
|
||||||
|
/* BBS generate calibration data by printer
|
||||||
|
preview->reload_print();
|
||||||
|
ThumbnailData* calibration_data = &partplate_list.get_curr_plate()->cali_thumbnail_data;
|
||||||
|
const ThumbnailsParams calibration_params = { {}, false, true, true, true, partplate_list.get_curr_plate_index() };
|
||||||
|
generate_calibration_thumbnail(*calibration_data, PartPlate::cali_thumbnail_width, PartPlate::cali_thumbnail_height, calibration_params);
|
||||||
|
preview->get_canvas3d()->reset_gcode_toolpaths();*/
|
||||||
|
|
||||||
|
// generate bbox data
|
||||||
|
PlateBBoxData* plate_bbox_data = &partplate_list.get_curr_plate()->cali_bboxes_data;
|
||||||
|
*plate_bbox_data = generate_first_layer_bbox();
|
||||||
|
}
|
||||||
|
|
||||||
// refresh preview
|
// refresh preview
|
||||||
if (view3D->is_dragging()) // updating scene now would interfere with the gizmo dragging
|
if (view3D->is_dragging()) // updating scene now would interfere with the gizmo dragging
|
||||||
delayed_scene_refresh = true;
|
delayed_scene_refresh = true;
|
||||||
|
@ -5621,6 +5636,7 @@ void Plater::priv::on_process_completed(SlicingProcessCompletedEvent &evt)
|
||||||
// }
|
// }
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
|
||||||
if (is_finished)
|
if (is_finished)
|
||||||
{
|
{
|
||||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(":finished, reload print soon");
|
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(":finished, reload print soon");
|
||||||
|
@ -9043,10 +9059,7 @@ int Plater::export_3mf(const boost::filesystem::path& output_path, SaveStrategy
|
||||||
int index = p->partplate_list.get_curr_plate_index();
|
int index = p->partplate_list.get_curr_plate_index();
|
||||||
ThumbnailData* calibration_data = calibration_thumbnails[index];
|
ThumbnailData* calibration_data = calibration_thumbnails[index];
|
||||||
const ThumbnailsParams calibration_params = { {}, false, true, true, true, p->partplate_list.get_curr_plate_index() };
|
const ThumbnailsParams calibration_params = { {}, false, true, true, true, p->partplate_list.get_curr_plate_index() };
|
||||||
//BBS fixed size
|
p->generate_calibration_thumbnail(*calibration_data, PartPlate::cali_thumbnail_width, PartPlate::cali_thumbnail_height, calibration_params);
|
||||||
const int thumbnail_width = 2560;
|
|
||||||
const int thumbnail_height = 2560;
|
|
||||||
p->generate_calibration_thumbnail(*calibration_data, thumbnail_width, thumbnail_height, calibration_params);
|
|
||||||
if (using_exported_file()) {
|
if (using_exported_file()) {
|
||||||
//do nothing
|
//do nothing
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue