Salome HOME
This commit was generated by cvs2git to create tag 'V4_1_0rc1'.
[modules/smesh.git] / src / StdMeshers / StdMeshers_Prism_3D.hxx
index 82fe08f02a05c5116ce7a1777d2e39707e6c4830..d6fab7b38dc0a096c9f94023d7ae39aedebe0577 100644 (file)
@@ -37,6 +37,7 @@
 #include "SMESHDS_Mesh.hxx"
 #include "SMESH_subMesh.hxx"
 #include "SMESH_MesherHelper.hxx"
+#include "SMESH_Comment.hxx"
 
 #include <vector>
 
@@ -78,10 +79,12 @@ struct TNode
   gp_XYZ GetCoords() const { return gp_XYZ( myNode->X(), myNode->Y(), myNode->Z() ); }
   gp_XYZ GetParams() const { return myParams; }
   gp_XYZ& ChangeParams() { return myParams; }
+  bool HasParams() const { return myParams.X() >= 0.0; }
   SMDS_TypeOfPosition GetPositionType() const
   { return myNode ? myNode->GetPosition()->GetTypeOfPosition() : SMDS_TOP_UNSPEC; }
+  bool IsNeighbor( const TNode& other ) const;
 
-  TNode(const SMDS_MeshNode* node = 0): myNode(node) {}
+  TNode(const SMDS_MeshNode* node = 0): myNode(node), myParams(-1,-1,-1) {}
   bool operator < (const TNode& other) const { return myNode < other.myNode; }
 };
 
@@ -115,6 +118,11 @@ public:
    */
   bool Init(SMESH_MesherHelper* helper, const TopoDS_Shape& shape3D);
 
+  /*!
+   * \brief Return problem description
+   */
+  SMESH_ComputeErrorPtr GetError() const { return myError; }
+
   /*!
    * \brief Return number of nodes on every vertical edge
     * \retval int - number of nodes including end nodes
@@ -343,7 +351,14 @@ private:
   // to find a column for a node by edge SMESHDS Index
   map< int, pair< TParam2ColumnMap*, bool > > myShapeIndex2ColumnMap;
 
-  
+  SMESH_ComputeErrorPtr myError;
+  /*!
+   * \brief store error and comment and then return ( error == COMPERR_OK )
+   */
+  bool error(int error, const SMESH_Comment& comment = "") {
+    myError = SMESH_ComputeError::New(error,comment);
+    return myError->IsOK();
+  }
   //vector< SMESH_subMesh* >           mySubMeshesVec; // submesh by in-block id
 };