mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-11-15 01:58:36 +05:00
IPAL21297: errors for Netgen_1D_2D
In UnionIDs(), check type of a member to add
This commit is contained in:
parent
6f253305f3
commit
debaa376da
@ -567,13 +567,17 @@ void GEOMImpl_IGroupOperations::UnionIDs (Handle(GEOM_Object) theGroup,
|
|||||||
TopTools_IndexedMapOfShape mapIndices;
|
TopTools_IndexedMapOfShape mapIndices;
|
||||||
TopExp::MapShapes(aMainShape, mapIndices);
|
TopExp::MapShapes(aMainShape, mapIndices);
|
||||||
|
|
||||||
|
// Get group type
|
||||||
|
TopAbs_ShapeEnum aType = GetType(theGroup);
|
||||||
|
|
||||||
// Get IDs of sub-shapes to add
|
// Get IDs of sub-shapes to add
|
||||||
Standard_Integer i, new_id;
|
Standard_Integer i, new_id;
|
||||||
for (i = 1; i <= aLen; i++) {
|
for (i = 1; i <= aLen; i++) {
|
||||||
new_id = theSubShapes->Value(i);
|
new_id = theSubShapes->Value(i);
|
||||||
|
|
||||||
if (0 < new_id && new_id <= mapIndices.Extent()) {
|
if (0 < new_id && new_id <= mapIndices.Extent()) {
|
||||||
if (mapIDs.Add(new_id)) {
|
//if (mapIDs.Add(new_id)) { IPAL21297. Why we ignore invalid ids silently?
|
||||||
|
if (mapIDs.Add(new_id) && mapIndices(new_id).ShapeType()==aType ) {
|
||||||
aNewIDs.Append(new_id);
|
aNewIDs.Append(new_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user