X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROData%2FHYDROData_CalculationCase.cxx;h=9d6b58f460957305786c6056ca4d85439d3c886c;hb=424f8230c9003d00fb27499b2441c4b3a2a28292;hp=c93052c84c32f474d055bea871c54ffa95695b3d;hpb=a461802565827e4d63ce4b834b32f5a29ddc73f2;p=modules%2Fhydro.git diff --git a/src/HYDROData/HYDROData_CalculationCase.cxx b/src/HYDROData/HYDROData_CalculationCase.cxx index c93052c8..9d6b58f4 100644 --- a/src/HYDROData/HYDROData_CalculationCase.cxx +++ b/src/HYDROData/HYDROData_CalculationCase.cxx @@ -133,14 +133,20 @@ HYDROData_SequenceOfObjects HYDROData_CalculationCase::GetAllReferenceObjects() { HYDROData_SequenceOfObjects aResSeq = HYDROData_Entity::GetAllReferenceObjects(); + Handle(HYDROData_PolylineXY) aBoundaryPolyline = GetBoundaryPolyline(); + if ( !aBoundaryPolyline.IsNull() ) + aResSeq.Append( aBoundaryPolyline ); + HYDROData_SequenceOfObjects aSeqOfRegions = GetRegions(); aResSeq.Append( aSeqOfRegions ); return aResSeq; } -void HYDROData_CalculationCase::SplitGeometryObjects() +void HYDROData_CalculationCase::Update() { + HYDROData_Entity::Update(); + // At first we remove previously created regions RemoveRegions(); @@ -194,9 +200,6 @@ void HYDROData_CalculationCase::SplitGeometryObjects() aRegionZone->AddGeometryObject( aRefObject ); } } - - // The splitted data is up to date - SetToUpdate( false ); } bool HYDROData_CalculationCase::AddGeometryObject( const Handle(HYDROData_Object)& theObject ) @@ -426,29 +429,32 @@ TopoDS_Shell HYDROData_CalculationCase::GetShell() aSewing.Perform(); TopoDS_Shape aSewedShape = aSewing.SewedShape(); - if ( aSewedShape.ShapeType() == TopAbs_FACE && aCaseRegions.Length() ==1 ) { - // create shell from one face - BRep_Builder aBuilder; - aBuilder.MakeShell( aShell ); - aBuilder.Add( aShell, aSewedShape); - } else { - TopExp_Explorer anExpShells( aSewedShape, TopAbs_SHELL ); - Standard_Integer aNbOfShells = 0; - for ( ; anExpShells.More(); anExpShells.Next() ) { - aShell = TopoDS::Shell( anExpShells.Current() ); - aNbOfShells++; - } - - if ( aNbOfShells != 1 ) { - aShell.Nullify(); + if ( !aSewedShape.IsNull() ) + { + if ( aSewedShape.ShapeType() == TopAbs_FACE && aCaseRegions.Length() ==1 ) { + // create shell from one face BRep_Builder aBuilder; aBuilder.MakeShell( aShell ); + aBuilder.Add( aShell, aSewedShape); + } else { + TopExp_Explorer anExpShells( aSewedShape, TopAbs_SHELL ); + Standard_Integer aNbOfShells = 0; + for ( ; anExpShells.More(); anExpShells.Next() ) { + aShell = TopoDS::Shell( anExpShells.Current() ); + aNbOfShells++; + } - TopExp_Explorer anExpFaces( aSewedShape, TopAbs_FACE ); - for ( ; anExpFaces.More(); anExpFaces.Next() ) { - TopoDS_Face aFace = TopoDS::Face( anExpFaces.Current() ); - if ( !aFace.IsNull() ) { - aBuilder.Add( aShell, aFace ); + if ( aNbOfShells != 1 ) { + aShell.Nullify(); + BRep_Builder aBuilder; + aBuilder.MakeShell( aShell ); + + TopExp_Explorer anExpFaces( aSewedShape, TopAbs_FACE ); + for ( ; anExpFaces.More(); anExpFaces.Next() ) { + TopoDS_Face aFace = TopoDS::Face( anExpFaces.Current() ); + if ( !aFace.IsNull() ) { + aBuilder.Add( aShell, aFace ); + } } } }