From c2a9933504c2bdfbeee25ce17b8ebd3bd012298c Mon Sep 17 00:00:00 2001 From: gdd Date: Thu, 18 Oct 2012 12:36:36 +0000 Subject: [PATCH] Recover previously removed methods (Python dumps were broken) --- idl/BLSURFPlugin_Algorithm.idl | 34 +++++---- .../BLSURFPlugin_Hypothesis_i.cxx | 72 +++++++++++++++++++ .../BLSURFPlugin_Hypothesis_i.hxx | 23 ++++++ 3 files changed, 117 insertions(+), 12 deletions(-) diff --git a/idl/BLSURFPlugin_Algorithm.idl b/idl/BLSURFPlugin_Algorithm.idl index ec9d552..1cd1cd9 100644 --- a/idl/BLSURFPlugin_Algorithm.idl +++ b/idl/BLSURFPlugin_Algorithm.idl @@ -273,11 +273,6 @@ module BLSURFPlugin void SetPreCADProcess3DTopology(in boolean toProcess); boolean GetPreCADProcess3DTopology(); -// /*! -// * To remove nano edges. -// */ -// void SetPreCADRemoveNanoEdges(in boolean toRemoveNanoEdges); -// boolean GetPreCADRemoveNanoEdges(); /*! * To compute topology from scratch @@ -285,13 +280,6 @@ module BLSURFPlugin void SetPreCADDiscardInput(in boolean toDiscardInput); boolean GetPreCADDiscardInput(); -// /*! -// * Sets the length below which an edge is considered as nano -// * for the topology processing. -// */ -// void SetPreCADEpsNano(in double epsNano); -// double GetPreCADEpsNano(); - /*! * Sets advanced option value */ @@ -445,6 +433,28 @@ module BLSURFPlugin void SetGMFFile(in string theFileName); string GetGMFFile(); // boolean GetGMFFileMode(); + + // + // Obsolete methods - To be removed in V7 + // + void SetPhyMin(in double theMinSize); + double GetPhyMin(); + void SetPhyMax(in double theMaxSize); + double GetPhyMax(); + void SetGeoMin(in double theMinSize); + double GetGeoMin(); + void SetGeoMax(in double theMaxSize); + double GetGeoMax(); + void SetAngleMeshS(in double angle); + double GetAngleMeshS(); + void SetAngleMeshC(in double angle); + double GetAngleMeshC(); + void SetDecimesh(in boolean toIgnoreEdges); + boolean GetDecimesh(); + void SetPreCADRemoveNanoEdges(in boolean toRemoveNanoEdges); + boolean GetPreCADRemoveNanoEdges(); + void SetPreCADEpsNano(in double epsNano); + double GetPreCADEpsNano(); }; }; diff --git a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.cxx b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.cxx index 3625fa5..77af19a 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.cxx +++ b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.cxx @@ -2660,3 +2660,75 @@ char* BLSURFPlugin_Hypothesis_i::GetGMFFile() { CORBA::Boolean BLSURFPlugin_Hypothesis_i::IsDimSupported(SMESH::Dimension type) { return type == SMESH::DIM_2D; } + +// +// Obsolete methods - To be removed in V7 +// + +void BLSURFPlugin_Hypothesis_i::SetPhyMin(CORBA::Double theMinSize) { + this->SetMinSize(theMinSize); +} +CORBA::Double BLSURFPlugin_Hypothesis_i::GetPhyMin() { + return this->GetMinSize(); +} +void BLSURFPlugin_Hypothesis_i::SetPhyMax(CORBA::Double theMaxSize) { + this->SetMaxSize(theMaxSize); +} +CORBA::Double BLSURFPlugin_Hypothesis_i::GetPhyMax() { + return this->GetMaxSize(); +} +void BLSURFPlugin_Hypothesis_i::SetGeoMin(CORBA::Double theMinSize) { + this->SetMinSize(theMinSize); +} +CORBA::Double BLSURFPlugin_Hypothesis_i::GetGeoMin() { + return this->GetMinSize(); +} +void BLSURFPlugin_Hypothesis_i::SetGeoMax(CORBA::Double theMaxSize) { + this->SetMaxSize(theMaxSize); +} +CORBA::Double BLSURFPlugin_Hypothesis_i::GetGeoMax() { + return this->GetMaxSize(); +} +void BLSURFPlugin_Hypothesis_i::SetAngleMeshS(CORBA::Double theValue) { + this->SetAngleMesh(theValue); +} +CORBA::Double BLSURFPlugin_Hypothesis_i::GetAngleMeshS() { + return this->GetAngleMesh(); +} +void BLSURFPlugin_Hypothesis_i::SetAngleMeshC(CORBA::Double theValue) { + this->SetAngleMesh(theValue); +} +CORBA::Double BLSURFPlugin_Hypothesis_i::GetAngleMeshC() { + return this->GetAngleMesh(); +} +void BLSURFPlugin_Hypothesis_i::SetDecimesh(CORBA::Boolean theValue) { + std::string theValueStr = theValue ? "1" : "0"; + this->SetOptionValue("respect_geometry",theValueStr.c_str()); +} +CORBA::Boolean BLSURFPlugin_Hypothesis_i::GetDecimesh() { + std::string theValueStr = this->GetOptionValue("respect_geometry"); + if (theValueStr.empty() || theValueStr == "respect") + return true; + return false; +} +void BLSURFPlugin_Hypothesis_i::SetPreCADRemoveNanoEdges(CORBA::Boolean theValue) { + std::string theValueStr = theValue ? "1" : "0"; + this->SetPreCADOptionValue("remove_tiny_edges",theValueStr.c_str()); +} +CORBA::Boolean BLSURFPlugin_Hypothesis_i::GetPreCADRemoveNanoEdges() { + std::string theValueStr = this->GetPreCADOptionValue("remove_tiny_edges"); + if (theValueStr == "1") + return true; + return false; +} +void BLSURFPlugin_Hypothesis_i::SetPreCADEpsNano(CORBA::Double theValue) { + std::ostringstream theValueStr; + theValueStr << theValue; + this->SetPreCADOptionValue("tiny_edge_length",theValueStr.str().c_str()); +} +CORBA::Double BLSURFPlugin_Hypothesis_i::GetPreCADEpsNano() { + std::istringstream theValueStr(this->GetPreCADOptionValue("tiny_edge_length")); + double result; + theValueStr >> result; + return result; +} diff --git a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.hxx b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.hxx index fb7c33e..3712bee 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.hxx +++ b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.hxx @@ -269,6 +269,29 @@ public: // Verify whether hypothesis supports given entity type CORBA::Boolean IsDimSupported(SMESH::Dimension type); + + + // + // Obsolete methods - To be removed in V7 + // + void SetPhyMin(CORBA::Double theMinSize); + CORBA::Double GetPhyMin(); + void SetPhyMax(CORBA::Double theMaxSize); + CORBA::Double GetPhyMax(); + void SetGeoMin(CORBA::Double theMinSize); + CORBA::Double GetGeoMin(); + void SetGeoMax(CORBA::Double theMaxSize); + CORBA::Double GetGeoMax(); + void SetAngleMeshS(CORBA::Double angle); + CORBA::Double GetAngleMeshS(); + void SetAngleMeshC(CORBA::Double angle); + CORBA::Double GetAngleMeshC(); + void SetDecimesh(CORBA::Boolean toIgnoreEdges); + CORBA::Boolean GetDecimesh(); + void SetPreCADRemoveNanoEdges(CORBA::Boolean toRemoveNanoEdges); + CORBA::Boolean GetPreCADRemoveNanoEdges(); + void SetPreCADEpsNano(CORBA::Double epsNano); + CORBA::Double GetPreCADEpsNano(); }; #endif -- 2.39.2