From 6cac86efeba8c559da18c86e4cb185a7dbf9c5dd 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 | 14 +++++++++++--- src/BLSURFPlugin/CMakeLists.txt | 1 + 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx b/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx index 6e30bca..68ffe3e 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx +++ b/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx @@ -42,6 +42,7 @@ extern "C"{ #include #include #include +#include #include #include #include @@ -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()"); diff --git a/src/BLSURFPlugin/CMakeLists.txt b/src/BLSURFPlugin/CMakeLists.txt index 170f618..411db86 100644 --- a/src/BLSURFPlugin/CMakeLists.txt +++ b/src/BLSURFPlugin/CMakeLists.txt @@ -53,6 +53,7 @@ SET(_link_LIBRARIES ${SMESH_StdMeshersEngine} ${SMESH_SMDS} ${SMESH_SMESHDS} + ${SMESH_SMESHUtils} ${GEOM_GEOMbasic} ${KERNEL_OpUtil} ${KERNEL_SalomeGenericObj} -- 2.39.2