mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-31 20:51:12 -06:00
ENH: add back even-odd mode
Add back even-odd mode to support slicing 3DLabPrint airplane models Signed-off-by: salt.wei <salt.wei@bambulab.com> Change-Id: Id3efcfb0ecf98350add7a19885750df74d4fdedd (cherry picked from commit 553371e61e35355b3a73694d4cf9acb179b2a427)
This commit is contained in:
parent
5791ca7e8d
commit
c1599aa138
7 changed files with 28 additions and 12 deletions
|
|
@ -690,7 +690,7 @@ bool Preset::is_custom_defined()
|
|||
}
|
||||
|
||||
static std::vector<std::string> s_Preset_print_options {
|
||||
"layer_height", "initial_layer_print_height", "wall_loops", "slice_closing_radius", "spiral_mode",
|
||||
"layer_height", "initial_layer_print_height", "wall_loops", "slice_closing_radius", "spiral_mode", "slicing_mode",
|
||||
"top_shell_layers", "top_shell_thickness", "bottom_shell_layers", "bottom_shell_thickness",
|
||||
"ensure_vertical_shell_thickness", "reduce_crossing_wall", "detect_thin_wall", "detect_overhang_wall",
|
||||
"seam_position", "wall_infill_order", "sparse_infill_density", "sparse_infill_pattern", "top_surface_pattern", "bottom_surface_pattern",
|
||||
|
|
|
|||
|
|
@ -2323,6 +2323,20 @@ void PrintConfigDef::init_fff_params()
|
|||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionFloat(0.049));
|
||||
|
||||
def = this->add("slicing_mode", coEnum);
|
||||
def->label = L("Slicing Mode");
|
||||
def->category = L("Other");
|
||||
def->tooltip = L("Use \"Even-odd\" for 3DLabPrint airplane models. Use \"Close holes\" to close all holes in the model.");
|
||||
def->enum_keys_map = &ConfigOptionEnum<SlicingMode>::get_enum_values();
|
||||
def->enum_values.push_back("regular");
|
||||
def->enum_values.push_back("even_odd");
|
||||
def->enum_values.push_back("close_holes");
|
||||
def->enum_labels.push_back(L("Regular"));
|
||||
def->enum_labels.push_back(L("Even-odd"));
|
||||
def->enum_labels.push_back(L("Close holes"));
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionEnum<SlicingMode>(SlicingMode::Regular));
|
||||
|
||||
def = this->add("enable_support", coBool);
|
||||
//BBS: remove material behind support
|
||||
def->label = L("Enable support");
|
||||
|
|
@ -3703,7 +3717,7 @@ void PrintConfigDef::handle_legacy(t_config_option_key &opt_key, std::string &va
|
|||
, "support_sharp_tails","remove_small_overhangs", "support_with_sheath",
|
||||
"tree_support_branch_diameter_angle", "tree_support_collision_resolution",
|
||||
"small_perimeter_speed", "max_volumetric_speed", "max_print_speed",
|
||||
"support_bottom_z_distance", "support_closing_radius", "slicing_mode",
|
||||
"support_bottom_z_distance", "support_closing_radius",
|
||||
"remove_freq_sweep", "remove_bed_leveling", "remove_extrusion_calibration",
|
||||
"support_transition_line_width", "support_transition_speed", "bed_temperature", "bed_temperature_initial_layer",
|
||||
"can_switch_nozzle_type", "can_add_auxiliary_fan", "extra_flush_volume", "spaghetti_detector"
|
||||
|
|
|
|||
|
|
@ -609,6 +609,7 @@ PRINT_CONFIG_CLASS_DEFINE(
|
|||
((ConfigOptionInt, raft_layers))
|
||||
((ConfigOptionEnum<SeamPosition>, seam_position))
|
||||
((ConfigOptionFloat, slice_closing_radius))
|
||||
((ConfigOptionEnum<SlicingMode>, slicing_mode))
|
||||
((ConfigOptionBool, enable_support))
|
||||
// Automatic supports (generated based on support_threshold_angle).
|
||||
((ConfigOptionEnum<SupportType>, support_type))
|
||||
|
|
|
|||
|
|
@ -703,7 +703,8 @@ bool PrintObject::invalidate_state_by_config_options(
|
|||
|| opt_key == "adaptive_layer_height"
|
||||
|| opt_key == "raft_layers"
|
||||
|| opt_key == "raft_contact_distance"
|
||||
|| opt_key == "slice_closing_radius") {
|
||||
|| opt_key == "slice_closing_radius"
|
||||
|| opt_key == "slicing_mode") {
|
||||
steps.emplace_back(posSlice);
|
||||
} else if (
|
||||
opt_key == "elefant_foot_compensation"
|
||||
|
|
|
|||
|
|
@ -141,13 +141,11 @@ static std::vector<VolumeSlices> slice_volumes_inner(
|
|||
//BBS: 0.0025mm is safe enough to simplify the data to speed slicing up for high-resolution model.
|
||||
//Also has on influence on arc fitting which has default resolution 0.0125mm.
|
||||
params_base.resolution = 0.0025;
|
||||
//BBS: remove slice mode, always regular
|
||||
//switch (print_object_config.slicing_mode.value) {
|
||||
//case SlicingMode::Regular: params_base.mode = MeshSlicingParams::SlicingMode::Regular; break;
|
||||
//case SlicingMode::EvenOdd: params_base.mode = MeshSlicingParams::SlicingMode::EvenOdd; break;
|
||||
//case SlicingMode::CloseHoles: params_base.mode = MeshSlicingParams::SlicingMode::Positive; break;
|
||||
//}
|
||||
params_base.mode = MeshSlicingParams::SlicingMode::Regular;
|
||||
switch (print_object_config.slicing_mode.value) {
|
||||
case SlicingMode::Regular: params_base.mode = MeshSlicingParams::SlicingMode::Regular; break;
|
||||
case SlicingMode::EvenOdd: params_base.mode = MeshSlicingParams::SlicingMode::EvenOdd; break;
|
||||
case SlicingMode::CloseHoles: params_base.mode = MeshSlicingParams::SlicingMode::Positive; break;
|
||||
}
|
||||
|
||||
params_base.mode_below = params_base.mode;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue