From: jfa Date: Mon, 13 Mar 2006 16:03:52 +0000 (+0000) Subject: Join modifications from branch OCC_development_for_3_2_0a2 X-Git-Tag: OCC_3_2_0a2_TC~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=14f4b7bcf8ce41078b583005dbeae402dc6a8584;p=plugins%2Fnetgenplugin.git Join modifications from branch OCC_development_for_3_2_0a2 --- diff --git a/Makefile.in b/Makefile.in index bc00cd6..eb02034 100644 --- a/Makefile.in +++ b/Makefile.in @@ -14,7 +14,7 @@ VPATH=.:@srcdir@:@top_srcdir@/bin:@top_srcdir@/resources:./bin:@top_srcdir@/idl @COMMENCE@ -SUBDIRS = idl src +SUBDIRS = idl src adm_local RESOURCES_FILES = NETGENPlugin.xml diff --git a/adm_local/Makefile.in b/adm_local/Makefile.in new file mode 100644 index 0000000..9b5e810 --- /dev/null +++ b/adm_local/Makefile.in @@ -0,0 +1,41 @@ +# source path +top_srcdir=@top_srcdir@ +top_builddir=.. +srcdir=@srcdir@ +VPATH=.:$(srcdir)/adm_local + + +all: resources + +install: + cp -rf @top_srcdir@/adm_local @prefix@ + +bin: + +resources : + cp -rf @top_srcdir@/adm_local $(top_builddir) + +inc: + +lib: + +depend: + +depend_idl: + +install-end: + +install-include: + +install-bin: + +uninstall: + +uninstall-idl: + +distclean: + +clean: + +distclean-other: + diff --git a/adm_local/unix/config_files/check_Geom.m4 b/adm_local/unix/config_files/check_Geom.m4 deleted file mode 100644 index 803ca75..0000000 --- a/adm_local/unix/config_files/check_Geom.m4 +++ /dev/null @@ -1,54 +0,0 @@ -# Check availability of Geom binary distribution -# -# Author : Nicolas REJNERI (OPEN CASCADE, 2003) -# - -AC_DEFUN([CHECK_GEOM],[ - -AC_CHECKING(for Geom) - -Geom_ok=no - -AC_ARG_WITH(geom, - [ --with-geom=DIR root directory path of GEOM installation ], - GEOM_DIR="$withval",GEOM_DIR="") - -if test "x$GEOM_DIR" == "x" ; then - -# no --with-geom-dir option used - - if test "x$GEOM_ROOT_DIR" != "x" ; then - - # GEOM_ROOT_DIR environment variable defined - GEOM_DIR=$GEOM_ROOT_DIR - - else - - # search Geom binaries in PATH variable - AC_PATH_PROG(TEMP, libGEOM_Swig.py) - if test "x$TEMP" != "x" ; then - GEOM_BIN_DIR=`dirname $TEMP` - GEOM_DIR=`dirname $GEOM_BIN_DIR` - fi - - fi -# -fi - -if test -f ${GEOM_DIR}/bin/salome/libGEOM_Swig.py ; then - Geom_ok=yes - AC_MSG_RESULT(Using Geom module distribution in ${GEOM_DIR}) - - if test "x$GEOM_ROOT_DIR" == "x" ; then - GEOM_ROOT_DIR=${GEOM_DIR} - fi - AC_SUBST(GEOM_ROOT_DIR) - -else - AC_MSG_WARN("Cannot find compiled Geom module distribution") -fi - -AC_MSG_RESULT(for Geom: $Geom_ok) - -])dnl - diff --git a/adm_local/unix/config_files/check_NETGENPLUGIN.m4 b/adm_local/unix/config_files/check_NETGENPLUGIN.m4 new file mode 100644 index 0000000..af8cfde --- /dev/null +++ b/adm_local/unix/config_files/check_NETGENPLUGIN.m4 @@ -0,0 +1,121 @@ +AC_DEFUN([CHECK_NETGEN],[ + +AC_REQUIRE([AC_PROG_CXX])dnl +AC_REQUIRE([AC_PROG_CXXCPP])dnl + +AC_CHECKING(for Netgen Libraries) + +AC_LANG_SAVE +AC_LANG_CPLUSPLUS + +AC_ARG_WITH(netgen, + [ --with-netgen=DIR root directory path of NETGEN installation], + NETGEN_HOME=$withval,NETGEN_HOME="") + +NETGEN_INCLUDES="" +NETGEN_LIBS_DIR="" + +Netgen_ok=no + +if test "x$NETGEN_HOME" == "x" ; then + +# no --with-netgen option used + if test "x$NETGENHOME" != "x" ; then + + # NETGENHOME environment variable defined + NETGEN_HOME=$NETGENHOME + + fi +# +fi + +if test "x$NETGEN_HOME" != "x"; then + + echo + echo + echo ------------------------------------------------- + echo You are about to choose to use somehow the + echo Netgen Library to generate Tetrahedric mesh. + echo + echo WARNING + echo ---------------------------------------------------------- + echo ---------------------------------------------------------- + echo You are strongly advised to consult the file + echo NETGENPLUGIN_SRC/src/ReadMeForNgUsers, particularly about + echo assumptions made on the installation of the Netgen + echo application and libraries. + echo Ask your system administrator for those details. + echo ---------------------------------------------------------- + echo ---------------------------------------------------------- + echo + echo + + + + NETGEN_INCLUDES="-I$NETGEN_HOME/include" + NETGEN_LIBS_DIR="$NETGEN_HOME/lib/LINUX" + + CPPFLAGS_old="$CPPFLAGS" + CXXFLAGS_old="$CXXFLAGS" + CPPFLAGS="$NETGEN_INCLUDES $CPPFLAGS" + CXXFLAGS="$NETGEN_INCLUDES $CXXFLAGS" + + AC_MSG_CHECKING(for Netgen header file) + + AC_CHECK_HEADER(nglib.h,Netgen_ok=yes,Netgen_ok=no) + if test "x$Netgen_ok" == "xyes"; then + + AC_MSG_CHECKING(for Netgen libraries) + + LDFLAGS_old="$LDFLAGS" + LDFLAGS="-L. -lNETGEN $LDFLAGS" + + AC_TRY_COMPILE(#include +#include +#include "nglib.h" +,Ng_Init(); + Ng_Exit();,Netgen_ok=yes;ar x "$NETGEN_LIBS_DIR/libnginterface.a"; + ar x "$NETGEN_LIBS_DIR/libcsg.a"; + ar x "$NETGEN_LIBS_DIR/libgprim.a"; + ar x "$NETGEN_LIBS_DIR/libmesh.a"; + ar x "$NETGEN_LIBS_DIR/libopti.a"; + ar x "$NETGEN_LIBS_DIR/libgen.a"; + ar x "$NETGEN_LIBS_DIR/libla.a"; + ar x "$NETGEN_LIBS_DIR/libstlgeom.a"; + ar x "$NETGEN_LIBS_DIR/libgeom2d.a"; + $CXX -shared linopt.o bfgs.o linsearch.o global.o bisect.o meshtool.o refine.o ruler3.o improve3.o adfront3.o tetrarls.o prism2rls.o pyramidrls.o pyramid2rls.o netrule3.o ruler2.o meshclass.o improve2.o adfront2.o netrule2.o triarls.o geomsearch.o secondorder.o meshtype.o parser3.o quadrls.o specials.o parser2.o meshing2.o meshing3.o meshfunc.o localh.o improve2gen.o delaunay.o boundarylayer.o msghandler.o meshfunc2d.o smoothing2.o smoothing3.o topology.o curvedelems.o clusters.o zrefine.o ngexception.o geomtest3d.o geom2d.o geom3d.o adtree.o transform3d.o geomfuncs.o polynomial.o densemat.o vector.o basemat.o sparsmat.o algprim.o brick.o manifold.o bspline2d.o meshsurf.o csgeom.o polyhedra.o curve2d.o singularref.o edgeflw.o solid.o explicitcurve2d.o specpoin.o gencyl.o revolution.o genmesh.o spline3d.o surface.o identify.o triapprox.o meshstlsurface.o stlline.o stltopology.o stltool.o stlgeom.o stlgeomchart.o stlgeommesh.o table.o optmem.o spbita2d.o hashtabl.o sort.o flags.o seti.o bitarray.o array.o symbolta.o mystring.o moveablemem.o spline2d.o splinegeometry2.o ngnewdelete.o nglib.o -o libNETGEN.so; + rm -rf adfront2.o adfront3.o adtree.o algprim.o array.o basemat.o bfgs.o bisect.o bitarray.o boundarylayer.o brick.o bspline2d.o clusters.o csgeom.o csgparser.o curve2d.o curvedelems.o delaunay.o densemat.o dynamicmem.o edgeflw.o explicitcurve2d.o extrusion.o flags.o gencyl.o genmesh.o geom2dmesh.o geom2d.o geom3d.o geomfuncs.o geomsearch.o geomtest3d.o global.o hashtabl.o hprefinement.o identify.o importsolution.o improve2gen.o improve2.o improve3.o linopt.o linsearch.o localh.o manifold.o meshclass.o meshfunc2d.o meshfunc.o meshing2.o meshing3.o meshstlsurface.o meshsurf.o meshtool.o meshtype.o moveablemem.o msghandler.o mystring.o netrule2.o netrule3.o ngexception.o nglib.o ngnewdelete.o optmem.o parser2.o parser3.o parthreads.o polyhedra.o polynomial.o prism2rls.o pyramid2rls.o pyramidrls.o quadrls.o readuser.o refine.o revolution.o ruler2.o ruler3.o secondorder.o seti.o singularref.o smoothing2.o smoothing3.o solid.o sort.o sparsmat.o spbita2d.o specials.o specpoin.o spline2d.o spline3d.o splinegeometry2.o stlgeomchart.o stlgeommesh.o stlgeom.o stlline.o stltool.o stltopology.o surface.o symbolta.o table.o tetrarls.o topology.o transform3d.o triapprox.o triarls.o vector.o writeabaqus.o writediffpack.o writefeap.o writefluent.o writepermas.o writetecplot.o writetochnog.o writeuser.o wuchemnitz.o zrefine.o, + Netgen_ok=no) + + AC_CACHE_VAL(salome_netgen_lib,[ + AC_TRY_LINK( +#include +#include +#include "nglib.h" +,Ng_Init(); + Ng_Exit();, + eval "salome_netgen_lib=yes";rm -rf libNETGEN.so,eval "salome_netgen_lib=no";rm -rf libNETGEN.so) + ]) + Netgen_ok="$salome_netgen_lib" + + + LDFLAGS="$LDFLAGS_old" + fi + + CPPFLAGS="$CPPFLAGS_old" + CXXFLAGS="$CXXFLAGS_old" + + if test "x$Netgen_ok" == xno ; then + AC_MSG_RESULT(no) + AC_MSG_WARN(Netgen libraries not found or not properly installed) + else + AC_MSG_RESULT(yes) + fi +fi + +AC_SUBST(NETGEN_INCLUDES) +AC_SUBST(NETGEN_LIBS_DIR) + +AC_LANG_RESTORE + +])dnl diff --git a/adm_local/unix/config_files/check_Netgen.m4 b/adm_local/unix/config_files/check_Netgen.m4 deleted file mode 100644 index af8cfde..0000000 --- a/adm_local/unix/config_files/check_Netgen.m4 +++ /dev/null @@ -1,121 +0,0 @@ -AC_DEFUN([CHECK_NETGEN],[ - -AC_REQUIRE([AC_PROG_CXX])dnl -AC_REQUIRE([AC_PROG_CXXCPP])dnl - -AC_CHECKING(for Netgen Libraries) - -AC_LANG_SAVE -AC_LANG_CPLUSPLUS - -AC_ARG_WITH(netgen, - [ --with-netgen=DIR root directory path of NETGEN installation], - NETGEN_HOME=$withval,NETGEN_HOME="") - -NETGEN_INCLUDES="" -NETGEN_LIBS_DIR="" - -Netgen_ok=no - -if test "x$NETGEN_HOME" == "x" ; then - -# no --with-netgen option used - if test "x$NETGENHOME" != "x" ; then - - # NETGENHOME environment variable defined - NETGEN_HOME=$NETGENHOME - - fi -# -fi - -if test "x$NETGEN_HOME" != "x"; then - - echo - echo - echo ------------------------------------------------- - echo You are about to choose to use somehow the - echo Netgen Library to generate Tetrahedric mesh. - echo - echo WARNING - echo ---------------------------------------------------------- - echo ---------------------------------------------------------- - echo You are strongly advised to consult the file - echo NETGENPLUGIN_SRC/src/ReadMeForNgUsers, particularly about - echo assumptions made on the installation of the Netgen - echo application and libraries. - echo Ask your system administrator for those details. - echo ---------------------------------------------------------- - echo ---------------------------------------------------------- - echo - echo - - - - NETGEN_INCLUDES="-I$NETGEN_HOME/include" - NETGEN_LIBS_DIR="$NETGEN_HOME/lib/LINUX" - - CPPFLAGS_old="$CPPFLAGS" - CXXFLAGS_old="$CXXFLAGS" - CPPFLAGS="$NETGEN_INCLUDES $CPPFLAGS" - CXXFLAGS="$NETGEN_INCLUDES $CXXFLAGS" - - AC_MSG_CHECKING(for Netgen header file) - - AC_CHECK_HEADER(nglib.h,Netgen_ok=yes,Netgen_ok=no) - if test "x$Netgen_ok" == "xyes"; then - - AC_MSG_CHECKING(for Netgen libraries) - - LDFLAGS_old="$LDFLAGS" - LDFLAGS="-L. -lNETGEN $LDFLAGS" - - AC_TRY_COMPILE(#include -#include -#include "nglib.h" -,Ng_Init(); - Ng_Exit();,Netgen_ok=yes;ar x "$NETGEN_LIBS_DIR/libnginterface.a"; - ar x "$NETGEN_LIBS_DIR/libcsg.a"; - ar x "$NETGEN_LIBS_DIR/libgprim.a"; - ar x "$NETGEN_LIBS_DIR/libmesh.a"; - ar x "$NETGEN_LIBS_DIR/libopti.a"; - ar x "$NETGEN_LIBS_DIR/libgen.a"; - ar x "$NETGEN_LIBS_DIR/libla.a"; - ar x "$NETGEN_LIBS_DIR/libstlgeom.a"; - ar x "$NETGEN_LIBS_DIR/libgeom2d.a"; - $CXX -shared linopt.o bfgs.o linsearch.o global.o bisect.o meshtool.o refine.o ruler3.o improve3.o adfront3.o tetrarls.o prism2rls.o pyramidrls.o pyramid2rls.o netrule3.o ruler2.o meshclass.o improve2.o adfront2.o netrule2.o triarls.o geomsearch.o secondorder.o meshtype.o parser3.o quadrls.o specials.o parser2.o meshing2.o meshing3.o meshfunc.o localh.o improve2gen.o delaunay.o boundarylayer.o msghandler.o meshfunc2d.o smoothing2.o smoothing3.o topology.o curvedelems.o clusters.o zrefine.o ngexception.o geomtest3d.o geom2d.o geom3d.o adtree.o transform3d.o geomfuncs.o polynomial.o densemat.o vector.o basemat.o sparsmat.o algprim.o brick.o manifold.o bspline2d.o meshsurf.o csgeom.o polyhedra.o curve2d.o singularref.o edgeflw.o solid.o explicitcurve2d.o specpoin.o gencyl.o revolution.o genmesh.o spline3d.o surface.o identify.o triapprox.o meshstlsurface.o stlline.o stltopology.o stltool.o stlgeom.o stlgeomchart.o stlgeommesh.o table.o optmem.o spbita2d.o hashtabl.o sort.o flags.o seti.o bitarray.o array.o symbolta.o mystring.o moveablemem.o spline2d.o splinegeometry2.o ngnewdelete.o nglib.o -o libNETGEN.so; - rm -rf adfront2.o adfront3.o adtree.o algprim.o array.o basemat.o bfgs.o bisect.o bitarray.o boundarylayer.o brick.o bspline2d.o clusters.o csgeom.o csgparser.o curve2d.o curvedelems.o delaunay.o densemat.o dynamicmem.o edgeflw.o explicitcurve2d.o extrusion.o flags.o gencyl.o genmesh.o geom2dmesh.o geom2d.o geom3d.o geomfuncs.o geomsearch.o geomtest3d.o global.o hashtabl.o hprefinement.o identify.o importsolution.o improve2gen.o improve2.o improve3.o linopt.o linsearch.o localh.o manifold.o meshclass.o meshfunc2d.o meshfunc.o meshing2.o meshing3.o meshstlsurface.o meshsurf.o meshtool.o meshtype.o moveablemem.o msghandler.o mystring.o netrule2.o netrule3.o ngexception.o nglib.o ngnewdelete.o optmem.o parser2.o parser3.o parthreads.o polyhedra.o polynomial.o prism2rls.o pyramid2rls.o pyramidrls.o quadrls.o readuser.o refine.o revolution.o ruler2.o ruler3.o secondorder.o seti.o singularref.o smoothing2.o smoothing3.o solid.o sort.o sparsmat.o spbita2d.o specials.o specpoin.o spline2d.o spline3d.o splinegeometry2.o stlgeomchart.o stlgeommesh.o stlgeom.o stlline.o stltool.o stltopology.o surface.o symbolta.o table.o tetrarls.o topology.o transform3d.o triapprox.o triarls.o vector.o writeabaqus.o writediffpack.o writefeap.o writefluent.o writepermas.o writetecplot.o writetochnog.o writeuser.o wuchemnitz.o zrefine.o, - Netgen_ok=no) - - AC_CACHE_VAL(salome_netgen_lib,[ - AC_TRY_LINK( -#include -#include -#include "nglib.h" -,Ng_Init(); - Ng_Exit();, - eval "salome_netgen_lib=yes";rm -rf libNETGEN.so,eval "salome_netgen_lib=no";rm -rf libNETGEN.so) - ]) - Netgen_ok="$salome_netgen_lib" - - - LDFLAGS="$LDFLAGS_old" - fi - - CPPFLAGS="$CPPFLAGS_old" - CXXFLAGS="$CXXFLAGS_old" - - if test "x$Netgen_ok" == xno ; then - AC_MSG_RESULT(no) - AC_MSG_WARN(Netgen libraries not found or not properly installed) - else - AC_MSG_RESULT(yes) - fi -fi - -AC_SUBST(NETGEN_INCLUDES) -AC_SUBST(NETGEN_LIBS_DIR) - -AC_LANG_RESTORE - -])dnl diff --git a/adm_local/unix/config_files/check_SMESH.m4 b/adm_local/unix/config_files/check_SMESH.m4 deleted file mode 100644 index 86a8264..0000000 --- a/adm_local/unix/config_files/check_SMESH.m4 +++ /dev/null @@ -1,54 +0,0 @@ -# Check availability of SMesh binary distribution -# -# Author : Nicolas REJNERI (OPEN CASCADE, 2003) -# - -AC_DEFUN([CHECK_SMESH],[ - -AC_CHECKING(for SMesh) - -SMesh_ok=no - -AC_ARG_WITH(smesh, - [ --with-smesh=DIR root directory path of SMESH installation ], - SMESH_DIR="$withval",SMESH_DIR="") - -if test "x$SMESH_DIR" == "x" ; then - -# no --with-smesh option used - - if test "x$SMESH_ROOT_DIR" != "x" ; then - - # SMESH_ROOT_DIR environment variable defined - SMESH_DIR=$SMESH_ROOT_DIR - - else - - # search SMESH binaries in PATH variable - AC_PATH_PROG(TEMP, libSMESH_Swig.py) - if test "x$TEMP" != "x" ; then - SMESH_BIN_DIR=`dirname $TEMP` - SMESH_DIR=`dirname $SMESH_BIN_DIR` - fi - - fi -# -fi - -if test -f ${SMESH_DIR}/bin/salome/libSMESH_Swig.py ; then - SMesh_ok=yes - AC_MSG_RESULT(Using SMesh module distribution in ${SMESH_DIR}) - - if test "x$SMESH_ROOT_DIR" == "x" ; then - SMESH_ROOT_DIR=${SMESH_DIR} - fi - AC_SUBST(SMESH_ROOT_DIR) - -else - AC_MSG_WARN("Cannot find compiled SMesh module distribution") -fi - -AC_MSG_RESULT(for SMesh: $SMesh_ok) - -])dnl - diff --git a/adm_local/unix/make_commence.in b/adm_local/unix/make_commence.in index 2d39b96..bd60ef8 100644 --- a/adm_local/unix/make_commence.in +++ b/adm_local/unix/make_commence.in @@ -250,18 +250,32 @@ $(top_srcdir)/configure.in: $(top_srcdir)/configure.in.base ACLOCAL_SRC = \ -ac_cxx_bool.m4 check_corba.m4 check_vtk.m4 \ +ac_cxx_bool.m4 check_corba.m4 \ ac_cxx_depend_flag.m4 check_hdf5.m4 enable_pthreads.m4 \ ac_cxx_mutable.m4 check_mico.m4 libtool.m4 \ ac_cxx_namespaces.m4 check_omniorb.m4 pyembed.m4 \ -ac_cxx_partial_specialization.m4 check_opengl.m4 python.m4 \ +ac_cxx_partial_specialization.m4 python.m4 \ ac_cxx_typename.m4 check_pthreads.m4 check_cas.m4 \ -ac_cc_warnings.m4 check_qt.m4 check_swig.m4 \ -check_boost.m4 +ac_cc_warnings.m4 check_swig.m4 check_boost.m4 #ifeq (@WITHNETGEN@,yes) # ACLOCAL_SRC += check_Netgen.m4 #endif -$(top_srcdir)/aclocal.m4: $(ACLOCAL_SRC:%=@KERNEL_ROOT_DIR@/salome_adm/unix/config_files/%) - cd $(top_srcdir) ; aclocal --acdir=adm_local/unix/config_files -I @KERNEL_ROOT_DIR@/salome_adm/unix/config_files +ACLOCAL_GUI = \ +check_vtk.m4 check_opengl.m4 check_qt.m4 \ +check_GUI.m4 check_corba_in_GUI.m4 + +ACLOCAL_GEOM = check_GEOM.m4 + +ACLOCAL_SMESH = check_SMESH.m4 + +$(top_srcdir)/aclocal.m4: $(ACLOCAL_SRC:%=@KERNEL_ROOT_DIR@/salome_adm/unix/config_files/%) \ + $(ACLOCAL_GUI:%=@GUI_ROOT_DIR@/adm_local/unix/config_files/%) \ + $(ACLOCAL_GEOM:%=@GEOM_ROOT_DIR@/adm_local/unix/config_files/%) \ + $(ACLOCAL_SMESH:%=@SMESH_ROOT_DIR@/adm_local/unix/config_files/%) + cd $(top_srcdir) ; aclocal --acdir=adm_local/unix/config_files -I @KERNEL_ROOT_DIR@/salome_adm/unix/config_files \ + -I @GUI_ROOT_DIR@/adm_local/unix/config_files \ + -I @GEOM_ROOT_DIR@/adm_local/unix/config_files \ + -I @SMESH_ROOT_DIR@/adm_local/unix/config_files + diff --git a/build_configure b/build_configure index 7a78b87..61073f4 100755 --- a/build_configure +++ b/build_configure @@ -26,6 +26,38 @@ fi # echo "failed : KERNEL_SRC variable is not correct !" # exit #fi +######################################################################## +# Test if the GUI_ROOT_DIR is set correctly + +if test ! -d "${GUI_ROOT_DIR}"; then + echo "failed : GUI_ROOT_DIR variable is not correct !" + exit +fi + +######################################################################## +# Test if the MED_ROOT_DIR is set correctly + +if test ! -d "${MED_ROOT_DIR}"; then + echo "failed : MED_ROOT_DIR variable is not correct !" + exit +fi + +######################################################################## +# Test if the GEOM_ROOT_DIR is set correctly + +if test ! -d "${GEOM_ROOT_DIR}"; then + echo "failed : GEOM_ROOT_DIR variable is not correct !" + exit +fi + +######################################################################## +# Test if the SMESH_ROOT_DIR is set correctly + +if test ! -d "${SMESH_ROOT_DIR}"; then + echo "failed : SMESH_ROOT_DIR variable is not correct !" + exit +fi + ######################################################################## # find_in - utility function # @@ -203,7 +235,11 @@ else echo -n "Creating 'configure' script ... " fi -aclocal --acdir=adm_local/unix/config_files -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files +aclocal -I adm_local/unix/config_files -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files \ + -I ${GUI_ROOT_DIR}/adm_local/unix/config_files \ + -I ${MED_ROOT_DIR}/adm_local/unix/config_files \ + -I ${GEOM_ROOT_DIR}/adm_local/unix/config_files \ + -I ${SMESH_ROOT_DIR}/adm_local/unix/config_files if autoconf then echo "done" diff --git a/configure.in.base b/configure.in.base index 10b05f1..496ed64 100644 --- a/configure.in.base +++ b/configure.in.base @@ -257,6 +257,26 @@ echo CHECK_HTML_GENERATORS +echo +echo --------------------------------------------- +echo Testing GUI +echo --------------------------------------------- +echo + +CHECK_SALOME_GUI + +echo +echo --------------------------------------------- +echo Testing full GUI +echo --------------------------------------------- +echo + +CHECK_CORBA_IN_GUI +if test "x${CORBA_IN_GUI}" != "xyes"; then + echo "failed : For configure NETGENPLUGIN module necessary full GUI !" + exit +fi + echo echo --------------------------------------------- echo Testing Kernel diff --git a/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx b/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx index 4620967..bb34c62 100644 --- a/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx +++ b/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx @@ -17,6 +17,7 @@ using namespace std; #include "SMESHDS_Mesh.hxx" #include "SMDS_MeshElement.hxx" #include "SMDS_MeshNode.hxx" +#include "StdMeshers_Helper.hxx" #include #include @@ -137,6 +138,9 @@ bool NETGENPlugin_NETGEN_3D::Compute(SMESH_Mesh& aMesh, // get triangles on aShell and make a map of nodes to Netgen node IDs // ------------------------------------------------------------------- + StdMeshers_Helper* myTool = new StdMeshers_Helper(aMesh); + bool _quadraticMesh = myTool->IsQuadraticSubMesh(aShape); + typedef map< const SMDS_MeshNode*, int> TNodeToIDMap; TNodeToIDMap nodeToNetgenID; list< const SMDS_MeshElement* > triangles; @@ -161,8 +165,10 @@ bool NETGENPlugin_NETGEN_3D::Compute(SMESH_Mesh& aMesh, { // check element const SMDS_MeshElement* elem = iteratorElem->next(); - if ( !elem || elem->NbNodes() != 3 ) { + if ( !elem || + !( elem->NbNodes()==3 || ( _quadraticMesh && elem->NbNodes()==6) ) ) { INFOS( "NETGENPlugin_NETGEN_3D::Compute(), bad mesh"); + delete myTool; myTool = 0; return false; } // keep a triangle @@ -173,6 +179,8 @@ bool NETGENPlugin_NETGEN_3D::Compute(SMESH_Mesh& aMesh, while ( triangleNodesIt->more() ) { const SMDS_MeshNode * node = static_cast(triangleNodesIt->next()); + if(myTool->IsMedium(node)) + continue; nodeToNetgenID.insert( make_pair( node, invalid_ID )); } #ifdef _DEBUG_ @@ -245,6 +253,7 @@ bool NETGENPlugin_NETGEN_3D::Compute(SMESH_Mesh& aMesh, if ( isDegen ) // all nodes on a degen edge get one netgen ID *(shId_ngId->second) = n_id->second; } + // set triangles list< const SMDS_MeshElement* >::iterator tria = triangles.begin(); list< bool >::iterator reverse = isReversed.begin(); @@ -255,6 +264,8 @@ bool NETGENPlugin_NETGEN_3D::Compute(SMESH_Mesh& aMesh, while ( triangleNodesIt->more() ) { const SMDS_MeshNode * node = static_cast(triangleNodesIt->next()); + if(myTool->IsMedium(node)) + continue; Netgen_triangle[ *reverse ? 2 - i : i ] = nodeToNetgenID[ node ]; ++i; } @@ -280,7 +291,8 @@ bool NETGENPlugin_NETGEN_3D::Compute(SMESH_Mesh& aMesh, try { status = Ng_GenerateVolumeMesh(Netgen_mesh, &Netgen_param); - } catch (...) { + } + catch (...) { MESSAGE("An exception has been caught during the Volume Mesh Generation ..."); status = NG_VOLUME_FAILURE; } @@ -303,8 +315,9 @@ bool NETGENPlugin_NETGEN_3D::Compute(SMESH_Mesh& aMesh, // vector of nodes in which node index == netgen ID vector< const SMDS_MeshNode* > nodeVec ( Netgen_NbOfNodesNew + 1 ); // insert old nodes into nodeVec - for ( n_id = nodeToNetgenID.begin(); n_id != nodeToNetgenID.end(); ++n_id ) + for ( n_id = nodeToNetgenID.begin(); n_id != nodeToNetgenID.end(); ++n_id ) { nodeVec.at( n_id->second ) = n_id->first; + } // create and insert new nodes into nodeVec int nodeIndex = Netgen_NbOfNodes + 1; int shapeID = meshDS->ShapeToIndex( aShape ); @@ -322,7 +335,7 @@ bool NETGENPlugin_NETGEN_3D::Compute(SMESH_Mesh& aMesh, for ( int elemIndex = 1; elemIndex <= Netgen_NbOfTetra; ++elemIndex ) { Ng_GetVolumeElement(Netgen_mesh, elemIndex, Netgen_tetrahedron); - SMDS_MeshVolume * elt = meshDS->AddVolume (nodeVec.at( Netgen_tetrahedron[0] ), + SMDS_MeshVolume * elt = myTool->AddVolume (nodeVec.at( Netgen_tetrahedron[0] ), nodeVec.at( Netgen_tetrahedron[1] ), nodeVec.at( Netgen_tetrahedron[2] ), nodeVec.at( Netgen_tetrahedron[3] )); @@ -333,6 +346,8 @@ bool NETGENPlugin_NETGEN_3D::Compute(SMESH_Mesh& aMesh, Ng_DeleteMesh(Netgen_mesh); Ng_Exit(); + delete myTool; myTool = 0; + return isOK; }