ENH: add solid infill pattern

Signed-off-by: qing.zhang <qing.zhang@bambulab.com>
Change-Id: I8878c8d5f0024c9cbde6040f317d0783dfc5eccd
This commit is contained in:
qing.zhang 2023-06-16 18:07:20 +08:00 committed by Lane.Wei
parent 4e5f4ee366
commit 546322d1cc
12 changed files with 37 additions and 12 deletions

View file

@ -1030,6 +1030,15 @@ void PrintConfigDef::init_fff_params()
def->enum_labels = def_top_fill_pattern->enum_labels;
def->set_default_value(new ConfigOptionEnum<InfillPattern>(ipRectilinear));
def = this->add("internal_solid_infill_pattern", coEnum);
def->label = L("Internal solid infill Pattern");
def->category = L("Strength");
def->tooltip = L("Line pattern of internal solid infill. if the detect nattow internal solid infill be enabled, the concentric pattern will be used for the small area.");
def->enum_keys_map = &ConfigOptionEnum<InfillPattern>::get_enum_values();
def->enum_values = def_top_fill_pattern->enum_values;
def->enum_labels = def_top_fill_pattern->enum_labels;
def->set_default_value(new ConfigOptionEnum<InfillPattern>(ipRectilinear));
def = this->add("outer_wall_line_width", coFloat);
def->label = L("Outer wall");
def->category = L("Quality");
@ -4648,10 +4657,15 @@ std::map<std::string, std::string> validate(const FullPrintConfig &cfg, bool und
}
// --bottom-fill-pattern
if (! print_config_def.get("bottom_surface_pattern")->has_enum_value(cfg.bottom_surface_pattern.serialize())) {
if (!print_config_def.get("bottom_surface_pattern")->has_enum_value(cfg.bottom_surface_pattern.serialize())) {
error_message.emplace("bottom_surface_pattern", L("invalid value ") + cfg.bottom_surface_pattern.serialize());
}
// --soild-fill-pattern
if (!print_config_def.get("internal_solid_infill_pattern")->has_enum_value(cfg.internal_solid_infill_pattern.serialize())) {
error_message.emplace("internal_solid_infill_pattern", L("invalid value ") + cfg.internal_solid_infill_pattern.serialize());
}
// --fill-density
if (fabs(cfg.sparse_infill_density.value - 100.) < EPSILON &&
! print_config_def.get("top_surface_pattern")->has_enum_value(cfg.sparse_infill_pattern.serialize())) {