interface BLSURFPlugin_Hypothesis : SMESH::SMESH_Hypothesis
{
+ /*!
+ * Get version of MeshGems suite.
+ * The version is a string in form <major>.<minor>-<patch>. Example: "2.9-6".
+ */
+ string GetMeshGemsVersion();
+
/*!
*Set a way to define size of mesh elements to generate
* 0 - size is defined automatically
#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
{
_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 );
return S;
}
+//=============================================================================
+std::string BLSURFPlugin_Hypothesis::GetMeshGemsVersion()
+{
+ return MESHGEMS_VERSION_LONG;
+}
+
//=============================================================================
void BLSURFPlugin_Hypothesis::SetPhysicalMesh(PhysicalMesh thePhysicalMesh) {
if (thePhysicalMesh != _physicalMesh) {
TopoDS_Shape entryToShape(std::string entry);
+ static std::string GetMeshGemsVersion();
+
void SetPhysicalMesh(PhysicalMesh thePhysicalMesh);
PhysicalMesh GetPhysicalMesh() const { return _physicalMesh; }
}
//=============================================================================
+/*!
+ * BLSURFPlugin_Hypothesis_i::GetMeshGemsVersion
+ *
+ * Get version of MeshGems suite.
+ */
+//=============================================================================
+char* BLSURFPlugin_Hypothesis_i::GetMeshGemsVersion()
+{
+ return CORBA::string_dup( this->GetImpl()->GetMeshGemsVersion().c_str() );
+}
//=============================================================================
/*!
*
* Set PhysicalMesh
*/
-
//=============================================================================
void BLSURFPlugin_Hypothesis_i::SetPhysicalMesh(CORBA::Long theValue)
{
// Destructor
virtual ~BLSURFPlugin_Hypothesis_i();
+ char* GetMeshGemsVersion();
+
void SetPhysicalMesh(CORBA::Long theValue);
CORBA::Long GetPhysicalMesh();