Salome HOME
bos #24596 [CEA] New MeshGems license occ/new_mg_licnese
authoreap <eap@opencascade.com>
Thu, 5 Aug 2021 14:23:27 +0000 (17:23 +0300)
committereap <eap@opencascade.com>
Thu, 5 Aug 2021 14:23:27 +0000 (17:23 +0300)
src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx
src/BLSURFPlugin/CMakeLists.txt

index e47c490c954f1095aed332128c14e4ed8f62c1b2..afac06f0ca69b47fa53f41acbc986def127b7b51 100644 (file)
@@ -40,6 +40,7 @@ extern "C"{
 #include <SMESH_File.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>
@@ -2528,6 +2529,9 @@ bool BLSURFPlugin_BLSURF::compute(SMESH_Mesh&         aMesh,
     // set_param(css, "global_physical_size", val_to_string( minFaceSize * 0.5 ).c_str());
     // set_param(css, "max_size",             val_to_string( minFaceSize * 5 ).c_str());
   }
+  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);
@@ -3061,6 +3065,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 a58e725304516b42c3af5c19b030ed49cad85986..85d767a9a64ebe9310535c8342a0e5c5ef03e7da 100644 (file)
@@ -54,6 +54,7 @@ SET(_link_LIBRARIES
   ${SMESH_StdMeshersEngine}
   ${SMESH_SMDS}
   ${SMESH_SMESHDS}
+  ${SMESH_SMESHUtils}
   ${GEOM_GEOMbasic}
   ${KERNEL_OpUtil}
   ${KERNEL_SalomeGenericObj}