From: vsr Date: Wed, 15 Jul 2009 08:11:22 +0000 (+0000) Subject: Merge from V5_1_2_BR branch (14 July 2009) X-Git-Tag: V5_1_3rc1~147 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=686a8645643ba74ea3be5646b8fc7b35a70c297d;p=modules%2Fsmesh.git Merge from V5_1_2_BR branch (14 July 2009) --- diff --git a/doc/salome/gui/SMESH/images/eleminfo1.png b/doc/salome/gui/SMESH/images/eleminfo1.png index 3aae250c8..a93a622f1 100755 Binary files a/doc/salome/gui/SMESH/images/eleminfo1.png and b/doc/salome/gui/SMESH/images/eleminfo1.png differ diff --git a/doc/salome/gui/SMESH/images/eleminfo2.png b/doc/salome/gui/SMESH/images/eleminfo2.png index 9ead335b8..c417b6d25 100755 Binary files a/doc/salome/gui/SMESH/images/eleminfo2.png and b/doc/salome/gui/SMESH/images/eleminfo2.png differ diff --git a/doc/salome/gui/SMESH/input/mesh_infos.doc b/doc/salome/gui/SMESH/input/mesh_infos.doc index 37a3deaf4..75b934c2e 100644 --- a/doc/salome/gui/SMESH/input/mesh_infos.doc +++ b/doc/salome/gui/SMESH/input/mesh_infos.doc @@ -53,8 +53,7 @@ the information is displayed in Python Console. \anchor mesh_element_info_anchor

Mesh Element Info

