HYDROData_SequenceOfObjects HYDROData_CalculationCase::GetAllReferenceObjects() const
{
HYDROData_SequenceOfObjects aResSeq = HYDROData_Entity::GetAllReferenceObjects();
- aResSeq.Append( GetRegions() );
+
+ 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();
aRegionZone->AddGeometryObject( aRefObject );
}
}
-
- // The splitted data is up to date
- SetToUpdate( false );
}
bool HYDROData_CalculationCase::AddGeometryObject( const Handle(HYDROData_Object)& theObject )
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 );
+ }
}
}
}