#include <SMESH_Block.hxx>

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, 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) | 
| Initialize block geometry with shapes from theShapeIDMap.  More... | |
| 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) | 
| Load face geometry.  More... | |
| 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) | 
| void | SetTolerance (const double tol) | 
| double | GetTolerance () const | 
| bool | IsToleranceReached () const | 
| double | DistanceReached () const | 
| 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) | 
| / Insert theShape into theShapeIDMap with theShapeID  More... | |
| 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, 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... | |
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, int) | 
| void | refineParametersOnFace (const gp_Pnt &thePoint, gp_XYZ &theParams, int theFaceID) | 
| Find more precise 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... | |
| 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 | saveBetterSolution (const gp_XYZ &theNewParams, gp_XYZ &theParams, double sqDistance) | 
| Store a solution if it's better than a previous one.  More... | |
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 [1000] | 
| bool | myGridComputed | 
      
  | 
  protected | 
| SMESH_Block::SMESH_Block | ( | ) | 
| 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)  | 
        ||
| ) | 
References computeParameters(), distance(), EdgeParameters(), SMESH_Block::TEdge::GetCurve(), GetShapeCoef(), ID_FirstE, IsEdgeID(), IsFaceID(), MESSAGE, my3x3x3GridNodes, myEdge, myFaceIndex, myFaceParam, myGridComputed, myNbIterations, mySumDist, myTolerance, myValues, SMESH_Block::TEdge::Point(), refineParametersOnFace(), ShellPoint(), SQUARE_DIST, and VertexParameters().
Referenced by StdMeshers_Projection_3D::Compute(), and StdMeshers_SMESHBlock::ComputeParameters().
      
  | 
  protected | 
References distance(), MESSAGE, myFaceIndex, myFaceParam, myNbIterations, myParam, myPoint, mySquareFunc, mySumDist, myTolerance, myValues, refineParametersOnFace(), and SQUARE_DIST.
Referenced by ComputeParameters().
| Standard_Boolean SMESH_Block::Derivatives | ( | const math_Vector & | X, | 
| math_Matrix & | D | ||
| ) | 
References Values().
      
  | 
  protected | 
| double SMESH_Block::DistanceReached | ( | ) | const | 
      
  | 
  static | 
References CASEDUMP, ID_E00z, ID_E01z, ID_E0y0, ID_E0y1, ID_E10z, ID_E11z, ID_E1y0, ID_E1y1, ID_Ex00, ID_Ex01, ID_Ex10, ID_Ex11, ID_F0yz, ID_F1yz, ID_Fx0z, ID_Fx1z, ID_Fxy0, ID_Fxy1, ID_Shell, ID_V000, ID_V001, ID_V010, ID_V011, ID_V100, ID_V101, ID_V110, and ID_V111.
Referenced by StdMeshers_PrismAsBlock::TSideFace::dumpNodes().
References SMESH_Block::TEdge::CoordInd(), SMESH_Block::TEdge::EndParam(), GetEdgeVertexIDs(), ID_Ex00, IsEdgeID(), myEdge, and VertexParameters().
Referenced by StdMeshers_SMESHBlock::ComputeParameters(), and ComputeParameters().
| bool SMESH_Block::EdgePoint | ( | const int | theEdgeID, | 
| const gp_XYZ & | theParams, | ||
| gp_XYZ & | thePoint | ||
| ) | const | 
Referenced by SMESH_Pattern::Apply(), StdMeshers_SMESHBlock::Point(), and StdMeshers_Penta_3D::SetHorizEdgeXYZ().
| bool SMESH_Block::FacePoint | ( | const int | theFaceID, | 
| const gp_XYZ & | theParams, | ||
| gp_XYZ & | thePoint | ||
| ) | const | 
Referenced by SMESH_Pattern::Apply(), and StdMeshers_SMESHBlock::Point().
      
  | 
  static | 
References Edge, Face, GetOrderedEdges(), and MESSAGE.
Referenced by StdMeshers_Projection_3D::IsApplicable(), StdMeshers_Prism_3D::IsApplicable(), SMESH_MesherHelper::IsBlock(), and LoadBlockShapes().
      
  | 
  protected | 
