int nbnode = node.size();
SMESHDS_Mesh* mesh = GetMeshDS();
switch ( type ) {
- case SMDSAbs_0DElement:
- if ( nbnode == 1 )
- if ( ID ) e = mesh->Add0DElementWithID(node[0], ID);
- else e = mesh->Add0DElement (node[0] );
- break;
- case SMDSAbs_Edge:
- if ( nbnode == 2 )
- if ( ID ) e = mesh->AddEdgeWithID(node[0], node[1], ID);
- else e = mesh->AddEdge (node[0], node[1] );
- else if ( nbnode == 3 )
- if ( ID ) e = mesh->AddEdgeWithID(node[0], node[1], node[2], ID);
- else e = mesh->AddEdge (node[0], node[1], node[2] );
- break;
+
case SMDSAbs_Face:
if ( !isPoly ) {
if (nbnode == 3)
else e = mesh->AddPolygonalFace (node );
}
break;
+
case SMDSAbs_Volume:
if ( !isPoly ) {
if (nbnode == 4)
node[12],node[13],node[14],node[15],
node[16],node[17],node[18],node[19] );
}
+ break;
+
+ case SMDSAbs_Edge:
+ if ( nbnode == 2 )
+ if ( ID ) e = mesh->AddEdgeWithID(node[0], node[1], ID);
+ else e = mesh->AddEdge (node[0], node[1] );
+ else if ( nbnode == 3 )
+ if ( ID ) e = mesh->AddEdgeWithID(node[0], node[1], node[2], ID);
+ else e = mesh->AddEdge (node[0], node[1], node[2] );
+ break;
+
+ case SMDSAbs_0DElement:
+ if ( nbnode == 1 )
+ if ( ID ) e = mesh->Add0DElementWithID(node[0], ID);
+ else e = mesh->Add0DElement (node[0] );
+ break;
+
+ case SMDSAbs_Node:
+ if ( ID ) e = mesh->AddNodeWithID(node[0]->X(), node[0]->Y(), node[0]->Z(), ID);
+ else e = mesh->AddNode (node[0]->X(), node[0]->Y(), node[0]->Z());
+ break;
+
+ default:;
}
return e;
}