mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0026682: TopExp::MapShapesAndAncestors() will build map with duplicated ancestors.
The new method TopExp::MapShapesAndUniqueAncestors has been implemented, which excludes duplication of ancestors in the list items. The optional Boolean argument 'useOrientation' of this method points whether two same shapes with different orientation will be considered equal. OCCT code has been inspected and MapShapesAndAncestors has been replaced with MapShapesAndUniqueAncestors where it is necessary.
This commit is contained in:
@@ -1134,11 +1134,7 @@ static void CheckSharedVertices(const TopTools_SequenceOfShape& theSeqEdges,
|
||||
for (Standard_Integer k = 1; k <= SeqVertexes.Length()/* && !IsSharedVertexPresent*/; k++ )
|
||||
{
|
||||
const TopTools_ListOfShape& ListEdgesV1 = theMapEdgesVertex.FindFromKey(SeqVertexes(k));
|
||||
TopTools_MapOfShape aMapOfEdges;
|
||||
TopTools_ListIteratorOfListOfShape iter(ListEdgesV1);
|
||||
for (; iter.More(); iter.Next())
|
||||
aMapOfEdges.Add(iter.Value());
|
||||
if (aMapOfEdges.Extent() > 2 || theMapKeepShape.Contains(SeqVertexes(k)))
|
||||
if (ListEdgesV1.Extent() > 2 || theMapKeepShape.Contains(SeqVertexes(k)))
|
||||
theShareVertMap.Add(SeqVertexes(k));
|
||||
}
|
||||
//return theShareVertMap.IsEmpty() ? false : true;
|
||||
@@ -1832,7 +1828,7 @@ void ShapeUpgrade_UnifySameDomain::UnifyEdges()
|
||||
|
||||
// creating map of vertex edges
|
||||
TopTools_IndexedDataMapOfShapeListOfShape aMapEdgesVertex;
|
||||
TopExp::MapShapesAndAncestors(myShape, TopAbs_VERTEX, TopAbs_EDGE, aMapEdgesVertex);
|
||||
TopExp::MapShapesAndUniqueAncestors(myShape, TopAbs_VERTEX, TopAbs_EDGE, aMapEdgesVertex);
|
||||
|
||||
//Handle(ShapeBuild_ReShape) aContext = new ShapeBuild_ReShape;
|
||||
TopoDS_Shape aRes = myShape;
|
||||
|
Reference in New Issue
Block a user