Finds parameters corresponding to a given UV of a given face by searching around the starting solution.
| [in] | theUV | - the UV to locate | 
| [in] | tface | - the face | 
| [in,out] | theParams | - the starting parameters to improve | 
| [in] | nbGetWorstLimit | - nb of steps from the starting solution w/o improvement to stop searching in this direction | 
true if found solution is within myTolerance References distance(), SMESH_Block::TFace::GetUInd(), SMESH_Block::TFace::GetVInd(), Max(), Min(), SMESH_Block::TFace::Point(), and saveBetterSolution().
Referenced by refineParametersOnFace().
      
  | 
  protected | 
Finds parameters corresponding to a given UV of a given face using half-division.
| [in] | theUV | - the UV to locate | 
| [in] | tface | - the face | 
| [in,out] | theParams | - the starting parameters to improve | 
true if found solution is within myTolerance References distance(), SMESH_Block::TFace::GetUInd(), SMESH_Block::TFace::GetVInd(), SMESH_Block::TFace::IsUVInQuad(), Max(), Min(), SMESH_Block::TFace::Point(), and saveBetterSolution().
Referenced by refineParametersOnFace().
Referenced by SMESH_Block::TEdge::Set(), and StdMeshers_Penta_3D::SetHorizEdgeXYZ().
References ID_E00z, ID_E01z, ID_E0y0, ID_E0y1, ID_E10z, ID_E11z, ID_E1y0, ID_E1y1, ID_Ex00, ID_Ex01, ID_Ex10, ID_Ex11, ID_V000, ID_V001, ID_V010, ID_V011, ID_V100, ID_V101, ID_V110, ID_V111, and MESSAGE.
Referenced by SMESH_Pattern::Apply(), StdMeshers_Projection_3D::Compute(), EdgeParameters(), StdMeshers_PrismAsBlock::Init(), StdMeshers_PrismAsBlock::TSideFace::InsertSubShapes(), and LoadMeshBlock().
References ID_E00z, ID_E01z, ID_E0y0, ID_E0y1, ID_E10z, ID_E11z, ID_E1y0, ID_E1y1, ID_Ex00, ID_Ex01, ID_Ex10, ID_Ex11, ID_F0yz, ID_F1yz, ID_Fx0z, ID_Fx1z, ID_Fxy0, ID_Fxy1, and MESSAGE.
Referenced by SMESH_Pattern::Apply(), StdMeshers_Projection_3D::Compute(), StdMeshers_PrismAsBlock::Init(), StdMeshers_PrismAsBlock::TSideFace::InsertSubShapes(), LoadFace(), LoadMeshBlock(), StdMeshers_Prism_3D::setFaceAndEdgesXYZ(), and StdMeshers_Penta_3D::SetHorizEdgeXYZ().
      
  | 
  static | 
Return number of wires and a list of oredered edges.
| theFace | - the face to process | 
| theEdges | - all ordered edges of theFace (outer edges go first). | 
| theNbEdgesInWires | - nb of edges (== nb of vertices in closed wire) in each wire | 
| theFirstVertex | - the vertex of the outer wire to set first in the returned list ( theFirstVertex may be NULL ) | 
| theShapeAnalysisAlgo | - if true, ShapeAnalysis::OuterWire() is used to find the outer wire else BRepTools::OuterWire() is used. | 
| int | - nb of wires | 
Always try to set a seam edge first. BRepTools::OuterWire() fails e.g. in the case of issue 0020184, ShapeAnalysis::OuterWire() fails in the case of issue 0020452
References Edge, Handle(), and MESSAGE.
Referenced by SMESH_Pattern::Apply(), StdMeshers_Quadrangle_2D::CheckNbEdges(), StdMeshers_Quadrangle_2D::checkNbEdgesForEvaluate(), StdMeshers_Projection_2D::Compute(), FindBlockShapes(), StdMeshers_ProjectionUtils::FindFaceAssociation(), StdMeshers_FaceSide::GetFaceWires(), _QuadFaceGrid::Init(), StdMeshers_Prism_3D::initPrism(), and SMESH_MesherHelper::IsStructured().
      
  | 
  static | 
Referenced by ComputeParameters().
      
  | 
  static | 
References MESSAGE.
Referenced by SMESH_Pattern::findBoundaryPoints(), and StdMeshers_Penta_3D::FindNodeOnShape().
| Standard_Integer SMESH_Block::GetStateNumber | ( | ) | 
| double SMESH_Block::GetTolerance | ( | ) | const | 
      
  | 
  protected | 
