mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-28 18:30:35 +05:00
PAL13139 (Corrupted reading of groups at import of MED files in Post-Pro)
Do not create families and groups of all entities if there are no such entities in the mesh
This commit is contained in:
parent
bafd3391e9
commit
65b106175d
@ -295,17 +295,21 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
|
|||||||
|
|
||||||
// Storing SMDS groups and sub-meshes
|
// Storing SMDS groups and sub-meshes
|
||||||
//-----------------------------------
|
//-----------------------------------
|
||||||
int myNodesDefaultFamilyId = 0;
|
int myNodesDefaultFamilyId = 0;
|
||||||
int myEdgesDefaultFamilyId = 0;
|
int myEdgesDefaultFamilyId = 0;
|
||||||
int myFacesDefaultFamilyId = 0;
|
int myFacesDefaultFamilyId = 0;
|
||||||
int myVolumesDefaultFamilyId = 0;
|
int myVolumesDefaultFamilyId = 0;
|
||||||
if (myDoGroupOfNodes)
|
int nbNodes = myMesh->NbNodes();
|
||||||
|
int nbEdges = myMesh->NbEdges();
|
||||||
|
int nbFaces = myMesh->NbFaces();
|
||||||
|
int nbVolumes = myMesh->NbVolumes();
|
||||||
|
if (myDoGroupOfNodes && nbNodes)
|
||||||
myNodesDefaultFamilyId = REST_NODES_FAMILY;
|
myNodesDefaultFamilyId = REST_NODES_FAMILY;
|
||||||
if (myDoGroupOfEdges)
|
if (myDoGroupOfEdges && nbEdges)
|
||||||
myEdgesDefaultFamilyId = REST_EDGES_FAMILY;
|
myEdgesDefaultFamilyId = REST_EDGES_FAMILY;
|
||||||
if (myDoGroupOfFaces)
|
if (myDoGroupOfFaces && nbFaces)
|
||||||
myFacesDefaultFamilyId = REST_FACES_FAMILY;
|
myFacesDefaultFamilyId = REST_FACES_FAMILY;
|
||||||
if (myDoGroupOfVolumes)
|
if (myDoGroupOfVolumes && nbVolumes)
|
||||||
myVolumesDefaultFamilyId = REST_VOLUMES_FAMILY;
|
myVolumesDefaultFamilyId = REST_VOLUMES_FAMILY;
|
||||||
|
|
||||||
MESSAGE("Perform - aFamilyInfo");
|
MESSAGE("Perform - aFamilyInfo");
|
||||||
@ -314,11 +318,17 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
|
|||||||
if (myAllSubMeshes) {
|
if (myAllSubMeshes) {
|
||||||
aFamilies = DriverMED_Family::MakeFamilies
|
aFamilies = DriverMED_Family::MakeFamilies
|
||||||
(myMesh->SubMeshes(), myGroups,
|
(myMesh->SubMeshes(), myGroups,
|
||||||
myDoGroupOfNodes, myDoGroupOfEdges, myDoGroupOfFaces, myDoGroupOfVolumes);
|
myDoGroupOfNodes && nbNodes,
|
||||||
|
myDoGroupOfEdges && nbEdges,
|
||||||
|
myDoGroupOfFaces && nbFaces,
|
||||||
|
myDoGroupOfVolumes && nbVolumes);
|
||||||
} else {
|
} else {
|
||||||
aFamilies = DriverMED_Family::MakeFamilies
|
aFamilies = DriverMED_Family::MakeFamilies
|
||||||
(mySubMeshes, myGroups,
|
(mySubMeshes, myGroups,
|
||||||
myDoGroupOfNodes, myDoGroupOfEdges, myDoGroupOfFaces, myDoGroupOfVolumes);
|
myDoGroupOfNodes && nbNodes,
|
||||||
|
myDoGroupOfEdges && nbEdges,
|
||||||
|
myDoGroupOfFaces && nbFaces,
|
||||||
|
myDoGroupOfVolumes && nbVolumes);
|
||||||
}
|
}
|
||||||
list<DriverMED_FamilyPtr>::iterator aFamsIter = aFamilies.begin();
|
list<DriverMED_FamilyPtr>::iterator aFamsIter = aFamilies.begin();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user