From: rnc Date: Thu, 22 Aug 2013 11:25:45 +0000 (+0000) Subject: Merge from BR_size_maps X-Git-Tag: V7_3_0a1~23 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=da5e1fc1a66960a098a5980014e0b149cae58d73;p=plugins%2Fhexoticplugin.git Merge from BR_size_maps --- diff --git a/adm_local/unix/config_files/check_MESHGEMS_CADSURF.m4 b/adm_local/unix/config_files/check_MESHGEMS_CADSURF.m4 new file mode 100644 index 0000000..c4ce3a5 --- /dev/null +++ b/adm_local/unix/config_files/check_MESHGEMS_CADSURF.m4 @@ -0,0 +1,129 @@ +dnl Copyright (C) 2007-2013 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 + +dnl File : check_MESHGEMS_CADSURF.m4 +dnl Author : Gilles DAVID, Open CASCADE S.A.S (gilles.david@opencascade.com) +dnl +AC_DEFUN([CHECK_MESHGEMS_CADSURF],[ + +AC_REQUIRE([AC_PROG_CXX])dnl +AC_REQUIRE([AC_PROG_CXXCPP])dnl + +AC_CHECKING([for MeshGems-CADSurf commercial product]) + +AC_LANG_SAVE +AC_LANG_CPLUSPLUS + +MESHGEMS_CADSURF_INCLUDES="" +MESHGEMS_CADSURF_LIBS="" + +AC_ARG_WITH([meshgems], + [ --with-meshgems=DIR root directory path of MeshGems-CADSurf installation]) + +CADSURF_ok=no + +if test "$with-meshgems" != "no" ; then + if test "$with-meshgems" == "yes" || test "$with-meshgems" == "auto"; then + MESHGEMS_CADSURF_HOME="" + else + MESHGEMS_CADSURF_HOME="$with_meshgems" + fi + + if test "$MESHGEMS_CADSURF_HOME" == "" ; then + if test "x$MESHGEMS_CADSURFHOME" != "x" ; then + MESHGEMS_CADSURF_HOME=$MESHGEMS_CADSURFHOME + fi + if test "x$CADSURFHOME" != "x" ; then + MESHGEMS_CADSURF_HOME=$CADSURFHOME + fi + if test "x$MESHGEMSHOME" != "x" ; then + MESHGEMS_CADSURF_HOME=$MESHGEMSHOME + fi + fi + + if test "x$MESHGEMS_CADSURF_HOME" != "x"; then + + echo + echo ------------------------------------------------- + echo You are about to choose to use somehow the + echo MeshGems-CADSurf commercial product to generate 2D mesh. + echo + + LOCAL_INCLUDES="-I$MESHGEMS_CADSURF_HOME/include" + LOCAL_LIBS="-L$MESHGEMS_CADSURF_HOME/lib/Linux" + archtest="$(`which arch`)" + if test "x$archtest" = "x" ; then + archtest="`uname -m`" + fi + if test $archtest = "x86_64" ; then + LOCAL_LIBS="-L$MESHGEMS_CADSURF_HOME/lib/Linux_64" + fi + LOCAL_LIBS="${LOCAL_LIBS} -lmeshgems -lmg-cadsurf -lmg-precad" + + CPPFLAGS_old="$CPPFLAGS" + CXXFLAGS_old="$CXXFLAGS" + CPPFLAGS="$LOCAL_INCLUDES $CPPFLAGS" + CXXFLAGS="$LOCAL_INCLUDES $CXXFLAGS" + + AC_MSG_CHECKING([for MeshGems-CADSurf header file]) + + AC_CHECK_HEADER([meshgems/meshgems.h],[CADSURF_ok=yes],[CADSURF_ok=no]) + AC_CHECK_HEADER([meshgems/cadsurf.h],[CADSURF_ok=yes],[CADSURF_ok=no]) + + if test "x$CADSURF_ok" == "xyes"; then + + AC_MSG_CHECKING([for MeshGems-CADSurf library]) + + LIBS_old="$LIBS" + LIBS="-L. $LOCAL_LIBS $LIBS" + + AC_TRY_LINK( +extern "C" { +#include "meshgems/meshgems.h" +}, context_new(), + CADSURF_ok=yes,CADSURF_ok=no + ) + + LIBS="$LIBS_old" + + AC_MSG_RESULT([$CADSURF_ok]) + fi + + CPPFLAGS="$CPPFLAGS_old" + CXXFLAGS="$CXXFLAGS_old" + + fi +fi + +if test "x$CADSURF_ok" == xno ; then + AC_MSG_RESULT([for MeshGems-CADSurf: no]) + AC_MSG_WARN([MeshGems-CADSurf includes or libraries are not found or are not properly installed]) + AC_MSG_WARN([Cannot build without MeshGems-CADSurf. Use --with_meshgems option to define MeshGems installation.]) +else + MESHGEMS_CADSURF_INCLUDES=$LOCAL_INCLUDES + MESHGEMS_CADSURF_LIBS=$LOCAL_LIBS + AC_MSG_RESULT([for MeshGems-CADSurf: yes]) +fi + +AC_SUBST(MESHGEMS_CADSURF_INCLUDES) +AC_SUBST(MESHGEMS_CADSURF_LIBS) + +AC_LANG_RESTORE + +])dnl diff --git a/configure.ac b/configure.ac index b943258..6eb4fc9 100644 --- a/configure.ac +++ b/configure.ac @@ -316,14 +316,6 @@ echo CHECK_HTML_GENERATORS -echo -echo --------------------------------------------- -echo Testing Hexotic -echo --------------------------------------------- -echo - -CHECK_HEXOTIC - echo echo --------------------------------------------- echo Testing Kernel diff --git a/doc/salome/examples/hexoticdemo.py b/doc/salome/examples/hexoticdemo.py index 188663b..bf02fc8 100644 --- a/doc/salome/examples/hexoticdemo.py +++ b/doc/salome/examples/hexoticdemo.py @@ -24,10 +24,25 @@ BLSURF.SetGeometricMesh( 1 ) # create a Hexotic algorithm for volumes HEXOTIC = hexoticMesh.Hexahedron(algo=smeshBuilder.Hexotic) -# compute the mesh -hexoticMesh.Compute() +## compute the mesh +#hexoticMesh.Compute() # Change the level of subdivision HEXOTIC.SetMinMaxHexes(4, 8) +## compute the mesh +#hexoticMesh.Compute() + +# Local size + +# Get the sphere skin +faces = geompy.SubShapeAll(sphere, geompy.ShapeType["FACE"]) + +# Set a local size on the face +HEXOTIC.SetMinMaxSize(10, 20) +HEXOTIC.SetSizeMap(faces[0], 10) + +# compute the mesh +hexoticMesh.Compute() + # End of script diff --git a/doc/salome/gui/HexoticPLUGIN/images/hexotic_local_size_example.png b/doc/salome/gui/HexoticPLUGIN/images/hexotic_local_size_example.png new file mode 100644 index 0000000..84bcc51 Binary files /dev/null and b/doc/salome/gui/HexoticPLUGIN/images/hexotic_local_size_example.png differ diff --git a/doc/salome/gui/HexoticPLUGIN/images/hexotic_local_size_parameters.png b/doc/salome/gui/HexoticPLUGIN/images/hexotic_local_size_parameters.png new file mode 100644 index 0000000..7ab11e5 Binary files /dev/null and b/doc/salome/gui/HexoticPLUGIN/images/hexotic_local_size_parameters.png differ diff --git a/doc/salome/gui/HexoticPLUGIN/images/hexotic_parameters.png b/doc/salome/gui/HexoticPLUGIN/images/hexotic_parameters.png index a91e133..7b95e97 100644 Binary files a/doc/salome/gui/HexoticPLUGIN/images/hexotic_parameters.png and b/doc/salome/gui/HexoticPLUGIN/images/hexotic_parameters.png differ diff --git a/doc/salome/gui/HexoticPLUGIN/input/hexotic_hypo.doc b/doc/salome/gui/HexoticPLUGIN/input/hexotic_hypo.doc index 168ddae..3e5df46 100644 --- a/doc/salome/gui/HexoticPLUGIN/input/hexotic_hypo.doc +++ b/doc/salome/gui/HexoticPLUGIN/input/hexotic_hypo.doc @@ -6,6 +6,8 @@ algorithm. This algorithm is a commercial software. \n To get a licence, visit http://www.distene.com/en/corp/eval-distene.html +\section hexotic_general_parameters General parameters + \image html hexotic_parameters.png