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