+ if ( NbVolumes() % CHECKMEMORY_INTERVAL == 0 ) CheckMemory();
+
+ if ( SMDS_MeshCell* cell = myCellFactory->NewCell( ID ))
+ {
+ cell->init( SMDSEntity_Quad_Hexa, /*nbNodes=*/20, n1, n2, n3, n4, n5, n6, n7, n8,
+ n12, n23, n34, n41, n56, n67, n78, n85, n15, n26, n37, n48 );
+ myInfo.myNbQuadHexas++;
+ return static_cast<SMDS_MeshVolume*>( cell );
+ }
+ return 0;
+}
+
+//=======================================================================
+//function : AddVolume
+//purpose :
+//=======================================================================
+SMDS_MeshVolume* SMDS_Mesh::AddVolume(const SMDS_MeshNode * n1,
+ const SMDS_MeshNode * n2,
+ const SMDS_MeshNode * n3,
+ const SMDS_MeshNode * n4,
+ const SMDS_MeshNode * n5,
+ const SMDS_MeshNode * n6,
+ const SMDS_MeshNode * n7,
+ const SMDS_MeshNode * n8,
+ const SMDS_MeshNode * n12,
+ const SMDS_MeshNode * n23,
+ const SMDS_MeshNode * n34,
+ const SMDS_MeshNode * n41,
+ const SMDS_MeshNode * n56,
+ const SMDS_MeshNode * n67,
+ const SMDS_MeshNode * n78,
+ const SMDS_MeshNode * n85,
+ const SMDS_MeshNode * n15,
+ const SMDS_MeshNode * n26,
+ const SMDS_MeshNode * n37,
+ const SMDS_MeshNode * n48,
+ const SMDS_MeshNode * n1234,
+ const SMDS_MeshNode * n1256,
+ const SMDS_MeshNode * n2367,
+ const SMDS_MeshNode * n3478,
+ const SMDS_MeshNode * n1458,
+ const SMDS_MeshNode * n5678,
+ const SMDS_MeshNode * nCenter)
+{
+ return SMDS_Mesh::AddVolumeWithID(n1, n2, n3, n4, n5, n6, n7, n8, n12, n23, n34, n41,
+ n56, n67, n78, n85, n15, n26, n37, n48,
+ n1234, n1256, n2367, n3478, n1458, n5678, nCenter,
+ myCellFactory->GetFreeID());
+}
+
+//=======================================================================
+//function : AddVolumeWithID
+//purpose :
+//=======================================================================
+SMDS_MeshVolume* SMDS_Mesh::AddVolumeWithID(int n1, int n2, int n3, int n4,
+ int n5, int n6, int n7, int n8,
+ int n12,int n23,int n34,int n41,
+ int n56,int n67,int n78,int n85,
+ int n15,int n26,int n37,int n48,
+ int n1234,int n1256,int n2367,int n3478,
+ int n1458,int n5678,int nCenter, int ID)
+{
+ return SMDS_Mesh::AddVolumeWithID (myNodeFactory->FindNode(n1),
+ myNodeFactory->FindNode(n2),
+ myNodeFactory->FindNode(n3),
+ myNodeFactory->FindNode(n4),
+ myNodeFactory->FindNode(n5),
+ myNodeFactory->FindNode(n6),
+ myNodeFactory->FindNode(n7),
+ myNodeFactory->FindNode(n8),
+ myNodeFactory->FindNode(n12),
+ myNodeFactory->FindNode(n23),
+ myNodeFactory->FindNode(n34),
+ myNodeFactory->FindNode(n41),
+ myNodeFactory->FindNode(n56),
+ myNodeFactory->FindNode(n67),
+ myNodeFactory->FindNode(n78),
+ myNodeFactory->FindNode(n85),
+ myNodeFactory->FindNode(n15),
+ myNodeFactory->FindNode(n26),
+ myNodeFactory->FindNode(n37),
+ myNodeFactory->FindNode(n48),
+ myNodeFactory->FindNode(n1234),
+ myNodeFactory->FindNode(n1256),
+ myNodeFactory->FindNode(n2367),
+ myNodeFactory->FindNode(n3478),
+ myNodeFactory->FindNode(n1458),
+ myNodeFactory->FindNode(n5678),
+ myNodeFactory->FindNode(nCenter),
+ ID);
+}
+
+//=======================================================================
+//function : AddVolumeWithID
+//purpose : 2d order Hexahedrons with 27 nodes
+//=======================================================================
+SMDS_MeshVolume* SMDS_Mesh::AddVolumeWithID(const SMDS_MeshNode * n1,
+ const SMDS_MeshNode * n2,
+ const SMDS_MeshNode * n3,
+ const SMDS_MeshNode * n4,
+ const SMDS_MeshNode * n5,
+ const SMDS_MeshNode * n6,
+ const SMDS_MeshNode * n7,
+ const SMDS_MeshNode * n8,
+ const SMDS_MeshNode * n12,
+ const SMDS_MeshNode * n23,
+ const SMDS_MeshNode * n34,
+ const SMDS_MeshNode * n41,
+ const SMDS_MeshNode * n56,
+ const SMDS_MeshNode * n67,
+ const SMDS_MeshNode * n78,
+ const SMDS_MeshNode * n85,
+ const SMDS_MeshNode * n15,
+ const SMDS_MeshNode * n26,
+ const SMDS_MeshNode * n37,
+ const SMDS_MeshNode * n48,
+ const SMDS_MeshNode * n1234,
+ const SMDS_MeshNode * n1256,
+ const SMDS_MeshNode * n2367,
+ const SMDS_MeshNode * n3478,
+ const SMDS_MeshNode * n1458,
+ const SMDS_MeshNode * n5678,
+ const SMDS_MeshNode * nCenter,
+ int ID)
+{
+ if (!n1 || !n2 || !n3 || !n4 || !n5 || !n6 || !n7 || !n8 || !n12 || !n23 ||
+ !n34 || !n41 || !n56 || !n67 || !n78 || !n85 || !n15 || !n26 || !n37 || !n48 ||
+ !n1234 || !n1256 || !n2367 || !n3478 || !n1458 || !n5678 || !nCenter )