28 #ifndef _SMESH_MESH_HXX_
29 #define _SMESH_MESH_HXX_
41 #include <TopoDS_Shape.hxx>
42 #include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
50 class TopTools_ListOfShape;
61 bool theIsEmbeddedMode,
81 double GetShapeDiagonalSize()
const;
85 static double GetShapeDiagonalSize(
const TopoDS_Shape & aShape);
90 static const TopoDS_Solid& PseudoShape();
100 void ClearSubMesh(
const int theShapeId);
102 int UNVToMesh(
const char* theFileName);
106 int MEDToMesh(
const char* theFileName,
const char* theMeshName);
108 int STLToMesh(
const char* theFileName);
110 int DATToMesh(
const char* theFileName);
113 AddHypothesis(
const TopoDS_Shape & aSubShape,
int anHypId)
117 RemoveHypothesis(
const TopoDS_Shape & aSubShape,
int anHypId)
120 const std::list <const SMESHDS_Hypothesis * >&
126 const bool andAncestors,
131 std::list <const SMESHDS_Hypothesis * >& aHypList,
132 const bool andAncestors)
const;
136 void ClearLog() throw(SMESH_Exception);
138 int GetId() {
return _id; }
150 SMESH_subMesh *GetSubMeshContaining(
const int aShapeID)
const
155 std::list<SMESH_subMesh*> GetGroupSubMeshesContaining(
const TopoDS_Shape & shape)
const
160 void NotifySubMeshesHypothesisModification(
const SMESH_Hypothesis* theChangedHyp);
162 const std::list < SMESH_subMesh * >&
172 bool IsNotConformAllowed()
const;
179 const TopTools_ListOfShape& GetAncestors(
const TopoDS_Shape& theSubShape)
const;
189 const TAncestorMap& GetAncestorMap()
const {
return _mapAncestors; }
194 bool HasDuplicatedGroupNamesMED();
196 void ExportMED(
const char *file,
197 const char* theMeshName = NULL,
198 bool theAutoGroups =
true,
202 void ExportDAT(const
char *file) throw(SMESH_Exception);
203 void ExportUNV(const
char *file) throw(SMESH_Exception);
204 void ExportSTL(const
char *file, const
bool isascii) throw(SMESH_Exception);
206 int NbNodes() throw(SMESH_Exception);
216 int NbPolygons() throw(SMESH_Exception);
228 int NbPolyhedrons() throw(SMESH_Exception);
230 int NbSubMesh() throw(SMESH_Exception);
232 int NbGroup()
const {
return _mapGroup.size(); }
242 std::list<int> GetGroupIds()
const;
246 void RemoveGroup (
const int theGroupID);
248 SMESH_Group* ConvertToStandalone (
int theGroupID );
254 ostream& Dump(ostream & save);
SMESH_Mesh(const SMESH_Mesh &)
SMDSAbs_ElementType
Type (node, edge, face or volume) of elements.
bool HasShapeToMesh() const
Return true if there is a geometry to be meshed, not PseudoShape()
SMESHDS_Document * _myDocument
SMESHDS_Mesh * GetMeshDS()
TopTools_IndexedDataMapOfShapeListOfShape TAncestorMap
Return data map of descendant to ancestor shapes.
double _shapeDiagonal
diagonal size of bounding box of shape to mesh
TopTools_IndexedDataMapOfShapeListOfShape _mapAncestors
std::map< int, SMESH_subMesh * > _mapSubMesh
std::map< int, SMESH_Group * > _mapGroup
boost::shared_ptr< SMDS_Iterator< SMESH_Group * > > GroupIteratorPtr
std::list< SMESH_subMesh * > _subMeshesUsingHypothesisList