Salome HOME
PAL7913. Fix for the case where different 1d hypotheses are used on opposite edges
[modules/smesh.git] / src / StdMeshers / StdMeshers_Penta_3D.hxx
index aac472ec0594b7ad0d128e96382b460bfb3fef27..dc8ba72cfe44ab531880ee08ea96c5a7a5d5441b 100644 (file)
 
 #include <map>
 
-typedef std::map < int, int > StdMeshers_DataMapOfIntegerInteger;
-
 ////////////////////////////////////////////////////////////////////////
 //
 //  class StdMeshers_SMESHBlock
 //
+////////////////////////////////////////////////////////////////////////
 #include <gp_Pnt.hxx>
 #include <gp_XYZ.hxx>
 #include <TopoDS_Vertex.hxx>
@@ -43,6 +42,8 @@ typedef std::map < int, int > StdMeshers_DataMapOfIntegerInteger;
 
 #include "SMESH_Block.hxx"
 
+typedef std::map< double, std::vector<const SMDS_MeshNode*> > StdMeshers_IJNodeMap;
+
 class StdMeshers_SMESHBlock {
  
 public:
@@ -62,6 +63,10 @@ public:
                         const TopoDS_Shape& theShape,
                         gp_XYZ& theXYZ);
   
+  void ComputeParameters(const double& theU,
+                        const TopoDS_Shape& theShape,
+                        gp_XYZ& theXYZ);
+  
   void Point(const gp_XYZ& theParams, 
             gp_Pnt& thePnt);
   
@@ -72,8 +77,11 @@ public:
   int ShapeID(const TopoDS_Shape& theShape); 
   
   const TopoDS_Shape& Shape(const int theID);
-  
-  
+
+  SMESH_Block & Block() { return myTBlock; }
+
+  bool IsForwadEdge(const int theEdgeID);
+
   int  ErrorStatus() const;
 
 
@@ -82,13 +90,16 @@ protected:
   TopTools_IndexedMapOfOrientedShape myShapeIDMap;
   SMESH_Block                        myTBlock;
   TopoDS_Shape                       myEmptyShape;
+  vector<int>                        myIsEdgeForward;
   //
   int myErrorStatus;
 };
+
 ////////////////////////////////////////////////////////////////////////
 //
 //  class StdMeshers_TNode
 //
+////////////////////////////////////////////////////////////////////////
 #include "SMDS_MeshNode.hxx"
 
 class StdMeshers_TNode {
@@ -145,6 +156,7 @@ private:
 //
 //  class StdMeshers_Penta_3D
 //
+////////////////////////////////////////////////////////////////////////
 #include "SMESH_Mesh.hxx"
 #include <TopoDS_Shape.hxx>
 //
@@ -168,7 +180,18 @@ class StdMeshers_Penta_3D {
     double Tolerance() const {
       return myTol3D;
     }
-    
+
+    static bool LoadIJNodes(StdMeshers_IJNodeMap & theIJNodes,
+                            const TopoDS_Face&     theFace,
+                            const TopoDS_Edge&     theBaseEdge,
+                            SMESHDS_Mesh*          theMesh);
+    // Load nodes bound to theFace into column (vectors) and rows
+    // of theIJNodes.
+    // The value of theIJNodes map is a vector of ordered nodes so
+    // that the 0-the one lies on theBaseEdge.
+    // The key of theIJNodes map is a normalized parameter of each
+    // 0-the node on theBaseEdge.
+
 
   protected: // methods
     
@@ -178,12 +201,18 @@ class StdMeshers_Penta_3D {
 
     void MakeNodes();
 
+    double SetHorizEdgeXYZ(const gp_XYZ&                  aBNXYZ,
+                           const int                      aFaceID,
+                           vector<const SMDS_MeshNode*>*& aCol1,
+                           vector<const SMDS_MeshNode*>*& aCol2);
+
     void ShapeSupportID(const bool theIsUpperLayer,
                        const SMESH_Block::TShapeID theBNSSID,
                        SMESH_Block::TShapeID& theSSID);
 
     void FindNodeOnShape(const TopoDS_Shape& aS,
                         const gp_XYZ& aParams,
+                         const int z,
                         StdMeshers_TNode& aTN);
 
     void CreateNode(const bool theIsUpperLayer,
@@ -209,17 +238,19 @@ class StdMeshers_Penta_3D {
     }
     
   protected: // fields
-    TopoDS_Shape myShape;
-    StdMeshers_SMESHBlock myBlock;
-    void *       myMesh;
-    int          myErrorStatus;
+    TopoDS_Shape              myShape;
+    StdMeshers_SMESHBlock     myBlock;
+    void *                    myMesh;
+    int                       myErrorStatus;
     //
     vector <StdMeshers_TNode> myTNodes;
-    int myISize;
-    int myJSize;
-    double   myTol3D;        // Tolerance value     
-    StdMeshers_DataMapOfIntegerInteger myConnectingMap;
-
+    int                       myISize;
+    int                       myJSize;
+    double                    myTol3D;        // Tolerance value     
+    std::map < int, int >     myConnectingMap;
+    //
+    vector<StdMeshers_IJNodeMap> myWallNodesMaps; // nodes on a face
+    vector<gp_XYZ>            myShapeXYZ; // point on each sub-shape
 };
 
 #endif