Call it after geometry initialisation.
References myGridComputed, myNbIterations, and mySumDist.
Referenced by StdMeshers_PrismAsBlock::Init(), LoadBlockShapes(), and LoadMeshBlock().
      
  | 
  static | 
/ Insert theShape into theShapeIDMap with theShapeID
| theShape | - shape to insert | 
| theShapeID | - shape in-block ID | 
| theShapeIDMap | - map of block sub-shapes | 
Referenced by StdMeshers_PrismAsBlock::Init(), and StdMeshers_PrismAsBlock::TSideFace::InsertSubShapes().
      
  | 
  static | 
Referenced by StdMeshers_SMESHBlock::IsForwadEdge(), LoadBlockShapes(), and LoadFace().
| bool SMESH_Block::IsToleranceReached | ( | ) | const | 
References distance(), and myTolerance.
| bool SMESH_Block::LoadBlockShapes | ( | const TopoDS_Shell & | theShell, | 
| const TopoDS_Vertex & | theVertex000, | ||
| const TopoDS_Vertex & | theVertex001, | ||
| TopTools_IndexedMapOfOrientedShape & | theShapeIDMap | ||
| ) | 
References FindBlockShapes().
Referenced by SMESH_Pattern::Apply(), StdMeshers_Projection_3D::Compute(), and StdMeshers_SMESHBlock::Load().
| bool SMESH_Block::LoadBlockShapes | ( | const TopTools_IndexedMapOfOrientedShape & | theShapeIDMap | ) | 
Initialize block geometry with shapes from theShapeIDMap.
| theShapeIDMap | - map of block sub-shapes | 
| bool | - is a success | 
References Edge, Face, ID_FirstE, ID_V000, ID_V111, init(), IsEdgeID(), IsForwardEdge(), IsVertexID(), LoadFace(), myEdge, myPnt, and SMESH_Block::TEdge::Set().
| bool SMESH_Block::LoadFace | ( | const TopoDS_Face & | theFace, | 
| const int | theFaceID, | ||
| const TopTools_IndexedMapOfOrientedShape & | theShapeIDMap | ||
| ) | 
Load face geometry.
| theFace | - face | 
| theFaceID | - face in-block ID | 
| theShapeIDMap | - map of block sub-shapes | 
| bool | - is a success | 
It is enough to compute params or coordinates on the face. Face sub-shapes must be loaded into theShapeIDMap before
References Edge, GetFaceEdgesIDs(), ID_FirstF, IsFaceID(), IsForwardEdge(), myFace, and SMESH_Block::TFace::Set().
Referenced by LoadBlockShapes().
| bool SMESH_Block::LoadMeshBlock | ( | const SMDS_MeshVolume * | theVolume, | 
| const int | theNode000Index, | ||
| const int | theNode001Index, | ||
| std::vector< const SMDS_MeshNode * > & | theOrderedNodes | ||
| ) | 
References GetEdgeVertexIDs(), GetFaceEdgesIDs(), SMDS_VolumeTool::GetFaceNodesIndices(), SMDS_VolumeTool::GetNodes(), gpXYZ, ID_Ex00, ID_FirstE, ID_FirstF, ID_Fxy0, ID_Shell, ID_V000, ID_V001, ID_V010, ID_V011, ID_V100, ID_V101, ID_V110, ID_V111, init(), SMDS_VolumeTool::IsLinked(), MESSAGE, myEdge, myFace, myPnt, NbEdges(), SMDS_VolumeTool::NbFaces(), SMDS_VolumeTool::NbNodes(), SMDS_VolumeTool::Set(), SMESH_Block::TEdge::Set(), SMESH_Block::TFace::Set(), and SMDS_VolumeTool::SetExternalNormal().
Referenced by SMESH_Pattern::Apply().
      
  | 
  static | 
Referenced by LoadMeshBlock(), and StdMeshers_SMESHBlock::StdMeshers_SMESHBlock().
| Standard_Integer SMESH_Block::NbEquations | ( | ) | const | 
      
  | 
  static | 
Referenced by StdMeshers_Penta_3D::StdMeshers_Penta_3D().
      
  | 
  static | 
