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 =
isAllNotSubmersible = false;
TopoDS_Shape aRegionShape = aRegion->GetShape( &aSeqOfGroupsDefs );
- aFacesToNames.Add( aRegionShape, aRegion->GetName() );
+ aShToNames.Add( aRegionShape, aRegion->GetName() );
}
bool aRes = false;
} 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() )
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
{
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;
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);
+ }
}