Salome HOME
Export MeshGems version, to be able to check it in scripts
[plugins/blsurfplugin.git] / src / BLSURFPlugin / BLSURFPlugin_Hypothesis.cxx
index b47c66e8c6a2bbc0112d5447d67cb82f22bd9b18..e20cc149191511f85ef03f31db2323e05fa81c47 100644 (file)
@@ -40,6 +40,7 @@
 #include CORBA_CLIENT_HEADER(GEOM_Gen)
 
 #include <meshgems/meshgems.h>
+#define MESHGEMS_VERSION_HEX (MESHGEMS_VERSION_MAJOR << 16 | MESHGEMS_VERSION_MINOR << 8 | MESHGEMS_VERSION_PATCH)
 
 namespace
 {
@@ -234,7 +235,7 @@ BLSURFPlugin_Hypothesis::BLSURFPlugin_Hypothesis(int hypId, SMESH_Gen * gen, boo
     _defaultOptionValues["compute_ridges"                         ] = "yes";
   }
 
-  if ( strcmp( MESHGEMS_VERSION_LONG, "2.9-6" ) < 0 )
+  if ( MESHGEMS_VERSION_HEX < 0x020906 )
   {
     std::string missingOption = "allow_patch_independent";
     _defaultOptionValues.erase( missingOption );
@@ -268,6 +269,12 @@ TopoDS_Shape BLSURFPlugin_Hypothesis::entryToShape(std::string entry)
   return S;
 }
 
+//=============================================================================
+std::string BLSURFPlugin_Hypothesis::GetMeshGemsVersion()
+{
+  return MESHGEMS_VERSION_LONG;
+}
+
 //=============================================================================
 void BLSURFPlugin_Hypothesis::SetPhysicalMesh(PhysicalMesh thePhysicalMesh) {
   if (thePhysicalMesh != _physicalMesh) {