SMESH_Pattern Class Reference

#include <SMESH_Pattern.hxx>

Collaboration diagram for SMESH_Pattern:
Collaboration graph

Data Structures

struct  TPoint

Public Types

enum  ErrorCode {
  ERR_OK, ERR_READ_NB_POINTS, ERR_READ_POINT_COORDS, ERR_READ_TOO_FEW_POINTS,
  ERR_READ_3D_COORD, ERR_READ_NO_KEYPOINT, ERR_READ_BAD_INDEX, ERR_READ_ELEM_POINTS,
  ERR_READ_NO_ELEMS, ERR_READ_BAD_KEY_POINT, ERR_SAVE_NOT_LOADED, ERR_LOAD_EMPTY_SUBMESH,
  ERR_LOADF_NARROW_FACE, ERR_LOADF_CLOSED_FACE, ERR_LOADF_CANT_PROJECT, ERR_LOADV_BAD_SHAPE,
  ERR_LOADV_COMPUTE_PARAMS, ERR_APPL_NOT_COMPUTED, ERR_APPL_NOT_LOADED, ERR_APPL_BAD_DIMENTION,
  ERR_APPL_BAD_NB_VERTICES, ERR_APPLF_BAD_TOPOLOGY, ERR_APPLF_BAD_VERTEX, ERR_APPLF_INTERNAL_EEROR,
  ERR_APPLV_BAD_SHAPE, ERR_APPLF_BAD_FACE_GEOM, ERR_MAKEM_NOT_COMPUTED
}

Public Member Functions

 SMESH_Pattern ()
void Clear ()
bool Load (const char *theFileContents)
bool Load (SMESH_Mesh *theMesh, const TopoDS_Face &theFace, bool theProject=false)
bool Load (SMESH_Mesh *theMesh, const TopoDS_Shell &theBlock)
bool Save (std::ostream &theFile)
bool Apply (const TopoDS_Face &theFace, const TopoDS_Vertex &theVertexOnKeyPoint1, const bool theReverse)
bool Apply (const TopoDS_Shell &theBlock, const TopoDS_Vertex &theVertex000, const TopoDS_Vertex &theVertex001)
bool Apply (const SMDS_MeshFace *theFace, const int theNodeIndexOnKeyPoint1, const bool theReverse)
bool Apply (SMESH_Mesh *theMesh, const SMDS_MeshFace *theFace, const TopoDS_Shape &theSurface, const int theNodeIndexOnKeyPoint1, const bool theReverse)
bool Apply (SMESH_Mesh *theMesh, std::set< const SMDS_MeshFace * > &theFaces, const int theNodeIndexOnKeyPoint1, const bool theReverse)
bool Apply (const SMDS_MeshVolume *theVolume, const int theNode000Index, const int theNode001Index)
bool Apply (std::set< const SMDS_MeshVolume * > &theVolumes, const int theNode000Index, const int theNode001Index)
bool GetMappedPoints (std::list< const gp_XYZ * > &thePoints) const
bool MakeMesh (SMESH_Mesh *theMesh, const bool toCreatePolygons=false, const bool toCreatePolyedrs=false)
ErrorCode GetErrorCode () const
bool IsLoaded () const
bool Is2D () const
bool GetPoints (std::list< const gp_XYZ * > &thePoints) const
const std::list< int > & GetKeyPointIDs () const
const std::list< std::list
< int > > & 
GetElementPointIDs (bool applied) const
void DumpPoints () const
TopoDS_Shape GetSubShape (const int i) const

Private Types

typedef std::list< std::list
< TopoDS_Edge > > 
TListOfEdgesList
typedef std::set< const
SMDS_MeshNode * > 
TNodeSet
typedef std::list< intTElemDef

Private Member Functions

