#include <SMDS_VolumeTool.hxx>
Classes | |
struct | SaveFacet |
Saver/restorer of a SMDS_VolumeTool::myCurFace. More... | |
Public Types | |
enum | VolumeType { UNKNOWN = -1 , TETRA = 0 , PYRAM , PENTA , HEXA , HEX_PRISM , QUAD_TETRA , QUAD_PYRAM , QUAD_PENTA , QUAD_HEXA , POLYHEDA , NB_VOLUME_TYPES } |
Public Member Functions | |
const SMDS_MeshVolume * | Element () const |
int | GetAllExistingEdges (std::vector< const SMDS_MeshElement * > &edges) const |
Fill vector with boundary edges existing in the mesh. More... | |
int | GetAllExistingFaces (std::vector< const SMDS_MeshElement * > &faces) const |
Fill vector with boundary faces existing in the mesh. More... | |
bool | GetBaryCenter (double &X, double &Y, double &Z) const |
int | GetCenterNodeIndex (int faceIndex) const |
Return index of the node located at face center of a quadratic element like HEX27. More... | |
double | GetFaceArea (int faceIndex) const |
bool | GetFaceBaryCenter (int faceIndex, double &X, double &Y, double &Z) const |
Return barycenter of a face. More... | |
int | GetFaceIndex (const std::set< const SMDS_MeshNode * > &theFaceNodes, const int theFaceIndexHint=-1) const |
const SMDS_MeshNode ** | GetFaceNodes (int faceIndex) const |
bool | GetFaceNodes (int faceIndex, std::set< const SMDS_MeshNode * > &theFaceNodes) const |
const int * | GetFaceNodesIndices (int faceIndex) const |
bool | GetFaceNormal (int faceIndex, double &X, double &Y, double &Z) const |
int | GetNodeIndex (const SMDS_MeshNode *theNode) const |
const SMDS_MeshNode ** | GetNodes () |
int | GetOppFaceIndex (int faceIndex) const |
double | GetSize () const |
VolumeType | GetVolumeType () const |
int | ID () const |
void | Inverse () |
bool | IsFaceExternal (int faceIndex) const |
bool | IsForward () const |
bool | IsFreeFace (int faceIndex, const SMDS_MeshElement **otherVol=0) const |
fast check that only one volume is build on the face nodes This check is valid for conformal meshes only More... | |
bool | IsFreeFaceAdv (int faceIndex, const SMDS_MeshElement **otherVol=0) const |
Thorough check that only one volume is build on the face nodes. More... | |
bool | IsLinked (const int theNode1Index, const int theNode2Index, bool theIgnoreMediumNodes=false) const |
bool | IsLinked (const SMDS_MeshNode *theNode1, const SMDS_MeshNode *theNode2, const bool theIgnoreMediumNodes=false) const |
bool | IsOut (double X, double Y, double Z, double tol) const |
Classify a point. More... | |
bool | IsPoly () const |
double | MaxLinearSize2 () const |
Return maximal square distance between connected corner nodes. More... | |
double | MinLinearSize2 () const |
Return minimal square distance between connected corner nodes. More... | |
int | NbFaceNodes (int faceIndex) const |
int | NbFaces () const |
int | NbNodes () |
bool | Set (const SMDS_MeshElement *theVolume, const bool ignoreCentralNodes=true) |
void | SetExternalNormal () |
SMDS_VolumeTool () | |
SMDS_VolumeTool (const SMDS_MeshElement *theVolume, const bool ignoreCentralNodes=true) | |
~SMDS_VolumeTool () | |
Static Public Member Functions | |
static const int * | GetFaceNodesIndices (VolumeType type, int faceIndex, bool external) |
static int | GetOppFaceIndexOfHex (int faceIndex) |
static VolumeType | GetType (int nbNodes) |
static int | NbCornerNodes (VolumeType type) |
Useful to know nb of corner nodes of a quadratic volume. More... | |
static int | NbFaceNodes (VolumeType type, int faceIndex) |
static int | NbFaces (VolumeType type) |
SMDS_VolumeTool::SMDS_VolumeTool | ( | ) |
References Set().
SMDS_VolumeTool::~SMDS_VolumeTool | ( | ) |
SMDS_VolumeTool::SMDS_VolumeTool | ( | const SMDS_MeshElement * | theVolume, |
const bool | ignoreCentralNodes = true |
||
) |
References Set().
const SMDS_MeshVolume * SMDS_VolumeTool::Element | ( | ) | const |
int SMDS_VolumeTool::GetAllExistingEdges | ( | std::vector< const SMDS_MeshElement * > & | edges | ) | const |
Fill vector with boundary edges existing in the mesh.
edges | - vector of found edges |
int | - nb of found faces |
References SMDS_Mesh::FindEdge(), and IsLinked().
int SMDS_VolumeTool::GetAllExistingFaces | ( | std::vector< const SMDS_MeshElement * > & | faces | ) | const |
Fill vector with boundary faces existing in the mesh.
faces | - vector of found nodes |
int | - nb of found faces |
References SMDS_Mesh::FindFace(), GetFaceNodes(), IsPoly(), NbFaceNodes(), and NbFaces().
bool SMDS_VolumeTool::GetBaryCenter | ( | double & | X, |
double & | Y, | ||
double & | Z | ||
) | const |
Referenced by IsFreeFaceAdv(), and SMESH_MeshEditor::SplitVolumes().
Return index of the node located at face center of a quadratic element like HEX27.
Referenced by SMESH_MesherHelper::AddTLinks(), SMESH_MeshEditor::MakeBoundaryMesh(), and SMESH_MeshEditor::SplitVolumes().
double SMDS_VolumeTool::GetFaceArea | ( | int | faceIndex | ) | const |
References SMDS_MeshElement::IsPoly().
Return barycenter of a face.
Referenced by SMESH_MeshAlgos::GetDistance(), and SMESH_MeshEditor::SplitVolumes().
int SMDS_VolumeTool::GetFaceIndex | ( | const std::set< const SMDS_MeshNode * > & | theFaceNodes, |
const int | theFaceIndexHint = -1 |
||
) | const |
References GetFaceNodes(), and NbFaceNodes().
Referenced by SMESH_MeshEditor::GetHexaFacetsToSplit(), and SMESH_MeshEditor::Reorient2DBy3D().
const SMDS_MeshNode ** SMDS_VolumeTool::GetFaceNodes | ( | int | faceIndex | ) | const |
Referenced by SMESH_MesherHelper::FixQuadraticElements(), GetAllExistingFaces(), SMESH_MeshAlgos::GetDistance(), GetFaceIndex(), SMESH_MeshEditor::GetHexaFacetsToSplit(), SMESH_Algo::GetMeshError(), IsFreeFace(), IsFreeFaceAdv(), SMESH::Controls::BareBorderVolume::IsSatisfy(), SMESH_MeshEditor::Make2DMeshFrom3D(), SMESH_MeshEditor::MakeBoundaryMesh(), SMESH_MeshEditor::Reorient2DBy3D(), SMESH_MeshEditor::SewSideElements(), SMESH_MeshEditor::SplitVolumes(), and SMESH_MeshEditor::UpdateVolumes().
bool SMDS_VolumeTool::GetFaceNodes | ( | int | faceIndex, |
std::set< const SMDS_MeshNode * > & | theFaceNodes | ||
) | const |
|
static |
References HEX_PRISM, HEXA, PENTA, PYRAM, QUAD_HEXA, QUAD_PENTA, QUAD_PYRAM, QUAD_TETRA, and TETRA.
int SMDS_VolumeTool::GetNodeIndex | ( | const SMDS_MeshNode * | theNode | ) | const |
const SMDS_MeshNode ** SMDS_VolumeTool::GetNodes | ( | ) |
References GetOppFaceIndexOfHex(), and NbFaces().
Referenced by SMESH_MeshEditor::MergeNodes().
Referenced by SMESH_MeshEditor::GetHexaFacetsToSplit(), and GetOppFaceIndex().
double SMDS_VolumeTool::GetSize | ( | ) | const |
References GetVolumeType(), SMDS_MeshElement::IsPoly(), and NbFaces().
Referenced by SMESH::Controls::Volume::GetValue().
|
static |
References HEX_PRISM, HEXA, PENTA, PYRAM, QUAD_HEXA, QUAD_PENTA, QUAD_PYRAM, QUAD_TETRA, TETRA, and UNKNOWN.
Referenced by StdMeshers_Projection_3D::Compute(), and SMESH::Controls::AspectRatio3D::GetValue().
SMDS_VolumeTool::VolumeType SMDS_VolumeTool::GetVolumeType | ( | ) | const |
References HEX_PRISM, HEXA, PENTA, POLYHEDA, PYRAM, QUAD_HEXA, QUAD_PENTA, QUAD_PYRAM, QUAD_TETRA, TETRA, and UNKNOWN.
Referenced by GetSize(), and IsLinked().
int SMDS_VolumeTool::ID | ( | ) | const |
References SMDS_MeshElement::GetID().
void SMDS_VolumeTool::Inverse | ( | ) |
References SMDS_MeshElement::IsPoly().
Referenced by IsFreeFaceAdv(), IsOut(), and SMESH_MeshEditor::SplitVolumes().
bool SMDS_VolumeTool::IsForward | ( | ) | const |
bool SMDS_VolumeTool::IsFreeFace | ( | int | faceIndex, |
const SMDS_MeshElement ** | otherVol = 0 |
||
) | const |
fast check that only one volume is build on the face nodes This check is valid for conformal meshes only
References GetFaceNodes(), SMDS_MeshNode::GetInverseElementIterator(), SMDS_MeshElement::GetNodeIndex(), IsPoly(), and SMDS_MeshElement::IsQuadratic().
Referenced by SMESH_MeshEditor::GetHexaFacetsToSplit(), SMESH_Algo::GetMeshError(), SMESH::Controls::BareBorderVolume::IsSatisfy(), SMESH::Controls::OverConstrainedVolume::IsSatisfy(), SMESH_MeshEditor::Make2DMeshFrom3D(), SMESH_MeshEditor::MakeBoundaryMesh(), and SMESH_MeshEditor::SewSideElements().
bool SMDS_VolumeTool::IsFreeFaceAdv | ( | int | faceIndex, |
const SMDS_MeshElement ** | otherVol = 0 |
||
) | const |
Thorough check that only one volume is build on the face nodes.
References GetBaryCenter(), GetFaceNodes(), GetFaceNormal(), SMDS_MeshNode::GetInverseElementIterator(), and IsFaceExternal().
bool SMDS_VolumeTool::IsLinked | ( | const SMDS_MeshNode * | theNode1, |
const SMDS_MeshNode * | theNode2, | ||
const bool | theIgnoreMediumNodes = false |
||
) | const |
References DraftVecUtils::find(), SMDS_VtkVolume::GetQuantities(), IsLinked(), SMDS_MeshElement::IsPoly(), and SMDS_VtkVolume::IsQuadratic().
Referenced by GetAllExistingEdges(), SMESH_MeshEditor::GetLinkedNodes(), IsLinked(), SMESH_Block::LoadMeshBlock(), SMESH_MeshEditor::MergeNodes(), Set(), SMESH_MeshEditor::SewFreeBorder(), and SMESH_MeshEditor::UpdateVolumes().
bool SMDS_VolumeTool::IsOut | ( | double | X, |
double | Y, | ||
double | Z, | ||
double | tol | ||
) | const |
Classify a point.
tol | - thickness of faces |
References GetFaceNormal(), and IsFaceExternal().
Referenced by SMESH_MeshAlgos::IsOut().
bool SMDS_VolumeTool::IsPoly | ( | ) | const |
Referenced by GetAllExistingFaces(), and IsFreeFace().
double SMDS_VolumeTool::MaxLinearSize2 | ( | ) | const |
Return maximal square distance between connected corner nodes.
References SMDS_MeshElement::IsQuadratic().
double SMDS_VolumeTool::MinLinearSize2 | ( | ) | const |
Return minimal square distance between connected corner nodes.
References SMDS_MeshElement::IsQuadratic().
Referenced by SMESH_MesherHelper::FixQuadraticElements().
|
static |
Useful to know nb of corner nodes of a quadratic volume.
type | - volume type |
int | - nb of corner nodes |
References HEX_PRISM, HEXA, PENTA, PYRAM, QUAD_HEXA, QUAD_PENTA, QUAD_PYRAM, QUAD_TETRA, and TETRA.
Referenced by StdMeshers_Projection_3D::Compute().
Referenced by SMESH_MesherHelper::AddTLinks(), SMESH_MesherHelper::FixQuadraticElements(), SMESH_MeshVSLink::Get3DGeom(), GetAllExistingFaces(), SMESH_MeshAlgos::GetDistance(), GetFaceIndex(), SMESH_MeshEditor::GetHexaFacetsToSplit(), SMESH_Algo::GetMeshError(), SMESH::Controls::AspectRatio3D::GetValue(), SMESH::Controls::BareBorderVolume::IsSatisfy(), SMESH_MeshEditor::Make2DMeshFrom3D(), SMESH_MeshEditor::MakeBoundaryMesh(), SMESH_MeshEditor::SewSideElements(), SMESH_MeshEditor::SplitVolumes(), and SMESH_MeshEditor::UpdateVolumes().
|
static |
References HEX_PRISM, HEXA, PENTA, PYRAM, QUAD_HEXA, QUAD_PENTA, QUAD_PYRAM, QUAD_TETRA, and TETRA.
int SMDS_VolumeTool::NbFaces | ( | ) | const |
Referenced by SMESH_MesherHelper::AddTLinks(), StdMeshers_HexaFromSkin_3D::Compute(), SMESH_MesherHelper::FixQuadraticElements(), SMESH_MeshVSLink::Get3DGeom(), GetAllExistingFaces(), SMESH_MeshAlgos::GetDistance(), SMESH_MeshEditor::GetHexaFacetsToSplit(), SMESH_Algo::GetMeshError(), GetOppFaceIndex(), GetSize(), SMESH::Controls::AspectRatio3D::GetValue(), SMESH::Controls::BareBorderVolume::IsSatisfy(), SMESH::Controls::OverConstrainedVolume::IsSatisfy(), SMESH_Block::LoadMeshBlock(), SMESH_MeshEditor::Make2DMeshFrom3D(), SMESH_MeshEditor::MakeBoundaryMesh(), SMESH_MeshEditor::SewSideElements(), SMESH_MeshEditor::SplitVolumes(), and SMESH_MeshEditor::UpdateVolumes().
|
static |
References HEX_PRISM, HEXA, PENTA, PYRAM, QUAD_HEXA, QUAD_PENTA, QUAD_PYRAM, QUAD_TETRA, and TETRA.
int SMDS_VolumeTool::NbNodes | ( | ) |
bool SMDS_VolumeTool::Set | ( | const SMDS_MeshElement * | theVolume, |
const bool | ignoreCentralNodes = true |
||
) |
References GetFaceNormal(), SMDS_MeshElement::GetType(), IsLinked(), SMDS_MeshElement::IsPoly(), SMDS_MeshElement::NbCornerNodes(), SMDS_MeshElement::NbFaces(), SMDS_MeshElement::NbNodes(), SMDS_MeshElement::nodesIterator(), SMDS_MeshNode::X(), SMDS_MeshNode::Y(), and SMDS_MeshNode::Z().
Referenced by StdMeshers_Prism_3D::AddPrisms(), SMESH_MesherHelper::FixQuadraticElements(), SMESH_MeshVSLink::Get3DGeom(), SMESH_MeshEditor::GetHexaFacetsToSplit(), SMESH_Algo::GetMeshError(), SMESH::Controls::Volume::GetValue(), SMESH::Controls::BareBorderVolume::IsSatisfy(), SMESH::Controls::OverConstrainedVolume::IsSatisfy(), SMESH_Block::LoadMeshBlock(), SMESH_MeshEditor::MakeBoundaryMesh(), StdMeshers_Penta_3D::MakeVolumeMesh(), SMESH_MeshEditor::Reorient2DBy3D(), SMESH_MeshEditor::SewFreeBorder(), SMDS_VolumeTool(), and SMESH_MeshEditor::SplitVolumes().
void SMDS_VolumeTool::SetExternalNormal | ( | ) |