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