Port "No Unsupported Perimeters" feature from SS (#3189)

* first impl

* Properly handle extra bridges in `detect_surfaces_type()`

* Pass `perimeter_spacing` and `ext_perimeter_width` as parameters instead of instance property

* Make `process_no_bridge()` private

* Attempt to run `process_no_bridge()` in arachne

* Update `BridgeDetector::coverage` to give us more precise bridge coverage

Co-authored-by: supermerill <merill@free.fr>

* Fix bridge infill margin scaling

* Rename the option name as well as add tooltip

---------

Co-authored-by: Noisyfox <timemanager.rick@gmail.com>
Co-authored-by: supermerill <merill@free.fr>
Co-authored-by: SoftFever <softfeverever@gmail.com>
This commit is contained in:
Ocraftyone 2024-01-28 05:12:55 -05:00 committed by GitHub
parent 1487bdd69c
commit 3b7b10f72f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 370 additions and 28 deletions

View file

@ -395,6 +395,13 @@ static const t_config_enum_values s_keys_map_GCodeThumbnailsFormat = {
};
CONFIG_OPTION_ENUM_DEFINE_STATIC_MAPS(GCodeThumbnailsFormat)
static const t_config_enum_values s_keys_map_CounterboleHoleBridgingOption{
{ "none", chbNone },
{ "partiallybridge", chbBridges },
{ "sacrificiallayer", chbFilled },
};
CONFIG_OPTION_ENUM_DEFINE_STATIC_MAPS(CounterboleHoleBridgingOption)
static void assign_printer_technology_to_unknown(t_optiondef_map &options, PrinterTechnology printer_technology)
{
for (std::pair<const t_config_option_key, ConfigOptionDef> &kvp : options)
@ -942,6 +949,24 @@ void PrintConfigDef::init_fff_params()
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("counterbole_hole_bridging", coEnum);
def->label = L("Bridge counterbole holes");
def->category = L("Quality");
def->tooltip = L(
"This option creates bridges for counterbore holes, allowing them to be printed without support. Available modes include:\n"
"1. None: No bridge is created.\n"
"2. Partially Bridged: Only a part of the unsupported area will be bridged.\n"
"3. Sacrificial Layer: A full sacrificial bridge layer is created.");
def->mode = comAdvanced;
def->enum_keys_map = &ConfigOptionEnum<CounterboleHoleBridgingOption>::get_enum_values();
def->enum_values.emplace_back("none");
def->enum_values.emplace_back("partiallybridge");
def->enum_values.emplace_back("sacrificiallayer");
def->enum_labels.emplace_back(L("None"));
def->enum_labels.emplace_back(L("Partially bridged"));
def->enum_labels.emplace_back(L("Sacrificial layer"));
def->set_default_value(new ConfigOptionEnum<CounterboleHoleBridgingOption>(chbNone));
def = this->add("overhang_reverse_threshold", coFloatOrPercent);
def->label = L("Reverse threshold");
def->full_label = L("Overhang reversal threshold");