mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 08:47:52 -06:00
Wrong bridge detection result (FOR TESTING ONLY) (#4678)
Fixed an issue that top surface was treated as internal bridge
This commit is contained in:
parent
95585b3539
commit
ba414bb74a
1 changed files with 5 additions and 1 deletions
|
@ -1982,7 +1982,7 @@ void PrintObject::discover_vertical_shells()
|
||||||
#ifdef DEBUG_BRIDGE_OVER_INFILL
|
#ifdef DEBUG_BRIDGE_OVER_INFILL
|
||||||
template<typename T> void debug_draw(std::string name, const T& a, const T& b, const T& c, const T& d)
|
template<typename T> void debug_draw(std::string name, const T& a, const T& b, const T& c, const T& d)
|
||||||
{
|
{
|
||||||
std::vector<std::string> colors = {"red", "green", "blue", "orange"};
|
std::vector<std::string> colors = {"red", "green", "blue", "orange"};
|
||||||
BoundingBox bbox = get_extents(a);
|
BoundingBox bbox = get_extents(a);
|
||||||
bbox.merge(get_extents(b));
|
bbox.merge(get_extents(b));
|
||||||
bbox.merge(get_extents(c));
|
bbox.merge(get_extents(c));
|
||||||
|
@ -2656,7 +2656,10 @@ 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;
|
||||||
|
Polygons total_top_area;
|
||||||
for (const LayerRegion *region : layer->regions()) {
|
for (const LayerRegion *region : layer->regions()) {
|
||||||
|
Polygons top_polys = to_polygons(region->fill_surfaces.filter_by_types({stTop}));
|
||||||
|
total_top_area.insert(total_top_area.end(), top_polys.begin(), top_polys.end());
|
||||||
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);
|
||||||
|
@ -2746,6 +2749,7 @@ void PrintObject::bridge_over_infill()
|
||||||
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, total_top_area);
|
||||||
expansion_area = diff(expansion_area, bridging_area);
|
expansion_area = diff(expansion_area, bridging_area);
|
||||||
|
|
||||||
#ifdef DEBUG_BRIDGE_OVER_INFILL
|
#ifdef DEBUG_BRIDGE_OVER_INFILL
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue