#include <SMDS_VolumeTool.hxx>
Data Structures | |
struct | Facet |
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 | |
SMDS_VolumeTool () | |
~SMDS_VolumeTool () | |
SMDS_VolumeTool (const SMDS_MeshElement *theVolume, const bool ignoreCentralNodes=true) | |
bool | Set (const SMDS_MeshElement *theVolume, const bool ignoreCentralNodes=true, const std::vector< const SMDS_MeshNode * > *nodes=0) |
const SMDS_MeshVolume * | Element () const |
int | ID () const |
bool | IsPoly () const |
VolumeType | GetVolumeType () const |
bool | IsForward () const |
void | Inverse () |
const SMDS_MeshNode ** | GetNodes () const |
int | NbNodes () const |
double | GetSize () const |
bool | GetBaryCenter (double &X, double &Y, double &Z) const |
bool | IsOut (double X, double Y, double Z, double tol) const |
Classify a point. More... | |
bool | IsLinked (const SMDS_MeshNode *theNode1, const SMDS_MeshNode *theNode2, const bool theIgnoreMediumNodes=false) const |
bool | IsLinked (const int theNode1Index, const int theNode2Index, bool theIgnoreMediumNodes=false) const |
int | GetNodeIndex (const SMDS_MeshNode *theNode) const |
int | GetAllExistingEdges (std::vector< const SMDS_MeshElement * > &edges) const |
Fill vector with boundary edges existing in the mesh. More... | |
double | MinLinearSize2 () const |
Return minimal square distance between connected corner nodes. More... | |
double | MaxLinearSize2 () const |
Return maximal square distance between connected corner nodes. More... | |
void | SetExternalNormal () |
int | NbFaces () const |
int | NbFaceNodes (int faceIndex) const |
const int * | GetFaceNodesIndices (int faceIndex) const |
const SMDS_MeshNode ** | GetFaceNodes (int faceIndex) const |
bool | GetFaceNodes (int faceIndex, std::set< const SMDS_MeshNode * > &theFaceNodes) const |
bool | IsFaceExternal (int faceIndex) 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 | GetFaceNormal (int faceIndex, double &X, double &Y, double &Z) const |
bool | GetFaceBaryCenter (int faceIndex, double &X, double &Y, double &Z) const |
Return barycenter of a face. More... | |
double | GetFaceArea (int faceIndex) const |
int | GetOppFaceIndex (int faceIndex) const |
int | GetCenterNodeIndex (int faceIndex) const |
Return index of the node located at face center of a quadratic element like HEX27. More... | |
int | GetFaceIndex (const std::set< const SMDS_MeshNode * > &theFaceNodes, const int theFaceIndexHint=-1) const |
int | GetAllExistingFaces (std::vector< const SMDS_MeshElement * > &faces) const |
Fill vector with boundary faces existing in the mesh. More... | |
Static Public Member Functions | |
static VolumeType | GetType (int nbNodes) |
static int | NbFaces (VolumeType type) |
static const int * | GetFaceNodesIndices (VolumeType type, int faceIndex, bool external) |
static int | NbFaceNodes (VolumeType type, int faceIndex) |
static int | NbCornerNodes (VolumeType type) |
Useful to know nb of corner nodes of a quadratic volume. More... | |
static int | GetOppFaceIndexOfHex (int faceIndex) |
Private Types | |
typedef std::pair< int, int > | Link |
Private Member Functions | |
bool | setFace (int faceIndex) const |
bool | projectNodesToNormal (int faceIndex, double &minProj, double &maxProj) const |
Private Attributes | |
const SMDS_MeshElement * | myVolume |
const SMDS_VtkVolume * | myPolyedre |
bool | myIgnoreCentralNodes |
bool | myVolForward |
int | myNbFaces |
std::vector< const SMDS_MeshNode * > | myVolumeNodes |
std::vector< int > | myPolyIndices |
std::vector< int > | myPolyQuantities |
std::vector< int > | myPolyFacetOri |
std::map< Link, int > | myFwdLinks |
bool | myExternalFaces |
const int * | myAllFacesNodeIndices_F |
const int * | myAllFacesNodeIndices_RE |
const int * | myAllFacesNbNodes |
int | myMaxFaceNbNodes |
Facet | myCurFace |
|
private |
SMDS_VolumeTool::SMDS_VolumeTool | ( | ) |
SMDS_VolumeTool::~SMDS_VolumeTool | ( | ) |
SMDS_VolumeTool::SMDS_VolumeTool | ( | const SMDS_MeshElement * | theVolume, |
const bool | ignoreCentralNodes = true |
||
) |
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().
Referenced by _MySubIterator::_MySubIterator().
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().
Referenced by _MySubIterator::_MySubIterator().
bool SMDS_VolumeTool::GetBaryCenter | ( | double & | X, |
double & | Y, | ||
double & | Z | ||
) | const |
Referenced by SMESH_Mesh_i::BaryCenter(), 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(), and SMESH_MeshEditor::SplitVolumes().
double SMDS_VolumeTool::GetFaceArea | ( | int | faceIndex | ) | const |
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 |
Referenced by SMESH_MeshEditor::GetHexaFacetsToSplit(), and SMESH_MeshEditor::Reorient2DBy3D().
const SMDS_MeshNode ** SMDS_VolumeTool::GetFaceNodes | ( | int | faceIndex | ) | const |
Referenced by DriverSTL_W_SMDS_Mesh::findVolumeTriangles(), SMESH_MesherHelper::FixQuadraticElements(), SMESH_MeshAlgos::GetDistance(), SMESH_Mesh_i::GetElemFaceNodes(), SMESH_MeshEditor::GetHexaFacetsToSplit(), SMESH_Algo::GetMeshError(), SMESHGUI_TreeElemInfo::information(), SMESH::Controls::BareBorderVolume::IsSatisfy(), SMESH::SMESH_MeshEditor::Make2DMeshFrom3D(), SMESH_Pattern::makePolyElements(), SMESH_MeshEditor::makeWalls(), DriverCGNS_Write::Perform(), SMESH_MeshEditor::Reorient2DBy3D(), SMESH_MeshEditor::SplitVolumes(), and SMESH_MeshEditor::UpdateVolumes().
bool SMDS_VolumeTool::GetFaceNodes | ( | int | faceIndex, |
std::set< const SMDS_MeshNode * > & | theFaceNodes | ||
) | const |
|
static |
int SMDS_VolumeTool::GetNodeIndex | ( | const SMDS_MeshNode * | theNode | ) | const |
const SMDS_MeshNode** SMDS_VolumeTool::GetNodes | ( | ) | const |
References MESSAGE.
Referenced by SMESH_MeshEditor::applyMerge().
Referenced by SMESH_MeshEditor::GetHexaFacetsToSplit().
double SMDS_VolumeTool::GetSize | ( | ) | const |
References getTetraVolume(), me, and setFace().
Referenced by SMESH::Controls::Volume::GetValue().
|
static |
SMDS_VolumeTool::VolumeType SMDS_VolumeTool::GetVolumeType | ( | ) | const |
int SMDS_VolumeTool::ID | ( | ) | const |
Referenced by SMESH_MeshEditor::makeWalls().
void SMDS_VolumeTool::Inverse | ( | ) |
References MESSAGE, and SWAP_NODES.
References me, myFwdLinks, and myPolyFacetOri.
Referenced by 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 SMDS_MeshNode::GetInverseElementIterator(), SMDS_MeshElement::GetNodeIndex(), and SMDSAbs_Volume.
Referenced by DriverSTL_W_SMDS_Mesh::findVolumeTriangles(), SMESH_MeshEditor::GetHexaFacetsToSplit(), SMESH_Algo::GetMeshError(), SMESH::Controls::BareBorderVolume::IsSatisfy(), SMESH::Controls::OverConstrainedVolume::IsSatisfy(), SMESH::SMESH_MeshEditor::Make2DMeshFrom3D(), SMESH_MeshEditor::makeWalls(), DriverCGNS_Write::Perform(), and SMESHGUI_SplitVolumesDlg::showFacetByElement().
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(), SMDS_MeshNode::GetInverseElementIterator(), and SMDSAbs_Volume.
bool SMDS_VolumeTool::IsLinked | ( | const SMDS_MeshNode * | theNode1, |
const SMDS_MeshNode * | theNode2, | ||
const bool | theIgnoreMediumNodes = false |
||
) | const |
References me, MESSAGE, and myPolyQuantities.
Referenced by SMESH_MeshEditor::applyMerge(), SMESH_MeshEditor::GetLinkedNodes(), SMESH_Block::LoadMeshBlock(), SMESH_MeshEditor::SewFreeBorder(), and SMESH_MeshEditor::UpdateVolumes().
bool SMDS_VolumeTool::IsLinked | ( | const int | theNode1Index, |
const int | theNode2Index, | ||
bool | theIgnoreMediumNodes = false |
||
) | const |
bool SMDS_VolumeTool::IsOut | ( | double | X, |
double | Y, | ||
double | Z, | ||
double | tol | ||
) | const |
bool SMDS_VolumeTool::IsPoly | ( | ) | const |
Referenced by DriverSTL_W_SMDS_Mesh::findVolumeTriangles().
double SMDS_VolumeTool::MaxLinearSize2 | ( | ) | const |
Return maximal square distance between connected corner nodes.
double SMDS_VolumeTool::MinLinearSize2 | ( | ) | const |
Return minimal square distance between connected corner nodes.
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 |
Referenced by StdMeshers_Projection_3D::Compute().
Referenced by SMESH_MesherHelper::AddTLinks(), DriverSTL_W_SMDS_Mesh::findVolumeTriangles(), SMESH_MesherHelper::FixQuadraticElements(), SMESH_MeshAlgos::GetDistance(), SMESH_Mesh_i::GetElemFaceNodes(), SMESH_Pattern::getFacesDefinition(), SMESH_MeshEditor::GetHexaFacetsToSplit(), SMESH_Algo::GetMeshError(), SMESH::Controls::AspectRatio3D::GetValue(), SMESHGUI_TreeElemInfo::information(), SMESH::Controls::BareBorderVolume::IsSatisfy(), SMESH::SMESH_MeshEditor::Make2DMeshFrom3D(), SMESH_Pattern::makePolyElements(), SMESH_MeshEditor::makeWalls(), DriverCGNS_Write::Perform(), SMESH_MeshEditor::SplitVolumes(), and SMESH_MeshEditor::UpdateVolumes().
|
static |
int SMDS_VolumeTool::NbFaces | ( | ) | const |
Referenced by SMESH_MesherHelper::AddTLinks(), StdMeshers_HexaFromSkin_3D::Compute(), DriverSTL_W_SMDS_Mesh::findVolumeTriangles(), SMESH_MesherHelper::FixQuadraticElements(), SMESH_MeshAlgos::GetDistance(), SMESH_Mesh_i::GetElemFaceNodes(), SMESH_Pattern::getFacesDefinition(), SMESH_MeshEditor::GetHexaFacetsToSplit(), SMESH_Algo::GetMeshError(), SMESH::Controls::AspectRatio3D::GetValue(), SMESHGUI_TreeElemInfo::information(), SMESH::Controls::BareBorderVolume::IsSatisfy(), SMESH::Controls::OverConstrainedVolume::IsSatisfy(), SMESH_Block::LoadMeshBlock(), SMESH::SMESH_MeshEditor::Make2DMeshFrom3D(), SMESH_Pattern::makePolyElements(), SMESH_MeshEditor::makeWalls(), DriverCGNS_Write::Perform(), SMESHGUI_SplitVolumesDlg::showFacetByElement(), SMESH_MeshEditor::SplitVolumes(), and SMESH_MeshEditor::UpdateVolumes().
|
static |
int SMDS_VolumeTool::NbNodes | ( | ) | const |
Referenced by SMESH_MesherHelper::AddTLinks(), SMESH_Block::LoadMeshBlock(), and SMESH_MeshEditor::SplitVolumes().
|
private |
bool SMDS_VolumeTool::Set | ( | const SMDS_MeshElement * | theVolume, |
const bool | ignoreCentralNodes = true , |
||
const std::vector< const SMDS_MeshNode * > * | nodes = 0 |
||
) |
References SMDS_MeshElement::GetType(), SMDS_MeshElement::NbCornerNodes(), SMDS_MeshElement::NbFaces(), SMDS_MeshElement::nodesIterator(), SMDSAbs_Volume, SMDS_MeshNode::X(), SMDS_MeshNode::Y(), and SMDS_MeshNode::Z().
Referenced by StdMeshers_Prism_3D::AddPrisms(), SMESH_Mesh_i::BaryCenter(), SMESH_MeshAlgos::DeMerge(), DriverSTL_W_SMDS_Mesh::findVolumeTriangles(), SMESH_MesherHelper::FixQuadraticElements(), SMESH_MeshEditor::GetHexaFacetsToSplit(), SMESH_Algo::GetMeshError(), SMESH::Controls::Volume::GetValue(), SMESH::Controls::BareBorderVolume::IsSatisfy(), SMESH::Controls::OverConstrainedVolume::IsSatisfy(), SMESH_Block::LoadMeshBlock(), SMESH_Pattern::makePolyElements(), StdMeshers_Penta_3D::MakeVolumeMesh(), SMESH_MeshEditor::makeWalls(), DriverCGNS_Write::Perform(), SMESH_MeshEditor::Reorient2DBy3D(), SMESH_MeshEditor::SewFreeBorder(), and SMESH_MeshEditor::SplitVolumes().
void SMDS_VolumeTool::SetExternalNormal | ( | ) |
Referenced by SMESH_MeshEditor::applyMerge(), SMESH_MeshAlgos::GetDistance(), SMESH_Block::LoadMeshBlock(), SMESH::SMESH_MeshEditor::Make2DMeshFrom3D(), SMESH_MeshEditor::makeWalls(), DriverCGNS_Write::Perform(), SMESH_MeshEditor::Reorient2DBy3D(), and SMESHGUI_SplitVolumesDlg::showFacetByElement().
myAllFacesNodeIndices_FE = &Hexa_FE[0][0];
References me, MESSAGE, myPolyIndices, myPolyQuantities, and reverse().
Referenced by GetSize().
|
mutableprivate |
|
mutableprivate |
|
mutableprivate |
|
mutableprivate |
|
mutableprivate |
Referenced by IsFaceExternal().
|
private |
|
mutableprivate |
|
private |
|
private |
|
private |
Referenced by IsFaceExternal().
|
private |
Referenced by IsLinked(), and setFace().
|
private |
|
private |
|
private |