mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-10 03:09:02 +08:00
forgot a .pl
more () for protection for the operator |
This commit is contained in:
parent
c221e97ddc
commit
8b9ea5fe1c
@ -82,7 +82,7 @@ plan tests => 8;
|
||||
my $print = Slic3r::Test::init_print('20mm_cube', config => $config);
|
||||
$print->process;
|
||||
|
||||
ok defined(first { @{$_->get_region(0)->fill_surfaces->filter_by_type(S_TYPE_INTERNALVOID)} > 0 }
|
||||
ok defined(first { @{$_->get_region(0)->fill_surfaces->filter_by_type(S_TYPE_INTERNAL + S_TYPE_VOID)} > 0 }
|
||||
@{$print->print->get_object(0)->layers}),
|
||||
'infill combination produces internal void surfaces';
|
||||
|
||||
|
@ -331,7 +331,7 @@ Layer::detect_surfaces_type()
|
||||
const SurfaceType surface_type_bottom =
|
||||
(object.config.support_material.value && object.config.support_material_contact_distance.value == 0)
|
||||
? stBottom
|
||||
: stBottom | stBridge;
|
||||
: (stBottom | stBridge);
|
||||
|
||||
// Any surface lying on the void is a true bottom bridge (an overhang)
|
||||
bottom.append(
|
||||
@ -370,7 +370,7 @@ Layer::detect_surfaces_type()
|
||||
// just like any other bottom surface lying on the void
|
||||
const SurfaceType surface_type_bottom =
|
||||
(object.config.raft_layers.value > 0 && object.config.support_material_contact_distance.value > 0)
|
||||
? stBottom | stBridge
|
||||
? (stBottom | stBridge)
|
||||
: stBottom;
|
||||
for (Surface &s : bottom.surfaces) s.surface_type = surface_type_bottom;
|
||||
}
|
||||
|
@ -241,7 +241,7 @@ LayerRegion::prepare_fill_surfaces()
|
||||
for (Surfaces::iterator surface = this->fill_surfaces.surfaces.begin(); surface != this->fill_surfaces.surfaces.end(); ++surface) {
|
||||
if (surface->surface_type == stTop) {
|
||||
if (this->layer()->object()->config.infill_only_where_needed) {
|
||||
surface->surface_type = stInternal | stVoid;
|
||||
surface->surface_type = (stInternal | stVoid);
|
||||
} else {
|
||||
surface->surface_type = stInternal;
|
||||
}
|
||||
@ -264,7 +264,7 @@ LayerRegion::prepare_fill_surfaces()
|
||||
const double min_area = this->region()->config.solid_infill_below_area.value / SCALING_FACTOR / SCALING_FACTOR;
|
||||
for (Surface &surface : this->fill_surfaces.surfaces) {
|
||||
if (!surface.is_internal() && surface.area() <= min_area)
|
||||
surface.surface_type = stInternal | stSolid;
|
||||
surface.surface_type = (stInternal | stSolid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -137,7 +137,7 @@ LayerRegion::make_fill()
|
||||
);
|
||||
|
||||
Polygons to_subtract;
|
||||
surfaces.filter_by_type(stInternal | stVoid, &to_subtract);
|
||||
surfaces.filter_by_type((stInternal | stVoid), &to_subtract);
|
||||
|
||||
append_to(to_subtract, collapsed);
|
||||
surfaces.append(
|
||||
@ -146,7 +146,7 @@ LayerRegion::make_fill()
|
||||
to_subtract,
|
||||
true
|
||||
),
|
||||
stInternal | stSolid
|
||||
(stInternal | stSolid)
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -395,7 +395,7 @@ PrintObject::bridge_over_infill()
|
||||
|
||||
// extract the stInternalSolid surfaces that might be transformed into bridges
|
||||
Polygons internal_solid;
|
||||
layerm->fill_surfaces.filter_by_type(stInternal | stSolid, &internal_solid);
|
||||
layerm->fill_surfaces.filter_by_type((stInternal | stSolid), &internal_solid);
|
||||
if (internal_solid.empty()) continue;
|
||||
|
||||
// check whether we should bridge or not according to density
|
||||
@ -497,10 +497,10 @@ PrintObject::bridge_over_infill()
|
||||
}
|
||||
|
||||
for (ExPolygons::const_iterator ex = to_bridge.begin(); ex != to_bridge.end(); ++ex)
|
||||
new_surfaces.push_back(Surface(stInternal | stBridge, *ex));
|
||||
new_surfaces.push_back(Surface( (stInternal | stBridge), *ex));
|
||||
|
||||
for (ExPolygons::const_iterator ex = not_to_bridge.begin(); ex != not_to_bridge.end(); ++ex)
|
||||
new_surfaces.push_back(Surface(stInternal | stSolid, *ex));
|
||||
new_surfaces.push_back(Surface( (stInternal | stSolid), *ex));
|
||||
|
||||
layerm->fill_surfaces.surfaces = new_surfaces;
|
||||
}
|
||||
@ -1545,7 +1545,7 @@ PrintObject::_discover_neighbor_horizontal_shells(LayerRegion* layerm, const siz
|
||||
// intersections have contours and holes
|
||||
Polygons new_internal_solid = intersection(
|
||||
solid,
|
||||
to_polygons(neighbor_fill_surfaces.filter_by_type({stInternal, stInternal | stSolid})),
|
||||
to_polygons(neighbor_fill_surfaces.filter_by_type({ (stInternal, stInternal) | stSolid})),
|
||||
true
|
||||
);
|
||||
if (new_internal_solid.empty()) {
|
||||
@ -1636,7 +1636,7 @@ PrintObject::_discover_neighbor_horizontal_shells(LayerRegion* layerm, const siz
|
||||
neighbor_layerm->fill_surfaces.append(internal, stInternal);
|
||||
|
||||
// assign new internal-solid surfaces to layer
|
||||
neighbor_layerm->fill_surfaces.append(internal_solid, stInternal | stSolid);
|
||||
neighbor_layerm->fill_surfaces.append(internal_solid, (stInternal | stSolid));
|
||||
|
||||
// assign top and bottom surfaces to layer
|
||||
SurfaceCollection tmp_coll;
|
||||
@ -1729,10 +1729,10 @@ PrintObject::clip_fill_surfaces()
|
||||
if (layerm->region()->config.fill_density.value == 0)
|
||||
continue;
|
||||
|
||||
Polygons internal{ to_polygons(layerm->fill_surfaces.filter_by_type({ stInternal, stInternal | stVoid })) };
|
||||
layerm->fill_surfaces.remove_types({ stInternal, stInternal | stVoid });
|
||||
Polygons internal{ to_polygons(layerm->fill_surfaces.filter_by_type({ stInternal, (stInternal | stVoid) })) };
|
||||
layerm->fill_surfaces.remove_types({ stInternal, (stInternal | stVoid) });
|
||||
layerm->fill_surfaces.append(intersection_ex(internal, upper_internal, true), stInternal);
|
||||
layerm->fill_surfaces.append(diff_ex (internal, upper_internal, true), stInternal | stVoid);
|
||||
layerm->fill_surfaces.append(diff_ex (internal, upper_internal, true), (stInternal | stVoid));
|
||||
|
||||
// If there are voids it means that our internal infill is not adjacent to
|
||||
// perimeters. In this case it would be nice to add a loop around infill to
|
||||
|
Loading…
x
Reference in New Issue
Block a user