Salome HOME
22833: [CEA 1346] to extrude a group of faces following the normal of each face
[modules/smesh.git] / src / SMESH_I / SMESH_MeshEditor_i.hxx
index e74df378834285a2cc7c147dbfde1ddb327da45c..e0f054d5c978438a9b08129c9aefbccc9cade000 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -42,6 +42,7 @@ class SMESH_Mesh_i;
 
 namespace MeshEditor_I {
   struct TPreviewMesh;
+  struct ExtrusionParams;
 }
 
 class SMESH_MeshEditor_i: public POA_SMESH::SMESH_MeshEditor
@@ -203,6 +204,18 @@ public:
                          const SMESH::DirStruct&   theDirection,
                          CORBA::Long               theFace,
                          const SMESH::PointStruct& thePoint) throw (SALOME::SALOME_Exception);
+  /*!
+   * \brief Reorient faces basing on orientation of adjacent volumes.
+   * \param faces - a list of objects containing face to reorient
+   * \param volumes - an object containing volumes.
+   * \param outsideNormal - to orient faces to have their normal
+   *        pointing either \a outside or \a inside the adjacent volumes.
+   * \return number of reoriented faces.
+   */
+  CORBA::Long Reorient2DBy3D(const SMESH::ListOfIDSources & faces,
+                             SMESH::SMESH_IDSource_ptr      volumes,
+                             CORBA::Boolean                 outsideNormal)
+    throw (SALOME::SALOME_Exception);
 
   // Split/Join faces
   CORBA::Boolean TriToQuad       (const SMESH::long_array &   IDsOfElements,
@@ -233,6 +246,12 @@ public:
   void           SplitVolumesIntoTetra(SMESH::SMESH_IDSource_ptr elems,
                                        CORBA::Short             methodFlags)
     throw (SALOME::SALOME_Exception);
+  void           SplitHexahedraIntoPrisms(SMESH::SMESH_IDSource_ptr  elems,
+                                          const SMESH::PointStruct & startHexPoint,
+                                          const SMESH::DirStruct&    facetToSplitNormal,
+                                          CORBA::Short               methodFlags,
+                                          CORBA::Boolean             allDomains)
+    throw (SALOME::SALOME_Exception);
 
   CORBA::Boolean Smooth(const SMESH::long_array &              IDsOfElements,
                         const SMESH::long_array &              IDsOfFixedNodes,
@@ -340,6 +359,14 @@ public:
                               const SMESH::DirStruct &  StepVector,
                               CORBA::Long               NbOfSteps)
     throw (SALOME::SALOME_Exception);
+  SMESH::ListOfGroups* ExtrusionByNormal(SMESH::SMESH_IDSource_ptr object,
+                                         CORBA::Double             stepSize,
+                                         CORBA::Long               nbOfSteps,
+                                         CORBA::Boolean            byAverageNormal,
+                                         CORBA::Boolean            useInputElemsOnly,
+                                         CORBA::Boolean            makeGroups,
+                                         CORBA::Short              dim)
+    throw (SALOME::SALOME_Exception);
   void AdvancedExtrusion(const SMESH::long_array & theIDsOfElements,
                          const SMESH::DirStruct &  theStepVector,
                          CORBA::Long               theNbOfSteps,
@@ -917,12 +944,15 @@ public:
    * The nodes of the internal faces at the boundaries of the groups are doubled.
    * In option, the internal faces are replaced by flat elements.
    * Triangles are transformed in prisms, and quadrangles in hexahedrons.
-   * @param theDomains - list of groups of volumes
-   * @param createJointElems - if TRUE, create the elements
-   * @return TRUE if operation has been completed successfully, FALSE otherwise
+   * \param theDomains - list of groups of volumes
+   * \param createJointElems - if TRUE, create the elements
+   * \param onAllBoundaries - if TRUE, the nodes and elements are also create on
+   *        the boundary between \a theDomains and the rest mesh
+   * \return TRUE if operation has been completed successfully, FALSE otherwise
    */
   CORBA::Boolean DoubleNodesOnGroupBoundaries( const SMESH::ListOfGroups& theDomains,
-                                               CORBA::Boolean createJointElems )
+                                               CORBA::Boolean             createJointElems,
+                                               CORBA::Boolean             onAllBoundaries )
     throw (SALOME::SALOME_Exception);
   /*!
    * \brief Double nodes on some external faces and create flat elements.
@@ -1004,11 +1034,9 @@ private: //!< private methods
                                      const bool                MakeGroups,
                                      const SMDSAbs_ElementType ElementType=SMDSAbs_All)
     throw (SALOME::SALOME_Exception);
-  SMESH::ListOfGroups* extrusionSweep(const SMESH::long_array & IDsOfElements,
-                                      const SMESH::DirStruct &  StepVector,
-                                      CORBA::Long               NbOfSteps,
-                                      bool                      MakeGroups,
-                                      const SMDSAbs_ElementType ElementType=SMDSAbs_All)
+  SMESH::ListOfGroups* extrusionSweep(const SMESH::long_array &      IDsOfElements,
+                                      MeshEditor_I::ExtrusionParams& params,
+                                      const SMDSAbs_ElementType      ElementType=SMDSAbs_All)
     throw (SALOME::SALOME_Exception);
   SMESH::ListOfGroups* advancedExtrusion(const SMESH::long_array & theIDsOfElements,
                                          const SMESH::DirStruct &  theStepVector,