]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
some bug fixes
authorisn <isn@opencascade.com>
Thu, 13 Oct 2016 11:40:28 +0000 (14:40 +0300)
committerisn <isn@opencascade.com>
Thu, 13 Oct 2016 11:40:28 +0000 (14:40 +0300)
src/HYDROData/HYDROData_CalculationCase.cxx
src/HYDROData/HYDROData_GeomTool.h
src/HYDROGUI/HYDROGUI_StreamDlg.cxx

index a66a02129daee1960f3e7f4d68b3ad060d2b623c..9323fe6ce90221ede273a5a1a7ded33126c9cbfb 100644 (file)
@@ -1076,7 +1076,7 @@ bool HYDROData_CalculationCase::Export( GEOM::GEOM_Gen_var  theGeomEngine,
   bool isAllNotSubmersible = true;
   HYDROData_SequenceOfObjects aCaseRegions = GetRegions();
   HYDROData_SequenceOfObjects::Iterator aRegionIter( aCaseRegions );
-  NCollection_IndexedDataMap<TopoDS_Shape, QString> aFacesToNames;
+  NCollection_IndexedDataMap<TopoDS_Shape, QString> aShToNames;
   for ( ; aRegionIter.More(); aRegionIter.Next() )
   {
     Handle(HYDROData_Region) aRegion =
@@ -1088,7 +1088,7 @@ bool HYDROData_CalculationCase::Export( GEOM::GEOM_Gen_var  theGeomEngine,
       isAllNotSubmersible = false;
 
     TopoDS_Shape aRegionShape = aRegion->GetShape( &aSeqOfGroupsDefs );
-    aFacesToNames.Add( aRegionShape, aRegion->GetName() );
+    aShToNames.Add( aRegionShape, aRegion->GetName() );
   }
 
   bool aRes = false;
@@ -1098,7 +1098,7 @@ bool HYDROData_CalculationCase::Export( GEOM::GEOM_Gen_var  theGeomEngine,
   } else if ( isAllNotSubmersible ) {
     theErrorMsg = QString("there are no submersible regions.");
   } else {
-    aRes = Export( theGeomEngine, theStudy, aFacesToNames, aSeqOfGroupsDefs, theGeomObjEntry );;
+    aRes = Export( theGeomEngine, theStudy, aShToNames, aSeqOfGroupsDefs, theGeomObjEntry );;
   }
 
   if( aRes && !GetLandCoverMap().IsNull() && !GetStricklerTable().IsNull() )
@@ -1111,7 +1111,7 @@ bool HYDROData_CalculationCase::Export( GEOM::GEOM_Gen_var  theGeomEngine,
 
 bool HYDROData_CalculationCase::Export( GEOM::GEOM_Gen_var                            theGeomEngine,
                                         SALOMEDS::Study_ptr                           theStudy,
-                                        const NCollection_IndexedDataMap<TopoDS_Shape, QString>& aFacesToName,
+                                        const NCollection_IndexedDataMap<TopoDS_Shape, QString>& aShToName,
                                         const HYDROData_ShapesGroup::SeqOfGroupsDefs& theGroupsDefs,
                                         QString& theGeomObjEntry ) const
 {
@@ -1122,9 +1122,9 @@ bool HYDROData_CalculationCase::Export( GEOM::GEOM_Gen_var
   TCollection_AsciiString aNam("Sh_");
   int i=1;
 #endif
-  for ( int i = 1; i <= aFacesToName.Extent(); i++ )
+  for ( int i = 1; i <= aShToName.Extent(); i++ )
   {
-    const TopoDS_Shape& aShape = aFacesToName.FindKey(i);
+    const TopoDS_Shape& aShape = aShToName.FindKey(i);
     if ( aShape.IsNull() )
       continue;
 
@@ -1158,14 +1158,18 @@ bool HYDROData_CalculationCase::Export( GEOM::GEOM_Gen_var
 
   NCollection_IndexedDataMap<TopoDS_Shape, QString, TopTools_ShapeMapHasher> aFacesToNameModif;
 
-  for ( int i = 1; i <= aFacesToName.Extent(); i++ )
+  for ( int i = 1; i <= aShToName.Extent(); i++ )
   {
-    const TopoDS_Shape& CurShape = aFacesToName.FindKey(i);
-    const QString& Qstr = aFacesToName.FindFromIndex(i);
-    if (aSewing.IsModified(CurShape))
-      aFacesToNameModif.Add(aSewing.Modified(CurShape), Qstr);
-    else
-      aFacesToNameModif.Add(CurShape, Qstr);
+    const TopoDS_Shape& CurShape = aShToName.FindKey(i);
+    const QString& Qstr = aShToName.FindFromIndex(i);
+    for (TopExp_Explorer Exp(CurShape, TopAbs_FACE); Exp.More(); Exp.Next())
+    {
+      const TopoDS_Face& cf = TopoDS::Face(Exp.Current());
+      if (aSewing.IsModified(cf))
+        aFacesToNameModif.Add(aSewing.Modified(cf), Qstr);
+      else
+        aFacesToNameModif.Add(cf, Qstr);
+    }
   }
 
  
index ab84b701084a0bd8dd767aaf70280e039dcdcbcc..17d48314b19a630540a087552ff36c7d0957c5b4 100644 (file)
@@ -118,7 +118,7 @@ public:
   static GEOM::GEOM_Object_ptr ExplodeShapeInGEOMandPublish( GEOM::GEOM_Gen_var theGeomEngine, 
                                                       SALOMEDS::Study_ptr theStudy, 
                                                       const TopoDS_Shape& theShape, 
-                                                      const NCollection_IndexedDataMap<TopoDS_Shape, QString, TopTools_ShapeMapHasher>& aFacesToNameModif,
+                                                      const NCollection_IndexedDataMap<TopoDS_Shape, QString, TopTools_ShapeMapHasher>& aShToNameModif,
                                                       const QString& theName,
                                                       QString& theGeomObjEntry);
 
index 06707d5f79bbca19d67c3c72f6b42d2a51f240f0..9a4419ab69747e1af5dc394110d97fd9263c6556 100644 (file)
@@ -57,7 +57,7 @@ HYDROGUI_StreamDlg::HYDROGUI_StreamDlg( HYDROGUI_Module* theModule, const QStrin
   myAxes = new QComboBox( aParamGroup );
   myAxes->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
   myDDZ = new QDoubleSpinBox( aParamGroup );
-  myDDZ->setRange( 0.1, 100 );
+  myDDZ->setRange( 0.01, 100 );
   myDDZ->setSingleStep( 0.1 );
   myDDZ->setValue( 0.1 );
   myDDZ->setDecimals( 2 );