mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-13 01:37:53 -06:00
FDM backend refactoring: Return PrintRegion by reference, not by pointer.
Added PrintRegion hashing.
This commit is contained in:
parent
b8db1922f7
commit
ee15f00574
11 changed files with 71 additions and 62 deletions
|
@ -1251,7 +1251,7 @@ namespace SupportMaterialInternal {
|
|||
// Surface supporting this layer, expanded by 0.5 * nozzle_diameter, as we consider this kind of overhang to be sufficiently supported.
|
||||
Polygons lower_grown_slices = offset(lower_layer_polygons,
|
||||
//FIXME to mimic the decision in the perimeter generator, we should use half the external perimeter width.
|
||||
0.5f * float(scale_(print_config.nozzle_diameter.get_at(layerm->region()->config().perimeter_extruder-1))),
|
||||
0.5f * float(scale_(print_config.nozzle_diameter.get_at(layerm->region().config().perimeter_extruder-1))),
|
||||
SUPPORT_SURFACES_OFFSET_PARAMETERS);
|
||||
// Collect perimeters of this layer.
|
||||
//FIXME split_at_first_point() could split a bridge mid-way
|
||||
|
@ -1637,7 +1637,7 @@ static inline std::pair<PrintObjectSupportMaterial::MyLayer*, PrintObjectSupport
|
|||
if (object_config.thick_bridges && SupportMaterialInternal::has_bridging_extrusions(layer)) {
|
||||
coordf_t bridging_height = 0.;
|
||||
for (const LayerRegion* region : layer.regions())
|
||||
bridging_height += region->region()->bridging_height_avg(print_config);
|
||||
bridging_height += region->region().bridging_height_avg(print_config);
|
||||
bridging_height /= coordf_t(layer.regions().size());
|
||||
coordf_t bridging_print_z = layer.print_z - bridging_height - slicing_params.gap_support_object;
|
||||
if (bridging_print_z >= slicing_params.first_print_layer_height - EPSILON) {
|
||||
|
@ -2764,13 +2764,13 @@ void PrintObjectSupportMaterial::trim_support_layers_by_object(
|
|||
const Layer &object_layer = *object.layers()[i];
|
||||
bool some_region_overlaps = false;
|
||||
for (LayerRegion *region : object_layer.regions()) {
|
||||
coordf_t bridging_height = region->region()->bridging_height_avg(*this->m_print_config);
|
||||
coordf_t bridging_height = region->region().bridging_height_avg(*this->m_print_config);
|
||||
if (object_layer.print_z - bridging_height > support_layer.print_z + gap_extra_above - EPSILON)
|
||||
break;
|
||||
some_region_overlaps = true;
|
||||
polygons_append(polygons_trimming,
|
||||
offset(region->fill_surfaces.filter_by_type(stBottomBridge), gap_xy_scaled, SUPPORT_SURFACES_OFFSET_PARAMETERS));
|
||||
if (region->region()->config().overhangs.value)
|
||||
if (region->region().config().overhangs.value)
|
||||
// Add bridging perimeters.
|
||||
SupportMaterialInternal::collect_bridging_perimeter_areas(region->perimeters, gap_xy_scaled, polygons_trimming);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue