From: eap Date: Tue, 11 Mar 2014 12:48:41 +0000 (+0400) Subject: ILMAB: export GEOM fields to MED file X-Git-Tag: V7_4_0a1~41 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2808cea8b63aacbe70651c44de279118fb9f56e2;p=modules%2Fsmesh.git ILMAB: export GEOM fields to MED file Do not show fields that can't be exported: string fields and fields on the whole shape --- diff --git a/src/SMESHGUI/SMESHGUI_FieldSelectorWdg.cxx b/src/SMESHGUI/SMESHGUI_FieldSelectorWdg.cxx index 3185ea365..d17809507 100644 --- a/src/SMESHGUI/SMESHGUI_FieldSelectorWdg.cxx +++ b/src/SMESHGUI/SMESHGUI_FieldSelectorWdg.cxx @@ -113,6 +113,19 @@ GetAllFeilds(const QList< QPair< SMESH::SMESH_IDSource_var, QString > >& meshes, fields = fieldOp->GetFields( shape ); for ( size_t iF = 0; iF < fields->length(); ++iF ) { + GEOM::field_data_type dataType = fields[ iF ]->GetDataType(); + if ( dataType == GEOM::FDT_String ) + continue; + GEOM::ListOfLong_var stepIDs = fields[ iF ]->GetSteps(); + if ( stepIDs->length() < 1 ) + continue; + GEOM::string_array_var comps = fields[ iF ]->GetComponents(); + if ( comps->length() < 1 ) + continue; + CORBA::Short dim = fields[iF]->GetDimension(); + if ( dim < 0 ) + continue; // "whole shape" field ignored + CORBA::String_var name = fields[iF]->GetName(); createItem( myTree, name.in(), iF, meshItem ); }