- // the type of the group is determined by the first element added
- if (myElements.empty()) myType = theElem->GetType();
- else if (theElem->GetType() != myType) {
- MESSAGE("SMDS_MeshGroup::Add : Type Mismatch "<<theElem->GetType()<<"!="<<myType);
- return;
- }
-
- myElements.insert(theElem);
+ // the type of the group is determined by the first element added
+ if (myElements.empty()) {
+ myType = theElem->GetType();
+ }
+ else if (theElem->GetType() != myType) {
+ MESSAGE("SMDS_MeshGroup::Add : Type Mismatch "<<theElem->GetType()<<"!="<<myType);
+ return false;
+ }
+
+ myElements.insert(myElements.end(), theElem);
+ ++myTic;
+
+ return true;