mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-02-22 01:05:36 +05:00
Prevent recording nodes as elements
This commit is contained in:
parent
3f1a249dc8
commit
1e2742728c
@ -71,6 +71,11 @@ void SMESHDS_SubMesh::AddElement(const SMDS_MeshElement * ME)
|
|||||||
{
|
{
|
||||||
if (!IsComplexSubmesh())
|
if (!IsComplexSubmesh())
|
||||||
{
|
{
|
||||||
|
if ( ME->GetType() == SMDSAbs_Node )
|
||||||
|
{
|
||||||
|
AddNode( static_cast< const SMDS_MeshNode* >( ME ));
|
||||||
|
return;
|
||||||
|
}
|
||||||
//MESSAGE("in " << myIndex << " AddElement "<< ME->GetID());
|
//MESSAGE("in " << myIndex << " AddElement "<< ME->GetID());
|
||||||
int oldShapeId = ME->getshapeId();
|
int oldShapeId = ME->getshapeId();
|
||||||
if ( oldShapeId > 0 )
|
if ( oldShapeId > 0 )
|
||||||
@ -160,7 +165,7 @@ void SMESHDS_SubMesh::AddNode(const SMDS_MeshNode * N)
|
|||||||
{
|
{
|
||||||
// MESSAGE("========== AddNode already belonging to other subShape " << N->GetID());
|
// MESSAGE("========== AddNode already belonging to other subShape " << N->GetID());
|
||||||
// OK for vertex nodes
|
// OK for vertex nodes
|
||||||
//this->getParent()->UnSetNodeOnShape(N);
|
throw SALOME_Exception(LOCALIZED("add node in subshape already belonging to a subshape"));
|
||||||
}
|
}
|
||||||
SMDS_MeshNode* node = (SMDS_MeshNode*)(N);
|
SMDS_MeshNode* node = (SMDS_MeshNode*)(N);
|
||||||
node->setShapeId(myIndex);
|
node->setShapeId(myIndex);
|
||||||
|
Loading…
Reference in New Issue
Block a user