X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMDS%2FSMDS_VolumeTool.hxx;h=89732b1da2c265a8f4c40ec8f1eb3de77b7a4622;hb=1bf6ddbe2fe6f21e8c1ca914be6e423e402894f1;hp=99e7dc1763800377f1cd6a851f6fcac4da59635b;hpb=090aff07266d376ae028ae43434bdea7c0a0f9bb;p=modules%2Fsmesh.git diff --git a/src/SMDS/SMDS_VolumeTool.hxx b/src/SMDS/SMDS_VolumeTool.hxx index 99e7dc176..89732b1da 100644 --- a/src/SMDS/SMDS_VolumeTool.hxx +++ b/src/SMDS/SMDS_VolumeTool.hxx @@ -32,6 +32,7 @@ class SMDS_MeshElement; class SMDS_MeshNode; +class SMDS_PolyhedralVolumeOfNodes; #include #include @@ -149,26 +150,52 @@ class SMDS_VolumeTool // Return index of a face formed by theFaceNodes. // Return -1 if a face not found - int GetFaceIndex( const std::set& theFaceNodesIndices ); + //int GetFaceIndex( const std::set& theFaceNodesIndices ); // Return index of a face formed by theFaceNodesIndices // Return -1 if a face not found + // ------------------------ + // static methods for faces + // ------------------------ + + enum VolumeType { UNKNOWN, TETRA, PYRAM, PENTA, HEXA }; + + static VolumeType GetType(int nbNodes); + // return VolumeType by nb of nodes in a volume + + static int NbFaces( VolumeType type ); + // return nb of faces by volume type + + static const int* GetFaceNodesIndices(VolumeType type, + int faceIndex, + bool external); + // Return the array of face nodes indices + // To comfort link iteration, the array + // length == NbFaceNodes( faceIndex ) + 1 and + // the last node index == the first one. + + static int NbFaceNodes(VolumeType type, + int faceIndex ); + // Return number of nodes in the array of face nodes private: bool setFace( int faceIndex ); const SMDS_MeshElement* myVolume; + const SMDS_PolyhedralVolumeOfNodes* myPolyedre; + bool myVolForward; int myNbFaces; int myVolumeNbNodes; - const SMDS_MeshNode* myVolumeNodes[ 8 ]; + const SMDS_MeshNode** myVolumeNodes; bool myExternalFaces; - int* myFaceNodeIndices; - int* myFaceNbNodes; - const SMDS_MeshNode* myFaceNodes[ 5 ]; + int myCurFace; + int myFaceNbNodes; + int* myFaceNodeIndices; + const SMDS_MeshNode** myFaceNodes; }; #endif