Salome HOME
porting to Ubuntu 20.04 native prerequisites
authorPaul RASCLE <paul.rascle@openfields.fr>
Sun, 10 May 2020 08:02:29 +0000 (10:02 +0200)
committerYOANN AUDOUIN <B61570@dsp0851742.postes.calibre.edf.fr>
Fri, 30 Oct 2020 16:06:21 +0000 (17:06 +0100)
doc/salome/tutorial/conf.py.in
doc/salome/tutorial/english/conf.py.in
doc/salome/tutorial/local/conf.py
src/HYDROData/HYDROData_CalculationCase.cxx
src/HYDROData/HYDROData_CalculationCase.h
src/HYDROData/HYDROData_Entity.h
src/HYDROData/HYDROData_Object.cxx
src/HYDROData/HYDROData_Object.h
src/HYDROPy/HYDROData_Entity.sip
src/HYDROPy/HYDROData_IAltitudeObject.sip
src/HYDROPy/HYDROData_IPolyline.sip

index bc2952fee914d0956cccb113d265e78b7f132534..61af32ddc72748d5bd14eb905d1a3ae041004788 100644 (file)
@@ -41,7 +41,7 @@ import sys, os
 # Add any Sphinx extension module names here, as strings. They can be extensions
 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
 #extensions = ['sphinx.ext.extlinks']
-extensions = ['sphinx.ext.viewcode','sphinx.ext.pngmath']
+extensions = ['sphinx.ext.viewcode','sphinx.ext.imgmath']
 
 # Add any paths that contain templates here, relative to this directory.
 #templates_path = ['_templates']
index 106c9b91840f8e52eb59d0f49310a06e327d19ea..7ed0bc9545d846dfb7f9cd81cbb82ad4e2efe1fa 100644 (file)
@@ -41,7 +41,7 @@ import sys, os
 # Add any Sphinx extension module names here, as strings. They can be extensions
 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
 #extensions = ['sphinx.ext.extlinks']
-extensions = ['sphinx.ext.viewcode','sphinx.ext.pngmath']
+extensions = ['sphinx.ext.viewcode','sphinx.ext.imgmath']
 
 # Add any paths that contain templates here, relative to this directory.
 #templates_path = ['_templates']
index a9076fb7897650320dd6c8d179f8c01d7784d789..4a01399ab8b61d0a35e1806f387c94292fc5373d 100644 (file)
@@ -25,7 +25,7 @@ import sys, os
 
 # Add any Sphinx extension module names here, as strings. They can be extensions
 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = ['sphinx.ext.viewcode','sphinx.ext.pngmath']#,'sphinx.ext.graphviz']
+extensions = ['sphinx.ext.viewcode','sphinx.ext.imgmath']#,'sphinx.ext.graphviz']
 
 # Add any paths that contain templates here, relative to this directory.
 templates_path = ['_templates']
index adaeee141b5d69a2c171e97374bc7eed276c2954..2c64283c0456c6c8da4081b9552358b09a195b10 100755 (executable)
@@ -77,7 +77,7 @@
 #ifdef DEB_CALCULATION
 #include <BRepTools.hxx>
 #include <TopLoc_Location.hxx>
-#endif 
+#endif
 #define CALCULATION_REGIONS_PREF GetName() + "_Reg"
 #define CALCULATION_ZONES_PREF GetName() + "_Zone"
 #define CALCULATION_GROUPS_PREF GetName() + "_"
@@ -107,7 +107,7 @@ HYDROData_CalculationCase::~HYDROData_CalculationCase()
 {
 }
 
-void HYDROData_CalculationCase::SetName( const QString& theName )
+void HYDROData_CalculationCase::SetName( const QString& theName, bool isDefault )
 {
   QString anOldCaseName = GetName();
   if ( anOldCaseName != theName )
@@ -130,7 +130,7 @@ void HYDROData_CalculationCase::SetName( const QString& theName )
     }
   }
 