-The Mesh Element Info box gives basic information about the -type and the coordinates of the selected mesh element. +The Mesh Element Info dialog box gives basic information about the type, coordinates and connectivity of the selected mesh node or element. \n It is possible to input the Element ID or to select the Element in the Viewer. diff --git a/doc/salome/gui/SMESH/input/tui_defining_hypotheses.doc b/doc/salome/gui/SMESH/input/tui_defining_hypotheses.doc index bd9fbbb10..766c6d12c 100644 --- a/doc/salome/gui/SMESH/input/tui_defining_hypotheses.doc +++ b/doc/salome/gui/SMESH/input/tui_defining_hypotheses.doc @@ -382,4 +382,9 @@ n23_params = algo3D.Parameters() tetraN.Compute() \endcode +\n Other meshing algorithms: + + */ \ No newline at end of file diff --git a/resources/SalomeApp.xml b/resources/SalomeApp.xml index f2fc4e389..37f3d3ab1 100644 --- a/resources/SalomeApp.xml +++ b/resources/SalomeApp.xml @@ -68,6 +68,8 @@ + +
diff --git a/src/Controls/SMESH_Controls.cxx b/src/Controls/SMESH_Controls.cxx index e6946a84a..2ae7f399b 100644 --- a/src/Controls/SMESH_Controls.cxx +++ b/src/Controls/SMESH_Controls.cxx @@ -1955,22 +1955,22 @@ bool ElemGeomType::IsSatisfy( long theId ) case SMDSAbs_Face: if ( myGeomType == SMDSGeom_TRIANGLE ) - isOk = (!anElem->IsPoly() && aNbNode == 3); + isOk = (!anElem->IsPoly() && (anElem->IsQuadratic() ? aNbNode == 6 : aNbNode == 3)); else if ( myGeomType == SMDSGeom_QUADRANGLE ) - isOk = (!anElem->IsPoly() && aNbNode == 4); + isOk = (!anElem->IsPoly() && (anElem->IsQuadratic() ? aNbNode == 8 : aNbNode == 4)); else if ( myGeomType == SMDSGeom_POLYGON ) isOk = anElem->IsPoly(); break; case SMDSAbs_Volume: if ( myGeomType == SMDSGeom_TETRA ) - isOk = (!anElem->IsPoly() && aNbNode == 4); + isOk = (!anElem->IsPoly() && (anElem->IsQuadratic() ? aNbNode == 10 : aNbNode == 4)); else if ( myGeomType == SMDSGeom_PYRAMID ) - isOk = (!anElem->IsPoly() && aNbNode == 5); + isOk = (!anElem->IsPoly() && (anElem->IsQuadratic() ? aNbNode == 13 : aNbNode == 5)); else if ( myGeomType == SMDSGeom_PENTA ) - isOk = (!anElem->IsPoly() && aNbNode == 6); + isOk = (!anElem->IsPoly() && (anElem->IsQuadratic() ? aNbNode == 15 : aNbNode == 6)); else if ( myGeomType == SMDSGeom_HEXA ) - isOk = (!anElem->IsPoly() && aNbNode == 8); + isOk = (!anElem->IsPoly() && (anElem->IsQuadratic() ? aNbNode == 20 : aNbNode == 8)); else if ( myGeomType == SMDSGeom_POLYHEDRA ) isOk = anElem->IsPoly(); break; diff --git a/src/OBJECT/SMESH_Actor.cxx b/src/OBJECT/SMESH_Actor.cxx index 875146e23..36a44924d 100644 --- a/src/OBJECT/SMESH_Actor.cxx +++ b/src/OBJECT/SMESH_Actor.cxx @@ -1163,11 +1163,19 @@ void SMESH_ActorDef::SetEntityMode(unsigned int theMode){ aFilter = myBaseActor->GetExtractUnstructuredGrid(); aFilter->ClearRegisteredCellsWithType(); aFilter->SetModeOfChanging(VTKViewer_ExtractUnstructuredGrid::eAdding); + + VTKViewer_ExtractUnstructuredGrid* aHightFilter = myHighlitableActor->GetExtractUnstructuredGrid(); + aHightFilter->ClearRegisteredCellsWithType(); + aHightFilter->SetModeOfChanging(VTKViewer_ExtractUnstructuredGrid::eAdding); + if(myEntityMode & eEdges){ if (MYDEBUG) MESSAGE("EDGES"); aFilter->RegisterCellsWithType(VTK_LINE); aFilter->RegisterCellsWithType(VTK_QUADRATIC_EDGE); + + aHightFilter->RegisterCellsWithType(VTK_LINE); + aHightFilter->RegisterCellsWithType(VTK_QUADRATIC_EDGE); } if(myEntityMode & eFaces){ @@ -1177,6 +1185,12 @@ void SMESH_ActorDef::SetEntityMode(unsigned int theMode){ aFilter->RegisterCellsWithType(VTK_QUAD); aFilter->RegisterCellsWithType(VTK_QUADRATIC_TRIANGLE); aFilter->RegisterCellsWithType(VTK_QUADRATIC_QUAD); + + aHightFilter->RegisterCellsWithType(VTK_TRIANGLE); + aHightFilter->RegisterCellsWithType(VTK_POLYGON); + aHightFilter->RegisterCellsWithType(VTK_QUAD); + aHightFilter->RegisterCellsWithType(VTK_QUADRATIC_TRIANGLE); + aHightFilter->RegisterCellsWithType(VTK_QUADRATIC_QUAD); } if(myEntityMode & eVolumes){ @@ -1190,6 +1204,16 @@ void SMESH_ActorDef::SetEntityMode(unsigned int theMode){ aFilter->RegisterCellsWithType(VTK_QUADRATIC_HEXAHEDRON); aFilter->RegisterCellsWithType(VTK_QUADRATIC_WEDGE); aFilter->RegisterCellsWithType(VTK_CONVEX_POINT_SET); + + aHightFilter->RegisterCellsWithType(VTK_TETRA); + aHightFilter->RegisterCellsWithType(VTK_VOXEL); + aHightFilter->RegisterCellsWithType(VTK_HEXAHEDRON); + aHightFilter->RegisterCellsWithType(VTK_WEDGE); + aHightFilter->RegisterCellsWithType(VTK_PYRAMID); + aHightFilter->RegisterCellsWithType(VTK_QUADRATIC_TETRA); + aHightFilter->RegisterCellsWithType(VTK_QUADRATIC_HEXAHEDRON); + aHightFilter->RegisterCellsWithType(VTK_QUADRATIC_WEDGE); + aHightFilter->RegisterCellsWithType(VTK_CONVEX_POINT_SET); } aFilter->Update(); if (MYDEBUG) MESSAGE(aFilter->GetOutput()->GetNumberOfCells()); diff --git a/src/SMDS/SMDSAbs_ElementType.hxx b/src/SMDS/SMDSAbs_ElementType.hxx index a76772e3f..2a5d8e3ba 100644 --- a/src/SMDS/SMDSAbs_ElementType.hxx +++ b/src/SMDS/SMDSAbs_ElementType.hxx @@ -53,8 +53,8 @@ enum SMDSAbs_GeometryType // 3D element SMDSGeom_TETRA, SMDSGeom_PYRAMID, - SMDSGeom_PENTA, SMDSGeom_HEXA, + SMDSGeom_PENTA, SMDSGeom_POLYHEDRA, }; diff --git a/src/SMESH/SMESH_MeshEditor.cxx b/src/SMESH/SMESH_MeshEditor.cxx index d7a64c1cd..09cf80bf9 100644 --- a/src/SMESH/SMESH_MeshEditor.cxx +++ b/src/SMESH/SMESH_MeshEditor.cxx @@ -4971,7 +4971,7 @@ struct SMESH_NodeSearcherImpl: public SMESH_NodeSearcher SMDS_MeshNode tgtNode( thePnt.X(), thePnt.Y(), thePnt.Z() ); list nodes; const double precision = 1e-6; - myOctreeNode->NodesAround( &tgtNode, &nodes, precision ); + //myOctreeNode->NodesAround( &tgtNode, &nodes, precision ); double minSqDist = DBL_MAX; Bnd_B3d box; diff --git a/src/SMESHGUI/SMESHGUI.cxx b/src/SMESHGUI/SMESHGUI.cxx index e485f10ff..8904fb435 100644 --- a/src/SMESHGUI/SMESHGUI.cxx +++ b/src/SMESHGUI/SMESHGUI.cxx @@ -23,7 +23,7 @@ // File : SMESHGUI.cxx // Author : Nicolas REJNERI, Open CASCADE S.A.S. // SMESH includes -// + #include "SMESHGUI.h" #include "SMESHGUI_NodesDlg.h" #include "SMESHGUI_TransparencyDlg.h" @@ -2091,9 +2091,12 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) /* Warning : however by internal mechanism all subMeshes icons are changed ! */ if ( !aHypothesis->_is_nil() ) { - SMESHGUI_GenericHypothesisCreator* aCreator = SMESH::GetHypothesisCreator(aHypothesis->GetName()); - if (aCreator) + // BUG 0020378 + //SMESHGUI_GenericHypothesisCreator* aCreator = SMESH::GetHypothesisCreator(aHypothesis->GetName()); + SMESH::HypothesisCreatorPtr aCreator = SMESH::GetHypothesisCreator(aHypothesis->GetName()); + if (aCreator) { aCreator->edit( aHypothesis.in(), anIObject->getName(), desktop() ); + } else { // report error @@ -3056,8 +3059,7 @@ void SMESHGUI::initialize( CAM_Application* app ) popupMgr()->insert( separator(), -1, 0 ); createPopupItem( 701, OB, mesh, "&& isComputable" ); // COMPUTE - createPopupItem( 711, OB, mesh, "&& isComputable" ); // PRECOMPUTE - createPopupItem( 712, OB, mesh ); // EVALUATE + createPopupItem( 711, OB, mesh, "&& isComputable && isPreComputable" ); // PRECOMPUTE createPopupItem( 214, OB, mesh_group ); // UPDATE createPopupItem( 900, OB, mesh_group ); // ADV_INFO createPopupItem( 902, OB, mesh ); // STD_INFO diff --git a/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx b/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx index 1852b4b61..142edf8d3 100644 --- a/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx @@ -1622,7 +1622,7 @@ void SMESHGUI_PrecomputeOp::stopOperation() //================================================================================ /*! - * \brief perform it's intention action: reinitialise dialog + * \brief reinitialize dialog after operaiton become active again */ //================================================================================ @@ -1633,16 +1633,48 @@ void SMESHGUI_PrecomputeOp::resumeOperation() SMESHGUI_BaseComputeOp::resumeOperation(); } +//================================================================================ +/*! + * \brief perform it's intention action: reinitialise dialog + */ +//================================================================================ + void SMESHGUI_PrecomputeOp::initDialog() { QList modes; + QMap modeMap; + _PTR(SObject) pMesh = studyDS()->FindObjectID( myIObject->getEntry() ); + getAssignedAlgos( pMesh, modeMap ); + if ( modeMap.contains( SMESH::DIM_3D ) ) + { + if ( modeMap.contains( SMESH::DIM_2D ) ) + modes.append( SMESH::DIM_2D ); + if ( modeMap.contains( SMESH::DIM_1D ) ) + modes.append( SMESH::DIM_1D ); + } + else if ( modeMap.contains( SMESH::DIM_2D ) ) + { + if ( modeMap.contains( SMESH::DIM_1D ) ) + modes.append( SMESH::DIM_1D ); + } + + myDlg->setPreviewModes( modes ); +} + +//================================================================================ +/*! + * \brief detect asigned mesh algorithms + */ +//================================================================================ + +void SMESHGUI_PrecomputeOp::getAssignedAlgos(_PTR(SObject) theMesh, + QMap& theModeMap) +{ _PTR(SObject) aHypRoot; _PTR(GenericAttribute) anAttr; int aPart = SMESH::Tag_RefOnAppliedAlgorithms; - - _PTR(SObject) pMesh = studyDS()->FindObjectID( myIObject->getEntry() ); - if ( pMesh && pMesh->FindSubObject( aPart, aHypRoot ) ) + if ( theMesh && theMesh->FindSubObject( aPart, aHypRoot ) ) { _PTR(ChildIterator) anIter = SMESH::GetActiveStudyDocument()->NewChildIterator( aHypRoot ); @@ -1660,28 +1692,22 @@ void SMESHGUI_PrecomputeOp::initDialog() CORBA::Object_var aVar = _CAST(SObject,anObj)->GetObject(); if ( CORBA::is_nil( aVar ) ) continue; - - SMESH::SMESH_Algo_var algo = SMESH::SMESH_3D_Algo::_narrow( aVar ); - if ( !algo->_is_nil() ) - { - modeMap[ SMESH::DIM_1D ] = 0; - modeMap[ SMESH::DIM_2D ] = 0; - } - else + + for( int dim = SMESH::DIM_1D; dim <= SMESH::DIM_3D; dim++ ) { - algo = SMESH::SMESH_2D_Algo::_narrow( aVar ); + SMESH::SMESH_Algo_var algo; + switch(dim) { + case SMESH::DIM_1D: algo = SMESH::SMESH_1D_Algo::_narrow( aVar ); break; + case SMESH::DIM_2D: algo = SMESH::SMESH_2D_Algo::_narrow( aVar ); break; + case SMESH::DIM_3D: algo = SMESH::SMESH_3D_Algo::_narrow( aVar ); break; + default: break; + } if ( !algo->_is_nil() ) - modeMap[ SMESH::DIM_1D ] = 0; + theModeMap[ dim ] = 0; } } } } - if ( modeMap.contains( SMESH::DIM_1D ) ) - modes.append( SMESH::DIM_1D ); - if ( modeMap.contains( SMESH::DIM_2D ) ) - modes.append( SMESH::DIM_2D ); - - myDlg->setPreviewModes( modes ); } //================================================================================ diff --git a/src/SMESHGUI/SMESHGUI_ComputeDlg.h b/src/SMESHGUI/SMESHGUI_ComputeDlg.h index c07e86746..d88731203 100644 --- a/src/SMESHGUI/SMESHGUI_ComputeDlg.h +++ b/src/SMESHGUI/SMESHGUI_ComputeDlg.h @@ -147,6 +147,12 @@ public: virtual LightApp_Dialog* dlg() const; + /** + * \brief returns map of assigned algorithms modes + */ + static void getAssignedAlgos(_PTR(SObject) theMesh, + QMap& theModeMap); + protected: virtual void startOperation(); virtual void stopOperation(); diff --git a/src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx b/src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx index 170292e47..2ed912383 100644 --- a/src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx @@ -337,6 +337,7 @@ SMESHGUI_ExtrusionDlg::~SMESHGUI_ExtrusionDlg() void SMESHGUI_ExtrusionDlg::Init (bool ResetControls) { myBusy = false; + myIDs.clear(); LineEditElements->clear(); myNbOkElements = 0; @@ -400,6 +401,8 @@ void SMESHGUI_ExtrusionDlg::ConstructorsClicked (int constructorId) GroupArguments->setTitle(tr("EXTRUSION_1D")); if (!CheckBoxMesh->isChecked()) { + LineEditElements->clear(); + myIDs.clear(); if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI )) aViewWindow->SetSelectionMode(EdgeSelection); } @@ -410,6 +413,8 @@ void SMESHGUI_ExtrusionDlg::ConstructorsClicked (int constructorId) GroupArguments->setTitle(tr("EXTRUSION_2D")); if (!CheckBoxMesh->isChecked()) { + LineEditElements->clear(); + myIDs.clear(); if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI )) aViewWindow->SetSelectionMode(FaceSelection); } @@ -586,17 +591,6 @@ void SMESHGUI_ExtrusionDlg::ClickOnOk() //================================================================================= void SMESHGUI_ExtrusionDlg::ClickOnCancel() { - disconnect(mySelectionMgr, 0, this, 0); - mySelectionMgr->clearFilters(); - //mySelectionMgr->clearSelected(); - if (SMESH::GetCurrentVtkView()) { - SMESH::RemoveFilters(); // PAL6938 -- clean all mesh entity filters - SMESH::SetPointRepresentation(false); - SMESH::SetPickable(); - } - if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI )) - aViewWindow->SetSelectionMode(ActorSelection); - mySMESHGUI->ResetState(); reject(); } @@ -878,16 +872,45 @@ void SMESHGUI_ExtrusionDlg::enterEvent (QEvent*) ActivateThisDialog(); } +//================================================================================= +// function : closeEvent() +// purpose : +//================================================================================= +void SMESHGUI_ExtrusionDlg::closeEvent( QCloseEvent* ) +{ + /* same than click on cancel button */ + disconnect(mySelectionMgr, 0, this, 0); + mySelectionMgr->clearFilters(); + //mySelectionMgr->clearSelected(); + if (SMESH::GetCurrentVtkView()) { + SMESH::RemoveFilters(); // PAL6938 -- clean all mesh entity filters + SMESH::SetPointRepresentation(false); + SMESH::SetPickable(); + } + if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI )) + aViewWindow->SetSelectionMode(ActorSelection); + mySMESHGUI->ResetState(); +} + +void SMESHGUI_ExtrusionDlg::reject() +{ + QDialog::reject(); + close(); +} + //================================================================================= // function : onSelectMesh() // purpose : //================================================================================= void SMESHGUI_ExtrusionDlg::onSelectMesh (bool toSelectMesh) { - if (toSelectMesh) + if (toSelectMesh) { + myIDs = LineEditElements->text(); TextLabelElements->setText(tr("SMESH_NAME")); + } else TextLabelElements->setText(tr("SMESH_ID_ELEMENTS")); + myFilterBtn->setEnabled(!toSelectMesh); if (myEditCurrentArgument != LineEditElements) { @@ -910,7 +933,7 @@ void SMESHGUI_ExtrusionDlg::onSelectMesh (bool toSelectMesh) if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI )) aViewWindow->SetSelectionMode(EdgeSelection); } - else if (aConstructorId == 0) + else if (aConstructorId == 1) { if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI )) aViewWindow->SetSelectionMode(FaceSelection); @@ -922,6 +945,9 @@ void SMESHGUI_ExtrusionDlg::onSelectMesh (bool toSelectMesh) } SelectionIntoArgument(); + + if (!toSelectMesh) + LineEditElements->setText( myIDs ); } //================================================================================= diff --git a/src/SMESHGUI/SMESHGUI_ExtrusionDlg.h b/src/SMESHGUI/SMESHGUI_ExtrusionDlg.h index 6a1b353ee..4425d29f7 100644 --- a/src/SMESHGUI/SMESHGUI_ExtrusionDlg.h +++ b/src/SMESHGUI/SMESHGUI_ExtrusionDlg.h @@ -69,9 +69,12 @@ public: SMESHGUI_ExtrusionDlg( SMESHGUI* ); ~SMESHGUI_ExtrusionDlg(); + void reject(); + private: void Init( bool = true ); void enterEvent( QEvent* ); /* mouse enter the QWidget */ + void closeEvent( QCloseEvent* ); void keyPressEvent( QKeyEvent* ); int GetConstructorId(); @@ -135,6 +138,7 @@ private: QPushButton* buttonHelp; QString myHelpFileName; + QString myIDs; QPushButton* myFilterBtn; SMESHGUI_FilterDlg* myFilterDlg; diff --git a/src/SMESHGUI/SMESHGUI_GroupDlg.cxx b/src/SMESHGUI/SMESHGUI_GroupDlg.cxx index dc98cd310..01e0f8195 100644 --- a/src/SMESHGUI/SMESHGUI_GroupDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_GroupDlg.cxx @@ -560,11 +560,11 @@ void SMESHGUI_GroupDlg::init (SMESH::SMESH_GroupBase_ptr theGroup, myGrpTypeGroup->button(grpType)->setChecked(true); onGrpTypeChanged(grpType); + myTypeId = aType; if ( grpType == 0 ) { myCurrentLineEdit = 0; myElements->clear(); setSelectionMode(aType); - myTypeId = aType; setShowEntityMode(); // depends on myTypeId diff --git a/src/SMESHGUI/SMESHGUI_Hypotheses.cxx b/src/SMESHGUI/SMESHGUI_Hypotheses.cxx index 3e3c6338f..19023d018 100644 --- a/src/SMESHGUI/SMESHGUI_Hypotheses.cxx +++ b/src/SMESHGUI/SMESHGUI_Hypotheses.cxx @@ -498,10 +498,10 @@ void SMESHGUI_GenericHypothesisCreator::onReject() QString SMESHGUI_GenericHypothesisCreator::helpPage() const { QString aHypType = hypType(); - QString aHelpFileName; + QString aHelpFileName = ""; if ( aHypType == "LocalLength" ) aHelpFileName = "a1d_meshing_hypo_page.html#average_length_anchor"; - if ( aHypType == "MaxLength" ) + else if ( aHypType == "MaxLength" ) aHelpFileName = "a1d_meshing_hypo_page.html#max_length_anchor"; else if ( aHypType == "Arithmetic1D") aHelpFileName = "a1d_meshing_hypo_page.html#arithmetic_1d_anchor"; @@ -528,9 +528,8 @@ QString SMESHGUI_GenericHypothesisCreator::helpPage() const else if ( aHypType == "LayerDistribution") aHelpFileName = "radial_prism_algo_page.html"; else if ( aHypType == "SegmentLengthAroundVertex") - aHelpFileName = "segments_around_vertex_algo.html"; - else - aHelpFileName = ""; + aHelpFileName = "segments_around_vertex_algo_page.html"; + return aHelpFileName; } diff --git a/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx b/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx index 5f3500230..50de8b762 100644 --- a/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx +++ b/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx @@ -22,8 +22,8 @@ // SMESH SMESHGUI : GUI for SMESH component // File : SMESHGUI_HypothesesUtils.cxx // Author : Julia DOROVSKIKH, Open CASCADE S.A.S. + // SMESH includes -// #include "SMESHGUI_HypothesesUtils.h" #include "SMESHGUI.h" @@ -82,8 +82,9 @@ namespace SMESH THypothesisDataMap myHypothesesMap; THypothesisDataMap myAlgorithmsMap; - typedef QMap THypCreatorMap; - THypCreatorMap myHypCreatorMap; + // BUG 0020378 + //typedef QMap THypCreatorMap; + //THypCreatorMap myHypCreatorMap; QList myListOfHypothesesSets; @@ -319,24 +320,26 @@ namespace SMESH return false; } - SMESHGUI_GenericHypothesisCreator* GetHypothesisCreator(const QString& aHypType) + HypothesisCreatorPtr GetHypothesisCreator(const QString& aHypType) { if(MYDEBUG) MESSAGE("Get HypothesisCreator for " << aHypType.toLatin1().data()); SMESHGUI_GenericHypothesisCreator* aCreator = 0; // check, if creator for this hypothesis type already exists - if (myHypCreatorMap.find(aHypType) != myHypCreatorMap.end()) { - aCreator = myHypCreatorMap[aHypType]; - } - else { + // BUG 0020378 + //if (myHypCreatorMap.find(aHypType) != myHypCreatorMap.end()) { + // aCreator = myHypCreatorMap[aHypType]; + //} + //else + { // 1. Init list of available hypotheses, if needed InitAvailableHypotheses(); // 2. Get names of plugin libraries HypothesisData* aHypData = GetHypothesisData(aHypType); if (!aHypData) - return aCreator; + return HypothesisCreatorPtr(aCreator); QString aClientLibName = aHypData->ClientLibName; QString aServerLibName = aHypData->ServerLibName; @@ -376,7 +379,8 @@ namespace SMESH } else { // map hypothesis creator to a hypothesis name - myHypCreatorMap[aHypType] = aCreator; + // BUG 0020378 + //myHypCreatorMap[aHypType] = aCreator; } } } @@ -386,7 +390,7 @@ namespace SMESH } } - return aCreator; + return HypothesisCreatorPtr(aCreator); } diff --git a/src/SMESHGUI/SMESHGUI_HypothesesUtils.h b/src/SMESHGUI/SMESHGUI_HypothesesUtils.h index 18813f4c8..89c1335df 100644 --- a/src/SMESHGUI/SMESHGUI_HypothesesUtils.h +++ b/src/SMESHGUI/SMESHGUI_HypothesesUtils.h @@ -22,7 +22,7 @@ // SMESH SMESHGUI : GUI for SMESH component // File : SMESHGUI_HypothesesUtils.h // Author : Julia DOROVSKIKH, Open CASCADE S.A.S. -// + #ifndef SMESHGUI_HYPOTHESESUTILS_H #define SMESHGUI_HYPOTHESESUTILS_H @@ -47,6 +47,9 @@ // STL includes #include +// boost includes +#include + class HypothesisData; class HypothesesSet; class SMESHGUI_GenericHypothesisCreator; @@ -55,6 +58,8 @@ class algo_error_array; namespace SMESH { + typedef boost::shared_ptr HypothesisCreatorPtr; + SMESHGUI_EXPORT void InitAvailableHypotheses(); @@ -82,12 +87,12 @@ namespace SMESH const HypothesisData* ); SMESHGUI_EXPORT - SMESHGUI_GenericHypothesisCreator* GetHypothesisCreator( const QString& ); + HypothesisCreatorPtr GetHypothesisCreator( const QString& ); SMESHGUI_EXPORT SMESH::SMESH_Hypothesis_ptr CreateHypothesis( const QString&, - const QString&, - const bool = false); + const QString&, + const bool = false ); SMESHGUI_EXPORT bool AddHypothesisOnMesh( SMESH::SMESH_Mesh_ptr, SMESH::SMESH_Hypothesis_ptr ); diff --git a/src/SMESHGUI/SMESHGUI_MeshOp.cxx b/src/SMESHGUI/SMESHGUI_MeshOp.cxx index c617ecc79..f34871254 100644 --- a/src/SMESHGUI/SMESHGUI_MeshOp.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshOp.cxx @@ -22,8 +22,8 @@ // 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" @@ -1053,7 +1053,9 @@ void SMESHGUI_MeshOp::createHypothesis (const int theDim, SMESH::CreateHypothesis(theTypeName, aHypName, false); } else { // Get hypotheses creator client (GUI) - SMESHGUI_GenericHypothesisCreator* aCreator = SMESH::GetHypothesisCreator(theTypeName); + // BUG 0020378 + //SMESHGUI_GenericHypothesisCreator* aCreator = SMESH::GetHypothesisCreator(theTypeName); + SMESH::HypothesisCreatorPtr aCreator = SMESH::GetHypothesisCreator(theTypeName); // Create hypothesis if (aCreator) { @@ -1117,7 +1119,9 @@ void SMESHGUI_MeshOp::onEditHyp( const int theHypType, const int theIndex ) if ( aHyp->_is_nil() ) return; - SMESHGUI_GenericHypothesisCreator* aCreator = SMESH::GetHypothesisCreator( aHyp->GetName() ); + // BUG 0020378 + //SMESHGUI_GenericHypothesisCreator* aCreator = SMESH::GetHypothesisCreator(aHyp->GetName()); + SMESH::HypothesisCreatorPtr aCreator = SMESH::GetHypothesisCreator(aHyp->GetName()); if ( aCreator ) { // Get initial parameters @@ -1699,11 +1703,14 @@ SMESH::SMESH_Hypothesis_var SMESHGUI_MeshOp::getAlgo( const int theDim ) SMESH::CreateHypothesis(aHypName, aHypData->Label, true); } else { // Get hypotheses creator client (GUI) - SMESHGUI_GenericHypothesisCreator* aCreator = SMESH::GetHypothesisCreator(aHypName); + // BUG 0020378 + //SMESHGUI_GenericHypothesisCreator* aCreator = SMESH::GetHypothesisCreator(aHypName); + SMESH::HypothesisCreatorPtr aCreator = SMESH::GetHypothesisCreator(aHypName); // Create algorithm - if (aCreator) + if (aCreator) { aCreator->create(true, aHypName, myDlg); + } else SMESH::CreateHypothesis(aHypName, aHypData->Label, true); } diff --git a/src/SMESHGUI/SMESHGUI_RevolutionDlg.cxx b/src/SMESHGUI/SMESHGUI_RevolutionDlg.cxx index 6003776fb..e9e7fef05 100644 --- a/src/SMESHGUI/SMESHGUI_RevolutionDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_RevolutionDlg.cxx @@ -93,7 +93,8 @@ SMESHGUI_RevolutionDlg::SMESHGUI_RevolutionDlg( SMESHGUI* theModule ) mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ), myVectorDefinition(NONE_SELECT), myFilterDlg( 0 ), - mySelectedObject(SMESH::SMESH_IDSource::_nil()) + mySelectedObject(SMESH::SMESH_IDSource::_nil()), + myActor(0) { mySimulation = new SMESHGUI_MeshEditPreview(SMESH::GetViewWindow( mySMESHGUI )); @@ -383,6 +384,7 @@ void SMESHGUI_RevolutionDlg::Init (bool ResetControls) LineEditElements->clear(); myElementsId = ""; myNbOkElements = 0; + myIDs.clear(); myActor = 0; myMesh = SMESH::SMESH_Mesh::_nil(); @@ -412,14 +414,13 @@ void SMESHGUI_RevolutionDlg::Init (bool ResetControls) //================================================================================= void SMESHGUI_RevolutionDlg::ConstructorsClicked (int constructorId) { - //disconnect(mySelectionMgr, 0, this, 0); + disconnect(mySelectionMgr, 0, this, 0); - SALOME_ListIO io; + /* SALOME_ListIO io; mySelectionMgr->selectedObjects( io ); SALOME_ListIO aList; - mySelectionMgr->setSelectedObjects( aList ); -// LineEditElements->clear(); - myNbOkElements = 0; + mySelectionMgr->setSelectedObjects( aList );*/ + buttonApply->setEnabled(false); buttonOk->setEnabled(false); mySimulation->SetVisibility(false); @@ -447,6 +448,9 @@ void SMESHGUI_RevolutionDlg::ConstructorsClicked (int constructorId) if (!CheckBoxMesh->isChecked()) { + LineEditElements->clear(); + myIDs.clear(); + myNbOkElements = 0; if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI )) aViewWindow->SetSelectionMode(aSelMode); } @@ -457,8 +461,8 @@ void SMESHGUI_RevolutionDlg::ConstructorsClicked (int constructorId) if (CheckBoxMesh->isChecked()) onSelectMesh(true); - //connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - mySelectionMgr->setSelectedObjects( io ); + connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); + // mySelectionMgr->setSelectedObjects( io ); } //================================================================================= @@ -545,6 +549,7 @@ bool SMESHGUI_RevolutionDlg::ClickOnApply() } SMESH::UpdateView(); + SMESH::Update(myIO, SMESH::eDisplay); if ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() ) mySMESHGUI->updateObjBrowser(true); // new groups may appear Init(false); @@ -572,19 +577,14 @@ void SMESHGUI_RevolutionDlg::ClickOnOk() //================================================================================= void SMESHGUI_RevolutionDlg::ClickOnCancel() { - disconnect(mySelectionMgr, 0, this, 0); - mySelectionMgr->clearFilters(); - //mySelectionMgr->clearSelected(); - if (SMESH::GetCurrentVtkView()) { - SMESH::RemoveFilters(); // PAL6938 -- clean all mesh entity filters - SMESH::SetPointRepresentation(false); - } - if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI )) - aViewWindow->SetSelectionMode(ActorSelection); - mySMESHGUI->ResetState(); reject(); } +void SMESHGUI_RevolutionDlg::reject() +{ + close(); +} + //================================================================================= // function : ClickOnHelp() // purpose : @@ -685,7 +685,6 @@ void SMESHGUI_RevolutionDlg::SelectionIntoArgument() if (myBusy) return; // clear - myActor = 0; QString aString = ""; myBusy = true; @@ -708,20 +707,23 @@ void SMESHGUI_RevolutionDlg::SelectionIntoArgument() return; Handle(SALOME_InteractiveObject) IO = aList.First(); - myMesh = SMESH::GetMeshByIO(IO); - if (myMesh->_is_nil()) + SMESH::SMESH_Mesh_var aMeshVar = SMESH::GetMeshByIO(IO); + if (aMeshVar->_is_nil()) return; - myActor = SMESH::FindActorByObject(myMesh); - if (!myActor) - myActor = SMESH::FindActorByEntry(IO->getEntry()); - if (!myActor) + SMESH_Actor* anActor = SMESH::FindActorByObject(aMeshVar); + if (!anActor) + anActor = SMESH::FindActorByEntry(IO->getEntry()); + if (!anActor) return; int aNbUnits = 0; if (myEditCurrentArgument == (QWidget*)LineEditElements) { myElementsId = ""; + myMesh = aMeshVar; + myActor = anActor; + myIO = IO; // MakeGroups is available if there are groups if ( myMesh->NbGroups() == 0 ) { @@ -747,7 +749,7 @@ void SMESHGUI_RevolutionDlg::SelectionIntoArgument() myNbOkElements = true; } else { - SMDS_Mesh* aMesh = myActor->GetObject()->GetMesh(); + SMDS_Mesh* aMesh = anActor->GetObject()->GetMesh(); if (!aMesh) return; @@ -909,17 +911,16 @@ void SMESHGUI_RevolutionDlg::enterEvent (QEvent*) void SMESHGUI_RevolutionDlg::closeEvent (QCloseEvent*) { /* same than click on cancel button */ - ClickOnCancel(); -} - -//======================================================================= -// function : hideEvent() -// purpose : caused by ESC key -//======================================================================= -void SMESHGUI_RevolutionDlg::hideEvent (QHideEvent*) -{ - if (!isMinimized()) - ClickOnCancel(); + disconnect(mySelectionMgr, 0, this, 0); + mySelectionMgr->clearFilters(); + //mySelectionMgr->clearSelected(); + if (SMESH::GetCurrentVtkView()) { + SMESH::RemoveFilters(); // PAL6938 -- clean all mesh entity filters + SMESH::SetPointRepresentation(false); + } + if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI )) + aViewWindow->SetSelectionMode(ActorSelection); + mySMESHGUI->ResetState(); } //======================================================================= @@ -928,8 +929,10 @@ void SMESHGUI_RevolutionDlg::hideEvent (QHideEvent*) //======================================================================= void SMESHGUI_RevolutionDlg::onSelectMesh (bool toSelectMesh) { - if (toSelectMesh) + if (toSelectMesh) { + myIDs = LineEditElements->text(); TextLabelElements->setText(tr("SMESH_NAME")); + } else TextLabelElements->setText(tr("SMESH_ID_ELEMENTS")); myFilterBtn->setEnabled(!toSelectMesh); @@ -956,7 +959,7 @@ void SMESHGUI_RevolutionDlg::onSelectMesh (bool toSelectMesh) if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI )) aViewWindow->SetSelectionMode(EdgeSelection); } - else if (aConstructorId == 0) + else if (aConstructorId == 1) { if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI )) aViewWindow->SetSelectionMode(FaceSelection); @@ -969,6 +972,9 @@ void SMESHGUI_RevolutionDlg::onSelectMesh (bool toSelectMesh) } SelectionIntoArgument(); + + if (!toSelectMesh) + LineEditElements->setText( myIDs ); } //================================================================================= @@ -1118,6 +1124,8 @@ void SMESHGUI_RevolutionDlg::onSelectVectorMenu( QAction* action){ if(!action) return; + disconnect(mySelectionMgr, 0, this, 0); + switch(myMenuActions[action]) { case POINT_SELECT: SMESH::SetPointRepresentation(true); diff --git a/src/SMESHGUI/SMESHGUI_RevolutionDlg.h b/src/SMESHGUI/SMESHGUI_RevolutionDlg.h index 028817e98..4d0c51693 100644 --- a/src/SMESHGUI/SMESHGUI_RevolutionDlg.h +++ b/src/SMESHGUI/SMESHGUI_RevolutionDlg.h @@ -29,6 +29,9 @@ // SMESH includes #include "SMESH_SMESHGUI.hxx" +// SALOME GUI includes +#include + // Qt includes #include #include @@ -70,13 +73,14 @@ public: SMESHGUI_RevolutionDlg( SMESHGUI* ); ~SMESHGUI_RevolutionDlg(); + void reject(); + private: enum {NONE_SELECT, POINT_SELECT, FACE_SELECT}; void Init( bool = true); void closeEvent( QCloseEvent* ); void enterEvent( QEvent* ); /* mouse enter the QWidget */ - void hideEvent( QHideEvent* ); /* ESC key */ void keyPressEvent( QKeyEvent* ); int GetConstructorId(); bool IsAxisOk(); @@ -90,6 +94,7 @@ private: QString myElementsId; QWidget* myEditCurrentArgument; /* Current argument */ SVTK_Selector* mySelector; + Handle(SALOME_InteractiveObject) myIO; SMESH::SMESH_IDSource_var mySelectedObject; @@ -152,6 +157,7 @@ private: QString myHelpFileName; + QString myIDs; QPushButton* myFilterBtn; SMESHGUI_FilterDlg* myFilterDlg; diff --git a/src/SMESHGUI/SMESHGUI_Selection.cxx b/src/SMESHGUI/SMESHGUI_Selection.cxx index e49ee940b..d3b80a7c4 100644 --- a/src/SMESHGUI/SMESHGUI_Selection.cxx +++ b/src/SMESHGUI/SMESHGUI_Selection.cxx @@ -29,6 +29,7 @@ #include "SMESHGUI_Utils.h" #include "SMESHGUI_VTKUtils.h" #include "SMESHGUI_GEOMGenUtils.h" +#include "SMESHGUI_ComputeDlg.h" #include #include @@ -113,6 +114,7 @@ QVariant SMESHGUI_Selection::parameter( const int ind, const QString& p ) const else if ( p=="controlMode" ) val = QVariant( controlMode( ind ) ); else if ( p=="displayMode" ) val = QVariant( displayMode( ind ) ); else if ( p=="isComputable" ) val = QVariant( isComputable( ind ) ); + else if ( p=="isPreComputable" ) val = QVariant( isPreComputable( ind ) ); else if ( p=="hasReference" ) val = QVariant( hasReference( ind ) ); else if ( p=="isImported" ) val = QVariant( isImported( ind ) ); else if ( p=="facesOrientationMode" ) val = QVariant( facesOrientationMode( ind ) ); @@ -384,6 +386,23 @@ QVariant SMESHGUI_Selection::isComputable( int ind ) const return QVariant( false ); } +//======================================================================= +//function : isPreComputable +//purpose : +//======================================================================= + +QVariant SMESHGUI_Selection::isPreComputable( int ind ) const +{ + if ( ind >= 0 && ind < myTypes.count() && myTypes[ind] != "Unknown" ) + { + QMap modeMap; + _PTR(SObject) pMesh = SMESH::GetActiveStudyDocument()->FindObjectID( entry( ind ).toLatin1().data() ); + SMESHGUI_PrecomputeOp::getAssignedAlgos( pMesh, modeMap ); + return QVariant( modeMap.size() > 1 ); + } + return QVariant( false ); +} + //======================================================================= //function : hasReference //purpose : diff --git a/src/SMESHGUI/SMESHGUI_Selection.h b/src/SMESHGUI/SMESHGUI_Selection.h index e1b1cc2df..ce64db54a 100644 --- a/src/SMESHGUI/SMESHGUI_Selection.h +++ b/src/SMESHGUI/SMESHGUI_Selection.h @@ -54,6 +54,7 @@ public: virtual bool isAutoColor( int ) const; virtual int numberOfNodes( int ) const; virtual QVariant isComputable( int ) const; + virtual QVariant isPreComputable( int ) const; virtual QVariant hasReference( int ) const; virtual QVariant isVisible( int ) const; diff --git a/src/SMESH_I/SMESH_DumpPython.cxx b/src/SMESH_I/SMESH_DumpPython.cxx index e67e4a355..07ab0f695 100644 --- a/src/SMESH_I/SMESH_DumpPython.cxx +++ b/src/SMESH_I/SMESH_DumpPython.cxx @@ -130,6 +130,26 @@ namespace SMESH return *this; } + TPythonDump& + TPythonDump:: + operator<<(const SMESH::GeometryType& theArg) + { + myStream<<"SMESH."; + switch(theArg){ + case Geom_POINT: myStream<<"Geom_POINT"; break; + case Geom_EDGE: myStream<<"Geom_EDGE"; break; + case Geom_TRIANGLE: myStream<<"Geom_TRIANGLE"; break; + case Geom_QUADRANGLE: myStream<<"Geom_QUADRANGLE"; break; + case Geom_POLYGON: myStream<<"Geom_POLYGON"; break; + case Geom_TETRA: myStream<<"Geom_TETRA"; break; + case Geom_PYRAMID: myStream<<"Geom_PYRAMID"; break; + case Geom_HEXA: myStream<<"Geom_HEXA"; break; + case Geom_PENTA: myStream<<"Geom_PENTA"; break; + case Geom_POLYHEDRA: myStream<<"Geom_POLYHEDRA"; break; + } + return *this; + } + template void DumpArray(const TArray& theArray, std::ostringstream & theStream) { @@ -225,9 +245,11 @@ namespace SMESH case FT_Taper: myStream<< "aTaper"; break; case FT_Skew: myStream<< "aSkew"; break; case FT_Area: myStream<< "aArea"; break; + case FT_Volume3D: myStream<< "aVolume3D"; break; case FT_FreeBorders: myStream<< "aFreeBorders"; break; case FT_FreeEdges: myStream<< "aFreeEdges"; break; case FT_FreeNodes: myStream<< "aFreeNodes"; break; + case FT_FreeFaces: myStream<< "aFreeFaces"; break; case FT_MultiConnection: myStream<< "aMultiConnection"; break; case FT_MultiConnection2D:myStream<< "aMultiConnection2D";break; case FT_Length: myStream<< "aLength"; break; @@ -239,13 +261,17 @@ namespace SMESH case FT_LyingOnGeom: myStream<< "aLyingOnGeom"; break; case FT_RangeOfIds: myStream<< "aRangeOfIds"; break; case FT_BadOrientedVolume:myStream<< "aBadOrientedVolume";break; + case FT_LinearOrQuadratic:myStream<< "aLinearOrQuadratic";break; + case FT_GroupColor: myStream<< "aGroupColor"; break; + case FT_ElemGeomType: myStream<< "anElemGeomType"; break; case FT_LessThan: myStream<< "aLessThan"; break; case FT_MoreThan: myStream<< "aMoreThan"; break; case FT_EqualTo: myStream<< "anEqualTo"; break; case FT_LogicalNOT: myStream<< "aLogicalNOT"; break; case FT_LogicalAND: myStream<< "aLogicalAND"; break; case FT_LogicalOR: myStream<< "aLogicalOR"; break; - case FT_Undefined: myStream<< "anUndefined"; break; + case FT_Undefined: + default: myStream<< "anUndefined"; break; } myStream< 4 ) aNbNode /= 2; // do not take into account additional middle nodes - SMDS_MeshNode* node1 = (SMDS_MeshNode*)face->GetNode( 1 ); - for ( int nIndx = 1; nIndx <= aNbNode; nIndx++ ) + SMDS_MeshNode* node1 = (SMDS_MeshNode*)face->GetNode( 0 ); + for ( int nIndx = 0; nIndx < aNbNode; nIndx++ ) { - SMDS_MeshNode* node2 = (SMDS_MeshNode*)face->GetNode( nIndx < aNbNode ? nIndx+1 : 1 ); + SMDS_MeshNode* node2 = (SMDS_MeshNode*)face->GetNode( nIndx+1 < aNbNode ? nIndx+1 : 0 ); if ( setOfEdge.insert( SMESH_TLink ( node1, node2 ) ).second ) { listOfElemType.push_back( SMDSAbs_Edge ); @@ -3840,7 +3840,7 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent, int smID = smIDs[ i ]; if ( smID == 0 ) continue; const SMDS_MeshElement* elem = *iE; - if( smID >= maxID ) { + if( smID > maxID ) { // corresponding subshape no longer exists: maybe geom group has been edited if ( myNewMeshImpl->HasShapeToMesh() ) mySMESHDSMesh->RemoveElement( elem ); diff --git a/src/SMESH_I/SMESH_PythonDump.hxx b/src/SMESH_I/SMESH_PythonDump.hxx index 1ea9f59ff..bee3cbb83 100644 --- a/src/SMESH_I/SMESH_PythonDump.hxx +++ b/src/SMESH_I/SMESH_PythonDump.hxx @@ -63,7 +63,7 @@ public: * \retval TCollection_AsciiString - The file name */ static const char* SmeshpyName() { return "smesh"; } - static const char* GenName() { return "smesh.smesh"; } + static const char* GenName() { return "smesh"; } }; namespace SMESH @@ -108,6 +108,9 @@ namespace SMESH TPythonDump& operator<<(const SMESH::ElementType& theArg); + TPythonDump& + operator<<(const SMESH::GeometryType& theArg); + TPythonDump& operator<<(const SMESH::long_array& theArg); diff --git a/src/SMESH_SWIG/SMESH_BuildCompound.py b/src/SMESH_SWIG/SMESH_BuildCompound.py index 87c7e47ca..843071ed1 100644 --- a/src/SMESH_SWIG/SMESH_BuildCompound.py +++ b/src/SMESH_SWIG/SMESH_BuildCompound.py @@ -93,6 +93,6 @@ Compound1 = smesh.smesh.Concatenate([Mesh_inf.GetMesh(), Mesh_sup.GetMesh()], 0, smesh.SetName(Compound1, 'Compound_with_RenamedGrps_and_MergeElems') # create a compound of two meshes with uniting groups with the same names and # creating groups of all elements -Compound2 = smesh.smesh.ConcatenateWithGroups([Mesh_inf.GetMesh(), Mesh_sup.GetMesh()], 1, 0, 1e-05) +Compound2 = smesh.smesh.Concatenate([Mesh_inf.GetMesh(), Mesh_sup.GetMesh()], 1, 0, 1e-05, True) smesh.SetName(Compound2, 'Compound_with_UniteGrps_and_GrpsOfAllElems') #end diff --git a/src/SMESH_SWIG/smeshDC.py b/src/SMESH_SWIG/smeshDC.py index 07a467e1c..d3ece5045 100644 --- a/src/SMESH_SWIG/smeshDC.py +++ b/src/SMESH_SWIG/smeshDC.py @@ -557,24 +557,6 @@ class smeshDC(SMESH._objref_SMESH_Gen): aMesh = Mesh(self, self.geompyD, aSmeshMesh) return aMesh - ## Concatenate the given meshes into one mesh. - # @return an instance of Mesh class - # @param meshes the meshes to combine into one mesh - # @param uniteIdenticalGroups if true, groups with same names are united, else they are renamed - # @param mergeNodesAndElements if true, equal nodes and elements aremerged - # @param mergeTolerance tolerance for merging nodes - # @param allGroups forces creation of groups of all elements - def Concatenate( self, meshes, uniteIdenticalGroups, - mergeNodesAndElements = False, mergeTolerance = 1e-5, allGroups = False): - if allGroups: - aSmeshMesh = SMESH._objref_SMESH_Gen.ConcatenateWithGroups( - self,meshes,uniteIdenticalGroups,mergeNodesAndElements,mergeTolerance) - else: - aSmeshMesh = SMESH._objref_SMESH_Gen.Concatenate( - self,meshes,uniteIdenticalGroups,mergeNodesAndElements,mergeTolerance) - aMesh = Mesh(self, self.geompyD, aSmeshMesh) - return aMesh - ## From SMESH_Gen interface # @return the list of integer values # @ingroup l1_auxiliary diff --git a/src/StdMeshersGUI/StdMeshersGUI_LayerDistributionParamWdg.cxx b/src/StdMeshersGUI/StdMeshersGUI_LayerDistributionParamWdg.cxx index ffdc4a7f1..481d34e02 100644 --- a/src/StdMeshersGUI/StdMeshersGUI_LayerDistributionParamWdg.cxx +++ b/src/StdMeshersGUI/StdMeshersGUI_LayerDistributionParamWdg.cxx @@ -198,8 +198,9 @@ void StdMeshersGUI_LayerDistributionParamWdg::onEdit() return; CORBA::String_var hypType = myHyp->GetName(); - SMESHGUI_GenericHypothesisCreator* - editor = SMESH::GetHypothesisCreator( hypType.in() ); + // BUG 0020378 + //SMESHGUI_GenericHypothesisCreator* editor = SMESH::GetHypothesisCreator(hypType.in()); + SMESH::HypothesisCreatorPtr editor = SMESH::GetHypothesisCreator(hypType.in()); if ( !editor ) return; if ( myDlg ) myDlg->hide();