mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-19 03:50:33 +05:00
Changes for bug 0020734.
This commit is contained in:
parent
0e70fe931b
commit
25722a6cdd
@ -9928,7 +9928,8 @@ bool SMESH_MeshEditor::Make2DMeshFrom3D()
|
|||||||
SMESHDS_Mesh* aMesh = GetMeshDS();
|
SMESHDS_Mesh* aMesh = GetMeshDS();
|
||||||
if (!aMesh)
|
if (!aMesh)
|
||||||
return false;
|
return false;
|
||||||
bool res = false;
|
//bool res = false;
|
||||||
|
int nbFree = 0, nbExisted = 0, nbCreated = 0;
|
||||||
SMDS_VolumeIteratorPtr vIt = aMesh->volumesIterator();
|
SMDS_VolumeIteratorPtr vIt = aMesh->volumesIterator();
|
||||||
while(vIt->more())
|
while(vIt->more())
|
||||||
{
|
{
|
||||||
@ -9941,6 +9942,7 @@ bool SMESH_MeshEditor::Make2DMeshFrom3D()
|
|||||||
{
|
{
|
||||||
if (!vTool.IsFreeFace(iface))
|
if (!vTool.IsFreeFace(iface))
|
||||||
continue;
|
continue;
|
||||||
|
nbFree++;
|
||||||
vector<const SMDS_MeshNode *> nodes;
|
vector<const SMDS_MeshNode *> nodes;
|
||||||
int nbFaceNodes = vTool.NbFaceNodes(iface);
|
int nbFaceNodes = vTool.NbFaceNodes(iface);
|
||||||
const SMDS_MeshNode** faceNodes = vTool.GetFaceNodes(iface);
|
const SMDS_MeshNode** faceNodes = vTool.GetFaceNodes(iface);
|
||||||
@ -9952,11 +9954,13 @@ bool SMESH_MeshEditor::Make2DMeshFrom3D()
|
|||||||
nodes.push_back(faceNodes[inode]);
|
nodes.push_back(faceNodes[inode]);
|
||||||
|
|
||||||
// add new face based on volume nodes
|
// add new face based on volume nodes
|
||||||
if (aMesh->FindFace( nodes ) )
|
if (aMesh->FindFace( nodes ) ) {
|
||||||
|
nbExisted++;
|
||||||
continue; // face already exsist
|
continue; // face already exsist
|
||||||
|
}
|
||||||
myLastCreatedElems.Append( AddElement(nodes, SMDSAbs_Face, isPoly && iface == 1) );
|
myLastCreatedElems.Append( AddElement(nodes, SMDSAbs_Face, isPoly && iface == 1) );
|
||||||
res = true;
|
nbCreated++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return res;
|
return ( nbFree==(nbExisted+nbCreated) );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user