if (fullyCreatedElement) {
aCreatedElem = theHelper->AddFace( node[0], node[1], node[2], noID, force3d );
// add iElem < aFaceGroupByHybridId.size() to avoid crash if imprinting with hexa core with MeshGems <= 2.4-5
- if ( !aFaceGroupByHybridId.empty() && iElem < aFaceGroupByHybridId.size() && !aFaceGroupByHybridId[iElem].empty() ) {
+ if ( iElem < (int)aFaceGroupByHybridId.size() && !aFaceGroupByHybridId[iElem].empty() ) {
addElemInMeshGroup(theHelper->GetMesh(), aCreatedElem, aFaceGroupByHybridId[iElem], groupsToRemove);
}
// add element in shape for groups on geom to work
elemRet = _enfEdges.insert(make_pair(elem,groupName));
added = added && elemRet.second;
}
- else if (elem->GetType() > SMDSAbs_Edge) {
- SMDS_ElemIteratorPtr it = elem->edgesIterator();
- for (;it->more();) {
- const SMDS_MeshElement* anEdge = it->next();
- elemRet = _enfEdges.insert(make_pair(anEdge,groupName));
- added = added && elemRet.second;
- }
- }
break;
case SMESH::FACE:
if (elem->GetType() == SMDSAbs_Face)
added = added && elemRet.second;
}
}
- else if (elem->GetType() > SMDSAbs_Face) { // Group of faces
- SMDS_ElemIteratorPtr it = elem->facesIterator();
- for (;it->more();) {
- const SMDS_MeshElement* aFace = it->next();
- if (aFace->NbCornerNodes() == 3) {
- elemRet = _enfTriangles.insert(make_pair(aFace,groupName));
- added = added && elemRet.second;
- }
- }
- }
break;
default:
break;
struct TIDMeshIDCompare {
bool operator () (const SMDS_MeshElement* e1, const SMDS_MeshElement* e2) const
- { return e1->getMeshId() == e2->getMeshId() ? e1->GetID() < e2->GetID() : e1->getMeshId() < e2->getMeshId() ; }
+ { return e1->GetMesh() == e2->GetMesh() ? e1->GetID() < e2->GetID() : e1->GetMesh() < e2->GetMesh(); }
};
typedef std::map<const SMDS_MeshElement*, std::string, TIDMeshIDCompare > TIDSortedElemGroupMap;