-  HYDROData_Entity::SetName( theName );
+  HYDROData_Entity::SetName( theName, isDefault );
 }
 
 QStringList HYDROData_CalculationCase::DumpToPython( const QString&       thePyScriptPath,
@@ -141,7 +141,7 @@ QStringList HYDROData_CalculationCase::DumpToPython( const QString&       thePyS
 
   QString aCalculName = GetObjPyName();
 
-  AssignmentMode aMode = GetAssignmentMode();  
+  AssignmentMode aMode = GetAssignmentMode();
   QString aModeStr = aMode==MANUAL ? "HYDROData_CalculationCase.MANUAL" : "HYDROData_CalculationCase.AUTOMATIC";
   aResList << QString( "%0.SetAssignmentMode( %1 )" ).arg( aCalculName ).arg( aModeStr );
 
@@ -206,7 +206,7 @@ QStringList HYDROData_CalculationCase::DumpToPython( const QString&       thePyS
   {
     // Now we restore the
     // - regions and zones order
-    DumpRegionsToPython( aResList, thePyScriptPath, theTreatedObjects, GetRegions() );   
+    DumpRegionsToPython( aResList, thePyScriptPath, theTreatedObjects, GetRegions() );
   }
 
   // Export calculation case
@@ -299,12 +299,12 @@ static void FilterEdgesByIncludeSelectionBoundaryPolygons( const HYDROData_Split
     Handle(HYDROData_BCPolygon) aBCPoly = Handle(HYDROData_BCPolygon)::DownCast( aBoundaryPolygons(i));
     TopoDS_Shape aPolyTopShape = aBCPoly->GetTopShape();
     int bType = aBCPoly->GetBoundaryType();
-    if (bType == 2) 
+    if (bType == 2)
       IncTools.Append(aPolyTopShape);
     else if (bType == 3)
       SelectionTools.Append(aPolyTopShape);
   }
-  
+
   while( anIter.hasNext() )
   {
     const HYDROData_SplitToZonesTool::SplitData& aSplitData = anIter.next();
@@ -334,14 +334,14 @@ static void SplitEdgesByBoundaryPolygons( const HYDROData_SplitToZonesTool::Spli
     Handle(HYDROData_BCPolygon) aBCPoly = Handle(HYDROData_BCPolygon)::DownCast( aBoundaryPolygons(i));
     TopoDS_Shape aPolyTopShape = aBCPoly->GetTopShape();
     int bType = aBCPoly->GetBoundaryType();
-    if (bType == 1) 
+    if (bType == 1)
     {
       CutTools.Append(aPolyTopShape);
       QString bp_name = aBCPoly->GetName();
       BPolyToName.Bind(aPolyTopShape, bp_name);
     }
   }
-  
+
   while( anIter.hasNext() )
   {
     const HYDROData_SplitToZonesTool::SplitData& aSplitData = anIter.next();
@@ -368,7 +368,7 @@ static void SplitEdgesByBoundaryPolygons( const HYDROData_SplitToZonesTool::Spli
         TopoDS_Edge E = TopoDS::Edge(it.Value());
         if (!E.IsNull())
         {
-          HYDROData_SplitToZonesTool::SplitData SD(HYDROData_SplitToZonesTool::SplitData::Data_Edge, E, *name);          
+          HYDROData_SplitToZonesTool::SplitData SD(HYDROData_SplitToZonesTool::SplitData::Data_Edge, E, *name);
           outBoundaryPolygonEdgesList.append(SD);
         }
       }
@@ -381,7 +381,7 @@ static void PerformEdgeReplInZones(const HYDROData_SplitToZonesTool::SplitDataLi
                                    const NCollection_IndexedDataMap<TopoDS_Shape, TopoDS_Shape, TopTools_ShapeMapHasher>& ObjToRes,
                                    HYDROData_SplitToZonesTool::SplitDataList& outZoneList)
 {
-  HYDROData_SplitToZonesTool::SplitDataListIterator it( ZoneList ); 
+  HYDROData_SplitToZonesTool::SplitDataListIterator it( ZoneList );
   BRepTools_ReShape reshaper;
   for (;it.hasNext();)
   {
@@ -415,7 +415,7 @@ static void PerformEdgeReplInZones(const HYDROData_SplitToZonesTool::SplitDataLi
           else
             continue;
         }
-        else 
+        else
           continue;
       }
       reshaper.Replace(K, V);
@@ -423,7 +423,7 @@ static void PerformEdgeReplInZones(const HYDROData_SplitToZonesTool::SplitDataLi
     TopoDS_Shape nS = reshaper.Apply(mS);
     HYDROData_SplitToZonesTool::SplitData aNS(aSplitData.Type, nS, aSplitData.ObjectNames);
     outZoneList.append(aNS);
-  } 
+  }
 }
 
 static void CreateNewEdgeList( const HYDROData_SplitToZonesTool::SplitDataList& theEdges,
@@ -509,16 +509,16 @@ void HYDROData_CalculationCase::Update()
   CreateNewEdgeList(anEdgesList, ObjToRes, newEdgesList1);
   //
   newEdgesList1.append(outBoundaryPolygonEdgesList); //append new list of groups
-  //filter out edges list by include&selection tools 
+  //filter out edges list by include&selection tools
   FilterEdgesByIncludeSelectionBoundaryPolygons(newEdgesList1,aBoundaryPolygons,newEdgesList2);
-  
+
   switch( GetAssignmentMode() )
   {
   case MANUAL:
-    CreateRegionsDef( aDocument,aNewZonesList );    
+    CreateRegionsDef( aDocument,aNewZonesList );
     break;
   case AUTOMATIC:
-    CreateRegionsAuto( aDocument,aNewZonesList );    
+    CreateRegionsAuto( aDocument,aNewZonesList );
     break;
   }
 
@@ -621,7 +621,7 @@ void HYDROData_CalculationCase::CreateRegionsAuto( const Handle(HYDROData_Docume
       anObjectsWithEmptyRegions.append( anObjName );
     }
   }
-  
+
   if( !anObjectsWithEmptyRegions.empty() )
   {
     QString aData = anObjectsWithEmptyRegions.join( ", " );
@@ -646,8 +646,8 @@ void HYDROData_CalculationCase::CreateEdgeGroupsDef( const Handle(HYDROData_Docu
     if ( anObjName.isEmpty() )
       continue;
 #ifdef DEB_CALCULATION
-    QString aStr = aSplitData.ObjectNames.join(" "); 
-         cout << " CCase: Names = "<<aStr.toStdString() << " size = " <<aSplitData.ObjectNames.size() <<endl; 
+    QString aStr = aSplitData.ObjectNames.join(" ");
+         cout << " CCase: Names = "<<aStr.toStdString() << " size = " <<aSplitData.ObjectNames.size() <<endl;
 #endif
     Handle(HYDROData_SplitShapesGroup) aSplitGroup;
     if ( !aSplitEdgesGroupsMap.contains( anObjName ) )
@@ -668,7 +668,7 @@ void HYDROData_CalculationCase::CreateEdgeGroupsDef( const Handle(HYDROData_Docu
     aSplitGroup->GetShapes(theShapes);
 
     if (aSplitData.Type == HYDROData_SplitToZonesTool::SplitData::Data_IntEdge)
-      aSplitGroup->SetInternal(true); 
+      aSplitGroup->SetInternal(true);
   }
 }
 
@@ -681,7 +681,7 @@ bool HYDROData_CalculationCase::AddGeometryObject( const Handle(HYDROData_Object
     return false; // Object is already in reference list
 
   AddReferenceObject( theObject, DataTag_GeometryObject );
-  
+
   // Indicate model of the need to update splitting
   Changed( Geom_2d );
 
@@ -721,7 +721,7 @@ bool HYDROData_CalculationCase::AddGeometryGroup( const Handle(HYDROData_ShapesG
     return false; // Object is already in reference list
 
   AddReferenceObject( theGroup, DataTag_GeometryGroup );
-  
+
   // Indicate model of the need to update splitting
   Changed( Geom_Groups );
 
@@ -765,7 +765,7 @@ void HYDROData_CalculationCase::SetBoundaryPolyline( const Handle(HYDROData_Poly
 
 Handle(HYDROData_PolylineXY) HYDROData_CalculationCase::GetBoundaryPolyline() const
 {
-  return Handle(HYDROData_PolylineXY)::DownCast( 
+  return Handle(HYDROData_PolylineXY)::DownCast(
            GetReferenceObject( DataTag_Polyline ) );
 }
 
@@ -792,7 +792,7 @@ void HYDROData_CalculationCase::SetStricklerTable( const Handle(HYDROData_Strick
 
 Handle(HYDROData_StricklerTable) HYDROData_CalculationCase::GetStricklerTable() const
 {
-  return Handle(HYDROData_StricklerTable)::DownCast( 
+  return Handle(HYDROData_StricklerTable)::DownCast(
            GetReferenceObject( DataTag_StricklerTable ) );
 }
 
@@ -840,14 +840,14 @@ bool HYDROData_CalculationCase::AddRegion( const Handle(HYDROData_Region)& theRe
 
   if ( theRegion.IsNull() )
     return false;
-  
+
   HYDROData_CalculationCase::DataTag aDataTag = DataTag_Region;
 
   if ( HasReference( theRegion, aDataTag ) )
     return false; // Object is already in reference list
 
   // Move the region from other calculation
-  Handle(HYDROData_CalculationCase) aFatherCalc = 
+  Handle(HYDROData_CalculationCase) aFatherCalc =
     Handle(HYDROData_CalculationCase)::DownCast( theRegion->GetFatherObject() );
   if ( !aFatherCalc.IsNull() && aFatherCalc->Label() != myLab )
   {
@@ -878,7 +878,7 @@ void HYDROData_CalculationCase::UpdateRegionsOrder()
     return;
 
   QString aRegsPref = CALCULATION_REGIONS_PREF;
-  std::map<int, Handle(HYDROData_Region)> IndToRegion; //index in the name of region to region itself 
+  std::map<int, Handle(HYDROData_Region)> IndToRegion; //index in the name of region to region itself
   HYDROData_SequenceOfObjects aRegions = GetRegions();
   HYDROData_SequenceOfObjects::Iterator anIter( aRegions );
   QString aName;
@@ -913,7 +913,7 @@ void HYDROData_CalculationCase::RemoveRegion( const Handle(HYDROData_Region)& th
   RemoveReferenceObject( theRegion->Label(), aDataTag );
 
   // Remove region from data model
-  Handle(HYDROData_CalculationCase) aFatherCalc = 
+  Handle(HYDROData_CalculationCase) aFatherCalc =
     Handle(HYDROData_CalculationCase)::DownCast( theRegion->GetFatherObject() );
   if ( !aFatherCalc.IsNull() && aFatherCalc->Label() == myLab )
     theRegion->Remove();
@@ -995,7 +995,7 @@ double HYDROData_CalculationCase::GetAltitudeForPoint( const gp_XY&
   HYDROData_IInterpolator* aZoneInterpolator = theZone->GetInterpolator();
   if ( aZoneMergeType == HYDROData_Zone::Merge_Object )
   {
-    Handle(HYDROData_IAltitudeObject) aMergeAltitude = 
+    Handle(HYDROData_IAltitudeObject) aMergeAltitude =
       Handle(HYDROData_IAltitudeObject)::DownCast( theZone->GetMergeObject() );
     if ( !aMergeAltitude.IsNull() )
     {
@@ -1071,7 +1071,7 @@ double HYDROData_CalculationCase::GetAltitudeForPoint( const gp_XY&
   return aResAltitude;
 }
 
-NCollection_Sequence<double> HYDROData_CalculationCase::GetAltitudesForPoints( 
+NCollection_Sequence<double> HYDROData_CalculationCase::GetAltitudesForPoints(
   const NCollection_Sequence<gp_XY>& thePoints,
   const Handle(HYDROData_Region)&    theRegion,
   int theMethod) const
@@ -1092,7 +1092,7 @@ NCollection_Sequence<double> HYDROData_CalculationCase::GetAltitudesForPoints(
     for ( int i = 1, n = aNbPoints; i <= n && aPSentry.More(); ++i, aPSentry.Next() )
     {
       const gp_XY& thePnt = thePoints.Value( i );
-    
+
       double anAltitude = GetAltitudeForPoint( thePnt, theRegion, theMethod );
       aResSeq.Append( anAltitude );
     }
@@ -1111,7 +1111,7 @@ NCollection_Sequence<double> HYDROData_CalculationCase::GetAltitudesForPoints(
   return aResSeq;
 }
 
-NCollection_Sequence<double> HYDROData_CalculationCase::GetAltitudesForPoints( 
+NCollection_Sequence<double> HYDROData_CalculationCase::GetAltitudesForPoints(
   const NCollection_Sequence<gp_XY>& thePoints,
   const Handle(HYDROData_Zone)&      theZone,
   int theMethod) const
@@ -1121,7 +1121,7 @@ NCollection_Sequence<double> HYDROData_CalculationCase::GetAltitudesForPoints(
   for ( int i = 1, n = thePoints.Length(); i <= n; ++i )
   {
     const gp_XY& thePnt = thePoints.Value( i );
-    
+
     double anAltitude = GetAltitudeForPoint( thePnt, theZone, theMethod );
     aResSeq.Append( anAltitude );
   }
@@ -1243,7 +1243,7 @@ HYDROData_CalculationCase::PointClassification HYDROData_CalculationCase::GetPoi
   TopoDS_Face aZoneFace = TopoDS::Face( theZone->GetShape() );
   if ( aZoneFace.IsNull() )
     return aRes;
-#ifdef DEB_CLASS2D      
+#ifdef DEB_CLASS2D
          TopoDS_Compound aCmp;
       BRep_Builder aBB;
       aBB.MakeCompound(aCmp);
@@ -1252,7 +1252,7 @@ HYDROData_CalculationCase::PointClassification HYDROData_CalculationCase::GetPoi
          BRepBuilderAPI_MakeVertex aMk(aPnt);
          aBB.Add(aCmp, aMk.Vertex());
          BRepTools::Write(aCmp, "FCL2d.brep");
-#endif  
+#endif
   TopAbs_State State = HYDROData_Tool::ComputePointState(thePoint, aZoneFace);
   if (State == TopAbs_OUT)
     aRes =  POINT_OUT;
@@ -1285,7 +1285,7 @@ Handle(HYDROData_SplitShapesGroup) HYDROData_CalculationCase::addNewSplitGroup(
   TDF_Label aNewLab = myLab.FindChild( DataTag_SplitGroups ).NewChild();
 
   Handle(HYDROData_SplitShapesGroup) aNewGroup =
-    Handle(HYDROData_SplitShapesGroup)::DownCast( 
+    Handle(HYDROData_SplitShapesGroup)::DownCast(
       HYDROData_Iterator::CreateObject( aNewLab, KIND_SPLIT_GROUP ) );
   AddReferenceObject( aNewGroup, DataTag_SplitGroups );
 
@@ -1307,7 +1307,7 @@ QString HYDROData_CalculationCase::Export() const
   return "";
 #else
   GEOM::GEOM_Gen_var aGEOMEngine = HYDROData_GeomTool::GetGeomGen();
-  
+
   QString aGeomObjEntry, anErrorMsg;
   QString statMess;
   bool isOK = Export( aGEOMEngine, aGeomObjEntry, anErrorMsg, statMess );
@@ -1354,7 +1354,7 @@ bool HYDROData_CalculationCase::Export( GEOM::GEOM_Gen_var  theGeomEngine,
       }
 
   }
-  
+
   // Get faces
   bool isAllNotSubmersible = true;
   HYDROData_SequenceOfObjects aCaseRegions = GetRegions();
@@ -1366,7 +1366,7 @@ bool HYDROData_CalculationCase::Export( GEOM::GEOM_Gen_var  theGeomEngine,
       Handle(HYDROData_Region)::DownCast( aRegionIter.Value() );
     if( aRegion.IsNull() || !aRegion->IsSubmersible() )
       continue;
-    
+
     if ( isAllNotSubmersible )
       isAllNotSubmersible = false;
 
@@ -1436,7 +1436,7 @@ bool HYDROData_CalculationCase::Export( GEOM::GEOM_Gen_var
       }
     }
   } // faces iterator
-  
+
   aSewing.Perform();
   TopoDS_Shape aSewedShape = aSewing.SewedShape();
 
@@ -1457,7 +1457,7 @@ bool HYDROData_CalculationCase::Export( GEOM::GEOM_Gen_var
     }
   }
 
+
   // If the sewed shape is empty - return false
   if ( aSewedShape.IsNull() || !TopoDS_Iterator( aSewedShape ).More() )
     return false;
@@ -1466,10 +1466,10 @@ bool HYDROData_CalculationCase::Export( GEOM::GEOM_Gen_var
   BRepTools::Write(aSewedShape ,"Sew.brep");
 #endif  // Publish the sewed shape
   QString aName = EXPORT_NAME;
-  GEOM::GEOM_Object_ptr aMainShape = 
+  GEOM::GEOM_Object_ptr aMainShape =
     HYDROData_GeomTool::ExplodeShapeInGEOMandPublish( theGeomEngine, aSewedShape, aFacesToNameModif, aName, theGeomObjEntry );
 
-  if ( aMainShape->_is_nil() )  
+  if ( aMainShape->_is_nil() )
     return false;
 
   if ( theGroupsDefs.IsEmpty() )
@@ -1492,7 +1492,7 @@ bool HYDROData_CalculationCase::Export( GEOM::GEOM_Gen_var
 #ifdef DEB_CALCULATION
       cout << "\nOld shape(" << i << ") = " << aShape.TShape() <<endl;
 #endif
-      
+
       TopoDS_Shape aModifiedShape = aShape;
       if ( aSewing.IsModified( aShape ) )
         aModifiedShape = aSewing.Modified( aShape );
@@ -1509,7 +1509,7 @@ bool HYDROData_CalculationCase::Export( GEOM::GEOM_Gen_var
       if ( anIndex > 0 ) {
         aGroupIndexes.Append( anIndex );
       } else {
-#ifdef DEB_CALCULATION    
+#ifdef DEB_CALCULATION
         TCollection_AsciiString aNam("Lost_");
         if(!aMapOfSubShapes.Contains(aModifiedShape)) {
         for ( int anIndex = 1; anIndex <= aMapOfSubShapes.Extent(); anIndex++ )
@@ -1530,16 +1530,16 @@ bool HYDROData_CalculationCase::Export( GEOM::GEOM_Gen_var
     if ( !aGroupIndexes.IsEmpty() )
       aGroupsData.Bind( aGroupDef.Name, aGroupIndexes );
   }
+
   if ( !aGroupsData.IsEmpty() )
   {
-    GEOM::GEOM_IGroupOperations_var aGroupOp = 
-      theGeomEngine->GetIGroupOperations();  
+    GEOM::GEOM_IGroupOperations_var aGroupOp =
+      theGeomEngine->GetIGroupOperations();
 
     NCollection_DataMap< TCollection_AsciiString, NCollection_Sequence<int> >::Iterator aMapIt( aGroupsData );
     for ( ; aMapIt.More(); aMapIt.Next() )
     {
-      const TCollection_AsciiString& aGroupName = aMapIt.Key(); 
+      const TCollection_AsciiString& aGroupName = aMapIt.Key();
       const NCollection_Sequence<int>& aGroupIndexes = aMapIt.Value();
 
       GEOM::GEOM_Object_var aGeomGroup = aGroupOp->CreateGroup( aMainShape, TopAbs_EDGE );
@@ -1555,7 +1555,7 @@ bool HYDROData_CalculationCase::Export( GEOM::GEOM_Gen_var
       aGroupOp->UnionIDs( aGeomGroup, aGeomIndexes );
       if ( aGroupOp->IsDone() )
       {
-        SALOMEDS::SObject_var aGroupSO = 
+        SALOMEDS::SObject_var aGroupSO =
           theGeomEngine->AddInStudy( aGeomGroup, aGroupName.ToCString(), aMainShape );
       }
     }
@@ -1691,7 +1691,7 @@ void HYDROData_CalculationCase::DumpRegionsToPython( QStringList& theResList,
     }
 }
 
-bool HYDROData_CalculationCase::GetRule( int theIndex, 
+bool HYDROData_CalculationCase::GetRule( int theIndex,
                                          Handle(HYDROData_Entity)&           theObject1,
                                          HYDROData_PriorityType&             thePriority,
                                          Handle(HYDROData_Entity)&           theObject2,
@@ -1708,7 +1708,7 @@ bool HYDROData_CalculationCase::AddInterPoly( const Handle(HYDROData_PolylineXY)
   HYDROData_CalculationCase::DataTag aDataTag = DataTag_InterPoly;
 
   if ( HasReference( theInterPolyline, aDataTag ) )
-    return false; 
+    return false;
 
   AddReferenceObject( theInterPolyline, aDataTag );
 
@@ -1719,10 +1719,10 @@ bool HYDROData_CalculationCase::AddInterPoly( const Handle(HYDROData_PolylineXY)
 
 HYDROData_SequenceOfObjects HYDROData_CalculationCase::GetInterPolyObjects() const
 {
-  return GetReferenceObjects( DataTag_InterPoly ); 
+  return GetReferenceObjects( DataTag_InterPoly );
 }
 
-void HYDROData_CalculationCase::RemoveInterPolyObject( const Handle(HYDROData_PolylineXY)& theInterPolyline ) 
+void HYDROData_CalculationCase::RemoveInterPolyObject( const Handle(HYDROData_PolylineXY)& theInterPolyline )
 {
   if ( theInterPolyline.IsNull() )
     return;
@@ -1737,7 +1737,7 @@ bool HYDROData_CalculationCase::AddBoundaryPolygon( const Handle(HYDROData_BCPol
   HYDROData_CalculationCase::DataTag aDataTag = DataTag_BCPolygon;
 
   if ( HasReference( theBCPolygon, aDataTag ) )
-    return false; 
+    return false;
 
   AddReferenceObject( theBCPolygon, aDataTag );
 
@@ -1748,10 +1748,10 @@ bool HYDROData_CalculationCase::AddBoundaryPolygon( const Handle(HYDROData_BCPol
 
 HYDROData_SequenceOfObjects HYDROData_CalculationCase::GetBoundaryPolygons() const
 {
-  return GetReferenceObjects( DataTag_BCPolygon ); 
+  return GetReferenceObjects( DataTag_BCPolygon );
 }
 
-void HYDROData_CalculationCase::RemoveBoundaryPolygon( const Handle(HYDROData_BCPolygon)& theBCPolygon ) 
+void HYDROData_CalculationCase::RemoveBoundaryPolygon( const Handle(HYDROData_BCPolygon)& theBCPolygon )
 {
   if ( theBCPolygon.IsNull() )
     return;
index 479e49e5a464fe90015494d3fae6b8c6c8c37cb2..2181cb5b5c53ec5bb0c5351c195725c54903015e 100644 (file)
@@ -118,7 +118,7 @@ public:
    * Updates the name of this object.
    * Reimplemented to update the names of regions, zones and split groups.
    */
-  HYDRODATA_EXPORT virtual void SetName( const QString& theName );  
+  HYDRODATA_EXPORT virtual void SetName( const QString& theName, bool isDefault = false );
 
   /**
    * Dump Calculation object to Python script representation.
@@ -137,7 +137,7 @@ public:
    */
   HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetAllReferenceObjects() const;
 
-public:      
+public:
   // Public methods to work with Calculation
 
   /**
@@ -231,7 +231,7 @@ public:
    * because of new region becomes the new parent for this zone.
    * \return the created region
    */
-  HYDRODATA_EXPORT virtual Handle(HYDROData_Region) AddNewRegion( const Handle(HYDROData_Zone)& theZone ); 
+  HYDRODATA_EXPORT virtual Handle(HYDROData_Region) AddNewRegion( const Handle(HYDROData_Zone)& theZone );
 
 
   /**
@@ -256,7 +256,7 @@ public:
    * Removes reference region from calculation case.
    * \param theRegion the region to remove
    */
-  HYDRODATA_EXPORT virtual void RemoveRegion( const Handle(HYDROData_Region)& theRegion ); 
+  HYDRODATA_EXPORT virtual void RemoveRegion( const Handle(HYDROData_Region)& theRegion );
 
   /**
    * Removes all reference regions from calculation case.
@@ -287,11 +287,11 @@ public:
 
   /**
    * \brief Set the Container Name to use when not default (FactoryServer).
-   * \param theContainerName the name of the container used for GEOM 
+   * \param theContainerName the name of the container used for GEOM
    *        (to be used by scripts for distributed execution)
    */
   HYDRODATA_EXPORT virtual void SetContainerName( const QString& theContainerName );
-  
+
   /**
    * Exports the calculation case data (shell and groups) to GEOM module.
    * \return the entry of the GEOM object (empty string in the case of error)
@@ -312,7 +312,7 @@ public:
                                         QString& statMess) const;
 #endif
 
-public:      
+public:
   // Public methods to work with Calculation services
 
   /**
@@ -361,7 +361,7 @@ public:
    * \param theRegion reference region to check
    * \return result altitude value
    */
-  HYDRODATA_EXPORT virtual NCollection_Sequence<double> GetAltitudesForPoints( 
+  HYDRODATA_EXPORT virtual NCollection_Sequence<double> GetAltitudesForPoints(
     const NCollection_Sequence<gp_XY>& thePoints,
     const Handle(HYDROData_Region)&    theRegion,
     int theMethod = 0) const;
@@ -372,7 +372,7 @@ public:
    * \param theZone reference zone to check
    * \return result altitude value
    */
-  HYDRODATA_EXPORT virtual NCollection_Sequence<double> GetAltitudesForPoints( 
+  HYDRODATA_EXPORT virtual NCollection_Sequence<double> GetAltitudesForPoints(
     const NCollection_Sequence<gp_XY>& thePoints,
     const Handle(HYDROData_Zone)&      theZone,
     int theMethod = 0) const;
@@ -413,7 +413,7 @@ public:
                                  const Handle(HYDROData_Entity)&     theObject2,
                                  HYDROData_Zone::MergeType theMergeType,
                                  HYDROData_CalculationCase::DataTag  theDataTag );
-  HYDRODATA_EXPORT bool GetRule( int theIndex, 
+  HYDRODATA_EXPORT bool GetRule( int theIndex,
                                  Handle(HYDROData_Entity)&           theObject1,
                                  HYDROData_PriorityType&             thePriority,
                                  Handle(HYDROData_Entity)&           theObject2,
@@ -444,7 +444,7 @@ private:
   /**
    * Exports the given faces as shell and the given groups to GEOM module.
    * \param theGeomEngine GEOM module engine
-   * \param theFaces the list of faces to make shell 
+   * \param theFaces the list of faces to make shell
    * \param theSplitGroups the list of groups
    * \return true in case of success
    */
@@ -454,7 +454,7 @@ private:
                const HYDROData_ShapesGroup::SeqOfGroupsDefs& theGroupsDefs,
                QString& theGeomObjEntry ) const;
 #endif
-  
+
   void CreateRegionsDef( const Handle(HYDROData_Document)& theDoc,
                          const HYDROData_SplitToZonesTool::SplitDataList& theZones );
   void CreateRegionsAuto( const Handle(HYDROData_Document)& theDoc,
@@ -470,7 +470,7 @@ private:
   void UpdateRegionsNames( const HYDROData_SequenceOfObjects& theRegions,
                            const QString& theOldCaseName,
                            const QString& theName );
-  
+
   void DumpRegionsToPython( QStringList&                       theResList,
                             const QString&                     thePyScriptPath,
                             MapOfTreatedObjects&               theTreatedObjects,
@@ -480,7 +480,7 @@ protected:
   friend class HYDROData_Iterator;
 
   /**
-   * Creates new object in the internal data structure. Use higher level objects 
+   * Creates new object in the internal data structure. Use higher level objects
    * to create objects with real content.
    */
   HYDRODATA_EXPORT HYDROData_CalculationCase();
index f5924f129e6fc89a90984b65876ff4e3b55d9297..dcc67a820701a34d63cfd6c3f14fa530f7056aa6 100644 (file)
@@ -153,7 +153,7 @@ public:
   /**
    * Updates the name of this object.
    */
-  HYDRODATA_EXPORT void SetName( const QString& theName, bool isDefault = false );
+  HYDRODATA_EXPORT virtual void SetName( const QString& theName, bool isDefault = false );
 
   /**
    * Returns the name of this object valid for Python script.
index 993519abcd6e93d2b7d261a8a308f805b758c241..13236c1acbd92be502b99bb85c373a510940f970 100644 (file)
@@ -43,7 +43,7 @@ HYDROData_Object::~HYDROData_Object()
 {
 }
 
-void HYDROData_Object::SetName( const QString& theName )
+void HYDROData_Object::SetName( const QString& theName, bool isDefault)
 {
   //DEBTRACE("SetName");
   QString anOldObjName = GetName();
@@ -70,7 +70,7 @@ void HYDROData_Object::SetName( const QString& theName )
       HYDROData_Tool::UpdateChildObjectName( anOldObjName, theName, anAltitudeObj );
   }
 
-  HYDROData_Entity::SetName( theName );
+  HYDROData_Entity::SetName( theName, isDefault );
 }
 
 void HYDROData_Object::Update()
@@ -140,7 +140,7 @@ Handle(HYDROData_DummyObject3D) HYDROData_Object::GetObject3D() const
 {
   //DEBTRACE("GetObject3D");
   Handle(HYDROData_DummyObject3D) anObject;
-  
+
   TDF_Label aLabel = myLab.FindChild( DataTag_Object3D, false );
   if ( !aLabel.IsNull() )
   {
@@ -206,13 +206,13 @@ int HYDROData_Object::GetGroupId( const Handle(HYDROData_ShapesGroup)& theGroup
   return aRes;
 }
 
-bool HYDROData_Object::SetAltitudeObject( 
+bool HYDROData_Object::SetAltitudeObject(
   const Handle(HYDROData_IAltitudeObject)& theAltitude )
 {
   DEBTRACE("SetAltitudeObject");
   if ( theAltitude.IsNull() )
     return false;
-  
+
   Handle(HYDROData_IAltitudeObject) aPrevAltitude = GetAltitudeObject();
   if (!aPrevAltitude.IsNull())
     DEBTRACE("aPrevAltitude: " << aPrevAltitude->GetName())
@@ -232,7 +232,7 @@ bool HYDROData_Object::SetAltitudeObject(
 Handle(HYDROData_IAltitudeObject) HYDROData_Object::GetAltitudeObject() const
 {
   //DEBTRACE("GetAltitudeObject");
-  return Handle(HYDROData_IAltitudeObject)::DownCast( 
+  return Handle(HYDROData_IAltitudeObject)::DownCast(
            GetReferenceObject( DataTag_AltitudeObject ) );
 }
 
@@ -319,7 +319,7 @@ Handle(HYDROData_IAltitudeObject) HYDROData_Object::getChildAltitudeObject() con
 {
   //DEBTRACE("getChildAltitudeObject");
   Handle(HYDROData_IAltitudeObject) anObject;
-  
+
   TDF_Label aLabel = myLab.FindChild( DataTag_ChildAltitudeObject, false );
   if ( !aLabel.IsNull() )
   {
index e3646b21dc10311c3ca5548df119ef8a26e1944a..606cf2dc0d804a547a3810fa7fee13b2a04d6629 100644 (file)
@@ -57,7 +57,7 @@ public:
    * Updates the name of this object.
    * Reimplemented to update the names child groups.
    */
-  HYDRODATA_EXPORT virtual void SetName( const QString& theName );
+  HYDRODATA_EXPORT virtual void SetName( const QString& theName, bool isDefault = false );
 
   /**
    * Update the geometry object.
@@ -164,7 +164,7 @@ public:
 protected:
 
   /**
-   * Creates new object in the internal data structure. Use higher level objects 
+   * Creates new object in the internal data structure. Use higher level objects
    * to create objects with real content.
    */
   HYDRODATA_EXPORT HYDROData_Object( Geometry );
@@ -187,7 +187,7 @@ protected:
 
   /**
    * Checks and if necessary create child 3D object.
-   * Reimplement this function in your subclass if you 
+   * Reimplement this function in your subclass if you
    * do not want to create child 3D object.
    */
   HYDRODATA_EXPORT virtual void checkAndSetObject3D();
@@ -195,7 +195,7 @@ protected:
 
   /**
    * Returns the type of child altitude object.
-   * Base implementation returns KIND_UNKNOWN, it means that child altitude 
+   * Base implementation returns KIND_UNKNOWN, it means that child altitude
    * object will not be created inside of checkAndSetAltitudeObject() function.
    * Reimplement this function in your subclass an return correct altitude
    * object type if you want to create child altitude object.
index 2aedac541dd36ceb3d6e087e28ef6618fbe9ef29..42e8b3325726cab81924cabe1bedc9ddfe758a80 100644 (file)
@@ -188,7 +188,7 @@ public:
   /**
    * Updates the name of this object.
    */
-  virtual void SetName(const QString& theName);
+  virtual void SetName(const QString& theName, bool isDefault = false );
 
   /**
    * Updates object state.
index e1e2742cc80e7c055bd24d3e8a11f955f7eec35e..1e93fdcfe86c3e57f7d2a8c9b72e9ef7b556a5be 100644 (file)
@@ -37,7 +37,7 @@ class HYDROData_IAltitudeObject : public HYDROData_Entity /Abstract/
       case KIND_ALTITUDE:
         sipClass = sipClass_HYDROData_AltitudeObject;
         break;
-      
+
       case KIND_STREAM_ALTITUDE:
         sipClass = sipClass_HYDROData_StreamAltitude;
         break;
@@ -52,7 +52,7 @@ class HYDROData_IAltitudeObject : public HYDROData_Entity /Abstract/
 #include <HYDROData_IAltitudeObject.h>
 %End
 
-public:      
+public:
   // Public methods to work with altitudes.
 
   /**
@@ -67,10 +67,10 @@ public:
    * \return altitude value
    */
   virtual double GetAltitudeForPoint( const double theCoordX,
-                                      const double theCoordX ) const = 0 [double ( const gp_XY& )];
+                                      const double theCoordX ) const = 0 [double ( const gp_XY&,  int)];
   %MethodCode
     gp_XY aPnt( a0, a1 );
-  
+
     Py_BEGIN_ALLOW_THREADS
     sipRes = sipCpp->GetAltitudeForPoint( aPnt );
     Py_END_ALLOW_THREADS
@@ -80,11 +80,11 @@ public:
 
     sipParseResultEx(sipGILState, sipErrorHandler, sipPySelf, sipMethod, sipResObj, "d", &sipRes);
   %End
-  
+
 protected:
 
   /**
-   * Creates new object in the internal data structure. Use higher level objects 
+   * Creates new object in the internal data structure. Use higher level objects
    * to create objects with real content.
    */
   HYDROData_IAltitudeObject();
index 0960af1a495a4e4eb6b8a122ed6a538fcfb3501e..258577ce061439291b2a567e6b0ddc24a93bc14d 100644 (file)
@@ -51,7 +51,7 @@ public:
 
   enum SectionType{ SECTION_POLYLINE = 0, SECTION_SPLINE = 1 };
 
-public:      
+public:
 
   /**
    * Sets wire color for object.
@@ -107,7 +107,7 @@ public:
    * \param theSectionIndex index of section
    * \param theSectionName new section name
    */
-  virtual void SetSectionName( const int                      theSectionIndex, 
+  virtual void SetSectionName( const int                      theSectionIndex,
                                const TCollection_AsciiString& theSectionName ) = 0;
 
   /**
@@ -121,7 +121,7 @@ public:
    * \param theSectionIndex index of section
    * \param theSectionType new section type
    */
-  virtual void SetSectionType( const int         theSectionIndex, 
+  virtual void SetSectionType( const int         theSectionIndex,
                                const HYDROData_IPolyline::SectionType theSectionType ) = 0;
 
   /**
@@ -135,7 +135,7 @@ public:
    * \param theSectionIndex index of section
    * \param theIsClosed new closures state
    */
-  virtual void SetSectionClosed( const int  theSectionIndex, 
+  virtual void SetSectionClosed( const int  theSectionIndex,
                                  const bool theIsClosed ) = 0;
 
   /**
@@ -191,12 +191,12 @@ public:
    *                        only for section with this index
    * \return list of points
    */
-  virtual HYDROData_IPolyline::PointsList GetPoints( const int theSectionIndex = -1 ) const = 0;
+  virtual HYDROData_IPolyline::PointsList GetPoints( const int theSectionIndex = -1, bool IsConvertToGlobal = false ) const = 0;
 
 protected:
 
   /**
-   * Creates new object in the internal data structure. Use higher level objects 
+   * Creates new object in the internal data structure. Use higher level objects
    * to create objects with real content.
    */
   HYDROData_IPolyline();