Salome HOME
projects
/
modules
/
geom.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Mantis issue 0020998: EDF 1572 GEOM: Some limitations to the PipeTShape.
[modules/geom.git]
/
src
/
GEOMImpl
/
GEOMImpl_IGroupOperations.cxx
diff --git
a/src/GEOMImpl/GEOMImpl_IGroupOperations.cxx
b/src/GEOMImpl/GEOMImpl_IGroupOperations.cxx
index b9734d9c4c14c90770c285bcc62edc4bc1d5fd65..cf81ed23c84d85a8e4b2e4748f05b2f233549665 100644
(file)
--- a/
src/GEOMImpl/GEOMImpl_IGroupOperations.cxx
+++ b/
src/GEOMImpl/GEOMImpl_IGroupOperations.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-20
08
CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-20
10
CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@
-146,8
+146,8
@@
void GEOMImpl_IGroupOperations::AddObject(Handle(GEOM_Object) theGroup, int theS
for(Standard_Integer i = 1; i<=aLength; i++) {
aNewSeq->SetValue(i, aSeq->Value(i));
if(aSeq->Value(i) == theSubShapeID) {
for(Standard_Integer i = 1; i<=aLength; i++) {
aNewSeq->SetValue(i, aSeq->Value(i));
if(aSeq->Value(i) == theSubShapeID) {
- SetErrorCode(ALREADY_PRESENT);
- return; //
+
SetErrorCode(ALREADY_PRESENT);
+
return; //
}
}
aNewSeq->SetValue(aLength+1, theSubShapeID);
}
}
aNewSeq->SetValue(aLength+1, theSubShapeID);
@@
-249,7
+249,8
@@
void GEOMImpl_IGroupOperations::UnionList (Handle(GEOM_Object) theGroup,
Standard_Integer aLen = theSubShapes->Length();
if (aLen < 1) {
Standard_Integer aLen = theSubShapes->Length();
if (aLen < 1) {
- SetErrorCode("The list is empty");
+ //SetErrorCode("The list is empty");
+ SetErrorCode(OK);
return;
}
return;
}
@@
-567,13
+568,17
@@
void GEOMImpl_IGroupOperations::UnionIDs (Handle(GEOM_Object) theGroup,
TopTools_IndexedMapOfShape mapIndices;
TopExp::MapShapes(aMainShape, mapIndices);
TopTools_IndexedMapOfShape mapIndices;
TopExp::MapShapes(aMainShape, mapIndices);
+ // Get group type
+ TopAbs_ShapeEnum aType = GetType(theGroup);
+
// Get IDs of sub-shapes to add
Standard_Integer i, new_id;
for (i = 1; i <= aLen; i++) {
new_id = theSubShapes->Value(i);
if (0 < new_id && new_id <= mapIndices.Extent()) {
// Get IDs of sub-shapes to add
Standard_Integer i, new_id;
for (i = 1; i <= aLen; i++) {
new_id = theSubShapes->Value(i);
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);
}
}