SALOME - SMESH
SMESH_Block Class Reference

#include <SMESH_Block.hxx>

Inheritance diagram for SMESH_Block:
Inheritance graph
Collaboration diagram for SMESH_Block:
Collaboration graph

Data Structures

class  TEdge
 
class  TFace
 

Public Types

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
}
 
enum  { ID_FirstV = ID_V000, ID_FirstE = ID_Ex00, ID_FirstF = ID_Fxy0 }
 

Public Member Functions

 SMESH_Block ()
 
bool LoadBlockShapes (const TopoDS_Shell &theShell, const TopoDS_Vertex &theVertex000, const TopoDS_Vertex &theVertex001, TopTools_IndexedMapOfOrientedShape &theShapeIDMap)
 
bool LoadBlockShapes (const TopTools_IndexedMapOfOrientedShape &theShapeIDMap)
 
bool LoadMeshBlock (const SMDS_MeshVolume *theVolume, const int theNode000Index, const int theNode001Index, std::vector< const SMDS_MeshNode *> &theOrderedNodes)
 
bool LoadFace (const TopoDS_Face &theFace, const int theFaceID, const TopTools_IndexedMapOfOrientedShape &theShapeIDMap)
 
bool VertexPoint (const int theVertexID, gp_XYZ &thePoint) const
 
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
 
bool ShellPoint (const gp_XYZ &theParams, gp_XYZ &thePoint) const
 
bool ComputeParameters (const gp_Pnt &thePoint, gp_XYZ &theParams, const int theShapeID=ID_Shell, const gp_XYZ &theParamsHint=gp_XYZ(-1,-1,-1))
 
bool VertexParameters (const int theVertexID, gp_XYZ &theParams)
 
bool EdgeParameters (const int theEdgeID, const double theU, gp_XYZ &theParams)
 
Standard_Integer NbVariables () const
 
Standard_Integer NbEquations () const
 
Standard_Boolean Value (const math_Vector &X, math_Vector &F)
 
Standard_Boolean Derivatives (const math_Vector &X, math_Matrix &D)
 
Standard_Boolean Values (const math_Vector &X, math_Vector &F, math_Matrix &D)
 
Standard_Integer GetStateNumber ()
 

Static Public Member Functions

static int NbVertices ()
 
static int NbEdges ()
 
static int NbFaces ()
 
static int NbSubShapes ()
 
static bool IsVertexID (int theShapeID)
 
static bool IsEdgeID (int theShapeID)
 
static bool IsFaceID (int theShapeID)
 
static int ShapeIndex (int theShapeID)
 
static void GetFaceEdgesIDs (const int faceID, std::vector< int > &edgeVec)
 
static void GetEdgeVertexIDs (const int edgeID, std::vector< int > &vertexVec)
 
static int GetCoordIndOnEdge (const int theEdgeID)
 
static double * GetShapeCoef (const int theShapeID)
 
static int GetShapeIDByParams (const gp_XYZ &theParams)
 
static std::ostream & DumpShapeID (const int theBlockShapeID, std::ostream &stream)
 
static bool Insert (const TopoDS_Shape &theShape, const int theShapeID, TopTools_IndexedMapOfOrientedShape &theShapeIDMap)
 
static bool FindBlockShapes (const TopoDS_Shell &theShell, const TopoDS_Vertex &theVertex000, const TopoDS_Vertex &theVertex001, TopTools_IndexedMapOfOrientedShape &theShapeIDMap)
 
static bool ShellPoint (const gp_XYZ &theParams, const std::vector< gp_XYZ > &thePointOnShape, gp_XYZ &thePoint)
 
static bool IsForwardEdge (const TopoDS_Edge &theEdge, const TopTools_IndexedMapOfOrientedShape &theShapeIDMap)
 
static int GetOrderedEdges (const TopoDS_Face &theFace, TopoDS_Vertex theFirstVertex, std::list< TopoDS_Edge > &theEdges, std::list< int > &theNbVertexInWires, const bool theShapeAnalysisAlgo=false)
 

