]> SALOME platform Git repositories - plugins/blsurfplugin.git/commitdiff
Salome HOME
bos #24596 [CEA] New MeshGems license duc/V9_7_BR_new_MGLIC
authoreap <eap@opencascade.com>
Thu, 5 Aug 2021 14:23:27 +0000 (17:23 +0300)
committerDUC ANH HOANG <duc-anh-externe.hoang@edf.fr>
Thu, 13 Oct 2022 09:41:54 +0000 (11:41 +0200)
src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx
src/BLSURFPlugin/CMakeLists.txt

index 6e30bcaa83681fb42d766085af953dcbc419bea3..68ffe3eedd1ea153aecb52a53f2ca37effaf7064 100644 (file)
@@ -42,6 +42,7 @@ extern "C"{
 #include <SMESHDS_Group.hxx>
 #include <SMESH_Gen.hxx>
 #include <SMESH_Group.hxx>
+#include <SMESH_MGLicenseKeyGen.hxx>
 #include <SMESH_Mesh.hxx>
 #include <SMESH_MeshEditor.hxx>
 #include <SMESH_MesherHelper.hxx>
@@ -1011,7 +1012,7 @@ void BLSURFPlugin_BLSURF::SetParameters(const BLSURFPlugin_Hypothesis* hyp,
   //set_param(css, "process_3d_topology",    _precadProcess3DTopology ? "1" : "0");
   //set_param(css, "discard_input_topology", _precadDiscardInput ? "1" : "0");
   //set_param(css, "max_number_of_points_per_patch", "1000000");
-  
+
    bool useGradation = false;
    switch (_physicalMesh)
    {
@@ -1485,7 +1486,7 @@ namespace
         //       distene_sizemap_delete(iso_sizemap_e);
         //     if(iso_sizemap_f)
         //       distene_sizemap_delete(iso_sizemap_f);
-        // 
+        //
         // //     if(clean_geo_sizemap_e)
         // //       distene_sizemap_delete(clean_geo_sizemap_e);
         // //     if(clean_geo_sizemap_f)
@@ -2505,7 +2506,10 @@ bool BLSURFPlugin_BLSURF::compute(SMESH_Mesh&         aMesh,
   // TODO: be able to use a mesh in input.
   // See imsh usage in Products/templates/mg-cadsurf_template_common.cpp
   // => cadsurf_set_mesh
-    
+  std::string errorTxt;
+  if ( !SMESHUtils_MGLicenseKeyGen::SignCAD( c, errorTxt ))
+    return error( "Problem with library SalomeMeshGemsKeyGenerator: " + errorTxt );
+
   // Use the original dcad
   cadsurf_set_dcad(css, dcad);
 
@@ -3032,6 +3036,10 @@ bool BLSURFPlugin_BLSURF::Compute(SMESH_Mesh & aMesh, SMESH_MesherHelper* aHelpe
       meshgems_mesh_set_quadrangle_vertices( msh, iQ++, nodeIDs );
   }
 
+  std::string errorTxt;
+  if ( !SMESHUtils_MGLicenseKeyGen::SignMesh( msh, errorTxt ))
+    return error( "Problem with library SalomeMeshGemsKeyGenerator: " + errorTxt );
+
   ret = cadsurf_set_mesh(css, msh);
   if ( ret != STATUS_OK ) return error("Pb in cadsurf_set_mesh()");
 
index 170f618e6502fce2710f332a38086c7e19aed223..411db86557321b53465d101b3b147f533be3b3c8 100644 (file)
@@ -53,6 +53,7 @@ SET(_link_LIBRARIES
   ${SMESH_StdMeshersEngine}
   ${SMESH_SMDS}
   ${SMESH_SMESHDS}
+  ${SMESH_SMESHUtils}
   ${GEOM_GEOMbasic}
   ${KERNEL_OpUtil}
   ${KERNEL_SalomeGenericObj}