mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-01 06:16:58 +00:00
Top/bottom surface pattern density (#9783)
* Create top surface density option * Update tooltip * Specify what 0% top infill means * Add density for bottom layers * Discourage users from using top/bottom density incorrectly * Fix percent don't need translation * Fix incorrect indentation --------- Co-authored-by: Noisyfox <timemanager.rick@gmail.com>
This commit is contained in:
committed by
GitHub
parent
88fb8187d9
commit
51d844af2c
@@ -657,30 +657,30 @@ std::vector<SurfaceFill> group_fills(const Layer &layer, LockRegionParam &lock_p
|
|||||||
if (params.pattern == ipCrossZag || params.pattern == ipLockedZag) {
|
if (params.pattern == ipCrossZag || params.pattern == ipLockedZag) {
|
||||||
params.symmetric_infill_y_axis = region_config.symmetric_infill_y_axis;
|
params.symmetric_infill_y_axis = region_config.symmetric_infill_y_axis;
|
||||||
} else if (params.pattern == ipZigZag) {
|
} else if (params.pattern == ipZigZag) {
|
||||||
|
|
||||||
|
|
||||||
params.symmetric_infill_y_axis = region_config.symmetric_infill_y_axis;
|
params.symmetric_infill_y_axis = region_config.symmetric_infill_y_axis;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (surface.is_solid()) {
|
if (surface.is_solid()) {
|
||||||
params.density = 100.f;
|
if (surface.is_external() && !is_bridge) {
|
||||||
//FIXME for non-thick bridges, shall we allow a bottom surface pattern?
|
if (surface.is_top()) {
|
||||||
if (surface.is_solid_infill())
|
|
||||||
params.pattern = region_config.internal_solid_infill_pattern.value;
|
|
||||||
else if (surface.is_external() && ! is_bridge) {
|
|
||||||
if(surface.is_top())
|
|
||||||
params.pattern = region_config.top_surface_pattern.value;
|
params.pattern = region_config.top_surface_pattern.value;
|
||||||
else
|
params.density = float(region_config.top_surface_density);
|
||||||
|
} else { // Surface is bottom
|
||||||
params.pattern = region_config.bottom_surface_pattern.value;
|
params.pattern = region_config.bottom_surface_pattern.value;
|
||||||
}
|
params.density = float(region_config.bottom_surface_density);
|
||||||
else {
|
}
|
||||||
if(region_config.top_surface_pattern == ipMonotonic || region_config.top_surface_pattern == ipMonotonicLine)
|
} else if (surface.is_solid_infill()) {
|
||||||
|
params.pattern = region_config.internal_solid_infill_pattern.value;
|
||||||
|
params.density = 100.f;
|
||||||
|
} else {
|
||||||
|
if (region_config.top_surface_pattern == ipMonotonic || region_config.top_surface_pattern == ipMonotonicLine)
|
||||||
params.pattern = ipMonotonic;
|
params.pattern = ipMonotonic;
|
||||||
else
|
else
|
||||||
params.pattern = ipRectilinear;
|
params.pattern = ipRectilinear;
|
||||||
|
params.density = 100.f;
|
||||||
}
|
}
|
||||||
} else if (params.density <= 0)
|
} else if (params.density <= 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
params.extrusion_role = erInternalInfill;
|
params.extrusion_role = erInternalInfill;
|
||||||
if (is_bridge) {
|
if (is_bridge) {
|
||||||
@@ -1029,7 +1029,7 @@ void Layer::make_fills(FillAdaptive::Octree* adaptive_fill_octree, FillAdaptive:
|
|||||||
params.resolution = resolution;
|
params.resolution = resolution;
|
||||||
params.use_arachne = surface_fill.params.pattern == ipConcentric || surface_fill.params.pattern == ipConcentricInternal;
|
params.use_arachne = surface_fill.params.pattern == ipConcentric || surface_fill.params.pattern == ipConcentricInternal;
|
||||||
params.layer_height = layerm->layer()->height;
|
params.layer_height = layerm->layer()->height;
|
||||||
params.lattice_angle_1 = surface_fill.params.lattice_angle_1;
|
params.lattice_angle_1 = surface_fill.params.lattice_angle_1;
|
||||||
params.lattice_angle_2 = surface_fill.params.lattice_angle_2;
|
params.lattice_angle_2 = surface_fill.params.lattice_angle_2;
|
||||||
params.infill_overhang_angle = surface_fill.params.infill_overhang_angle;
|
params.infill_overhang_angle = surface_fill.params.infill_overhang_angle;
|
||||||
|
|
||||||
@@ -1041,7 +1041,7 @@ void Layer::make_fills(FillAdaptive::Octree* adaptive_fill_octree, FillAdaptive:
|
|||||||
auto ®ion_config = layerm->region().config();
|
auto ®ion_config = layerm->region().config();
|
||||||
|
|
||||||
ConfigOptionFloats rotate_angles;
|
ConfigOptionFloats rotate_angles;
|
||||||
rotate_angles.deserialize( surface_fill.params.extrusion_role == erInternalInfill ? region_config.sparse_infill_rotate_template.value : region_config.solid_infill_rotate_template.value);
|
rotate_angles.deserialize( surface_fill.params.extrusion_role == erInternalInfill ? region_config.sparse_infill_rotate_template.value : region_config.solid_infill_rotate_template.value);
|
||||||
auto rotate_angle_idx = f->layer_id % rotate_angles.size();
|
auto rotate_angle_idx = f->layer_id % rotate_angles.size();
|
||||||
f->rotate_angle = Geometry::deg2rad(rotate_angles.values[rotate_angle_idx]);
|
f->rotate_angle = Geometry::deg2rad(rotate_angles.values[rotate_angle_idx]);
|
||||||
|
|
||||||
@@ -1149,7 +1149,7 @@ Polylines Layer::generate_sparse_infill_polylines_for_anchoring(FillAdaptive::Oc
|
|||||||
case ipTpmsD:
|
case ipTpmsD:
|
||||||
case ipHilbertCurve:
|
case ipHilbertCurve:
|
||||||
case ipArchimedeanChords:
|
case ipArchimedeanChords:
|
||||||
case ipOctagramSpiral:
|
case ipOctagramSpiral:
|
||||||
case ipZigZag:
|
case ipZigZag:
|
||||||
case ipCrossZag:
|
case ipCrossZag:
|
||||||
case ipLockedZag: break;
|
case ipLockedZag: break;
|
||||||
@@ -1196,8 +1196,8 @@ Polylines Layer::generate_sparse_infill_polylines_for_anchoring(FillAdaptive::Oc
|
|||||||
params.resolution = resolution;
|
params.resolution = resolution;
|
||||||
params.use_arachne = false;
|
params.use_arachne = false;
|
||||||
params.layer_height = layerm.layer()->height;
|
params.layer_height = layerm.layer()->height;
|
||||||
params.lattice_angle_1 = surface_fill.params.lattice_angle_1;
|
params.lattice_angle_1 = surface_fill.params.lattice_angle_1;
|
||||||
params.lattice_angle_2 = surface_fill.params.lattice_angle_2;
|
params.lattice_angle_2 = surface_fill.params.lattice_angle_2;
|
||||||
params.infill_overhang_angle = surface_fill.params.infill_overhang_angle;
|
params.infill_overhang_angle = surface_fill.params.infill_overhang_angle;
|
||||||
|
|
||||||
for (ExPolygon &expoly : surface_fill.expolygons) {
|
for (ExPolygon &expoly : surface_fill.expolygons) {
|
||||||
|
|||||||
@@ -783,7 +783,7 @@ bool Preset::has_cali_lines(PresetBundle* preset_bundle)
|
|||||||
|
|
||||||
static std::vector<std::string> s_Preset_print_options {
|
static std::vector<std::string> s_Preset_print_options {
|
||||||
"layer_height", "initial_layer_print_height", "wall_loops", "alternate_extra_wall", "slice_closing_radius", "spiral_mode", "spiral_mode_smooth", "spiral_mode_max_xy_smoothing", "spiral_starting_flow_ratio", "spiral_finishing_flow_ratio", "slicing_mode",
|
"layer_height", "initial_layer_print_height", "wall_loops", "alternate_extra_wall", "slice_closing_radius", "spiral_mode", "spiral_mode_smooth", "spiral_mode_max_xy_smoothing", "spiral_starting_flow_ratio", "spiral_finishing_flow_ratio", "slicing_mode",
|
||||||
"top_shell_layers", "top_shell_thickness", "bottom_shell_layers", "bottom_shell_thickness",
|
"top_shell_layers", "top_shell_thickness", "top_surface_density", "bottom_surface_density", "bottom_shell_layers", "bottom_shell_thickness",
|
||||||
"extra_perimeters_on_overhangs", "ensure_vertical_shell_thickness", "reduce_crossing_wall", "detect_thin_wall", "detect_overhang_wall", "overhang_reverse", "overhang_reverse_threshold","overhang_reverse_internal_only", "wall_direction",
|
"extra_perimeters_on_overhangs", "ensure_vertical_shell_thickness", "reduce_crossing_wall", "detect_thin_wall", "detect_overhang_wall", "overhang_reverse", "overhang_reverse_threshold","overhang_reverse_internal_only", "wall_direction",
|
||||||
"seam_position", "staggered_inner_seams", "wall_sequence", "is_infill_first", "sparse_infill_density", "sparse_infill_pattern", "lattice_angle_1", "lattice_angle_2", "infill_overhang_angle", "top_surface_pattern", "bottom_surface_pattern",
|
"seam_position", "staggered_inner_seams", "wall_sequence", "is_infill_first", "sparse_infill_density", "sparse_infill_pattern", "lattice_angle_1", "lattice_angle_2", "infill_overhang_angle", "top_surface_pattern", "bottom_surface_pattern",
|
||||||
"infill_direction", "solid_infill_direction", "counterbore_hole_bridging","infill_shift_step", "sparse_infill_rotate_template", "solid_infill_rotate_template", "symmetric_infill_y_axis","skeleton_infill_density", "infill_lock_depth", "skin_infill_depth", "skin_infill_density",
|
"infill_direction", "solid_infill_direction", "counterbore_hole_bridging","infill_shift_step", "sparse_infill_rotate_template", "solid_infill_rotate_template", "symmetric_infill_y_axis","skeleton_infill_density", "infill_lock_depth", "skin_infill_depth", "skin_infill_density",
|
||||||
|
|||||||
@@ -5466,6 +5466,30 @@ void PrintConfigDef::init_fff_params()
|
|||||||
def->min = 0;
|
def->min = 0;
|
||||||
def->set_default_value(new ConfigOptionFloat(0.6));
|
def->set_default_value(new ConfigOptionFloat(0.6));
|
||||||
|
|
||||||
|
def = this->add("top_surface_density", coPercent);
|
||||||
|
def->label = L("Top surface density");
|
||||||
|
def->category = L("Strength");
|
||||||
|
def->tooltip = L("Density of top surface layer. A value of 100% creates a fully solid, smooth top layer. "
|
||||||
|
"Reducing this value results in a textured top surface, according to the chosen top surface pattern. "
|
||||||
|
"A value of 0% will result in only the walls on the top layer being created. "
|
||||||
|
"Intended for aesthetic or functional purposes, not to fix issues such as over-extrusion.");
|
||||||
|
def->sidetext = ("%");
|
||||||
|
def->min = 0;
|
||||||
|
def->max = 100;
|
||||||
|
def->set_default_value(new ConfigOptionPercent(100));
|
||||||
|
|
||||||
|
def = this->add("bottom_surface_density", coPercent);
|
||||||
|
def->label = L("Bottom surface density");
|
||||||
|
def->category = L("Strength");
|
||||||
|
def->tooltip = L("Density of the bottom surface layer. "
|
||||||
|
"Intended for aesthetic or functional purposes, not to fix issues such as over-extrusion.\n"
|
||||||
|
"WARNING: Lowering this value may negatively affect bed adhesion.");
|
||||||
|
def->sidetext = ("%");
|
||||||
|
def->min = 10;
|
||||||
|
def->max = 100;
|
||||||
|
def->set_default_value(new ConfigOptionPercent(100));
|
||||||
|
|
||||||
|
|
||||||
def = this->add("travel_speed", coFloat);
|
def = this->add("travel_speed", coFloat);
|
||||||
def->label = L("Travel");
|
def->label = L("Travel");
|
||||||
def->tooltip = L("Speed of travel which is faster and without extrusion.");
|
def->tooltip = L("Speed of travel which is faster and without extrusion.");
|
||||||
|
|||||||
@@ -939,6 +939,8 @@ PRINT_CONFIG_CLASS_DEFINE(
|
|||||||
((ConfigOptionFloat, bridge_speed))
|
((ConfigOptionFloat, bridge_speed))
|
||||||
((ConfigOptionFloatOrPercent, internal_bridge_speed))
|
((ConfigOptionFloatOrPercent, internal_bridge_speed))
|
||||||
((ConfigOptionEnum<EnsureVerticalShellThickness>, ensure_vertical_shell_thickness))
|
((ConfigOptionEnum<EnsureVerticalShellThickness>, ensure_vertical_shell_thickness))
|
||||||
|
((ConfigOptionPercent, top_surface_density))
|
||||||
|
((ConfigOptionPercent, bottom_surface_density))
|
||||||
((ConfigOptionEnum<InfillPattern>, top_surface_pattern))
|
((ConfigOptionEnum<InfillPattern>, top_surface_pattern))
|
||||||
((ConfigOptionEnum<InfillPattern>, bottom_surface_pattern))
|
((ConfigOptionEnum<InfillPattern>, bottom_surface_pattern))
|
||||||
((ConfigOptionEnum<InfillPattern>, internal_solid_infill_pattern))
|
((ConfigOptionEnum<InfillPattern>, internal_solid_infill_pattern))
|
||||||
|
|||||||
@@ -1092,6 +1092,8 @@ bool PrintObject::invalidate_state_by_config_options(
|
|||||||
|| opt_key == "infill_anchor"
|
|| opt_key == "infill_anchor"
|
||||||
|| opt_key == "infill_anchor_max"
|
|| opt_key == "infill_anchor_max"
|
||||||
|| opt_key == "top_surface_line_width"
|
|| opt_key == "top_surface_line_width"
|
||||||
|
|| opt_key == "top_surface_density"
|
||||||
|
|| opt_key == "bottom_surface_density"
|
||||||
|| opt_key == "initial_layer_line_width"
|
|| opt_key == "initial_layer_line_width"
|
||||||
|| opt_key == "small_area_infill_flow_compensation"
|
|| opt_key == "small_area_infill_flow_compensation"
|
||||||
|| opt_key == "lattice_angle_1"
|
|| opt_key == "lattice_angle_1"
|
||||||
|
|||||||
@@ -104,8 +104,8 @@ std::map<std::string, std::vector<SimpleSettingData>> SettingsFactory::PART_CAT
|
|||||||
{
|
{
|
||||||
{ L("Quality"), {{"ironing_type", "",8},{"ironing_flow", "",9},{"ironing_spacing", "",10},{"ironing_inset", "", 11},{"bridge_flow", "",11},{"make_overhang_printable", "",11},{"bridge_density", "", 1}
|
{ L("Quality"), {{"ironing_type", "",8},{"ironing_flow", "",9},{"ironing_spacing", "",10},{"ironing_inset", "", 11},{"bridge_flow", "",11},{"make_overhang_printable", "",11},{"bridge_density", "", 1}
|
||||||
}},
|
}},
|
||||||
{ L("Strength"), {{"wall_loops", "",1},{"top_shell_layers", L("Top Solid Layers"),1},{"top_shell_thickness", L("Top Minimum Shell Thickness"),1},
|
{ L("Strength"), {{"wall_loops", "",1},{"top_shell_layers", L("Top Solid Layers"),1},{"top_shell_thickness", L("Top Minimum Shell Thickness"),1},{"top_surface_density", L("Top Surface Density"),1},
|
||||||
{"bottom_shell_layers", L("Bottom Solid Layers"),1}, {"bottom_shell_thickness", L("Bottom Minimum Shell Thickness"),1},
|
{"bottom_shell_layers", L("Bottom Solid Layers"),1}, {"bottom_shell_thickness", L("Bottom Minimum Shell Thickness"),1},{"bottom_surface_density", L("Bottom Surface Density"),1},
|
||||||
{"sparse_infill_density", "",1},{"sparse_infill_pattern", "",1},{"lattice_angle_1", "",1},{"lattice_angle_2", "",1},{"infill_overhang_angle", "",1},{"infill_anchor", "",1},{"infill_anchor_max", "",1},{"top_surface_pattern", "",1},{"bottom_surface_pattern", "",1}, {"internal_solid_infill_pattern", "",1},
|
{"sparse_infill_density", "",1},{"sparse_infill_pattern", "",1},{"lattice_angle_1", "",1},{"lattice_angle_2", "",1},{"infill_overhang_angle", "",1},{"infill_anchor", "",1},{"infill_anchor_max", "",1},{"top_surface_pattern", "",1},{"bottom_surface_pattern", "",1}, {"internal_solid_infill_pattern", "",1},
|
||||||
{"infill_combination", "",1}, {"infill_combination_max_layer_height", "",1}, {"infill_wall_overlap", "",1},{"top_bottom_infill_wall_overlap", "",1}, {"solid_infill_direction", "",1}, {"infill_direction", "",1}, {"bridge_angle", "",1}, {"internal_bridge_angle", "",1}, {"minimum_sparse_infill_area", "",1}
|
{"infill_combination", "",1}, {"infill_combination_max_layer_height", "",1}, {"infill_wall_overlap", "",1},{"top_bottom_infill_wall_overlap", "",1}, {"solid_infill_direction", "",1}, {"infill_direction", "",1}, {"bridge_angle", "",1}, {"internal_bridge_angle", "",1}, {"minimum_sparse_infill_area", "",1}
|
||||||
}},
|
}},
|
||||||
@@ -523,7 +523,7 @@ wxMenu* MenuFactory::append_submenu_add_generic(wxMenu* menu, ModelVolumeType ty
|
|||||||
|
|
||||||
append_menu_item_add_text(sub_menu, type);
|
append_menu_item_add_text(sub_menu, type);
|
||||||
append_menu_item_add_svg(sub_menu, type);
|
append_menu_item_add_svg(sub_menu, type);
|
||||||
|
|
||||||
return sub_menu;
|
return sub_menu;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -619,7 +619,7 @@ static void append_menu_itemm_add_(const wxString& name, GLGizmosManager::EType
|
|||||||
} else {
|
} else {
|
||||||
svg->create_volume(volume_type);
|
svg->create_volume(volume_type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if (type == ModelVolumeType::MODEL_PART || type == ModelVolumeType::NEGATIVE_VOLUME || type == ModelVolumeType::PARAMETER_MODIFIER ||
|
if (type == ModelVolumeType::MODEL_PART || type == ModelVolumeType::NEGATIVE_VOLUME || type == ModelVolumeType::PARAMETER_MODIFIER ||
|
||||||
@@ -1131,7 +1131,7 @@ void MenuFactory::append_menu_item_edit_text(wxMenu *menu)
|
|||||||
|
|
||||||
auto can_edit_text = []() {
|
auto can_edit_text = []() {
|
||||||
if (plater() == nullptr)
|
if (plater() == nullptr)
|
||||||
return false;
|
return false;
|
||||||
const Selection& selection = plater()->get_selection();
|
const Selection& selection = plater()->get_selection();
|
||||||
if (selection.volumes_count() != 1)
|
if (selection.volumes_count() != 1)
|
||||||
return false;
|
return false;
|
||||||
@@ -1141,7 +1141,7 @@ void MenuFactory::append_menu_item_edit_text(wxMenu *menu)
|
|||||||
const ModelVolume *volume = get_model_volume(*gl_volume, selection.get_model()->objects);
|
const ModelVolume *volume = get_model_volume(*gl_volume, selection.get_model()->objects);
|
||||||
if (volume == nullptr)
|
if (volume == nullptr)
|
||||||
return false;
|
return false;
|
||||||
return volume->is_text();
|
return volume->is_text();
|
||||||
};
|
};
|
||||||
|
|
||||||
if (menu != &m_text_part_menu) {
|
if (menu != &m_text_part_menu) {
|
||||||
@@ -1168,7 +1168,7 @@ void MenuFactory::append_menu_item_edit_svg(wxMenu *menu)
|
|||||||
wxString name = _L("Edit SVG");
|
wxString name = _L("Edit SVG");
|
||||||
auto can_edit_svg = []() {
|
auto can_edit_svg = []() {
|
||||||
if (plater() == nullptr)
|
if (plater() == nullptr)
|
||||||
return false;
|
return false;
|
||||||
const Selection& selection = plater()->get_selection();
|
const Selection& selection = plater()->get_selection();
|
||||||
if (selection.volumes_count() != 1)
|
if (selection.volumes_count() != 1)
|
||||||
return false;
|
return false;
|
||||||
@@ -1178,7 +1178,7 @@ void MenuFactory::append_menu_item_edit_svg(wxMenu *menu)
|
|||||||
const ModelVolume *volume = get_model_volume(*gl_volume, selection.get_model()->objects);
|
const ModelVolume *volume = get_model_volume(*gl_volume, selection.get_model()->objects);
|
||||||
if (volume == nullptr)
|
if (volume == nullptr)
|
||||||
return false;
|
return false;
|
||||||
return volume->is_svg();
|
return volume->is_svg();
|
||||||
};
|
};
|
||||||
|
|
||||||
if (menu != &m_svg_part_menu) {
|
if (menu != &m_svg_part_menu) {
|
||||||
|
|||||||
@@ -811,18 +811,18 @@ void Tab::decorate()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!sys_page) {
|
if (!sys_page) {
|
||||||
is_nonsys_value = true;
|
is_nonsys_value = true;
|
||||||
sys_icon = m_bmp_non_system;
|
sys_icon = m_bmp_non_system;
|
||||||
sys_tt = m_tt_non_system;
|
sys_tt = m_tt_non_system;
|
||||||
|
|
||||||
if (!modified_page)
|
if (!modified_page)
|
||||||
color = &m_default_text_clr;
|
color = &m_default_text_clr;
|
||||||
else
|
else
|
||||||
color = &m_modified_label_clr;
|
color = &m_modified_label_clr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!modified_page) {
|
if (!modified_page) {
|
||||||
is_modified_value = false;
|
is_modified_value = false;
|
||||||
icon = &m_bmp_white_bullet;
|
icon = &m_bmp_white_bullet;
|
||||||
tt = &m_tt_white_bullet;
|
tt = &m_tt_white_bullet;
|
||||||
@@ -1474,7 +1474,7 @@ void Tab::on_value_change(const std::string& opt_key, const boost::any& value)
|
|||||||
update_wiping_button_visibility();
|
update_wiping_button_visibility();
|
||||||
|
|
||||||
|
|
||||||
if (opt_key == "pellet_flow_coefficient")
|
if (opt_key == "pellet_flow_coefficient")
|
||||||
{
|
{
|
||||||
double double_value = Preset::convert_pellet_flow_to_filament_diameter(boost::any_cast<double>(value));
|
double double_value = Preset::convert_pellet_flow_to_filament_diameter(boost::any_cast<double>(value));
|
||||||
m_config->set_key_value("filament_diameter", new ConfigOptionFloats{double_value});
|
m_config->set_key_value("filament_diameter", new ConfigOptionFloats{double_value});
|
||||||
@@ -1484,7 +1484,7 @@ void Tab::on_value_change(const std::string& opt_key, const boost::any& value)
|
|||||||
double double_value = Preset::convert_filament_diameter_to_pellet_flow(boost::any_cast<double>(value));
|
double double_value = Preset::convert_filament_diameter_to_pellet_flow(boost::any_cast<double>(value));
|
||||||
m_config->set_key_value("pellet_flow_coefficient", new ConfigOptionFloats{double_value});
|
m_config->set_key_value("pellet_flow_coefficient", new ConfigOptionFloats{double_value});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (opt_key == "single_extruder_multi_material" ){
|
if (opt_key == "single_extruder_multi_material" ){
|
||||||
const auto bSEMM = m_config->opt_bool("single_extruder_multi_material");
|
const auto bSEMM = m_config->opt_bool("single_extruder_multi_material");
|
||||||
@@ -1632,7 +1632,7 @@ void Tab::on_value_change(const std::string& opt_key, const boost::any& value)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(opt_key=="layer_height"){
|
if(opt_key=="layer_height"){
|
||||||
auto min_layer_height_from_nozzle=wxGetApp().preset_bundle->full_config().option<ConfigOptionFloats>("min_layer_height")->values;
|
auto min_layer_height_from_nozzle=wxGetApp().preset_bundle->full_config().option<ConfigOptionFloats>("min_layer_height")->values;
|
||||||
auto max_layer_height_from_nozzle=wxGetApp().preset_bundle->full_config().option<ConfigOptionFloats>("max_layer_height")->values;
|
auto max_layer_height_from_nozzle=wxGetApp().preset_bundle->full_config().option<ConfigOptionFloats>("max_layer_height")->values;
|
||||||
@@ -1700,7 +1700,7 @@ void Tab::on_value_change(const std::string& opt_key, const boost::any& value)
|
|||||||
if (opt_key == "filament_long_retractions_when_cut"){
|
if (opt_key == "filament_long_retractions_when_cut"){
|
||||||
unsigned char activate = boost::any_cast<unsigned char>(value);
|
unsigned char activate = boost::any_cast<unsigned char>(value);
|
||||||
if (activate == 1) {
|
if (activate == 1) {
|
||||||
MessageDialog dialog(wxGetApp().plater(),
|
MessageDialog dialog(wxGetApp().plater(),
|
||||||
_L("Experimental feature: Retracting and cutting off the filament at a greater distance during filament changes to minimize flush. "
|
_L("Experimental feature: Retracting and cutting off the filament at a greater distance during filament changes to minimize flush. "
|
||||||
"Although it can notably reduce flush, it may also elevate the risk of nozzle clogs or other printing complications. "
|
"Although it can notably reduce flush, it may also elevate the risk of nozzle clogs or other printing complications. "
|
||||||
"Please use with the latest printer firmware."), "", wxICON_WARNING | wxOK);
|
"Please use with the latest printer firmware."), "", wxICON_WARNING | wxOK);
|
||||||
@@ -2197,9 +2197,11 @@ void TabPrint::build()
|
|||||||
optgroup = page->new_optgroup(L("Top/bottom shells"), L"param_shell");
|
optgroup = page->new_optgroup(L("Top/bottom shells"), L"param_shell");
|
||||||
optgroup->append_single_option_line("top_shell_layers");
|
optgroup->append_single_option_line("top_shell_layers");
|
||||||
optgroup->append_single_option_line("top_shell_thickness");
|
optgroup->append_single_option_line("top_shell_thickness");
|
||||||
|
optgroup->append_single_option_line("top_surface_density");
|
||||||
optgroup->append_single_option_line("top_surface_pattern");
|
optgroup->append_single_option_line("top_surface_pattern");
|
||||||
optgroup->append_single_option_line("bottom_shell_layers");
|
optgroup->append_single_option_line("bottom_shell_layers");
|
||||||
optgroup->append_single_option_line("bottom_shell_thickness");
|
optgroup->append_single_option_line("bottom_shell_thickness");
|
||||||
|
optgroup->append_single_option_line("bottom_surface_density");
|
||||||
optgroup->append_single_option_line("bottom_surface_pattern");
|
optgroup->append_single_option_line("bottom_surface_pattern");
|
||||||
optgroup->append_single_option_line("top_bottom_infill_wall_overlap");
|
optgroup->append_single_option_line("top_bottom_infill_wall_overlap");
|
||||||
|
|
||||||
@@ -2335,7 +2337,7 @@ void TabPrint::build()
|
|||||||
|
|
||||||
//optgroup = page->new_optgroup(L("Options for support material and raft"));
|
//optgroup = page->new_optgroup(L("Options for support material and raft"));
|
||||||
|
|
||||||
// Support
|
// Support
|
||||||
optgroup = page->new_optgroup(L("Advanced"), L"param_advanced");
|
optgroup = page->new_optgroup(L("Advanced"), L"param_advanced");
|
||||||
optgroup->append_single_option_line("support_top_z_distance", "support#top-z-distance");
|
optgroup->append_single_option_line("support_top_z_distance", "support#top-z-distance");
|
||||||
optgroup->append_single_option_line("support_bottom_z_distance", "support#bottom-z-distance");
|
optgroup->append_single_option_line("support_bottom_z_distance", "support#bottom-z-distance");
|
||||||
@@ -2371,7 +2373,7 @@ void TabPrint::build()
|
|||||||
optgroup->append_single_option_line("tree_support_adaptive_layer_height");
|
optgroup->append_single_option_line("tree_support_adaptive_layer_height");
|
||||||
optgroup->append_single_option_line("tree_support_auto_brim");
|
optgroup->append_single_option_line("tree_support_auto_brim");
|
||||||
optgroup->append_single_option_line("tree_support_brim_width");
|
optgroup->append_single_option_line("tree_support_brim_width");
|
||||||
|
|
||||||
page = add_options_page(L("Multimaterial"), "custom-gcode_multi_material"); // ORCA: icon only visible on placeholders
|
page = add_options_page(L("Multimaterial"), "custom-gcode_multi_material"); // ORCA: icon only visible on placeholders
|
||||||
optgroup = page->new_optgroup(L("Prime tower"), L"param_tower");
|
optgroup = page->new_optgroup(L("Prime tower"), L"param_tower");
|
||||||
optgroup->append_single_option_line("enable_prime_tower");
|
optgroup->append_single_option_line("enable_prime_tower");
|
||||||
@@ -2470,7 +2472,7 @@ page = add_options_page(L("Others"), "custom-gcode_other"); // ORCA: icon only v
|
|||||||
option.opt.multiline = true;
|
option.opt.multiline = true;
|
||||||
// option.opt.height = 5;
|
// option.opt.height = 5;
|
||||||
optgroup->append_single_option_line(option);
|
optgroup->append_single_option_line(option);
|
||||||
|
|
||||||
optgroup = page->new_optgroup(L("Post-processing Scripts"), L"param_gcode", 0);
|
optgroup = page->new_optgroup(L("Post-processing Scripts"), L"param_gcode", 0);
|
||||||
option = optgroup->get_option("post_process");
|
option = optgroup->get_option("post_process");
|
||||||
option.opt.full_width = true;
|
option.opt.full_width = true;
|
||||||
@@ -2491,7 +2493,7 @@ page = add_options_page(L("Others"), "custom-gcode_other"); // ORCA: icon only v
|
|||||||
// create_line_with_widget(optgroup.get(), "compatible_printers", "", [this](wxWindow* parent) {
|
// create_line_with_widget(optgroup.get(), "compatible_printers", "", [this](wxWindow* parent) {
|
||||||
// return compatible_widget_create(parent, m_compatible_printers);
|
// return compatible_widget_create(parent, m_compatible_printers);
|
||||||
// });
|
// });
|
||||||
|
|
||||||
// option = optgroup->get_option("compatible_printers_condition");
|
// option = optgroup->get_option("compatible_printers_condition");
|
||||||
// option.opt.full_width = true;
|
// option.opt.full_width = true;
|
||||||
// optgroup->append_single_option_line(option);
|
// optgroup->append_single_option_line(option);
|
||||||
@@ -2900,7 +2902,7 @@ void TabPrintPlate::build()
|
|||||||
auto page = add_options_page(L("Plate Settings"), "empty");
|
auto page = add_options_page(L("Plate Settings"), "empty");
|
||||||
auto optgroup = page->new_optgroup("");
|
auto optgroup = page->new_optgroup("");
|
||||||
optgroup->append_single_option_line("curr_bed_type");
|
optgroup->append_single_option_line("curr_bed_type");
|
||||||
optgroup->append_single_option_line("skirt_start_angle");
|
optgroup->append_single_option_line("skirt_start_angle");
|
||||||
optgroup->append_single_option_line("print_sequence");
|
optgroup->append_single_option_line("print_sequence");
|
||||||
optgroup->append_single_option_line("spiral_mode");
|
optgroup->append_single_option_line("spiral_mode");
|
||||||
optgroup->append_single_option_line("first_layer_sequence_choice");
|
optgroup->append_single_option_line("first_layer_sequence_choice");
|
||||||
@@ -3051,7 +3053,7 @@ void TabPrintPlate::notify_changed(ObjectBase* object)
|
|||||||
for (auto item : items) {
|
for (auto item : items) {
|
||||||
if (objects_list->GetModel()->GetItemType(item) == itPlate) {
|
if (objects_list->GetModel()->GetItemType(item) == itPlate) {
|
||||||
ObjectDataViewModelNode* node = static_cast<ObjectDataViewModelNode*>(item.GetID());
|
ObjectDataViewModelNode* node = static_cast<ObjectDataViewModelNode*>(item.GetID());
|
||||||
if (node)
|
if (node)
|
||||||
node->set_action_icon(!m_all_keys.empty());
|
node->set_action_icon(!m_all_keys.empty());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3059,7 +3061,7 @@ void TabPrintPlate::notify_changed(ObjectBase* object)
|
|||||||
|
|
||||||
void TabPrintPlate::update_custom_dirty()
|
void TabPrintPlate::update_custom_dirty()
|
||||||
{
|
{
|
||||||
for (auto k : m_null_keys)
|
for (auto k : m_null_keys)
|
||||||
m_options_list[k] = 0;
|
m_options_list[k] = 0;
|
||||||
for (auto k : m_all_keys) {
|
for (auto k : m_all_keys) {
|
||||||
if (k == "first_layer_sequence_choice" || k == "other_layers_sequence_choice") {
|
if (k == "first_layer_sequence_choice" || k == "other_layers_sequence_choice") {
|
||||||
@@ -3301,9 +3303,9 @@ void TabFilament::update_filament_overrides_page(const DynamicPrintConfig* print
|
|||||||
|
|
||||||
std::vector<std::string> opt_keys = { "filament_retraction_length",
|
std::vector<std::string> opt_keys = { "filament_retraction_length",
|
||||||
"filament_z_hop",
|
"filament_z_hop",
|
||||||
"filament_z_hop_types",
|
"filament_z_hop_types",
|
||||||
"filament_retract_lift_above",
|
"filament_retract_lift_above",
|
||||||
"filament_retract_lift_below",
|
"filament_retract_lift_below",
|
||||||
"filament_retract_lift_enforce",
|
"filament_retract_lift_enforce",
|
||||||
"filament_retraction_speed",
|
"filament_retraction_speed",
|
||||||
"filament_deretraction_speed",
|
"filament_deretraction_speed",
|
||||||
@@ -3414,7 +3416,7 @@ void TabFilament::build()
|
|||||||
optgroup->append_single_option_line("adaptive_pressure_advance");
|
optgroup->append_single_option_line("adaptive_pressure_advance");
|
||||||
optgroup->append_single_option_line("adaptive_pressure_advance_overhangs");
|
optgroup->append_single_option_line("adaptive_pressure_advance_overhangs");
|
||||||
optgroup->append_single_option_line("adaptive_pressure_advance_bridges");
|
optgroup->append_single_option_line("adaptive_pressure_advance_bridges");
|
||||||
|
|
||||||
Option option = optgroup->get_option("adaptive_pressure_advance_model");
|
Option option = optgroup->get_option("adaptive_pressure_advance_model");
|
||||||
option.opt.full_width = true;
|
option.opt.full_width = true;
|
||||||
option.opt.is_code = true;
|
option.opt.is_code = true;
|
||||||
@@ -3726,7 +3728,7 @@ void TabFilament::toggle_options()
|
|||||||
toggle_option(el, has_enable_overhang_bridge_fan);
|
toggle_option(el, has_enable_overhang_bridge_fan);
|
||||||
|
|
||||||
toggle_option("additional_cooling_fan_speed", cfg.opt_bool("auxiliary_fan"));
|
toggle_option("additional_cooling_fan_speed", cfg.opt_bool("auxiliary_fan"));
|
||||||
|
|
||||||
// Orca: toggle dont slow down for external perimeters if
|
// Orca: toggle dont slow down for external perimeters if
|
||||||
bool has_slow_down_for_layer_cooling = m_config->opt_bool("slow_down_for_layer_cooling", 0);
|
bool has_slow_down_for_layer_cooling = m_config->opt_bool("slow_down_for_layer_cooling", 0);
|
||||||
toggle_option("dont_slow_down_outer_wall", has_slow_down_for_layer_cooling);
|
toggle_option("dont_slow_down_outer_wall", has_slow_down_for_layer_cooling);
|
||||||
@@ -3739,7 +3741,7 @@ void TabFilament::toggle_options()
|
|||||||
//Orca: Enable the plates that should be visible when multi bed support is enabled or a BBL printer is selected; otherwise, enable only the plate visible for the selected bed type.
|
//Orca: Enable the plates that should be visible when multi bed support is enabled or a BBL printer is selected; otherwise, enable only the plate visible for the selected bed type.
|
||||||
DynamicConfig& proj_cfg = m_preset_bundle->project_config;
|
DynamicConfig& proj_cfg = m_preset_bundle->project_config;
|
||||||
std::string bed_temp_1st_layer_key = "";
|
std::string bed_temp_1st_layer_key = "";
|
||||||
if (proj_cfg.has("curr_bed_type"))
|
if (proj_cfg.has("curr_bed_type"))
|
||||||
{
|
{
|
||||||
bed_temp_1st_layer_key = get_bed_temp_1st_layer_key(proj_cfg.opt_enum<BedType>("curr_bed_type"));
|
bed_temp_1st_layer_key = get_bed_temp_1st_layer_key(proj_cfg.opt_enum<BedType>("curr_bed_type"));
|
||||||
}
|
}
|
||||||
@@ -3752,13 +3754,13 @@ void TabFilament::toggle_options()
|
|||||||
bed_temp_keys.end() ||
|
bed_temp_keys.end() ||
|
||||||
is_BBL_printer || cfg.opt_bool("support_multi_bed_types");
|
is_BBL_printer || cfg.opt_bool("support_multi_bed_types");
|
||||||
|
|
||||||
for (const auto& key : bed_temp_keys)
|
for (const auto& key : bed_temp_keys)
|
||||||
{
|
{
|
||||||
toggle_line(key, support_multi_bed_types || bed_temp_1st_layer_key == key);
|
toggle_line(key, support_multi_bed_types || bed_temp_1st_layer_key == key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Orca: adaptive pressure advance and calibration model
|
// Orca: adaptive pressure advance and calibration model
|
||||||
// If PA is not enabled, disable adaptive pressure advance and hide the model section
|
// If PA is not enabled, disable adaptive pressure advance and hide the model section
|
||||||
// If adaptive PA is not enabled, hide the adaptive PA model section
|
// If adaptive PA is not enabled, hide the adaptive PA model section
|
||||||
@@ -3942,7 +3944,7 @@ void TabPrinter::build_fff()
|
|||||||
optgroup->append_single_option_line("use_firmware_retraction");
|
optgroup->append_single_option_line("use_firmware_retraction");
|
||||||
// optgroup->append_single_option_line("spaghetti_detector");
|
// optgroup->append_single_option_line("spaghetti_detector");
|
||||||
optgroup->append_single_option_line("time_cost");
|
optgroup->append_single_option_line("time_cost");
|
||||||
|
|
||||||
optgroup = page->new_optgroup(L("Cooling Fan"), "param_cooling_fan");
|
optgroup = page->new_optgroup(L("Cooling Fan"), "param_cooling_fan");
|
||||||
Line line = Line{ L("Fan speed-up time"), optgroup->get_option("fan_speedup_time").opt.tooltip };
|
Line line = Line{ L("Fan speed-up time"), optgroup->get_option("fan_speedup_time").opt.tooltip };
|
||||||
line.append_option(optgroup->get_option("fan_speedup_time"));
|
line.append_option(optgroup->get_option("fan_speedup_time"));
|
||||||
@@ -4005,8 +4007,8 @@ void TabPrinter::build_fff()
|
|||||||
option.opt.is_code = true;
|
option.opt.is_code = true;
|
||||||
option.opt.height = gcode_field_height; // 150;
|
option.opt.height = gcode_field_height; // 150;
|
||||||
optgroup->append_single_option_line(option);
|
optgroup->append_single_option_line(option);
|
||||||
|
|
||||||
|
|
||||||
optgroup = page->new_optgroup(L("Before layer change G-code"),"param_gcode", 0);
|
optgroup = page->new_optgroup(L("Before layer change G-code"),"param_gcode", 0);
|
||||||
optgroup->m_on_change = [this, &optgroup_title = optgroup->title](const t_config_option_key& opt_key, const boost::any& value) {
|
optgroup->m_on_change = [this, &optgroup_title = optgroup->title](const t_config_option_key& opt_key, const boost::any& value) {
|
||||||
validate_custom_gcode_cb(this, optgroup_title, opt_key, value);
|
validate_custom_gcode_cb(this, optgroup_title, opt_key, value);
|
||||||
@@ -4028,7 +4030,7 @@ void TabPrinter::build_fff()
|
|||||||
option.opt.is_code = true;
|
option.opt.is_code = true;
|
||||||
option.opt.height = gcode_field_height;//150;
|
option.opt.height = gcode_field_height;//150;
|
||||||
optgroup->append_single_option_line(option);
|
optgroup->append_single_option_line(option);
|
||||||
|
|
||||||
optgroup = page->new_optgroup(L("Timelapse G-code"), L"param_gcode", 0);
|
optgroup = page->new_optgroup(L("Timelapse G-code"), L"param_gcode", 0);
|
||||||
optgroup->m_on_change = [this, &optgroup_title = optgroup->title](const t_config_option_key& opt_key, const boost::any& value) {
|
optgroup->m_on_change = [this, &optgroup_title = optgroup->title](const t_config_option_key& opt_key, const boost::any& value) {
|
||||||
validate_custom_gcode_cb(this, optgroup_title, opt_key, value);
|
validate_custom_gcode_cb(this, optgroup_title, opt_key, value);
|
||||||
@@ -4223,7 +4225,7 @@ PageShp TabPrinter::build_kinematics_page()
|
|||||||
}
|
}
|
||||||
auto optgroup = page->new_optgroup(L("Advanced"), "param_advanced");
|
auto optgroup = page->new_optgroup(L("Advanced"), "param_advanced");
|
||||||
optgroup->append_single_option_line("emit_machine_limits_to_gcode");
|
optgroup->append_single_option_line("emit_machine_limits_to_gcode");
|
||||||
|
|
||||||
// resonance avoidance ported over from qidi slicer
|
// resonance avoidance ported over from qidi slicer
|
||||||
optgroup = page->new_optgroup(L("Resonance Avoidance"));
|
optgroup = page->new_optgroup(L("Resonance Avoidance"));
|
||||||
optgroup->append_single_option_line("resonance_avoidance");
|
optgroup->append_single_option_line("resonance_avoidance");
|
||||||
@@ -4762,7 +4764,7 @@ void TabPrinter::toggle_options()
|
|||||||
toggle_option("long_retractions_when_cut", !use_firmware_retraction && m_config->opt_int("enable_long_retraction_when_cut"),i);
|
toggle_option("long_retractions_when_cut", !use_firmware_retraction && m_config->opt_int("enable_long_retraction_when_cut"),i);
|
||||||
toggle_line("retraction_distances_when_cut#0", m_config->opt_bool("long_retractions_when_cut", i));
|
toggle_line("retraction_distances_when_cut#0", m_config->opt_bool("long_retractions_when_cut", i));
|
||||||
//toggle_option("retraction_distances_when_cut", m_config->opt_bool("long_retractions_when_cut",i),i);
|
//toggle_option("retraction_distances_when_cut", m_config->opt_bool("long_retractions_when_cut",i),i);
|
||||||
|
|
||||||
toggle_option("travel_slope", m_config->opt_enum("z_hop_types", i) != ZHopType::zhtNormal, i);
|
toggle_option("travel_slope", m_config->opt_enum("z_hop_types", i) != ZHopType::zhtNormal, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5174,13 +5176,13 @@ bool Tab::select_preset(std::string preset_name, bool delete_current /*=false*/,
|
|||||||
try {
|
try {
|
||||||
//BBS delete preset
|
//BBS delete preset
|
||||||
Preset ¤t_preset = m_presets->get_selected_preset();
|
Preset ¤t_preset = m_presets->get_selected_preset();
|
||||||
|
|
||||||
// Obtain compatible filament and process presets for printers
|
// Obtain compatible filament and process presets for printers
|
||||||
if (m_preset_bundle && m_presets->get_preset_base(current_preset) == ¤t_preset && printer_tab && !current_preset.is_system) {
|
if (m_preset_bundle && m_presets->get_preset_base(current_preset) == ¤t_preset && printer_tab && !current_preset.is_system) {
|
||||||
delete_third_printer = true;
|
delete_third_printer = true;
|
||||||
for (const Preset &preset : m_preset_bundle->filaments.get_presets()) {
|
for (const Preset &preset : m_preset_bundle->filaments.get_presets()) {
|
||||||
if (preset.is_compatible && !preset.is_default) {
|
if (preset.is_compatible && !preset.is_default) {
|
||||||
if (preset.inherits() != "")
|
if (preset.inherits() != "")
|
||||||
filament_presets.push_front(preset);
|
filament_presets.push_front(preset);
|
||||||
else
|
else
|
||||||
filament_presets.push_back(preset);
|
filament_presets.push_back(preset);
|
||||||
@@ -5311,7 +5313,7 @@ bool Tab::select_preset(std::string preset_name, bool delete_current /*=false*/,
|
|||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (technology_changed)
|
if (technology_changed)
|
||||||
@@ -5913,7 +5915,7 @@ void Tab::delete_preset()
|
|||||||
//wxID_YES != wxMessageDialog(parent(), msg, title, wxYES_NO | wxNO_DEFAULT | wxICON_QUESTION).ShowModal())
|
//wxID_YES != wxMessageDialog(parent(), msg, title, wxYES_NO | wxNO_DEFAULT | wxICON_QUESTION).ShowModal())
|
||||||
wxID_YES == MessageDialog(parent(), msg, title, wxYES_NO | wxNO_DEFAULT | wxICON_QUESTION).ShowModal()))
|
wxID_YES == MessageDialog(parent(), msg, title, wxYES_NO | wxNO_DEFAULT | wxICON_QUESTION).ShowModal()))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// if we just delete preset from the physical printer
|
// if we just delete preset from the physical printer
|
||||||
if (m_presets_choice->is_selected_physical_printer()) {
|
if (m_presets_choice->is_selected_physical_printer()) {
|
||||||
PhysicalPrinter& printer = physical_printers.get_selected_printer();
|
PhysicalPrinter& printer = physical_printers.get_selected_printer();
|
||||||
@@ -6037,7 +6039,7 @@ wxSizer* Tab::compatible_widget_create(wxWindow* parent, PresetDependencies &dep
|
|||||||
deps.checkbox->SetValue(state);
|
deps.checkbox->SetValue(state);
|
||||||
deps.btn->Enable(!state);
|
deps.btn->Enable(!state);
|
||||||
// All printers have been made compatible with this preset.
|
// All printers have been made compatible with this preset.
|
||||||
if (state)
|
if (state)
|
||||||
this->load_key_value(deps.key_list, std::vector<std::string> {});
|
this->load_key_value(deps.key_list, std::vector<std::string> {});
|
||||||
this->get_field(deps.key_condition)->toggle(state);
|
this->get_field(deps.key_condition)->toggle(state);
|
||||||
this->update_changed_ui();
|
this->update_changed_ui();
|
||||||
@@ -6196,7 +6198,7 @@ void TabPrinter::cache_extruder_cnt(const DynamicPrintConfig* config/* = nullptr
|
|||||||
if (Preset::printer_technology(cached_config) == ptSLA)
|
if (Preset::printer_technology(cached_config) == ptSLA)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// get extruders count
|
// get extruders count
|
||||||
auto* nozzle_diameter = dynamic_cast<const ConfigOptionFloats*>(cached_config.option("nozzle_diameter"));
|
auto* nozzle_diameter = dynamic_cast<const ConfigOptionFloats*>(cached_config.option("nozzle_diameter"));
|
||||||
m_cache_extruder_count = nozzle_diameter->values.size(); //m_extruders_count;
|
m_cache_extruder_count = nozzle_diameter->values.size(); //m_extruders_count;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user