Salome HOME
Improvement 0018239: Create subMesh menu item
[modules/smesh.git] / src / StdMeshers / StdMeshers_FaceSide.hxx
index 1463d2d1fd57aafe415f1414fa4c361ba2bba4f0..aa29e80a7b33c0944d082e8fa6897bd1dcab9033 100644 (file)
@@ -35,6 +35,9 @@
 #include <Geom2d_Curve.hxx>
 #include <TopExp.hxx>
 
+#include "SMESH_StdMeshers.hxx"
+#include "SMESH_Algo.hxx"
+
 #include <vector>
 #include <list>
 #include <boost/shared_ptr.hpp>
@@ -45,6 +48,7 @@ class Adaptor2d_Curve2d;
 class Adaptor3d_Curve;
 class BRepAdaptor_CompCurve;
 class TopoDS_Face;
+class SMESH_ComputeError;
 
 typedef struct uvPtStruct
 {
@@ -61,6 +65,8 @@ typedef struct uvPtStruct
 class StdMeshers_FaceSide;
 typedef boost::shared_ptr< StdMeshers_FaceSide > StdMeshers_FaceSidePtr;
 typedef boost::shared_ptr< uvPtStruct > UVPtStructPtr;
+typedef std::vector< StdMeshers_FaceSidePtr > TSideVector;
+typedef boost::shared_ptr< SMESH_ComputeError > TError;
 
 //================================================================================
 /*!
@@ -69,7 +75,7 @@ typedef boost::shared_ptr< uvPtStruct > UVPtStructPtr;
  */
 //================================================================================
 
-class StdMeshers_FaceSide
+class STDMESHERS_EXPORT StdMeshers_FaceSide
 {
 public:
   /*!
@@ -84,10 +90,19 @@ public:
    * \brief Wrap several edges. Edges must be properly ordered and oriented.
    */
   StdMeshers_FaceSide(const TopoDS_Face& theFace,
-                      list<TopoDS_Edge>& theEdges,
+                      std::list<TopoDS_Edge>& theEdges,
                       SMESH_Mesh*        theMesh,
                       const bool         theIsForward,
                       const bool         theIgnoreMediumNodes);
+
+  /*!
+   * \brief Return wires of a face as StdMeshers_FaceSide's
+   */
+  static TSideVector GetFaceWires(const TopoDS_Face& theFace,
+                                  SMESH_Mesh &       theMesh,
+                                  const bool         theIgnoreMediumNodes,
+                                  TError &           theError);  
+
   /*!
    * \brief Change orientation of side geometry
    */
@@ -115,15 +130,15 @@ public:
     *
     * Missing nodes are allowed only on internal vertices
    */
-  const vector<UVPtStruct>& GetUVPtStruct(bool isXConst, double constValue) const;
+  const std::vector<UVPtStruct>& GetUVPtStruct(bool isXConst =0, double constValue =0) const;
   /*!
    * \brief Simulates detailed data on nodes
     * \param isXConst - true if normalized parameter X is constant
     * \param constValue - constant parameter value
    */
-  const vector<UVPtStruct>& SimulateUVPtStruct(int    nbSeg,
-                                               bool   isXConst,
-                                               double constValue) const;
+  const std::vector<UVPtStruct>& SimulateUVPtStruct(int    nbSeg,
+                                               bool   isXConst   = 0,
+                                               double constValue = 0) const;
   /*!
    * \brief Return edge and parameter on edge by normalized parameter
    */
@@ -179,15 +194,15 @@ public:
   
 
 protected:
-  vector<uvPtStruct>           myPoints, myFalsePoints;
-  vector<TopoDS_Edge>          myEdge;
-  vector<Handle(Geom2d_Curve)> myC2d;
-  vector<double>               myFirst, myLast;
-  vector<double>               myNormPar;
-  double                       myLength;
-  int                          myNbPonits, myNbSegments;
-  SMESH_Mesh*                  myMesh;
-  bool                         myMissingVertexNodes, myIgnoreMediumNodes;
+  std::vector<uvPtStruct>           myPoints, myFalsePoints;
+  std::vector<TopoDS_Edge>          myEdge;
+  std::vector<Handle(Geom2d_Curve)> myC2d;
+  std::vector<double>               myFirst, myLast;
+  std::vector<double>               myNormPar;
+  double                            myLength;
+  int                               myNbPonits, myNbSegments;
+  SMESH_Mesh*                       myMesh;
+  bool                              myMissingVertexNodes, myIgnoreMediumNodes;
 };