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 );
+ }
}
}
}
HYDROGUI_Tool::GetSelectedObject( module() ) );
if ( aCalculation.IsNull() ) {
- theErrorMsg = tr( "EXPORT_FAILED" );
+ theErrorMsg = tr( "NULL_DATA_OBJECT" );
return false;
}
anIsOk = true;
}
}
- } else {
- anErrorMsg = tr( "RESULT_SHAPE_NULL" );
- }
- if ( !anIsOk ) {
- theErrorMsg = tr( "EXPORT_FAILED" );
+ if ( !anIsOk )
+ theErrorMsg = tr( "IMPOSSIBLE_TO_CREATE_GEOM_SHAPE" );
- if( !anErrorMsg.isEmpty() ) {
- theErrorMsg.prepend( anErrorMsg + "\n" );
- }
+ } else {
+ theErrorMsg = tr( "RESULT_SHAPE_NULL" );
}
return anIsOk;
}
else {
abort();
- QString aMsg = tr( "EXPORT_FAILED" );
- /* TODO: improve error processing
- if( !anErrorMsg.isEmpty() )
- aMsg.prepend( anErrorMsg + "\n" );
- */
+
+ if ( anErrorMsg.isEmpty() )
+ anErrorMsg = tr( "EXPORT_DATA_FAILED" );
+
+ anErrorMsg.prepend( tr( "EXPORT_FAILED" ) + "\n" );
+
SUIT_MessageBox::critical( module()->getApp()->desktop(),
tr( "EXPORT_STATUS" ),
- aMsg );
+ anErrorMsg );
}
}
\ No newline at end of file
</message>
<message>
<source>EXPORT_FAILED</source>
- <translation>Export failed.</translation>
+ <translation>Export of calculation case failed:</translation>
+ </message>
+ <message>
+ <source>EXPORT_DATA_FAILED</source>
+ <translation>parameters of calculation case is invalid.</translation>
+ </message>
+ <message>
+ <source>NULL_DATA_OBJECT</source>
+ <translation>data model object is null pointer.</translation>
</message>
<message>
<source>RESULT_SHAPE_NULL</source>
- <translation>Export failed: result shape is null.</translation>
+ <translation>shape of calculation case regions is empty.</translation>
+ </message>
+ <message>
+ <source>IMPOSSIBLE_TO_CREATE_GEOM_SHAPE</source>
+ <translation>something was wrong during publishing of GEOM shape.</translation>
</message>
<message>
<source>OBJ_PREFIX</source>