Skip to content

Commit

Permalink
Add small_area_compensation like orca, with graph option widget
Browse files Browse the repository at this point in the history
  • Loading branch information
supermerill committed Jun 26, 2024
2 parents e14235d + eb53170 commit 2e5ab9e
Show file tree
Hide file tree
Showing 76 changed files with 2,538 additions and 1,065 deletions.
2 changes: 1 addition & 1 deletion resources/ui_layout/default/extruder.ui
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ group:Offsets (for multi-extruder printers)
setting:idx:extruder_offset
setting:idx:extruder_temperature_offset
setting:idx:extruder_fan_offset
extruder_extrusion_multiplier_speed
setting:idx:extruder_extrusion_multiplier_speed
group:Retraction
setting:idx:retract_length
setting:idx:retract_lift
Expand Down
4 changes: 4 additions & 0 deletions resources/ui_layout/default/print.ui
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,10 @@ group:Advanced Infill options
setting:label_width$8:width$5:fill_smooth_distribution
setting:label_width$26:label$Spacing between ironing lines:width$5:sidetext_width$7:fill_smooth_width
end_line
line:Small Area Infill Flow Compensation (beta)
setting:label$_:sidetext_width$0:small_area_infill_flow_compensation
setting:label$_:small_area_infill_flow_compensation_model
end_line
group:title_width$19:Ironing post-process (This will go on top of infills and perimeters)
line:Enable ironing post-process
setting:label$_:sidetext_width$0:ironing
Expand Down
4 changes: 4 additions & 0 deletions resources/ui_layout/example/print.ui
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,10 @@ group:Advanced Infill options
setting:label_width$8:width$5:fill_smooth_distribution
setting:label_width$26:label$Spacing between ironing lines:width$5:sidetext_width$7:fill_smooth_width
end_line
line:Small Area Infill Flow Compensation (beta)
setting:label$_:sidetext_width$0:small_area_infill_flow_compensation
setting:label_:small_area_infill_flow_compensation_model
end_line
group:title_width$19:Ironing post-process (This will go on top of infills and perimeters)
line:Enable ironing post-process
setting:label$_:sidetext_width$0:ironing
Expand Down
6 changes: 3 additions & 3 deletions src/PrusaSlicer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ int CLI::run(int argc, char **argv)
boost::algorithm::iends_with(boost::filesystem::path(argv[0]).filename().string(), GCODEVIEWER_APP_CMD);
#endif // _WIN32

const std::vector<std::string> &load_configs = m_config.option<ConfigOptionStrings>("load", true)->values;
const std::vector<std::string> &load_configs = m_config.option<ConfigOptionStrings>("load", true)->get_values();
const ForwardCompatibilitySubstitutionRule config_substitution_rule = m_config.option<ConfigOptionEnum<ForwardCompatibilitySubstitutionRule>>("config_compatibility", true)->value;

// load config files supplied via --load
Expand Down Expand Up @@ -245,7 +245,7 @@ int CLI::run(int argc, char **argv)
// and not the fff defaults.
double w = sla_print_config.display_width.get_float();
double h = sla_print_config.display_height.get_float();
sla_print_config.bed_shape.values = { Vec2d(0, 0), Vec2d(w, 0), Vec2d(w, h), Vec2d(0, h) };
sla_print_config.bed_shape.set({ Vec2d(0, 0), Vec2d(w, 0), Vec2d(w, h), Vec2d(0, h) });

sla_print_config.apply(m_print_config, true);
m_print_config.apply(sla_print_config, true);
Expand Down Expand Up @@ -294,7 +294,7 @@ int CLI::run(int argc, char **argv)

}
} else if (opt_key == "duplicate_grid") {
std::vector<int> &ints = m_config.option<ConfigOptionInts>("duplicate_grid")->values;
const std::vector<int> &ints = m_config.option<ConfigOptionInts>("duplicate_grid")->get_values();
const int x = ints.size() > 0 ? ints.at(0) : 1;
const int y = ints.size() > 1 ? ints.at(1) : 1;
const double distance = fff_print_config.duplicate_distance.value;
Expand Down
2 changes: 1 addition & 1 deletion src/libslic3r/Arachne/WallToolPaths.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ WallToolPaths::WallToolPaths(const Polygons& outline, const coord_t bead_spacing
, print_object_config(print_object_config)
{
assert(!print_config.nozzle_diameter.empty());
this->min_nozzle_diameter = float(*std::min_element(print_config.nozzle_diameter.values.begin(), print_config.nozzle_diameter.values.end()));
this->min_nozzle_diameter = float(*std::min_element(print_config.nozzle_diameter.get_values().begin(), print_config.nozzle_diameter.get_values().end()));

if (const auto &min_feature_size_opt = print_object_config.min_feature_size; min_feature_size_opt.percent)
this->min_feature_size = scaled<coord_t>(min_feature_size_opt.value * 0.01 * this->min_nozzle_diameter);
Expand Down
284 changes: 275 additions & 9 deletions src/libslic3r/Config.cpp

Large diffs are not rendered by default.

Loading

0 comments on commit 2e5ab9e

Please sign in to comment.