From: vsr Date: Fri, 4 Jun 2010 06:46:25 +0000 (+0000) Subject: Patch from Erwan ADAM : fix bugs in DumpPython for NETGEN plugin when local size... X-Git-Tag: V5_1_4~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=df20adf4f96ca1689be954cab7fab0b4252ab964;p=plugins%2Fnetgenplugin.git Patch from Erwan ADAM : fix bugs in DumpPython for NETGEN plugin when local size feature is used --- diff --git a/idl/NETGENPlugin_Algorithm.idl b/idl/NETGENPlugin_Algorithm.idl index 365b046..d342a94 100644 --- a/idl/NETGENPlugin_Algorithm.idl +++ b/idl/NETGENPlugin_Algorithm.idl @@ -29,6 +29,7 @@ #include "SALOME_Exception.idl" #include "SMESH_Hypothesis.idl" +#include "GEOM_Gen.idl" /*! * NETGENPlugin: interfaces to NETGEN related hypotheses and algorithms @@ -92,6 +93,7 @@ module NETGENPlugin void SetNbSegPerRadius(in double value); double GetNbSegPerRadius(); + void SetLocalSizeOnShape(in GEOM::GEOM_Object GeomObj, in double localSize); void SetLocalSizeOnEntry(in string entry, in double localSize); double GetLocalSizeOnEntry(in string entry); string_array GetLocalSizeEntries(); diff --git a/src/NETGENPlugin/NETGENPlugin_Hypothesis_i.cxx b/src/NETGENPlugin/NETGENPlugin_Hypothesis_i.cxx index 7fa0b68..04bd830 100644 --- a/src/NETGENPlugin/NETGENPlugin_Hypothesis_i.cxx +++ b/src/NETGENPlugin/NETGENPlugin_Hypothesis_i.cxx @@ -31,6 +31,7 @@ #include "NETGENPlugin_Hypothesis_i.hxx" #include "SMESH_Gen.hxx" #include "SMESH_PythonDump.hxx" +#include "GEOM_Object.hxx" #include "Utils_CorbaException.hxx" #include "utilities.h" @@ -274,6 +275,15 @@ CORBA::Double NETGENPlugin_Hypothesis_i::GetNbSegPerRadius() //============================================================================= +void NETGENPlugin_Hypothesis_i::SetLocalSizeOnShape(GEOM::GEOM_Object_ptr GeomObj, CORBA::Double localSize) +{ + string entry; + entry = GeomObj->GetStudyEntry(); + SetLocalSizeOnEntry(entry.c_str(), localSize); +} + +//============================================================================= + void NETGENPlugin_Hypothesis_i::SetLocalSizeOnEntry(const char* entry, CORBA::Double localSize) { bool valueChanged = false; @@ -281,7 +291,7 @@ void NETGENPlugin_Hypothesis_i::SetLocalSizeOnEntry(const char* entry, CORBA::Do if ( valueChanged ) this->GetImpl()->SetLocalSizeOnEntry(entry, localSize); if ( valueChanged ) - SMESH::TPythonDump() << _this() << ".SetLocalSizeOnEntry(" << entry << ", " << localSize << ")"; + SMESH::TPythonDump() << _this() << ".SetLocalSizeOnShape(" << entry << ", " << localSize << ")"; } //============================================================================= diff --git a/src/NETGENPlugin/NETGENPlugin_Hypothesis_i.hxx b/src/NETGENPlugin/NETGENPlugin_Hypothesis_i.hxx index c321122..1068706 100644 --- a/src/NETGENPlugin/NETGENPlugin_Hypothesis_i.hxx +++ b/src/NETGENPlugin/NETGENPlugin_Hypothesis_i.hxx @@ -40,6 +40,7 @@ #include "NETGENPlugin_Hypothesis.hxx" class SMESH_Gen; +//class GEOM_Object; // NETGENPlugin parameters hypothesis @@ -76,6 +77,7 @@ class NETGENPLUGIN_EXPORT NETGENPlugin_Hypothesis_i: void SetNbSegPerRadius(CORBA::Double theVal); CORBA::Double GetNbSegPerRadius(); + void SetLocalSizeOnShape(GEOM::GEOM_Object_ptr GeomObj, CORBA::Double localSize); void SetLocalSizeOnEntry(const char* entry, CORBA::Double localSize); CORBA::Double GetLocalSizeOnEntry(const char* entry); NETGENPlugin::string_array* GetLocalSizeEntries();