bool setErrorCode (const ErrorCode theErrorCode)
bool setShapeToMesh (const TopoDS_Shape &theShape)
std::list< TPoint * > & getShapePoints (const TopoDS_Shape &theShape)
std::list< TPoint * > & getShapePoints (const int theShapeID)
bool findBoundaryPoints ()
void arrangeBoundaries (std::list< std::list< TPoint * > > &boundaryPoints)
void computeUVOnEdge (const TopoDS_Edge &theEdge, const std::list< TPoint * > &ePoints)
bool compUVByIsoIntersection (const std::list< std::list< TPoint * > > &boundaryPoints, const gp_XY &theInitUV, gp_XY &theUV, bool &theIsDeformed)
bool compUVByElasticIsolines (const std::list< std::list< TPoint * > > &boundaryPoints, const std::list< TPoint * > &pointsToCompute)
double setFirstEdge (std::list< TopoDS_Edge > &theWire, int theFirstEdgeID)
bool sortSameSizeWires (TListOfEdgesList &theWireList, const TListOfEdgesList::iterator &theFromWire, const TListOfEdgesList::iterator &theToWire, const int theFirstEdgeID, std::list< std::list< TPoint * > > &theEdgesPointsList)
void mergePoints (const bool uniteGroups)
void makePolyElements (const std::vector< const SMDS_MeshNode * > &theNodes, const bool toCreatePolygons, const bool toCreatePolyedrs)
void createElements (SMESH_Mesh *theMesh, const std::vector< const SMDS_MeshNode * > &theNodesVector, const std::list< std::list< int > > &theElemNodeIDs, const std::vector< const SMDS_MeshElement * > &theElements)
bool getFacesDefinition (const SMDS_MeshNode **theBndNodes, const int theNbBndNodes, const std::vector< const SMDS_MeshNode * > &theNodes, std::list< int > &theFaceDefs, std::vector< int > &theQuantity)
bool isReversed (const SMDS_MeshNode *theFirstNode, const std::list< int > &theIdsList) const
void clearMesh (SMESH_Mesh *theMesh) const

Static Private Member Functions

static SMESHDS_SubMeshgetSubmeshWithElements (SMESH_Mesh *theMesh, const TopoDS_Shape &theShape)

Private Attributes

bool myIs2D
std::vector< TPointmyPoints
std::list< intmyKeyPointIDs
std::list< TElemDefmyElemPointIDs
ErrorCode myErrorCode
bool myIsComputed
bool myIsBoundaryPointsFound
TopoDS_Shape myShape
TopTools_IndexedMapOfOrientedShape myShapeIDMap
std::map< int, std::list
< TPoint * > > 
myShapeIDToPointsMap
std::list< intmyNbKeyPntInBoundary
std::vector< gp_XYZ > myXYZ
std::list< TElemDefmyElemXYZIDs
std::map< int, const
SMDS_MeshNode * > 
myXYZIdToNodeMap
std::vector< const
SMDS_MeshElement * > 
myElements
std::vector< const
SMDS_MeshNode * > 
myOrderedNodes
std::vector< const
SMDS_MeshElement * > 
myPolyElems
std::list< TElemDefmyPolyElemXYZIDs
std::list< std::vector< int > > myPolyhedronQuantities
std::map< TNodeSet, std::list
< std::list< int > > > 
myIdsOnBoundary
std::map< int, std::list
< TElemDef * > > 
myReverseConnectivity

Friends

std::ostream & operator<< (std::ostream &OS, const TPoint &p)

Detailed Description

Definition at line 67 of file SMESH_Pattern.hxx.


Member Typedef Documentation

typedef std::list< std::list< TopoDS_Edge > > SMESH_Pattern.TListOfEdgesList [private]

Definition at line 296 of file SMESH_Pattern.hxx.

typedef std::set<const SMDS_MeshNode*> SMESH_Pattern.TNodeSet [private]

Definition at line 309 of file SMESH_Pattern.hxx.

typedef std::list< int > SMESH_Pattern.TElemDef [private]

Definition at line 349 of file SMESH_Pattern.hxx.


Member Enumeration Documentation

Enumerator:
ERR_OK 
ERR_READ_NB_POINTS 
ERR_READ_POINT_COORDS 
ERR_READ_TOO_FEW_POINTS 
ERR_READ_3D_COORD 
ERR_READ_NO_KEYPOINT 
ERR_READ_BAD_INDEX 
ERR_READ_ELEM_POINTS 
ERR_READ_NO_ELEMS 
ERR_READ_BAD_KEY_POINT 
ERR_SAVE_NOT_LOADED 
ERR_LOAD_EMPTY_SUBMESH 
ERR_LOADF_NARROW_FACE 
ERR_LOADF_CLOSED_FACE 
ERR_LOADF_CANT_PROJECT 
ERR_LOADV_BAD_SHAPE 
ERR_LOADV_COMPUTE_PARAMS 
ERR_APPL_NOT_COMPUTED 
ERR_APPL_NOT_LOADED 
ERR_APPL_BAD_DIMENTION 
ERR_APPL_BAD_NB_VERTICES 
ERR_APPLF_BAD_TOPOLOGY 
ERR_APPLF_BAD_VERTEX 
ERR_APPLF_INTERNAL_EEROR 
ERR_APPLV_BAD_SHAPE 
ERR_APPLF_BAD_FACE_GEOM 
ERR_MAKEM_NOT_COMPUTED 

Definition at line 163 of file SMESH_Pattern.hxx.


Constructor & Destructor Documentation

SMESH_Pattern.SMESH_Pattern (  ) 

