From a912267ca32e0fe2e262dca40b6083a16054d66c Mon Sep 17 00:00:00 2001 From: vsr Date: Thu, 28 Feb 2013 15:40:38 +0000 Subject: [PATCH] Merge from V6_main 28/02/2013 --- build_cmake | 2 +- build_cmake.bat | 2 +- src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx | 14 ++++++++++++-- src/GUI/BLSURFPluginGUI_HypothesisCreator.h | 9 +++++++++ 4 files changed, 23 insertions(+), 4 deletions(-) diff --git a/build_cmake b/build_cmake index 2a9a278..21a5b49 100755 --- a/build_cmake +++ b/build_cmake @@ -21,7 +21,7 @@ CURRENT_DIR=`pwd` CONF_DIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"` cd ${CONF_DIR} -python $KERNEL_ROOT_DIR/salome_adm/cmake_files/am2cmake.py --blsurfplugin +python $KERNEL_ROOT_DIR/salome_adm/cmake_files/deprecated/am2cmake.py --blsurfplugin status=$? cd ${CURRENT_DIR} exit $status diff --git a/build_cmake.bat b/build_cmake.bat index de8ae03..27a3624 100644 --- a/build_cmake.bat +++ b/build_cmake.bat @@ -17,4 +17,4 @@ @REM See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @REM -%PYTHONBIN% %KERNEL_ROOT_DIR%\salome_adm\cmake_files\am2cmake.py --blsurfplugin +%PYTHONBIN% %KERNEL_ROOT_DIR%\salome_adm\cmake_files\deprecated\am2cmake.py --blsurfplugin diff --git a/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx b/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx index fa3e87f..69a9640 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx +++ b/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx @@ -2242,8 +2242,8 @@ bool BLSURFPlugin_BLSURF::compute(SMESH_Mesh& aMesh, } /* retrieve mesh data (see meshgems/mesh.h) */ - integer nv, ne, nt, nq, vtx[4], tag; - integer *evedg, *evtri, *evquad, type; + integer nv, ne, nt, nq, vtx[4], tag, nb_tag; + integer *evedg, *evtri, *evquad, *tags_buff, type; real xyz[3]; mesh_get_vertex_count(msh, &nv); @@ -2254,6 +2254,7 @@ bool BLSURFPlugin_BLSURF::compute(SMESH_Mesh& aMesh, evedg = (integer *)mesh_calloc_generic_buffer(msh); evtri = (integer *)mesh_calloc_generic_buffer(msh); evquad = (integer *)mesh_calloc_generic_buffer(msh); + tags_buff = (integer*)mesh_calloc_generic_buffer(msh); SMDS_MeshNode** nodes = new SMDS_MeshNode*[nv+1]; bool* tags = new bool[nv+1]; @@ -2345,6 +2346,15 @@ bool BLSURFPlugin_BLSURF::compute(SMESH_Mesh& aMesh, mesh_get_edge_vertices(msh, it, vtx); mesh_get_edge_extra_vertices(msh, it, &type, evedg); mesh_get_edge_tag(msh, it, &tag); + + // If PreCAD performed some cleaning operations (remove tiny edges, + // merge edges ...) an output tag can indeed represent several original tags. + // Get the initial tags corresponding to the output tag and redefine the tag as + // the last of the two initial tags (else the output tag is out of emap and hasn't any meaning) + mesh_get_composite_tag_definition(msh, tag, &nb_tag, tags_buff); + if(nb_tag > 1) + tag=tags_buff[nb_tag-1]; + if (tags[vtx[0]]) { Set_NodeOnEdge(meshDS, nodes[vtx[0]], emap(tag)); tags[vtx[0]] = false; diff --git a/src/GUI/BLSURFPluginGUI_HypothesisCreator.h b/src/GUI/BLSURFPluginGUI_HypothesisCreator.h index a8d277f..717012f 100644 --- a/src/GUI/BLSURFPluginGUI_HypothesisCreator.h +++ b/src/GUI/BLSURFPluginGUI_HypothesisCreator.h @@ -27,6 +27,15 @@ #ifndef BLSURFPLUGINGUI_HypothesisCreator_H #define BLSURFPLUGINGUI_HypothesisCreator_H +// akl: avoid compilation warning on Linux : "_POSIX_C_SOURCE" and "_XOPEN_SOURCE" are redefined +#ifdef _POSIX_C_SOURCE +#undef _POSIX_C_SOURCE +#endif + +#ifdef _XOPEN_SOURCE +#undef _XOPEN_SOURCE +#endif + #ifdef WIN32 #if defined BLSURFPLUGIN_GUI_EXPORTS || defined BLSURFPluginGUI_EXPORTS #define BLSURFPLUGIN_GUI_EXPORT __declspec( dllexport ) -- 2.39.2