tabRef[GmfTriangles] = 3; // for enforced faces
tabRef[GmfQuadrilaterals] = 4;
tabRef[GmfTetrahedra] = 4; // for new tetras
+ tabRef[GmfPyramids] = 5; // for new pyramids
tabRef[GmfPrisms] = 6; // for new prisms
tabRef[GmfHexahedra] = 8;
#endif
}
}
+ else if (token == GmfPyramids && nbElem > 0) {
+ (nbElem <= 1) ? tmpStr = " Pyramid" : tmpStr = " Pyramids";
+ for ( int iElem = 0; iElem < nbElem; iElem++ )
+ MGOutput->GmfGetLin(InpMsh, token, &id[iElem*tabRef[token]], &id[iElem*tabRef[token]+1], &id[iElem*tabRef[token]+2], &id[iElem*tabRef[token]+3],
+ &id[iElem*tabRef[token]+4], &domainID[iElem]);
+ }
else if (token == GmfPrisms && nbElem > 0) {
(nbElem <= 1) ? tmpStr = " Prism" : tmpStr = " Prisms";
for ( int iElem = 0; iElem < nbElem; iElem++ )
case GmfTriangles:
case GmfQuadrilaterals:
case GmfTetrahedra:
+ case GmfPyramids:
case GmfPrisms:
case GmfHexahedra:
{
noID, force3d );
}
break;
+ case GmfPyramids:
+ if ( hasGeom )
+ {
+ if ( solidID != HOLE_ID )
+ {
+ aCreatedElem = theHelper->AddVolume( node[3], node[2], node[1],
+ node[0], node[4],
+ noID, force3d );
+ theMeshDS->SetMeshElementOnShape( aCreatedElem, solidID );
+ for ( int iN = 0; iN < 5; ++iN )
+ if ( node[iN]->getshapeId() < 1 )
+ theMeshDS->SetNodeInVolume( node[iN], solidID );
+ }
+ }
+ else
+ {
+ if ( elemSearcher ) {
+ // Issue 0020682. Avoid creating nodes and tetras at place where
+ // volumic elements already exist
+ if ( !node[1] || !node[0] || !node[2] || !node[3] || !node[4] || !node[5] )
+ continue;
+ if ( elemSearcher->FindElementsByPoint((SMESH_TNodeXYZ(node[0]) +
+ SMESH_TNodeXYZ(node[1]) +
+ SMESH_TNodeXYZ(node[2]) +
+ SMESH_TNodeXYZ(node[3]) +
+ SMESH_TNodeXYZ(node[4])) / 5.,
+ SMDSAbs_Volume, foundVolumes ))
+ break;
+ }
+ aCreatedElem = theHelper->AddVolume( node[3], node[2], node[1],
+ node[0], node[4],
+ noID, force3d );
+ }
+ break;
case GmfPrisms:
if ( hasGeom )
{
::GmfGetLin(iMesh, what, node1, node2, node3, node4, node5, node6, node7, node8, domain );
}
+//================================================================================
+/*!
+ * \brief Return node indices of a next pyramid
+ */
+//================================================================================
+
+void MG_HYBRID_API::GmfGetLin(int iMesh, GmfKwdCod what,
+ int* node1, int* node2, int* node3, int* node4,
+ int* node5, int* domain )
+{
+ if ( _useLib ) {
+#ifdef USE_MG_LIBS
+ _libData->ReadPyramidNodes( node1, node2, node3, node4, node5, domain );
+ return;
+#endif
+ }
+ ::GmfGetLin(iMesh, what, node1, node2, node3, node4, node5, domain );
+}
+
//================================================================================
/*!
* \brief Return node indices of a next prism
void GmfGetLin(int iMesh, GmfKwdCod what, int* node1, int* node2, int* domain );
void GmfGetLin(int iMesh, GmfKwdCod what, int* node1, int* node2, int* node3, int* domain );
void GmfGetLin(int iMesh, GmfKwdCod what, int* node1, int* node2, int* node3, int* node4, int* domain );
+ void GmfGetLin(int iMesh, GmfKwdCod what, int* node1, int* node2, int* node3, int* node4, int* node5, int* domain ); //pyramids
void GmfGetLin(int iMesh, GmfKwdCod what, int* node1, int* node2, int* node3, int* node4, int* node5, int* node6, int* domain );
void GmfGetLin(int iMesh, GmfKwdCod what, int* node1, int* node2, int* node3, int* node4, int* node5, int* node6, int* node7, int* node8, int* domain );
void GmfCloseMesh( int iMesh );