Salome HOME
projects
/
modules
/
hydro.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
debug of tests for DTM
[modules/hydro.git]
/
src
/
HYDROData
/
HYDROData_Region.cxx
diff --git
a/src/HYDROData/HYDROData_Region.cxx
b/src/HYDROData/HYDROData_Region.cxx
index 60210bbc30e700e689d31d8d9f0f40faac5b8262..698cfc944925502b5744e9ae3adc281bc39b5523 100644
(file)
--- a/
src/HYDROData/HYDROData_Region.cxx
+++ b/
src/HYDROData/HYDROData_Region.cxx
@@
-44,6
+44,7
@@
#include <ShapeUpgrade_UnifySameDomain.hxx>
#include <QStringList>
#include <ShapeUpgrade_UnifySameDomain.hxx>
#include <QStringList>
+#include <QColor>
//#define DEB_GET_REGION_SHAPE
//#define DEB_GET_REGION_SHAPE
@@
-389,12
+390,13
@@
TopoDS_Shape HYDROData_Region::GetShape( HYDROData_ShapesGroup::SeqOfGroupsDefs*
}
QStringList HYDROData_Region::DumpToPython( const QString& thePyScriptPath,
}
QStringList HYDROData_Region::DumpToPython( const QString& thePyScriptPath,
- MapOfTreatedObjects& theTreatedObjects ) const
+ MapOfTreatedObjects& theTreatedObjects,
+ QString defRegName ) const
{
QStringList aResList;
// Find region
{
QStringList aResList;
// Find region
- findPythonReferenceObject(
theTreatedObjects, aResList
);
+ findPythonReferenceObject(
aResList, defRegName
);
// Add zones
HYDROData_SequenceOfObjects aZones = GetZones();
// Add zones
HYDROData_SequenceOfObjects aZones = GetZones();
@@
-407,7
+409,7
@@
QStringList HYDROData_Region::DumpToPython( const QString& thePyScriptPath
}
// find zone
}
// find zone
- aZone->findPythonReferenceObject(
theTreatedObjects,
aResList );
+ aZone->findPythonReferenceObject( aResList );
theTreatedObjects.insert( aZone->GetName(), aZone );
// set zone merge type
theTreatedObjects.insert( aZone->GetName(), aZone );
// set zone merge type
@@
-427,14
+429,18
@@
QStringList HYDROData_Region::DumpToPython( const QString& thePyScriptPath
if ( aMergeType == HYDROData_Zone::Merge_Object ) {
Handle(HYDROData_Entity) aMergeObject = aZone->GetMergeObject();
if ( !aMergeObject.IsNull() ) {
if ( aMergeType == HYDROData_Zone::Merge_Object ) {
Handle(HYDROData_Entity) aMergeObject = aZone->GetMergeObject();
if ( !aMergeObject.IsNull() ) {
- aMergeObject->findPythonReferenceObject(
theTreatedObjects,
aResList );
+ aMergeObject->findPythonReferenceObject( aResList );
aResList << QString( "%1.SetMergeObject( %2 )" ).arg( aZone->GetObjPyName() )
.arg( aMergeObject->GetObjPyName() );
}
}
aResList << QString( "%1.SetMergeObject( %2 )" ).arg( aZone->GetObjPyName() )
.arg( aMergeObject->GetObjPyName() );
}
}
-
+ // set color
+ QColor zoneColor = aZone->GetColor(Qt::darkBlue);
+ aResList << QString( "%1.SetColor( QColor( %2, %3, %4 ))" )
+ .arg( aZone->GetObjPyName() ).arg( zoneColor.red() ).arg( zoneColor.green() ).arg( zoneColor.blue() );
// add zone
setPythonReferenceObject( thePyScriptPath, theTreatedObjects, aResList, aZone, "AddZone" );
// add zone
setPythonReferenceObject( thePyScriptPath, theTreatedObjects, aResList, aZone, "AddZone" );
+
}
return aResList;
}
return aResList;