mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-31 10:40:33 +05:00
Mantis issue 0020812: Register() and Destroy() of the GenericObj.
This commit is contained in:
parent
5faccfa115
commit
946f0a4e5c
@ -19,12 +19,11 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
|
// SMESH SMESHGUI : GUI for SMESH component
|
||||||
|
// File : SMESHGUI.cxx
|
||||||
|
// Author : Nicolas REJNERI, Open CASCADE S.A.S.
|
||||||
|
|
||||||
// SMESH SMESHGUI : GUI for SMESH component
|
// SMESH includes
|
||||||
// File : SMESHGUI.cxx
|
|
||||||
// Author : Nicolas REJNERI, Open CASCADE S.A.S.
|
|
||||||
// SMESH includes
|
|
||||||
//
|
|
||||||
#include "SMESHGUI.h"
|
#include "SMESHGUI.h"
|
||||||
#include "SMESHGUI_AddMeshElementDlg.h"
|
#include "SMESHGUI_AddMeshElementDlg.h"
|
||||||
#include "SMESHGUI_AddQuadraticElementDlg.h"
|
#include "SMESHGUI_AddQuadraticElementDlg.h"
|
||||||
@ -145,6 +144,10 @@
|
|||||||
#include <Standard_ErrorHandler.hxx>
|
#include <Standard_ErrorHandler.hxx>
|
||||||
#include <NCollection_DataMap.hxx>
|
#include <NCollection_DataMap.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
|
||||||
|
|
||||||
//namespace{
|
//namespace{
|
||||||
// Declarations
|
// Declarations
|
||||||
//=============================================================
|
//=============================================================
|
||||||
@ -241,6 +244,13 @@
|
|||||||
aPixmap->SetPixMap( "ICON_SMESH_TREE_MESH_IMPORTED" );
|
aPixmap->SetPixMap( "ICON_SMESH_TREE_MESH_IMPORTED" );
|
||||||
if ( theCommandID == 112 ) // mesh names aren't taken from the file for UNV import
|
if ( theCommandID == 112 ) // mesh names aren't taken from the file for UNV import
|
||||||
SMESH::SetName( aMeshSO, QFileInfo(filename).fileName() );
|
SMESH::SetName( aMeshSO, QFileInfo(filename).fileName() );
|
||||||
|
|
||||||
|
#ifdef WITHGENERICOBJ
|
||||||
|
// obj has been published in study. Its refcount has been incremented.
|
||||||
|
// It is safe to decrement its refcount
|
||||||
|
// so that it will be destroyed when the entry in study will be removed
|
||||||
|
aMeshes[i]->Destroy();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
isEmpty = true;
|
isEmpty = true;
|
||||||
@ -1299,7 +1309,9 @@ LightApp_Module( "SMESH" )
|
|||||||
//=============================================================================
|
//=============================================================================
|
||||||
SMESHGUI::~SMESHGUI()
|
SMESHGUI::~SMESHGUI()
|
||||||
{
|
{
|
||||||
|
#ifdef WITHGENERICOBJ
|
||||||
SMESH::GetFilterManager()->Destroy();
|
SMESH::GetFilterManager()->Destroy();
|
||||||
|
#endif
|
||||||
SMESH::GetFilterManager() = SMESH::FilterManager::_nil();
|
SMESH::GetFilterManager() = SMESH::FilterManager::_nil();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1665,7 +1677,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
|
|||||||
case 232:
|
case 232:
|
||||||
::SetDisplayMode(theCommandID, myMarkerMap);
|
::SetDisplayMode(theCommandID, myMarkerMap);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Display Entity
|
// Display Entity
|
||||||
case 216: // 0D elements
|
case 216: // 0D elements
|
||||||
case 217: // Edges
|
case 217: // Edges
|
||||||
@ -1772,7 +1784,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
aSel->setSelectedObjects( to_process );
|
aSel->setSelectedObjects( to_process );
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3438,12 +3450,12 @@ void SMESHGUI::initialize( CAM_Application* app )
|
|||||||
|
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
// Representation of the 2D Quadratic elements
|
// Representation of the 2D Quadratic elements
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
anId = popupMgr()->insert( tr( "MEN_QUADRATIC_REPRESENT" ), -1, -1 );
|
anId = popupMgr()->insert( tr( "MEN_QUADRATIC_REPRESENT" ), -1, -1 );
|
||||||
popupMgr()->insert( action( 231 ), anId, -1 ); // LINE REPRESENTATION
|
popupMgr()->insert( action( 231 ), anId, -1 ); // LINE REPRESENTATION
|
||||||
popupMgr()->setRule( action( 231 ), aMeshInVTK + "and isVisible",QtxPopupMgr::VisibleRule );
|
popupMgr()->setRule( action( 231 ), aMeshInVTK + "and isVisible",QtxPopupMgr::VisibleRule );
|
||||||
popupMgr()->setRule( action( 231 ), "quadratic2DMode = 'eLines'", QtxPopupMgr::ToggleRule );
|
popupMgr()->setRule( action( 231 ), "quadratic2DMode = 'eLines'", QtxPopupMgr::ToggleRule );
|
||||||
|
|
||||||
popupMgr()->insert( action( 232 ), anId, -1 ); // ARC REPRESENTATION
|
popupMgr()->insert( action( 232 ), anId, -1 ); // ARC REPRESENTATION
|
||||||
popupMgr()->setRule( action( 232 ), aMeshInVTK + "and isVisible", QtxPopupMgr::VisibleRule );
|
popupMgr()->setRule( action( 232 ), aMeshInVTK + "and isVisible", QtxPopupMgr::VisibleRule );
|
||||||
popupMgr()->setRule( action( 232 ), "quadratic2DMode = 'eArcs'", QtxPopupMgr::ToggleRule );
|
popupMgr()->setRule( action( 232 ), "quadratic2DMode = 'eArcs'", QtxPopupMgr::ToggleRule );
|
||||||
@ -3485,7 +3497,7 @@ void SMESHGUI::initialize( CAM_Application* app )
|
|||||||
aMeshInVtkHasVolumes = aMeshInVTK + "&&" + hasVolumes;
|
aMeshInVtkHasVolumes = aMeshInVTK + "&&" + hasVolumes;
|
||||||
|
|
||||||
anId = popupMgr()->insert( tr( "MEN_CTRL" ), -1, -1 );
|
anId = popupMgr()->insert( tr( "MEN_CTRL" ), -1, -1 );
|
||||||
|
|
||||||
popupMgr()->insert( action( 200 ), anId, -1 ); // RESET
|
popupMgr()->insert( action( 200 ), anId, -1 ); // RESET
|
||||||
popupMgr()->setRule( action( 200 ), aMeshInVTK + "&& controlMode <> 'eNone'", QtxPopupMgr::VisibleRule );
|
popupMgr()->setRule( action( 200 ), aMeshInVTK + "&& controlMode <> 'eNone'", QtxPopupMgr::VisibleRule );
|
||||||
|
|
||||||
@ -3566,7 +3578,7 @@ void SMESHGUI::initialize( CAM_Application* app )
|
|||||||
popupMgr()->setRule( action( 201 ), aMeshInVTK + "&& controlMode <> 'eNone'", QtxPopupMgr::VisibleRule );
|
popupMgr()->setRule( action( 201 ), aMeshInVTK + "&& controlMode <> 'eNone'", QtxPopupMgr::VisibleRule );
|
||||||
|
|
||||||
popupMgr()->insert( separator(), -1, -1 );
|
popupMgr()->insert( separator(), -1, -1 );
|
||||||
|
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
// Display / Erase
|
// Display / Erase
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
@ -3616,7 +3628,7 @@ bool SMESHGUI::reusableOperation( const int id )
|
|||||||
{
|
{
|
||||||
// compute, evaluate and precompute are not reusable operations
|
// compute, evaluate and precompute are not reusable operations
|
||||||
return ( id == 701 || id == 711 || id == 712 ) ? false : SalomeApp_Module::reusableOperation( id );
|
return ( id == 701 || id == 711 || id == 712 ) ? false : SalomeApp_Module::reusableOperation( id );
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SMESHGUI::activateModule( SUIT_Study* study )
|
bool SMESHGUI::activateModule( SUIT_Study* study )
|
||||||
{
|
{
|
||||||
@ -3789,8 +3801,8 @@ void SMESHGUI::createPreferences()
|
|||||||
"SMESH", "max_angle" );
|
"SMESH", "max_angle" );
|
||||||
setPreferenceProperty( maxAngle, "min", 1 );
|
setPreferenceProperty( maxAngle, "min", 1 );
|
||||||
setPreferenceProperty( maxAngle, "max", 90 );
|
setPreferenceProperty( maxAngle, "max", 90 );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int exportgroup = addPreference( tr( "PREF_GROUP_EXPORT" ), genTab );
|
int exportgroup = addPreference( tr( "PREF_GROUP_EXPORT" ), genTab );
|
||||||
setPreferenceProperty( exportgroup, "columns", 2 );
|
setPreferenceProperty( exportgroup, "columns", 2 );
|
||||||
@ -3821,15 +3833,15 @@ void SMESHGUI::createPreferences()
|
|||||||
"SMESH", "nb_segments_per_edge" );
|
"SMESH", "nb_segments_per_edge" );
|
||||||
setPreferenceProperty( nbSeg, "min", 1 );
|
setPreferenceProperty( nbSeg, "min", 1 );
|
||||||
setPreferenceProperty( nbSeg, "max", 10000000 );
|
setPreferenceProperty( nbSeg, "max", 10000000 );
|
||||||
|
|
||||||
// Quantities with individual precision settings
|
// Quantities with individual precision settings
|
||||||
int precGroup = addPreference( tr( "SMESH_PREF_GROUP_PRECISION" ), genTab );
|
int precGroup = addPreference( tr( "SMESH_PREF_GROUP_PRECISION" ), genTab );
|
||||||
setPreferenceProperty( precGroup, "columns", 2 );
|
setPreferenceProperty( precGroup, "columns", 2 );
|
||||||
|
|
||||||
const int nbQuantities = 6;
|
const int nbQuantities = 6;
|
||||||
int precs[nbQuantities], ii = 0;
|
int precs[nbQuantities], ii = 0;
|
||||||
precs[ii++] = addPreference( tr( "SMESH_PREF_length_precision" ), precGroup,
|
precs[ii++] = addPreference( tr( "SMESH_PREF_length_precision" ), precGroup,
|
||||||
LightApp_Preferences::IntSpin, "SMESH", "length_precision" );
|
LightApp_Preferences::IntSpin, "SMESH", "length_precision" );
|
||||||
precs[ii++] = addPreference( tr( "SMESH_PREF_angle_precision" ), precGroup,
|
precs[ii++] = addPreference( tr( "SMESH_PREF_angle_precision" ), precGroup,
|
||||||
LightApp_Preferences::IntSpin, "SMESH", "angle_precision" );
|
LightApp_Preferences::IntSpin, "SMESH", "angle_precision" );
|
||||||
precs[ii++] = addPreference( tr( "SMESH_PREF_len_tol_precision" ), precGroup,
|
precs[ii++] = addPreference( tr( "SMESH_PREF_len_tol_precision" ), precGroup,
|
||||||
@ -3839,14 +3851,14 @@ void SMESHGUI::createPreferences()
|
|||||||
precs[ii++] = addPreference( tr( "SMESH_PREF_area_precision" ), precGroup,
|
precs[ii++] = addPreference( tr( "SMESH_PREF_area_precision" ), precGroup,
|
||||||
LightApp_Preferences::IntSpin, "SMESH", "area_precision" );
|
LightApp_Preferences::IntSpin, "SMESH", "area_precision" );
|
||||||
precs[ii ] = addPreference( tr( "SMESH_PREF_vol_precision" ), precGroup,
|
precs[ii ] = addPreference( tr( "SMESH_PREF_vol_precision" ), precGroup,
|
||||||
LightApp_Preferences::IntSpin, "SMESH", "vol_precision" );
|
LightApp_Preferences::IntSpin, "SMESH", "vol_precision" );
|
||||||
|
|
||||||
// Set property for precision value for spinboxes
|
// Set property for precision value for spinboxes
|
||||||
for ( ii = 0; ii < nbQuantities; ii++ ){
|
for ( ii = 0; ii < nbQuantities; ii++ ){
|
||||||
setPreferenceProperty( precs[ii], "min", -14 );
|
setPreferenceProperty( precs[ii], "min", -14 );
|
||||||
setPreferenceProperty( precs[ii], "max", 14 );
|
setPreferenceProperty( precs[ii], "max", 14 );
|
||||||
setPreferenceProperty( precs[ii], "precision", 2 );
|
setPreferenceProperty( precs[ii], "precision", 2 );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mesh tab ------------------------------------------------------------------------
|
// Mesh tab ------------------------------------------------------------------------
|
||||||
int meshTab = addPreference( tr( "PREF_TAB_MESH" ) );
|
int meshTab = addPreference( tr( "PREF_TAB_MESH" ) );
|
||||||
@ -4845,7 +4857,7 @@ void SMESHGUI::restoreVisualParameters (int savePoint)
|
|||||||
int SMESHGUI::addVtkFontPref( const QString& label, const int pId, const QString& param )
|
int SMESHGUI::addVtkFontPref( const QString& label, const int pId, const QString& param )
|
||||||
{
|
{
|
||||||
int tfont = addPreference( label, pId, LightApp_Preferences::Font, "VISU", param );
|
int tfont = addPreference( label, pId, LightApp_Preferences::Font, "VISU", param );
|
||||||
|
|
||||||
setPreferenceProperty( tfont, "mode", QtxFontEdit::Custom );
|
setPreferenceProperty( tfont, "mode", QtxFontEdit::Custom );
|
||||||
|
|
||||||
QStringList fam;
|
QStringList fam;
|
||||||
|
@ -19,12 +19,11 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
|
// SMESH SMESHGUI : GUI for SMESH component
|
||||||
|
// File : SMESHGUI_BuildCompoundDlg.cxx
|
||||||
|
// Author : Alexander KOVALEV, Open CASCADE S.A.S.
|
||||||
|
// SMESH includes
|
||||||
|
|
||||||
// SMESH SMESHGUI : GUI for SMESH component
|
|
||||||
// File : SMESHGUI_BuildCompoundDlg.cxx
|
|
||||||
// Author : Alexander KOVALEV, Open CASCADE S.A.S.
|
|
||||||
// SMESH includes
|
|
||||||
//
|
|
||||||
#include "SMESHGUI_BuildCompoundDlg.h"
|
#include "SMESHGUI_BuildCompoundDlg.h"
|
||||||
|
|
||||||
#include "SMESHGUI.h"
|
#include "SMESHGUI.h"
|
||||||
@ -67,6 +66,10 @@
|
|||||||
#define SPACING 6
|
#define SPACING 6
|
||||||
#define MARGIN 11
|
#define MARGIN 11
|
||||||
|
|
||||||
|
//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
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// name : SMESHGUI_BuildCompoundDlg
|
// name : SMESHGUI_BuildCompoundDlg
|
||||||
// Purpose :
|
// Purpose :
|
||||||
@ -143,7 +146,7 @@ SMESHGUI_BuildCompoundDlg::SMESHGUI_BuildCompoundDlg( SMESHGUI* theModule )
|
|||||||
GroupArgsLayout->addWidget(TextLabelMeshes, 0, 0);
|
GroupArgsLayout->addWidget(TextLabelMeshes, 0, 0);
|
||||||
GroupArgsLayout->addWidget(SelectButton, 0, 1);
|
GroupArgsLayout->addWidget(SelectButton, 0, 1);
|
||||||
GroupArgsLayout->addWidget(LineEditMeshes, 0, 2, 1, 2);
|
GroupArgsLayout->addWidget(LineEditMeshes, 0, 2, 1, 2);
|
||||||
GroupArgsLayout->addWidget(TextLabelUnion, 1, 0, 1, 3);
|
GroupArgsLayout->addWidget(TextLabelUnion, 1, 0, 1, 3);
|
||||||
GroupArgsLayout->addWidget(ComboBoxUnion, 1, 3);
|
GroupArgsLayout->addWidget(ComboBoxUnion, 1, 3);
|
||||||
GroupArgsLayout->addWidget(CheckBoxCommon, 2, 0, 1, 4);
|
GroupArgsLayout->addWidget(CheckBoxCommon, 2, 0, 1, 4);
|
||||||
GroupArgsLayout->addWidget(CheckBoxMerge, 3, 0, 1, 4);
|
GroupArgsLayout->addWidget(CheckBoxMerge, 3, 0, 1, 4);
|
||||||
@ -301,16 +304,16 @@ bool SMESHGUI_BuildCompoundDlg::ClickOnApply()
|
|||||||
SMESH::SMESH_Gen_var aSMESHGen = SMESHGUI::GetSMESHGen();
|
SMESH::SMESH_Gen_var aSMESHGen = SMESHGUI::GetSMESHGen();
|
||||||
// concatenate meshes
|
// concatenate meshes
|
||||||
if(CheckBoxCommon->isChecked())
|
if(CheckBoxCommon->isChecked())
|
||||||
aCompoundMesh = aSMESHGen->ConcatenateWithGroups(myMeshArray,
|
aCompoundMesh = aSMESHGen->ConcatenateWithGroups(myMeshArray,
|
||||||
!(ComboBoxUnion->currentIndex()),
|
!(ComboBoxUnion->currentIndex()),
|
||||||
CheckBoxMerge->isChecked(),
|
CheckBoxMerge->isChecked(),
|
||||||
SpinBoxTol->GetValue());
|
SpinBoxTol->GetValue());
|
||||||
else
|
else
|
||||||
aCompoundMesh = aSMESHGen->Concatenate(myMeshArray,
|
aCompoundMesh = aSMESHGen->Concatenate(myMeshArray,
|
||||||
!(ComboBoxUnion->currentIndex()),
|
!(ComboBoxUnion->currentIndex()),
|
||||||
CheckBoxMerge->isChecked(),
|
CheckBoxMerge->isChecked(),
|
||||||
SpinBoxTol->GetValue());
|
SpinBoxTol->GetValue());
|
||||||
|
|
||||||
aCompoundMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
|
aCompoundMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
|
||||||
|
|
||||||
SMESH::SetName( SMESH::FindSObject( aCompoundMesh ), LineEditName->text() );
|
SMESH::SetName( SMESH::FindSObject( aCompoundMesh ), LineEditName->text() );
|
||||||
@ -325,7 +328,7 @@ bool SMESHGUI_BuildCompoundDlg::ClickOnApply()
|
|||||||
if ( SMESHGUI::automaticUpdate() ) {
|
if ( SMESHGUI::automaticUpdate() ) {
|
||||||
mySelectionMgr->clearSelected();
|
mySelectionMgr->clearSelected();
|
||||||
SMESH::UpdateView();
|
SMESH::UpdateView();
|
||||||
|
|
||||||
_PTR(SObject) aSO = SMESH::FindSObject(aCompoundMesh.in());
|
_PTR(SObject) aSO = SMESH::FindSObject(aCompoundMesh.in());
|
||||||
if ( SMESH_Actor* anActor = SMESH::CreateActor(aSO->GetStudy(), aSO->GetID().c_str()) )
|
if ( SMESH_Actor* anActor = SMESH::CreateActor(aSO->GetStudy(), aSO->GetID().c_str()) )
|
||||||
SMESH::DisplayActor(SMESH::GetActiveWindow(), anActor);
|
SMESH::DisplayActor(SMESH::GetActiveWindow(), anActor);
|
||||||
@ -333,6 +336,14 @@ bool SMESHGUI_BuildCompoundDlg::ClickOnApply()
|
|||||||
|
|
||||||
SMESHGUI::Modified();
|
SMESHGUI::Modified();
|
||||||
|
|
||||||
|
#ifdef WITHGENERICOBJ
|
||||||
|
// obj has been published in study. Its refcount has been incremented.
|
||||||
|
// It is safe to decrement its refcount
|
||||||
|
// so that it will be destroyed when the entry in study will be removed
|
||||||
|
if (!CORBA::is_nil(aCompoundMesh))
|
||||||
|
aCompoundMesh->Destroy();
|
||||||
|
#endif
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@ -368,7 +379,7 @@ void SMESHGUI_BuildCompoundDlg::ClickOnCancel()
|
|||||||
void SMESHGUI_BuildCompoundDlg::ClickOnHelp()
|
void SMESHGUI_BuildCompoundDlg::ClickOnHelp()
|
||||||
{
|
{
|
||||||
LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
|
LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
|
||||||
if (app)
|
if (app)
|
||||||
app->onHelpContextModule(mySMESHGUI ? app->moduleName(mySMESHGUI->moduleName()) : QString(""), myHelpFileName);
|
app->onHelpContextModule(mySMESHGUI ? app->moduleName(mySMESHGUI->moduleName()) : QString(""), myHelpFileName);
|
||||||
else {
|
else {
|
||||||
SUIT_MessageBox::warning(this, tr("WRN_WARNING"),
|
SUIT_MessageBox::warning(this, tr("WRN_WARNING"),
|
||||||
@ -503,7 +514,6 @@ void SMESHGUI_BuildCompoundDlg::keyPressEvent( QKeyEvent* e )
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
void SMESHGUI_BuildCompoundDlg::onSelectMerge(bool toMerge)
|
void SMESHGUI_BuildCompoundDlg::onSelectMerge(bool toMerge)
|
||||||
{
|
{
|
||||||
|
|
||||||
TextLabelTol->setEnabled(toMerge);
|
TextLabelTol->setEnabled(toMerge);
|
||||||
SpinBoxTol->setEnabled(toMerge);
|
SpinBoxTol->setEnabled(toMerge);
|
||||||
if(!toMerge)
|
if(!toMerge)
|
||||||
|
@ -19,12 +19,11 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
|
// SMESH SMESHGUI : GUI for SMESH component
|
||||||
|
// File : SMESHGUI_Hypotheses.cxx
|
||||||
|
// Author : Julia DOROVSKIKH, Open CASCADE S.A.S.
|
||||||
|
// SMESH includes
|
||||||
|
|
||||||
// SMESH SMESHGUI : GUI for SMESH component
|
|
||||||
// File : SMESHGUI_Hypotheses.cxx
|
|
||||||
// Author : Julia DOROVSKIKH, Open CASCADE S.A.S.
|
|
||||||
// SMESH includes
|
|
||||||
//
|
|
||||||
#include "SMESHGUI_Hypotheses.h"
|
#include "SMESHGUI_Hypotheses.h"
|
||||||
|
|
||||||
#include "SMESHGUI.h"
|
#include "SMESHGUI.h"
|
||||||
@ -53,6 +52,10 @@
|
|||||||
#define SPACING 6
|
#define SPACING 6
|
||||||
#define MARGIN 11
|
#define MARGIN 11
|
||||||
|
|
||||||
|
//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
|
||||||
|
|
||||||
SMESHGUI_GenericHypothesisCreator::SMESHGUI_GenericHypothesisCreator( const QString& theHypType )
|
SMESHGUI_GenericHypothesisCreator::SMESHGUI_GenericHypothesisCreator( const QString& theHypType )
|
||||||
: myHypType( theHypType ), myIsCreate( false ), myDlg( 0 )
|
: myHypType( theHypType ), myIsCreate( false ), myDlg( 0 )
|
||||||
{
|
{
|
||||||
@ -86,14 +89,22 @@ void SMESHGUI_GenericHypothesisCreator::create( bool isAlgo,
|
|||||||
myIsCreate = true;
|
myIsCreate = true;
|
||||||
|
|
||||||
// Create hypothesis/algorithm
|
// Create hypothesis/algorithm
|
||||||
if (isAlgo)
|
if (isAlgo) {
|
||||||
SMESH::CreateHypothesis( hypType(), theHypName, isAlgo );
|
SMESH::SMESH_Hypothesis_var anAlgo =
|
||||||
|
SMESH::CreateHypothesis( hypType(), theHypName, isAlgo );
|
||||||
else
|
#ifdef WITHGENERICOBJ
|
||||||
{
|
if (!CORBA::is_nil(anAlgo))
|
||||||
SMESH::SMESH_Hypothesis_var aHypothesis =
|
anAlgo->Destroy();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
SMESH::SMESH_Hypothesis_var aHypothesis =
|
||||||
SMESH::CreateHypothesis( hypType(), theHypName, false );
|
SMESH::CreateHypothesis( hypType(), theHypName, false );
|
||||||
editHypothesis( aHypothesis.in(), theHypName, theParent, obj, slot );
|
editHypothesis( aHypothesis.in(), theHypName, theParent, obj, slot );
|
||||||
|
#ifdef WITHGENERICOBJ
|
||||||
|
if (!CORBA::is_nil(aHypothesis))
|
||||||
|
aHypothesis->Destroy();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -111,13 +122,16 @@ void SMESHGUI_GenericHypothesisCreator::edit( SMESH::SMESH_Hypothesis_ptr theHyp
|
|||||||
editHypothesis( theHypothesis, theHypName, theParent, obj, slot );
|
editHypothesis( theHypothesis, theHypName, theParent, obj, slot );
|
||||||
}
|
}
|
||||||
|
|
||||||
void SMESHGUI_GenericHypothesisCreator::editHypothesis( SMESH::SMESH_Hypothesis_ptr h,
|
void SMESHGUI_GenericHypothesisCreator::editHypothesis( SMESH::SMESH_Hypothesis_ptr h,
|
||||||
const QString& theHypName,
|
const QString& theHypName,
|
||||||
QWidget* theParent,
|
QWidget* theParent,
|
||||||
QObject* obj, const QString& slot )
|
QObject* obj, const QString& slot )
|
||||||
{
|
{
|
||||||
myHypName = theHypName;
|
myHypName = theHypName;
|
||||||
myHypo = SMESH::SMESH_Hypothesis::_duplicate( h );
|
myHypo = SMESH::SMESH_Hypothesis::_duplicate( h );
|
||||||
|
#ifdef WITHGENERICOBJ
|
||||||
|
myHypo->Register();
|
||||||
|
#endif
|
||||||
|
|
||||||
SMESHGUI_HypothesisDlg* Dlg = new SMESHGUI_HypothesisDlg( this, theParent );
|
SMESHGUI_HypothesisDlg* Dlg = new SMESHGUI_HypothesisDlg( this, theParent );
|
||||||
connect( Dlg, SIGNAL( finished( int ) ), this, SLOT( onDialogFinished( int ) ) );
|
connect( Dlg, SIGNAL( finished( int ) ), this, SLOT( onDialogFinished( int ) ) );
|
||||||
@ -140,7 +154,7 @@ void SMESHGUI_GenericHypothesisCreator::editHypothesis( SMESH::SMESH_Hypothesis_
|
|||||||
else
|
else
|
||||||
emit finished( QDialog::Accepted );
|
emit finished( QDialog::Accepted );
|
||||||
}
|
}
|
||||||
|
|
||||||
QFrame* SMESHGUI_GenericHypothesisCreator::buildStdFrame()
|
QFrame* SMESHGUI_GenericHypothesisCreator::buildStdFrame()
|
||||||
{
|
{
|
||||||
if( CORBA::is_nil( hypothesis() ) )
|
if( CORBA::is_nil( hypothesis() ) )
|
||||||
@ -169,7 +183,7 @@ QFrame* SMESHGUI_GenericHypothesisCreator::buildStdFrame()
|
|||||||
GroupC1Layout->addWidget( lab, i, 0 );
|
GroupC1Layout->addWidget( lab, i, 0 );
|
||||||
|
|
||||||
QWidget* w = getCustomWidget( *anIt, GroupC1, i );
|
QWidget* w = getCustomWidget( *anIt, GroupC1, i );
|
||||||
if ( !w )
|
if ( !w )
|
||||||
switch( (*anIt).myValue.type() )
|
switch( (*anIt).myValue.type() )
|
||||||
{
|
{
|
||||||
case QVariant::Int:
|
case QVariant::Int:
|
||||||
@ -287,6 +301,9 @@ void SMESHGUI_GenericHypothesisCreator::onDialogFinished( int result )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
SMESHGUI::GetSMESHGUI()->updateObjBrowser( true, 0 );
|
SMESHGUI::GetSMESHGUI()->updateObjBrowser( true, 0 );
|
||||||
|
#ifdef WITHGENERICOBJ
|
||||||
|
myHypo->Destroy();
|
||||||
|
#endif
|
||||||
myHypo = SMESH::SMESH_Hypothesis::_nil();
|
myHypo = SMESH::SMESH_Hypothesis::_nil();
|
||||||
myInitParamsHypo = SMESH::SMESH_Hypothesis::_nil();
|
myInitParamsHypo = SMESH::SMESH_Hypothesis::_nil();
|
||||||
|
|
||||||
@ -316,26 +333,22 @@ bool SMESHGUI_GenericHypothesisCreator::getStdParamFromDlg( ListOfStdParams& par
|
|||||||
item.myValue = sb->value();
|
item.myValue = sb->value();
|
||||||
params.append( item );
|
params.append( item );
|
||||||
}
|
}
|
||||||
|
|
||||||
else if( (*anIt)->inherits( "SalomeApp_DoubleSpinBox" ) )
|
else if( (*anIt)->inherits( "SalomeApp_DoubleSpinBox" ) )
|
||||||
{
|
{
|
||||||
SalomeApp_DoubleSpinBox* sb = ( SalomeApp_DoubleSpinBox* )( *anIt );
|
SalomeApp_DoubleSpinBox* sb = ( SalomeApp_DoubleSpinBox* )( *anIt );
|
||||||
item.myValue = sb->value();
|
item.myValue = sb->value();
|
||||||
params.append( item );
|
params.append( item );
|
||||||
}
|
}
|
||||||
|
|
||||||
else if( (*anIt)->inherits( "QLineEdit" ) )
|
else if( (*anIt)->inherits( "QLineEdit" ) )
|
||||||
{
|
{
|
||||||
QLineEdit* line = ( QLineEdit* )( *anIt );
|
QLineEdit* line = ( QLineEdit* )( *anIt );
|
||||||
item.myValue = line->text();
|
item.myValue = line->text();
|
||||||
params.append( item );
|
params.append( item );
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( getParamFromCustomWidget( item, *anIt ))
|
else if ( getParamFromCustomWidget( item, *anIt ))
|
||||||
{
|
{
|
||||||
params.append( item );
|
params.append( item );
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
res = false;
|
res = false;
|
||||||
}
|
}
|
||||||
@ -351,7 +364,7 @@ QStringList SMESHGUI_GenericHypothesisCreator::getVariablesFromDlg() const
|
|||||||
if( (*anIt)->inherits( "QAbstractSpinBox" ) ) {
|
if( (*anIt)->inherits( "QAbstractSpinBox" ) ) {
|
||||||
QAbstractSpinBox* sb = ( QAbstractSpinBox* )( *anIt );
|
QAbstractSpinBox* sb = ( QAbstractSpinBox* )( *anIt );
|
||||||
aResult.append(sb->text());
|
aResult.append(sb->text());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return aResult;
|
return aResult;
|
||||||
}
|
}
|
||||||
@ -440,7 +453,7 @@ SMESHGUI_GenericHypothesisCreator::ListOfWidgets& SMESHGUI_GenericHypothesisCrea
|
|||||||
}
|
}
|
||||||
|
|
||||||
QtxDialog* SMESHGUI_GenericHypothesisCreator:: dlg() const
|
QtxDialog* SMESHGUI_GenericHypothesisCreator:: dlg() const
|
||||||
{
|
{
|
||||||
return myDlg;
|
return myDlg;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -565,7 +578,7 @@ SMESHGUI_HypothesisDlg::SMESHGUI_HypothesisDlg( SMESHGUI_GenericHypothesisCreato
|
|||||||
QHBoxLayout* titLay = new QHBoxLayout( titFrame );
|
QHBoxLayout* titLay = new QHBoxLayout( titFrame );
|
||||||
titLay->setMargin( 0 );
|
titLay->setMargin( 0 );
|
||||||
titLay->setSpacing( SPACING );
|
titLay->setSpacing( SPACING );
|
||||||
|
|
||||||
myIconLabel = new QLabel( titFrame );
|
myIconLabel = new QLabel( titFrame );
|
||||||
myIconLabel->setScaledContents( false );
|
myIconLabel->setScaledContents( false );
|
||||||
myIconLabel->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) );
|
myIconLabel->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) );
|
||||||
@ -634,7 +647,7 @@ void SMESHGUI_HypothesisDlg::onHelp()
|
|||||||
#endif
|
#endif
|
||||||
SUIT_MessageBox::warning(this, tr("WRN_WARNING"),
|
SUIT_MessageBox::warning(this, tr("WRN_WARNING"),
|
||||||
tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
|
tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
|
||||||
arg(app->resourceMgr()->stringValue("ExternalBrowser",
|
arg(app->resourceMgr()->stringValue("ExternalBrowser",
|
||||||
platform)).
|
platform)).
|
||||||
arg(myHelpFileName));
|
arg(myHelpFileName));
|
||||||
}
|
}
|
||||||
@ -642,7 +655,7 @@ void SMESHGUI_HypothesisDlg::onHelp()
|
|||||||
|
|
||||||
void SMESHGUI_HypothesisDlg::setHIcon( const QPixmap& p )
|
void SMESHGUI_HypothesisDlg::setHIcon( const QPixmap& p )
|
||||||
{
|
{
|
||||||
myIconLabel->setPixmap( p );
|
myIconLabel->setPixmap( p );
|
||||||
}
|
}
|
||||||
|
|
||||||
void SMESHGUI_HypothesisDlg::setType( const QString& t )
|
void SMESHGUI_HypothesisDlg::setType( const QString& t )
|
||||||
@ -672,7 +685,7 @@ HypothesisData::HypothesisData( const QString& theTypeName,
|
|||||||
IconId( theIconId ),
|
IconId( theIconId ),
|
||||||
Dim( theDim ),
|
Dim( theDim ),
|
||||||
IsAux( theIsAux ),
|
IsAux( theIsAux ),
|
||||||
NeededHypos( theNeededHypos ),
|
NeededHypos( theNeededHypos ),
|
||||||
OptionalHypos( theOptionalHypos ),
|
OptionalHypos( theOptionalHypos ),
|
||||||
InputTypes( theInputTypes ),
|
InputTypes( theInputTypes ),
|
||||||
OutputTypes( theOutputTypes ),
|
OutputTypes( theOutputTypes ),
|
||||||
@ -681,7 +694,7 @@ HypothesisData::HypothesisData( const QString& theTypeName,
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
HypothesesSet::HypothesesSet( const QString& theSetName )
|
HypothesesSet::HypothesesSet( const QString& theSetName )
|
||||||
: myHypoSetName( theSetName ),
|
: myHypoSetName( theSetName ),
|
||||||
myIsAlgo( false )
|
myIsAlgo( false )
|
||||||
{
|
{
|
||||||
@ -690,8 +703,8 @@ HypothesesSet::HypothesesSet( const QString& theSetName )
|
|||||||
HypothesesSet::HypothesesSet( const QString& theSetName,
|
HypothesesSet::HypothesesSet( const QString& theSetName,
|
||||||
const QStringList& theHypoList,
|
const QStringList& theHypoList,
|
||||||
const QStringList& theAlgoList )
|
const QStringList& theAlgoList )
|
||||||
: myHypoSetName( theSetName ),
|
: myHypoSetName( theSetName ),
|
||||||
myHypoList( theHypoList ),
|
myHypoList( theHypoList ),
|
||||||
myAlgoList( theAlgoList ),
|
myAlgoList( theAlgoList ),
|
||||||
myIsAlgo( false )
|
myIsAlgo( false )
|
||||||
{
|
{
|
||||||
@ -747,4 +760,3 @@ QString HypothesesSet::current() const
|
|||||||
{
|
{
|
||||||
return list()->at(myIndex);
|
return list()->at(myIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,12 +19,11 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
|
// SMESH SMESHGUI : GUI for SMESH component
|
||||||
|
// File : SMESHGUI_MeshOp.cxx
|
||||||
|
// Author : Sergey LITONIN, Open CASCADE S.A.S.
|
||||||
|
|
||||||
// SMESH SMESHGUI : GUI for SMESH component
|
|
||||||
// File : SMESHGUI_MeshOp.cxx
|
|
||||||
// Author : Sergey LITONIN, Open CASCADE S.A.S.
|
|
||||||
// SMESH includes
|
// SMESH includes
|
||||||
//
|
|
||||||
#include "SMESHGUI_MeshOp.h"
|
#include "SMESHGUI_MeshOp.h"
|
||||||
|
|
||||||
#include "SMESHGUI.h"
|
#include "SMESHGUI.h"
|
||||||
@ -72,6 +71,10 @@
|
|||||||
#include <SALOMEconfig.h>
|
#include <SALOMEconfig.h>
|
||||||
#include CORBA_CLIENT_HEADER(SMESH_Gen)
|
#include CORBA_CLIENT_HEADER(SMESH_Gen)
|
||||||
|
|
||||||
|
//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
|
||||||
|
|
||||||
//================================================================================
|
//================================================================================
|
||||||
/*!
|
/*!
|
||||||
* \brief Constructor
|
* \brief Constructor
|
||||||
@ -280,7 +283,6 @@ SUIT_SelectionFilter* SMESHGUI_MeshOp::createFilter( const int theId ) const
|
|||||||
* \retval bool - check result
|
* \retval bool - check result
|
||||||
*/
|
*/
|
||||||
//================================================================================
|
//================================================================================
|
||||||
|
|
||||||
bool SMESHGUI_MeshOp::isSubshapeOk() const
|
bool SMESHGUI_MeshOp::isSubshapeOk() const
|
||||||
{
|
{
|
||||||
if ( !myToCreate || myIsMesh ) // not submesh creation
|
if ( !myToCreate || myIsMesh ) // not submesh creation
|
||||||
@ -343,11 +345,10 @@ bool SMESHGUI_MeshOp::isSubshapeOk() const
|
|||||||
//================================================================================
|
//================================================================================
|
||||||
/*!
|
/*!
|
||||||
* \brief Return name of the algorithm that does not support submeshes and makes
|
* \brief Return name of the algorithm that does not support submeshes and makes
|
||||||
* submesh creation useless
|
* submesh creation useless
|
||||||
* \retval char* - string is to be deleted!!!
|
* \retval char* - string is to be deleted!!!
|
||||||
*/
|
*/
|
||||||
//================================================================================
|
//================================================================================
|
||||||
|
|
||||||
char* SMESHGUI_MeshOp::isSubmeshIgnored() const
|
char* SMESHGUI_MeshOp::isSubmeshIgnored() const
|
||||||
{
|
{
|
||||||
if ( myToCreate && !myIsMesh ) {
|
if ( myToCreate && !myIsMesh ) {
|
||||||
@ -393,7 +394,6 @@ char* SMESHGUI_MeshOp::isSubmeshIgnored() const
|
|||||||
* \retval _PTR(SObject) - the found submesh SObject
|
* \retval _PTR(SObject) - the found submesh SObject
|
||||||
*/
|
*/
|
||||||
//================================================================================
|
//================================================================================
|
||||||
|
|
||||||
_PTR(SObject) SMESHGUI_MeshOp::getSubmeshByGeom() const
|
_PTR(SObject) SMESHGUI_MeshOp::getSubmeshByGeom() const
|
||||||
{
|
{
|
||||||
QString aMeshEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Mesh );
|
QString aMeshEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Mesh );
|
||||||
@ -581,7 +581,7 @@ void SMESHGUI_MeshOp::selectionDone()
|
|||||||
bool editSubmesh = ( !sm->_is_nil() &&
|
bool editSubmesh = ( !sm->_is_nil() &&
|
||||||
SUIT_MessageBox::question( myDlg, tr( "SMESH_WARNING" ),
|
SUIT_MessageBox::question( myDlg, tr( "SMESH_WARNING" ),
|
||||||
tr( "EDIT_SUBMESH_QUESTION"),
|
tr( "EDIT_SUBMESH_QUESTION"),
|
||||||
SUIT_MessageBox::Yes |
|
SUIT_MessageBox::Yes |
|
||||||
SUIT_MessageBox::No,
|
SUIT_MessageBox::No,
|
||||||
SUIT_MessageBox::No )
|
SUIT_MessageBox::No )
|
||||||
== SUIT_MessageBox::Yes );
|
== SUIT_MessageBox::Yes );
|
||||||
@ -743,7 +743,6 @@ bool SMESHGUI_MeshOp::isValid( QString& theMess ) const
|
|||||||
* \retval bool - check result
|
* \retval bool - check result
|
||||||
*/
|
*/
|
||||||
//================================================================================
|
//================================================================================
|
||||||
|
|
||||||
static bool isCompatible(const HypothesisData* theAlgoData,
|
static bool isCompatible(const HypothesisData* theAlgoData,
|
||||||
const HypothesisData* theHypData,
|
const HypothesisData* theHypData,
|
||||||
const int theHypType)
|
const int theHypType)
|
||||||
@ -886,7 +885,6 @@ void SMESHGUI_MeshOp::existingHyps( const int theDim,
|
|||||||
* \retval SMESH::SMESH_Hypothesis_var - the hypothesis holding parameter values
|
* \retval SMESH::SMESH_Hypothesis_var - the hypothesis holding parameter values
|
||||||
*/
|
*/
|
||||||
//================================================================================
|
//================================================================================
|
||||||
|
|
||||||
SMESH::SMESH_Hypothesis_var
|
SMESH::SMESH_Hypothesis_var
|
||||||
SMESHGUI_MeshOp::getInitParamsHypothesis( const QString& aHypType,
|
SMESHGUI_MeshOp::getInitParamsHypothesis( const QString& aHypType,
|
||||||
const QString& aServerLib ) const
|
const QString& aServerLib ) const
|
||||||
@ -972,7 +970,6 @@ SMESHGUI_MeshOp::getInitParamsHypothesis( const QString& aHypType,
|
|||||||
* \retval int - dimention
|
* \retval int - dimention
|
||||||
*/
|
*/
|
||||||
//================================================================================
|
//================================================================================
|
||||||
|
|
||||||
static int getTabDim (const QObject* tab, SMESHGUI_MeshDlg* dlg )
|
static int getTabDim (const QObject* tab, SMESHGUI_MeshDlg* dlg )
|
||||||
{
|
{
|
||||||
int aDim = -1;
|
int aDim = -1;
|
||||||
@ -1030,7 +1027,6 @@ namespace
|
|||||||
* \param theTypeName - specifies hypothesis to be created
|
* \param theTypeName - specifies hypothesis to be created
|
||||||
*/
|
*/
|
||||||
//================================================================================
|
//================================================================================
|
||||||
|
|
||||||
void SMESHGUI_MeshOp::createHypothesis(const int theDim,
|
void SMESHGUI_MeshOp::createHypothesis(const int theDim,
|
||||||
const int theType,
|
const int theType,
|
||||||
const QString& theTypeName)
|
const QString& theTypeName)
|
||||||
@ -1064,7 +1060,12 @@ void SMESHGUI_MeshOp::createHypothesis(const int theDim,
|
|||||||
QString aClientLibName = aData->ClientLibName;
|
QString aClientLibName = aData->ClientLibName;
|
||||||
if (aClientLibName == "") {
|
if (aClientLibName == "") {
|
||||||
// Call hypothesis creation server method (without GUI)
|
// Call hypothesis creation server method (without GUI)
|
||||||
SMESH::CreateHypothesis(theTypeName, aHypName, false);
|
SMESH::SMESH_Hypothesis_var aHyp =
|
||||||
|
SMESH::CreateHypothesis(theTypeName, aHypName, false);
|
||||||
|
#ifdef WITHGENERICOBJ
|
||||||
|
if (!CORBA::is_nil(aHyp))
|
||||||
|
aHyp->Destroy();
|
||||||
|
#endif
|
||||||
} else {
|
} else {
|
||||||
// Get hypotheses creator client (GUI)
|
// Get hypotheses creator client (GUI)
|
||||||
// BUG 0020378
|
// BUG 0020378
|
||||||
@ -1086,13 +1087,13 @@ void SMESHGUI_MeshOp::createHypothesis(const int theDim,
|
|||||||
aGeomEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Geom );
|
aGeomEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Geom );
|
||||||
aMeshEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Mesh );
|
aMeshEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Mesh );
|
||||||
anObjEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Obj );
|
anObjEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Obj );
|
||||||
|
|
||||||
if ( aMeshEntry != "" ) { // Get Geom object from Mesh
|
if ( aMeshEntry != "" ) { // Get Geom object from Mesh
|
||||||
_PTR(SObject) pObj = studyDS()->FindObjectID( aMeshEntry.toLatin1().data() );
|
_PTR(SObject) pObj = studyDS()->FindObjectID( aMeshEntry.toLatin1().data() );
|
||||||
GEOM::GEOM_Object_var aGeomVar = SMESH::GetShapeOnMeshOrSubMesh( pObj );
|
GEOM::GEOM_Object_var aGeomVar = SMESH::GetShapeOnMeshOrSubMesh( pObj );
|
||||||
aMeshEntry = ( aGeomVar->_is_nil() ) ? "" : aMeshEntry = aGeomVar->GetStudyEntry();
|
aMeshEntry = ( aGeomVar->_is_nil() ) ? "" : aMeshEntry = aGeomVar->GetStudyEntry();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( aMeshEntry == "" && aGeomEntry == "" ) {
|
if ( aMeshEntry == "" && aGeomEntry == "" ) {
|
||||||
_PTR(SObject) pObj = studyDS()->FindObjectID( anObjEntry.toLatin1().data() );
|
_PTR(SObject) pObj = studyDS()->FindObjectID( anObjEntry.toLatin1().data() );
|
||||||
GEOM::GEOM_Object_var aGeomVar = SMESH::GetShapeOnMeshOrSubMesh( pObj );
|
GEOM::GEOM_Object_var aGeomVar = SMESH::GetShapeOnMeshOrSubMesh( pObj );
|
||||||
@ -1117,7 +1118,7 @@ void SMESHGUI_MeshOp::createHypothesis(const int theDim,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
aCreator->setShapeEntry( aGeomEntry );
|
aCreator->setShapeEntry( aGeomEntry );
|
||||||
if ( aMeshEntry != "" )
|
if ( aMeshEntry != "" )
|
||||||
aCreator->setMainShapeEntry( aMeshEntry );
|
aCreator->setMainShapeEntry( aMeshEntry );
|
||||||
@ -1125,8 +1126,14 @@ void SMESHGUI_MeshOp::createHypothesis(const int theDim,
|
|||||||
aCreator->create(initParamHyp, aHypName, myDlg, this, SLOT( onHypoCreated( int ) ) );
|
aCreator->create(initParamHyp, aHypName, myDlg, this, SLOT( onHypoCreated( int ) ) );
|
||||||
dialog = true;
|
dialog = true;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
SMESH::CreateHypothesis(theTypeName, aHypName, false);
|
SMESH::SMESH_Hypothesis_var aHyp =
|
||||||
|
SMESH::CreateHypothesis(theTypeName, aHypName, false);
|
||||||
|
#ifdef WITHGENERICOBJ
|
||||||
|
if (!CORBA::is_nil(aHyp))
|
||||||
|
aHyp->Destroy();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !dialog )
|
if( !dialog )
|
||||||
@ -1274,7 +1281,6 @@ void SMESHGUI_MeshOp::onHypoEdited( int result )
|
|||||||
* \retval HypothesisData* - result data, may be 0
|
* \retval HypothesisData* - result data, may be 0
|
||||||
*/
|
*/
|
||||||
//================================================================================
|
//================================================================================
|
||||||
|
|
||||||
HypothesisData* SMESHGUI_MeshOp::hypData( const int theDim,
|
HypothesisData* SMESHGUI_MeshOp::hypData( const int theDim,
|
||||||
const int theHypType,
|
const int theHypType,
|
||||||
const int theIndex)
|
const int theIndex)
|
||||||
@ -1292,7 +1298,6 @@ HypothesisData* SMESHGUI_MeshOp::hypData( const int theDim,
|
|||||||
* \param theIndex - algorithm index
|
* \param theIndex - algorithm index
|
||||||
*/
|
*/
|
||||||
//================================================================================
|
//================================================================================
|
||||||
|
|
||||||
void SMESHGUI_MeshOp::onAlgoSelected( const int theIndex,
|
void SMESHGUI_MeshOp::onAlgoSelected( const int theIndex,
|
||||||
const int theDim )
|
const int theDim )
|
||||||
{
|
{
|
||||||
@ -1588,7 +1593,13 @@ bool SMESHGUI_MeshOp::createMesh( QString& theMess )
|
|||||||
if ( !anAlgoVar->_is_nil() )
|
if ( !anAlgoVar->_is_nil() )
|
||||||
SMESH::AddHypothesisOnMesh( aMeshVar, anAlgoVar );
|
SMESH::AddHypothesisOnMesh( aMeshVar, anAlgoVar );
|
||||||
}
|
}
|
||||||
|
#ifdef WITHGENERICOBJ
|
||||||
|
// obj has been published in study. Its refcount has been incremented.
|
||||||
|
// It is safe to decrement its refcount
|
||||||
|
// so that it will be destroyed when the entry in study will be removed
|
||||||
|
if (aMeshSO)
|
||||||
|
aMeshVar->Destroy();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -1676,7 +1687,7 @@ bool SMESHGUI_MeshOp::createSubMesh( QString& theMess )
|
|||||||
QString aNewGeomGroupName ("Auto_group_for_");
|
QString aNewGeomGroupName ("Auto_group_for_");
|
||||||
aNewGeomGroupName += aName;
|
aNewGeomGroupName += aName;
|
||||||
SALOMEDS::SObject_var aNewGroupSO =
|
SALOMEDS::SObject_var aNewGroupSO =
|
||||||
geomGen->AddInStudy(aSMESHGen->GetCurrentStudy(), aGeomVar,
|
geomGen->AddInStudy(aSMESHGen->GetCurrentStudy(), aGeomVar,
|
||||||
aNewGeomGroupName.toLatin1().data(), mainGeom);
|
aNewGeomGroupName.toLatin1().data(), mainGeom);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1846,7 +1857,12 @@ SMESH::SMESH_Hypothesis_var SMESHGUI_MeshOp::getAlgo( const int theDim )
|
|||||||
if (aClientLibName == "")
|
if (aClientLibName == "")
|
||||||
{
|
{
|
||||||
// Call hypothesis creation server method (without GUI)
|
// Call hypothesis creation server method (without GUI)
|
||||||
SMESH::CreateHypothesis(aHypName, aHypData->Label, true);
|
SMESH::SMESH_Hypothesis_var aHyp =
|
||||||
|
SMESH::CreateHypothesis(aHypName, aHypData->Label, true);
|
||||||
|
#ifdef WITHGENERICOBJ
|
||||||
|
if (!CORBA::is_nil(aHyp))
|
||||||
|
aHyp->Destroy();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1858,8 +1874,14 @@ SMESH::SMESH_Hypothesis_var SMESHGUI_MeshOp::getAlgo( const int theDim )
|
|||||||
// Create algorithm
|
// Create algorithm
|
||||||
if (aCreator)
|
if (aCreator)
|
||||||
aCreator->create(true, aHypName, myDlg, 0, QString::null );
|
aCreator->create(true, aHypName, myDlg, 0, QString::null );
|
||||||
else
|
else {
|
||||||
SMESH::CreateHypothesis(aHypName, aHypData->Label, true);
|
SMESH::SMESH_Hypothesis_var aHyp =
|
||||||
|
SMESH::CreateHypothesis(aHypName, aHypData->Label, true);
|
||||||
|
#ifdef WITHGENERICOBJ
|
||||||
|
if (!CORBA::is_nil(aHyp))
|
||||||
|
aHyp->Destroy();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
QStringList tmpList;
|
QStringList tmpList;
|
||||||
_PTR(SComponent) aFather = SMESH::GetActiveStudyDocument()->FindComponent( "SMESH" );
|
_PTR(SComponent) aFather = SMESH::GetActiveStudyDocument()->FindComponent( "SMESH" );
|
||||||
@ -2160,14 +2182,14 @@ bool SMESHGUI_MeshOp::editMeshOrSubMesh( QString& theMess )
|
|||||||
//================================================================================
|
//================================================================================
|
||||||
/*!
|
/*!
|
||||||
* \brief Verifies whether given operator is valid for this one
|
* \brief Verifies whether given operator is valid for this one
|
||||||
* \param theOtherOp - other operation
|
* \param theOtherOp - other operation
|
||||||
* \return Returns TRUE if the given operator is valid for this one, FALSE otherwise
|
* \return Returns TRUE if the given operator is valid for this one, FALSE otherwise
|
||||||
*
|
*
|
||||||
* method redefined from base class verifies whether given operator is valid for
|
* method redefined from base class verifies whether given operator is valid for
|
||||||
* this one (i.e. can be started "above" this operator). In current implementation method
|
* this one (i.e. can be started "above" this operator). In current implementation method
|
||||||
* retuns false if theOtherOp operation is not intended for deleting objects or mesh
|
* retuns false if theOtherOp operation is not intended for deleting objects or mesh
|
||||||
* elements.
|
* elements.
|
||||||
*/
|
*/
|
||||||
//================================================================================
|
//================================================================================
|
||||||
bool SMESHGUI_MeshOp::isValid( SUIT_Operation* theOp ) const
|
bool SMESHGUI_MeshOp::isValid( SUIT_Operation* theOp ) const
|
||||||
{
|
{
|
||||||
@ -2177,10 +2199,9 @@ bool SMESHGUI_MeshOp::isValid( SUIT_Operation* theOp ) const
|
|||||||
//================================================================================
|
//================================================================================
|
||||||
/*!
|
/*!
|
||||||
* \brief SLOT. Is called when the user selects a way of geometry selection
|
* \brief SLOT. Is called when the user selects a way of geometry selection
|
||||||
* \param theByMesh - true if the user wants to find geometry by mesh element
|
* \param theByMesh - true if the user wants to find geometry by mesh element
|
||||||
*/
|
*/
|
||||||
//================================================================================
|
//================================================================================
|
||||||
|
|
||||||
void SMESHGUI_MeshOp::onGeomSelectionByMesh( bool theByMesh )
|
void SMESHGUI_MeshOp::onGeomSelectionByMesh( bool theByMesh )
|
||||||
{
|
{
|
||||||
if ( theByMesh ) {
|
if ( theByMesh ) {
|
||||||
@ -2212,7 +2233,6 @@ void SMESHGUI_MeshOp::onGeomSelectionByMesh( bool theByMesh )
|
|||||||
* \brief SLOT. Is called when Ok is pressed in SMESHGUI_ShapeByMeshDlg
|
* \brief SLOT. Is called when Ok is pressed in SMESHGUI_ShapeByMeshDlg
|
||||||
*/
|
*/
|
||||||
//================================================================================
|
//================================================================================
|
||||||
|
|
||||||
void SMESHGUI_MeshOp::onPublishShapeByMeshDlg(SUIT_Operation* op)
|
void SMESHGUI_MeshOp::onPublishShapeByMeshDlg(SUIT_Operation* op)
|
||||||
{
|
{
|
||||||
if ( myShapeByMeshOp == op ) {
|
if ( myShapeByMeshOp == op ) {
|
||||||
@ -2236,7 +2256,6 @@ void SMESHGUI_MeshOp::onPublishShapeByMeshDlg(SUIT_Operation* op)
|
|||||||
* \brief SLOT. Is called when Close is pressed in SMESHGUI_ShapeByMeshDlg
|
* \brief SLOT. Is called when Close is pressed in SMESHGUI_ShapeByMeshDlg
|
||||||
*/
|
*/
|
||||||
//================================================================================
|
//================================================================================
|
||||||
|
|
||||||
void SMESHGUI_MeshOp::onCloseShapeByMeshDlg(SUIT_Operation* op)
|
void SMESHGUI_MeshOp::onCloseShapeByMeshDlg(SUIT_Operation* op)
|
||||||
{
|
{
|
||||||
if ( myShapeByMeshOp == op && myDlg ) {
|
if ( myShapeByMeshOp == op && myDlg ) {
|
||||||
@ -2247,10 +2266,9 @@ void SMESHGUI_MeshOp::onCloseShapeByMeshDlg(SUIT_Operation* op)
|
|||||||
//================================================================================
|
//================================================================================
|
||||||
/*!
|
/*!
|
||||||
* \brief Selects a SObject
|
* \brief Selects a SObject
|
||||||
* \param theSObj - the SObject to select
|
* \param theSObj - the SObject to select
|
||||||
*/
|
*/
|
||||||
//================================================================================
|
//================================================================================
|
||||||
|
|
||||||
void SMESHGUI_MeshOp::selectObject( _PTR(SObject) theSObj ) const
|
void SMESHGUI_MeshOp::selectObject( _PTR(SObject) theSObj ) const
|
||||||
{
|
{
|
||||||
if ( LightApp_SelectionMgr* sm = selectionMgr() ) {
|
if ( LightApp_SelectionMgr* sm = selectionMgr() ) {
|
||||||
|
@ -19,12 +19,11 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
|
// SMESH SMESHGUI : GUI for SMESH component
|
||||||
|
// File : SMESHGUI_RotationDlg.cxx
|
||||||
|
// Author : Michael ZORIN, Open CASCADE S.A.S.
|
||||||
|
// SMESH includes
|
||||||
|
|
||||||
// SMESH SMESHGUI : GUI for SMESH component
|
|
||||||
// File : SMESHGUI_RotationDlg.cxx
|
|
||||||
// Author : Michael ZORIN, Open CASCADE S.A.S.
|
|
||||||
// SMESH includes
|
|
||||||
//
|
|
||||||
#include "SMESHGUI_RotationDlg.h"
|
#include "SMESHGUI_RotationDlg.h"
|
||||||
|
|
||||||
#include "SMESHGUI.h"
|
#include "SMESHGUI.h"
|
||||||
@ -84,6 +83,10 @@ enum { MOVE_ELEMS_BUTTON = 0, COPY_ELEMS_BUTTON, MAKE_MESH_BUTTON }; //!< action
|
|||||||
#define SPACING 8
|
#define SPACING 8
|
||||||
#define MARGIN 11
|
#define MARGIN 11
|
||||||
|
|
||||||
|
//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
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// class : SMESHGUI_RotationDlg()
|
// class : SMESHGUI_RotationDlg()
|
||||||
// purpose :
|
// purpose :
|
||||||
@ -430,22 +433,31 @@ bool SMESHGUI_RotationDlg::ClickOnApply()
|
|||||||
else {
|
else {
|
||||||
if(CheckBoxMesh->isChecked())
|
if(CheckBoxMesh->isChecked())
|
||||||
aMeshEditor->RotateObject(mySelectedObject, anAxis, anAngle, true);
|
aMeshEditor->RotateObject(mySelectedObject, anAxis, anAngle, true);
|
||||||
else
|
else
|
||||||
aMeshEditor->Rotate(anElementsId, anAxis, anAngle, true);
|
aMeshEditor->Rotate(anElementsId, anAxis, anAngle, true);
|
||||||
}
|
}
|
||||||
if( !myMesh->_is_nil())
|
if( !myMesh->_is_nil())
|
||||||
myMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
|
myMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
|
||||||
break;
|
break;
|
||||||
case MAKE_MESH_BUTTON:
|
case MAKE_MESH_BUTTON: {
|
||||||
SMESH::SMESH_Mesh_var mesh;
|
SMESH::SMESH_Mesh_var mesh;
|
||||||
if(CheckBoxMesh->isChecked())
|
if (CheckBoxMesh->isChecked())
|
||||||
mesh = aMeshEditor->RotateObjectMakeMesh(mySelectedObject, anAxis, anAngle, makeGroups,
|
mesh = aMeshEditor->RotateObjectMakeMesh(mySelectedObject, anAxis, anAngle, makeGroups,
|
||||||
LineEditNewMesh->text().toLatin1().data());
|
LineEditNewMesh->text().toLatin1().data());
|
||||||
else
|
else
|
||||||
mesh = aMeshEditor->RotateMakeMesh(anElementsId, anAxis, anAngle, makeGroups,
|
mesh = aMeshEditor->RotateMakeMesh(anElementsId, anAxis, anAngle, makeGroups,
|
||||||
LineEditNewMesh->text().toLatin1().data());
|
LineEditNewMesh->text().toLatin1().data());
|
||||||
if( !mesh->_is_nil())
|
if (!mesh->_is_nil()) {
|
||||||
mesh->SetParameters( aParameters.join(":").toLatin1().constData() );
|
mesh->SetParameters(aParameters.join(":").toLatin1().constData());
|
||||||
|
#ifdef WITHGENERICOBJ
|
||||||
|
// obj has been published in study. Its refcount has been incremented.
|
||||||
|
// It is safe to decrement its refcount
|
||||||
|
// so that it will be destroyed when the entry in study will be removed
|
||||||
|
mesh->Destroy();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
}
|
}
|
||||||
@ -500,7 +512,7 @@ void SMESHGUI_RotationDlg::ClickOnCancel()
|
|||||||
void SMESHGUI_RotationDlg::ClickOnHelp()
|
void SMESHGUI_RotationDlg::ClickOnHelp()
|
||||||
{
|
{
|
||||||
LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
|
LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
|
||||||
if (app)
|
if (app)
|
||||||
app->onHelpContextModule(mySMESHGUI ? app->moduleName(mySMESHGUI->moduleName()) : QString(""), myHelpFileName);
|
app->onHelpContextModule(mySMESHGUI ? app->moduleName(mySMESHGUI->moduleName()) : QString(""), myHelpFileName);
|
||||||
else {
|
else {
|
||||||
QString platform;
|
QString platform;
|
||||||
@ -542,9 +554,9 @@ void SMESHGUI_RotationDlg::onTextChange (const QString& theNewText)
|
|||||||
if (aMesh) {
|
if (aMesh) {
|
||||||
if (send == LineEditElements) {
|
if (send == LineEditElements) {
|
||||||
Handle(SALOME_InteractiveObject) anIO = myActor->getIO();
|
Handle(SALOME_InteractiveObject) anIO = myActor->getIO();
|
||||||
|
|
||||||
TColStd_MapOfInteger newIndices;
|
TColStd_MapOfInteger newIndices;
|
||||||
|
|
||||||
QStringList aListId = theNewText.split(" ", QString::SkipEmptyParts);
|
QStringList aListId = theNewText.split(" ", QString::SkipEmptyParts);
|
||||||
for (int i = 0; i < aListId.count(); i++) {
|
for (int i = 0; i < aListId.count(); i++) {
|
||||||
const SMDS_MeshElement * e = aMesh->FindElement(aListId[ i ].toInt());
|
const SMDS_MeshElement * e = aMesh->FindElement(aListId[ i ].toInt());
|
||||||
@ -556,7 +568,7 @@ void SMESHGUI_RotationDlg::onTextChange (const QString& theNewText)
|
|||||||
mySelector->AddOrRemoveIndex( anIO, newIndices, false );
|
mySelector->AddOrRemoveIndex( anIO, newIndices, false );
|
||||||
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
||||||
aViewWindow->highlight( anIO, true, true );
|
aViewWindow->highlight( anIO, true, true );
|
||||||
|
|
||||||
myElementsId = theNewText;
|
myElementsId = theNewText;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -649,7 +661,7 @@ void SMESHGUI_RotationDlg::SelectionIntoArgument()
|
|||||||
} else if (!SMESH::IObjectToInterface<SMESH::SMESH_subMesh>(IO)->_is_nil()) { //SUBMESH
|
} else if (!SMESH::IObjectToInterface<SMESH::SMESH_subMesh>(IO)->_is_nil()) { //SUBMESH
|
||||||
// get submesh
|
// get submesh
|
||||||
SMESH::SMESH_subMesh_var aSubMesh = SMESH::IObjectToInterface<SMESH::SMESH_subMesh>(IO);
|
SMESH::SMESH_subMesh_var aSubMesh = SMESH::IObjectToInterface<SMESH::SMESH_subMesh>(IO);
|
||||||
|
|
||||||
// get IDs from submesh
|
// get IDs from submesh
|
||||||
SMESH::long_array_var anElementsIds = new SMESH::long_array;
|
SMESH::long_array_var anElementsIds = new SMESH::long_array;
|
||||||
anElementsIds = aSubMesh->GetElementsId();
|
anElementsIds = aSubMesh->GetElementsId();
|
||||||
@ -715,7 +727,7 @@ void SMESHGUI_RotationDlg::SelectionIntoArgument()
|
|||||||
LineEditElements->setText(aString);
|
LineEditElements->setText(aString);
|
||||||
LineEditElements->repaint();
|
LineEditElements->repaint();
|
||||||
LineEditElements->setEnabled(false); // to update lineedit IPAL 19809
|
LineEditElements->setEnabled(false); // to update lineedit IPAL 19809
|
||||||
LineEditElements->setEnabled(true);
|
LineEditElements->setEnabled(true);
|
||||||
setNewMeshName();
|
setNewMeshName();
|
||||||
}
|
}
|
||||||
myBusy = false;
|
myBusy = false;
|
||||||
|
@ -16,12 +16,11 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
|
// SMESH SMESHGUI : GUI for SMESH component
|
||||||
|
// File : SMESHGUI_ScaleDlg.cxx
|
||||||
|
// Author : Michael ZORIN, Open CASCADE S.A.S.
|
||||||
|
// SMESH includes
|
||||||
|
|
||||||
// SMESH SMESHGUI : GUI for SMESH component
|
|
||||||
// File : SMESHGUI_ScaleDlg.cxx
|
|
||||||
// Author : Michael ZORIN, Open CASCADE S.A.S.
|
|
||||||
// SMESH includes
|
|
||||||
//
|
|
||||||
#include "SMESHGUI_ScaleDlg.h"
|
#include "SMESHGUI_ScaleDlg.h"
|
||||||
|
|
||||||
#include "SMESHGUI.h"
|
#include "SMESHGUI.h"
|
||||||
@ -99,6 +98,10 @@ private:
|
|||||||
#define SPACING 6
|
#define SPACING 6
|
||||||
#define MARGIN 11
|
#define MARGIN 11
|
||||||
|
|
||||||
|
//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
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// class : SMESHGUI_ScaleDlg()
|
// class : SMESHGUI_ScaleDlg()
|
||||||
// purpose :
|
// purpose :
|
||||||
@ -481,7 +484,7 @@ bool SMESHGUI_ScaleDlg::ClickOnApply()
|
|||||||
break;
|
break;
|
||||||
case COPY_ELEMS_BUTTON:
|
case COPY_ELEMS_BUTTON:
|
||||||
if ( makeGroups ) {
|
if ( makeGroups ) {
|
||||||
SMESH::ListOfGroups_var groups;
|
SMESH::ListOfGroups_var groups;
|
||||||
if(CheckBoxMesh->isChecked()) {
|
if(CheckBoxMesh->isChecked()) {
|
||||||
groups = aMeshEditor->ScaleMakeGroups(mySelectedObject, aPoint, aScaleFact);
|
groups = aMeshEditor->ScaleMakeGroups(mySelectedObject, aPoint, aScaleFact);
|
||||||
}
|
}
|
||||||
@ -502,9 +505,9 @@ bool SMESHGUI_ScaleDlg::ClickOnApply()
|
|||||||
if( !myMesh->_is_nil())
|
if( !myMesh->_is_nil())
|
||||||
myMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
|
myMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
|
||||||
break;
|
break;
|
||||||
case MAKE_MESH_BUTTON:
|
case MAKE_MESH_BUTTON: {
|
||||||
SMESH::SMESH_Mesh_var mesh;
|
SMESH::SMESH_Mesh_var mesh;
|
||||||
if(CheckBoxMesh->isChecked()) {
|
if (CheckBoxMesh->isChecked()) {
|
||||||
mesh = aMeshEditor->ScaleMakeMesh(mySelectedObject, aPoint, aScaleFact, makeGroups,
|
mesh = aMeshEditor->ScaleMakeMesh(mySelectedObject, aPoint, aScaleFact, makeGroups,
|
||||||
LineEditNewMesh->text().toLatin1().data());
|
LineEditNewMesh->text().toLatin1().data());
|
||||||
}
|
}
|
||||||
@ -513,12 +516,21 @@ bool SMESHGUI_ScaleDlg::ClickOnApply()
|
|||||||
aPoint, aScaleFact, makeGroups,
|
aPoint, aScaleFact, makeGroups,
|
||||||
LineEditNewMesh->text().toLatin1().data());
|
LineEditNewMesh->text().toLatin1().data());
|
||||||
}
|
}
|
||||||
if( !mesh->_is_nil())
|
if (!mesh->_is_nil()) {
|
||||||
mesh->SetParameters( aParameters.join(":").toLatin1().constData() );
|
mesh->SetParameters(aParameters.join(":").toLatin1().constData());
|
||||||
|
#ifdef WITHGENERICOBJ
|
||||||
|
// obj has been published in study. Its refcount has been incremented.
|
||||||
|
// It is safe to decrement its refcount
|
||||||
|
// so that it will be destroyed when the entry in study will be removed
|
||||||
|
mesh->Destroy();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
}
|
}
|
||||||
|
|
||||||
SMESH::UpdateView();
|
SMESH::UpdateView();
|
||||||
if ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() ||
|
if ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() ||
|
||||||
actionButton == MAKE_MESH_BUTTON )
|
actionButton == MAKE_MESH_BUTTON )
|
||||||
@ -530,7 +542,7 @@ bool SMESHGUI_ScaleDlg::ClickOnApply()
|
|||||||
|
|
||||||
SMESHGUI::Modified();
|
SMESHGUI::Modified();
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -570,7 +582,7 @@ void SMESHGUI_ScaleDlg::ClickOnCancel()
|
|||||||
void SMESHGUI_ScaleDlg::ClickOnHelp()
|
void SMESHGUI_ScaleDlg::ClickOnHelp()
|
||||||
{
|
{
|
||||||
LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
|
LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
|
||||||
if (app)
|
if (app)
|
||||||
app->onHelpContextModule(mySMESHGUI ? app->moduleName(mySMESHGUI->moduleName()) : QString(""), myHelpFileName);
|
app->onHelpContextModule(mySMESHGUI ? app->moduleName(mySMESHGUI->moduleName()) : QString(""), myHelpFileName);
|
||||||
else {
|
else {
|
||||||
QString platform;
|
QString platform;
|
||||||
@ -581,7 +593,7 @@ void SMESHGUI_ScaleDlg::ClickOnHelp()
|
|||||||
#endif
|
#endif
|
||||||
SUIT_MessageBox::warning(this, tr("WRN_WARNING"),
|
SUIT_MessageBox::warning(this, tr("WRN_WARNING"),
|
||||||
tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
|
tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
|
||||||
arg(app->resourceMgr()->stringValue("ExternalBrowser",
|
arg(app->resourceMgr()->stringValue("ExternalBrowser",
|
||||||
platform)).
|
platform)).
|
||||||
arg(myHelpFileName));
|
arg(myHelpFileName));
|
||||||
}
|
}
|
||||||
@ -611,7 +623,7 @@ void SMESHGUI_ScaleDlg::onTextChange (const QString& theNewText)
|
|||||||
|
|
||||||
if (aMesh) {
|
if (aMesh) {
|
||||||
Handle(SALOME_InteractiveObject) anIO = myActor->getIO();
|
Handle(SALOME_InteractiveObject) anIO = myActor->getIO();
|
||||||
|
|
||||||
TColStd_MapOfInteger newIndices;
|
TColStd_MapOfInteger newIndices;
|
||||||
|
|
||||||
QStringList aListId = theNewText.split(" ", QString::SkipEmptyParts);
|
QStringList aListId = theNewText.split(" ", QString::SkipEmptyParts);
|
||||||
@ -628,7 +640,7 @@ void SMESHGUI_ScaleDlg::onTextChange (const QString& theNewText)
|
|||||||
mySelector->AddOrRemoveIndex( anIO, newIndices, false );
|
mySelector->AddOrRemoveIndex( anIO, newIndices, false );
|
||||||
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
||||||
aViewWindow->highlight( anIO, true, true );
|
aViewWindow->highlight( anIO, true, true );
|
||||||
|
|
||||||
myElementsId = theNewText;
|
myElementsId = theNewText;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -745,7 +757,7 @@ void SMESHGUI_ScaleDlg::SelectionIntoArgument()
|
|||||||
aNbUnits = SMESH::GetNameOfSelectedElements(mySelector, IO, aString);
|
aNbUnits = SMESH::GetNameOfSelectedElements(mySelector, IO, aString);
|
||||||
myElementsId = aString;
|
myElementsId = aString;
|
||||||
if (aNbUnits < 1)
|
if (aNbUnits < 1)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
myNbOkElements = true;
|
myNbOkElements = true;
|
||||||
@ -782,7 +794,7 @@ void SMESHGUI_ScaleDlg::SelectionIntoArgument()
|
|||||||
LineEditElements->setText(aString);
|
LineEditElements->setText(aString);
|
||||||
LineEditElements->repaint();
|
LineEditElements->repaint();
|
||||||
LineEditElements->setEnabled(false); // to fully update lineedit IPAL 19809
|
LineEditElements->setEnabled(false); // to fully update lineedit IPAL 19809
|
||||||
LineEditElements->setEnabled(true);
|
LineEditElements->setEnabled(true);
|
||||||
setNewMeshName();
|
setNewMeshName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,12 +19,11 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
|
// SMESH SMESHGUI : GUI for SMESH component
|
||||||
|
// File : SMESHGUI_SymmetryDlg.cxx
|
||||||
|
// Author : Michael ZORIN, Open CASCADE S.A.S.
|
||||||
|
// SMESH includes
|
||||||
|
|
||||||
// SMESH SMESHGUI : GUI for SMESH component
|
|
||||||
// File : SMESHGUI_SymmetryDlg.cxx
|
|
||||||
// Author : Michael ZORIN, Open CASCADE S.A.S.
|
|
||||||
// SMESH includes
|
|
||||||
//
|
|
||||||
#include "SMESHGUI_SymmetryDlg.h"
|
#include "SMESHGUI_SymmetryDlg.h"
|
||||||
|
|
||||||
#include "SMESHGUI.h"
|
#include "SMESHGUI.h"
|
||||||
@ -84,6 +83,10 @@ enum { MOVE_ELEMS_BUTTON = 0, COPY_ELEMS_BUTTON, MAKE_MESH_BUTTON }; //!< action
|
|||||||
#define SPACING 6
|
#define SPACING 6
|
||||||
#define MARGIN 11
|
#define MARGIN 11
|
||||||
|
|
||||||
|
//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
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// class : SMESHGUI_SymmetryDlg()
|
// class : SMESHGUI_SymmetryDlg()
|
||||||
// purpose :
|
// purpose :
|
||||||
@ -500,7 +503,7 @@ bool SMESHGUI_SymmetryDlg::ClickOnApply()
|
|||||||
aMeshEditor->MirrorObject(mySelectedObject, aMirror, aMirrorType, false );
|
aMeshEditor->MirrorObject(mySelectedObject, aMirror, aMirrorType, false );
|
||||||
else
|
else
|
||||||
aMeshEditor->Mirror(anElementsId, aMirror, aMirrorType, false );
|
aMeshEditor->Mirror(anElementsId, aMirror, aMirrorType, false );
|
||||||
|
|
||||||
if( !myMesh->_is_nil())
|
if( !myMesh->_is_nil())
|
||||||
myMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
|
myMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
|
||||||
break;
|
break;
|
||||||
@ -525,20 +528,27 @@ bool SMESHGUI_SymmetryDlg::ClickOnApply()
|
|||||||
}
|
}
|
||||||
case MAKE_MESH_BUTTON: {
|
case MAKE_MESH_BUTTON: {
|
||||||
SMESH::SMESH_Mesh_var mesh;
|
SMESH::SMESH_Mesh_var mesh;
|
||||||
if(CheckBoxMesh->isChecked())
|
if (CheckBoxMesh->isChecked())
|
||||||
mesh = aMeshEditor->MirrorObjectMakeMesh(mySelectedObject, aMirror, aMirrorType, makeGroups,
|
mesh = aMeshEditor->MirrorObjectMakeMesh(mySelectedObject, aMirror, aMirrorType, makeGroups,
|
||||||
LineEditNewMesh->text().toLatin1().data());
|
LineEditNewMesh->text().toLatin1().data());
|
||||||
else
|
else
|
||||||
mesh = aMeshEditor->MirrorMakeMesh(anElementsId, aMirror, aMirrorType, makeGroups,
|
mesh = aMeshEditor->MirrorMakeMesh(anElementsId, aMirror, aMirrorType, makeGroups,
|
||||||
LineEditNewMesh->text().toLatin1().data());
|
LineEditNewMesh->text().toLatin1().data());
|
||||||
if( !mesh->_is_nil())
|
if (!mesh->_is_nil()) {
|
||||||
mesh->SetParameters( aParameters.join(":").toLatin1().constData() );
|
mesh->SetParameters(aParameters.join(":").toLatin1().constData());
|
||||||
|
#ifdef WITHGENERICOBJ
|
||||||
|
// obj has been published in study. Its refcount has been incremented.
|
||||||
|
// It is safe to decrement its refcount
|
||||||
|
// so that it will be destroyed when the entry in study will be removed
|
||||||
|
mesh->Destroy();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
}
|
}
|
||||||
|
|
||||||
SMESH::UpdateView();
|
SMESH::UpdateView();
|
||||||
if ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() ||
|
if ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() ||
|
||||||
actionButton == MAKE_MESH_BUTTON )
|
actionButton == MAKE_MESH_BUTTON )
|
||||||
@ -589,7 +599,7 @@ void SMESHGUI_SymmetryDlg::ClickOnCancel()
|
|||||||
void SMESHGUI_SymmetryDlg::ClickOnHelp()
|
void SMESHGUI_SymmetryDlg::ClickOnHelp()
|
||||||
{
|
{
|
||||||
LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
|
LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
|
||||||
if (app)
|
if (app)
|
||||||
app->onHelpContextModule(mySMESHGUI ? app->moduleName(mySMESHGUI->moduleName()) : QString(""), myHelpFileName);
|
app->onHelpContextModule(mySMESHGUI ? app->moduleName(mySMESHGUI->moduleName()) : QString(""), myHelpFileName);
|
||||||
else {
|
else {
|
||||||
QString platform;
|
QString platform;
|
||||||
@ -632,7 +642,7 @@ void SMESHGUI_SymmetryDlg::onTextChange (const QString& theNewText)
|
|||||||
Handle(SALOME_InteractiveObject) anIO = myActor->getIO();
|
Handle(SALOME_InteractiveObject) anIO = myActor->getIO();
|
||||||
|
|
||||||
TColStd_MapOfInteger newIndices;
|
TColStd_MapOfInteger newIndices;
|
||||||
|
|
||||||
QStringList aListId = theNewText.split(" ", QString::SkipEmptyParts);
|
QStringList aListId = theNewText.split(" ", QString::SkipEmptyParts);
|
||||||
|
|
||||||
if (send == LineEditElements) {
|
if (send == LineEditElements) {
|
||||||
@ -646,7 +656,7 @@ void SMESHGUI_SymmetryDlg::onTextChange (const QString& theNewText)
|
|||||||
mySelector->AddOrRemoveIndex( anIO, newIndices, false );
|
mySelector->AddOrRemoveIndex( anIO, newIndices, false );
|
||||||
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
||||||
aViewWindow->highlight( anIO, true, true );
|
aViewWindow->highlight( anIO, true, true );
|
||||||
|
|
||||||
myElementsId = theNewText;
|
myElementsId = theNewText;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -736,7 +746,6 @@ void SMESHGUI_SymmetryDlg::SelectionIntoArgument()
|
|||||||
aNbUnits++;
|
aNbUnits++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (!SMESH::IObjectToInterface<SMESH::SMESH_subMesh>(IO)->_is_nil()) { //SUBMESH
|
} else if (!SMESH::IObjectToInterface<SMESH::SMESH_subMesh>(IO)->_is_nil()) { //SUBMESH
|
||||||
// get submesh
|
// get submesh
|
||||||
SMESH::SMESH_subMesh_var aSubMesh = SMESH::IObjectToInterface<SMESH::SMESH_subMesh>(IO);
|
SMESH::SMESH_subMesh_var aSubMesh = SMESH::IObjectToInterface<SMESH::SMESH_subMesh>(IO);
|
||||||
@ -749,7 +758,6 @@ void SMESHGUI_SymmetryDlg::SelectionIntoArgument()
|
|||||||
myElementsId += QString(" %1").arg(anElementsIds[i]);
|
myElementsId += QString(" %1").arg(anElementsIds[i]);
|
||||||
}
|
}
|
||||||
aNbUnits = anElementsIds->length();
|
aNbUnits = anElementsIds->length();
|
||||||
|
|
||||||
} else { // GROUP
|
} else { // GROUP
|
||||||
// get smesh group
|
// get smesh group
|
||||||
SMESH::SMESH_GroupBase_var aGroup =
|
SMESH::SMESH_GroupBase_var aGroup =
|
||||||
@ -772,7 +780,7 @@ void SMESHGUI_SymmetryDlg::SelectionIntoArgument()
|
|||||||
if (aNbUnits < 1)
|
if (aNbUnits < 1)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
myNbOkElements = true;
|
myNbOkElements = true;
|
||||||
} else {
|
} else {
|
||||||
aNbUnits = SMESH::GetNameOfSelectedNodes(mySelector, IO, aString);
|
aNbUnits = SMESH::GetNameOfSelectedNodes(mySelector, IO, aString);
|
||||||
@ -807,7 +815,7 @@ void SMESHGUI_SymmetryDlg::SelectionIntoArgument()
|
|||||||
LineEditElements->setText(aString);
|
LineEditElements->setText(aString);
|
||||||
LineEditElements->repaint();
|
LineEditElements->repaint();
|
||||||
LineEditElements->setEnabled(false); // to update lineedit IPAL 19809
|
LineEditElements->setEnabled(false); // to update lineedit IPAL 19809
|
||||||
LineEditElements->setEnabled(true);
|
LineEditElements->setEnabled(true);
|
||||||
setNewMeshName();
|
setNewMeshName();
|
||||||
}
|
}
|
||||||
myBusy = false;
|
myBusy = false;
|
||||||
|
@ -19,12 +19,11 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
|
// SMESH SMESHGUI : GUI for SMESH component
|
||||||
|
// File : SMESHGUI_TranslationDlg.cxx
|
||||||
|
// Author : Michael ZORIN, Open CASCADE S.A.S.
|
||||||
|
// SMESH includes
|
||||||
|
|
||||||
// SMESH SMESHGUI : GUI for SMESH component
|
|
||||||
// File : SMESHGUI_TranslationDlg.cxx
|
|
||||||
// Author : Michael ZORIN, Open CASCADE S.A.S.
|
|
||||||
// SMESH includes
|
|
||||||
//
|
|
||||||
#include "SMESHGUI_TranslationDlg.h"
|
#include "SMESHGUI_TranslationDlg.h"
|
||||||
|
|
||||||
#include "SMESHGUI.h"
|
#include "SMESHGUI.h"
|
||||||
@ -102,6 +101,10 @@ private:
|
|||||||
#define SPACING 6
|
#define SPACING 6
|
||||||
#define MARGIN 11
|
#define MARGIN 11
|
||||||
|
|
||||||
|
//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
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// class : SMESHGUI_TranslationDlg()
|
// class : SMESHGUI_TranslationDlg()
|
||||||
// purpose :
|
// purpose :
|
||||||
@ -494,7 +497,7 @@ bool SMESHGUI_TranslationDlg::ClickOnApply()
|
|||||||
break;
|
break;
|
||||||
case COPY_ELEMS_BUTTON:
|
case COPY_ELEMS_BUTTON:
|
||||||
if ( makeGroups ) {
|
if ( makeGroups ) {
|
||||||
SMESH::ListOfGroups_var groups;
|
SMESH::ListOfGroups_var groups;
|
||||||
if(CheckBoxMesh->isChecked())
|
if(CheckBoxMesh->isChecked())
|
||||||
groups = aMeshEditor->TranslateObjectMakeGroups(mySelectedObject,aVector);
|
groups = aMeshEditor->TranslateObjectMakeGroups(mySelectedObject,aVector);
|
||||||
else
|
else
|
||||||
@ -510,19 +513,26 @@ bool SMESHGUI_TranslationDlg::ClickOnApply()
|
|||||||
myMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
|
myMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
|
||||||
break;
|
break;
|
||||||
case MAKE_MESH_BUTTON:
|
case MAKE_MESH_BUTTON:
|
||||||
SMESH::SMESH_Mesh_var mesh;
|
SMESH::SMESH_Mesh_var mesh;
|
||||||
if(CheckBoxMesh->isChecked())
|
if (CheckBoxMesh->isChecked())
|
||||||
mesh = aMeshEditor->TranslateObjectMakeMesh(mySelectedObject, aVector, makeGroups,
|
mesh = aMeshEditor->TranslateObjectMakeMesh(mySelectedObject, aVector, makeGroups,
|
||||||
LineEditNewMesh->text().toLatin1().data());
|
LineEditNewMesh->text().toLatin1().data());
|
||||||
else
|
else
|
||||||
mesh = aMeshEditor->TranslateMakeMesh(anElementsId, aVector, makeGroups,
|
mesh = aMeshEditor->TranslateMakeMesh(anElementsId, aVector, makeGroups,
|
||||||
LineEditNewMesh->text().toLatin1().data());
|
LineEditNewMesh->text().toLatin1().data());
|
||||||
if( !mesh->_is_nil())
|
if (!mesh->_is_nil()) {
|
||||||
mesh->SetParameters( aParameters.join(":").toLatin1().constData() );
|
mesh->SetParameters(aParameters.join(":").toLatin1().constData());
|
||||||
|
#ifdef WITHGENERICOBJ
|
||||||
|
// obj has been published in study. Its refcount has been incremented.
|
||||||
|
// It is safe to decrement its refcount
|
||||||
|
// so that it will be destroyed when the entry in study will be removed
|
||||||
|
mesh->Destroy();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
}
|
}
|
||||||
|
|
||||||
SMESH::UpdateView();
|
SMESH::UpdateView();
|
||||||
if ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() ||
|
if ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() ||
|
||||||
actionButton == MAKE_MESH_BUTTON )
|
actionButton == MAKE_MESH_BUTTON )
|
||||||
@ -534,7 +544,7 @@ bool SMESHGUI_TranslationDlg::ClickOnApply()
|
|||||||
|
|
||||||
SMESHGUI::Modified();
|
SMESHGUI::Modified();
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -574,7 +584,7 @@ void SMESHGUI_TranslationDlg::ClickOnCancel()
|
|||||||
void SMESHGUI_TranslationDlg::ClickOnHelp()
|
void SMESHGUI_TranslationDlg::ClickOnHelp()
|
||||||
{
|
{
|
||||||
LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
|
LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
|
||||||
if (app)
|
if (app)
|
||||||
app->onHelpContextModule(mySMESHGUI ? app->moduleName(mySMESHGUI->moduleName()) : QString(""), myHelpFileName);
|
app->onHelpContextModule(mySMESHGUI ? app->moduleName(mySMESHGUI->moduleName()) : QString(""), myHelpFileName);
|
||||||
else {
|
else {
|
||||||
QString platform;
|
QString platform;
|
||||||
@ -585,7 +595,7 @@ void SMESHGUI_TranslationDlg::ClickOnHelp()
|
|||||||
#endif
|
#endif
|
||||||
SUIT_MessageBox::warning(this, tr("WRN_WARNING"),
|
SUIT_MessageBox::warning(this, tr("WRN_WARNING"),
|
||||||
tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
|
tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
|
||||||
arg(app->resourceMgr()->stringValue("ExternalBrowser",
|
arg(app->resourceMgr()->stringValue("ExternalBrowser",
|
||||||
platform)).
|
platform)).
|
||||||
arg(myHelpFileName));
|
arg(myHelpFileName));
|
||||||
}
|
}
|
||||||
@ -615,7 +625,7 @@ void SMESHGUI_TranslationDlg::onTextChange (const QString& theNewText)
|
|||||||
|
|
||||||
if (aMesh) {
|
if (aMesh) {
|
||||||
Handle(SALOME_InteractiveObject) anIO = myActor->getIO();
|
Handle(SALOME_InteractiveObject) anIO = myActor->getIO();
|
||||||
|
|
||||||
TColStd_MapOfInteger newIndices;
|
TColStd_MapOfInteger newIndices;
|
||||||
|
|
||||||
QStringList aListId = theNewText.split(" ", QString::SkipEmptyParts);
|
QStringList aListId = theNewText.split(" ", QString::SkipEmptyParts);
|
||||||
@ -632,7 +642,7 @@ void SMESHGUI_TranslationDlg::onTextChange (const QString& theNewText)
|
|||||||
mySelector->AddOrRemoveIndex( anIO, newIndices, false );
|
mySelector->AddOrRemoveIndex( anIO, newIndices, false );
|
||||||
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
||||||
aViewWindow->highlight( anIO, true, true );
|
aViewWindow->highlight( anIO, true, true );
|
||||||
|
|
||||||
myElementsId = theNewText;
|
myElementsId = theNewText;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -750,7 +760,7 @@ void SMESHGUI_TranslationDlg::SelectionIntoArgument()
|
|||||||
aNbUnits = SMESH::GetNameOfSelectedElements(mySelector, IO, aString);
|
aNbUnits = SMESH::GetNameOfSelectedElements(mySelector, IO, aString);
|
||||||
myElementsId = aString;
|
myElementsId = aString;
|
||||||
if (aNbUnits < 1)
|
if (aNbUnits < 1)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
myNbOkElements = true;
|
myNbOkElements = true;
|
||||||
@ -786,7 +796,7 @@ void SMESHGUI_TranslationDlg::SelectionIntoArgument()
|
|||||||
LineEditElements->setText(aString);
|
LineEditElements->setText(aString);
|
||||||
LineEditElements->repaint();
|
LineEditElements->repaint();
|
||||||
LineEditElements->setEnabled(false); // to fully update lineedit IPAL 19809
|
LineEditElements->setEnabled(false); // to fully update lineedit IPAL 19809
|
||||||
LineEditElements->setEnabled(true);
|
LineEditElements->setEnabled(true);
|
||||||
setNewMeshName();
|
setNewMeshName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,14 +19,14 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
|
|
||||||
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
|
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
|
||||||
// File : SMESH_Gen_i_1.cxx
|
|
||||||
// Created : Thu Oct 21 17:24:06 2004
|
|
||||||
// Author : Edward AGAPOV (eap)
|
|
||||||
// Module : SMESH
|
|
||||||
// $Header:
|
|
||||||
//
|
//
|
||||||
|
// File : SMESH_Gen_i_1.cxx
|
||||||
|
// Created : Thu Oct 21 17:24:06 2004
|
||||||
|
// Author : Edward AGAPOV (eap)
|
||||||
|
// Module : SMESH
|
||||||
|
// $Header : $
|
||||||
|
|
||||||
#include "SMESH_Gen_i.hxx"
|
#include "SMESH_Gen_i.hxx"
|
||||||
|
|
||||||
#include "SMESH_Mesh_i.hxx"
|
#include "SMESH_Mesh_i.hxx"
|
||||||
|
@ -19,12 +19,11 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
|
|
||||||
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
|
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
|
||||||
// File : SMESH_Mesh_i.cxx
|
// File : SMESH_Mesh_i.cxx
|
||||||
// Author : Paul RASCLE, EDF
|
// Author : Paul RASCLE, EDF
|
||||||
// Module : SMESH
|
// Module : SMESH
|
||||||
//
|
|
||||||
#include "SMESH_Mesh_i.hxx"
|
#include "SMESH_Mesh_i.hxx"
|
||||||
|
|
||||||
#include "SMESH_Filter_i.hxx"
|
#include "SMESH_Filter_i.hxx"
|
||||||
@ -90,7 +89,9 @@ using SMESH::TPythonDump;
|
|||||||
|
|
||||||
int SMESH_Mesh_i::myIdGenerator = 0;
|
int SMESH_Mesh_i::myIdGenerator = 0;
|
||||||
|
|
||||||
|
//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
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
@ -119,17 +120,43 @@ SMESH_Mesh_i::SMESH_Mesh_i( PortableServer::POA_ptr thePOA,
|
|||||||
SMESH_Mesh_i::~SMESH_Mesh_i()
|
SMESH_Mesh_i::~SMESH_Mesh_i()
|
||||||
{
|
{
|
||||||
INFOS("~SMESH_Mesh_i");
|
INFOS("~SMESH_Mesh_i");
|
||||||
map<int, SMESH::SMESH_GroupBase_ptr>::iterator it;
|
|
||||||
for ( it = _mapGroups.begin(); it != _mapGroups.end(); it++ ) {
|
// destroy groups
|
||||||
SMESH_GroupBase_i* aGroup = dynamic_cast<SMESH_GroupBase_i*>( SMESH_Gen_i::GetServant( it->second ).in() );
|
map<int, SMESH::SMESH_GroupBase_ptr>::iterator itGr;
|
||||||
if ( aGroup ) {
|
for (itGr = _mapGroups.begin(); itGr != _mapGroups.end(); itGr++) {
|
||||||
// this method is colled from destructor of group (PAL6331)
|
SMESH_GroupBase_i* aGroup = dynamic_cast<SMESH_GroupBase_i*>(SMESH_Gen_i::GetServant(itGr->second).in());
|
||||||
|
if (aGroup) {
|
||||||
|
// this method is called from destructor of group (PAL6331)
|
||||||
//_impl->RemoveGroup( aGroup->GetLocalID() );
|
//_impl->RemoveGroup( aGroup->GetLocalID() );
|
||||||
|
#ifdef WITHGENERICOBJ
|
||||||
aGroup->Destroy();
|
aGroup->Destroy();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_mapGroups.clear();
|
_mapGroups.clear();
|
||||||
|
|
||||||
|
#ifdef WITHGENERICOBJ
|
||||||
|
// destroy submeshes
|
||||||
|
map<int, SMESH::SMESH_subMesh_ptr>::iterator itSM;
|
||||||
|
for ( itSM = _mapSubMeshIor.begin(); itSM != _mapSubMeshIor.end(); itSM++ ) {
|
||||||
|
SMESH_subMesh_i* aSubMesh = dynamic_cast<SMESH_subMesh_i*>(SMESH_Gen_i::GetServant(itSM->second).in());
|
||||||
|
if (aSubMesh) {
|
||||||
|
aSubMesh->Destroy();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_mapSubMeshIor.clear();
|
||||||
|
|
||||||
|
// destroy hypotheses
|
||||||
|
map<int, SMESH::SMESH_Hypothesis_ptr>::iterator itH;
|
||||||
|
for ( itH = _mapHypo.begin(); itH != _mapHypo.end(); itH++ ) {
|
||||||
|
SMESH_Hypothesis_i* aHypo = dynamic_cast<SMESH_Hypothesis_i*>(SMESH_Gen_i::GetServant(itH->second).in());
|
||||||
|
if (aHypo) {
|
||||||
|
aHypo->Destroy();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_mapHypo.clear();
|
||||||
|
#endif
|
||||||
|
|
||||||
delete _impl;
|
delete _impl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -474,6 +501,9 @@ SMESH_Hypothesis::Hypothesis_Status
|
|||||||
status = _impl->AddHypothesis(myLocSubShape, hypId);
|
status = _impl->AddHypothesis(myLocSubShape, hypId);
|
||||||
if ( !SMESH_Hypothesis::IsStatusFatal(status) ) {
|
if ( !SMESH_Hypothesis::IsStatusFatal(status) ) {
|
||||||
_mapHypo[hypId] = SMESH::SMESH_Hypothesis::_duplicate( myHyp );
|
_mapHypo[hypId] = SMESH::SMESH_Hypothesis::_duplicate( myHyp );
|
||||||
|
#ifdef WITHGENERICOBJ
|
||||||
|
_mapHypo[hypId]->Register();
|
||||||
|
#endif
|
||||||
// assure there is a corresponding submesh
|
// assure there is a corresponding submesh
|
||||||
if ( !_impl->IsMainShape( myLocSubShape )) {
|
if ( !_impl->IsMainShape( myLocSubShape )) {
|
||||||
int shapeId = _impl->GetMeshDS()->ShapeToIndex( myLocSubShape );
|
int shapeId = _impl->GetMeshDS()->ShapeToIndex( myLocSubShape );
|
||||||
|
@ -19,12 +19,11 @@
|
|||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
|
|
||||||
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
|
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
|
||||||
// File : SMESH_Mesh_i.hxx
|
// File : SMESH_Mesh_i.hxx
|
||||||
// Author : Paul RASCLE, EDF
|
// Author : Paul RASCLE, EDF
|
||||||
// Module : SMESH
|
// Module : SMESH
|
||||||
//
|
|
||||||
#ifndef _SMESH_MESH_I_HXX_
|
#ifndef _SMESH_MESH_I_HXX_
|
||||||
#define _SMESH_MESH_I_HXX_
|
#define _SMESH_MESH_I_HXX_
|
||||||
|
|
||||||
@ -98,7 +97,7 @@ public:
|
|||||||
|
|
||||||
SMESH::SMESH_Group_ptr CreateGroup( SMESH::ElementType theElemType, const char* theName )
|
SMESH::SMESH_Group_ptr CreateGroup( SMESH::ElementType theElemType, const char* theName )
|
||||||
throw (SALOME::SALOME_Exception);
|
throw (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
SMESH::SMESH_GroupOnGeom_ptr CreateGroupFromGEOM(SMESH::ElementType theElemType,
|
SMESH::SMESH_GroupOnGeom_ptr CreateGroupFromGEOM(SMESH::ElementType theElemType,
|
||||||
const char* theName,
|
const char* theName,
|
||||||
GEOM::GEOM_Object_ptr theGeomObj )
|
GEOM::GEOM_Object_ptr theGeomObj )
|
||||||
@ -106,49 +105,49 @@ public:
|
|||||||
|
|
||||||
void RemoveGroup( SMESH::SMESH_GroupBase_ptr theGroup )
|
void RemoveGroup( SMESH::SMESH_GroupBase_ptr theGroup )
|
||||||
throw (SALOME::SALOME_Exception);
|
throw (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
void RemoveGroupWithContents( SMESH::SMESH_GroupBase_ptr theGroup )
|
void RemoveGroupWithContents( SMESH::SMESH_GroupBase_ptr theGroup )
|
||||||
throw (SALOME::SALOME_Exception);
|
throw (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
SMESH::ListOfGroups* GetGroups()
|
SMESH::ListOfGroups* GetGroups()
|
||||||
throw (SALOME::SALOME_Exception);
|
throw (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
CORBA::Long NbGroups()
|
CORBA::Long NbGroups()
|
||||||
throw (SALOME::SALOME_Exception);
|
throw (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
SMESH::SMESH_Group_ptr UnionGroups( SMESH::SMESH_GroupBase_ptr theGroup1,
|
SMESH::SMESH_Group_ptr UnionGroups( SMESH::SMESH_GroupBase_ptr theGroup1,
|
||||||
SMESH::SMESH_GroupBase_ptr theGroup2,
|
SMESH::SMESH_GroupBase_ptr theGroup2,
|
||||||
const char* theName )
|
const char* theName )
|
||||||
throw (SALOME::SALOME_Exception);
|
throw (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
SMESH::SMESH_Group_ptr UnionListOfGroups( const SMESH::ListOfGroups& theGroups,
|
SMESH::SMESH_Group_ptr UnionListOfGroups( const SMESH::ListOfGroups& theGroups,
|
||||||
const char* theName)
|
const char* theName)
|
||||||
throw (SALOME::SALOME_Exception);
|
throw (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
SMESH::SMESH_Group_ptr IntersectGroups( SMESH::SMESH_GroupBase_ptr theGroup1,
|
SMESH::SMESH_Group_ptr IntersectGroups( SMESH::SMESH_GroupBase_ptr theGroup1,
|
||||||
SMESH::SMESH_GroupBase_ptr theGroup2,
|
SMESH::SMESH_GroupBase_ptr theGroup2,
|
||||||
const char* theName )
|
const char* theName )
|
||||||
throw (SALOME::SALOME_Exception);
|
throw (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
SMESH::SMESH_Group_ptr IntersectListOfGroups( const SMESH::ListOfGroups& theGroups,
|
SMESH::SMESH_Group_ptr IntersectListOfGroups( const SMESH::ListOfGroups& theGroups,
|
||||||
const char* theName )
|
const char* theName )
|
||||||
throw (SALOME::SALOME_Exception);
|
throw (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
SMESH::SMESH_Group_ptr CutGroups( SMESH::SMESH_GroupBase_ptr theGroup1,
|
SMESH::SMESH_Group_ptr CutGroups( SMESH::SMESH_GroupBase_ptr theGroup1,
|
||||||
SMESH::SMESH_GroupBase_ptr theGroup2,
|
SMESH::SMESH_GroupBase_ptr theGroup2,
|
||||||
const char* theName )
|
const char* theName )
|
||||||
throw (SALOME::SALOME_Exception);
|
throw (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
SMESH::SMESH_Group_ptr CutListOfGroups( const SMESH::ListOfGroups& theMainGroups,
|
SMESH::SMESH_Group_ptr CutListOfGroups( const SMESH::ListOfGroups& theMainGroups,
|
||||||
const SMESH::ListOfGroups& theToolGroups,
|
const SMESH::ListOfGroups& theToolGroups,
|
||||||
const char* theName )
|
const char* theName )
|
||||||
throw (SALOME::SALOME_Exception);
|
throw (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
SMESH::SMESH_Group_ptr CreateDimGroup( const SMESH::ListOfGroups& theGroups,
|
SMESH::SMESH_Group_ptr CreateDimGroup( const SMESH::ListOfGroups& theGroups,
|
||||||
SMESH::ElementType theElemType,
|
SMESH::ElementType theElemType,
|
||||||
const char* theName )
|
const char* theName )
|
||||||
throw (SALOME::SALOME_Exception);
|
throw (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
|
|
||||||
SMESH::SMESH_Group_ptr ConvertToStandalone( SMESH::SMESH_GroupOnGeom_ptr theGeomGroup );
|
SMESH::SMESH_Group_ptr ConvertToStandalone( SMESH::SMESH_GroupOnGeom_ptr theGeomGroup );
|
||||||
|
|
||||||
@ -303,16 +302,16 @@ public:
|
|||||||
|
|
||||||
SMESH::long_array* GetElementsByType( SMESH::ElementType theElemType )
|
SMESH::long_array* GetElementsByType( SMESH::ElementType theElemType )
|
||||||
throw (SALOME::SALOME_Exception);
|
throw (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
SMESH::long_array* GetNodesId()
|
SMESH::long_array* GetNodesId()
|
||||||
throw (SALOME::SALOME_Exception);
|
throw (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
SMESH::ElementType GetElementType( CORBA::Long id, bool iselem )
|
SMESH::ElementType GetElementType( CORBA::Long id, bool iselem )
|
||||||
throw (SALOME::SALOME_Exception);
|
throw (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
SMESH::EntityType GetElementGeomType( CORBA::Long id )
|
SMESH::EntityType GetElementGeomType( CORBA::Long id )
|
||||||
throw (SALOME::SALOME_Exception);
|
throw (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Returns ID of elements for given submesh
|
* Returns ID of elements for given submesh
|
||||||
*/
|
*/
|
||||||
@ -326,15 +325,15 @@ public:
|
|||||||
*/
|
*/
|
||||||
SMESH::long_array* GetSubMeshNodesId(CORBA::Long ShapeID, CORBA::Boolean all)
|
SMESH::long_array* GetSubMeshNodesId(CORBA::Long ShapeID, CORBA::Boolean all)
|
||||||
throw (SALOME::SALOME_Exception);
|
throw (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Returns type of elements for given submesh
|
* Returns type of elements for given submesh
|
||||||
*/
|
*/
|
||||||
SMESH::ElementType GetSubMeshElementType(CORBA::Long ShapeID)
|
SMESH::ElementType GetSubMeshElementType(CORBA::Long ShapeID)
|
||||||
throw (SALOME::SALOME_Exception);
|
throw (SALOME::SALOME_Exception);
|
||||||
|
|
||||||
char* Dump();
|
char* Dump();
|
||||||
|
|
||||||
// Internal methods not available through CORBA
|
// Internal methods not available through CORBA
|
||||||
// They are called by corresponding interface methods
|
// They are called by corresponding interface methods
|
||||||
SMESH_Hypothesis::Hypothesis_Status addHypothesis(GEOM::GEOM_Object_ptr aSubShapeObject,
|
SMESH_Hypothesis::Hypothesis_Status addHypothesis(GEOM::GEOM_Object_ptr aSubShapeObject,
|
||||||
@ -342,7 +341,7 @@ public:
|
|||||||
|
|
||||||
SMESH_Hypothesis::Hypothesis_Status removeHypothesis(GEOM::GEOM_Object_ptr aSubShapeObject,
|
SMESH_Hypothesis::Hypothesis_Status removeHypothesis(GEOM::GEOM_Object_ptr aSubShapeObject,
|
||||||
SMESH::SMESH_Hypothesis_ptr anHyp);
|
SMESH::SMESH_Hypothesis_ptr anHyp);
|
||||||
|
|
||||||
static SMESH::Hypothesis_Status
|
static SMESH::Hypothesis_Status
|
||||||
ConvertHypothesisStatus (SMESH_Hypothesis::Hypothesis_Status theStatus);
|
ConvertHypothesisStatus (SMESH_Hypothesis::Hypothesis_Status theStatus);
|
||||||
|
|
||||||
@ -369,7 +368,7 @@ public:
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Update hypotheses assigned to geom groups if the latter change
|
* \brief Update hypotheses assigned to geom groups if the latter change
|
||||||
*
|
*
|
||||||
* NPAL16168: "geometrical group edition from a submesh don't modifiy mesh computation"
|
* NPAL16168: "geometrical group edition from a submesh don't modifiy mesh computation"
|
||||||
*/
|
*/
|
||||||
void CheckGeomGroupModif();
|
void CheckGeomGroupModif();
|
||||||
@ -393,7 +392,7 @@ public:
|
|||||||
* If there is not node for given ID - returns empty list
|
* If there is not node for given ID - returns empty list
|
||||||
*/
|
*/
|
||||||
SMESH::double_array* GetNodeXYZ(CORBA::Long id);
|
SMESH::double_array* GetNodeXYZ(CORBA::Long id);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* For given node returns list of IDs of inverse elements
|
* For given node returns list of IDs of inverse elements
|
||||||
* If there is not node for given ID - returns empty list
|
* If there is not node for given ID - returns empty list
|
||||||
@ -412,7 +411,7 @@ public:
|
|||||||
CORBA::Long GetShapeID(CORBA::Long id);
|
CORBA::Long GetShapeID(CORBA::Long id);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* For given element returns ID of result shape after
|
* For given element returns ID of result shape after
|
||||||
* ::FindShape() from SMESH_MeshEditor
|
* ::FindShape() from SMESH_MeshEditor
|
||||||
* If there is not element for given ID - returns -1
|
* If there is not element for given ID - returns -1
|
||||||
*/
|
*/
|
||||||
@ -435,25 +434,25 @@ public:
|
|||||||
* If there is not node for given index - returns -2
|
* If there is not node for given index - returns -2
|
||||||
*/
|
*/
|
||||||
CORBA::Long GetElemNode(CORBA::Long id, CORBA::Long index);
|
CORBA::Long GetElemNode(CORBA::Long id, CORBA::Long index);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Returns true if given node is medium node
|
* Returns true if given node is medium node
|
||||||
* in given quadratic element
|
* in given quadratic element
|
||||||
*/
|
*/
|
||||||
CORBA::Boolean IsMediumNode(CORBA::Long ide, CORBA::Long idn);
|
CORBA::Boolean IsMediumNode(CORBA::Long ide, CORBA::Long idn);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Returns true if given node is medium node
|
* Returns true if given node is medium node
|
||||||
* in one of quadratic elements
|
* in one of quadratic elements
|
||||||
*/
|
*/
|
||||||
CORBA::Boolean IsMediumNodeOfAnyElem(CORBA::Long idn,
|
CORBA::Boolean IsMediumNodeOfAnyElem(CORBA::Long idn,
|
||||||
SMESH::ElementType theElemType);
|
SMESH::ElementType theElemType);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Returns number of edges for given element
|
* Returns number of edges for given element
|
||||||
*/
|
*/
|
||||||
CORBA::Long ElemNbEdges(CORBA::Long id);
|
CORBA::Long ElemNbEdges(CORBA::Long id);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Returns number of faces for given element
|
* Returns number of faces for given element
|
||||||
*/
|
*/
|
||||||
@ -472,12 +471,12 @@ public:
|
|||||||
* Returns true if given element is polygon
|
* Returns true if given element is polygon
|
||||||
*/
|
*/
|
||||||
CORBA::Boolean IsPoly(CORBA::Long id);
|
CORBA::Boolean IsPoly(CORBA::Long id);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Returns true if given element is quadratic
|
* Returns true if given element is quadratic
|
||||||
*/
|
*/
|
||||||
CORBA::Boolean IsQuadratic(CORBA::Long id);
|
CORBA::Boolean IsQuadratic(CORBA::Long id);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Returns bary center for given element
|
* Returns bary center for given element
|
||||||
*/
|
*/
|
||||||
@ -492,7 +491,7 @@ public:
|
|||||||
* Sets list of notebook variables used for Mesh operations separated by ":" symbol
|
* Sets list of notebook variables used for Mesh operations separated by ":" symbol
|
||||||
*/
|
*/
|
||||||
void SetParameters (const char* theParameters);
|
void SetParameters (const char* theParameters);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Returns list of notebook variables used for Mesh operations separated by ":" symbol
|
* Returns list of notebook variables used for Mesh operations separated by ":" symbol
|
||||||
*/
|
*/
|
||||||
@ -516,7 +515,6 @@ public:
|
|||||||
*/
|
*/
|
||||||
static void CollectMeshInfo(const SMDS_ElemIteratorPtr theItr,
|
static void CollectMeshInfo(const SMDS_ElemIteratorPtr theItr,
|
||||||
SMESH::long_array& theInfo);
|
SMESH::long_array& theInfo);
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Return submesh objects list in meshing order
|
* \brief Return submesh objects list in meshing order
|
||||||
@ -527,7 +525,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
virtual ::CORBA::Boolean SetMeshOrder(const SMESH::submesh_array_array& theSubMeshArray);
|
virtual ::CORBA::Boolean SetMeshOrder(const SMESH::submesh_array_array& theSubMeshArray);
|
||||||
|
|
||||||
|
|
||||||
std::map<int, SMESH_subMesh_i*> _mapSubMesh_i; //NRI
|
std::map<int, SMESH_subMesh_i*> _mapSubMesh_i; //NRI
|
||||||
std::map<int, ::SMESH_subMesh*> _mapSubMesh; //NRI
|
std::map<int, ::SMESH_subMesh*> _mapSubMesh; //NRI
|
||||||
|
|
||||||
@ -581,8 +579,7 @@ private:
|
|||||||
* \brief Return new group contents if it has been changed and update group data
|
* \brief Return new group contents if it has been changed and update group data
|
||||||
*/
|
*/
|
||||||
TopoDS_Shape newGroupShape( TGeomGroupData & groupData);
|
TopoDS_Shape newGroupShape( TGeomGroupData & groupData);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user