Salome HOME
0021459: EDF 1495 SMESH: Manipulation of discrete elements with attributes
[modules/smesh.git] / src / SMESH / SMESH_MesherHelper.hxx
index b6c9c461ff8319fbb2ee68cdd9e235b7d373a702..da6cfcbfb3efb5ed7e0ec86a00149c9514087217 100644 (file)
@@ -164,6 +164,9 @@ public:
 
   static TopoDS_Vertex IthVertex( const bool is2nd, TopoDS_Edge anEdge, const bool CumOri=true );
 
+  static TopAbs_ShapeEnum GetGroupType(const TopoDS_Shape& group,
+                                       const bool          avoidCompound=false);
+
 
 public:
   // ---------- PUBLIC INSTANCE METHODS ----------
@@ -192,9 +195,10 @@ public:
 
   /*!
    * \brief Move medium nodes of faces and volumes to fix distorted elements
+   * \param error - container of fixed distorted elements
    * \param volumeOnly - fix nodes on geom faces or not if the shape is solid
    */
-  void FixQuadraticElements(bool volumeOnly=true);
+  void FixQuadraticElements(SMESH_ComputeErrorPtr& error, bool volumeOnly=true);
 
   /*!
    * \brief To set created elements on the shape set by IsQuadraticSubMesh()
@@ -297,6 +301,24 @@ public:
                              const int id = 0, 
                              bool force3d = true);
 
+  /*!
+   * Creates LINEAR!!!!!!!!! octahedron
+   */
+  SMDS_MeshVolume* AddVolume(const SMDS_MeshNode* n1,
+                             const SMDS_MeshNode* n2,
+                             const SMDS_MeshNode* n3,
+                             const SMDS_MeshNode* n4,
+                             const SMDS_MeshNode* n5,
+                             const SMDS_MeshNode* n6,
+                             const SMDS_MeshNode* n7,
+                             const SMDS_MeshNode* n8,
+                             const SMDS_MeshNode* n9,
+                             const SMDS_MeshNode* n10,
+                             const SMDS_MeshNode* n11,
+                             const SMDS_MeshNode* n12,
+                             const int id = 0, 
+                             bool force3d = true);
+
   /*!
    * Creates polyhedron. In quadratic mesh, adds medium nodes
    */
@@ -304,6 +326,14 @@ public:
                                         const std::vector<int>&                  quantities,
                                         const int                                ID=0,
                                         const bool                               force3d = true);
+  /*!
+   * \brief Enables fixing node parameters on EDGEs and FACEs by
+   * GetNodeU(...,check=true), GetNodeUV(...,check=true), CheckNodeUV() and
+   * CheckNodeU() in case if a node lies on a shape set via SetSubShape().
+   * Default is False
+   */
+  void ToFixNodeParameters(bool toFix);
+
   /*!
    * \brief Return U of the given node on the edge
    */
@@ -531,9 +561,9 @@ protected:
   SMESH_Mesh*     myMesh;
   int             myShapeID;
 
-  // to create quadratic elements
   bool            myCreateQuadratic;
   bool            mySetElemOnShape;
+  bool            myFixNodeParameters;
 
   std::map< int,bool > myNodePosShapesValidity;
   bool toCheckPosOnShape(int shapeID ) const;