mirror of
https://github.com/QIDITECH/QIDISlicer.git
synced 2026-01-30 15:38:43 +03:00
Merge branch 'master' of https://github.com/QIDITECH/QIDISlicer
This commit is contained in:
@@ -616,14 +616,14 @@ Surfaces expand_bridges_detect_orientations(Surfaces &
|
||||
}
|
||||
|
||||
//w36
|
||||
static Surfaces expand_merge_surfaces(Surfaces & surfaces,
|
||||
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.)
|
||||
const double bridge_angle )
|
||||
{
|
||||
using namespace Slic3r::Algorithm;
|
||||
|
||||
|
||||
@@ -205,23 +205,44 @@ struct ExpansionZone {
|
||||
* detect bridges.
|
||||
* Trim "shells" by the expanded bridges.
|
||||
*/
|
||||
Surfaces expand_bridges_detect_orientations(
|
||||
// w36
|
||||
/* 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.
|
||||
*/
|
||||
Surfaces expand_merge_surfaces(
|
||||
|
||||
// w36
|
||||
/* 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.);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -75,13 +75,26 @@ struct LayerRegionFixture {
|
||||
TEST_CASE_METHOD(LayerRegionFixture, "test the surface expansion", "[LayerRegion]") {
|
||||
const double custom_angle{1.234f};
|
||||
|
||||
const Surfaces result{expand_merge_surfaces(
|
||||
// w36
|
||||
/* 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)},
|
||||
@@ -112,9 +125,13 @@ 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,
|
||||
expansion_zones,
|
||||
shells,
|
||||
expansion_params_into_solid_infill,
|
||||
sparse,
|
||||
expansion_params_into_sparse_infill,
|
||||
closing_radius
|
||||
)};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user