Protected Types

enum  { SQUARE_DIST = 0, DRV_1, DRV_2, DRV_3 }
 
typedef std::pair< gp_XYZ, gp_XYZ > TxyzPair
 

Protected Member Functions

void init ()
 Call it after geometry initialisation. More...
 
double distance () const
 
double funcValue (double sqDist) const
 
bool computeParameters (const gp_Pnt &thePoint, gp_XYZ &theParams, const gp_XYZ &theParamsHint)
 

Protected Attributes

gp_XYZ myPnt [8]
 
TEdge myEdge [12]
 
TFace myFace [6]
 
int myFaceIndex
 
double myFaceParam
 
int myNbIterations
 
double mySumDist
 
double myTolerance
 
bool mySquareFunc
 
gp_XYZ myPoint
 
gp_XYZ myParam
 
double myValues [4]
 
TxyzPair my3x3x3GridNodes [27]
 
bool myGridComputed
 

Detailed Description

Definition at line 61 of file SMESH_Block.hxx.

Member Typedef Documentation

◆ TxyzPair

typedef std::pair<gp_XYZ,gp_XYZ> SMESH_Block::TxyzPair
protected

Definition at line 384 of file SMESH_Block.hxx.

Member Enumeration Documentation

◆ TShapeID

Enumerator
ID_NONE 
ID_V000 
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 

Definition at line 64 of file SMESH_Block.hxx.

◆ anonymous enum

anonymous enum
Enumerator
ID_FirstV 
ID_FirstE 
ID_FirstF 

Definition at line 80 of file SMESH_Block.hxx.

◆ anonymous enum

anonymous enum
protected
Enumerator
SQUARE_DIST 
DRV_1 
DRV_2 
DRV_3 

Definition at line 368 of file SMESH_Block.hxx.

Constructor & Destructor Documentation

◆ SMESH_Block()

SMESH_Block::SMESH_Block ( )

Member Function Documentation

◆ NbVertices()

static int SMESH_Block::NbVertices ( )
static

Definition at line 92 of file SMESH_Block.hxx.

◆ NbEdges()

static int SMESH_Block::NbEdges ( )
static

Definition at line 93 of file SMESH_Block.hxx.

◆ NbFaces()

static int SMESH_Block::NbFaces ( )
static

Definition at line 94 of file SMESH_Block.hxx.

◆ NbSubShapes()

static int SMESH_Block::NbSubShapes ( )
static

Definition at line 95 of file SMESH_Block.hxx.

◆ IsVertexID()

static bool SMESH_Block::IsVertexID ( int  theShapeID)
static

Definition at line 98 of file SMESH_Block.hxx.

◆ IsEdgeID()

static bool SMESH_Block::IsEdgeID ( int  theShapeID)
static

Definition at line 101 of file SMESH_Block.hxx.

◆ IsFaceID()

static bool SMESH_Block::IsFaceID ( int  theShapeID)
static

Definition at line 104 of file SMESH_Block.hxx.

◆ ShapeIndex()

static int SMESH_Block::ShapeIndex ( int  theShapeID)
static

Definition at line 107 of file SMESH_Block.hxx.

◆ GetFaceEdgesIDs()

static void SMESH_Block::GetFaceEdgesIDs ( const int  faceID,
std::vector< int > &  edgeVec 
)
static

◆ GetEdgeVertexIDs()

static void SMESH_Block::GetEdgeVertexIDs ( const int  edgeID,
std::vector< int > &  vertexVec 
)
static

◆ GetCoordIndOnEdge()

static int SMESH_Block::GetCoordIndOnEdge ( const int  theEdgeID)
static

Definition at line 125 of file SMESH_Block.hxx.

◆ GetShapeCoef()

static double* SMESH_Block::GetShapeCoef ( const int  theShapeID)
static

