Salome HOME
Patch modules/smesh.git for Doxygen typos/grammar + misc. typos
[modules/smesh.git] / src / SMESH / SMESH_Pattern.hxx
index 3bc3684ba153356951cf0f632b7f8a70350c1fd7..d3cb43e574157f140eb3cef18ea270f15fb367ee 100644 (file)
@@ -71,13 +71,15 @@ class SMESH_EXPORT SMESH_Pattern {
   bool Load (SMESH_Mesh*        theMesh,
              const TopoDS_Face& theFace,
              bool               theProject = false,
-             TopoDS_Vertex      the1stVertex=TopoDS_Vertex());
+             TopoDS_Vertex      the1stVertex=TopoDS_Vertex(),
+             bool               theKeepNodes = false );
   // Create a pattern from the mesh built on <theFace>.
   // <theProject>==true makes override nodes positions
   // on <theFace> computed by mesher
 
   bool Load (SMESH_Mesh*         theMesh,
-             const TopoDS_Shell& theBlock);
+             const TopoDS_Shell& theBlock,
+             bool                theKeepNodes = false);
   // Create a pattern from the mesh built on <theBlock>
 
   bool Save (std::ostream& theFile);
@@ -180,7 +182,7 @@ class SMESH_EXPORT SMESH_Pattern {
     // Apply(shape)
     ERR_APPL_NOT_COMPUTED, // mapping failed
     ERR_APPL_NOT_LOADED, // pattern was not loaded
-    ERR_APPL_BAD_DIMENTION, // wrong shape dimention
+    ERR_APPL_BAD_DIMENTION, // wrong shape dimension
     ERR_APPL_BAD_NB_VERTICES, // keypoints - vertices mismatch
     // Apply(face)
     ERR_APPLF_BAD_TOPOLOGY, // bad pattern topology
@@ -216,6 +218,11 @@ class SMESH_EXPORT SMESH_Pattern {
   { return myElemXYZIDs.empty() || !applied ? myElemPointIDs : myElemXYZIDs; }
   // Return nodal connectivity of the elements of the pattern
 
+  void GetInOutNodes( std::vector< const SMDS_MeshNode* > *& inNodes,
+                      std::vector< const SMDS_MeshNode* > *& outNodes )
+  { inNodes = & myInNodes; outNodes = & myOutNodes; }
+  // Return loaded and just created nodes
+
   void DumpPoints() const;
   // Debug
 
@@ -234,7 +241,7 @@ private:
   // private methods
 
   struct TPoint {
-    gp_XYZ myInitXYZ; // loaded postion
+    gp_XYZ myInitXYZ; // loaded position
     gp_XY  myInitUV;
     double myInitU; // [0,1]
     gp_Pnt myXYZ; // position to compute
@@ -368,7 +375,11 @@ private:
   // nb of key-points in each of pattern boundaries
   std::list< int >                     myNbKeyPntInBoundary;
 
-  
+  // nodes corresponding to myPoints
+  bool                                 myToKeepNodes; // to keep these data
+  std::vector< const SMDS_MeshNode* >  myInNodes;     // loaded nodes
+  std::vector< const SMDS_MeshNode* >  myOutNodes;    // created nodes
+
   // to compute while applying to mesh elements, not to shapes
 
   std::vector<gp_XYZ>                  myXYZ;            // XYZ of nodes to create
@@ -377,7 +388,7 @@ private:
   std::vector<const SMDS_MeshElement*> myElements;       // refined elements
   std::vector<const SMDS_MeshNode*>    myOrderedNodes;
 
-   // elements to replace with polygon or polyhedron
+  // elements to replace with polygon or polyhedron
   std::vector<const SMDS_MeshElement*> myPolyElems;
   // definitions of new poly elements
   std::list< TElemDef >                myPolyElemXYZIDs;