NEW: add support_object_first_layer_gap option

jira: STUDIO-6202
github: #3521

Change-Id: I6f1ce9f5312e9482c0f5bf6ac3215861c501106c
(cherry picked from commit 83027d923a6e67fa0013e5d9f627283c68e996de)
(cherry picked from commit 29da3bc441a194d5b83ce267fe24ebf3f3811133)
This commit is contained in:
Arthur
2024-03-06 08:44:32 +08:00
committed by Noisyfox
parent 4ee6d636c7
commit fd3ed419c2
11 changed files with 37 additions and 16 deletions

View File

@@ -445,10 +445,11 @@ SupportGeneratorLayersPtr generate_raft_base(
Polygons &raft = columns_base->polygons;
Polygons trimming;
// BBS: if first layer of support is intersected with object island, it must have the same function as brim unless in nobrim mode.
if (object.has_brim())
trimming = offset(object.layers().front()->lslices, (float)scale_(object.config().brim_object_gap.value), SUPPORT_SURFACES_OFFSET_PARAMETERS);
else
trimming = offset(object.layers().front()->lslices, (float)scale_(support_params.gap_xy), SUPPORT_SURFACES_OFFSET_PARAMETERS);
// brim_object_gap is changed to 0 by default, it's no longer appropriate to use it to determine the gap of first layer support.
//if (object.has_brim())
// trimming = offset(object.layers().front()->lslices, (float)scale_(object.config().brim_object_gap.value), SUPPORT_SURFACES_OFFSET_PARAMETERS);
//else
trimming = offset(object.layers().front()->lslices, (float)scale_(support_params.gap_xy_first_layer), SUPPORT_SURFACES_OFFSET_PARAMETERS);
if (inflate_factor_1st_layer > SCALED_EPSILON) {
// Inflate in multiple steps to avoid leaking of the support 1st layer through object walls.
auto nsteps = std::max(5, int(ceil(inflate_factor_1st_layer / support_params.first_layer_flow.scaled_width())));