Salome HOME
Imp 19925 - Mesh preview
[modules/smesh.git] / src / SMESH / SMESH_Gen.hxx
index 1aa8e9684f39ef46063047121d279e289e412d4b..a6a04436a0c10cf040d2e41ce0edf30c0702c73b 100644 (file)
 #include "SMESH_3D_Algo.hxx"
 #include "SMESH_Mesh.hxx"
 
-#include "SMESHDS_Document.hxx"
-
 #include <TopoDS_Shape.hxx>
 
 #include <map>
+#include <list>
+
+class SMESHDS_Document;
 
 typedef SMESH_Hypothesis::Hypothesis_Status TAlgoStateErrorName;
 
@@ -57,6 +58,8 @@ typedef struct studyContextStruct
   SMESHDS_Document * myDocument;
 } StudyContextStruct;
 
+typedef std::set<int> TSetOfInt;
+
 class SMESH_EXPORT  SMESH_Gen
 {
  public:
@@ -66,7 +69,18 @@ class SMESH_EXPORT  SMESH_Gen
   SMESH_Mesh* CreateMesh(int theStudyId, bool theIsEmbeddedMode)
     throw(SALOME_Exception);
 
-  bool Compute(::SMESH_Mesh & aMesh, const TopoDS_Shape & aShape);
+  /*!
+   * \brief Computes aMesh on aShape 
+   *  \param anUpward - compute from vertices up to more complex shape (internal usage)
+   *  \param aDim - upper level dimension of the mesh computation
+   *  \param aShapesId - list of shapes with computed mesh entities (elements or nodes)
+   *  \retval bool - true if none submesh failed to compute
+   */
+  bool Compute(::SMESH_Mesh &        aMesh,
+               const TopoDS_Shape &  aShape,
+               const bool            anUpward=false,
+              const ::MeshDimension aDim=::MeshDim_3D,
+              TSetOfInt*            aShapesId=0);
 
   bool CheckAlgoState(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape);
   // notify on bad state of attached algos, return false
@@ -98,7 +112,7 @@ class SMESH_EXPORT  SMESH_Gen
   static int GetShapeDim(const TopAbs_ShapeEnum & aShapeType);
   static int GetShapeDim(const TopoDS_Shape & aShape)
   { return GetShapeDim( aShape.ShapeType() ); }
-  SMESH_Algo* GetAlgo(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape);
+  SMESH_Algo* GetAlgo(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape, TopoDS_Shape* assignedTo=0);
   static bool IsGlobalHypothesis(const SMESH_Hypothesis* theHyp, SMESH_Mesh& aMesh);
 
   // inherited methods from SALOMEDS::Driver