Salome HOME
[bos #40653][CEA] New mesh import export formats with meshio.
[modules/smesh.git] / src / SMESH_I / SMESH_Gen_i.hxx
index 5a5ba6fad617fca978243ac9b30021c0c2776860..1b3af8ad506a974b952fb06192d4bb42e1a33e9d 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2020  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
@@ -46,6 +46,7 @@
 #include <Utils_CorbaException.hxx>
 
 #include <GEOM_Client.hxx>
+#include <smIdType.hxx>
 
 #include <TCollection_AsciiString.hxx>
 #include <Resource_DataMapOfAsciiStringAsciiString.hxx>
@@ -103,6 +104,8 @@ public:
   static CORBA::ORB_var GetORB() { return myOrb;}
   // Get SMESH module's POA object
   static PortableServer::POA_var GetPOA() { return myPoa;}
+  // Set Naming Service object
+  static void SetNS(SALOME_NamingService_Abstract *ns);
   // Get Naming Service object
   static SALOME_NamingService_Abstract* GetNS();
   // Get SALOME_LifeCycleCORBA object
@@ -228,6 +231,9 @@ public:
   // Create empty mesh on a shape
   SMESH::SMESH_Mesh_ptr CreateMesh( GEOM::GEOM_Object_ptr theShapeObject );
 
+  // Create empty parallel mesh on a shape
+  SMESH::SMESH_ParallelMesh_ptr CreateParallelMesh( GEOM::GEOM_Object_ptr theShapeObject );
+
   // Create empty mesh
   SMESH::SMESH_Mesh_ptr CreateEmptyMesh();
 
@@ -238,10 +244,6 @@ public:
   SMESH::mesh_array* CreateMeshesFromMED( const char* theFileName,
                                           SMESH::DriverMED_ReadStatus& theStatus );
 
-  //  Create mesh(es) and import data from MED file
-  SMESH::mesh_array* CreateMeshesFromSAUV( const char* theFileName,
-                                           SMESH::DriverMED_ReadStatus& theStatus );
-
   //  Create a mesh and import data from a STL file
   SMESH::SMESH_Mesh_ptr CreateMeshesFromSTL( const char* theFileName );
 
@@ -254,6 +256,15 @@ public:
                                              CORBA::Boolean          theMakeRequiredGroups,
                                              SMESH::ComputeError_out theError);
 
+  //  Create a mesh and import data from any file supported by meshio library
+  SMESH::mesh_array* CreateMeshesFromMESHIO(const char*             theFileName,
+                                            SMESH::DriverMED_ReadStatus& theStatus);
+
+  // Create dual mesh of a tetrahedron mesh
+  SMESH::SMESH_Mesh_ptr CreateDualMesh(SMESH::SMESH_IDSource_ptr meshPart,
+                                       const char*               meshName,
+                                       CORBA::Boolean            adapt_to_shape);
+
   // Copy a part of mesh
   SMESH::SMESH_Mesh_ptr CopyMesh(SMESH::SMESH_IDSource_ptr meshPart,
                                  const char*               meshName,
@@ -292,7 +303,7 @@ public:
    *  returns statistic of mesh elements
    * Result array of number enityties
    */
-  SMESH::long_array* Evaluate(SMESH::SMESH_Mesh_ptr theMesh,
+  SMESH::smIdType_array* Evaluate(SMESH::SMESH_Mesh_ptr theMesh,
                               GEOM::GEOM_Object_ptr theShapeObject);
 
   // Returns true if mesh contains enough data to be computed
@@ -328,12 +339,12 @@ public:
 
   // Return geometrical object the given element is built on. Publish it in study.
   GEOM::GEOM_Object_ptr GetGeometryByMeshElement( SMESH::SMESH_Mesh_ptr  theMesh,
-                                                  CORBA::Long            theElementID,
+                                                  SMESH::smIdType        theElementID,
                                                   const char*            theGeomName);
 
   // Return geometrical object the given element is built on. Don't publish it in study.
   GEOM::GEOM_Object_ptr FindGeometryByMeshElement( SMESH::SMESH_Mesh_ptr  theMesh,
-                                                   CORBA::Long            theElementID);
+                                                   SMESH::smIdType        theElementID);
 
   // Concatenate the given meshes into one mesh
   SMESH::SMESH_Mesh_ptr ConcatenateCommon(const SMESH::ListOfIDSources& meshesArray,
@@ -477,6 +488,12 @@ public:
 
   int CountInPyDump(const TCollection_AsciiString& text);
 
+  SMESH::MG_ADAPT_ptr CreateMG_ADAPT();
+  SMESHHOMARD::HOMARD_Gen_ptr CreateHOMARD_ADAPT();
+  SMESH::MG_ADAPT_ptr CreateAdaptationHypothesis();
+  //SMESH::MG_ADAPT_OBJECT_ptr Adaptation( const char* adaptationType);
+  SALOME::GenericObj_ptr Adaptation( const char* adaptationType);
+
   // *****************************************
   // Internal methods
   // *****************************************
@@ -622,6 +639,7 @@ private:
                                                 const char* theLibName);
   // Create empty mesh on shape
   SMESH::SMESH_Mesh_ptr createMesh();
+  SMESH::SMESH_ParallelMesh_ptr createParallelMesh();
 
   // Check mesh icon
   bool isGeomModifIcon( SMESH::SMESH_Mesh_ptr mesh );
@@ -634,11 +652,6 @@ private:
 
   void highLightInvalid( SALOMEDS::SObject_ptr theSObject, bool isInvalid );
 
-  SMESH::mesh_array* CreateMeshesFromMEDorSAUV( const char* theFileName,
-                                                SMESH::DriverMED_ReadStatus& theStatus,
-                                                const char* theCommandNameForPython,
-                                                const char* theFileNameForPython);
-
   std::vector<long> _GetInside(SMESH::SMESH_IDSource_ptr meshPart,
                                SMESH::ElementType        ElemType,
                                const TopoDS_Shape&       Shape,