mirror of
https://github.com/QIDITECH/QIDISlicer.git
synced 2026-01-30 15:38:43 +03:00
remove old code
This commit is contained in:
@@ -618,14 +618,14 @@ Surfaces expand_bridges_detect_orientations(Surfaces &
|
||||
}
|
||||
|
||||
//w36
|
||||
Surfaces expand_merge_surfaces(Surfaces & surfaces,
|
||||
static Surfaces expand_merge_surfaces(Surfaces & surfaces,
|
||||
SurfaceType surface_type,
|
||||
ExPolygons & shells,
|
||||
const Algorithm::RegionExpansionParameters &expansion_params_into_solid_infill,
|
||||
ExPolygons & sparse,
|
||||
const Algorithm::RegionExpansionParameters &expansion_params_into_sparse_infill,
|
||||
const float closing_radius,
|
||||
const double bridge_angle )
|
||||
const double bridge_angle = -1.)
|
||||
{
|
||||
using namespace Slic3r::Algorithm;
|
||||
|
||||
|
||||
@@ -205,44 +205,23 @@ struct ExpansionZone {
|
||||
* detect bridges.
|
||||
* Trim "shells" by the expanded bridges.
|
||||
*/
|
||||
// w36
|
||||
/* Surfaces expand_bridges_detect_orientations(
|
||||
Surfaces expand_bridges_detect_orientations(
|
||||
Surfaces &surfaces,
|
||||
std::vector<ExpansionZone>& expansion_zones,
|
||||
const float closing_radius
|
||||
);*/
|
||||
|
||||
//w36
|
||||
Surfaces expand_bridges_detect_orientations(Surfaces & surfaces,
|
||||
ExPolygons & shells,
|
||||
const Algorithm::RegionExpansionParameters &expansion_params_into_solid_infill,
|
||||
ExPolygons & sparse,
|
||||
const Algorithm::RegionExpansionParameters &expansion_params_into_sparse_infill,
|
||||
const float closing_radius);
|
||||
);
|
||||
|
||||
/**
|
||||
* Extract bridging surfaces from "surfaces", expand them into "shells" using expansion_params.
|
||||
* Trim "shells" by the expanded bridges.
|
||||
*/
|
||||
|
||||
// w36
|
||||
/* Surfaces expand_merge_surfaces(
|
||||
Surfaces expand_merge_surfaces(
|
||||
Surfaces &surfaces,
|
||||
SurfaceType surface_type,
|
||||
std::vector<ExpansionZone>& expansion_zones,
|
||||
const float closing_radius,
|
||||
const double bridge_angle = -1
|
||||
);*/
|
||||
|
||||
// w36
|
||||
Surfaces expand_merge_surfaces(Surfaces & surfaces,
|
||||
SurfaceType surface_type,
|
||||
ExPolygons & shells,
|
||||
const Algorithm::RegionExpansionParameters &expansion_params_into_solid_infill,
|
||||
ExPolygons & sparse,
|
||||
const Algorithm::RegionExpansionParameters &expansion_params_into_sparse_infill,
|
||||
const float closing_radius,
|
||||
const double bridge_angle = -1.);
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -2370,17 +2370,11 @@ void PrintObject::bridge_over_infill()
|
||||
Polygons lightning_area;
|
||||
Polygons expansion_area;
|
||||
Polygons total_fill_area;
|
||||
//w35
|
||||
Polygons top_area;
|
||||
for (const LayerRegion *region : layer->regions()) {
|
||||
Polygons internal_polys = to_polygons(region->fill_surfaces().filter_by_types({stInternal, stInternalSolid}));
|
||||
expansion_area.insert(expansion_area.end(), internal_polys.begin(), internal_polys.end());
|
||||
Polygons fill_polys = to_polygons(region->fill_expolygons());
|
||||
total_fill_area.insert(total_fill_area.end(), fill_polys.begin(), fill_polys.end());
|
||||
//w35
|
||||
Polygons top_polys = to_polygons(region->fill_surfaces().filter_by_type(stTop));
|
||||
top_area.insert(top_area.end(), top_polys.begin(), top_polys.end());
|
||||
|
||||
if (region->region().config().fill_pattern == ipLightning) {
|
||||
Polygons l = to_polygons(region->fill_surfaces().filter_by_type(stInternal));
|
||||
lightning_area.insert(lightning_area.end(), l.begin(), l.end());
|
||||
@@ -2459,21 +2453,12 @@ void PrintObject::bridge_over_infill()
|
||||
bridging_area = construct_anchored_polygon(area_to_be_bridge, to_lines(boundary_plines), flow, bridging_angle);
|
||||
}
|
||||
}
|
||||
//w35
|
||||
bridging_area = opening(bridging_area, flow.scaled_spacing());
|
||||
bridging_area = closing(bridging_area, flow.scaled_spacing());
|
||||
bridging_area = intersection(bridging_area, limiting_area);
|
||||
bridging_area = intersection(bridging_area, total_fill_area);
|
||||
bridging_area = diff(bridging_area, top_area);
|
||||
bridging_area = opening(bridging_area, flow.scaled_spacing());
|
||||
bridging_area = closing(bridging_area, flow.scaled_spacing());
|
||||
expansion_area = diff(expansion_area, bridging_area);
|
||||
|
||||
//bridging_area = opening(bridging_area, flow.scaled_spacing());
|
||||
//bridging_area = closing(bridging_area, flow.scaled_spacing());
|
||||
//bridging_area = intersection(bridging_area, limiting_area);
|
||||
//bridging_area = intersection(bridging_area, total_fill_area);
|
||||
//expansion_area = diff(expansion_area, bridging_area);
|
||||
|
||||
bridging_area = opening(bridging_area, flow.scaled_spacing());
|
||||
bridging_area = closing(bridging_area, flow.scaled_spacing());
|
||||
bridging_area = intersection(bridging_area, limiting_area);
|
||||
bridging_area = intersection(bridging_area, total_fill_area);
|
||||
expansion_area = diff(expansion_area, bridging_area);
|
||||
|
||||
#ifdef DEBUG_BRIDGE_OVER_INFILL
|
||||
debug_draw(std::to_string(lidx) + "_" + std::to_string(cluster_idx) + "_" + std::to_string(job_idx) + "_" + "_expanded_bridging" + std::to_string(r),
|
||||
|
||||
@@ -75,26 +75,13 @@ struct LayerRegionFixture {
|
||||
TEST_CASE_METHOD(LayerRegionFixture, "test the surface expansion", "[LayerRegion]") {
|
||||
const double custom_angle{1.234f};
|
||||
|
||||
// w36
|
||||
/* const Surfaces result{expand_merge_surfaces(
|
||||
const Surfaces result{expand_merge_surfaces(
|
||||
surfaces, stBottomBridge,
|
||||
expansion_zones,
|
||||
closing_radius,
|
||||
custom_angle
|
||||
)};*/
|
||||
|
||||
// w36
|
||||
const Surfaces result{expand_merge_surfaces(
|
||||
surfaces, stBottomBridge,
|
||||
shells,
|
||||
expansion_params_into_solid_infill,
|
||||
sparse,
|
||||
expansion_params_into_sparse_infill,
|
||||
closing_radius
|
||||
)};
|
||||
|
||||
|
||||
|
||||
if constexpr (export_svgs) {
|
||||
SVG svg("general_expansion.svg", BoundingBox{
|
||||
Point{scaled(-3.0), scaled(-1.0)},
|
||||
@@ -125,13 +112,9 @@ TEST_CASE_METHOD(LayerRegionFixture, "test the surface expansion", "[LayerRegion
|
||||
}
|
||||
|
||||
TEST_CASE_METHOD(LayerRegionFixture, "test the bridge expansion with the bridge angle detection", "[LayerRegion]") {
|
||||
// w36
|
||||
Surfaces result{expand_bridges_detect_orientations(
|
||||
surfaces,
|
||||
shells,
|
||||
expansion_params_into_solid_infill,
|
||||
sparse,
|
||||
expansion_params_into_sparse_infill,
|
||||
expansion_zones,
|
||||
closing_radius
|
||||
)};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user