Salome HOME
Merging with WPdev
[modules/smesh.git] / src / SMESH / SMESH_Pattern.hxx
index 3a487277be660fbeed9535aa5efc495fb89a5f94..9699064ad5567b4cd7419a7af28fcf36d06d9530 100644 (file)
@@ -24,6 +24,8 @@
 #ifndef SMESH_Pattern_HeaderFile
 #define SMESH_Pattern_HeaderFile
 
+#include "SMESH_SMESH.hxx"
+
 #include <vector>
 #include <list>
 #include <map>
@@ -53,7 +55,7 @@ class TopoDS_Edge;
 // of 6 faces.
 //
 
-class SMESH_Pattern {
+class SMESH_EXPORT SMESH_Pattern {
  public:
   
   SMESH_Pattern ();
@@ -66,7 +68,7 @@ class SMESH_Pattern {
 
   bool Load (SMESH_Mesh*        theMesh,
              const TopoDS_Face& theFace,
-             bool               theProject);
+             bool               theProject = false);
   // Create a pattern from the mesh built on <theFace>.
   // <theProject>==true makes override nodes positions
   // on <theFace> computed by mesher
@@ -135,8 +137,9 @@ class SMESH_Pattern {
   // Create nodes and elements in <theMesh> using nodes
   // coordinates computed by either of Apply...() methods
 
-
+  // ----------
   // Inquiries
+  // ----------
 
   enum ErrorCode {
     ERR_OK,
@@ -201,8 +204,18 @@ class SMESH_Pattern {
   void DumpPoints() const;
   // Debug
 
+  // -----------------------------
+  // Utilities for advanced usage
+  // -----------------------------
 
- private:
+  TopoDS_Shape GetSubShape( const int i ) const {
+    if ( i < 1 || i > myShapeIDMap.Extent() ) return TopoDS_Shape();
+    return myShapeIDMap( i );
+  }
+  // Return a shape from myShapeIDMap where shapes are indexed so that first go
+  // ordered vertices, then ordered edge, then faces and maybe a shell
+
+private:
   // private methods
 
   struct TPoint {