29#ifndef SMDS_VolumeTool_HeaderFile
30#define SMDS_VolumeTool_HeaderFile
34#include <smIdType.hxx>
57 HEX_PRISM, QUAD_TETRA, QUAD_PYRAM, QUAD_PENTA, QUAD_HEXA,
58 POLYHEDA, NB_VOLUME_TYPES };
63 const bool ignoreCentralNodes =
true);
66 const bool ignoreCentralNodes =
true,
67 const std::vector<const SMDS_MeshNode*>* nodes = 0);
80 bool IsPoly()
const {
return myPolyedre; }
86 VolumeType GetVolumeType()
const;
100 int NbNodes()
const {
return (
int) myVolumeNodes.size(); }
103 double GetSize()
const;
106 double GetScaledJacobian()
const;
109 bool GetBaryCenter (
double & X,
double & Y,
double & Z)
const;
111 bool IsOut(
double X,
double Y,
double Z,
double tol)
const;
120 const bool theIgnoreMediumNodes=
false)
const;
124 bool IsLinked (
const int theNode1Index,
125 const int theNode2Index,
126 bool theIgnoreMediumNodes=
false)
const;
134 int GetAllExistingEdges(std::vector<const SMDS_MeshElement*> & edges)
const;
137 double MinLinearSize2()
const;
140 double MaxLinearSize2()
const;
150 void SetExternalNormal ();
157 int NbFaceNodes(
int faceIndex )
const;
160 const int* GetFaceNodesIndices(
int faceIndex )
const;
180 bool GetFaceNodes (
int faceIndex,
181 std::set<const SMDS_MeshNode*>& theFaceNodes )
const;
184 bool IsFaceExternal(
int faceIndex )
const;
188 bool IsFreeFace(
int faceIndex,
const SMDS_MeshElement** otherVol=0 )
const;
193 bool IsFreeFaceCheckAllNodes(
int faceIndex,
const SMDS_MeshElement** otherVol=0 )
const;
198 bool IsFreeFaceAdv(
int faceIndex,
const SMDS_MeshElement** otherVol=0 )
const;
202 bool GetFaceNormal (
int faceIndex,
double & X,
double & Y,
double & Z)
const;
205 bool GetFaceBaryCenter (
int faceIndex,
double & X,
double & Y,
double & Z)
const;
208 bool AllFacesSameOriented()
const;
212 double GetFaceArea(
int faceIndex )
const;
215 int GetOppFaceIndex(
int faceIndex )
const;
218 int GetCenterNodeIndex(
int faceIndex )
const;
221 int GetFaceIndex(
const std::set<const SMDS_MeshNode*>& theFaceNodes,
222 const int theFaceIndexHint=-1)
const;
230 int GetAllExistingFaces(std::vector<const SMDS_MeshElement*> & faces)
const;
237 static VolumeType GetType(
int nbNodes);
240 static int NbFaces( VolumeType type );
243 static const int* GetFaceNodesIndices(VolumeType type,
252 static int NbFaceNodes(VolumeType type,
int faceIndex );
256 static int NbCornerNodes(VolumeType type);
259 static int GetOppFaceIndexOfHex(
int faceIndex );
264 bool setFace(
int faceIndex )
const;
266 bool projectNodesToNormal(
int faceIndex,
269 double* normal = 0)
const;
282 typedef std::pair<int,int>
Link;
#define SMDS_EXPORT
Definition: SMESH_SMDS.hxx:37
Base class for elements.
Definition: SMDS_MeshElement.hxx:56
Definition: SMDS_MeshNode.hxx:36
Mesh volume.
Definition: SMDS_MeshVolume.hxx:40
bool GetBaryCenter(const TCellInfo &theCellInfo, const TNodeInfo &theNodeInfo, TGaussCoord &theGaussCoord, const TElemNum &theElemNum, EModeSwitch theMode)
To calculate Gauss Points coordinates for defined TCellInfo as its bary center.
Definition: MED_GaussUtils.cxx:1908
bool IsOut(const SMDS_MeshElement *element, const gp_Pnt &point, double tol)
Return true if the point is IN or ON of the element.
Definition: SMESH_MeshAlgos.cxx:1367