Replaced parameters wall_add_middle_threshold and wall_split_middle_threshold with automatic computation based on extrusion width.

That allows computed better values in cases when the extrusion width of the first layer or for the infill differs from the extrusion width for perimeters.

Parameters min_feature_size and wall_transition_length now can be set in percentages, and then they will be calculated based on nozzle size. Old profiles with default values are forced to replace old default values with new default values in percentages.
This commit is contained in:
Lukáš Hejl 2022-08-05 08:16:45 +02:00
parent b8c3905e82
commit c9ddf7315e
14 changed files with 70 additions and 72 deletions

View file

@ -388,6 +388,7 @@ void Layer::make_fills(FillAdaptive::Octree* adaptive_fill_octree, FillAdaptive:
params.anchor_length_max = surface_fill.params.anchor_length_max;
params.resolution = resolution;
params.use_arachne = perimeter_generator == PerimeterGeneratorType::Arachne && surface_fill.params.pattern == ipConcentric;
params.layer_height = m_regions[surface_fill.region_id]->layer()->height;
for (ExPolygon &expoly : surface_fill.expolygons) {
// Spacing is modified by the filler to indicate adjustments. Reset it for each expolygon.

View file

@ -61,6 +61,8 @@ struct FillParams
// For Concentric infill, to switch between Classic and Arachne.
bool use_arachne { false };
// Layer height for Concentric infill with Arachne.
coordf_t layer_height { 0.f };
};
static_assert(IsTriviallyCopyable<FillParams>::value, "FillParams class is not POD (and it should be - see constructor).");

View file

@ -77,8 +77,8 @@ void FillConcentric::_fill_surface_single(const FillParams &params,
if (params.density > 0.9999f && !params.dont_adjust) {
coord_t loops_count = std::max(bbox_size.x(), bbox_size.y()) / min_spacing + 1;
Polygons polygons = offset(expolygon, min_spacing / 2);
Arachne::WallToolPaths wallToolPaths(polygons, min_spacing, min_spacing, loops_count, 0, *this->print_object_config, *this->print_config);
Polygons polygons = offset(expolygon, float(min_spacing) / 2.f);
Arachne::WallToolPaths wallToolPaths(polygons, min_spacing, min_spacing, loops_count, 0, params.layer_height, *this->print_object_config, *this->print_config);
std::vector<Arachne::VariableWidthLines> loops = wallToolPaths.getToolPaths();
std::vector<const Arachne::ExtrusionLine *> all_extrusions;