SMDS_MeshNode * node=new SMDS_MeshNode(x, y, z);
myNodes.Add(node);
myNodeIDFactory->BindID(ID,node);
+ myInfo.myNbNodes++;
return node;
}else
return NULL;
node1->AddInverseElement(edge);
node2->AddInverseElement(edge);
myEdges.Add(edge);
+ myInfo.myNbEdges++;
return edge;
}
else {
CheckMemory();
SMDS_MeshFace * face = new SMDS_FaceOfEdges(e1,e2,e3);
myFaces.Add(face);
+ myInfo.myNbTriangles++;
if (!registerElement(ID, face)) {
RemoveElement(face, false);
CheckMemory();
SMDS_MeshFace * face = new SMDS_FaceOfEdges(e1,e2,e3,e4);
myFaces.Add(face);
+ myInfo.myNbQuadrangles++;
if (!registerElement(ID, face))
{
SMDS_MeshFace * f4=FindFaceOrCreate(n2,n3,n4);
volume=new SMDS_VolumeOfFaces(f1,f2,f3,f4);
myVolumes.Add(volume);
+ myInfo.myNbTetras++;
}
else if(hasConstructionEdges()) {
MESSAGE("Error : Not implemented");
else {
volume=new SMDS_VolumeOfNodes(n1,n2,n3,n4);
myVolumes.Add(volume);
+ myInfo.myNbTetras++;
}
if (!registerElement(ID, volume)) {
SMDS_MeshFace * f4=FindFaceOrCreate(n3,n4,n5);
volume=new SMDS_VolumeOfFaces(f1,f2,f3,f4);
myVolumes.Add(volume);
+ myInfo.myNbPyramids++;
}
else if(hasConstructionEdges()) {
MESSAGE("Error : Not implemented");
else {
volume=new SMDS_VolumeOfNodes(n1,n2,n3,n4,n5);
myVolumes.Add(volume);
+ myInfo.myNbPyramids++;
}
if (!registerElement(ID, volume)) {
SMDS_MeshFace * f5=FindFaceOrCreate(n3,n6,n4,n1);
volume=new SMDS_VolumeOfFaces(f1,f2,f3,f4,f5);
myVolumes.Add(volume);
+ myInfo.myNbPrisms++;
}
else if(hasConstructionEdges()) {
MESSAGE("Error : Not implemented");
else {
volume=new SMDS_VolumeOfNodes(n1,n2,n3,n4,n5,n6);
myVolumes.Add(volume);
+ myInfo.myNbPrisms++;
}
if (!registerElement(ID, volume)) {
SMDS_MeshFace * f6=FindFaceOrCreate(n3,n4,n8,n7);
volume=new SMDS_VolumeOfFaces(f1,f2,f3,f4,f5,f6);
myVolumes.Add(volume);
+ myInfo.myNbHexas++;
}
else if(hasConstructionEdges()) {
MESSAGE("Error : Not implemented");
// volume=new SMDS_HexahedronOfNodes(n1,n2,n3,n4,n5,n6,n7,n8);
volume=new SMDS_VolumeOfNodes(n1,n2,n3,n4,n5,n6,n7,n8);
myVolumes.Add(volume);
+ myInfo.myNbHexas++;
}
if (!registerElement(ID, volume)) {
CheckMemory();
SMDS_MeshVolume * volume = new SMDS_VolumeOfFaces(f1,f2,f3,f4);
myVolumes.Add(volume);
+ myInfo.myNbTetras++;
if (!registerElement(ID, volume)) {
RemoveElement(volume, false);
CheckMemory();
SMDS_MeshVolume * volume = new SMDS_VolumeOfFaces(f1,f2,f3,f4,f5);
myVolumes.Add(volume);
+ myInfo.myNbPyramids++;
if (!registerElement(ID, volume)) {
RemoveElement(volume, false);
CheckMemory();
SMDS_MeshVolume * volume = new SMDS_VolumeOfFaces(f1,f2,f3,f4,f5,f6);
myVolumes.Add(volume);
+ myInfo.myNbPrisms++;
if (!registerElement(ID, volume)) {
RemoveElement(volume, false);
if ( !nodes[ i ] ) return 0;
face = new SMDS_PolygonalFaceOfNodes(nodes);
myFaces.Add(face);
+ myInfo.myNbPolygons++;
}
if (!registerElement(ID, face)) {
if ( !nodes[ i ] ) return 0;
volume = new SMDS_PolyhedralVolumeOfNodes(nodes, quantities);
myVolumes.Add(volume);
+ myInfo.myNbPolyhedrons++;
}
if (!registerElement(ID, volume)) {
{
if ( !node1 || !node2 || !node3) return 0;
CheckMemory();
- if(hasConstructionEdges())
- {
- SMDS_MeshEdge *edge1, *edge2, *edge3;
- edge1=FindEdgeOrCreate(node1,node2);
- edge2=FindEdgeOrCreate(node2,node3);
- edge3=FindEdgeOrCreate(node3,node1);
-
- SMDS_MeshFace * face = new SMDS_FaceOfEdges(edge1,edge2,edge3);
- myFaces.Add(face);
- return face;
- }
- else
- {
- SMDS_MeshFace * face = new SMDS_FaceOfNodes(node1,node2,node3);
- myFaces.Add(face);
- return face;
- }
+ if(hasConstructionEdges())
+ {
+ SMDS_MeshEdge *edge1, *edge2, *edge3;
+ edge1=FindEdgeOrCreate(node1,node2);
+ edge2=FindEdgeOrCreate(node2,node3);
+ edge3=FindEdgeOrCreate(node3,node1);
+
+ SMDS_MeshFace * face = new SMDS_FaceOfEdges(edge1,edge2,edge3);
+ myFaces.Add(face);
+ return face;
+ }
+ else
+ {
+ SMDS_MeshFace * face = new SMDS_FaceOfNodes(node1,node2,node3);
+ myFaces.Add(face);
+ return face;
+ }
+ myInfo.myNbTriangles++;
}
///////////////////////////////////////////////////////////////////////////////
{
if ( !node1 || !node2 || !node3 || !node4 ) return 0;
CheckMemory();
- if(hasConstructionEdges())
- {
- SMDS_MeshEdge *edge1, *edge2, *edge3, *edge4;
- edge1=FindEdgeOrCreate(node1,node2);
- edge2=FindEdgeOrCreate(node2,node3);
- edge3=FindEdgeOrCreate(node3,node4);
- edge4=FindEdgeOrCreate(node4,node1);
-
- SMDS_MeshFace * face = new SMDS_FaceOfEdges(edge1,edge2,edge3,edge4);
- myFaces.Add(face);
- return face;
- }
- else
- {
- SMDS_MeshFace * face = new SMDS_FaceOfNodes(node1,node2,node3,node4);
- myFaces.Add(face);
- return face;
- }
+ if(hasConstructionEdges())
+ {
+ SMDS_MeshEdge *edge1, *edge2, *edge3, *edge4;
+ edge1=FindEdgeOrCreate(node1,node2);
+ edge2=FindEdgeOrCreate(node2,node3);
+ edge3=FindEdgeOrCreate(node3,node4);
+ edge4=FindEdgeOrCreate(node4,node1);
+
+ SMDS_MeshFace * face = new SMDS_FaceOfEdges(edge1,edge2,edge3,edge4);
+ myFaces.Add(face);
+ return face;
+ }
+ else
+ {
+ SMDS_MeshFace * face = new SMDS_FaceOfNodes(node1,node2,node3,node4);
+ myFaces.Add(face);
+ return face;
+ }
+ myInfo.myNbTriangles++;
}
///////////////////////////////////////////////////////////////////////////////
CheckMemory();
toReturn=new SMDS_MeshEdge(node1,node2);
myEdges.Add(toReturn);
- }
+ myInfo.myNbEdges++;
+ }
return toReturn;
}
case SMDSAbs_Edge:
myEdges.Remove(static_cast<SMDS_MeshEdge*>
(const_cast<SMDS_MeshElement*>(*it)));
+ myInfo.RemoveEdge(*it);
break;
case SMDSAbs_Face:
myFaces.Remove(static_cast<SMDS_MeshFace*>
(const_cast<SMDS_MeshElement*>(*it)));
+ myInfo.RemoveFace(*it);
break;
case SMDSAbs_Volume:
myVolumes.Remove(static_cast<SMDS_MeshVolume*>
(const_cast<SMDS_MeshElement*>(*it)));
+ myInfo.RemoveVolume(*it);
break;
}
//MESSAGE( "SMDS: RM elem " << (*it)->GetID() );
//MESSAGE( "SMDS: RM node " << (*it)->GetID() );
myNodes.Remove(static_cast<SMDS_MeshNode*>
(const_cast<SMDS_MeshElement*>(*it)));
+ myInfo.myNbNodes--;
myNodeIDFactory->ReleaseID((*it)->GetID());
removedNodes.push_back( (*it) );
delete *it;
SMDS_ElemIteratorPtr itFe = n->GetInverseElementIterator();
if (!itFe->more()) { // free node
myNodes.Remove(const_cast<SMDS_MeshNode*>(n));
+ myInfo.myNbNodes--;
myNodeIDFactory->ReleaseID(elem->GetID());
delete elem;
}
case SMDSAbs_Edge:
myEdges.Remove(static_cast<SMDS_MeshEdge*>
(const_cast<SMDS_MeshElement*>(elem)));
+ myInfo.RemoveEdge(elem);
break;
case SMDSAbs_Face:
myFaces.Remove(static_cast<SMDS_MeshFace*>
(const_cast<SMDS_MeshElement*>(elem)));
+ myInfo.RemoveFace(elem);
break;
case SMDSAbs_Volume:
myVolumes.Remove(static_cast<SMDS_MeshVolume*>
(const_cast<SMDS_MeshElement*>(elem)));
+ myInfo.RemoveVolume(elem);
break;
default:
break;
node2->AddInverseElement(edge);
node12->AddInverseElement(edge);
myEdges.Add(edge);
+ myInfo.myNbQuadEdges++;
return edge;
}
else {
SMDS_QuadraticFaceOfNodes* face =
new SMDS_QuadraticFaceOfNodes(n1,n2,n3,n12,n23,n31);
myFaces.Add(face);
+ myInfo.myNbQuadTriangles++;
if (!registerElement(ID, face)) {
RemoveElement(face, false);
SMDS_QuadraticFaceOfNodes* face =
new SMDS_QuadraticFaceOfNodes(n1,n2,n3,n4,n12,n23,n34,n41);
myFaces.Add(face);
+ myInfo.myNbQuadQuadrangles++;
if (!registerElement(ID, face)) {
RemoveElement(face, false);
SMDS_QuadraticVolumeOfNodes * volume =
new SMDS_QuadraticVolumeOfNodes(n1,n2,n3,n4,n12,n23,n31,n14,n24,n34);
myVolumes.Add(volume);
+ myInfo.myNbQuadTetras++;
if (!registerElement(ID, volume)) {
RemoveElement(volume, false);
new SMDS_QuadraticVolumeOfNodes(n1,n2,n3,n4,n5,n12,n23,
n34,n41,n15,n25,n35,n45);
myVolumes.Add(volume);
+ myInfo.myNbQuadPyramids++;
if (!registerElement(ID, volume)) {
RemoveElement(volume, false);
new SMDS_QuadraticVolumeOfNodes(n1,n2,n3,n4,n5,n6,n12,n23,n31,
n45,n56,n64,n14,n25,n36);
myVolumes.Add(volume);
+ myInfo.myNbQuadPrisms++;
if (!registerElement(ID, volume)) {
RemoveElement(volume, false);
new SMDS_QuadraticVolumeOfNodes(n1,n2,n3,n4,n5,n6,n7,n8,n12,n23,n34,n41,
n56,n67,n78,n85,n15,n26,n37,n48);
myVolumes.Add(volume);
+ myInfo.myNbQuadHexas++;
if (!registerElement(ID, volume)) {
RemoveElement(volume, false);