◆ GetShapeIDByParams()

static int SMESH_Block::GetShapeIDByParams ( const gp_XYZ &  theParams)
static

◆ DumpShapeID()

static std::ostream& SMESH_Block::DumpShapeID ( const int  theBlockShapeID,
std::ostream &  stream 
)
static

◆ LoadBlockShapes() [1/2]

bool SMESH_Block::LoadBlockShapes ( const TopoDS_Shell &  theShell,
const TopoDS_Vertex &  theVertex000,
const TopoDS_Vertex &  theVertex001,
TopTools_IndexedMapOfOrientedShape &  theShapeIDMap 
)

◆ LoadBlockShapes() [2/2]

bool SMESH_Block::LoadBlockShapes ( const TopTools_IndexedMapOfOrientedShape &  theShapeIDMap)

◆ LoadMeshBlock()

bool SMESH_Block::LoadMeshBlock ( const SMDS_MeshVolume theVolume,
const int  theNode000Index,
const int  theNode001Index,
std::vector< const SMDS_MeshNode *> &  theOrderedNodes 
)

◆ LoadFace()

bool SMESH_Block::LoadFace ( const TopoDS_Face &  theFace,
const int  theFaceID,
const TopTools_IndexedMapOfOrientedShape &  theShapeIDMap 
)

◆ Insert()

static bool SMESH_Block::Insert ( const TopoDS_Shape &  theShape,
const int  theShapeID,
TopTools_IndexedMapOfOrientedShape &  theShapeIDMap 
)
static

◆ FindBlockShapes()

static bool SMESH_Block::FindBlockShapes ( const TopoDS_Shell &  theShell,
const TopoDS_Vertex &  theVertex000,
const TopoDS_Vertex &  theVertex001,
TopTools_IndexedMapOfOrientedShape &  theShapeIDMap 
)
static

◆ VertexPoint()

bool SMESH_Block::VertexPoint ( const int  theVertexID,
gp_XYZ &  thePoint 
) const

Definition at line 195 of file SMESH_Block.hxx.

◆ EdgePoint()

bool SMESH_Block::EdgePoint ( const int  theEdgeID,
const gp_XYZ &  theParams,
gp_XYZ &  thePoint 
) const

Definition at line 201 of file SMESH_Block.hxx.

◆ EdgeU()

bool SMESH_Block::EdgeU ( const int  theEdgeID,
const gp_XYZ &  theParams,
double &  theU 
) const

Definition at line 207 of file SMESH_Block.hxx.

◆ FacePoint()

bool SMESH_Block::FacePoint ( const int  theFaceID,
const gp_XYZ &  theParams,
gp_XYZ &  thePoint 
) const

Definition at line 213 of file SMESH_Block.hxx.

◆ FaceUV()

bool SMESH_Block::FaceUV ( const int  theFaceID,
const gp_XYZ &  theParams,
gp_XY &  theUV 
) const

Definition at line 219 of file SMESH_Block.hxx.

◆ ShellPoint() [1/2]

bool SMESH_Block::ShellPoint ( const gp_XYZ &  theParams,
gp_XYZ &  thePoint 
) const

◆ ShellPoint() [2/2]

static bool SMESH_Block::ShellPoint ( const gp_XYZ &  theParams,
const std::vector< gp_XYZ > &  thePointOnShape,
gp_XYZ &  thePoint 
)
static

◆ ComputeParameters()

bool SMESH_Block::ComputeParameters ( const gp_Pnt &  thePoint,
gp_XYZ &  theParams,
const int  theShapeID = ID_Shell,
const gp_XYZ &  theParamsHint = gp_XYZ(-1,-1,-1) 
)

◆ VertexParameters()

bool SMESH_Block::VertexParameters ( const int  theVertexID,
gp_XYZ &  theParams 
)

◆ EdgeParameters()