Member Function Documentation

void SMESH_Pattern.Clear (  ) 
bool SMESH_Pattern.Load ( const char *  theFileContents  ) 
bool SMESH_Pattern.Load ( SMESH_Mesh theMesh,
const TopoDS_Face &  theFace,
bool  theProject = false 
)
bool SMESH_Pattern.Load ( SMESH_Mesh theMesh,
const TopoDS_Shell &  theBlock 
)
bool SMESH_Pattern.Save ( std::ostream &  theFile  ) 
bool SMESH_Pattern.Apply ( const TopoDS_Face &  theFace,
const TopoDS_Vertex &  theVertexOnKeyPoint1,
const bool  theReverse 
)
bool SMESH_Pattern.Apply ( const TopoDS_Shell &  theBlock,
const TopoDS_Vertex &  theVertex000,
const TopoDS_Vertex &  theVertex001 
)
bool SMESH_Pattern.Apply ( const SMDS_MeshFace theFace,
const int  theNodeIndexOnKeyPoint1,
const bool  theReverse 
)
bool SMESH_Pattern.Apply ( SMESH_Mesh theMesh,
const SMDS_MeshFace theFace,
const TopoDS_Shape theSurface,
const int  theNodeIndexOnKeyPoint1,
const bool  theReverse 
)
bool SMESH_Pattern.Apply ( SMESH_Mesh theMesh,
std::set< const SMDS_MeshFace * > &  theFaces,
const int  theNodeIndexOnKeyPoint1,
const bool  theReverse 
)
bool SMESH_Pattern.Apply ( const SMDS_MeshVolume theVolume,
const int  theNode000Index,
const int  theNode001Index 
)
bool SMESH_Pattern.Apply ( std::set< const SMDS_MeshVolume * > &  theVolumes,
const int  theNode000Index,
const int  theNode001Index 
)
bool SMESH_Pattern.GetMappedPoints ( std::list< const gp_XYZ * > &  thePoints  )  const
bool SMESH_Pattern.MakeMesh ( SMESH_Mesh theMesh,
const bool  toCreatePolygons = false,
const bool  toCreatePolyedrs = false 
)
ErrorCode SMESH_Pattern.GetErrorCode (  )  const

Definition at line 203 of file SMESH_Pattern.hxx.

bool SMESH_Pattern.IsLoaded (  )  const

Definition at line 206 of file SMESH_Pattern.hxx.

bool SMESH_Pattern.Is2D (  )  const

Definition at line 209 of file SMESH_Pattern.hxx.

bool SMESH_Pattern.GetPoints ( std::list< const gp_XYZ * > &  thePoints  )  const
const std::list< int >& SMESH_Pattern.GetKeyPointIDs (  )  const

Definition at line 215 of file SMESH_Pattern.hxx.

const std::list< std::list< int > >& SMESH_Pattern.GetElementPointIDs ( bool  applied  )  const

Definition at line 219 of file SMESH_Pattern.hxx.

void SMESH_Pattern.DumpPoints (  )  const
TopoDS_Shape SMESH_Pattern.GetSubShape ( const int  i  )  const

Definition at line 230 of file SMESH_Pattern.hxx.

References TopoDS_Shape.

bool SMESH_Pattern.setErrorCode ( const ErrorCode  theErrorCode  )  [private]

Definition at line 251 of file SMESH_Pattern.hxx.

