Salome HOME
Merge branch 'OCCT780'
[modules/smesh.git] / src / SMESH_I / SMESH_MeshEditor_i.hxx
index 2f152c334ae08ca6e69c77d70ac876606f60b6a9..4280181c20d6c80731be7a2f64eaa69202473f1d 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2021  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2024  CEA, EDF, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -93,16 +93,17 @@ public:
   SMESH::SMESH_IDSource_ptr MakeIDSource(const SMESH::smIdType_array& IDsOfElements,
                                          SMESH::ElementType           type);
   static bool               IsTemporaryIDSource( SMESH::SMESH_IDSource_ptr& idSource );
-  static SMESH::smIdType*       GetTemporaryIDs( SMESH::SMESH_IDSource_ptr& idSource, smIdType& nbIds );
+  static SMESH::smIdType*       GetTemporaryIDs( SMESH::SMESH_IDSource_ptr& idSource, SMESH::smIdType& nbIds );
 
   /*!
    * \brief Generates the unique group name
    */
   std::string GenerateGroupName(const std::string& thePrefix);
 
-  CORBA::Boolean RemoveElements(const SMESH::smIdType_array & IDsOfElements);
-  CORBA::Boolean RemoveNodes   (const SMESH::smIdType_array & IDsOfNodes);
-  SMESH::smIdType    RemoveOrphanNodes();
+  CORBA::Boolean  RemoveElements(const SMESH::smIdType_array & IDsOfElements);
+  CORBA::Boolean  RemoveNodes   (const SMESH::smIdType_array & IDsOfNodes);
+  SMESH::smIdType RemoveOrphanNodes();
+  void            RemoveNodeWithReconnection(SMESH::smIdType nodeID);
 
   /*!
    * Methods for creation new elements.
@@ -170,15 +171,42 @@ public:
    */
   void SetMeshElementOnShape(SMESH::smIdType ElementID, CORBA::Long ShapeID);
 
-
+  /*!
+   * \brief Change node location
+   */
   CORBA::Boolean MoveNode(SMESH::smIdType NodeID,
                           CORBA::Double x, CORBA::Double y, CORBA::Double z);
 
+  /*!
+   * \brief Swap a diagonal of a quadrangle formed by two adjacent triangles
+   */
   CORBA::Boolean InverseDiag(SMESH::smIdType NodeID1, SMESH::smIdType NodeID2);
+  /*!
+   * \brief Delete a diagonal of a quadrangle formed by two adjacent triangles
+   *        so that a new quadrangle appears in place of the triangles
+   */
   CORBA::Boolean DeleteDiag(SMESH::smIdType NodeID1, SMESH::smIdType NodeID2);
+  /*!
+   * \brief Split a diagonal of a quadrangle formed by two adjacent triangles
+   *        so that four new triangles appear in place of the two triangles
+   */
+  void AddNodeOnSegment(SMESH::smIdType segmentNode1, SMESH::smIdType segmentNode2,
+                        CORBA::Double   position);
+  /*!
+   * \brief Split a face into triangles by adding a new node onto the face
+   *        and connecting the new node with face nodes
+   */
+  void AddNodeOnFace(SMESH::smIdType triangle,
+                     CORBA::Double x, CORBA::Double y, CORBA::Double z);
+
+  /*!
+   * \brief Change orientation of cells
+   */
   CORBA::Boolean Reorient(const SMESH::smIdType_array & IDsOfElements);
+  /*!
+   * \brief Change orientation of cells
+   */
   CORBA::Boolean ReorientObject(SMESH::SMESH_IDSource_ptr theObject);
-
   /*!
    * \brief Reorient faces contained in \a the2Dgroup.
    * \param the2Dgroup - the mesh or its part to reorient
@@ -192,6 +220,17 @@ public:
                          const SMESH::DirStruct&   theDirection,
                          CORBA::Long               theFace,
                          const SMESH::PointStruct& thePoint);
+  /*!
+   * \brief Reorient faces contained in a list of \a objectFaces
+   *        equally to faces contained in a list of \a referenceFaces.
+   * \param objectFaces - faces to reorient in a list including either
+   *        the whole mesh or groups and/or sub-meshes.
+   * \param referenceFaces  - correctly oriented faces in a list of groups and/or sub-meshes.
+   *        It can be empty, then the 1st face in \a objectFaces is used as the reference.
+   * \return number of reoriented faces.
+   */
+  CORBA::Long Reorient2DByNeighbours(const SMESH::ListOfIDSources& objectFaces,
+                                     const SMESH::ListOfIDSources& referenceFaces);
   /*!
    * \brief Reorient faces basing on orientation of adjacent volumes.
    * \param faces - a list of objects containing face to reorient
@@ -220,7 +259,7 @@ public:
                                   CORBA::Boolean                Diag13);
   CORBA::Boolean SplitQuadObject (SMESH::SMESH_IDSource_ptr     theObject,
                                   CORBA::Boolean                Diag13);
-  CORBA::Long    BestSplit       (CORBA::Long                   IDOfQuad,
+  CORBA::Short   BestSplit       (SMESH::smIdType               IDOfQuad,
                                   SMESH::NumericalFunctor_ptr   Criterion);
   void           SplitVolumesIntoTetra(SMESH::SMESH_IDSource_ptr elems,
                                        CORBA::Short             methodFlags);
@@ -798,6 +837,7 @@ public:
                                    const char* groupName,
                                    const char* meshName,
                                    CORBA::Boolean toCopyAll,
+                                   CORBA::Boolean toCreateAllElements,
                                    const SMESH::ListOfIDSources& groups,
                                    SMESH::SMESH_Mesh_out mesh,
                                    SMESH::SMESH_Group_out group);