Go to the documentation of this file.
27 #ifndef _SMESH_MESH_HXX_
28 #define _SMESH_MESH_HXX_
40 #include <TopoDS_Shape.hxx>
41 #include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
49 class TopTools_ListOfShape;
60 bool theIsEmbeddedMode,
105 int MEDToMesh(
const char* theFileName,
const char* theMeshName);
119 const std::list <const SMESHDS_Hypothesis * >&
125 const bool andAncestors,
126 TopoDS_Shape* assignedTo=0)
const;
130 std::list <const SMESHDS_Hypothesis * >& aHypList,
131 const bool andAncestors)
const;
137 int GetId() {
return _id; }
161 const std::list < SMESH_subMesh * >&
178 const TopTools_ListOfShape&
GetAncestors(
const TopoDS_Shape& theSubShape)
const;
196 const char* theMeshName = NULL,
197 bool theAutoGroups =
true,
233 int NbGroup()
const {
return _mapGroup.size(); }
238 const TopoDS_Shape& theShape=TopoDS_Shape());
int STLToMesh(const char *theFileName)
void NotifySubMeshesHypothesisModification(const SMESH_Hypothesis *theChangedHyp)
Say all submeshes that theChangedHyp has been modified.
int MEDToMesh(const char *theFileName, const char *theMeshName)
bool IsMainShape(const TopoDS_Shape &theShape) const
bool HasDuplicatedGroupNamesMED()
Check group names for duplications. Consider maximum group name length stored in MED file.
const std::list< SMESHDS_Command * > & GetLog()
SMESH_Mesh(int theLocalId, int theStudyId, SMESH_Gen *theGen, bool theIsEmbeddedMode, SMESHDS_Document *theDocument)
bool IsUsedHypothesis(SMESHDS_Hypothesis *anHyp, const SMESH_subMesh *aSubMesh)
Return True if anHyp is used to mesh aSubShape.
std::list< SMESH_subMesh * > _subMeshesUsingHypothesisList
void ShapeToMesh(const TopoDS_Shape &aShape)
Set geometry to be meshed.
const std::list< SMESH_subMesh * > & GetSubMeshUsingHypothesis(SMESHDS_Hypothesis *anHyp)
int GetHypotheses(const TopoDS_Shape &aSubShape, const SMESH_HypoFilter &aFilter, std::list< const SMESHDS_Hypothesis * > &aHypList, const bool andAncestors) const
std::list< SMESH_subMesh * > GetGroupSubMeshesContaining(const TopoDS_Shape &shape) const
Return submeshes of groups containing the given subshape.
SMESH_Group * ConvertToStandalone(int theGroupID)
SMESH_Mesh(const SMESH_Mesh &)
SMESH_Hypothesis::Hypothesis_Status RemoveHypothesis(const TopoDS_Shape &aSubShape, int anHypId)
void SetAutoColor(bool theAutoColor)
const TopTools_ListOfShape & GetAncestors(const TopoDS_Shape &theSubShape) const
Return list of ancestors of theSubShape in the order that lower dimention shapes come first.
static const TopoDS_Solid & PseudoShape()
Return a solid which is returned by GetShapeToMesh() if a real geometry to be meshed was not set.
void RemoveGroup(const int theGroupID)
SMESHDS_Mesh * GetMeshDS()
GroupIteratorPtr GetGroups() const
SMESH_Group * AddGroup(const SMDSAbs_ElementType theType, const char *theName, int &theId, const TopoDS_Shape &theShape=TopoDS_Shape())
SMESHDS_Document * _myDocument
int DATToMesh(const char *theFileName)
const std::list< const SMESHDS_Hypothesis * > & GetHypothesisList(const TopoDS_Shape &aSubShape) const
TopTools_IndexedDataMapOfShapeListOfShape TAncestorMap
Return data map of descendant to ancestor shapes.
SMESH_subMesh * GetSubMeshContaining(const int aShapeID) const
SMESH_Group * GetGroup(const int theGroupID)
std::map< int, SMESH_Group * > _mapGroup
double _shapeDiagonal
diagonal size of bounding box of shape to mesh
SMDSAbs_ElementType GetElementType(const int id, const bool iselem)
int UNVToMesh(const char *theFileName)
double GetShapeDiagonalSize() const
Return diagonal size of bounding box of shape to mesh.
SMESH_subMesh * GetSubMeshContaining(const TopoDS_Shape &aSubShape) const
bool IsNotConformAllowed() const
check if a hypothesis alowing notconform mesh is present
std::map< int, SMESH_subMesh * > _mapSubMesh
static double GetShapeDiagonalSize(const TopoDS_Shape &aShape)
Return diagonal size of bounding box of a shape.
void ExportMED(const char *file, const char *theMeshName=NULL, bool theAutoGroups=true, int theVersion=0)
boost::shared_ptr< SMDS_Iterator< SMESH_Group * > > GroupIteratorPtr
SMDSAbs_ElementType
Type (node, edge, face or volume) of elements.
TopoDS_Shape GetShapeToMesh() const
Return geometry to be meshed. (It may be a PseudoShape()!)
SMESH_Hypothesis::Hypothesis_Status AddHypothesis(const TopoDS_Shape &aSubShape, int anHypId)
TopTools_IndexedDataMapOfShapeListOfShape _mapAncestors
const SMESH_Hypothesis * GetHypothesis(const TopoDS_Shape &aSubShape, const SMESH_HypoFilter &aFilter, const bool andAncestors, TopoDS_Shape *assignedTo=0) const
ostream & Dump(ostream &save)
void ClearSubMesh(const int theShapeId)
Remove all nodes and elements of indicated shape.
std::list< int > GetGroupIds() const
void Clear()
Remove all nodes and elements.
bool HasShapeToMesh() const
Return true if there is a geometry to be meshed, not PseudoShape()
SMESH_subMesh * GetSubMesh(const TopoDS_Shape &aSubShape)