add mix_wall revert infill_overlap

This commit is contained in:
Wang YB
2024-02-27 13:51:25 +08:00
parent 2046b2f21f
commit 04b1c22cc6
3 changed files with 18 additions and 8 deletions

View File

@@ -549,6 +549,10 @@ void Layer::make_fills(FillAdaptive::Octree* adaptive_fill_octree, FillAdaptive:
params.anchor_length_max = surface_fill.params.anchor_length_max;
params.resolution = resolution;
//w14
//w20
if (perimeter_generator == PerimeterGeneratorType::Mix_wall)
params.use_arachne = (perimeter_generator == PerimeterGeneratorType::Arachne && surface_fill.params.pattern == ipConcentricInternal) || surface_fill.params.pattern == ipEnsuring || surface_fill.params.pattern == ipConcentricInternal;
else
params.use_arachne = (perimeter_generator == PerimeterGeneratorType::Arachne && surface_fill.params.pattern == ipConcentricInternal) || surface_fill.params.pattern == ipEnsuring ;
params.layer_height = layerm.layer()->height;
@@ -561,25 +565,25 @@ void Layer::make_fills(FillAdaptive::Octree* adaptive_fill_octree, FillAdaptive:
try {
if (params.use_arachne) {
//w14
if (surface_fill.params.pattern == ipConcentricInternal) {
/* if (surface_fill.params.pattern == ipConcentricInternal) {
layerm.region().config().infill_overlap.percent ?
f->overlap = layerm.region().config().perimeter_extrusion_width * layerm.region().config().infill_overlap.value / 100 *(-1):
f->overlap = float(layerm.region().config().infill_overlap.value);
} else
f->overlap = 0;
f->overlap = 0;*/
thick_polylines = f->fill_surface_arachne(&surface_fill.surface, params);
}
//w14
else {
if (surface_fill.params.pattern == ipConcentricInternal) {
/* if (surface_fill.params.pattern == ipConcentricInternal) {
layerm.region().config().infill_overlap.percent ?
f->overlap = layerm.region().config().perimeter_extrusion_width *
layerm.region().config().infill_overlap.value / 100 * (-1) :
f->overlap = float(layerm.region().config().infill_overlap.value);
} else
f->overlap = 0;
f->overlap = 0;*/
polylines = f->fill_surface(&surface_fill.surface, params);
}
} catch (InfillFailedException &) {

View File

@@ -230,9 +230,11 @@ static const t_config_enum_values s_keys_map_ForwardCompatibilitySubstitutionRul
};
CONFIG_OPTION_ENUM_DEFINE_STATIC_MAPS(ForwardCompatibilitySubstitutionRule)
//w20
static t_config_enum_values s_keys_map_PerimeterGeneratorType {
{ "classic", int(PerimeterGeneratorType::Classic) },
{ "arachne", int(PerimeterGeneratorType::Arachne) }
{ "arachne", int(PerimeterGeneratorType::Arachne) },
{ "mix_wall", int(PerimeterGeneratorType::Mix_wall) }
};
CONFIG_OPTION_ENUM_DEFINE_STATIC_MAPS(PerimeterGeneratorType)
@@ -3531,6 +3533,7 @@ void PrintConfigDef::init_fff_params()
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(0));
//w20
def = this->add("perimeter_generator", coEnum);
def->label = L("Perimeter generator");
def->category = L("Layers and Perimeters");
@@ -3540,7 +3543,8 @@ void PrintConfigDef::init_fff_params()
"This setting also affects the Concentric infill.");
def->set_enum<PerimeterGeneratorType>({
{ "classic", L("Classic") },
{ "arachne", L("Arachne") }
{ "arachne", L("Arachne") },
{ "mix_wall", L("Mix_wall")}
});
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionEnum<PerimeterGeneratorType>(PerimeterGeneratorType::Arachne));

View File

@@ -133,13 +133,15 @@ enum DraftShield {
enum class LabelObjectsStyle {
Disabled, Octoprint, Firmware
};
//w20
enum class PerimeterGeneratorType
{
// Classic perimeter generator using Clipper offsets with constant extrusion width.
Classic,
// Perimeter generator with variable extrusion width based on the paper
// "A framework for adaptive width control of dense contour-parallel toolpaths in fused deposition modeling" ported from Cura.
Arachne
Arachne,
Mix_wall
};
//B3
enum class GCodeThumbnailsFormat { QIDI,PNG, JPG, QOI };