//
// 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
-// File : SMESHGUI.cxx
-// Author : Nicolas REJNERI, Open CASCADE S.A.S.
-// SMESH includes
-//
+// SMESH includes
#include "SMESHGUI.h"
#include "SMESHGUI_AddMeshElementDlg.h"
#include "SMESHGUI_AddQuadraticElementDlg.h"
#include <Standard_ErrorHandler.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{
// Declarations
//=============================================================
aPixmap->SetPixMap( "ICON_SMESH_TREE_MESH_IMPORTED" );
if ( theCommandID == 112 ) // mesh names aren't taken from the file for UNV import
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 {
isEmpty = true;
//=============================================================================
SMESHGUI::~SMESHGUI()
{
+#ifdef WITHGENERICOBJ
SMESH::GetFilterManager()->Destroy();
+#endif
SMESH::GetFilterManager() = SMESH::FilterManager::_nil();
}
case 232:
::SetDisplayMode(theCommandID, myMarkerMap);
break;
-
+
// Display Entity
case 216: // 0D elements
case 217: // Edges
}
else
aSel->setSelectedObjects( to_process );
-
+
break;
}
//-------------------------------------------------
// Representation of the 2D Quadratic elements
- //-------------------------------------------------
+ //-------------------------------------------------
anId = popupMgr()->insert( tr( "MEN_QUADRATIC_REPRESENT" ), -1, -1 );
popupMgr()->insert( action( 231 ), anId, -1 ); // LINE REPRESENTATION
popupMgr()->setRule( action( 231 ), aMeshInVTK + "and isVisible",QtxPopupMgr::VisibleRule );
popupMgr()->setRule( action( 231 ), "quadratic2DMode = 'eLines'", QtxPopupMgr::ToggleRule );
-
+
popupMgr()->insert( action( 232 ), anId, -1 ); // ARC REPRESENTATION
popupMgr()->setRule( action( 232 ), aMeshInVTK + "and isVisible", QtxPopupMgr::VisibleRule );
popupMgr()->setRule( action( 232 ), "quadratic2DMode = 'eArcs'", QtxPopupMgr::ToggleRule );
aMeshInVtkHasVolumes = aMeshInVTK + "&&" + hasVolumes;
anId = popupMgr()->insert( tr( "MEN_CTRL" ), -1, -1 );
-
+
popupMgr()->insert( action( 200 ), anId, -1 ); // RESET
popupMgr()->setRule( action( 200 ), aMeshInVTK + "&& controlMode <> 'eNone'", QtxPopupMgr::VisibleRule );
popupMgr()->setRule( action( 201 ), aMeshInVTK + "&& controlMode <> 'eNone'", QtxPopupMgr::VisibleRule );
popupMgr()->insert( separator(), -1, -1 );
-
+
//-------------------------------------------------
// Display / Erase
//-------------------------------------------------
{
// compute, evaluate and precompute are not reusable operations
return ( id == 701 || id == 711 || id == 712 ) ? false : SalomeApp_Module::reusableOperation( id );
-}
+}
bool SMESHGUI::activateModule( SUIT_Study* study )
{
"SMESH", "max_angle" );
setPreferenceProperty( maxAngle, "min", 1 );
setPreferenceProperty( maxAngle, "max", 90 );
-
-
+
+
int exportgroup = addPreference( tr( "PREF_GROUP_EXPORT" ), genTab );
setPreferenceProperty( exportgroup, "columns", 2 );
"SMESH", "nb_segments_per_edge" );
setPreferenceProperty( nbSeg, "min", 1 );
setPreferenceProperty( nbSeg, "max", 10000000 );
-
+
// Quantities with individual precision settings
int precGroup = addPreference( tr( "SMESH_PREF_GROUP_PRECISION" ), genTab );
setPreferenceProperty( precGroup, "columns", 2 );
-
+
const int nbQuantities = 6;
int precs[nbQuantities], ii = 0;
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,
LightApp_Preferences::IntSpin, "SMESH", "angle_precision" );
precs[ii++] = addPreference( tr( "SMESH_PREF_len_tol_precision" ), precGroup,
precs[ii++] = addPreference( tr( "SMESH_PREF_area_precision" ), precGroup,
LightApp_Preferences::IntSpin, "SMESH", "area_precision" );
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
for ( ii = 0; ii < nbQuantities; ii++ ){
setPreferenceProperty( precs[ii], "min", -14 );
setPreferenceProperty( precs[ii], "max", 14 );
setPreferenceProperty( precs[ii], "precision", 2 );
- }
+ }
// Mesh tab ------------------------------------------------------------------------
int meshTab = addPreference( tr( "PREF_TAB_MESH" ) );
int SMESHGUI::addVtkFontPref( const QString& label, const int pId, const QString& param )
{
int tfont = addPreference( label, pId, LightApp_Preferences::Font, "VISU", param );
-
+
setPreferenceProperty( tfont, "mode", QtxFontEdit::Custom );
QStringList fam;
//
// 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.h"
#define SPACING 6
#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
// Purpose :
GroupArgsLayout->addWidget(TextLabelMeshes, 0, 0);
GroupArgsLayout->addWidget(SelectButton, 0, 1);
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(CheckBoxCommon, 2, 0, 1, 4);
GroupArgsLayout->addWidget(CheckBoxMerge, 3, 0, 1, 4);
SMESH::SMESH_Gen_var aSMESHGen = SMESHGUI::GetSMESHGen();
// concatenate meshes
if(CheckBoxCommon->isChecked())
- aCompoundMesh = aSMESHGen->ConcatenateWithGroups(myMeshArray,
- !(ComboBoxUnion->currentIndex()),
- CheckBoxMerge->isChecked(),
+ aCompoundMesh = aSMESHGen->ConcatenateWithGroups(myMeshArray,
+ !(ComboBoxUnion->currentIndex()),
+ CheckBoxMerge->isChecked(),
SpinBoxTol->GetValue());
else
- aCompoundMesh = aSMESHGen->Concatenate(myMeshArray,
- !(ComboBoxUnion->currentIndex()),
- CheckBoxMerge->isChecked(),
+ aCompoundMesh = aSMESHGen->Concatenate(myMeshArray,
+ !(ComboBoxUnion->currentIndex()),
+ CheckBoxMerge->isChecked(),
SpinBoxTol->GetValue());
-
+
aCompoundMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
SMESH::SetName( SMESH::FindSObject( aCompoundMesh ), LineEditName->text() );
if ( SMESHGUI::automaticUpdate() ) {
mySelectionMgr->clearSelected();
SMESH::UpdateView();
-
+
_PTR(SObject) aSO = SMESH::FindSObject(aCompoundMesh.in());
if ( SMESH_Actor* anActor = SMESH::CreateActor(aSO->GetStudy(), aSO->GetID().c_str()) )
SMESH::DisplayActor(SMESH::GetActiveWindow(), anActor);
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 false;
void SMESHGUI_BuildCompoundDlg::ClickOnHelp()
{
LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
- if (app)
+ if (app)
app->onHelpContextModule(mySMESHGUI ? app->moduleName(mySMESHGUI->moduleName()) : QString(""), myHelpFileName);
else {
SUIT_MessageBox::warning(this, tr("WRN_WARNING"),
//=================================================================================
void SMESHGUI_BuildCompoundDlg::onSelectMerge(bool toMerge)
{
-
TextLabelTol->setEnabled(toMerge);
SpinBoxTol->setEnabled(toMerge);
if(!toMerge)
//
// 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.h"
#define SPACING 6
#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 )
: myHypType( theHypType ), myIsCreate( false ), myDlg( 0 )
{
myIsCreate = true;
// Create hypothesis/algorithm
- if (isAlgo)
- SMESH::CreateHypothesis( hypType(), theHypName, isAlgo );
-
- else
- {
- SMESH::SMESH_Hypothesis_var aHypothesis =
+ if (isAlgo) {
+ SMESH::SMESH_Hypothesis_var anAlgo =
+ SMESH::CreateHypothesis( hypType(), theHypName, isAlgo );
+#ifdef WITHGENERICOBJ
+ if (!CORBA::is_nil(anAlgo))
+ anAlgo->Destroy();
+#endif
+ }
+ else {
+ SMESH::SMESH_Hypothesis_var aHypothesis =
SMESH::CreateHypothesis( hypType(), theHypName, false );
editHypothesis( aHypothesis.in(), theHypName, theParent, obj, slot );
+#ifdef WITHGENERICOBJ
+ if (!CORBA::is_nil(aHypothesis))
+ aHypothesis->Destroy();
+#endif
}
}
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,
QWidget* theParent,
QObject* obj, const QString& slot )
{
myHypName = theHypName;
myHypo = SMESH::SMESH_Hypothesis::_duplicate( h );
+#ifdef WITHGENERICOBJ
+ myHypo->Register();
+#endif
SMESHGUI_HypothesisDlg* Dlg = new SMESHGUI_HypothesisDlg( this, theParent );
connect( Dlg, SIGNAL( finished( int ) ), this, SLOT( onDialogFinished( int ) ) );
else
emit finished( QDialog::Accepted );
}
-
+
QFrame* SMESHGUI_GenericHypothesisCreator::buildStdFrame()
{
if( CORBA::is_nil( hypothesis() ) )
GroupC1Layout->addWidget( lab, i, 0 );
QWidget* w = getCustomWidget( *anIt, GroupC1, i );
- if ( !w )
+ if ( !w )
switch( (*anIt).myValue.type() )
{
case QVariant::Int:
}
}
SMESHGUI::GetSMESHGUI()->updateObjBrowser( true, 0 );
+#ifdef WITHGENERICOBJ
+ myHypo->Destroy();
+#endif
myHypo = SMESH::SMESH_Hypothesis::_nil();
myInitParamsHypo = SMESH::SMESH_Hypothesis::_nil();
item.myValue = sb->value();
params.append( item );
}
-
else if( (*anIt)->inherits( "SalomeApp_DoubleSpinBox" ) )
{
SalomeApp_DoubleSpinBox* sb = ( SalomeApp_DoubleSpinBox* )( *anIt );
item.myValue = sb->value();
params.append( item );
}
-
else if( (*anIt)->inherits( "QLineEdit" ) )
{
QLineEdit* line = ( QLineEdit* )( *anIt );
item.myValue = line->text();
params.append( item );
}
-
else if ( getParamFromCustomWidget( item, *anIt ))
{
params.append( item );
}
-
else
res = false;
}
if( (*anIt)->inherits( "QAbstractSpinBox" ) ) {
QAbstractSpinBox* sb = ( QAbstractSpinBox* )( *anIt );
aResult.append(sb->text());
- }
+ }
}
return aResult;
}
}
QtxDialog* SMESHGUI_GenericHypothesisCreator:: dlg() const
-{
+{
return myDlg;
}
QHBoxLayout* titLay = new QHBoxLayout( titFrame );
titLay->setMargin( 0 );
titLay->setSpacing( SPACING );
-
+
myIconLabel = new QLabel( titFrame );
myIconLabel->setScaledContents( false );
myIconLabel->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) );
#endif
SUIT_MessageBox::warning(this, tr("WRN_WARNING"),
tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
- arg(app->resourceMgr()->stringValue("ExternalBrowser",
+ arg(app->resourceMgr()->stringValue("ExternalBrowser",
platform)).
arg(myHelpFileName));
}
void SMESHGUI_HypothesisDlg::setHIcon( const QPixmap& p )
{
- myIconLabel->setPixmap( p );
+ myIconLabel->setPixmap( p );
}
void SMESHGUI_HypothesisDlg::setType( const QString& t )
IconId( theIconId ),
Dim( theDim ),
IsAux( theIsAux ),
- NeededHypos( theNeededHypos ),
+ NeededHypos( theNeededHypos ),
OptionalHypos( theOptionalHypos ),
InputTypes( theInputTypes ),
OutputTypes( theOutputTypes ),
{
}
-HypothesesSet::HypothesesSet( const QString& theSetName )
+HypothesesSet::HypothesesSet( const QString& theSetName )
: myHypoSetName( theSetName ),
myIsAlgo( false )
{
HypothesesSet::HypothesesSet( const QString& theSetName,
const QStringList& theHypoList,
const QStringList& theAlgoList )
- : myHypoSetName( theSetName ),
- myHypoList( theHypoList ),
+ : myHypoSetName( theSetName ),
+ myHypoList( theHypoList ),
myAlgoList( theAlgoList ),
myIsAlgo( false )
{
{
return list()->at(myIndex);
}
-
//
// 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
-//
#include "SMESHGUI_MeshOp.h"
#include "SMESHGUI.h"
#include <SALOMEconfig.h>
#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
* \retval bool - check result
*/
//================================================================================
-
bool SMESHGUI_MeshOp::isSubshapeOk() const
{
if ( !myToCreate || myIsMesh ) // not submesh creation
//================================================================================
/*!
* \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!!!
*/
//================================================================================
-
char* SMESHGUI_MeshOp::isSubmeshIgnored() const
{
if ( myToCreate && !myIsMesh ) {
* \retval _PTR(SObject) - the found submesh SObject
*/
//================================================================================
-
_PTR(SObject) SMESHGUI_MeshOp::getSubmeshByGeom() const
{
QString aMeshEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Mesh );
bool editSubmesh = ( !sm->_is_nil() &&
SUIT_MessageBox::question( myDlg, tr( "SMESH_WARNING" ),
tr( "EDIT_SUBMESH_QUESTION"),
- SUIT_MessageBox::Yes |
+ SUIT_MessageBox::Yes |
SUIT_MessageBox::No,
SUIT_MessageBox::No )
== SUIT_MessageBox::Yes );
* \retval bool - check result
*/
//================================================================================
-
static bool isCompatible(const HypothesisData* theAlgoData,
const HypothesisData* theHypData,
const int theHypType)
* \retval SMESH::SMESH_Hypothesis_var - the hypothesis holding parameter values
*/
//================================================================================
-
SMESH::SMESH_Hypothesis_var
SMESHGUI_MeshOp::getInitParamsHypothesis( const QString& aHypType,
const QString& aServerLib ) const
* \retval int - dimention
*/
//================================================================================
-
static int getTabDim (const QObject* tab, SMESHGUI_MeshDlg* dlg )
{
int aDim = -1;
* \param theTypeName - specifies hypothesis to be created
*/
//================================================================================
-
void SMESHGUI_MeshOp::createHypothesis(const int theDim,
const int theType,
const QString& theTypeName)
QString aClientLibName = aData->ClientLibName;
if (aClientLibName == "") {
// 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 {
// Get hypotheses creator client (GUI)
// BUG 0020378
aGeomEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Geom );
aMeshEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Mesh );
anObjEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Obj );
-
+
if ( aMeshEntry != "" ) { // Get Geom object from Mesh
_PTR(SObject) pObj = studyDS()->FindObjectID( aMeshEntry.toLatin1().data() );
GEOM::GEOM_Object_var aGeomVar = SMESH::GetShapeOnMeshOrSubMesh( pObj );
aMeshEntry = ( aGeomVar->_is_nil() ) ? "" : aMeshEntry = aGeomVar->GetStudyEntry();
}
-
+
if ( aMeshEntry == "" && aGeomEntry == "" ) {
_PTR(SObject) pObj = studyDS()->FindObjectID( anObjEntry.toLatin1().data() );
GEOM::GEOM_Object_var aGeomVar = SMESH::GetShapeOnMeshOrSubMesh( pObj );
}
}
}
-
+
aCreator->setShapeEntry( aGeomEntry );
if ( aMeshEntry != "" )
aCreator->setMainShapeEntry( aMeshEntry );
aCreator->create(initParamHyp, aHypName, myDlg, this, SLOT( onHypoCreated( int ) ) );
dialog = true;
}
- else
- SMESH::CreateHypothesis(theTypeName, aHypName, false);
+ else {
+ SMESH::SMESH_Hypothesis_var aHyp =
+ SMESH::CreateHypothesis(theTypeName, aHypName, false);
+#ifdef WITHGENERICOBJ
+ if (!CORBA::is_nil(aHyp))
+ aHyp->Destroy();
+#endif
+ }
}
if( !dialog )
* \retval HypothesisData* - result data, may be 0
*/
//================================================================================
-
HypothesisData* SMESHGUI_MeshOp::hypData( const int theDim,
const int theHypType,
const int theIndex)
* \param theIndex - algorithm index
*/
//================================================================================
-
void SMESHGUI_MeshOp::onAlgoSelected( const int theIndex,
const int theDim )
{
if ( !anAlgoVar->_is_nil() )
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;
}
QString aNewGeomGroupName ("Auto_group_for_");
aNewGeomGroupName += aName;
SALOMEDS::SObject_var aNewGroupSO =
- geomGen->AddInStudy(aSMESHGen->GetCurrentStudy(), aGeomVar,
+ geomGen->AddInStudy(aSMESHGen->GetCurrentStudy(), aGeomVar,
aNewGeomGroupName.toLatin1().data(), mainGeom);
}
}
if (aClientLibName == "")
{
// 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
{
// Create algorithm
if (aCreator)
aCreator->create(true, aHypName, myDlg, 0, QString::null );
- else
- SMESH::CreateHypothesis(aHypName, aHypData->Label, true);
+ else {
+ SMESH::SMESH_Hypothesis_var aHyp =
+ SMESH::CreateHypothesis(aHypName, aHypData->Label, true);
+#ifdef WITHGENERICOBJ
+ if (!CORBA::is_nil(aHyp))
+ aHyp->Destroy();
+#endif
+ }
}
QStringList tmpList;
_PTR(SComponent) aFather = SMESH::GetActiveStudyDocument()->FindComponent( "SMESH" );
//================================================================================
/*!
* \brief Verifies whether given operator is valid for this one
- * \param theOtherOp - other operation
- * \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
-* 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
-* elements.
-*/
+ * \param theOtherOp - other operation
+ * \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
+ * 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
+ * elements.
+ */
//================================================================================
bool SMESHGUI_MeshOp::isValid( SUIT_Operation* theOp ) const
{
//================================================================================
/*!
* \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 )
{
if ( theByMesh ) {
* \brief SLOT. Is called when Ok is pressed in SMESHGUI_ShapeByMeshDlg
*/
//================================================================================
-
void SMESHGUI_MeshOp::onPublishShapeByMeshDlg(SUIT_Operation* op)
{
if ( myShapeByMeshOp == op ) {
* \brief SLOT. Is called when Close is pressed in SMESHGUI_ShapeByMeshDlg
*/
//================================================================================
-
void SMESHGUI_MeshOp::onCloseShapeByMeshDlg(SUIT_Operation* op)
{
if ( myShapeByMeshOp == op && myDlg ) {
//================================================================================
/*!
* \brief Selects a SObject
- * \param theSObj - the SObject to select
+ * \param theSObj - the SObject to select
*/
//================================================================================
-
void SMESHGUI_MeshOp::selectObject( _PTR(SObject) theSObj ) const
{
if ( LightApp_SelectionMgr* sm = selectionMgr() ) {
//
// 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.h"
#define SPACING 8
#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()
// purpose :
else {
if(CheckBoxMesh->isChecked())
aMeshEditor->RotateObject(mySelectedObject, anAxis, anAngle, true);
- else
+ else
aMeshEditor->Rotate(anElementsId, anAxis, anAngle, true);
}
if( !myMesh->_is_nil())
myMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
break;
- case MAKE_MESH_BUTTON:
+ case MAKE_MESH_BUTTON: {
SMESH::SMESH_Mesh_var mesh;
- if(CheckBoxMesh->isChecked())
+ if (CheckBoxMesh->isChecked())
mesh = aMeshEditor->RotateObjectMakeMesh(mySelectedObject, anAxis, anAngle, makeGroups,
LineEditNewMesh->text().toLatin1().data());
- else
+ else
mesh = aMeshEditor->RotateMakeMesh(anElementsId, anAxis, anAngle, makeGroups,
LineEditNewMesh->text().toLatin1().data());
- if( !mesh->_is_nil())
- mesh->SetParameters( aParameters.join(":").toLatin1().constData() );
+ if (!mesh->_is_nil()) {
+ 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 (...) {
}
void SMESHGUI_RotationDlg::ClickOnHelp()
{
LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
- if (app)
+ if (app)
app->onHelpContextModule(mySMESHGUI ? app->moduleName(mySMESHGUI->moduleName()) : QString(""), myHelpFileName);
else {
QString platform;
if (aMesh) {
if (send == LineEditElements) {
Handle(SALOME_InteractiveObject) anIO = myActor->getIO();
-
+
TColStd_MapOfInteger newIndices;
-
+
QStringList aListId = theNewText.split(" ", QString::SkipEmptyParts);
for (int i = 0; i < aListId.count(); i++) {
const SMDS_MeshElement * e = aMesh->FindElement(aListId[ i ].toInt());
mySelector->AddOrRemoveIndex( anIO, newIndices, false );
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->highlight( anIO, true, true );
-
+
myElementsId = theNewText;
}
}
} else if (!SMESH::IObjectToInterface<SMESH::SMESH_subMesh>(IO)->_is_nil()) { //SUBMESH
// get submesh
SMESH::SMESH_subMesh_var aSubMesh = SMESH::IObjectToInterface<SMESH::SMESH_subMesh>(IO);
-
+
// get IDs from submesh
SMESH::long_array_var anElementsIds = new SMESH::long_array;
anElementsIds = aSubMesh->GetElementsId();
LineEditElements->setText(aString);
LineEditElements->repaint();
LineEditElements->setEnabled(false); // to update lineedit IPAL 19809
- LineEditElements->setEnabled(true);
+ LineEditElements->setEnabled(true);
setNewMeshName();
}
myBusy = false;
//
// 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.h"
#define SPACING 6
#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()
// purpose :
break;
case COPY_ELEMS_BUTTON:
if ( makeGroups ) {
- SMESH::ListOfGroups_var groups;
+ SMESH::ListOfGroups_var groups;
if(CheckBoxMesh->isChecked()) {
groups = aMeshEditor->ScaleMakeGroups(mySelectedObject, aPoint, aScaleFact);
}
if( !myMesh->_is_nil())
myMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
break;
- case MAKE_MESH_BUTTON:
- SMESH::SMESH_Mesh_var mesh;
- if(CheckBoxMesh->isChecked()) {
+ case MAKE_MESH_BUTTON: {
+ SMESH::SMESH_Mesh_var mesh;
+ if (CheckBoxMesh->isChecked()) {
mesh = aMeshEditor->ScaleMakeMesh(mySelectedObject, aPoint, aScaleFact, makeGroups,
LineEditNewMesh->text().toLatin1().data());
}
aPoint, aScaleFact, makeGroups,
LineEditNewMesh->text().toLatin1().data());
}
- if( !mesh->_is_nil())
- mesh->SetParameters( aParameters.join(":").toLatin1().constData() );
+ if (!mesh->_is_nil()) {
+ 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 (...) {
}
-
+
SMESH::UpdateView();
if ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() ||
actionButton == MAKE_MESH_BUTTON )
SMESHGUI::Modified();
}
-
+
return true;
}
void SMESHGUI_ScaleDlg::ClickOnHelp()
{
LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
- if (app)
+ if (app)
app->onHelpContextModule(mySMESHGUI ? app->moduleName(mySMESHGUI->moduleName()) : QString(""), myHelpFileName);
else {
QString platform;
#endif
SUIT_MessageBox::warning(this, tr("WRN_WARNING"),
tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
- arg(app->resourceMgr()->stringValue("ExternalBrowser",
+ arg(app->resourceMgr()->stringValue("ExternalBrowser",
platform)).
arg(myHelpFileName));
}
if (aMesh) {
Handle(SALOME_InteractiveObject) anIO = myActor->getIO();
-
+
TColStd_MapOfInteger newIndices;
QStringList aListId = theNewText.split(" ", QString::SkipEmptyParts);
mySelector->AddOrRemoveIndex( anIO, newIndices, false );
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->highlight( anIO, true, true );
-
+
myElementsId = theNewText;
}
aNbUnits = SMESH::GetNameOfSelectedElements(mySelector, IO, aString);
myElementsId = aString;
if (aNbUnits < 1)
- return;
+ return;
}
myNbOkElements = true;
LineEditElements->setText(aString);
LineEditElements->repaint();
LineEditElements->setEnabled(false); // to fully update lineedit IPAL 19809
- LineEditElements->setEnabled(true);
+ LineEditElements->setEnabled(true);
setNewMeshName();
}
//
// 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.h"
#define SPACING 6
#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()
// purpose :
aMeshEditor->MirrorObject(mySelectedObject, aMirror, aMirrorType, false );
else
aMeshEditor->Mirror(anElementsId, aMirror, aMirrorType, false );
-
+
if( !myMesh->_is_nil())
myMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
break;
}
case MAKE_MESH_BUTTON: {
SMESH::SMESH_Mesh_var mesh;
- if(CheckBoxMesh->isChecked())
+ if (CheckBoxMesh->isChecked())
mesh = aMeshEditor->MirrorObjectMakeMesh(mySelectedObject, aMirror, aMirrorType, makeGroups,
LineEditNewMesh->text().toLatin1().data());
else
mesh = aMeshEditor->MirrorMakeMesh(anElementsId, aMirror, aMirrorType, makeGroups,
LineEditNewMesh->text().toLatin1().data());
- if( !mesh->_is_nil())
- mesh->SetParameters( aParameters.join(":").toLatin1().constData() );
+ if (!mesh->_is_nil()) {
+ 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 (...) {
}
-
+
SMESH::UpdateView();
if ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() ||
actionButton == MAKE_MESH_BUTTON )
void SMESHGUI_SymmetryDlg::ClickOnHelp()
{
LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
- if (app)
+ if (app)
app->onHelpContextModule(mySMESHGUI ? app->moduleName(mySMESHGUI->moduleName()) : QString(""), myHelpFileName);
else {
QString platform;
Handle(SALOME_InteractiveObject) anIO = myActor->getIO();
TColStd_MapOfInteger newIndices;
-
+
QStringList aListId = theNewText.split(" ", QString::SkipEmptyParts);
if (send == LineEditElements) {
mySelector->AddOrRemoveIndex( anIO, newIndices, false );
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->highlight( anIO, true, true );
-
+
myElementsId = theNewText;
}
}
aNbUnits++;
}
}
-
} else if (!SMESH::IObjectToInterface<SMESH::SMESH_subMesh>(IO)->_is_nil()) { //SUBMESH
// get submesh
SMESH::SMESH_subMesh_var aSubMesh = SMESH::IObjectToInterface<SMESH::SMESH_subMesh>(IO);
myElementsId += QString(" %1").arg(anElementsIds[i]);
}
aNbUnits = anElementsIds->length();
-
} else { // GROUP
// get smesh group
SMESH::SMESH_GroupBase_var aGroup =
if (aNbUnits < 1)
return;
}
-
+
myNbOkElements = true;
} else {
aNbUnits = SMESH::GetNameOfSelectedNodes(mySelector, IO, aString);
LineEditElements->setText(aString);
LineEditElements->repaint();
LineEditElements->setEnabled(false); // to update lineedit IPAL 19809
- LineEditElements->setEnabled(true);
+ LineEditElements->setEnabled(true);
setNewMeshName();
}
myBusy = false;
//
// 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.h"
#define SPACING 6
#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()
// purpose :
break;
case COPY_ELEMS_BUTTON:
if ( makeGroups ) {
- SMESH::ListOfGroups_var groups;
+ SMESH::ListOfGroups_var groups;
if(CheckBoxMesh->isChecked())
groups = aMeshEditor->TranslateObjectMakeGroups(mySelectedObject,aVector);
else
myMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
break;
case MAKE_MESH_BUTTON:
- SMESH::SMESH_Mesh_var mesh;
- if(CheckBoxMesh->isChecked())
+ SMESH::SMESH_Mesh_var mesh;
+ if (CheckBoxMesh->isChecked())
mesh = aMeshEditor->TranslateObjectMakeMesh(mySelectedObject, aVector, makeGroups,
LineEditNewMesh->text().toLatin1().data());
else
mesh = aMeshEditor->TranslateMakeMesh(anElementsId, aVector, makeGroups,
LineEditNewMesh->text().toLatin1().data());
- if( !mesh->_is_nil())
- mesh->SetParameters( aParameters.join(":").toLatin1().constData() );
+ if (!mesh->_is_nil()) {
+ 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 (...) {
}
-
+
SMESH::UpdateView();
if ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() ||
actionButton == MAKE_MESH_BUTTON )
SMESHGUI::Modified();
}
-
+
return true;
}
void SMESHGUI_TranslationDlg::ClickOnHelp()
{
LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
- if (app)
+ if (app)
app->onHelpContextModule(mySMESHGUI ? app->moduleName(mySMESHGUI->moduleName()) : QString(""), myHelpFileName);
else {
QString platform;
#endif
SUIT_MessageBox::warning(this, tr("WRN_WARNING"),
tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
- arg(app->resourceMgr()->stringValue("ExternalBrowser",
+ arg(app->resourceMgr()->stringValue("ExternalBrowser",
platform)).
arg(myHelpFileName));
}
if (aMesh) {
Handle(SALOME_InteractiveObject) anIO = myActor->getIO();
-
+
TColStd_MapOfInteger newIndices;
QStringList aListId = theNewText.split(" ", QString::SkipEmptyParts);
mySelector->AddOrRemoveIndex( anIO, newIndices, false );
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->highlight( anIO, true, true );
-
+
myElementsId = theNewText;
}
aNbUnits = SMESH::GetNameOfSelectedElements(mySelector, IO, aString);
myElementsId = aString;
if (aNbUnits < 1)
- return;
+ return;
}
myNbOkElements = true;
LineEditElements->setText(aString);
LineEditElements->repaint();
LineEditElements->setEnabled(false); // to fully update lineedit IPAL 19809
- LineEditElements->setEnabled(true);
+ LineEditElements->setEnabled(true);
setNewMeshName();
}
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-
// 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_Mesh_i.hxx"
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : SMESH_Mesh_i.cxx
// Author : Paul RASCLE, EDF
// Module : SMESH
-//
+
#include "SMESH_Mesh_i.hxx"
#include "SMESH_Filter_i.hxx"
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
//=============================================================================
/*!
SMESH_Mesh_i::~SMESH_Mesh_i()
{
INFOS("~SMESH_Mesh_i");
- map<int, SMESH::SMESH_GroupBase_ptr>::iterator it;
- for ( it = _mapGroups.begin(); it != _mapGroups.end(); it++ ) {
- SMESH_GroupBase_i* aGroup = dynamic_cast<SMESH_GroupBase_i*>( SMESH_Gen_i::GetServant( it->second ).in() );
- if ( aGroup ) {
- // this method is colled from destructor of group (PAL6331)
+
+ // destroy groups
+ map<int, SMESH::SMESH_GroupBase_ptr>::iterator itGr;
+ for (itGr = _mapGroups.begin(); itGr != _mapGroups.end(); itGr++) {
+ 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() );
-
+#ifdef WITHGENERICOBJ
aGroup->Destroy();
+#endif
}
}
_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;
}
status = _impl->AddHypothesis(myLocSubShape, hypId);
if ( !SMESH_Hypothesis::IsStatusFatal(status) ) {
_mapHypo[hypId] = SMESH::SMESH_Hypothesis::_duplicate( myHyp );
+#ifdef WITHGENERICOBJ
+ _mapHypo[hypId]->Register();
+#endif
// assure there is a corresponding submesh
if ( !_impl->IsMainShape( myLocSubShape )) {
int shapeId = _impl->GetMeshDS()->ShapeToIndex( myLocSubShape );
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : SMESH_Mesh_i.hxx
// Author : Paul RASCLE, EDF
// Module : SMESH
-//
+
#ifndef _SMESH_MESH_I_HXX_
#define _SMESH_MESH_I_HXX_
SMESH::SMESH_Group_ptr CreateGroup( SMESH::ElementType theElemType, const char* theName )
throw (SALOME::SALOME_Exception);
-
+
SMESH::SMESH_GroupOnGeom_ptr CreateGroupFromGEOM(SMESH::ElementType theElemType,
const char* theName,
GEOM::GEOM_Object_ptr theGeomObj )
void RemoveGroup( SMESH::SMESH_GroupBase_ptr theGroup )
throw (SALOME::SALOME_Exception);
-
+
void RemoveGroupWithContents( SMESH::SMESH_GroupBase_ptr theGroup )
throw (SALOME::SALOME_Exception);
-
+
SMESH::ListOfGroups* GetGroups()
throw (SALOME::SALOME_Exception);
CORBA::Long NbGroups()
throw (SALOME::SALOME_Exception);
- SMESH::SMESH_Group_ptr UnionGroups( SMESH::SMESH_GroupBase_ptr theGroup1,
- SMESH::SMESH_GroupBase_ptr theGroup2,
+ SMESH::SMESH_Group_ptr UnionGroups( SMESH::SMESH_GroupBase_ptr theGroup1,
+ SMESH::SMESH_GroupBase_ptr theGroup2,
const char* theName )
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)
throw (SALOME::SALOME_Exception);
-
- SMESH::SMESH_Group_ptr IntersectGroups( SMESH::SMESH_GroupBase_ptr theGroup1,
- SMESH::SMESH_GroupBase_ptr theGroup2,
+
+ SMESH::SMESH_Group_ptr IntersectGroups( SMESH::SMESH_GroupBase_ptr theGroup1,
+ SMESH::SMESH_GroupBase_ptr theGroup2,
const char* theName )
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 )
throw (SALOME::SALOME_Exception);
-
- SMESH::SMESH_Group_ptr CutGroups( SMESH::SMESH_GroupBase_ptr theGroup1,
- SMESH::SMESH_GroupBase_ptr theGroup2,
+
+ SMESH::SMESH_Group_ptr CutGroups( SMESH::SMESH_GroupBase_ptr theGroup1,
+ SMESH::SMESH_GroupBase_ptr theGroup2,
const char* theName )
throw (SALOME::SALOME_Exception);
- SMESH::SMESH_Group_ptr CutListOfGroups( const SMESH::ListOfGroups& theMainGroups,
- const SMESH::ListOfGroups& theToolGroups,
+ SMESH::SMESH_Group_ptr CutListOfGroups( const SMESH::ListOfGroups& theMainGroups,
+ const SMESH::ListOfGroups& theToolGroups,
const char* theName )
throw (SALOME::SALOME_Exception);
- SMESH::SMESH_Group_ptr CreateDimGroup( const SMESH::ListOfGroups& theGroups,
- SMESH::ElementType theElemType,
+ SMESH::SMESH_Group_ptr CreateDimGroup( const SMESH::ListOfGroups& theGroups,
+ SMESH::ElementType theElemType,
const char* theName )
throw (SALOME::SALOME_Exception);
-
+
SMESH::SMESH_Group_ptr ConvertToStandalone( SMESH::SMESH_GroupOnGeom_ptr theGeomGroup );
SMESH::long_array* GetElementsByType( SMESH::ElementType theElemType )
throw (SALOME::SALOME_Exception);
-
+
SMESH::long_array* GetNodesId()
throw (SALOME::SALOME_Exception);
-
+
SMESH::ElementType GetElementType( CORBA::Long id, bool iselem )
throw (SALOME::SALOME_Exception);
-
+
SMESH::EntityType GetElementGeomType( CORBA::Long id )
throw (SALOME::SALOME_Exception);
-
+
/*!
* Returns ID of elements for given submesh
*/
*/
SMESH::long_array* GetSubMeshNodesId(CORBA::Long ShapeID, CORBA::Boolean all)
throw (SALOME::SALOME_Exception);
-
+
/*!
* Returns type of elements for given submesh
*/
SMESH::ElementType GetSubMeshElementType(CORBA::Long ShapeID)
throw (SALOME::SALOME_Exception);
-
+
char* Dump();
-
+
// Internal methods not available through CORBA
// They are called by corresponding interface methods
SMESH_Hypothesis::Hypothesis_Status addHypothesis(GEOM::GEOM_Object_ptr aSubShapeObject,
SMESH_Hypothesis::Hypothesis_Status removeHypothesis(GEOM::GEOM_Object_ptr aSubShapeObject,
SMESH::SMESH_Hypothesis_ptr anHyp);
-
+
static SMESH::Hypothesis_Status
ConvertHypothesisStatus (SMESH_Hypothesis::Hypothesis_Status theStatus);
/*!
* \brief Update hypotheses assigned to geom groups if the latter change
- *
+ *
* NPAL16168: "geometrical group edition from a submesh don't modifiy mesh computation"
*/
void CheckGeomGroupModif();
* If there is not node for given ID - returns empty list
*/
SMESH::double_array* GetNodeXYZ(CORBA::Long id);
-
+
/*!
* For given node returns list of IDs of inverse elements
* If there is not node for given ID - returns empty list
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
* If there is not element for given ID - returns -1
*/
* If there is not node for given index - returns -2
*/
CORBA::Long GetElemNode(CORBA::Long id, CORBA::Long index);
-
+
/*!
* Returns true if given node is medium node
* in given quadratic element
*/
CORBA::Boolean IsMediumNode(CORBA::Long ide, CORBA::Long idn);
-
+
/*!
* Returns true if given node is medium node
* in one of quadratic elements
*/
CORBA::Boolean IsMediumNodeOfAnyElem(CORBA::Long idn,
SMESH::ElementType theElemType);
-
+
/*!
* Returns number of edges for given element
*/
CORBA::Long ElemNbEdges(CORBA::Long id);
-
+
/*!
* Returns number of faces for given element
*/
* Returns true if given element is polygon
*/
CORBA::Boolean IsPoly(CORBA::Long id);
-
+
/*!
* Returns true if given element is quadratic
*/
CORBA::Boolean IsQuadratic(CORBA::Long id);
-
+
/*!
* Returns bary center for given element
*/
* Sets list of notebook variables used for Mesh operations separated by ":" symbol
*/
void SetParameters (const char* theParameters);
-
+
/*!
* Returns list of notebook variables used for Mesh operations separated by ":" symbol
*/
*/
static void CollectMeshInfo(const SMDS_ElemIteratorPtr theItr,
SMESH::long_array& theInfo);
-
/*!
* \brief Return submesh objects list in meshing order
*/
virtual ::CORBA::Boolean SetMeshOrder(const SMESH::submesh_array_array& theSubMeshArray);
-
+
std::map<int, SMESH_subMesh_i*> _mapSubMesh_i; //NRI
std::map<int, ::SMESH_subMesh*> _mapSubMesh; //NRI
* \brief Return new group contents if it has been changed and update group data
*/
TopoDS_Shape newGroupShape( TGeomGroupData & groupData);
-
+
};
#endif
-