mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-25 08:50:35 +05:00
bos #42143 [CEA] Structured CGNS: wrong groups exported from savec hdf
This commit is contained in:
parent
e60bcaf4a9
commit
ed432ffceb
@ -52,13 +52,14 @@ class MESHDRIVER_EXPORT Driver_Mesh
|
||||
|
||||
enum Status {
|
||||
DRS_OK,
|
||||
DRS_EMPTY, // a file contains no mesh with the given name
|
||||
DRS_WARN_RENUMBER, // a file has overlapped ranges of element numbers,
|
||||
// so the numbers from the file are ignored
|
||||
DRS_WARN_SKIP_ELEM, // some elements were skipped due to incorrect file data
|
||||
DRS_WARN_DESCENDING, // some elements were skipped due to descending connectivity
|
||||
DRS_FAIL, // general failure (exception etc.)
|
||||
DRS_TOO_LARGE_MESH // mesh is too large for export
|
||||
DRS_EMPTY, // a file contains no mesh with the given name
|
||||
DRS_WARN_RENUMBER, // a file has overlapped ranges of element numbers,
|
||||
// so the numbers from the file are ignored
|
||||
DRS_WARN_SKIP_ELEM, // some elements were skipped due to incorrect file data
|
||||
DRS_WARN_DESCENDING, // some elements were skipped due to descending connectivity
|
||||
DRS_WARN_NO_STRUCT_GRID, // have no filled structured grid, probably loaded from the hdf file, need recompute
|
||||
DRS_FAIL, // general failure (exception etc.)
|
||||
DRS_TOO_LARGE_MESH // mesh is too large for export
|
||||
};
|
||||
|
||||
void SetMeshId(int theMeshId);
|
||||
|
@ -1702,8 +1702,10 @@ void SMESH_Mesh::ExportStructuredCGNS(const char * file, const SMESHDS_Mesh* mes
|
||||
#ifdef WITH_CGNS
|
||||
auto myMesh = meshPart ? (SMESHDS_Mesh*) meshPart : _meshDS;
|
||||
|
||||
if ( myMesh->HasSomeStructuredGridFilled() )
|
||||
{
|
||||
if ( !myMesh->HasSomeStructuredGridFilled() ){
|
||||
res = Driver_Mesh::DRS_WARN_NO_STRUCT_GRID;
|
||||
}
|
||||
else{
|
||||
DriverStructuredCGNS_Write writer;
|
||||
writer.SetFile( file );
|
||||
writer.SetMesh( const_cast<SMESHDS_Mesh*>( myMesh ));
|
||||
@ -1728,6 +1730,12 @@ void SMESH_Mesh::ExportStructuredCGNS(const char * file, const SMESHDS_Mesh* mes
|
||||
std::cout << "\n\n\n Going into too large mesh file path\n\n\n\n";
|
||||
throw TooLargeForExport("CGNS");
|
||||
}
|
||||
else if( res == Driver_Mesh::DRS_WARN_NO_STRUCT_GRID )
|
||||
{
|
||||
throw SALOME_Exception("The mesh does not contain a structured grid. If you are attempting to export "
|
||||
"a quadrilateral mesh loaded from an HDF file, please perform a Clean + Compute operation before exporting. "
|
||||
"This step is necessary due to a current limitation.");
|
||||
}
|
||||
|
||||
if ( res != Driver_Mesh::DRS_OK )
|
||||
throw SALOME_Exception("Export failed");
|
||||
|
Loading…
Reference in New Issue
Block a user