]> SALOME platform Git repositories - modules/smesh.git/blobdiff - src/StdMeshers/StdMeshers_FaceSide.hxx
Salome HOME
0021096: EDF 1729 SMESH: Create a Projection 1D-2D algorithm
[modules/smesh.git] / src / StdMeshers / StdMeshers_FaceSide.hxx
index ae2318ffcc9c7b5afd3ad2215789f5d80ba6776b..46e6ebc4dc95a70877e3c47fdb0f7d4b7533e2b7 100644 (file)
 #ifndef StdMeshers_FaceSide_HeaderFile
 #define StdMeshers_FaceSide_HeaderFile
 
+#include "SMESH_StdMeshers.hxx"
+
 #include <Geom2d_Curve.hxx>
 #include <GeomAdaptor_Curve.hxx>
 #include <TopoDS_Edge.hxx>
 #include <TopoDS_Vertex.hxx>
 #include <gp_Pnt2d.hxx>
 
-#include "SMESH_StdMeshers.hxx"
-
 #include <vector>
 #include <list>
 #include <boost/shared_ptr.hpp>
@@ -62,9 +62,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;
+typedef std::vector< StdMeshers_FaceSidePtr >    TSideVector;
+typedef boost::shared_ptr< SMESH_ComputeError >  TError;
 
 //================================================================================
 /*!
@@ -87,16 +86,16 @@ public:
   /*!
    * \brief Wrap several edges. Edges must be properly ordered and oriented.
    */
-  StdMeshers_FaceSide(const TopoDS_Face& theFace,
+  StdMeshers_FaceSide(const TopoDS_Face&      theFace,
                       std::list<TopoDS_Edge>& theEdges,
-                      SMESH_Mesh*        theMesh,
-                      const bool         theIsForward,
-                      const bool         theIgnoreMediumNodes);
+                      SMESH_Mesh*             theMesh,
+                      const bool              theIsForward,
+                      const bool              theIgnoreMediumNodes);
   /*!
-   * \brief Wrap for vertex using data from other FaceSide
+   * \brief Simulate a side from a vertex using data from other FaceSide
    */
-  StdMeshers_FaceSide(const SMDS_MeshNode* theNode,
-                      const gp_Pnt2d thePnt2d,
+  StdMeshers_FaceSide(const SMDS_MeshNode*       theNode,
+                      const gp_Pnt2d             thePnt2d,
                       const StdMeshers_FaceSide* theSide);
   /*!
    * \brief Return wires of a face as StdMeshers_FaceSide's
@@ -131,7 +130,8 @@ public:
     * \param isXConst - true if normalized parameter X is constant
     * \param constValue - constant parameter value
     *
-    * Missing nodes are allowed only on internal vertices
+    * Missing nodes are allowed only on internal vertices.
+    * For a closed side, the 1st point repeats at end
    */
   const std::vector<UVPtStruct>& GetUVPtStruct(bool isXConst =0, double constValue =0) const;
   /*!
@@ -140,8 +140,13 @@ public:
     * \param constValue - constant parameter value
    */
   const std::vector<UVPtStruct>& SimulateUVPtStruct(int    nbSeg,
-                                               bool   isXConst   = 0,
-                                               double constValue = 0) const;
+                                                    bool   isXConst   = 0,
+                                                    double constValue = 0) const;
+  /*!
+   * \brief Return nodes in the order they encounter while walking along the side.
+    * For a closed side, the 1st point repeats at end
+   */
+  std::vector<const SMDS_MeshNode*> GetOrderedNodes() const;
   /*!
    * \brief Return edge and parameter on edge by normalized parameter
    */
@@ -166,6 +171,10 @@ public:
    * \brief Return i-th wrapped edge (count starts from zero)
    */
   const TopoDS_Edge& Edge(int i) const { return myEdge[i]; }
+  /*!
+   * \brief Return all edges
+   */
+  const std::vector<TopoDS_Edge>& Edges() const { return myEdge; }
   /*!
    * \brief Return 1st vertex of the i-the edge (count starts from zero)
    */
@@ -198,7 +207,7 @@ public:
 
 protected:
 
-  // DON't FORGET tO update Reverse() when adding one more vector!
+  // DON't FORGET to update Reverse() when adding one more vector!
   std::vector<uvPtStruct>           myPoints, myFalsePoints;
   std::vector<TopoDS_Edge>          myEdge;
   std::vector<int>                  myEdgeID;