1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0032561: Modelling Algorithms - UnifySameDomain does nothing while it is expected to union two pairs of faces

Correct method ShapeUpgrade_UnifySameDomain::UnifyFaces: when creating the Edge-Face map of initial shape, count each face only once.
This commit is contained in:
jgv
2021-09-10 19:30:38 +03:00
committed by smoskvin
parent e2d6f0e37a
commit 1e6b2065b5
3 changed files with 25 additions and 3 deletions

View File

@@ -2573,7 +2573,11 @@ void ShapeUpgrade_UnifySameDomain::UnifyFaces()
{
// creating map of edge faces for the whole shape
TopTools_IndexedDataMapOfShapeListOfShape aGMapEdgeFaces;
TopExp::MapShapesAndAncestors(myShape, TopAbs_EDGE, TopAbs_FACE, aGMapEdgeFaces);
TopTools_IndexedMapOfShape aFaceMap;
TopExp::MapShapes (myShape, TopAbs_FACE, aFaceMap);
for (Standard_Integer i = 1; i <= aFaceMap.Extent(); i++)
TopExp::MapShapesAndAncestors (aFaceMap(i), TopAbs_EDGE, TopAbs_FACE, aGMapEdgeFaces);
// unify faces in each shell separately
TopExp_Explorer exps;