bool SMESH_Block::EdgeParameters ( const int  theEdgeID,
const double  theU,
gp_XYZ &  theParams 
)

◆ IsForwardEdge()

static bool SMESH_Block::IsForwardEdge ( const TopoDS_Edge &  theEdge,
const TopTools_IndexedMapOfOrientedShape &  theShapeIDMap 
)
static

Definition at line 268 of file SMESH_Block.hxx.

◆ GetOrderedEdges()

static int SMESH_Block::GetOrderedEdges ( const TopoDS_Face &  theFace,
TopoDS_Vertex  theFirstVertex,
std::list< TopoDS_Edge > &  theEdges,
std::list< int > &  theNbVertexInWires,
const bool  theShapeAnalysisAlgo = false 
)
static

◆ NbVariables()

Standard_Integer SMESH_Block::NbVariables ( ) const

◆ NbEquations()

Standard_Integer SMESH_Block::NbEquations ( ) const

◆ Value()

Standard_Boolean SMESH_Block::Value ( const math_Vector &  X,
math_Vector &  F 
)

◆ Derivatives()

Standard_Boolean SMESH_Block::Derivatives ( const math_Vector &  X,
math_Matrix &  D 
)

◆ Values()

Standard_Boolean SMESH_Block::Values ( const math_Vector &  X,
math_Vector &  F,
math_Matrix &  D 
)

◆ GetStateNumber()

Standard_Integer SMESH_Block::GetStateNumber ( )

◆ init()

void SMESH_Block::init ( )
protected

Call it after geometry initialisation.

◆ distance()

double SMESH_Block::distance ( ) const
protected

Definition at line 369 of file SMESH_Block.hxx.

◆ funcValue()

double SMESH_Block::funcValue ( double  sqDist) const
protected

Definition at line 370 of file SMESH_Block.hxx.

◆ computeParameters()

bool SMESH_Block::computeParameters ( const gp_Pnt &  thePoint,
gp_XYZ &  theParams,
const gp_XYZ &  theParamsHint 
)
protected

Field Documentation

◆ myPnt

gp_XYZ SMESH_Block::myPnt[8]
protected

Definition at line 360 of file SMESH_Block.hxx.

◆ myEdge

TEdge SMESH_Block::myEdge[12]
protected

Definition at line 362 of file SMESH_Block.hxx.

◆ myFace

TFace SMESH_Block::myFace[6]
protected

Definition at line 364 of file SMESH_Block.hxx.

◆ myFaceIndex

int SMESH_Block::myFaceIndex
protected

Definition at line 373 of file SMESH_Block.hxx.

◆ myFaceParam

double SMESH_Block::myFaceParam
protected

Definition at line 374 of file SMESH_Block.hxx.

◆ myNbIterations

int SMESH_Block::myNbIterations
protected

Definition at line 375 of file SMESH_Block.hxx.

◆ mySumDist

double SMESH_Block::mySumDist
protected

Definition at line 376 of file SMESH_Block.hxx.

◆ myTolerance

double SMESH_Block::myTolerance
protected

Definition at line 377 of file SMESH_Block.hxx.

◆ mySquareFunc

bool SMESH_Block::mySquareFunc
protected

Definition at line 378 of file SMESH_Block.hxx.

◆ myPoint

gp_XYZ SMESH_Block::myPoint
protected

Definition at line 380 of file SMESH_Block.hxx.

◆ myParam

gp_XYZ SMESH_Block::myParam
protected

Definition at line 381 of file SMESH_Block.hxx.

◆ myValues

double SMESH_Block::myValues[4]
protected

Definition at line 382 of file SMESH_Block.hxx.

◆ my3x3x3GridNodes

TxyzPair SMESH_Block::my3x3x3GridNodes[27]
protected

Definition at line 385 of file SMESH_Block.hxx.

◆ myGridComputed

bool SMESH_Block::myGridComputed
protected

Definition at line 386 of file SMESH_Block.hxx.