QStringList HYDROData_Region::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
{
- QStringList aResList = HYDROData_Entity::DumpToPython( theTreatedObjects );
- QString aRegionName = GetName();
+ QStringList aResList = dumpObjectCreation( theTreatedObjects );
+ QString aRegionName = GetObjPyName();
HYDROData_SequenceOfObjects aZones = GetZones();
HYDROData_SequenceOfObjects::Iterator anIter( aZones );
if ( !aRefZone.IsNull() )
setPythonReferenceObject( theTreatedObjects, aResList, aRefZone, "AddZone" );
}
+
+ aResList << QString( "" );
+ aResList << QString( "%1.Update();" ).arg( aRegionName );
aResList << QString( "" );
return aResList;
{
TopoDS_Shape aGroupEdge = anOriGroupDef.Shapes.Value( i );
- bool anIsFound = false;
- for ( int anIndex = 1; anIndex <= aMapOfSubShapes.Extent(); anIndex++ )
- {
- if ( aGroupEdge.IsPartner( aMapOfSubShapes.FindKey( anIndex ) ) )
- {
- anIsFound = true;
- break;
- }
- }
-
- if ( !anIsFound )
+ int aShapeIndex = aMapOfSubShapes.FindIndex( aGroupEdge );
+ if ( aShapeIndex <= 0 )
continue;
anOriGroupDef.Shapes.Remove( i );