only_one_perimeter_top : now work as object-only setting.

This commit is contained in:
supermerill 2019-08-17 18:14:51 +02:00
parent 4a1ed623d7
commit 9390638229
5 changed files with 14 additions and 13 deletions

View File

@ -122,8 +122,11 @@ void Layer::make_perimeters()
LayerRegion* other_layerm = *it; LayerRegion* other_layerm = *it;
const PrintRegionConfig &other_config = other_layerm->region()->config(); const PrintRegionConfig &other_config = other_layerm->region()->config();
/// !!! add here the settings you want to be added in the per-object menu.
/// if you don't do that, objects will share the same region, and the same settings.
if (config.perimeter_extruder == other_config.perimeter_extruder if (config.perimeter_extruder == other_config.perimeter_extruder
&& config.perimeters == other_config.perimeters && config.perimeters == other_config.perimeters
&& config.only_one_perimeter_top == other_config.only_one_perimeter_top
&& config.perimeter_speed == other_config.perimeter_speed && config.perimeter_speed == other_config.perimeter_speed
&& config.external_perimeter_speed == other_config.external_perimeter_speed && config.external_perimeter_speed == other_config.external_perimeter_speed
&& config.gap_fill_speed == other_config.gap_fill_speed && config.gap_fill_speed == other_config.gap_fill_speed

View File

@ -44,11 +44,11 @@ void Print::clear()
m_model.clear_objects(); m_model.clear_objects();
} }
PrintRegion* Print::add_region() //PrintRegion* Print::add_region()
{ //{
m_regions.emplace_back(new PrintRegion(this)); // m_regions.emplace_back(new PrintRegion(this));
return m_regions.back(); // return m_regions.back();
} //}
PrintRegion* Print::add_region(const PrintRegionConfig &config) PrintRegion* Print::add_region(const PrintRegionConfig &config)
{ {

View File

@ -64,7 +64,7 @@ private:
Print *m_print; Print *m_print;
PrintRegionConfig m_config; PrintRegionConfig m_config;
PrintRegion(Print* print) : m_refcnt(0), m_print(print) {} //PrintRegion(Print* print) : m_refcnt(0), m_print(print) {}
PrintRegion(Print* print, const PrintRegionConfig &config) : m_refcnt(0), m_print(print), m_config(config) {} PrintRegion(Print* print, const PrintRegionConfig &config) : m_refcnt(0), m_print(print), m_config(config) {}
~PrintRegion() {} ~PrintRegion() {}
}; };
@ -376,7 +376,7 @@ public:
protected: protected:
// methods for handling regions // methods for handling regions
PrintRegion* get_region(size_t idx) { return m_regions[idx]; } PrintRegion* get_region(size_t idx) { return m_regions[idx]; }
PrintRegion* add_region(); //PrintRegion* add_region();
PrintRegion* add_region(const PrintRegionConfig &config); PrintRegion* add_region(const PrintRegionConfig &config);
// Invalidates the step, and its depending steps in Print. // Invalidates the step, and its depending steps in Print.

View File

@ -482,6 +482,7 @@ bool PrintObject::invalidate_state_by_config_options(const std::vector<t_config_
|| opt_key == "external_perimeters_first" || opt_key == "external_perimeters_first"
|| opt_key == "perimeter_loop" || opt_key == "perimeter_loop"
|| opt_key == "perimeter_loop_seam" || opt_key == "perimeter_loop_seam"
|| opt_key == "only_one_perimeter_top"
|| opt_key == "no_perimeter_unsupported_algo") { || opt_key == "no_perimeter_unsupported_algo") {
steps.emplace_back(posPerimeters); steps.emplace_back(posPerimeters);
} else if ( } else if (
@ -489,11 +490,8 @@ bool PrintObject::invalidate_state_by_config_options(const std::vector<t_config_
|| opt_key == "first_layer_height" || opt_key == "first_layer_height"
|| opt_key == "exact_last_layer_height" || opt_key == "exact_last_layer_height"
|| opt_key == "raft_layers" || opt_key == "raft_layers"
|| opt_key == "slice_closing_radius") { || opt_key == "slice_closing_radius"
steps.emplace_back(posSlice); || opt_key == "clip_multipart_objects"
}
else if (
opt_key == "clip_multipart_objects"
|| opt_key == "elefant_foot_compensation" || opt_key == "elefant_foot_compensation"
|| opt_key == "support_material_contact_distance_type" || opt_key == "support_material_contact_distance_type"
|| opt_key == "support_material_contact_distance_top" || opt_key == "support_material_contact_distance_top"

View File

@ -414,7 +414,7 @@ const std::vector<std::string>& Preset::print_options()
"over_bridge_flow_ratio", "clip_multipart_objects", "enforce_full_fill_volume", "external_infill_margin", "bridged_infill_margin", "over_bridge_flow_ratio", "clip_multipart_objects", "enforce_full_fill_volume", "external_infill_margin", "bridged_infill_margin",
"elefant_foot_compensation", "xy_size_compensation", "hole_size_compensation", "threads", "resolution", "elefant_foot_compensation", "xy_size_compensation", "hole_size_compensation", "threads", "resolution",
"wipe_tower", "wipe_tower_x", "wipe_tower_y", "wipe_tower_width", "wipe_tower_rotation_angle", "wipe_tower_bridging", "wipe_tower", "wipe_tower_x", "wipe_tower_y", "wipe_tower_width", "wipe_tower_rotation_angle", "wipe_tower_bridging",
"only_one_perimeter_top", "single_extruder_multi_material_priming", "compatible_printers", "compatible_printers_condition", "inherits", "single_extruder_multi_material_priming", "compatible_printers", "compatible_printers_condition", "inherits",
"infill_dense", "infill_dense_algo", "infill_dense", "infill_dense_algo",
"no_perimeter_unsupported_algo", "no_perimeter_unsupported_algo",
"support_material_solid_first_layer" "support_material_solid_first_layer"