From: vsr Date: Thu, 13 Dec 2012 12:22:24 +0000 (+0000) Subject: Merge from V6_main 13/12/2012 X-Git-Tag: V7_1_0_pre X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2FBR_KERNEL_REFACTORING;p=plugins%2Fghs3dplugin.git Merge from V6_main 13/12/2012 --- diff --git a/adm_local/unix/config_files/check_MESHGEMS_TETRA.m4 b/adm_local/unix/config_files/check_MESHGEMS_TETRA.m4 new file mode 100644 index 0000000..ab354e0 --- /dev/null +++ b/adm_local/unix/config_files/check_MESHGEMS_TETRA.m4 @@ -0,0 +1,37 @@ +dnl Copyright (C) 2004-2012 CEA/DEN, EDF R&D +dnl +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License. +dnl +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl +dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +dnl + +AC_DEFUN([CHECK_MESHGEMS_TETRA],[ + +AC_CHECKING([for MeshGems-Tetra commercial product]) + +MeshGems_Tetra_ok=no + +AC_EXEEXT +AC_CHECK_PROG(MESHGEMS_TETRA, mg-tetra.exe$EXEEXT,found) + +if test "x$MESHGEMS_TETRA" == x ; then + AC_MSG_WARN(mg-tetra program not found in PATH variable) +else + MeshGems_Tetra_ok=yes +fi + +AC_MSG_RESULT(for MeshGems-Tetra: $MeshGems_Tetra_ok) + +])dnl diff --git a/configure.ac b/configure.ac index 0241f04..01fc601 100644 --- a/configure.ac +++ b/configure.ac @@ -349,18 +349,11 @@ CHECK_SMESH echo echo --------------------------------------------- -echo Testing GHS3D +echo Testing MeshGems-Tetra echo --------------------------------------------- echo -CHECK_GHS3D -if test "${GHS3D_ok}" = "yes"; then - if test "x$GHS3D_VERSION" = "x" - then - GHS3D_VERSION=`ghs3d -u |grep "TETMESH-GHS3D SOFTWARE"|awk '{print $3}'|awk -F- '{print $1}'|awk -F. '{print $1$2}'` - fi - AC_DEFINE_UNQUOTED(GHS3D_VERSION,${GHS3D_VERSION}) -fi +CHECK_MESHGEMS_TETRA echo echo --------------------------------------------- @@ -370,11 +363,11 @@ echo echo Configure if test "${gui_ok}" = "yes"; then - variables="cc_ok boost_ok threads_ok omniORB_ok occ_ok doxygen_ok Kernel_ok gui_ok Geom_ok Med_ok SMesh_ok GHS3D_ok OpenGL_ok qt_ok vtk_ok" + variables="cc_ok boost_ok threads_ok omniORB_ok occ_ok doxygen_ok Kernel_ok gui_ok Geom_ok Med_ok SMesh_ok MeshGems_Tetra_ok OpenGL_ok qt_ok vtk_ok" elif test "${SalomeGUI_need}" != "no"; then - variables="cc_ok boost_ok threads_ok omniORB_ok occ_ok doxygen_ok Kernel_ok gui_ok Geom_ok Med_ok SMesh_ok GHS3D_ok vtk_ok" + variables="cc_ok boost_ok threads_ok omniORB_ok occ_ok doxygen_ok Kernel_ok gui_ok Geom_ok Med_ok SMesh_ok MeshGems_Tetra_ok vtk_ok" else - variables="cc_ok boost_ok threads_ok omniORB_ok occ_ok doxygen_ok Kernel_ok Geom_ok Med_ok SMesh_ok GHS3D_ok vtk_ok" + variables="cc_ok boost_ok threads_ok omniORB_ok occ_ok doxygen_ok Kernel_ok Geom_ok Med_ok SMesh_ok MeshGems_Tetra_ok vtk_ok" fi for var in $variables diff --git a/doc/salome/gui/GHS3DPLUGIN/CMakeLists.txt b/doc/salome/gui/GHS3DPLUGIN/CMakeLists.txt new file mode 100755 index 0000000..f8dfc41 --- /dev/null +++ b/doc/salome/gui/GHS3DPLUGIN/CMakeLists.txt @@ -0,0 +1,75 @@ +# Copyright (C) 2012 CEA/DEN, EDF R&D, OPEN CASCADE +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/SalomeMacros.cmake) + +SET(top_builddir ${CMAKE_BINARY_DIR}) +SET(top_srcdir ${CMAKE_SOURCE_DIR}) +SET(srcdir ${CMAKE_CURRENT_SOURCE_DIR}) +SET(builddir ${CMAKE_CURRENT_BINARY_DIR}) +SET(datadir${CMAKE_INSTALL_PREFIX}/share) +SET(docdir ${datadir}/doc/salome) +SET(guidocdir ${docdir}/gui/GHS3DPLUGIN) + +SALOME_CONFIGURE_FILE(doxyfile.in doxyfile) +SALOME_CONFIGURE_FILE(doxyfile_py.in doxyfile_py) +SALOME_CONFIGURE_FILE(static/header.html.in ${builddir}/static/header.html) +SALOME_CONFIGURE_FILE(static/header_py.html.in ${builddir}/static/header_py.html) + +SET(DOC_SMESH_MeshersList GHS3DPlugin) +SET(f "$(SMESH_ROOT_DIR)/bin/salome/collect_mesh_methods.py") +IF(WINDOWS) + STRING(REPLACE "/" "\\" f ${f}) + STRING(REPLACE "/" "\\" SCR "@SET PYTHONPATH=${OMNIORB_ROOT_USER}/lib/x86_win32\;%PYTHONPATH% + @SET PYTHONPATH=${OMNIORB_ROOT_USER}/lib/python\;%PYTHONPATH% + @SET PATH=${OMNIORB_ROOT_USER}/lib/x86_win32\;%PATH% + @SET PATH=$ENV{KERNEL_ROOT_DIR}/lib/salome\;%PATH% + @SET PYTHONPATH=$ENV{KERNEL_ROOT_DIR}/bin/salome\;%PYTHONPATH% + @SET PYTHONPATH=$ENV{KERNEL_ROOT_DIR}/lib/python${PYTHON_VERSION}/site-packages/salome\;%PYTHONPATH% + @SET PYTHONPATH=$ENV{MED_ROOT_DIR}/lib/python${PYTHON_VERSION}/site-packages/salome\;%PYTHONPATH% + @SET PYTHONPATH=$ENV{MED_ROOT_DIR}/bin/salome\;%PYTHONPATH% + @SET PYTHONPATH=$ENV{GEOM_ROOT_DIR}/lib/python${PYTHON_VERSION}/site-packages/salome\;%PYTHONPATH% + @SET PYTHONPATH=$ENV{GEOM_ROOT_DIR}/bin/salome\;%PYTHONPATH% + @SET PYTHONPATH=$ENV{SMESH_ROOT_DIR}/lib/python${PYTHON_VERSION}/site-packages/salome\;%PYTHONPATH% + @SET PYTHONPATH=$ENV{SMESH_ROOT_DIR}/bin/salome\;%PYTHONPATH% + @SET PYTHONPATH=${CMAKE_INSTALL_PREFIX}/lib/python${PYTHON_VERSION}/site-packages/salome\;%PYTHONPATH% + @SET PYTHONPATH=${CMAKE_INSTALL_PREFIX}/bin/salome\;%PYTHONPATH% + @SET SMESH_MeshersList=${DOC_SMESH_MeshersList} + ") + SET(EXT "bat") + SET(CALL_STR "call") +ELSE(WINDOWS) + SET(DOC_PYTHONPATH ${CMAKE_INSTALL_PREFIX}/bin/salome:${SMESH_ROOT_DIR}/bin/salome:${SMESH_ROOT_DIR}/lib/python${PYTHON_VERSION}/site-packages/salome:${MED_ROOT_DIR}/lib/python${PYTHON_VERSION}/site-packages/salome:${GEOM_ROOT_DIR}/bin/salome:${GEOM_ROOT_DIR}/lib/python${PYTHON_VERSION}/site-packages/salome:${KERNEL_ROOT_DIR}/bin/salome:${KERNEL_ROOT_DIR}/lib/python${PYTHON_VERSION}/site-packages/salome:${OMNIORB_ROOT_USER}/lib/python${PYTHON_VERSION}/site-packages:${OMNIORB_ROOT_USER}/lib64/python${PYTHON_VERSION}/site-packages) + SET(SCR "export PYTHONPATH=${DOC_PYTHONPATH}:${PYTHONPATH} + export SMESH_MeshersList=${DOC_SMESH_MeshersList} + ") + SET(EXT "sh") + SET(CALL_STR ".") +ENDIF(WINDOWS) + +FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/tmp_env.${EXT} "${SCR}") + +ADD_CUSTOM_TARGET(usr_docs ${CALL_STR} ${CMAKE_CURRENT_BINARY_DIR}/tmp_env.${EXT} && ${PYTHON_EXECUTABLE} ${f} -d -o smesh.py GHS3DPlugin + COMMAND ${DOXYGEN_EXECUTABLE} doxyfile_py + COMMAND ${DOXYGEN_EXECUTABLE} doxyfile + COMMAND ${PYTHON_EXECUTABLE} -c "import os; os.remove(r'''smesh.py'''); os.remove(r'''tmp_env.${EXT}''')" + COMMAND ${PYTHON_EXECUTABLE} -c "import shutil, sys; shutil.rmtree(r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/GHS3DPLUGIN''',True); shutil.copytree(r'''${CMAKE_CURRENT_BINARY_DIR}''',r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/GHS3DPLUGIN''', ignore=shutil.ignore_patterns('*usr_docs*', '*CMakeFiles*', '*.cmake', 'doxyfile*', '*.vcproj', 'static', 'Makefile*')); shutil.copy(r'''${CMAKE_CURRENT_SOURCE_DIR}/images/head.png''',r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/GHS3DPLUGIN'''); shutil.copy(r'''${CMAKE_CURRENT_SOURCE_DIR}/images/head.png''',r'''${CMAKE_INSTALL_PREFIX}/share/doc/salome/gui/GHS3DPLUGIN/ghs3dpluginpy_doc''')" + VERBATIM + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} +) diff --git a/doc/salome/gui/GHS3DPLUGIN/images/ghs3d_enforced_meshes.png b/doc/salome/gui/GHS3DPLUGIN/images/ghs3d_enforced_meshes.png index df87f77..72ed777 100644 Binary files a/doc/salome/gui/GHS3DPLUGIN/images/ghs3d_enforced_meshes.png and b/doc/salome/gui/GHS3DPLUGIN/images/ghs3d_enforced_meshes.png differ diff --git a/doc/salome/gui/GHS3DPLUGIN/images/ghs3d_enforced_vertices.png b/doc/salome/gui/GHS3DPLUGIN/images/ghs3d_enforced_vertices.png index 27768e4..e86a73e 100644 Binary files a/doc/salome/gui/GHS3DPLUGIN/images/ghs3d_enforced_vertices.png and b/doc/salome/gui/GHS3DPLUGIN/images/ghs3d_enforced_vertices.png differ diff --git a/idl/GHS3DPlugin_Algorithm.idl b/idl/GHS3DPlugin_Algorithm.idl index 6bb10d8..f930af5 100644 --- a/idl/GHS3DPlugin_Algorithm.idl +++ b/idl/GHS3DPlugin_Algorithm.idl @@ -178,6 +178,7 @@ module GHS3DPlugin GHS3DEnforcedMeshList GetEnforcedMeshes(); void ClearEnforcedMeshes(); + /*! * Set/get/unset an enforced vertex (private method for GUI) */ diff --git a/src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx b/src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx index 68d805e..257c774 100644 --- a/src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx +++ b/src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx @@ -37,6 +37,8 @@ #include "SMESH_MeshEditor.hxx" #include "SMESH_OctreeNode.hxx" #include "SMESH_Group.hxx" +#include +#include #include "SMDS_MeshElement.hxx" #include "SMDS_MeshNode.hxx" @@ -107,10 +109,6 @@ extern "C" #define HOLE_ID -1 -#ifndef GHS3D_VERSION -#define GHS3D_VERSION 41 -#endif - typedef const list TTriaList; static void removeFile( const TCollection_AsciiString& fileName ) @@ -479,11 +477,11 @@ static int findShapeID(SMESH_Mesh& mesh, return meshDS->ShapeToIndex( solids(2) ); } -//======================================================================= -//function : countShape -//purpose : -//======================================================================= - +// //======================================================================= +// //function : countShape +// //purpose : +// //======================================================================= +// // template < class Mesh, class Shape > // static int countShape( Mesh* mesh, Shape shape ) { // TopExp_Explorer expShape ( mesh->ShapeToMesh(), shape ); @@ -496,12 +494,12 @@ static int findShapeID(SMESH_Mesh& mesh, // } // return nbShape; // } - -//======================================================================= -//function : getShape -//purpose : -//======================================================================= - +// +// //======================================================================= +// //function : getShape +// //purpose : +// //======================================================================= +// // template < class Mesh, class Shape, class Tab > // void getShape(Mesh* mesh, Shape shape, Tab *t_Shape) { // TopExp_Explorer expShape ( mesh->ShapeToMesh(), shape ); @@ -514,11 +512,11 @@ static int findShapeID(SMESH_Mesh& mesh, // } // return; // } - -// //======================================================================= -// //function : findEdgeID -// //purpose : -// //======================================================================= +// +// // //======================================================================= +// // //function : findEdgeID +// // //purpose : +// // //======================================================================= // // static int findEdgeID(const SMDS_MeshNode* aNode, // const SMESHDS_Mesh* theMesh, @@ -552,16 +550,14 @@ static int findShapeID(SMESH_Mesh& mesh, // delete [] t_Dist; // return theMesh->ShapeToIndex( foundEdge ); // } - - -//======================================================================= -//function : readGMFFile -//purpose : read GMF file with geometry associated to mesh -// TODO -//======================================================================= - -// static bool readGMFFile( -// const int fileOpen, +// +// +// // ======================================================================= +// // function : readGMFFile +// // purpose : read GMF file with geometry associated to mesh +// // ======================================================================= +// +// static bool readGMFFile(const int fileOpen, // const char* theFileName, // SMESH_Mesh& theMesh, // const int nbShape, @@ -644,7 +640,7 @@ static int findShapeID(SMESH_Mesh& mesh, // // // // The keyword does not exist yet => to update when it is created -// // int nbTriangle = GmfStatKwd(InpMsh, GmfSubdomain); +// // int nbSubdomains = GmfStatKwd(InpMsh, GmfSubdomain); // // int id_tri[3]; // // @@ -828,11 +824,11 @@ static int findShapeID(SMESH_Mesh& mesh, // // case GmfHexahedra: // { // int nodeDim, shapeID, *nodeID; -// SMDS_MeshNode** node; +// const SMDS_MeshNode** node; // // std::vector< SMDS_MeshNode* > enfNode( nbRef ); // SMDS_MeshElement * aGMFElement; // -// node = new SMDS_MeshNode*[nbRef]; +// node = new const SMDS_MeshNode*[nbRef]; // nodeID = new int[ nbRef ]; // // for ( int iElem = 0; iElem < nbElem; iElem++ ) @@ -4316,3 +4312,84 @@ bool GHS3DPlugin_GHS3D::importGMFMesh(const char* theGMFFileName, SMESH_Mesh& th theMesh.GetMeshDS()->Modified(); return ok; } + +namespace +{ + //================================================================================ + /*! + * \brief Sub-mesh event listener setting enforced elements as soon as an enforced + * mesh is loaded + */ + struct _EnforcedMeshRestorer : public SMESH_subMeshEventListener + { + _EnforcedMeshRestorer(): + SMESH_subMeshEventListener( /*isDeletable = */true, Name() ) + {} + + //================================================================================ + /*! + * \brief Returns an ID of listener + */ + static const char* Name() { return "GHS3DPlugin_GHS3D::_EnforcedMeshRestorer"; } + + //================================================================================ + /*! + * \brief Treat events of the subMesh + */ + void ProcessEvent(const int event, + const int eventType, + SMESH_subMesh* subMesh, + SMESH_subMeshEventListenerData* data, + const SMESH_Hypothesis* hyp) + { + if ( SMESH_subMesh::SUBMESH_LOADED == event && + SMESH_subMesh::COMPUTE_EVENT == eventType && + data && + !data->mySubMeshes.empty() ) + { + // An enforced mesh (subMesh->_father) has been loaded from hdf file + if ( GHS3DPlugin_Hypothesis* hyp = GetGHSHypothesis( data->mySubMeshes.front() )) + hyp->RestoreEnfElemsByMeshes(); + } + } + //================================================================================ + /*! + * \brief Returns GHS3DPlugin_Hypothesis used to compute a subMesh + */ + static GHS3DPlugin_Hypothesis* GetGHSHypothesis( SMESH_subMesh* subMesh ) + { + SMESH_HypoFilter ghsHypFilter( SMESH_HypoFilter::HasName( "GHS3D_Parameters" )); + return (GHS3DPlugin_Hypothesis* ) + subMesh->GetFather()->GetHypothesis( subMesh->GetSubShape(), + ghsHypFilter, + /*visitAncestors=*/true); + } + }; +} + +//================================================================================ +/*! + * \brief Set an event listener to set enforced elements as soon as an enforced + * mesh is loaded + */ +//================================================================================ + +void GHS3DPlugin_GHS3D::SubmeshRestored(SMESH_subMesh* subMesh) +{ + if ( GHS3DPlugin_Hypothesis* hyp = _EnforcedMeshRestorer::GetGHSHypothesis( subMesh )) + { + GHS3DPlugin_Hypothesis::TGHS3DEnforcedMeshList enfMeshes = hyp->_GetEnforcedMeshes(); + GHS3DPlugin_Hypothesis::TGHS3DEnforcedMeshList::iterator it = enfMeshes.begin(); + for(;it != enfMeshes.end();++it) { + GHS3DPlugin_Hypothesis::TGHS3DEnforcedMesh* enfMesh = *it; + if ( SMESH_Mesh* mesh = GetMeshByPersistentID( enfMesh->persistID )) + { + SMESH_subMesh* smToListen = mesh->GetSubMesh( mesh->GetShapeToMesh() ); + // a listener set to smToListen will care of hypothesis stored in SMESH_EventListenerData + subMesh->SetEventListener( new _EnforcedMeshRestorer(), + SMESH_subMeshEventListenerData::MakeData( subMesh ), + smToListen); + } + } + } +} diff --git a/src/GHS3DPlugin/GHS3DPlugin_GHS3D.hxx b/src/GHS3DPlugin/GHS3DPlugin_GHS3D.hxx index 7be3a9f..776a1fa 100644 --- a/src/GHS3DPlugin/GHS3DPlugin_GHS3D.hxx +++ b/src/GHS3DPlugin/GHS3DPlugin_GHS3D.hxx @@ -75,6 +75,8 @@ public: virtual bool Compute(SMESH_Mesh& theMesh, SMESH_MesherHelper* aHelper); + virtual void SubmeshRestored(SMESH_subMesh* subMesh); + bool importGMFMesh(const char* aGMFFileName, SMESH_Mesh& aMesh); private: diff --git a/src/GHS3DPlugin/GHS3DPlugin_Hypothesis.cxx b/src/GHS3DPlugin/GHS3DPlugin_Hypothesis.cxx index 4deccaa..49f0a73 100644 --- a/src/GHS3DPlugin/GHS3DPlugin_Hypothesis.cxx +++ b/src/GHS3DPlugin/GHS3DPlugin_Hypothesis.cxx @@ -450,16 +450,20 @@ bool GHS3DPlugin_Hypothesis::SetEnforcedMesh(SMESH_Mesh& theMesh, SMESH::Element bool added = SetEnforcedElements( theElemSet, elementType, groupName); if (added) { TGHS3DEnforcedMesh* newEnfMesh = new TGHS3DEnforcedMesh(); - newEnfMesh->name = name; - newEnfMesh->entry = entry; + newEnfMesh->persistID = theMesh.GetMeshDS()->GetPersistentId(); + newEnfMesh->name = name; + newEnfMesh->entry = entry; newEnfMesh->elementType = elementType; - newEnfMesh->groupName = groupName; + newEnfMesh->groupName = groupName; TGHS3DEnforcedMeshList::iterator it = _enfMeshList.find(newEnfMesh); if (it == _enfMeshList.end()) { _entryEnfMeshMap[entry].insert(newEnfMesh); _enfMeshList.insert(newEnfMesh); } + else { + delete newEnfMesh; + } } return added; } @@ -712,6 +716,26 @@ void GHS3DPlugin_Hypothesis::ClearEnforcedMeshes() NotifySubMeshesHypothesisModification(); } +//================================================================================ +/*! + * \brief At mesh loading, restore enforced elements by just loaded enforced meshes + */ +//================================================================================ + +void GHS3DPlugin_Hypothesis::RestoreEnfElemsByMeshes() +{ + TGHS3DEnforcedMeshList::const_iterator it = _enfMeshList.begin(); + for(;it != _enfMeshList.end();++it) { + TGHS3DEnforcedMesh* enfMesh = *it; + if ( SMESH_Mesh* mesh = GetMeshByPersistentID( enfMesh->persistID )) + SetEnforcedMesh( *mesh, + enfMesh->elementType, + enfMesh->name, + enfMesh->entry, + enfMesh->groupName ); + enfMesh->persistID = -1; // not to restore again + } +} //======================================================================= //function : SetGroupsToRemove @@ -965,6 +989,8 @@ std::ostream & GHS3DPlugin_Hypothesis::SaveTo(std::ostream & save) save << " " << enfMesh->groupName; save << " " << "__END_GROUP__"; } + save << " " << "__PERSIST_ID__"; + save << " " << enfMesh->persistID; save << " " << "__END_ENF_MESH__"; std::cout << "Saving of enforced mesh " << enfMesh->name.c_str() << " done" << std::endl; } @@ -979,303 +1005,310 @@ std::ostream & GHS3DPlugin_Hypothesis::SaveTo(std::ostream & save) std::istream & GHS3DPlugin_Hypothesis::LoadFrom(std::istream & load) { - bool isOK = true; - int i; - double d; - - isOK = (load >> i); - if (isOK) - myToMeshHoles = i; - else - load.clear(ios::badbit | load.rdstate()); - - isOK = (load >> i); - if (isOK) - myMaximumMemory = i; - else - load.clear(ios::badbit | load.rdstate()); - - isOK = (load >> i); - if (isOK) - myInitialMemory = i; - else - load.clear(ios::badbit | load.rdstate()); - - isOK = (load >> i); - if (isOK) - myOptimizationLevel = i; - else - load.clear(ios::badbit | load.rdstate()); - - isOK = (load >> myWorkingDirectory); - if (isOK) { - if ( myWorkingDirectory == "0") { // myWorkingDirectory was empty - myKeepFiles = false; - myWorkingDirectory.clear(); - } - else if ( myWorkingDirectory == "1" ) { - myKeepFiles = true; - myWorkingDirectory.clear(); - } - } - else - load.clear(ios::badbit | load.rdstate()); - - if ( !myWorkingDirectory.empty() ) { - isOK = (load >> i); - if (isOK) - myKeepFiles = i; - else - load.clear(ios::badbit | load.rdstate()); - } - - isOK = (load >> i); - if (isOK) - myVerboseLevel = (short) i; - else - load.clear(ios::badbit | load.rdstate()); - - isOK = (load >> i); - if (isOK) - myToCreateNewNodes = (bool) i; - else - load.clear(ios::badbit | load.rdstate()); - - isOK = (load >> i); - if (isOK) - myToUseBoundaryRecoveryVersion = (bool) i; - else - load.clear(ios::badbit | load.rdstate()); - - isOK = (load >> i); - if (isOK) - myToUseFemCorrection = (bool) i; - else - load.clear(ios::badbit | load.rdstate()); - - isOK = (load >> i); - if (isOK) - myToRemoveCentralPoint = (bool) i; - else - load.clear(ios::badbit | load.rdstate()); - - isOK = (load >> d); + bool isOK = true; + int i; + double d; + + isOK = (load >> i); + if (isOK) + myToMeshHoles = i; + else + load.clear(ios::badbit | load.rdstate()); + + isOK = (load >> i); + if (isOK) + myMaximumMemory = i; + else + load.clear(ios::badbit | load.rdstate()); + + isOK = (load >> i); + if (isOK) + myInitialMemory = i; + else + load.clear(ios::badbit | load.rdstate()); + + isOK = (load >> i); + if (isOK) + myOptimizationLevel = i; + else + load.clear(ios::badbit | load.rdstate()); + + isOK = (load >> myWorkingDirectory); + if (isOK) { + if ( myWorkingDirectory == "0") { // myWorkingDirectory was empty + myKeepFiles = false; + myWorkingDirectory.clear(); + } + else if ( myWorkingDirectory == "1" ) { + myKeepFiles = true; + myWorkingDirectory.clear(); + } + } + else + load.clear(ios::badbit | load.rdstate()); + + if ( !myWorkingDirectory.empty() ) { + isOK = (load >> i); if (isOK) - myGradation = d; + myKeepFiles = i; else - load.clear(ios::badbit | load.rdstate()); - - std::string separator; - bool hasOptions = false; - bool hasEnforcedVertices = false; - bool hasEnforcedMeshes = false; - isOK = (load >> separator); - - if (isOK) { - if (separator == "__OPTIONS_BEGIN__") - hasOptions = true; - else if (separator == "__ENFORCED_VERTICES_BEGIN__") - hasEnforcedVertices = true; - else if (separator == "__ENFORCED_MESHES_BEGIN__") - hasEnforcedMeshes = true; - } - - if (hasOptions) { - std::string txt; - while (isOK) { - isOK = (load >> txt); - if (isOK) { - if (txt == "__OPTIONS_END__") { - if (!myTextOption.empty()) { - // Remove last space - myTextOption.erase(myTextOption.end()-1); - } - isOK = false; - break; - } - myTextOption += txt; - myTextOption += " "; - } - } - } - - if (hasOptions) { - isOK = (load >> separator); - if (isOK && separator == "__ENFORCED_VERTICES_BEGIN__") - hasEnforcedVertices = true; - if (isOK && separator == "__ENFORCED_MESHES_BEGIN__") - hasEnforcedMeshes = true; - } + load.clear(ios::badbit | load.rdstate()); + } + + isOK = (load >> i); + if (isOK) + myVerboseLevel = (short) i; + else + load.clear(ios::badbit | load.rdstate()); + + isOK = (load >> i); + if (isOK) + myToCreateNewNodes = (bool) i; + else + load.clear(ios::badbit | load.rdstate()); + + isOK = (load >> i); + if (isOK) + myToUseBoundaryRecoveryVersion = (bool) i; + else + load.clear(ios::badbit | load.rdstate()); + + isOK = (load >> i); + if (isOK) + myToUseFemCorrection = (bool) i; + else + load.clear(ios::badbit | load.rdstate()); + + isOK = (load >> i); + if (isOK) + myToRemoveCentralPoint = (bool) i; + else + load.clear(ios::badbit | load.rdstate()); + + isOK = (load >> d); + if (isOK) + myGradation = d; + else + load.clear(ios::badbit | load.rdstate()); + + std::string separator; + bool hasOptions = false; + bool hasEnforcedVertices = false; + bool hasEnforcedMeshes = false; + isOK = (load >> separator); + + if (isOK) { + if (separator == "__OPTIONS_BEGIN__") + hasOptions = true; + else if (separator == "__ENFORCED_VERTICES_BEGIN__") + hasEnforcedVertices = true; + else if (separator == "__ENFORCED_MESHES_BEGIN__") + hasEnforcedMeshes = true; + } + + if (hasOptions) { + std::string txt; + while (isOK) { + isOK = (load >> txt); + if (isOK) { + if (txt == "__OPTIONS_END__") { + if (!myTextOption.empty()) { + // Remove last space + myTextOption.erase(myTextOption.end()-1); + } + isOK = false; + break; + } + myTextOption += txt; + myTextOption += " "; + } + } + } + + if (hasOptions) { + isOK = (load >> separator); + if (isOK && separator == "__ENFORCED_VERTICES_BEGIN__") + hasEnforcedVertices = true; + if (isOK && separator == "__ENFORCED_MESHES_BEGIN__") + hasEnforcedMeshes = true; + } if (hasEnforcedVertices) { - std::string txt, name, entry, groupName; - double size, coords[3]; - bool isCompound; - bool hasCoords = false; - isOK = (load >> txt); // __BEGIN_VERTEX__ - while (isOK) { - if (txt == "__ENFORCED_VERTICES_END__") - isOK = false; - - TGHS3DEnforcedVertex *enfVertex = new TGHS3DEnforcedVertex(); - while (isOK) { - isOK = (load >> txt); - if (txt == "__END_VERTEX__") { - enfVertex->name = name; - enfVertex->geomEntry = entry; - enfVertex->isCompound = isCompound; - enfVertex->groupName = groupName; - enfVertex->coords.clear(); - if (hasCoords) - enfVertex->coords.assign(coords,coords+3); - - _enfVertexList.insert(enfVertex); - - if (enfVertex->coords.size()) - _coordsEnfVertexMap[enfVertex->coords] = enfVertex; - if (!enfVertex->geomEntry.empty()) - _geomEntryEnfVertexMap[enfVertex->geomEntry] = enfVertex; - - name.clear(); - entry.clear(); - groupName.clear(); - hasCoords = false; - isOK = false; - } - - if (txt == "__BEGIN_NAME__") { // __BEGIN_NAME__ - while (isOK && (txt != "__END_NAME__")) { - isOK = (load >> txt); - if (txt != "__END_NAME__") { - if (!name.empty()) - name += " "; - name += txt; - } - } - MESSAGE("name: " <> entry); - isOK = (load >> isCompound); - isOK = (load >> txt); // __END_ENTRY__ - if (txt != "__END_ENTRY__") - throw std::exception(); - MESSAGE("entry: " << entry); - } - - if (txt == "__BEGIN_GROUP__") { // __BEGIN_GROUP__ - while (isOK && (txt != "__END_GROUP__")) { - isOK = (load >> txt); - if (txt != "__END_GROUP__") { - if (!groupName.empty()) - groupName += " "; - groupName += txt; - } - } - MESSAGE("groupName: " << groupName); - } - - if (txt == "__BEGIN_COORDS__") { // __BEGIN_COORDS__ - hasCoords = true; - isOK = (load >> coords[0] >> coords[1] >> coords[2]); - isOK = (load >> txt); // __END_COORDS__ - if (txt != "__END_COORDS__") - throw std::exception(); - MESSAGE("coords: " << coords[0] <<","<< coords[1] <<","<< coords[2]); - } - - if (txt == "__BEGIN_SIZE__") { // __BEGIN_ENTRY__ - isOK = (load >> size); - isOK = (load >> txt); // __END_ENTRY__ - if (txt != "__END_SIZE__") { - throw std::exception(); - } - MESSAGE("size: " << size); - } - } - isOK = (load >> txt); // __BEGIN_VERTEX__ - } + std::string txt, name, entry, groupName; + double size, coords[3]; + bool isCompound; + bool hasCoords = false; + isOK = (load >> txt); // __BEGIN_VERTEX__ + while (isOK) { + if (txt == "__ENFORCED_VERTICES_END__") + isOK = false; + + TGHS3DEnforcedVertex *enfVertex = new TGHS3DEnforcedVertex(); + while (isOK) { + isOK = (load >> txt); + if (txt == "__END_VERTEX__") { + enfVertex->name = name; + enfVertex->geomEntry = entry; + enfVertex->isCompound = isCompound; + enfVertex->groupName = groupName; + enfVertex->coords.clear(); + if (hasCoords) + enfVertex->coords.assign(coords,coords+3); + + _enfVertexList.insert(enfVertex); + + if (enfVertex->coords.size()) + _coordsEnfVertexMap[enfVertex->coords] = enfVertex; + if (!enfVertex->geomEntry.empty()) + _geomEntryEnfVertexMap[enfVertex->geomEntry] = enfVertex; + + name.clear(); + entry.clear(); + groupName.clear(); + hasCoords = false; + isOK = false; + } + + if (txt == "__BEGIN_NAME__") { // __BEGIN_NAME__ + while (isOK && (txt != "__END_NAME__")) { + isOK = (load >> txt); + if (txt != "__END_NAME__") { + if (!name.empty()) + name += " "; + name += txt; + } + } + MESSAGE("name: " <> entry); + isOK = (load >> isCompound); + isOK = (load >> txt); // __END_ENTRY__ + if (txt != "__END_ENTRY__") + throw std::exception(); + MESSAGE("entry: " << entry); + } + + if (txt == "__BEGIN_GROUP__") { // __BEGIN_GROUP__ + while (isOK && (txt != "__END_GROUP__")) { + isOK = (load >> txt); + if (txt != "__END_GROUP__") { + if (!groupName.empty()) + groupName += " "; + groupName += txt; + } + } + MESSAGE("groupName: " << groupName); + } + + if (txt == "__BEGIN_COORDS__") { // __BEGIN_COORDS__ + hasCoords = true; + isOK = (load >> coords[0] >> coords[1] >> coords[2]); + isOK = (load >> txt); // __END_COORDS__ + if (txt != "__END_COORDS__") + throw std::exception(); + MESSAGE("coords: " << coords[0] <<","<< coords[1] <<","<< coords[2]); + } + + if (txt == "__BEGIN_SIZE__") { // __BEGIN_ENTRY__ + isOK = (load >> size); + isOK = (load >> txt); // __END_ENTRY__ + if (txt != "__END_SIZE__") { + throw std::exception(); + } + MESSAGE("size: " << size); + } + } + isOK = (load >> txt); // __BEGIN_VERTEX__ + } } if (hasEnforcedVertices) { - isOK = (load >> separator); - if (isOK && separator == "__ENFORCED_MESHES_BEGIN__") - hasEnforcedMeshes = true; + isOK = (load >> separator); + if (isOK && separator == "__ENFORCED_MESHES_BEGIN__") + hasEnforcedMeshes = true; } if (hasEnforcedMeshes) { - std::string txt, name, entry, groupName; - int elementType = -1; - isOK = (load >> txt); // __BEGIN_ENF_MESH__ - while (isOK) { -// if (isOK) { - if (txt == "__ENFORCED_MESHES_END__") - isOK = false; - - TGHS3DEnforcedMesh *enfMesh = new TGHS3DEnforcedMesh(); - while (isOK) { - isOK = (load >> txt); - if (txt == "__END_ENF_MESH__") { - enfMesh->name = name; - enfMesh->entry = entry; - enfMesh->elementType = (SMESH::ElementType)elementType; - enfMesh->groupName = groupName; - - _enfMeshList.insert(enfMesh); - std::cout << "Restoring of enforced mesh " <> txt); - if (txt != "__END_NAME__") { - if (!name.empty()) - name += " "; - name += txt; - } - } - MESSAGE("name: " <> entry); - isOK = (load >> txt); // __END_ENTRY__ - if (txt != "__END_ENTRY__") - throw std::exception(); - MESSAGE("entry: " << entry); - } - - if (txt == "__BEGIN_ELEM_TYPE__") { // __BEGIN_ELEM_TYPE__ - isOK = (load >> elementType); - isOK = (load >> txt); // __END_ELEM_TYPE__ - if (txt != "__END_ELEM_TYPE__") - throw std::exception(); - MESSAGE("elementType: " << elementType); - } - - if (txt == "__BEGIN_GROUP__") { // __BEGIN_GROUP__ - while (isOK && (txt != "__END_GROUP__")) { - isOK = (load >> txt); - if (txt != "__END_GROUP__") { - if (!groupName.empty()) - groupName += " "; - groupName += txt; - } - } // while - MESSAGE("groupName: " << groupName); - } // if - std::cout << "isOK: " << isOK << std::endl; - } // while -// } // if - isOK = (load >> txt); // __BEGIN_ENF_MESH__ - } // while + std::string txt, name, entry, groupName; + int elementType = -1, persistID = -1; + isOK = (load >> txt); // __BEGIN_ENF_MESH__ + while (isOK) { + // if (isOK) { + if (txt == "__ENFORCED_MESHES_END__") + isOK = false; + + TGHS3DEnforcedMesh *enfMesh = new TGHS3DEnforcedMesh(); + while (isOK) { + isOK = (load >> txt); + if (txt == "__END_ENF_MESH__") { + enfMesh->name = name; + enfMesh->entry = entry; + enfMesh->elementType = (SMESH::ElementType)elementType; + enfMesh->groupName = groupName; + enfMesh->persistID = persistID; + + _enfMeshList.insert(enfMesh); + std::cout << "Restoring of enforced mesh " <> txt); + if (txt != "__END_NAME__") { + if (!name.empty()) + name += " "; + name += txt; + } + } + MESSAGE("name: " <> entry); + isOK = (load >> txt); // __END_ENTRY__ + if (txt != "__END_ENTRY__") + throw std::exception(); + MESSAGE("entry: " << entry); + } + + if (txt == "__BEGIN_ELEM_TYPE__") { // __BEGIN_ELEM_TYPE__ + isOK = (load >> elementType); + isOK = (load >> txt); // __END_ELEM_TYPE__ + if (txt != "__END_ELEM_TYPE__") + throw std::exception(); + MESSAGE("elementType: " << elementType); + } + + if (txt == "__BEGIN_GROUP__") { // __BEGIN_GROUP__ + while (isOK && (txt != "__END_GROUP__")) { + isOK = (load >> txt); + if (txt != "__END_GROUP__") { + if (!groupName.empty()) + groupName += " "; + groupName += txt; + } + } // while + MESSAGE("groupName: " << groupName); + } // if + + if (txt == "__PERSIST_ID__") { + isOK = (load >> persistID); + MESSAGE("persistID: " << persistID); + } + std::cout << "isOK: " << isOK << std::endl; + } // while + // } // if + isOK = (load >> txt); // __BEGIN_ENF_MESH__ + } // while } // if return load; @@ -1313,10 +1346,7 @@ std::string GHS3DPlugin_Hypothesis::CommandToRun(const GHS3DPlugin_Hypothesis* h const bool hasShapeToMesh) { TCollection_AsciiString cmd; - if (hasShapeToMesh) - cmd = "ghs3d-41"; // to use old mesh2 format - else - cmd = "ghs3d"; // to use new mesh format + cmd = "mg-tetra.exe"; // check if any option is overridden by hyp->myTextOption bool m = hyp ? ( hyp->myTextOption.find("-m") == std::string::npos ) : true; bool M = hyp ? ( hyp->myTextOption.find("-M") == std::string::npos ) : true; diff --git a/src/GHS3DPlugin/GHS3DPlugin_Hypothesis.hxx b/src/GHS3DPlugin/GHS3DPlugin_Hypothesis.hxx index 2e1acc5..cc31ac7 100644 --- a/src/GHS3DPlugin/GHS3DPlugin_Hypothesis.hxx +++ b/src/GHS3DPlugin/GHS3DPlugin_Hypothesis.hxx @@ -82,6 +82,7 @@ public: //////////////////// struct TGHS3DEnforcedMesh { + int persistID; std::string name; std::string entry; std::string groupName; @@ -245,6 +246,7 @@ public: const TIDSortedElemGroupMap _GetEnforcedTriangles() const { return _enfTriangles; } const TID2SizeMap _GetNodeIDToSizeMap() const {return _nodeIDToSizeMap; } const TSetStrings _GetGroupsToRemove() const {return _groupsToRemove; } + void RestoreEnfElemsByMeshes(); // persistence /*! * \brief Return the enforced vertices */ diff --git a/src/GHS3DPlugin/GHS3DPlugin_Hypothesis_i.cxx b/src/GHS3DPlugin/GHS3DPlugin_Hypothesis_i.cxx index 9129727..b4bf07a 100644 --- a/src/GHS3DPlugin/GHS3DPlugin_Hypothesis_i.cxx +++ b/src/GHS3DPlugin/GHS3DPlugin_Hypothesis_i.cxx @@ -44,9 +44,6 @@ // #include // #include CORBA_SERVER_HEADER(SALOMEDS) -#ifndef GHS3D_VERSION -#define GHS3D_VERSION 41 -#endif //======================================================================= //function : GHS3DPlugin_Hypothesis_i //======================================================================= @@ -839,16 +836,16 @@ GHS3DPlugin::GHS3DEnforcedMeshList* GHS3DPlugin_Hypothesis_i::GetEnforcedMeshes( bool GHS3DPlugin_Hypothesis_i::SetEnforcedMeshWithGroup(SMESH::SMESH_IDSource_ptr theSource, SMESH::ElementType theType, const char* theGroupName) throw (SALOME::SALOME_Exception) { -#if GHS3D_VERSION >= 42 +// #if GHS3D_VERSION >= 42 return p_SetEnforcedMesh(theSource, theType, "", theGroupName); -#else - SALOME::ExceptionStruct ExDescription; - ExDescription.text = "Bad version of GHS3D. It must >= 4.2."; - ExDescription.type = SALOME::BAD_PARAM; - ExDescription.sourceFile = "GHS3DPlugin_Hypothesis_i.cxx"; - ExDescription.lineNumber = 719; - throw SALOME::SALOME_Exception(ExDescription); -#endif +// #else +// SALOME::ExceptionStruct ExDescription; +// ExDescription.text = "Bad version of GHS3D. It must >= 4.2."; +// ExDescription.type = SALOME::BAD_PARAM; +// ExDescription.sourceFile = "GHS3DPlugin_Hypothesis_i.cxx"; +// ExDescription.lineNumber = 719; +// throw SALOME::SALOME_Exception(ExDescription); +// #endif } /*! @@ -858,16 +855,16 @@ bool GHS3DPlugin_Hypothesis_i::SetEnforcedMesh(SMESH::SMESH_IDSource_ptr theSour throw (SALOME::SALOME_Exception) { // MESSAGE("GHS3DPlugin_Hypothesis_i::SetEnforcedMesh"); -#if GHS3D_VERSION >= 42 +// #if GHS3D_VERSION >= 42 return p_SetEnforcedMesh(theSource, theType); -#else - SALOME::ExceptionStruct ExDescription; - ExDescription.text = "Bad version of GHS3D. It must >= 4.2."; - ExDescription.type = SALOME::BAD_PARAM; - ExDescription.sourceFile = "GHS3DPlugin_Hypothesis_i.cxx"; - ExDescription.lineNumber = 750; - throw SALOME::SALOME_Exception(ExDescription); -#endif +// #else +// SALOME::ExceptionStruct ExDescription; +// ExDescription.text = "Bad version of GHS3D. It must >= 4.2."; +// ExDescription.type = SALOME::BAD_PARAM; +// ExDescription.sourceFile = "GHS3DPlugin_Hypothesis_i.cxx"; +// ExDescription.lineNumber = 750; +// throw SALOME::SALOME_Exception(ExDescription); +// #endif } /*! @@ -876,16 +873,16 @@ bool GHS3DPlugin_Hypothesis_i::SetEnforcedMesh(SMESH::SMESH_IDSource_ptr theSour bool GHS3DPlugin_Hypothesis_i::SetEnforcedMeshSizeWithGroup(SMESH::SMESH_IDSource_ptr theSource, SMESH::ElementType theType, double theSize, const char* theGroupName) throw (SALOME::SALOME_Exception) { -#if GHS3D_VERSION >= 42 +// #if GHS3D_VERSION >= 42 return p_SetEnforcedMesh(theSource, theType, "", theGroupName); -#else - SALOME::ExceptionStruct ExDescription; - ExDescription.text = "Bad version of GHS3D. It must >= 4.2."; - ExDescription.type = SALOME::BAD_PARAM; - ExDescription.sourceFile = "GHS3DPlugin_Hypothesis_i.cxx"; - ExDescription.lineNumber = 750; - throw SALOME::SALOME_Exception(ExDescription); -#endif +// #else +// SALOME::ExceptionStruct ExDescription; +// ExDescription.text = "Bad version of GHS3D. It must >= 4.2."; +// ExDescription.type = SALOME::BAD_PARAM; +// ExDescription.sourceFile = "GHS3DPlugin_Hypothesis_i.cxx"; +// ExDescription.lineNumber = 750; +// throw SALOME::SALOME_Exception(ExDescription); +// #endif } /*! @@ -894,16 +891,16 @@ bool GHS3DPlugin_Hypothesis_i::SetEnforcedMeshSizeWithGroup(SMESH::SMESH_IDSourc bool GHS3DPlugin_Hypothesis_i::SetEnforcedMeshSize(SMESH::SMESH_IDSource_ptr theSource, SMESH::ElementType theType, double theSize) throw (SALOME::SALOME_Exception) { -#if GHS3D_VERSION >= 42 +// #if GHS3D_VERSION >= 42 return p_SetEnforcedMesh(theSource, theType); -#else - SALOME::ExceptionStruct ExDescription; - ExDescription.text = "Bad version of GHS3D. It must >= 4.2."; - ExDescription.type = SALOME::BAD_PARAM; - ExDescription.sourceFile = "GHS3DPlugin_Hypothesis_i.cxx"; - ExDescription.lineNumber = 750; - throw SALOME::SALOME_Exception(ExDescription); -#endif +// #else +// SALOME::ExceptionStruct ExDescription; +// ExDescription.text = "Bad version of GHS3D. It must >= 4.2."; +// ExDescription.type = SALOME::BAD_PARAM; +// ExDescription.sourceFile = "GHS3DPlugin_Hypothesis_i.cxx"; +// ExDescription.lineNumber = 750; +// throw SALOME::SALOME_Exception(ExDescription); +// #endif } bool GHS3DPlugin_Hypothesis_i::p_SetEnforcedMesh(SMESH::SMESH_IDSource_ptr theSource, SMESH::ElementType theType, const char* theName, const char* theGroupName) diff --git a/src/GHS3DPlugin/Makefile.am b/src/GHS3DPlugin/Makefile.am index 1d7fc51..182512d 100644 --- a/src/GHS3DPlugin/Makefile.am +++ b/src/GHS3DPlugin/Makefile.am @@ -44,16 +44,16 @@ dist_libGHS3DEngine_la_SOURCES = \ GHS3DPlugin_Hypothesis_i.cxx libGHS3DEngine_la_CPPFLAGS = \ - $(KERNEL_CXXFLAGS) \ - $(CAS_CPPFLAGS) \ - $(GEOM_CXXFLAGS) \ - $(MED_CXXFLAGS) \ - $(SMESH_CXXFLAGS) \ - $(VTK_INCLUDES) \ - $(BOOST_CPPFLAGS) \ - $(CORBA_CXXFLAGS) \ - $(CORBA_INCLUDES) \ - -I$(top_builddir)/idl + $(KERNEL_CXXFLAGS) \ + $(CAS_CPPFLAGS) \ + $(GEOM_CXXFLAGS) \ + $(MED_CXXFLAGS) \ + $(SMESH_CXXFLAGS) \ + $(VTK_INCLUDES) \ + $(BOOST_CPPFLAGS) \ + $(CORBA_CXXFLAGS) \ + $(CORBA_INCLUDES) \ + -I$(top_builddir)/idl libGHS3DEngine_la_LDFLAGS = \ ../../idl/libSalomeIDLGHS3DPLUGIN.la \ diff --git a/src/GUI/GHS3DPluginGUI_HypothesisCreator.cxx b/src/GUI/GHS3DPluginGUI_HypothesisCreator.cxx index 4f32cba..eab4b29 100644 --- a/src/GUI/GHS3DPluginGUI_HypothesisCreator.cxx +++ b/src/GUI/GHS3DPluginGUI_HypothesisCreator.cxx @@ -594,7 +594,7 @@ QFrame* GHS3DPluginGUI_HypothesisCreator::buildFrame() // myEnfMesh = SMESH::SMESH_Mesh::_nil(); // myEnfMeshArray = new SMESH::mesh_array(); - myEnfMeshWdg = new StdMeshersGUI_ObjectReferenceParamWdg( IDSOURCE, myEnfMeshGroup, /*multiSel=*/true); + myEnfMeshWdg = new StdMeshersGUI_ObjectReferenceParamWdg( SMESH::IDSOURCE, myEnfMeshGroup, /*multiSel=*/true); myEnfMeshWdg->SetDefaultText(tr("GHS3D_ENF_SELECT_MESH"), "QLineEdit { color: grey }"); myEnfMeshWdg->AvoidSimultaneousSelection(myEnfVertexWdg);