Referenced by StdMeshers_Penta_3D::StdMeshers_Penta_3D().
| Standard_Integer SMESH_Block::NbVariables | ( | ) | const | 
      
  | 
  static | 
      
  | 
  protected | 
Find more precise solution.
| [in] | thePoint | - the point | 
| [in,out] | theParams | - solution to precise | 
| [in] | theFaceID | - FACE ID | 
References distance(), findUVAround(), findUVByHalfDivision(), SMESH_Block::TFace::GetUInd(), SMESH_Block::TFace::GetVInd(), ID_FirstF, myFace, myTolerance, SMESH_Block::TFace::Point(), and SMESH_Block::TFace::Surface().
Referenced by ComputeParameters(), and computeParameters().
      
  | 
  protected | 
Store a solution if it's better than a previous one.
| [in] | theNewParams | - a new solution | 
| [out] | theParams | - the parameters to store solution in | 
| [in] | sqDistance | - a square distance reached at theNewParams | 
References distance(), myTolerance, myValues, and SQUARE_DIST.
Referenced by findUVAround(), and findUVByHalfDivision().
| void SMESH_Block::SetTolerance | ( | const double | tol | ) | 
References myTolerance.
| bool SMESH_Block::ShellPoint | ( | const gp_XYZ & | theParams, | 
| gp_XYZ & | thePoint | ||
| ) | const | 
Referenced by SMESH_MesherHelper::AddVolume(), SMESH_Pattern::Apply(), StdMeshers_HexaFromSkin_3D::Compute(), StdMeshers_Projection_3D::Compute(), StdMeshers_CompositeHexa_3D::Compute(), StdMeshers_Hexa_3D::Compute(), StdMeshers_Prism_3D::compute(), ComputeParameters(), StdMeshers_Penta_3D::CreateNode(), StdMeshers_PrismAsBlock::faceGridToPythonDump(), SMESH_MesherHelper::FixQuadraticElements(), StdMeshers_SMESHBlock::Point(), Value(), and Values().
      
  | 
  static | 
| Standard_Boolean SMESH_Block::Value | ( | const math_Vector & | X, | 
| math_Vector & | F | ||
| ) | 
References funcValue(), myParam, myPoint, myValues, ShellPoint(), and SQUARE_DIST.
| Standard_Boolean SMESH_Block::Values | ( | const math_Vector & | X, | 
| math_Vector & | F, | ||
| math_Matrix & | D | ||
| ) | 
References Abs(), DRV_1, DRV_2, DRV_3, funcValue(), MESSAGE, myFaceIndex, myNbIterations, myParam, myPoint, myTolerance, myValues, ShellPoint(), and SQUARE_DIST.
Referenced by Derivatives().
References ID_V000, ID_V010, ID_V100, and ID_V110.
Referenced by ComputeParameters(), and EdgeParameters().
Referenced by SMESH_Pattern::Apply(), and StdMeshers_SMESHBlock::Point().
      
  | 
  protected | 
Referenced by ComputeParameters().
      
  | 
  protected | 
Referenced by ComputeParameters(), EdgeParameters(), StdMeshers_PrismAsBlock::Init(), LoadBlockShapes(), and LoadMeshBlock().
      
  | 
  protected | 
      
  | 
  protected | 
Referenced by ComputeParameters(), computeParameters(), and Values().
      
  | 
  protected | 
Referenced by ComputeParameters(), and computeParameters().
      
  | 
  protected | 
Referenced by ComputeParameters(), and init().
      
  | 
  protected | 
Referenced by ComputeParameters(), computeParameters(), init(), and Values().
      
  | 
  protected | 
Referenced by computeParameters(), Value(), and Values().
      
  | 
  protected | 
Referenced by StdMeshers_PrismAsBlock::Init(), LoadBlockShapes(), and LoadMeshBlock().
      
  | 
  protected | 
Referenced by computeParameters(), Value(), and Values().
      
  | 
  protected | 
Referenced by computeParameters().
      
  | 
  protected | 
Referenced by ComputeParameters(), computeParameters(), and init().
      
  | 
  protected | 
Referenced by ComputeParameters(), computeParameters(), IsToleranceReached(), refineParametersOnFace(), saveBetterSolution(), SetTolerance(), and Values().
      
  | 
  protected | 
Referenced by ComputeParameters(), computeParameters(), saveBetterSolution(), Value(), and Values().