mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-19 13:40:49 +03:00
0028782: Shape sewing behavior not consistent for the same CAD file
Get rid of iterations on maps with shape key by replacing simple maps with indexed maps. So iteration is done on integer key. The map containers have been updated to insert into them type definitions of key and value. The new methods RemoveKey() and RemoveFromIndex() have been added to indexed [data] map to be able to remove an arbitrary key from the map. All the code in OCCT has been updated where RemoveLast() and Substitute() methods were used to remove a key from indexed [data] map.
This commit is contained in:
@@ -680,13 +680,7 @@ static void RemoveCorks (TopoDS_Shape& S,
|
||||
B.Add(SS,Cork);
|
||||
}
|
||||
else {
|
||||
//Faces.Remove (Cork);
|
||||
//begin instead of Remove//
|
||||
TopoDS_Shape LastShape = Faces(Faces.Extent());
|
||||
Faces.RemoveLast();
|
||||
if (Faces.FindIndex(Cork) != 0)
|
||||
Faces.Substitute(Faces.FindIndex(Cork), LastShape);
|
||||
//end instead of Remove //
|
||||
Faces.RemoveKey(Cork);
|
||||
Faces.Add(Cork); // to reset it with proper orientation.
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user