Salome HOME
Merge from V6_main 28/02/2013 V7_1_0b1
authorvsr <vsr@opencascade.com>
Thu, 28 Feb 2013 15:40:38 +0000 (15:40 +0000)
committervsr <vsr@opencascade.com>
Thu, 28 Feb 2013 15:40:38 +0000 (15:40 +0000)
build_cmake
build_cmake.bat
src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx
src/GUI/BLSURFPluginGUI_HypothesisCreator.h

index 2a9a278ee3ade30aec39dacd69eeb279fbf8bb93..21a5b49e4f88123d048934e2d796e26bdb7d38c9 100755 (executable)
@@ -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
index de8ae03b4788ea3bdf939006665e8701aac82f3f..27a36241fdada64d8f4bb3ab8ad6842a079fa312 100644 (file)
@@ -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\r
+%PYTHONBIN% %KERNEL_ROOT_DIR%\salome_adm\cmake_files\deprecated\am2cmake.py --blsurfplugin\r
index fa3e87fa5c0e8778b08659f0c81e10fc29d17c91..69a964074ce0aa48887c07560534c0528468bb34 100644 (file)
@@ -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;
index a8d277f2899195a180de7f8e7414b494c72512de..717012f0feef2f452a1d9f436203919974f1c28c 100644 (file)
 #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 )