Skip to content

Commit

Permalink
update fields
Browse files Browse the repository at this point in the history
  • Loading branch information
GiacomoGuaresi committed Dec 7, 2024
1 parent 32c2583 commit a56a723
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 12 deletions.
6 changes: 4 additions & 2 deletions src/libslic3r/Preset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,7 @@ static std::vector<std::string> s_Preset_print_options {

static std::vector<std::string> s_Preset_filament_options {
/*"filament_colour", */ "default_filament_colour", "required_nozzle_HRC", "filament_diameter", "pellet_flow_coefficient",
"pellet_flow_coefficient", "extruder_rotation_distance", "mixing_stepper_rotation_distance", "filament_type", "filament_soluble",
"pellet_flow_coefficient", "extruder_rotation_volume", "mixing_stepper_rotation_volume", "filament_type", "filament_soluble",
"filament_is_support",
"filament_max_volumetric_speed",
"filament_flow_ratio", "filament_density", "filament_cost", "filament_minimal_purge_on_wipe_tower",
Expand Down Expand Up @@ -878,7 +878,9 @@ static std::vector<std::string> s_Preset_printer_options {
"cooling_tube_retraction",
"cooling_tube_length", "high_current_on_filament_swap", "parking_pos_retraction", "extra_loading_move", "purge_in_prime_tower", "enable_filament_ramming",
"z_offset",
"disable_m73", "preferred_orientation", "emit_machine_limits_to_gcode", "pellet_modded_printer", "support_multi_bed_types","bed_mesh_min","bed_mesh_max","bed_mesh_probe_distance", "adaptive_bed_mesh_margin", "enable_long_retraction_when_cut","long_retractions_when_cut","retraction_distances_when_cut"
"disable_m73", "preferred_orientation", "emit_machine_limits_to_gcode",
"pellet_modded_printer", "use_extruder_rotation_volume", "use_active_pellet_feeding", "active_feeder_motor_name",
"support_multi_bed_types","bed_mesh_min","bed_mesh_max","bed_mesh_probe_distance", "adaptive_bed_mesh_margin", "enable_long_retraction_when_cut","long_retractions_when_cut","retraction_distances_when_cut"
};

static std::vector<std::string> s_Preset_sla_print_options {
Expand Down
27 changes: 23 additions & 4 deletions src/libslic3r/PrintConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1942,15 +1942,15 @@ void PrintConfigDef::init_fff_params()
def->min = 0;
def->set_default_value(new ConfigOptionFloats{ 0.4157 });

def = this->add("extruder_rotation_distance", coFloat);
def->label = L("Extruder rotation distance");
def = this->add("extruder_rotation_volume", coFloat);
def->label = L("Extruder rotation volume");
def->tooltip = L("The volume of material extruded (in mm³) for each full turn of the extruder motor. This parameter is crucial for configuring precise extrusion settings during printing.");
def->sidetext = L("mm³");
def->min = 0;
def->set_default_value(new ConfigOptionFloat(456));

def = this->add("mixing_stepper_rotation_distance", coFloat);
def->label = L("Mixing stepper rotation distance");
def = this->add("mixing_stepper_rotation_volume", coFloat);
def->label = L("Mixing stepper rotation volume");
def->tooltip = L("The value controlling how much material is actively fed into the extruder by the feeding mechanism. Used for fine-tuning the material flow in multi-material or pellet-based printing.");
def->min = 0;
def->set_default_value(new ConfigOptionFloat(6000));
Expand Down Expand Up @@ -2827,6 +2827,25 @@ void PrintConfigDef::init_fff_params()
def->mode = comSimple;
def->set_default_value(new ConfigOptionBool(false));

def = this->add("use_extruder_rotation_volume", coBool);
def->label = L("Use extruder rotation volume");
def->tooltip = L("Use extruder rotation volume instead of the pellet flow coefficent");
def->mode = comSimple;
def->set_default_value(new ConfigOptionBool(true));

def = this->add("active_feeder_motor_name", coString);
def->label = L("Active feeder motor name");
def->tooltip = "Name that identify the feeder motor";
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionString(""));


def = this->add("use_active_pellet_feeding", coBool);
def->label = L("Use forded pellet feeding");
def->tooltip = L("Enable this option if your printer has active pellet feeding");
def->mode = comSimple;
def->set_default_value(new ConfigOptionBool(false));

def = this->add("support_multi_bed_types", coBool);
def->label = L("Support multi bed types");
def->tooltip = L("Enable this option if you want to use multiple bed types");
Expand Down
35 changes: 29 additions & 6 deletions src/slic3r/GUI/Tab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1424,7 +1424,6 @@ void Tab::on_value_change(const std::string& opt_key, const boost::any& value)
m_config->set_key_value("pellet_flow_coefficient", new ConfigOptionFloats{double_value});
}


if (opt_key == "single_extruder_multi_material" ){
const auto bSEMM = m_config->opt_bool("single_extruder_multi_material");
wxGetApp().sidebar().show_SEMM_buttons(bSEMM);
Expand Down Expand Up @@ -3304,8 +3303,8 @@ void TabFilament::build()
// Orca: New section to focus on flow rate and PA to declutter general section
optgroup = page->new_optgroup(L("Flow ratio and Pressure Advance"), L"param_information");
optgroup->append_single_option_line("pellet_flow_coefficient", "pellet-flow-coefficient");
optgroup->append_single_option_line("extruder_rotation_distance", "pellet-flow-coefficient");
optgroup->append_single_option_line("mixing_stepper_rotation_distance", "pellet-flow-coefficient");
optgroup->append_single_option_line("extruder_rotation_volume", "pellet-flow-coefficient");
optgroup->append_single_option_line("mixing_stepper_rotation_volume", "pellet-flow-coefficient");
optgroup->append_single_option_line("filament_flow_ratio");

optgroup->append_single_option_line("enable_pressure_advance");
Expand Down Expand Up @@ -3627,9 +3626,17 @@ void TabFilament::toggle_options()
bool is_pellet_printer = cfg.opt_bool("pellet_modded_printer");
toggle_line("pellet_flow_coefficient", is_pellet_printer);
toggle_line("filament_diameter", !is_pellet_printer);
toggle_line("extruder_rotation_distance", is_pellet_printer);
toggle_line("mixing_stepper_rotation_distance", is_pellet_printer);
toggle_line("extruder_rotation_volume", is_pellet_printer);
toggle_line("mixing_stepper_rotation_volume", is_pellet_printer);

bool use_active_pellet_feeding = cfg.opt_bool("use_active_pellet_feeding");
toggle_line("mixing_stepper_rotation_volume", is_pellet_printer && use_active_pellet_feeding);

bool use_extruder_rotation_volume = cfg.opt_bool("use_extruder_rotation_volume");
toggle_line("extruder_rotation_volume", is_pellet_printer && use_extruder_rotation_volume);
toggle_line("pellet_flow_coefficient", is_pellet_printer && !use_extruder_rotation_volume);
}

if (m_active_page->title() == L("Setting Overrides"))
update_filament_overrides_page(&cfg);

Expand Down Expand Up @@ -3749,6 +3756,8 @@ void TabPrinter::build_fff()
optgroup->append_single_option_line("printer_structure");
optgroup->append_single_option_line("gcode_flavor");
optgroup->append_single_option_line("pellet_modded_printer", "pellet-flow-coefficient");
optgroup->append_single_option_line("use_extruder_rotation_volume", "pellet-flow-coefficient");
optgroup->append_single_option_line("use_active_pellet_feeding", "pellet-flow-coefficient");
optgroup->append_single_option_line("bbl_use_printhost");
optgroup->append_single_option_line("disable_m73");
option = optgroup->get_option("thumbnails");
Expand Down Expand Up @@ -4350,6 +4359,8 @@ if (is_marlin_flavor)
optgroup->append_single_option_line("long_retractions_when_cut", "", extruder_idx);
optgroup->append_single_option_line("retraction_distances_when_cut", "", extruder_idx);

optgroup = page->new_optgroup(L("Advanced"), L"param_advanced");
optgroup->append_single_option_line("active_feeder_motor_name", "pellet-flow-coefficient", extruder_idx);
#if 0
//optgroup = page->new_optgroup(L("Preview"), -1, true);

Expand Down Expand Up @@ -4504,8 +4515,14 @@ void TabPrinter::toggle_options()
toggle_line(el, is_BBL_printer);

// SoftFever: hide non-BBL settings
for (auto el : {"use_firmware_retraction", "use_relative_e_distances", "support_multi_bed_types", "pellet_modded_printer", "bed_mesh_max", "bed_mesh_min", "bed_mesh_probe_distance", "adaptive_bed_mesh_margin", "thumbnails"})
for (auto el : {"use_firmware_retraction", "use_relative_e_distances", "support_multi_bed_types", "pellet_modded_printer", "use_extruder_rotation_volume", "use_active_pellet_feeding", "bed_mesh_max", "bed_mesh_min", "bed_mesh_probe_distance", "adaptive_bed_mesh_margin", "thumbnails"})
toggle_line(el, !is_BBL_printer);


bool is_pellet_printer = m_config->opt_bool("pellet_modded_printer");
auto gcf = m_config->option<ConfigOptionEnum<GCodeFlavor>>("gcode_flavor")->value;
toggle_line("use_active_pellet_feeding", is_pellet_printer && gcf == gcfKlipper);
toggle_line("use_extruder_rotation_volume", is_pellet_printer && gcf == gcfKlipper);
}

if (m_active_page->title() == L("Multimaterial")) {
Expand Down Expand Up @@ -4603,6 +4620,12 @@ void TabPrinter::toggle_options()
//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);

bool is_pellet_printer = m_config->opt_bool("pellet_modded_printer");
bool use_active_pellet_feeding = m_config->opt_bool("use_active_pellet_feeding");
auto gcf = m_config->option<ConfigOptionEnum<GCodeFlavor>>("gcode_flavor")->value;
toggle_option("active_feeder_motor_name", is_pellet_printer && gcf == gcfKlipper && use_active_pellet_feeding, i);
toggle_line("active_feeder_motor_name#0", is_pellet_printer && gcf == gcfKlipper && use_active_pellet_feeding);
}

if (m_active_page->title() == L("Motion ability")) {
Expand Down

0 comments on commit a56a723

Please sign in to comment.