bool SMESH_Pattern.setShapeToMesh ( const TopoDS_Shape theShape  )  [private]
std::list< TPoint* >& SMESH_Pattern.getShapePoints ( const TopoDS_Shape theShape  )  [private]
std::list< TPoint* >& SMESH_Pattern.getShapePoints ( const int  theShapeID  )  [private]
bool SMESH_Pattern.findBoundaryPoints (  )  [private]
void SMESH_Pattern.arrangeBoundaries ( std::list< std::list< TPoint * > > &  boundaryPoints  )  [private]
void SMESH_Pattern.computeUVOnEdge ( const TopoDS_Edge &  theEdge,
const std::list< TPoint * > &  ePoints 
) [private]
bool SMESH_Pattern.compUVByIsoIntersection ( const std::list< std::list< TPoint * > > &  boundaryPoints,
const gp_XY &  theInitUV,
gp_XY &  theUV,
bool &  theIsDeformed 
) [private]
bool SMESH_Pattern.compUVByElasticIsolines ( const std::list< std::list< TPoint * > > &  boundaryPoints,
const std::list< TPoint * > &  pointsToCompute 
) [private]
double SMESH_Pattern.setFirstEdge ( std::list< TopoDS_Edge > &  theWire,
int  theFirstEdgeID 
) [private]
bool SMESH_Pattern.sortSameSizeWires ( TListOfEdgesList theWireList,
const TListOfEdgesList::iterator &  theFromWire,
const TListOfEdgesList::iterator &  theToWire,
const int  theFirstEdgeID,
std::list< std::list< TPoint * > > &  theEdgesPointsList 
) [private]
void SMESH_Pattern.mergePoints ( const bool  uniteGroups  )  [private]
void SMESH_Pattern.makePolyElements ( const std::vector< const SMDS_MeshNode * > &  theNodes,
const bool  toCreatePolygons,
const bool  toCreatePolyedrs 
) [private]
void SMESH_Pattern.createElements ( SMESH_Mesh theMesh,
const std::vector< const SMDS_MeshNode * > &  theNodesVector,
const std::list< std::list< int > > &  theElemNodeIDs,
const std::vector< const SMDS_MeshElement * > &  theElements 
) [private]
bool SMESH_Pattern.getFacesDefinition ( const SMDS_MeshNode **  theBndNodes,
const int  theNbBndNodes,
const std::vector< const SMDS_MeshNode * > &  theNodes,
std::list< int > &  theFaceDefs,
std::vector< int > &  theQuantity 
) [private]
bool SMESH_Pattern.isReversed ( const SMDS_MeshNode theFirstNode,
const std::list< int > &  theIdsList 
) const [private]
void SMESH_Pattern.clearMesh ( SMESH_Mesh theMesh  )  const [private]
static SMESHDS_SubMesh* SMESH_Pattern.getSubmeshWithElements ( SMESH_Mesh theMesh,
const TopoDS_Shape theShape 
) [static, private]

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  OS,
const TPoint p 
) [friend]

Field Documentation

bool SMESH_Pattern.myIs2D [private]

Definition at line 351 of file SMESH_Pattern.hxx.

std::vector< TPoint > SMESH_Pattern.myPoints [private]

Definition at line 352 of file SMESH_Pattern.hxx.

std::list< int > SMESH_Pattern.myKeyPointIDs [private]

Definition at line 353 of file SMESH_Pattern.hxx.

std::list< TElemDef > SMESH_Pattern.myElemPointIDs [private]

Definition at line 354 of file SMESH_Pattern.hxx.

Definition at line 356 of file SMESH_Pattern.hxx.

Definition at line 357 of file SMESH_Pattern.hxx.

Definition at line 358 of file SMESH_Pattern.hxx.

Definition at line 360 of file SMESH_Pattern.hxx.

TopTools_IndexedMapOfOrientedShape SMESH_Pattern.myShapeIDMap [private]

Definition at line 363 of file SMESH_Pattern.hxx.

std::map< int, std::list< TPoint* > > SMESH_Pattern.myShapeIDToPointsMap [private]

Definition at line 364 of file SMESH_Pattern.hxx.

std::list< int > SMESH_Pattern.myNbKeyPntInBoundary [private]

Definition at line 368 of file SMESH_Pattern.hxx.

std::vector<gp_XYZ> SMESH_Pattern.myXYZ [private]

Definition at line 373 of file SMESH_Pattern.hxx.

std::list< TElemDef > SMESH_Pattern.myElemXYZIDs [private]

Definition at line 374 of file SMESH_Pattern.hxx.

std::map< int, const SMDS_MeshNode*> SMESH_Pattern.myXYZIdToNodeMap [private]

Definition at line 375 of file SMESH_Pattern.hxx.

std::vector<const SMDS_MeshElement*> SMESH_Pattern.myElements [private]

Definition at line 376 of file SMESH_Pattern.hxx.

std::vector<const SMDS_MeshNode*> SMESH_Pattern.myOrderedNodes [private]

Definition at line 377 of file SMESH_Pattern.hxx.

std::vector<const SMDS_MeshElement*> SMESH_Pattern.myPolyElems [private]

Definition at line 380 of file SMESH_Pattern.hxx.

std::list< TElemDef > SMESH_Pattern.myPolyElemXYZIDs [private]

Definition at line 382 of file SMESH_Pattern.hxx.

std::list< std::vector<int> > SMESH_Pattern.myPolyhedronQuantities [private]

Definition at line 383 of file SMESH_Pattern.hxx.

std::map<TNodeSet,std::list<std::list<int> > > SMESH_Pattern.myIdsOnBoundary [private]

Definition at line 388 of file SMESH_Pattern.hxx.

std::map< int, std::list< TElemDef* > > SMESH_Pattern.myReverseConnectivity [private]

Definition at line 390 of file SMESH_Pattern.hxx.


Generated on 17 May 2014 for SALOME - SMESH by  doxygen 1.6.1