- SALOME_ListIO selected;
- SMESHGUI::selectionMgr()->selectedObjects( selected );
- if ( selected.Extent() < 1 ) return;
- SMESH::SMESH_IDSource_var obj = SMESH::IObjectToInterface<SMESH::SMESH_IDSource>( selected.First() );
- if ( CORBA::is_nil( obj ) ) return;
- _PTR(SObject) aSO = SMESH::FindSObject( obj );
- if ( !aSO ) return;
- SMESH_Actor* anActor = SMESH::FindActorByEntry( selected.First()->getEntry() );
- if ( !anActor ) anActor = SMESH::CreateActor( aSO->GetStudy(), aSO->GetID().c_str(), true );
- if ( !anActor ) return;
-
- SMESH::Controls::NumericalFunctorPtr anAspectRatio3D( new SMESH::Controls::AspectRatio3D() );
- int cprecision = 6;
- if ( SMESHGUI::resourceMgr()->booleanValue( "SMESH", "use_precision", false ) )
- cprecision = SMESHGUI::resourceMgr()->integerValue( "SMESH", "controls_precision", -1 );
- anAspectRatio3D->SetPrecision( cprecision );
- anAspectRatio3D->SetMesh( anActor->GetObject()->GetMesh() );
- SMESH::long_array_var anElems = getElementsByType( SMESH::VOLUME );
- Plot2d_Histogram* aHistogram = getHistogram( anElems, anAspectRatio3D );
-
- if ( !aHistogram->isEmpty() ) {