From 6e8d972ce4d88a9088bfb4e1fec6ae381e6e9f68 Mon Sep 17 00:00:00 2001 From: Paul RASCLE Date: Fri, 1 Jul 2016 18:43:34 +0200 Subject: [PATCH] dump correction immersible objects and export name --- src/HYDROData/HYDROData_CalculationCase.cxx | 7 ++++--- src/HYDROData/HYDROData_ImmersibleZone.cxx | 5 +++++ src/HYDROPy/HYDROData_Object.sip | 1 + 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/HYDROData/HYDROData_CalculationCase.cxx b/src/HYDROData/HYDROData_CalculationCase.cxx index de643ebb..c3d4961d 100644 --- a/src/HYDROData/HYDROData_CalculationCase.cxx +++ b/src/HYDROData/HYDROData_CalculationCase.cxx @@ -196,9 +196,10 @@ QStringList HYDROData_CalculationCase::DumpToPython( const QString& thePyS aResList << "import GEOM"; aResList << QString( "print \"Entry:\", %1" ).arg( anEntryVar ); QString aGeomShapeName = aCalculName + "_geom"; - aResList << QString( "%1 = salome.IDToObject( str( %2 ) )" ).arg( aGeomShapeName ).arg( anEntryVar ); - aResList << QString( "print \"Geom shape:\", %1" ).arg( aGeomShapeName ); - aResList << QString( "print \"Geom shape name:\", %1.GetName()" ).arg( aGeomShapeName ); + aResList << QString( "HYDRO_%1 = salome.IDToObject( str( %2 ) )" ).arg( GetName() ).arg( anEntryVar ); + aResList << QString( "print \"Geom shape:\", HYDRO_%1" ).arg( GetName() ); + aResList << QString( "print \"Geom shape name:\", HYDRO_%1.GetName()" ).arg( GetName() ); + //DumpSampleMeshing( aResList, aStudyName, aGeomShapeName, aCalculName+"_mesh" ); diff --git a/src/HYDROData/HYDROData_ImmersibleZone.cxx b/src/HYDROData/HYDROData_ImmersibleZone.cxx index b6a46954..c456c8c9 100644 --- a/src/HYDROData/HYDROData_ImmersibleZone.cxx +++ b/src/HYDROData/HYDROData_ImmersibleZone.cxx @@ -77,6 +77,11 @@ QStringList HYDROData_ImmersibleZone::DumpToPython( const QString& thePyScriptPa Handle(HYDROData_PolylineXY) aRefPolyline = GetPolyline(); setPythonReferenceObject( thePyScriptPath, theTreatedObjects, aResList, aRefPolyline, "SetPolyline" ); + if (!this->IsSubmersible()) + { + aResList << QString( "%1.SetIsSubmersible(False)" ).arg( aZoneName ); + } + aResList << QString( "" ); aResList << QString( "%1.Update()" ).arg( aZoneName ); diff --git a/src/HYDROPy/HYDROData_Object.sip b/src/HYDROPy/HYDROData_Object.sip index abe2d984..5e18bd21 100644 --- a/src/HYDROPy/HYDROData_Object.sip +++ b/src/HYDROPy/HYDROData_Object.sip @@ -175,6 +175,7 @@ public: %End + void SetIsSubmersible( bool ) const; protected: -- 2.39.2