Tool analyzing and giving access to a prism geometry treating it like a block, i.e. the four side faces are emulated by division/uniting of missing/excess faces. It also manage associations between block sub-shapes and a mesh. More...
#include <StdMeshers_Prism_3D.hxx>
Public Member Functions | |
void Clear () | |
Free allocated memory. More... | |
SMESH_ComputeErrorPtr GetError () const | |
Return problem description. More... | |
bool GetLayersTransformation (std::vector< gp_Trsf > &trsf, const Prism_3D::TPrismTopo &prism) const | |
Return transformations to get coordinates of nodes of each internal layer by nodes of the bottom. Layer is a set of nodes at a certain step from bottom to top. More... | |
const TNodeColumn * GetNodeColumn (const SMDS_MeshNode *node) const | |
Return pointer to column of nodes. More... | |
const TParam2ColumnMap * GetParam2ColumnMap (const int baseEdgeID, bool &isReverse) const | |
Return TParam2ColumnMap for a base edge. More... | |
bool HasNotQuadElemOnTop () const | |
bool Init (SMESH_MesherHelper *helper, const Prism_3D::TPrismTopo &prism) | |
Initialization. More... | |
SMESH_Mesh * Mesh () const | |
Return pointer to mesh. More... | |
SMESHDS_Mesh * MeshDS () const | |
Return pointer to mesh DS. More... | |
const TopoDS_Shape & Shape (const int shapeID) const | |
Return a in-block shape. More... | |
int ShapeID (const TopoDS_Shape &shape) const | |
Return in-block ID of a shape. More... | |
StdMeshers_PrismAsBlock () | |
Constructor. Initialization is needed. More... | |
SMESH_subMesh * SubMesh (const int shapeID) const | |
Return submesh of a shape. More... | |
SMESHDS_SubMesh * SubMeshDS (const int shapeID) const | |
Return submesh DS of a shape. More... | |
int VerticalSize () const | |
Return number of nodes on every vertical edge. More... | |
~StdMeshers_PrismAsBlock () | |
![]() | |
bool ComputeParameters (const gp_Pnt &thePoint, gp_XYZ &theParams, const int theShapeID=ID_Shell, const gp_XYZ &theParamsHint=gp_XYZ(-1,-1,-1)) | |
Standard_Boolean Derivatives (const math_Vector &X, math_Matrix &D) | |
double DistanceReached () const | |
bool EdgeParameters (const int theEdgeID, const double theU, gp_XYZ &theParams) | |
bool EdgePoint (const int theEdgeID, const gp_XYZ &theParams, gp_XYZ &thePoint) const | |
bool EdgeU (const int theEdgeID, const gp_XYZ &theParams, double &theU) const | |
bool FacePoint (const int theFaceID, const gp_XYZ &theParams, gp_XYZ &thePoint) const | |
bool FaceUV (const int theFaceID, const gp_XYZ &theParams, gp_XY &theUV) const | |
Standard_Integer GetStateNumber () | |
double GetTolerance () const | |
bool IsToleranceReached () const | |
bool LoadBlockShapes (const TopoDS_Shell &theShell, const TopoDS_Vertex &theVertex000, const TopoDS_Vertex &theVertex001, TopTools_IndexedMapOfOrientedShape &theShapeIDMap) | |
bool LoadBlockShapes (const TopTools_IndexedMapOfOrientedShape &theShapeIDMap) | |
Initialize block geometry with shapes from theShapeIDMap. More... | |
bool LoadFace (const TopoDS_Face &theFace, const int theFaceID, const TopTools_IndexedMapOfOrientedShape &theShapeIDMap) | |
Load face geometry. More... | |
bool LoadMeshBlock (const SMDS_MeshVolume *theVolume, const int theNode000Index, const int theNode001Index, std::vector< const SMDS_MeshNode * > &theOrderedNodes) | |
Standard_Integer NbEquations () const | |
Standard_Integer NbVariables () const | |
void SetTolerance (const double tol) | |
bool ShellPoint (const gp_XYZ &theParams, gp_XYZ &thePoint) const | |
SMESH_Block () | |
Standard_Boolean Value (const math_Vector &X, math_Vector &F) | |
Standard_Boolean Values (const math_Vector &X, math_Vector &F, math_Matrix &D) | |
bool VertexParameters (const int theVertexID, gp_XYZ &theParams) | |
bool VertexPoint (const int theVertexID, gp_XYZ &thePoint) const | |
Static Public Member Functions | |
static bool IsForwardEdge (SMESHDS_Mesh *meshDS, const TParam2ColumnMap &columnsMap, const TopoDS_Edge &bottomEdge, const int sideFaceID) | |
Check curve orientation of a bootom edge. More... | |
![]() | |
static std::ostream & DumpShapeID (const int theBlockShapeID, std::ostream &stream) | |
static bool FindBlockShapes (const TopoDS_Shell &theShell, const TopoDS_Vertex &theVertex000, const TopoDS_Vertex &theVertex001, TopTools_IndexedMapOfOrientedShape &theShapeIDMap) | |
static int GetCoordIndOnEdge (const int theEdgeID) | |
static void GetEdgeVertexIDs (const int edgeID, std::vector< int > &vertexVec) | |
static void GetFaceEdgesIDs (const int faceID, std::vector< int > &edgeVec) | |
static int GetOrderedEdges (const TopoDS_Face &theFace, std::list< TopoDS_Edge > &theEdges, std::list< int > &theNbEdgesInWires, TopoDS_Vertex theFirstVertex=TopoDS_Vertex(), const bool theShapeAnalysisAlgo=false) | |
Return number of wires and a list of oredered edges. More... | |
static double * GetShapeCoef (const int theShapeID) | |
static int GetShapeIDByParams (const gp_XYZ &theParams) | |
static bool Insert (const TopoDS_Shape &theShape, const int theShapeID, TopTools_IndexedMapOfOrientedShape &theShapeIDMap) | |
/ Insert theShape into theShapeIDMap with theShapeID More... | |
static bool IsEdgeID (int theShapeID) | |
static bool IsFaceID (int theShapeID) | |
static bool IsForwardEdge (const TopoDS_Edge &theEdge, const TopTools_IndexedMapOfOrientedShape &theShapeIDMap) | |
static bool IsVertexID (int theShapeID) | |
static int NbEdges () | |
static int NbFaces () | |
static int NbSubShapes () | |
static int NbVertices () | |
static int ShapeIndex (int theShapeID) | |
static bool ShellPoint (const gp_XYZ &theParams, const std::vector< gp_XYZ > &thePointOnShape, gp_XYZ &thePoint) | |
Additional Inherited Members | |
![]() | |
enum TShapeID { ID_NONE = 0, ID_V000 = 1, ID_V100, ID_V010, ID_V110, ID_V001, ID_V101, ID_V011, ID_V111, ID_Ex00, ID_Ex10, ID_Ex01, ID_Ex11, ID_E0y0, ID_E1y0, ID_E0y1, ID_E1y1, ID_E00z, ID_E10z, ID_E01z, ID_E11z, ID_Fxy0, ID_Fxy1, ID_Fx0z, ID_Fx1z, ID_F0yz, ID_F1yz, ID_Shell, ID_FirstV = ID_V000, ID_FirstE = ID_Ex00, ID_FirstF = ID_Fxy0 } | |
![]() | |
enum { SQUARE_DIST = 0, DRV_1, DRV_2, DRV_3 } | |
typedef std::pair< gp_XYZ, gp_XYZ > TxyzPair | |
![]() | |
bool computeParameters (const gp_Pnt &thePoint, gp_XYZ &theParams, const gp_XYZ &theParamsHint, int) | |
double distance () const | |
bool findUVAround (const gp_Pnt &thePoint, const gp_XY &theUV, const TFace &tface, gp_XYZ &theParams, int nbGetWorstLimit) | |
Finds parameters corresponding to a given UV of a given face by searching around the starting solution. More... | |
bool findUVByHalfDivision (const gp_Pnt &thePoint, const gp_XY &theUV, const TFace &tface, gp_XYZ &theParams) | |
Finds parameters corresponding to a given UV of a given face using half-division. More... | |
double funcValue (double sqDist) const | |
void init () | |
Call it after geometry initialisation. More... | |
void refineParametersOnFace (const gp_Pnt &thePoint, gp_XYZ &theParams, int theFaceID) | |
Find more precise solution. More... | |
bool saveBetterSolution (const gp_XYZ &theNewParams, gp_XYZ &theParams, double sqDistance) | |
Store a solution if it's better than a previous one. More... | |
![]() | |
TxyzPair my3x3x3GridNodes [1000] | |
TEdge myEdge [12] | |
TFace myFace [6] | |
int myFaceIndex | |
double myFaceParam | |
bool myGridComputed | |
int myNbIterations | |
gp_XYZ myParam | |
gp_XYZ myPnt [8] | |
gp_XYZ myPoint | |
bool mySquareFunc | |
double mySumDist | |
double myTolerance | |
double myValues [4] | |
Detailed Description
Tool analyzing and giving access to a prism geometry treating it like a block, i.e. the four side faces are emulated by division/uniting of missing/excess faces. It also manage associations between block sub-shapes and a mesh.
Constructor & Destructor Documentation
◆ StdMeshers_PrismAsBlock()
StdMeshers_PrismAsBlock::StdMeshers_PrismAsBlock | ( | ) |
Constructor. Initialization is needed.
◆ ~StdMeshers_PrismAsBlock()
StdMeshers_PrismAsBlock::~StdMeshers_PrismAsBlock | ( | ) |
References Clear().
Member Function Documentation
◆ Clear()
void StdMeshers_PrismAsBlock::Clear | ( | ) |
Free allocated memory.
Referenced by ~StdMeshers_PrismAsBlock().
◆ GetError()
SMESH_ComputeErrorPtr StdMeshers_PrismAsBlock::GetError | ( | ) | const |
Return problem description.
◆ GetLayersTransformation()
bool StdMeshers_PrismAsBlock::GetLayersTransformation | ( | std::vector< gp_Trsf > & | trsf, |
const Prism_3D::TPrismTopo & | prism | ||
) | const |
Return transformations to get coordinates of nodes of each internal layer by nodes of the bottom. Layer is a set of nodes at a certain step from bottom to top.
References GetParam2ColumnMap(), SMESH_Algo::isDegenerated(), SMESH_subMesh::IsEmpty(), MeshDS(), Prism_3D::TPrismTopo::myBottomEdges, Prism_3D::TPrismTopo::myNbEdgesInWires, SubMesh(), and VerticalSize().
◆ GetNodeColumn()
const TNodeColumn * StdMeshers_PrismAsBlock::GetNodeColumn | ( | const SMDS_MeshNode * | node | ) | const |
Return pointer to column of nodes.
- Parameters
-
node - bottom node from which the returned column goes up
- Return values
-
const TNodeColumn* - the found column
References SMDS_MeshElement::getshapeId().
◆ GetParam2ColumnMap()
const TParam2ColumnMap* StdMeshers_PrismAsBlock::GetParam2ColumnMap | ( | const int | baseEdgeID, |
bool & | isReverse | ||
) | const |
Return TParam2ColumnMap for a base edge.
- Parameters
-
baseEdgeID - base edge SMESHDS Index isReverse - columns in-block orientation
- Return values
-
const TParam2ColumnMap* - map
Referenced by GetLayersTransformation().
◆ HasNotQuadElemOnTop()
bool StdMeshers_PrismAsBlock::HasNotQuadElemOnTop | ( | ) | const |
◆ Init()
bool StdMeshers_PrismAsBlock::Init | ( | SMESH_MesherHelper * | helper, |
const Prism_3D::TPrismTopo & | thePrism | ||
) |
Initialization.
- Parameters
-
helper - helper loaded with mesh and 3D shape prism - prism topology
- Return values
-
bool - false if a mesh or a shape are KO
- Parameters
-
helper - helper loaded with mesh and 3D shape thePrism - a prism data
- Return values
-
bool - false if a mesh or a shape are KO
References SMESH_Block::TEdge::GetCurve(), SMESH_Block::GetEdgeVertexIDs(), SMESH_Block::GetFaceEdgesIDs(), SMESH_MesherHelper::GetMesh(), SMESH_MesherHelper::GetMeshDS(), SMDS_MeshElement::getshapeId(), SMESH_Block::ID_F0yz, SMESH_Block::ID_F1yz, SMESH_Block::ID_FirstE, SMESH_Block::ID_FirstF, SMESH_Block::ID_FirstV, SMESH_Block::ID_Fx0z, SMESH_Block::ID_Fx1z, SMESH_Block::init(), SMESH_Block::Insert(), IsForwardEdge(), SMESH_MesherHelper::LoadNodeColumns(), MeshDS(), Prism_3D::TPrismTopo::myBottom, Prism_3D::TPrismTopo::myBottomEdges, SMESH_Block::myEdge, SMESH_Block::myFace, Prism_3D::TPrismTopo::myNbEdgesInWires, Prism_3D::TPrismTopo::myNotQuadOnTop, SMESH_Block::myPnt, Prism_3D::TPrismTopo::myTop, Prism_3D::TPrismTopo::myWallQuads, SMESH_ComputeError::New(), SMESH_Block::TEdge::Set(), SMESH_Block::TFace::Set(), and SMESHDS_Mesh::ShapeToIndex().
◆ IsForwardEdge()
|
static |
Check curve orientation of a bootom edge.
- Parameters
-
meshDS - mesh DS columnsMap - node columns map of side face bottomEdge - the bootom edge sideFaceID - side face in-block ID
- Return values
-
bool - true if orienation coinside with in-block froward orienation
- Parameters
-
meshDS - mesh DS columnsMap - node columns map of side face bottomEdge - the bootom edge sideFaceID - side face in-block ID
- Return values
-
bool - true if orientation coinside with in-block forward orientation
References SMESH_MesherHelper::GetSubShapeByNode(), SMESH_Block::ID_F0yz, SMESH_Block::ID_Fx1z, and SMESH_MesherHelper::IsClosedEdge().
Referenced by Init().
◆ Mesh()
SMESH_Mesh* StdMeshers_PrismAsBlock::Mesh | ( | ) | const |
Return pointer to mesh.
- Return values
-
SMESH_Mesh - mesh
◆ MeshDS()
SMESHDS_Mesh* StdMeshers_PrismAsBlock::MeshDS | ( | ) | const |
Return pointer to mesh DS.
- Return values
-
SMESHDS_Mesh - mesh DS
Referenced by GetLayersTransformation(), and Init().
◆ Shape()
const TopoDS_Shape& StdMeshers_PrismAsBlock::Shape | ( | const int | shapeID | ) | const |
Return a in-block shape.
- Parameters
-
shapeID - shape given by in-block index
- Return values
-
SMESHDS_SubMesh* - found submesh
◆ ShapeID()
int StdMeshers_PrismAsBlock::ShapeID | ( | const TopoDS_Shape & | shape | ) | const |
Return in-block ID of a shape.
- Parameters
-
shape - block sub-shape
- Return values
-
int - ID or zero if the shape has no ID
◆ SubMesh()
SMESH_subMesh* StdMeshers_PrismAsBlock::SubMesh | ( | const int | shapeID | ) | const |
Return submesh of a shape.
- Parameters
-
shapeID - shape given by in-block index
- Return values
-
SMESH_subMesh* - found submesh
Referenced by GetLayersTransformation().
◆ SubMeshDS()
SMESHDS_SubMesh* StdMeshers_PrismAsBlock::SubMeshDS | ( | const int | shapeID | ) | const |
Return submesh DS of a shape.
- Parameters
-
shapeID - shape given by in-block index
- Return values
-
SMESHDS_SubMesh* - found submesh DS
◆ VerticalSize()
int StdMeshers_PrismAsBlock::VerticalSize | ( | ) | const |
Return number of nodes on every vertical edge.
- Return values
-
int - number of nodes including end nodes
Referenced by GetLayersTransformation().
The documentation for this class was generated from the following files:
- src/3rdParty/salomesmesh/inc/StdMeshers_Prism_3D.hxx
- src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Prism_3D.cpp