From 44c225aaf563ea48ce93d017da038c87d27d20fb Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 5 Aug 2021 17:23:27 +0300 Subject: [PATCH] bos #24596 [CEA] New MeshGems license --- src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx | 8 ++++++++ src/BLSURFPlugin/CMakeLists.txt | 1 + 2 files changed, 9 insertions(+) diff --git a/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx b/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx index e47c490..afac06f 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx +++ b/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx @@ -40,6 +40,7 @@ extern "C"{ #include #include #include +#include #include #include #include @@ -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()"); diff --git a/src/BLSURFPlugin/CMakeLists.txt b/src/BLSURFPlugin/CMakeLists.txt index a58e725..85d767a 100644 --- a/src/BLSURFPlugin/CMakeLists.txt +++ b/src/BLSURFPlugin/CMakeLists.txt @@ -54,6 +54,7 @@ SET(_link_LIBRARIES ${SMESH_StdMeshersEngine} ${SMESH_SMDS} ${SMESH_SMESHDS} + ${SMESH_SMESHUtils} ${GEOM_GEOMbasic} ${KERNEL_OpUtil} ${KERNEL_SalomeGenericObj} -- 2.39.2