#include <Basics_Utils.hxx>
-//To disable automatic genericobj management, the following line should be commented.
-//Otherwise, it should be uncommented.
-//Refer to KERNEL_SRC/src/SALOMEDSImpl/SALOMEDSImpl_AttributeIOR.cxx
-#define WITHGENERICOBJ
-
// Below macro, when uncommented, switches on simplified (more performant) algorithm
// of auto-color picking up
#define SIMPLE_AUTOCOLOR
// Declarations
//=============================================================
void ImportMeshesFromFile(SMESH::SMESH_Gen_ptr theComponentMesh,
- int theCommandID);
+ int theCommandID);
void ExportMeshToFile(int theCommandID);
//================================================================================
void ImportMeshesFromFile( SMESH::SMESH_Gen_ptr theComponentMesh,
- int theCommandID )
+ int theCommandID )
{
QStringList filter;
std::string myExtension;
if( aSel )
aSel->selectedObjects( selected );
- const bool isDAT = ( theCommandID == SMESHOp::OpExportDAT || theCommandID == SMESHOp::OpPopupExportDAT );
- const bool isMED = ( theCommandID == SMESHOp::OpExportMED || theCommandID == SMESHOp::OpPopupExportMED );
- const bool isUNV = ( theCommandID == SMESHOp::OpExportUNV || theCommandID == SMESHOp::OpPopupExportUNV );
- const bool isSTL = ( theCommandID == SMESHOp::OpExportSTL || theCommandID == SMESHOp::OpPopupExportSTL );
+ const bool isDAT = ( theCommandID == SMESHOp::OpExportDAT ||
+ theCommandID == SMESHOp::OpPopupExportDAT );
+ const bool isMED = ( theCommandID == SMESHOp::OpExportMED ||
+ theCommandID == SMESHOp::OpPopupExportMED );
+ const bool isUNV = ( theCommandID == SMESHOp::OpExportUNV ||
+ theCommandID == SMESHOp::OpPopupExportUNV );
+ const bool isSTL = ( theCommandID == SMESHOp::OpExportSTL ||
+ theCommandID == SMESHOp::OpPopupExportSTL );
#ifdef WITH_CGNS
- const bool isCGNS= ( theCommandID == SMESHOp::OpExportCGNS || theCommandID == SMESHOp::OpPopupExportCGNS );
+ const bool isCGNS= ( theCommandID == SMESHOp::OpExportCGNS ||
+ theCommandID == SMESHOp::OpPopupExportCGNS );
#else
const bool isCGNS= false;
#endif
- const bool isSAUV= ( theCommandID == SMESHOp::OpExportSAUV || theCommandID == SMESHOp::OpPopupExportSAUV );
- const bool isGMF = ( theCommandID == SMESHOp::OpExportGMF || theCommandID == SMESHOp::OpPopupExportGMF );
+ const bool isSAUV= ( theCommandID == SMESHOp::OpExportSAUV ||
+ theCommandID == SMESHOp::OpPopupExportSAUV );
+ const bool isGMF = ( theCommandID == SMESHOp::OpExportGMF ||
+ theCommandID == SMESHOp::OpPopupExportGMF );
const bool multiMeshSupported = ( isMED || isCGNS ); // file can hold several meshes
if ( selected.Extent() == 0 || ( selected.Extent() > 1 && !multiMeshSupported ))
// get mesh object from selection and check duplication of their names
bool hasDuplicatedMeshNames = false;
- QList< QPair< SMESH::SMESH_IDSource_var, QString > > aMeshList;
+ QList< QPair< SMESH::SMESH_IDSource_var, QString > > aMeshList;
QList< QPair< SMESH::SMESH_IDSource_var, QString > >::iterator aMeshIter;
SALOME_ListIteratorOfListIO It( selected );
for( ; It.More(); It.Next() )
{
Handle(SALOME_InteractiveObject) anIObject = It.Value();
- SMESH::SMESH_IDSource_var aMeshItem = SMESH::IObjectToInterface<SMESH::SMESH_IDSource>(anIObject);
+ SMESH::SMESH_IDSource_var aMeshItem =
+ SMESH::IObjectToInterface<SMESH::SMESH_IDSource>(anIObject);
if ( aMeshItem->_is_nil() ) {
SUIT_MessageBox::warning( SMESHGUI::desktop(),
QObject::tr( "SMESH_WRN_WARNING" ),
if ( !presentNotSupported.empty() )
{
QString typeNames;
- const char* typeMsg[SMESH::Entity_Last] = {
+ const char* typeMsg[] = {
"SMESH_NODES", "SMESH_ELEMS0D","SMESH_EDGES","SMESH_QUADRATIC_EDGES",
"SMESH_TRIANGLES", "SMESH_QUADRATIC_TRIANGLES", "SMESH_BIQUADRATIC_TRIANGLES",
"SMESH_QUADRANGLES","SMESH_QUADRATIC_QUADRANGLES", "SMESH_BIQUADRATIC_QUADRANGLES",
"SMESH_TRIQUADRATIC_HEXAHEDRONS","SMESH_PENTAHEDRA","SMESH_QUADRATIC_PENTAHEDRONS",
"SMESH_OCTAHEDRA","SMESH_POLYEDRONS","SMESH_QUADRATIC_POLYEDRONS","SMESH_BALLS"
};
+ // is typeMsg complete? (compilation failure mains that enum SMDSAbs_EntityType changed)
+ int nbTypes = sizeof( typeMsg ) / sizeof( const char* );
+ int _assert[( nbTypes == SMESH::Entity_Last ) ? 1 : -1 ]; _assert[0]=1;
+
QString andStr = " " + QObject::tr("SMESH_AND") + " ", comma(", ");
for ( size_t iType = 0; iType < presentNotSupported.size(); ++iType ) {
typeNames += QObject::tr( typeMsg[ presentNotSupported[ iType ]]);
SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
if ( resMgr )
toCreateGroups = resMgr->booleanValue( "SMESH", "auto_groups", false );
- bool toOverwrite = true;
+ bool toOverwrite = true;
bool toFindOutDim = true;
QString aFilter, aTitle = QObject::tr("SMESH_EXPORT_MESH");
}
inline void InverseEntityMode(unsigned int& theOutputMode,
- unsigned int theMode)
+ unsigned int theMode)
{
bool anIsNotPresent = ~theOutputMode & theMode;
if(anIsNotPresent)
theOutputMode &= ~theMode;
}
- void SetDisplayEntity(int theCommandID){
+ void SetDisplayEntity(int theCommandID)
+ {
LightApp_SelectionMgr *aSel = SMESHGUI::selectionMgr();
SALOME_ListIO selected;
- if( aSel )
+ if ( aSel )
aSel->selectedObjects( selected );
- if(selected.Extent() >= 1){
+ if ( selected.Extent() >= 1 ) {
SALOME_ListIteratorOfListIO It( selected );
for( ; It.More(); It.Next()){
Handle(SALOME_InteractiveObject) IObject = It.Value();
if(SMESH_Actor *anActor = SMESH::FindActorByEntry(IObject->getEntry())){
unsigned int aMode = anActor->GetEntityMode();
switch(theCommandID){
- case SMESHOp::OpDE0DElements:
- InverseEntityMode(aMode,SMESH_Actor::e0DElements);
- break;
- case SMESHOp::OpDEEdges:
- InverseEntityMode(aMode,SMESH_Actor::eEdges);
- break;
- case SMESHOp::OpDEFaces:
- InverseEntityMode(aMode,SMESH_Actor::eFaces);
- break;
- case SMESHOp::OpDEVolumes:
- InverseEntityMode(aMode,SMESH_Actor::eVolumes);
- break;
- case SMESHOp::OpDEBalls:
- InverseEntityMode(aMode,SMESH_Actor::eBallElem);
- break;
- case SMESHOp::OpDEAllEntity:
- aMode = SMESH_Actor::eAllEntity;
- break;
+ case SMESHOp::OpDE0DElements: InverseEntityMode(aMode,SMESH_Actor::e0DElements); break;
+ case SMESHOp::OpDEEdges: InverseEntityMode(aMode,SMESH_Actor::eEdges); break;
+ case SMESHOp::OpDEFaces: InverseEntityMode(aMode,SMESH_Actor::eFaces); break;
+ case SMESHOp::OpDEVolumes: InverseEntityMode(aMode,SMESH_Actor::eVolumes); break;
+ case SMESHOp::OpDEBalls: InverseEntityMode(aMode,SMESH_Actor::eBallElem); break;
+ case SMESHOp::OpDEAllEntity: aMode = SMESH_Actor::eAllEntity; break;
}
if(aMode)
anActor->SetEntityMode(aMode);
void AutoColor()
{
- SALOME_ListIO selected;
- SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
- if( !app )
+ SalomeApp_Application* app =
+ dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
+ if ( !app )
return;
LightApp_SelectionMgr* aSel = app->selectionMgr();
SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
- if( !aSel || !appStudy )
+ if ( !aSel || !appStudy )
return;
+ SALOME_ListIO selected;
aSel->selectedObjects( selected );
- if( selected.IsEmpty() )
+ if ( selected.IsEmpty() )
return;
Handle(SALOME_InteractiveObject) anIObject = selected.First();
- _PTR(Study) aStudy = appStudy->studyDS();
- _PTR(SObject) aMainSObject( aStudy->FindObjectID( anIObject->getEntry() ) );
+ _PTR(Study) aStudy = appStudy->studyDS();
+ _PTR(SObject) aMainSObject = aStudy->FindObjectID( anIObject->getEntry() );
SMESH::SMESH_Mesh_var aMainObject = SMESH::IObjectToInterface<SMESH::SMESH_Mesh>(anIObject);
- if( aMainObject->_is_nil() )
+ if ( aMainObject->_is_nil() )
return;
SUIT_OverrideCursor wc;
QList<SALOMEDS::Color> aReservedColors;
SMESH::ListOfGroups aListOfGroups = *aMainObject->GetGroups();
- for( int i = 0, n = aListOfGroups.length(); i < n; i++ )
+ for ( int i = 0, n = aListOfGroups.length(); i < n; i++ )
{
SMESH::SMESH_GroupBase_var aGroupObject = aListOfGroups[i];
- //SALOMEDS::Color aColor = aGroupObject->GetColor();
#ifdef SIMPLE_AUTOCOLOR // simplified algorithm for auto-colors
SALOMEDS::Color aColor = SMESHGUI::getPredefinedUniqueColor();
aGroupObject->SetColor( aColor );
_PTR(SObject) aGroupSObject = SMESH::FindSObject(aGroupObject);
- if (aGroupSObject) {
+ if ( aGroupSObject ) {
QColor c;
int delta;
- if(SMESH_Actor *anActor = SMESH::FindActorByEntry(aGroupSObject->GetID().c_str())) {
+ if ( SMESH_Actor *anActor = SMESH::FindActorByEntry(aGroupSObject->GetID().c_str())) {
switch ( aGroupObject->GetType ()) {
case SMESH::NODE:
anActor->SetNodeColor( aColor.R, aColor.G, aColor.B ); break;
SMESH::RepaintCurrentView();
}
- void OverallMeshQuality() {
+ void OverallMeshQuality()
+ {
SMESHGUI::GetSMESHGUI()->EmitSignalDeactivateDialog();
LightApp_SelectionMgr *aSel = SMESHGUI::selectionMgr();
SALOME_ListIO selected;
Handle(SALOME_InteractiveObject) anIO = selected.First();
if ( anIO->hasEntry() ) {
SMESH_Actor* anActor = SMESH::FindActorByEntry( anIO->getEntry() );
- if ( anActor && anActor->GetScalarBarActor() && anActor->GetControlMode() != SMESH_Actor::eNone ) {
+ if ( anActor &&
+ anActor->GetScalarBarActor() &&
+ anActor->GetControlMode() != SMESH_Actor::eNone )
+ {
SMESH_ScalarBarActor* aScalarBarActor = anActor->GetScalarBarActor();
SMESH::Controls::FunctorPtr aFunctor = anActor->GetFunctor();
if ( aScalarBarActor && aFunctor ) {
- SMESH::Controls::NumericalFunctor* aNumFun = dynamic_cast<SMESH::Controls::NumericalFunctor*>( aFunctor.get() );
+ SMESH::Controls::NumericalFunctor* aNumFun =
+ dynamic_cast<SMESH::Controls::NumericalFunctor*>( aFunctor.get() );
if ( aNumFun ) {
std::vector<int> elements;
SMESH::SMESH_Mesh_var mesh = SMESH::IObjectToInterface<SMESH::SMESH_Mesh>(anIO);
bool isLogarithmic = lookupTable->GetScale() == VTK_SCALE_LOG10;
std::vector<int> nbEvents;
std::vector<double> funValues;
- aNumFun->GetHistogram( nbIntervals, nbEvents, funValues, elements, minmax, isLogarithmic );
+ aNumFun->GetHistogram( nbIntervals, nbEvents, funValues,
+ elements, minmax, isLogarithmic );
QString anInitialPath = "";
if ( SUIT_FileDlg::getLastVisitedPath().isEmpty() )
anInitialPath = QDir::currentPath();
QStringList filter;
filter.append( QObject::tr( "TEXT_FILES_FILTER" ) + " (*.txt)" );
filter.append( QObject::tr( "ALL_FILES_FILTER" ) + " (*)" );
- QString aFilename = anInitialPath + "/" + aMeshName + "_" +
+ QString aFilename = anInitialPath + "/" + aMeshName + "_" +
functorToString( aFunctor ).toLower().simplified().replace( QRegExp( " |-" ), "_" ) + ".txt";
aFilename = SUIT_FileDlg::getFileName( SMESHGUI::desktop(),
aFilename,
}
}
- void ShowElement(int theCommandID ) {
+ void ShowElement( int theCommandID )
+ {
LightApp_SelectionMgr* aSel = SMESHGUI::selectionMgr();
SALOME_ListIO selected;
if ( aSel )
aSel->selectedObjects( selected );
-
+
if ( selected.Extent() == 1 ) {
Handle(SALOME_InteractiveObject) anIO = selected.First();
if ( anIO->hasEntry() ) {
SMESH_Actor* anActor = SMESH::FindActorByEntry( anIO->getEntry() );
- if ( anActor && anActor->GetScalarBarActor() && anActor->GetControlMode() != SMESH_Actor::eNone ) {
+ if ( anActor &&
+ anActor->GetScalarBarActor() &&
+ anActor->GetControlMode() != SMESH_Actor::eNone )
+ {
SMESH_ScalarBarActor *aScalarBarActor = anActor->GetScalarBarActor();
if ( theCommandID == SMESHOp::OpShowDistribution ) {
aScalarBarActor->SetDistributionVisibility(!aScalarBarActor->GetDistributionVisibility());
}
#ifndef DISABLE_PLOT2DVIEWER
- void PlotDistribution() {
- SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
- if( !app )
- return;
-
- LightApp_SelectionMgr* aSel = SMESHGUI::selectionMgr();
- SALOME_ListIO selected;
- if ( aSel )
- aSel->selectedObjects( selected );
-
- if ( selected.Extent() == 1 ) {
- Handle(SALOME_InteractiveObject) anIO = selected.First();
- if ( anIO->hasEntry() ) {
- //Find Actor by entry before getting Plot2d viewer,
- //because after call getViewManager( Plot2d_Viewer::Type(), true ) active window is Plot2d Viewer
- SMESH_Actor* anActor = SMESH::FindActorByEntry( anIO->getEntry() );
-
- SUIT_ViewManager* aViewManager = app->getViewManager( Plot2d_Viewer::Type(), true ); // create if necessary
-
- if( !aViewManager )
- return;
-
- SPlot2d_Viewer* aView = dynamic_cast<SPlot2d_Viewer*>(aViewManager->getViewModel());
- if ( !aView )
- return;
-
- Plot2d_ViewFrame* aPlot = aView->getActiveViewFrame();
- if ( !aPlot )
- return;
-
- if ( anActor && anActor->GetControlMode() != SMESH_Actor::eNone ) {
- SPlot2d_Histogram* aHistogram = anActor->UpdatePlot2Histogram();
- QString functorName = functorToString( anActor->GetFunctor());
- QString aHistogramName("%1 : %2");
- aHistogramName = aHistogramName.arg(anIO->getName()).arg(functorName);
- aHistogram->setName(aHistogramName);
- aHistogram->setHorTitle(functorName);
- aHistogram->setVerTitle(QObject::tr("DISTRIBUTION_NB_ENT"));
- aPlot->displayObject(aHistogram, true);
- }
- }
- }
- }
+ void PlotDistribution()
+ {
+ SalomeApp_Application* app =
+ dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
+ if( !app )
+ return;
+
+ LightApp_SelectionMgr* aSel = SMESHGUI::selectionMgr();
+ SALOME_ListIO selected;
+ if ( aSel )
+ aSel->selectedObjects( selected );
+
+ if ( selected.Extent() == 1 ) {
+ Handle(SALOME_InteractiveObject) anIO = selected.First();
+ if ( anIO->hasEntry() ) {
+ //Find Actor by entry before getting Plot2d viewer,
+ //because after call getViewManager( Plot2d_Viewer::Type(), true ) active window is Plot2d Viewer
+ SMESH_Actor* anActor = SMESH::FindActorByEntry( anIO->getEntry() );
+
+ SUIT_ViewManager* aViewManager =
+ app->getViewManager( Plot2d_Viewer::Type(), true ); // create if necessary
+ if( !aViewManager )
+ return;
+
+ SPlot2d_Viewer* aView = dynamic_cast<SPlot2d_Viewer*>(aViewManager->getViewModel());
+ if ( !aView )
+ return;
+
+ Plot2d_ViewFrame* aPlot = aView->getActiveViewFrame();
+ if ( !aPlot )
+ return;
+
+ if ( anActor && anActor->GetControlMode() != SMESH_Actor::eNone )
+ {
+ SPlot2d_Histogram* aHistogram = anActor->UpdatePlot2Histogram();
+ QString functorName = functorToString( anActor->GetFunctor());
+ QString aHistogramName("%1 : %2");
+ aHistogramName = aHistogramName.arg(anIO->getName()).arg(functorName);
+ aHistogram->setName(aHistogramName);
+ aHistogram->setHorTitle(functorName);
+ aHistogram->setVerTitle(QObject::tr("DISTRIBUTION_NB_ENT"));
+ aPlot->displayObject(aHistogram, true);
+ }
+ }
+ }
+ }
#endif //DISABLE_PLOT2DVIEWER
- void DisableAutoColor(){
+ void DisableAutoColor()
+ {
LightApp_SelectionMgr *aSel = SMESHGUI::selectionMgr();
SALOME_ListIO selected;
- if( aSel )
+ if ( aSel )
aSel->selectedObjects( selected );
- if(selected.Extent()){
+ if ( selected.Extent() ) {
Handle(SALOME_InteractiveObject) anIObject = selected.First();
SMESH::SMESH_Mesh_var aMesh = SMESH::IObjectToInterface<SMESH::SMESH_Mesh>(anIObject);
if ( !aMesh->_is_nil() ) {
}
}
- void sortChildren(){
+ void sortChildren()
+ {
LightApp_SelectionMgr *aSel = SMESHGUI::selectionMgr();
SALOME_ListIO selected;
- if( aSel ) {
+ if ( aSel ) {
aSel->selectedObjects( selected );
-
- if(selected.Extent()){
+ if ( selected.Extent() )
+ {
Handle(SALOME_InteractiveObject) anIObject = selected.First();
_PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
_PTR(SObject) aSObj = aStudy->FindObjectID(anIObject->getEntry());
void SetDisplayMode(int theCommandID, SMESHGUI_StudyId2MarkerMap& theMarkerMap)
{
SALOME_ListIO selected;
- SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
- if( !app )
+ SalomeApp_Application* app =
+ dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
+ if ( !app )
return;
LightApp_SelectionMgr *aSel = SMESHGUI::selectionMgr();
- SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
- if( !aSel || !appStudy )
+ SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
+ if ( !aSel || !appStudy )
return;
- if( theCommandID == SMESHOp::OpClipping ) { // Clipping dialog can be activated without selection
- if( SMESHGUI* aModule = SMESHGUI::GetSMESHGUI() ) {
+ if ( theCommandID == SMESHOp::OpClipping ) { // Clipping dialog can be activated without selection
+ if ( SMESHGUI* aModule = SMESHGUI::GetSMESHGUI() ) {
aModule->EmitSignalDeactivateDialog();
if( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( aModule ) )
(new SMESHGUI_ClippingDlg( aModule, aViewWindow ))->show();
aSel->selectedObjects( selected );
- if(selected.Extent() >= 1){
- switch(theCommandID){
- case SMESHOp::OpTransparency:{
+ if ( selected.Extent() >= 1 )
+ {
+ switch ( theCommandID ) {
+ case SMESHOp::OpTransparency:
+ {
SMESHGUI::GetSMESHGUI()->EmitSignalDeactivateDialog();
(new SMESHGUI_TransparencyDlg( SMESHGUI::GetSMESHGUI() ))->show();
return;
}
- case SMESHOp::OpProperties: {
+ case SMESHOp::OpProperties:
+ {
double color[3];
QColor faceColor, edgeColor, nodeColor, elem0dColor, ballColor;
QColor orientationColor, outlineColor, volumeColor;
_PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
LightApp_SelectionMgr *aSel = SMESHGUI::selectionMgr();
SALOME_ListIO selected;
- if( aSel )
+ if ( aSel )
aSel->selectedObjects( selected );
- if( !selected.IsEmpty() ){
+ if ( !selected.IsEmpty() ) {
SALOME_ListIteratorOfListIO It(selected);
for ( ; It.More(); It.Next())
{
if(!anIO.IsNull()){
_PTR(SObject) SO = aStudy->FindObjectID( It.Value()->getEntry() );
if ( SO ) {
- CORBA::Object_var aObject = SMESH::SObjectToObject( SO );
+ CORBA::Object_var aObject = SMESH::SObjectToObject( SO );
SMESH::SMESH_Mesh_var aMesh = SMESH::SMESH_Mesh::_narrow( aObject );
SMESH::SMESH_subMesh_var aSubMesh = SMESH::SMESH_subMesh::_narrow( aObject );
SMESH::SMESH_GroupBase_var aGroup = SMESH::SMESH_GroupBase::_narrow( aObject );
if ( !aMesh->_is_nil() || !aSubMesh->_is_nil() || !aGroup->_is_nil() ) {
- if(SMESH_Actor *anActor = SMESH::FindActorByEntry(anIO->getEntry())) {
+ if ( SMESH_Actor *anActor = SMESH::FindActorByEntry(anIO->getEntry()) ) {
anActor->SetControlMode(aControl);
anActor->GetScalarBarActor()->SetTitle( functorToString( anActor->GetFunctor() ).toLatin1().constData() );
SMESH::RepaintCurrentView();
#ifndef DISABLE_PLOT2DVIEWER
- if(anActor->GetPlot2Histogram()) {
+ if ( anActor->GetPlot2Histogram() ) {
SPlot2d_Histogram* aHistogram = anActor->UpdatePlot2Histogram();
- QString functorName = functorToString( anActor->GetFunctor());
+ QString functorName = functorToString( anActor->GetFunctor() );
QString aHistogramName("%1 : %2");
- aHistogramName = aHistogramName.arg(anIO->getName()).arg(functorName);
- aHistogram->setName(aHistogramName);
- aHistogram->setHorTitle(functorName);
- SMESH::ProcessIn2DViewers(anActor);
+ aHistogramName = aHistogramName.arg( anIO->getName() ).arg( functorName );
+ aHistogram->setName( aHistogramName );
+ aHistogram->setHorTitle( functorName );
+ SMESH::ProcessIn2DViewers( anActor );
}
#endif
}
bool CheckOIType(const Handle(SALOME_InteractiveObject) & theIO,
- SMESH::MeshObjectType theType,
+ SMESH::MeshObjectType theType,
const QString theInTypeName,
QString & theOutTypeName)
{
SMESH_TypeFilter aTypeFilter( theType );
QString entry;
- if( !theIO.IsNull() )
+ if ( !theIO.IsNull() )
{
entry = theIO->getEntry();
LightApp_DataOwner owner( entry );
QString CheckTypeObject(const Handle(SALOME_InteractiveObject) & theIO)
{
- _PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
+ _PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
_PTR(SObject) aSObj = aStudy->FindObjectID(theIO->getEntry());
if (aSObj) {
_PTR(SComponent) aSComp = aSObj->GetFatherComponent();
- CORBA::String_var anID = aSComp->GetID().c_str();
- if (!strcmp(anID.in(),theIO->getEntry()))
+ CORBA::String_var anID = aSComp->GetID().c_str();
+ if ( !strcmp(anID.in(),theIO->getEntry()) )
return "Component";
}
QString CheckHomogeneousSelection()
{
- //SUIT_Study* aStudy = SMESH::GetActiveStudy();
LightApp_SelectionMgr *aSel = SMESHGUI::selectionMgr();
SALOME_ListIO selected;
- if( aSel )
+ if ( aSel )
aSel->selectedObjects( selected );
QString RefType = CheckTypeObject(selected.First());
{
Handle(SALOME_InteractiveObject) IObject = It.Value();
QString Type = CheckTypeObject(IObject);
- if (Type.compare(RefType) != 0)
+ if ( Type.compare(RefType) != 0 )
return "Heterogeneous Selection";
}
QStringList aMarkerScaleValuesList;
for ( int i = VTK::MS_10; i <= VTK::MS_70; i++ ) {
aMarkerScaleIndicesList << i;
- aMarkerScaleValuesList << QString::number( (i-(int)VTK::MS_10)*0.5 + 1.0 );
+ //aMarkerScaleValuesList << QString::number( (i-(int)VTK::MS_10)*0.5 + 1.0 );
+ aMarkerScaleValuesList << QString::number( i );
}
setPreferenceProperty( markerScale, "strings", aMarkerScaleValuesList );
setPreferenceProperty( markerScale, "indexes", aMarkerScaleIndicesList );