Revert "Fix Compile Warnings (#5963)"

This reverts commit b83e16dbdd.

Found regressions like auto orientation didn't work anymore after this change, revert it
This commit is contained in:
SoftFever 2024-08-12 00:00:20 +08:00
parent 0286c36f42
commit 7082e945b1
184 changed files with 1091 additions and 461 deletions

View file

@ -519,7 +519,7 @@ bool CalibUtils::calib_flowrate(int pass, const CalibInfo &calib_info, wxString
const ConfigOptionFloats *nozzle_diameter_config = printer_config.option<ConfigOptionFloats>("nozzle_diameter");
assert(nozzle_diameter_config->values.size() > 0);
float nozzle_diameter = nozzle_diameter_config->values[0];
// float xyScale = nozzle_diameter / 0.6;
float xyScale = nozzle_diameter / 0.6;
// scale z to have 7 layers
double first_layer_height = print_config.option<ConfigOptionFloat>("initial_layer_print_height")->value;
double layer_height = nozzle_diameter / 2.0; // prefer 0.2 layer height for 0.4 nozzle
@ -1067,6 +1067,7 @@ bool CalibUtils::process_and_store_3mf(Model *model, const DynamicPrintConfig &f
{
GLVolumeCollection glvolume_collection;
std::vector<ColorRGBA> colors_out(1);
unsigned char rgb_color[4] = {255, 255, 255, 255};
ColorRGBA new_color {1.0f, 1.0f, 1.0f, 1.0f};
colors_out.push_back(new_color);
@ -1079,9 +1080,9 @@ bool CalibUtils::process_and_store_3mf(Model *model, const DynamicPrintConfig &f
const ModelObject &model_object = *model->objects[obj_idx];
for (int volume_idx = 0; volume_idx < (int)model_object.volumes.size(); ++ volume_idx) {
// const ModelVolume &model_volume = *model_object.volumes[volume_idx];
const ModelVolume &model_volume = *model_object.volumes[volume_idx];
for (int instance_idx = 0; instance_idx < (int)model_object.instances.size(); ++ instance_idx) {
// const ModelInstance &model_instance = *model_object.instances[instance_idx];
const ModelInstance &model_instance = *model_object.instances[instance_idx];
glvolume_collection.load_object_volume(&model_object, obj_idx, volume_idx, instance_idx, "volume", true, false, true);
glvolume_collection.volumes.back()->set_render_color(new_color);
glvolume_collection.volumes.back()->set_color(new_color);
@ -1127,11 +1128,11 @@ bool CalibUtils::process_and_store_3mf(Model *model, const DynamicPrintConfig &f
store_params.strategy = SaveStrategy::Silence | SaveStrategy::WithGcode | SaveStrategy::SplitModel | SaveStrategy::SkipModel;
Slic3r::store_bbs_3mf(store_params);
bool success = Slic3r::store_bbs_3mf(store_params);
store_params.strategy = SaveStrategy::Silence | SaveStrategy::SplitModel | SaveStrategy::WithSliceInfo | SaveStrategy::SkipAuxiliary;
store_params.path = config_3mf_path.c_str();
Slic3r::store_bbs_3mf(store_params);
success = Slic3r::store_bbs_3mf(store_params);
release_PlateData_list(plate_data_list);
return true;