Salome HOME
Improvement 0018239: Create subMesh menu item
[modules/smesh.git] / src / StdMeshers / StdMeshers_Penta_3D.hxx
index dc8ba72cfe44ab531880ee08ea96c5a7a5d5441b..100ddb45e0a17d90729f3e28deac10daef8f9bee 100644 (file)
@@ -17,7 +17,7 @@
 //  License along with this library; if not, write to the Free Software 
 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
 // 
-//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 //
 //
@@ -27,6 +27,8 @@
 #ifndef StdMeshers_Penta_3D_HeaderFile
 #define StdMeshers_Penta_3D_HeaderFile
 
+#include "SMESH_StdMeshers.hxx"
+
 #include <map>
 
 ////////////////////////////////////////////////////////////////////////
 #include <TopoDS_Vertex.hxx>
 #include <TopoDS_Shell.hxx>
 #include <TopTools_IndexedMapOfOrientedShape.hxx>
+#include <TColStd_MapOfInteger.hxx>
 
 #include "SMESH_Block.hxx"
+#include "SMESH_ComputeError.hxx"
+#include "SMESH_MesherHelper.hxx"
 
 typedef std::map< double, std::vector<const SMDS_MeshNode*> > StdMeshers_IJNodeMap;
 
-class StdMeshers_SMESHBlock {
+class STDMESHERS_EXPORT StdMeshers_SMESHBlock {
  
 public:
   //
@@ -84,13 +89,15 @@ public:
 
   int  ErrorStatus() const;
 
+  SMESH_ComputeErrorPtr GetError() const;
+
 
 protected:
   TopoDS_Shell                       myShell;
   TopTools_IndexedMapOfOrientedShape myShapeIDMap;
   SMESH_Block                        myTBlock;
   TopoDS_Shape                       myEmptyShape;
-  vector<int>                        myIsEdgeForward;
+  std::vector<int>                   myIsEdgeForward;
   //
   int myErrorStatus;
 };
@@ -102,7 +109,7 @@ protected:
 ////////////////////////////////////////////////////////////////////////
 #include "SMDS_MeshNode.hxx"
 
-class StdMeshers_TNode {
+class STDMESHERS_EXPORT StdMeshers_TNode {
 
 public:
   
@@ -160,16 +167,22 @@ private:
 #include "SMESH_Mesh.hxx"
 #include <TopoDS_Shape.hxx>
 //
-class StdMeshers_Penta_3D {
+class STDMESHERS_EXPORT StdMeshers_Penta_3D {
 //
   public: // methods
     StdMeshers_Penta_3D();
     
-    //~StdMeshers_Penta_3D();
+    ~StdMeshers_Penta_3D();
     
     bool Compute(SMESH_Mesh& , const TopoDS_Shape& );
     
     int ErrorStatus() const {
+      if (myErrorStatus->IsOK())
+        return 0;
+      return myErrorStatus->myName;
+    }
+
+    SMESH_ComputeErrorPtr GetComputeError() const {
       return myErrorStatus;
     }
    
@@ -181,10 +194,10 @@ class StdMeshers_Penta_3D {
       return myTol3D;
     }
 
-    static bool LoadIJNodes(StdMeshers_IJNodeMap & theIJNodes,
-                            const TopoDS_Face&     theFace,
-                            const TopoDS_Edge&     theBaseEdge,
-                            SMESHDS_Mesh*          theMesh);
+    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
@@ -203,8 +216,8 @@ class StdMeshers_Penta_3D {
 
     double SetHorizEdgeXYZ(const gp_XYZ&                  aBNXYZ,
                            const int                      aFaceID,
-                           vector<const SMDS_MeshNode*>*& aCol1,
-                           vector<const SMDS_MeshNode*>*& aCol2);
+                           std::vector<const SMDS_MeshNode*>*& aCol1,
+                           std::vector<const SMDS_MeshNode*>*& aCol2);
 
     void ShapeSupportID(const bool theIsUpperLayer,
                        const SMESH_Block::TShapeID theBNSSID,
@@ -241,16 +254,19 @@ class StdMeshers_Penta_3D {
     TopoDS_Shape              myShape;
     StdMeshers_SMESHBlock     myBlock;
     void *                    myMesh;
-    int                       myErrorStatus;
+    SMESH_ComputeErrorPtr     myErrorStatus;
     //
-    vector <StdMeshers_TNode> myTNodes;
+    std::vector <StdMeshers_TNode> myTNodes;
     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
+    std::vector<StdMeshers_IJNodeMap> myWallNodesMaps; // nodes on a face
+    std::vector<gp_XYZ>               myShapeXYZ; // point on each sub-shape
+
+    bool myCreateQuadratic;
+    SMESH_MesherHelper* myTool; // tool building quadratic elements
 };
 
 #endif