mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-01 20:30:35 +05:00
fix GetPreviewData() for the case of only nodes in edition result
This commit is contained in:
parent
af68a622d3
commit
2949f1214b
@ -533,9 +533,6 @@ SMESH::MeshPreviewStruct* SMESH_MeshEditor_i::GetPreviewData()
|
|||||||
else {
|
else {
|
||||||
aMeshDS = getEditor().GetMeshDS();
|
aMeshDS = getEditor().GetMeshDS();
|
||||||
}
|
}
|
||||||
int nbEdges = aMeshDS->NbEdges();
|
|
||||||
int nbFaces = aMeshDS->NbFaces();
|
|
||||||
int nbVolum = aMeshDS->NbVolumes();
|
|
||||||
myPreviewData = new SMESH::MeshPreviewStruct();
|
myPreviewData = new SMESH::MeshPreviewStruct();
|
||||||
myPreviewData->nodesXYZ.length(aMeshDS->NbNodes());
|
myPreviewData->nodesXYZ.length(aMeshDS->NbNodes());
|
||||||
|
|
||||||
@ -545,14 +542,15 @@ SMESH::MeshPreviewStruct* SMESH_MeshEditor_i::GetPreviewData()
|
|||||||
if (TPreviewMesh * aPreviewMesh = dynamic_cast< TPreviewMesh* >( getEditor().GetMesh() )) {
|
if (TPreviewMesh * aPreviewMesh = dynamic_cast< TPreviewMesh* >( getEditor().GetMesh() )) {
|
||||||
previewType = aPreviewMesh->myPreviewType;
|
previewType = aPreviewMesh->myPreviewType;
|
||||||
switch ( previewType ) {
|
switch ( previewType ) {
|
||||||
case SMDSAbs_Edge : nbFaces = nbVolum = 0; break;
|
case SMDSAbs_Edge : break;
|
||||||
case SMDSAbs_Face : nbEdges = nbVolum = 0; break;
|
case SMDSAbs_Face : break;
|
||||||
case SMDSAbs_Volume: nbEdges = nbFaces = 0; break;
|
case SMDSAbs_Volume: break;
|
||||||
default:;
|
default:;
|
||||||
|
if ( aMeshDS->GetMeshInfo().NbElements() == 0 ) previewType = SMDSAbs_Node;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
myPreviewData->elementTypes.length(nbEdges + nbFaces + nbVolum);
|
myPreviewData->elementTypes.length( aMeshDS->GetMeshInfo().NbElements( previewType ));
|
||||||
int i = 0, j = 0;
|
int i = 0, j = 0;
|
||||||
SMDS_ElemIteratorPtr itMeshElems = aMeshDS->elementsIterator(previewType);
|
SMDS_ElemIteratorPtr itMeshElems = aMeshDS->elementsIterator(previewType);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user