From a32024e0bc93160d40a4c751439596e43f848e04 Mon Sep 17 00:00:00 2001 From: abd Date: Wed, 7 Feb 2007 12:33:37 +0000 Subject: [PATCH] Merging with WPdev --- adm_local/unix/config_files/check_Geom.m4 | 54 + adm_local/unix/config_files/check_NETGEN.m4 | 145 ++ .../unix/config_files/check_NETGENPLUGIN.m4 | 149 +- adm_local/unix/config_files/check_SMESH.m4 | 54 + adm_local/unix/make_commence.in | 6 +- configure.in.base | 6 +- idl/Makefile.in | 2 +- resources/NETGENPlugin.xml | 4 +- src/GUI/Makefile.in | 5 +- src/GUI/NETGENPluginGUI.cxx | 1 + src/GUI/NETGENPluginGUI_HypothesisCreator.h | 12 +- src/NETGEN/ReadMeForNgUsers | 37 +- src/NETGEN/netgen43ForSalome.patch | 221 +++ src/NETGEN/netgen45ForSalome.patch | 1260 ++++++++++++++--- src/NETGEN/netgen45lib64.patch | 45 + src/NETGENPlugin/Makefile.in | 5 +- src/NETGENPlugin/NETGENPlugin_Defs.hxx | 37 + src/NETGENPlugin/NETGENPlugin_Hypothesis.cxx | 3 +- src/NETGENPlugin/NETGENPlugin_Hypothesis.hxx | 10 +- .../NETGENPlugin_Hypothesis_2D.cxx | 3 +- .../NETGENPlugin_Hypothesis_2D.hxx | 4 +- .../NETGENPlugin_Hypothesis_2D_i.cxx | 4 +- .../NETGENPlugin_Hypothesis_2D_i.hxx | 4 +- .../NETGENPlugin_Hypothesis_i.cxx | 4 +- .../NETGENPlugin_Hypothesis_i.hxx | 4 +- src/NETGENPlugin/NETGENPlugin_Mesher.cxx | 61 +- src/NETGENPlugin/NETGENPlugin_Mesher.hxx | 4 +- src/NETGENPlugin/NETGENPlugin_NETGEN_2D.cxx | 4 +- src/NETGENPlugin/NETGENPlugin_NETGEN_2D.hxx | 4 +- src/NETGENPlugin/NETGENPlugin_NETGEN_2D3D.cxx | 4 +- src/NETGENPlugin/NETGENPlugin_NETGEN_2D3D.hxx | 4 +- .../NETGENPlugin_NETGEN_2D3D_i.cxx | 3 +- .../NETGENPlugin_NETGEN_2D3D_i.hxx | 4 +- src/NETGENPlugin/NETGENPlugin_NETGEN_2D_i.cxx | 3 +- src/NETGENPlugin/NETGENPlugin_NETGEN_2D_i.hxx | 4 +- src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx | 2 - src/NETGENPlugin/NETGENPlugin_NETGEN_3D.hxx | 5 +- src/NETGENPlugin/NETGENPlugin_NETGEN_3D_i.cxx | 3 +- src/NETGENPlugin/NETGENPlugin_NETGEN_3D_i.hxx | 4 +- src/NETGENPlugin/NETGENPlugin_i.cxx | 2 +- src/NETGENPlugin/NETGENPlugin_icons.po | 20 + 41 files changed, 1814 insertions(+), 396 deletions(-) create mode 100644 adm_local/unix/config_files/check_Geom.m4 create mode 100644 adm_local/unix/config_files/check_NETGEN.m4 create mode 100644 adm_local/unix/config_files/check_SMESH.m4 create mode 100644 src/NETGEN/netgen43ForSalome.patch create mode 100755 src/NETGEN/netgen45lib64.patch create mode 100755 src/NETGENPlugin/NETGENPlugin_Defs.hxx create mode 100644 src/NETGENPlugin/NETGENPlugin_icons.po diff --git a/adm_local/unix/config_files/check_Geom.m4 b/adm_local/unix/config_files/check_Geom.m4 new file mode 100644 index 0000000..803ca75 --- /dev/null +++ b/adm_local/unix/config_files/check_Geom.m4 @@ -0,0 +1,54 @@ +# 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_NETGEN.m4 b/adm_local/unix/config_files/check_NETGEN.m4 new file mode 100644 index 0000000..97947eb --- /dev/null +++ b/adm_local/unix/config_files/check_NETGEN.m4 @@ -0,0 +1,145 @@ +AC_DEFUN([CHECK_NETGEN],[ + +AC_REQUIRE([AC_PROG_CXX])dnl +AC_REQUIRE([AC_PROG_CXXCPP])dnl + +AC_CHECKING(for Netgen 4.5 and higher 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/NETGEN/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" + + # check ${NETGEN_HOME}/lib/LINUX directory for libraries + if test -f ${NETGEN_HOME}/lib/LINUX/libcsg.a ; then + NETGEN_LIBS_DIR="${NETGEN_HOME}/lib/LINUX" + else + # check ${NETGEN_HOME}/lib/LINUX64 directory for libraries + if test -f ${NETGEN_HOME}/lib/LINUX64/libcsg.a ; then + NETGEN_LIBS_DIR="${NETGEN_HOME}/lib/LINUX64" + else + NETGEN_LIBS_DIR="${NETGEN_HOME}/lib" + fi + fi + + echo "NETGEN_LIBS_DIR = $NETGEN_LIBS_DIR" + + CPPFLAGS_old="$CPPFLAGS" + CXXFLAGS_old="$CXXFLAGS" + CPPFLAGS="$NETGEN_INCLUDES $CAS_CPPFLAGS $CPPFLAGS" + CXXFLAGS="$NETGEN_INCLUDES $CAS_CPPFLAGS $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 $CAS_LDPATH -lTKBRep -lTKShHealing -lTKSTEP -lTKXSBase -lTKIGES -lTKSTL -lTKTopAlgo $LDFLAGS" + + AC_TRY_COMPILE(#include +#include +namespace nglib { +#include "nglib.h" +} +#define OCCGEOMETRY +#include +,nglib::Ng_Init(); + netgen::OCCGeometry occgeo; + nglib::Ng_Exit();,Netgen_ok=yes;ar x "$NETGEN_LIBS_DIR/libnginterface.a"; + ar x "$NETGEN_LIBS_DIR/libocc.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 profiler.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_new.o clusters.o zrefine.o ngexception.o geomtest3d.o geom2d.o geom2dmesh.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 genmesh2d.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 spline.o splinegeometry.o ngnewdelete.o nglib.o hprefinement.o Partition_Inter2d.o Partition_Loop.o Partition_Loop3d.o Partition_Inter3d.o Partition_Loop2d.o Partition_Spliter.o occgeom.o occgenmesh.o occmeshsurf.o -o libNETGEN.so; + rm -rf linopt.o bfgs.o linsearch.o global.o bisect.o meshtool.o refine.o ruler3.o improve3.o adfront3.o tetrarls.o prism2rls.o profiler.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_new.o clusters.o zrefine.o ngexception.o geomtest3d.o geom2d.o geom2dmesh.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 genmesh2d.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 spline.o splinegeometry.o ngnewdelete.o nglib.o hprefinement.o Partition_Inter2d.o Partition_Loop.o Partition_Loop3d.o Partition_Inter3d.o Partition_Loop2d.o Partition_Spliter.o occgeom.o occgenmesh.o occmeshsurf.o csgparser.o dynamicmem.o extrusion.o occconstruction.o parthreads.o readuser.o writeabaqus.o writediffpack.o writeelmer.o writefeap.o writefluent.o writegmsh.o writejcm.o writepermas.o writetecplot.o writetochnog.o writeuser.o wuchemnitz.o, + Netgen_ok=no) + + AC_CACHE_VAL(salome_netgen_lib,[ + AC_TRY_LINK( +#include +#include +namespace nglib { +#include "nglib.h" +} +#define OCCGEOMETRY +#include +,nglib::Ng_Init(); + netgen::OCCGeometry occgeo; + nglib::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_NETGENPLUGIN.m4 b/adm_local/unix/config_files/check_NETGENPLUGIN.m4 index 1838cde..23e916f 100644 --- a/adm_local/unix/config_files/check_NETGENPLUGIN.m4 +++ b/adm_local/unix/config_files/check_NETGENPLUGIN.m4 @@ -1,132 +1,53 @@ -AC_DEFUN([CHECK_NETGEN],[ +#------------------------------------------------------------ +# Check availability of Salome NETGEN mesh plugin module +# distribution +#------------------------------------------------------------ -AC_REQUIRE([AC_PROG_CXX])dnl -AC_REQUIRE([AC_PROG_CXXCPP])dnl +AC_DEFUN([CHECK_NETGENPLUGIN],[ -AC_CHECKING(for Netgen 4.5 and higher Libraries) +AC_CHECKING(for NETGEN mesh plugin) -AC_LANG_SAVE -AC_LANG_CPLUSPLUS +NGplugin_ok=no -AC_ARG_WITH(netgen, - [ --with-netgen=DIR root directory path of NETGEN installation], - NETGEN_HOME=$withval,NETGEN_HOME="") +NETGENPLUGIN_LDLAGS="" +NETGENPLUGIN_CXXFLAGS="" -NETGEN_INCLUDES="" -NETGEN_LIBS_DIR="" +AC_ARG_WITH(netgenplugin, + [ --with-netgenplugin=DIR root directory path of NETGEN mesh plugin installation ], + NETGENPLUGIN_DIR="$withval",NETGENPLUGIN_DIR="") -Netgen_ok=no +if test "x$NETGENPLUGIN_DIR" == "x" ; then -if test "x$NETGEN_HOME" == "x" ; then +# no --with-netgenplugin-dir option used -# no --with-netgen option used - if test "x$NETGENHOME" != "x" ; then + if test "x$NETGENPLUGIN_ROOT_DIR" != "x" ; then - # NETGENHOME environment variable defined - NETGEN_HOME=$NETGENHOME + # NETGENPLUGIN_ROOT_DIR environment variable defined + NETGENPLUGIN_DIR=$NETGENPLUGIN_ROOT_DIR 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 $CAS_CPPFLAGS $CPPFLAGS" - CXXFLAGS="$NETGEN_INCLUDES $CAS_CPPFLAGS $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 $CAS_LDPATH -lTKBRep -lTKShHealing -lTKSTEP -lTKXSBase -lTKIGES -lTKSTL -lTKTopAlgo $LDFLAGS" - - AC_TRY_COMPILE(#include -#include -namespace nglib { -#include "nglib.h" -} -#define OCCGEOMETRY -#include -,nglib::Ng_Init(); - netgen::OCCGeometry occgeo; - nglib::Ng_Exit();,Netgen_ok=yes;ar x "$NETGEN_LIBS_DIR/libnginterface.a"; - ar x "$NETGEN_LIBS_DIR/libocc.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 profiler.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_new.o clusters.o zrefine.o ngexception.o geomtest3d.o geom2d.o geom2dmesh.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 genmesh2d.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 spline.o splinegeometry.o ngnewdelete.o nglib.o hprefinement.o Partition_Inter2d.o Partition_Loop.o Partition_Loop3d.o Partition_Inter3d.o Partition_Loop2d.o Partition_Spliter.o occgeom.o occgenmesh.o occmeshsurf.o -o libNETGEN.so; - rm -rf linopt.o bfgs.o linsearch.o global.o bisect.o meshtool.o refine.o ruler3.o improve3.o adfront3.o tetrarls.o prism2rls.o profiler.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_new.o clusters.o zrefine.o ngexception.o geomtest3d.o geom2d.o geom2dmesh.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 genmesh2d.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 spline.o splinegeometry.o ngnewdelete.o nglib.o hprefinement.o Partition_Inter2d.o Partition_Loop.o Partition_Loop3d.o Partition_Inter3d.o Partition_Loop2d.o Partition_Spliter.o occgeom.o occgenmesh.o occmeshsurf.o csgparser.o dynamicmem.o extrusion.o occconstruction.o parthreads.o readuser.o writeabaqus.o writediffpack.o writeelmer.o writefeap.o writefluent.o writegmsh.o writejcm.o writepermas.o writetecplot.o writetochnog.o writeuser.o wuchemnitz.o, - Netgen_ok=no) - - AC_CACHE_VAL(salome_netgen_lib,[ - AC_TRY_LINK( -#include -#include -namespace nglib { -#include "nglib.h" -} -#define OCCGEOMETRY -#include -,nglib::Ng_Init(); - netgen::OCCGeometry occgeo; - nglib::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 +if test -f ${NETGENPLUGIN_DIR}/lib${LIB_LOCATION_SUFFIX}/salome/libNETGENEngine.so ; then + NGplugin_ok=yes + AC_MSG_RESULT(Using NETGEN mesh plugin distribution in ${NETGENPLUGIN_DIR}) + + if test "x$NETGENPLUGIN_ROOT_DIR" == "x" ; then + NETGENPLUGIN_ROOT_DIR=${NETGENPLUGIN_DIR} + fi + AC_SUBST(NETGENPLUGIN_ROOT_DIR) -AC_SUBST(NETGEN_INCLUDES) -AC_SUBST(NETGEN_LIBS_DIR) + NETGENPLUGIN_LDFLAGS=-L${NETGENPLUGIN_DIR}/lib${LIB_LOCATION_SUFFIX}/salome + NETGENPLUGIN_CXXFLAGS=-I${NETGENPLUGIN_DIR}/include/salome -AC_LANG_RESTORE + AC_SUBST(NETGENPLUGIN_LDFLAGS) + AC_SUBST(NETGENPLUGIN_CXXFLAGS) + +else + AC_MSG_WARN("Cannot find compiled NETGEN mesh plugin distribution") +fi +AC_MSG_RESULT(for NETGEN mesh plugin: $NGplugin_ok) + ])dnl diff --git a/adm_local/unix/config_files/check_SMESH.m4 b/adm_local/unix/config_files/check_SMESH.m4 new file mode 100644 index 0000000..86a8264 --- /dev/null +++ b/adm_local/unix/config_files/check_SMESH.m4 @@ -0,0 +1,54 @@ +# 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 e0a24f9..91a90d9 100644 --- a/adm_local/unix/make_commence.in +++ b/adm_local/unix/make_commence.in @@ -12,7 +12,7 @@ HAVE_SSTREAM=@HAVE_SSTREAM@ LIBS=@LIBS@ -LDFLAGS=@LDFLAGS@ -L$(top_builddir)/lib/salome -Xlinker -rpath-link -Xlinker $(top_builddir)/lib/salome +LDFLAGS=@LDFLAGS@ -L$(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome -Xlinker -rpath-link -Xlinker $(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome # add libstdc++ to link c++ library with libtool ! LDFLAGS+= -lstdc++ @@ -175,7 +175,7 @@ SALOME_INCLUDES = \ CPPFLAGS += -DSOLIDGEOM -DLINUX $(OCC_INCLUDES) $(SALOME_INCLUDES) $(BOOST_CPPFLAGS) CXXFLAGS += -DSOLIDGEOM -DLINUX $(OCC_CXXFLAGS) $(SALOME_INCLUDES) -LDFLAGS += -lSMESHimpl -lSMESHEngine -lStdMeshers -lStdMeshersEngine -L${KERNEL_ROOT_DIR}/lib/salome -L${SMESH_ROOT_DIR}/lib/salome -L${GEOM_ROOT_DIR}/lib/salome -lSalomeGenericObj +LDFLAGS += -lSMESHimpl -lSMESHEngine -lStdMeshers -lStdMeshersEngine -L${KERNEL_ROOT_DIR}/lib@LIB_LOCATION_SUFFIX@/salome -L${SMESH_ROOT_DIR}/lib@LIB_LOCATION_SUFFIX@/salome -L${GEOM_ROOT_DIR}/lib@LIB_LOCATION_SUFFIX@/salome -lSalomeGenericObj # add corba libs when link salome application ! #LDFLAGS+= $(CORBA_LIBS) @@ -205,7 +205,7 @@ LN_S=@LN_S@ prefix=@prefix@ exec_prefix=@exec_prefix@ bindir=@bindir@/salome -libdir=@libdir@/salome +libdir=@exec_prefix@/lib@LIB_LOCATION_SUFFIX@/salome # warning : if user give this path in configure we could have salome/salome :-( includedir=@includedir@/salome datadir=@datadir@/salome diff --git a/configure.in.base b/configure.in.base index 4bf0796..09a38fc 100644 --- a/configure.in.base +++ b/configure.in.base @@ -22,8 +22,8 @@ AC_CANONICAL_HOST PACKAGE=salome AC_SUBST(PACKAGE) -VERSION=3.2.2 -XVERSION=0x030202 +VERSION=3.2.4 +XVERSION=0x030204 AC_SUBST(VERSION) AC_SUBST(XVERSION) @@ -360,7 +360,7 @@ else fi # make other build directories -for rep in salome_adm adm_local doc bin/salome include/salome lib/salome share/salome/resources/${MODULE_NAME} idl +for rep in salome_adm adm_local doc bin/salome include/salome lib${LIB_LOCATION_SUFFIX}/salome share/salome/resources/${MODULE_NAME} idl do # if test ! -d $rep ; then # eval mkdir $rep diff --git a/idl/Makefile.in b/idl/Makefile.in index 980cd86..db81b82 100644 --- a/idl/Makefile.in +++ b/idl/Makefile.in @@ -46,7 +46,7 @@ $(IDL_FILES:%=$(top_builddir)/idl/salome/%):$(IDL_FILES:%=$(top_srcdir)/idl/%) # python wrap lib: pyidl -PYTHON_BUILD_SITE=$(top_builddir)/lib/python$(PYTHON_VERSION)/site-packages/@PACKAGE@ +PYTHON_BUILD_SITE=$(top_builddir)/lib@LIB_LOCATION_SUFFIX@/python$(PYTHON_VERSION)/site-packages/@PACKAGE@ pyidl: $(PYTHON_BUILD_SITE) $(IDL_FILES:%.idl=$(PYTHON_BUILD_SITE)/%_idl.py) diff --git a/resources/NETGENPlugin.xml b/resources/NETGENPlugin.xml index df4e14d..1a32055 100644 --- a/resources/NETGENPlugin.xml +++ b/resources/NETGENPlugin.xml @@ -7,8 +7,8 @@ + server-lib="NETGENEngine" + gui-lib="NETGENPluginGUI"> class QtxDblSpinBox; @@ -46,7 +56,7 @@ typedef struct /*! * \brief Class for creation of NETGEN2D and NETGEN3D hypotheses */ -class NETGENPluginGUI_HypothesisCreator : public SMESHGUI_GenericHypothesisCreator +class NETGENPLUGIN_GUI_EXPORT NETGENPluginGUI_HypothesisCreator : public SMESHGUI_GenericHypothesisCreator { Q_OBJECT diff --git a/src/NETGEN/ReadMeForNgUsers b/src/NETGEN/ReadMeForNgUsers index e14d714..0b7cb28 100644 --- a/src/NETGEN/ReadMeForNgUsers +++ b/src/NETGEN/ReadMeForNgUsers @@ -1,28 +1,40 @@ The Netgen 4.5 from the web location : http://www.hpfem.jku.at/netgen/ (CVS access) is used in the SMESH Module of Salome3 distribution. -How to build Netgen for Salome +1. How to build Netgen for Salome ------------------------------ -Patch the netgen 4.5 distribution: +1.1. Download Netgen 4.5 from the NETGEN home site (see above). + +1.2. Unpack the downloaded Netgen 4.5 archive + (hereafter we assume that this is netgen45 directory) + +1.3. Patch the netgen 4.5 distribution for SALOME: $ cd netgen45 $ patch -p1 < patch_directory/netgen45ForSalome.patch -Set CASROOT environment variable to OCCT installation path, -as Netgen 4.5 uses Open CASCADE Technology: +1.4. For 64-bit platform you also need to apply another patch: + +$ cd netgen45 +$ patch -p1 < patch_directory/netgen45lib64.patch + +1.5. Set CASROOT environment variable to OCCT installation path, + since Netgen 4.5 requires Open CASCADE Technology: $ setenv CASROOT -Then run makeForSalome.sh (it will be created by the patch): +1.6. Compile and install netgen 4.5. To do this, simply run + makeForSalome.sh script (it is created from the patch): + $ sh makeForSalome.sh -Additional information for maintainers +2. Additional information for maintainers -------------------------------------- -The file check_NETGENPLUGIN.m4 assumes -that Netgen is installed in the directory as follow: +The file check_NETGEN.m4 assumes that Netgen is installed in +the directory as follow: prompt> ls @@ -55,17 +67,16 @@ edgeflw.hpp hpref_pyramid.hpp msghandler.hpp sparsmat.hpp prompt> ls /lib -LINUX/ - -prompt> ls /lib/LINUX - libcsg.a libgeom2d.a libla.a libnginterface.a libopti.a libgen.a libgprim.a libmesh.a libocc.a libstlgeom.a +The library files can be also installed in the LINUX or LINUX64 +subfolder of the lib directory. + All the libraries *.a should be compiled without the option -DOPENGL. netgen45 is assumed to be the directory downloaded from the above web location archive of Netgen. The library -/lib/LINUX/libnginterface.a should contain the objects +/lib/libnginterface.a should contain the objects nglib.o (from netgen45/libsrc/interface/nglib.cpp) and ngnewdelete.o (from netgen45/ngtcltk/ngnewdelete.cpp). diff --git a/src/NETGEN/netgen43ForSalome.patch b/src/NETGEN/netgen43ForSalome.patch new file mode 100644 index 0000000..5e08d88 --- /dev/null +++ b/src/NETGEN/netgen43ForSalome.patch @@ -0,0 +1,221 @@ +diff -N -r -u netgen43/libsrc/include/spline2d.hpp /tmp/netgen43/libsrc/include/spline2d.hpp +--- netgen43/libsrc/include/spline2d.hpp 1970-01-01 01:00:00.000000000 +0100 ++++ /tmp/netgen43/libsrc/include/spline2d.hpp 2003-12-10 16:28:12.000000000 +0100 +@@ -0,0 +1 @@ ++#include "../geom2d/spline2d.hpp" +diff -N -r -u netgen43/libsrc/include/splinegeometry2.hpp /tmp/netgen43/libsrc/include/splinegeometry2.hpp +--- netgen43/libsrc/include/splinegeometry2.hpp 1970-01-01 01:00:00.000000000 +0100 ++++ /tmp/netgen43/libsrc/include/splinegeometry2.hpp 2003-12-10 16:28:23.000000000 +0100 +@@ -0,0 +1 @@ ++#include "../geom2d/splinegeometry2.hpp" +diff -N -r -u netgen43/libsrc/interface/Makefile /tmp/netgen43/libsrc/interface/Makefile +--- netgen43/libsrc/interface/Makefile 2003-05-07 16:01:43.000000000 +0200 ++++ /tmp/netgen43/libsrc/interface/Makefile 2003-12-10 15:59:47.000000000 +0100 +@@ -1,4 +1,4 @@ +-src = nginterface.cpp writeuser.cpp writediffpack.cpp writeabaqus.cpp writefluent.cpp writepermas.cpp writetochnog.cpp writetecplot.cpp wuchemnitz.cpp writetochnog.cpp writefeap.cpp readuser.cpp importsolution.cpp ++src = writeuser.cpp writediffpack.cpp writeabaqus.cpp writefluent.cpp writepermas.cpp writetochnog.cpp writetecplot.cpp wuchemnitz.cpp writetochnog.cpp writefeap.cpp readuser.cpp importsolution.cpp nglib.cpp ngnewdelete.cpp + # + lib = nginterface + libpath = libsrc/interface +diff -N -r -u netgen43/libsrc/interface/nglib.cpp /tmp/netgen43/libsrc/interface/nglib.cpp +--- netgen43/libsrc/interface/nglib.cpp 2003-05-07 16:01:43.000000000 +0200 ++++ /tmp/netgen43/libsrc/interface/nglib.cpp 2003-12-10 16:32:54.000000000 +0100 +@@ -23,6 +23,20 @@ + + #include "nglib.h" + ++namespace netgen ++{ ++ char geomfilename [100]; ++ ++ //Destination for messages, errors, ... ++ void Ng_PrintDest(const char * s) ++ { ++ (*mycout) << s << flush; ++ } ++ ++#include ++#include ++} ++ + using namespace netgen; + + // constants and types: +@@ -171,8 +185,6 @@ + // CSG Geometry + + // FlexLexer * lexer; +-char geomfilename [100]; +- + + // 2D Meshing Functions: + +@@ -362,7 +374,18 @@ + cout << "e(" << readedges.Get(i) << "," << readedges.Get(i+1) << ")" << endl; + } + */ +- geo->AddEdges(readedges); ++ ++ ARRAY< Point<3> > readedges1; ++ ++ for (i = 1; i <= readedges.Size(); i++) ++ { ++ Point3d readedgesData = readedges.Get(i); ++ Point <3> readedges1Data = Point<3>(readedgesData.X(),readedgesData.Y(),readedgesData.Z()); ++ ++ readedges1.Append(readedges1Data); ++ } ++ ++ geo->AddEdges(readedges1); + } + + if (geo->GetStatus() == STLTopology::STL_GOOD || geo->GetStatus() == STLTopology::STL_WARNING) return NG_OK; +@@ -472,7 +495,14 @@ + n = Vec3d(nv[0],nv[1],nv[2]); + } + +- readtrias.Append(STLReadTriangle(apts,n)); ++ Point<3> apts1[3]; ++ apts1[0] = Point<3>(p1[0],p1[1],p1[2]); ++ apts1[1] = Point<3>(p2[0],p2[1],p2[2]); ++ apts1[2] = Point<3>(p3[0],p3[1],p3[2]); ++ ++ Vec<3> n1 = Vec<3>(n.X(),n.Y(),n.Z()); ++ ++ readtrias.Append(STLReadTriangle(apts1,n1)); + } + + // add (optional) edges: +@@ -487,30 +517,29 @@ + + // compatibility functions: + +-void MyError (const char * ch) ++void netgen::MyError (const char * ch) + { + cerr << ch; + } + +-//Destination for messages, errors, ... +-void Ng_PrintDest(const char * s) +-{ +- (*mycout) << s << flush; +-} +- +- +-double GetTime () ++double netgen::GetTime () + { + return 0; + } + +-void ResetTime () ++void netgen::ResetTime () + { + ; + } + +-void MyBeep (int i) ++void netgen::MyBeep (int i) + { + ; + } + ++void MeshFromSpline2D (SplineGeometry2d & geometry, ++ Mesh *& mesh, ++ MeshingParameters & mp) ++{ ++ MeshFromSpline2D (geometry, mesh, mp); ++} +diff -N -r -u netgen43/libsrc/makefile.mach.LINUX /tmp/netgen43/libsrc/makefile.mach.LINUX +--- netgen43/libsrc/makefile.mach.LINUX 2003-05-07 16:01:43.000000000 +0200 ++++ /tmp/netgen43/libsrc/makefile.mach.LINUX 2003-12-10 15:12:18.000000000 +0100 +@@ -14,7 +14,8 @@ + # + CFLAGS2 = + # pg stands for profiling - also in linkflags2 +-CPLUSPLUSFLAGS2 = -O2 -I/usr/X11R6/include -DLINUX -DOPENGL ++#CPLUSPLUSFLAGS2 = -O2 -I/usr/X11R6/include -DLINUX -DOPENGL ++CPLUSPLUSFLAGS2 = -O2 -I/usr/X11R6/include -DLINUX + # -fomit-frame-pointer + # -ffast-math + # +diff -N -r -u netgen43/libsrc/meshing/improve2.cpp /tmp/netgen43/libsrc/meshing/improve2.cpp +--- netgen43/libsrc/meshing/improve2.cpp 2003-05-07 16:01:43.000000000 +0200 ++++ /tmp/netgen43/libsrc/meshing/improve2.cpp 2003-12-10 15:42:00.000000000 +0100 +@@ -3,7 +3,7 @@ + #include "meshing.hpp" + #include + +-#include ++/*#include */ + + + namespace netgen +diff -N -r -u netgen43/libsrc/meshing/meshing2.cpp /tmp/netgen43/libsrc/meshing/meshing2.cpp +--- netgen43/libsrc/meshing/meshing2.cpp 2003-05-07 16:01:43.000000000 +0200 ++++ /tmp/netgen43/libsrc/meshing/meshing2.cpp 2003-12-10 15:34:35.000000000 +0100 +@@ -1785,7 +1785,7 @@ + + + #else +-void glrender (int wait) ++void netgen::glrender (int wait) + { + ; + } +diff -N -r -u netgen43/libsrc/visualization/stlmeshing.cpp /tmp/netgen43/libsrc/visualization/stlmeshing.cpp +--- netgen43/libsrc/visualization/stlmeshing.cpp 2003-05-07 16:01:43.000000000 +0200 ++++ /tmp/netgen43/libsrc/visualization/stlmeshing.cpp 2003-12-10 15:52:53.000000000 +0100 +@@ -5,7 +5,7 @@ + #include + + #include +-#include ++/*#include */ + + namespace netgen + { +diff -N -r -u netgen43/Makefile /tmp/netgen43/Makefile +--- netgen43/Makefile 2003-05-07 16:01:43.000000000 +0200 ++++ /tmp/netgen43/Makefile 2003-12-10 15:11:41.000000000 +0100 +@@ -35,7 +35,8 @@ + .SUFFIXES: .cpp .o + # + # +-CPLUSPLUSFLAGS1 = -c -I$(LIBSRC_DIR)/include -DOPENGL ++#CPLUSPLUSFLAGS1 = -c -I$(LIBSRC_DIR)/include -DOPENGL ++CPLUSPLUSFLAGS1 = -c -I$(LIBSRC_DIR)/include + LINKFLAGS1 = -lGL -lGLU -lX11 -lXext -lXmu + # + CPLUSPLUSFLAGS = $(CPLUSPLUSFLAGS1) $(CPLUSPLUSFLAGS2) $(CPLUSPLUSFLAGS3) +diff -N -r -u netgen43/makeForSalome.sh /tmp/netgen43/makeForSalome.sh +--- netgen43/makeForSalome.sh 1970-01-01 01:00:00.000000000 +0100 ++++ /tmp/netgen43/makeForSalome.sh 2004-01-05 12:33:59.000000000 +0100 +@@ -0,0 +1,26 @@ ++#! /bin/sh ++cp ngtcltk/ngnewdelete.* libsrc/interface/ ++ ++MACHINE=LINUX ++export MACHINE ++make -C libsrc/csg ++make -C libsrc/general ++make -C libsrc/geom2d ++make -C libsrc/gprim ++make -C libsrc/interface ++make -C libsrc/linalg ++make -C libsrc/meshing ++make -C libsrc/opti ++make -C libsrc/stlgeom ++ ++if [ ! -d install ] ; then ++ mkdir install ++fi ++ ++cp -r lib install/ ++ ++if [ ! -d install/include ] ; then ++ mkdir install/include ++fi ++ ++cp libsrc/interface/nglib.h install/include diff --git a/src/NETGEN/netgen45ForSalome.patch b/src/NETGEN/netgen45ForSalome.patch index 2ee4dab..e819950 100644 --- a/src/NETGEN/netgen45ForSalome.patch +++ b/src/NETGEN/netgen45ForSalome.patch @@ -1,202 +1,1058 @@ -diff -N -r -u netgen45_orig/libsrc/interface/Makefile netgen45_new/libsrc/interface/Makefile ---- netgen45_orig/libsrc/interface/Makefile 2006-04-13 12:58:37.000000000 +0400 -+++ netgen45_new/libsrc/interface/Makefile 2006-04-25 11:55:09.296578936 +0400 -@@ -1,4 +1,5 @@ --src = nginterface.cpp writeuser.cpp writediffpack.cpp writeabaqus.cpp writefluent.cpp writepermas.cpp writetochnog.cpp writetecplot.cpp wuchemnitz.cpp writetochnog.cpp writefeap.cpp writeelmer.cpp writegmsh.cpp writejcm.cpp readuser.cpp importsolution.cpp -+#src = nginterface.cpp writeuser.cpp writediffpack.cpp writeabaqus.cpp writefluent.cpp writepermas.cpp writetochnog.cpp writetecplot.cpp wuchemnitz.cpp writetochnog.cpp writefeap.cpp writeelmer.cpp writegmsh.cpp writejcm.cpp readuser.cpp importsolution.cpp -+src = writeuser.cpp writediffpack.cpp writeabaqus.cpp writefluent.cpp writepermas.cpp writetochnog.cpp writetecplot.cpp wuchemnitz.cpp writetochnog.cpp writefeap.cpp writeelmer.cpp writegmsh.cpp writejcm.cpp readuser.cpp nglib.cpp ngnewdelete.cpp - # - lib = nginterface - libpath = libsrc/interface -diff -N -r -u netgen45_orig/libsrc/interface/nglib.cpp netgen45_new/libsrc/interface/nglib.cpp ---- netgen45_orig/libsrc/interface/nglib.cpp 2006-04-13 12:58:37.000000000 +0400 -+++ netgen45_new/libsrc/interface/nglib.cpp 2006-04-25 11:55:09.297578764 +0400 -@@ -56,7 +56,8 @@ - - void Ng_Exit () - { -- ; -+ delete testout; -+ testout = NULL; - } - - -diff -N -r -u netgen45_orig/libsrc/makefile.inc netgen45_new/libsrc/makefile.inc ---- netgen45_orig/libsrc/makefile.inc 2006-04-13 12:58:37.000000000 +0400 -+++ netgen45_new/libsrc/makefile.inc 2006-04-25 11:55:09.297578764 +0400 -@@ -8,17 +8,14 @@ - LIBSRC_DIR=$(CPP_DIR)/libsrc - LIB_DIR=$(CPP_DIR)/lib/$(MACHINE) - --#OCC_DIR=../../occ --#OCCINC_DIR=$(OCC_DIR)/inc --#OCCLIB_DIR=$(OCC_DIR)/lib --# OCC_DIR=/opt/OpenCASCADE5.2/ros --# OCC_DIR=/home/joachim/download/occ/Linux --# OCCINC_DIR=$(OCC_DIR)/inc -I$(OCC_DIR)/ros/inc --# OCCLIB_DIR=$(OCC_DIR)/Linux/lib -+OCC_DIR=$(CASROOT) -+OCCINC_DIR=$(OCC_DIR)/inc -+OCCLIB_DIR=$(OCC_DIR)/Linux/lib - # - include $(LIBSRC_DIR)/makefile.mach.$(MACHINE) - # --CPLUSPLUSFLAGS1 = -c -I$(LIBSRC_DIR)/include -I$(OCCINC_DIR) -+CPLUSPLUSFLAGS1 = -c -I$(LIBSRC_DIR)/include -I$(OCCINC_DIR) \ -+ -DOCCGEOMETRY -DOCC52 -DHAVE_IOSTREAM -DHAVE_LIMITS - # - ARFLAGS = r - # -diff -N -r -u netgen45_orig/libsrc/makefile.mach.LINUX netgen45_new/libsrc/makefile.mach.LINUX ---- netgen45_orig/libsrc/makefile.mach.LINUX 2006-04-13 12:58:37.000000000 +0400 -+++ netgen45_new/libsrc/makefile.mach.LINUX 2006-04-25 11:55:09.298578593 +0400 -@@ -16,7 +16,7 @@ - # - CFLAGS2 = - --CPLUSPLUSFLAGS2 = -O2 -I/usr/include/GL3.5 -DLINUX -DOPENGL \ -+CPLUSPLUSFLAGS2 = -O2 -I/usr/include/GL3.5 -DLINUX \ - -ftemplate-depth-99 -finline-limit=10000 \ - -Wdisabled-optimization -funroll-loops -DnoNGSOLVE - -diff -N -r -u netgen45_orig/libsrc/meshing/improve2.cpp netgen45_new/libsrc/meshing/improve2.cpp ---- netgen45_orig/libsrc/meshing/improve2.cpp 2006-03-29 15:09:49.000000000 +0400 -+++ netgen45_new/libsrc/meshing/improve2.cpp 2006-04-25 11:56:02.693420537 +0400 -@@ -4,7 +4,7 @@ - #include - - #ifndef SMALLLIB --#include -+//#include - #endif - - namespace netgen -diff -N -r -u netgen45_orig/libsrc/occ/occconstruction.cpp netgen45_new/libsrc/occ/occconstruction.cpp ---- netgen45_orig/libsrc/occ/occconstruction.cpp 2006-04-13 12:58:37.000000000 +0400 -+++ netgen45_new/libsrc/occ/occconstruction.cpp 2006-04-25 11:55:09.298578593 +0400 -@@ -28,8 +28,8 @@ - #include - #include - #include --#include --#include -+//#include -+//#include - #include - #include - namespace netgen -diff -N -r -u netgen45_orig/libsrc/occ/occgenmesh.cpp netgen45_new/libsrc/occ/occgenmesh.cpp ---- netgen45_orig/libsrc/occ/occgenmesh.cpp 2006-04-13 12:58:37.000000000 +0400 -+++ netgen45_new/libsrc/occ/occgenmesh.cpp 2006-04-25 11:55:09.300578250 +0400 -@@ -112,7 +112,7 @@ - - static void FindEdges (OCCGeometry & geom, Mesh & mesh) - { -- char * savetask = multithread.task; -+ const char * savetask = multithread.task; - multithread.task = "Edge meshing"; - - (*testout) << "edge meshing" << endl; -@@ -394,7 +394,7 @@ - int i, j, k; - int changed; - -- char * savetask = multithread.task; -+ const char * savetask = multithread.task; - multithread.task = "Surface meshing"; - - geom.facemeshstatus = 0; -@@ -779,7 +779,7 @@ - double nq = n*q; - - Point<3> p = p0 + 0.5*n; -- double lambda = (p-l.p0)*n / nq; -+ double lambda = (fabs(nq) > 1e-10 ? (p-l.p0)*n / nq : -1); - - if (lambda >= 0 && lambda <= 1) - { -@@ -970,7 +970,7 @@ - if (mparam.uselocalh) - { - -- char * savetask = multithread.task; -+ const char * savetask = multithread.task; - multithread.percent = 0; - - mesh->SetLocalH (bb.PMin(), bb.PMax(), mparam.grading); -diff -N -r -u netgen45_orig/libsrc/occ/occgeom.cpp netgen45_new/libsrc/occ/occgeom.cpp ---- netgen45_orig/libsrc/occ/occgeom.cpp 2006-04-13 12:58:37.000000000 +0400 -+++ netgen45_new/libsrc/occ/occgeom.cpp 2006-04-25 11:55:09.301578078 +0400 -@@ -947,13 +947,13 @@ - - void OCCGeometry :: BuildVisualizationMesh () - { -- -- cout << "Preparing visualization (deflection = " << vispar.occdeflection << ") ... " << flush; -+ double vispar_occdeflection = 0.01; -+ cout << "Preparing visualization (deflection = " << vispar_occdeflection << ") ... " << flush; - - - BRepTools::Clean (shape); - //WriteOCC_STL("test.stl"); -- BRepMesh_IncrementalMesh::BRepMesh_IncrementalMesh (shape, vispar.occdeflection, true); -+ BRepMesh_IncrementalMesh::BRepMesh_IncrementalMesh (shape, vispar_occdeflection, true); - cout << "done" << endl; - - -diff -N -r -u netgen45_orig/libsrc/occ/occgeom.hpp netgen45_new/libsrc/occ/occgeom.hpp ---- netgen45_orig/libsrc/occ/occgeom.hpp 2006-04-13 12:58:37.000000000 +0400 -+++ netgen45_new/libsrc/occ/occgeom.hpp 2006-04-25 11:55:09.302577907 +0400 -@@ -69,7 +69,7 @@ - #include "IGESToBRep_Reader.hxx" - #include "Interface_Static.hxx" - #include "GeomAPI_ExtremaCurveCurve.hxx" --#include "Standard_ErrorHandler.hxx" -+//#include "Standard_ErrorHandler.hxx" - #include "Standard_Failure.hxx" - #include "ShapeUpgrade_ShellSewing.hxx" - #include "ShapeFix_Shape.hxx" -@@ -88,7 +88,7 @@ - namespace netgen - { - --#include "../visualization/vispar.hpp" -+ //#include "../visualization/vispar.hpp" - // class VisualizationParameters; - // extern VisualizationParameters vispar; - -diff -N -r -u netgen45_orig/makeForSalome.sh netgen45_new/makeForSalome.sh ---- netgen45_orig/makeForSalome.sh 1970-01-01 03:00:00.000000000 +0300 -+++ netgen45_new/makeForSalome.sh 2006-04-25 11:55:09.302577907 +0400 -@@ -0,0 +1,31 @@ -+#! /bin/sh -+cp ngtcltk/ngnewdelete.* libsrc/interface/ -+ -+MACHINE=LINUX -+export MACHINE -+make -C libsrc/csg -+make -C libsrc/general -+make -C libsrc/geom2d -+make -C libsrc/gprim -+make -C libsrc/interface -+make -C libsrc/linalg -+make -C libsrc/meshing -+make -C libsrc/opti -+make -C libsrc/stlgeom -+make -C libsrc/occ -+ -+if [ ! -d install ] ; then -+ mkdir install -+fi -+ -+cp -r lib install/ -+ -+if [ ! -d install/include ] ; then -+ mkdir install/include -+fi -+ -+cp libsrc/interface/nglib.h libsrc/general/*.hpp libsrc/csg/*.hpp libsrc/geom2d/*.hpp \ -+ libsrc/gprim/*.hpp libsrc/linalg/*.hpp libsrc/meshing/*.hpp \ -+ libsrc/occ/*.hpp libsrc/opti/*.hpp libsrc/include/mydefs.hpp \ -+ libsrc/stlgeom/*.hpp libsrc/include/mystdlib.h \ -+ install/include +diff -Nru netgen-4.5_orig/libsrc/csg/meshsurf.cpp netgen-4.5_patch/libsrc/csg/meshsurf.cpp +--- netgen-4.5_orig/libsrc/csg/meshsurf.cpp 2006-02-14 10:54:35.000000000 +0300 ++++ netgen-4.5_patch/libsrc/csg/meshsurf.cpp 2006-10-25 16:05:59.000000000 +0400 +@@ -77,11 +77,12 @@ + } + + +-void MeshOptimize2dSurfaces :: ProjectPoint (INDEX surfind, Point3d & p) const ++bool MeshOptimize2dSurfaces :: ProjectPoint (INDEX surfind, Point3d & p) const + { + Point<3> hp = p; + geometry.GetSurface(surfind)->Project (hp); + p = hp; ++ return true; + } + + void MeshOptimize2dSurfaces :: ProjectPoint2 (INDEX surfind, INDEX surfind2, +diff -Nru netgen-4.5_orig/libsrc/csg/meshsurf.hpp netgen-4.5_patch/libsrc/csg/meshsurf.hpp +--- netgen-4.5_orig/libsrc/csg/meshsurf.hpp 2004-01-20 13:49:44.000000000 +0300 ++++ netgen-4.5_patch/libsrc/csg/meshsurf.hpp 2006-10-25 16:08:05.000000000 +0400 +@@ -45,7 +45,7 @@ + MeshOptimize2dSurfaces (const CSGeometry & ageometry); + + /// +- virtual void ProjectPoint (INDEX surfind, Point3d & p) const; ++ virtual bool ProjectPoint (INDEX surfind, Point3d & p) const; + /// + virtual void ProjectPoint2 (INDEX surfind, INDEX surfind2, Point3d & p) const; + /// +diff -Nru netgen-4.5_orig/libsrc/interface/Makefile netgen-4.5_patch/libsrc/interface/Makefile +--- netgen-4.5_orig/libsrc/interface/Makefile 2005-08-09 18:14:59.000000000 +0400 ++++ netgen-4.5_patch/libsrc/interface/Makefile 2006-04-27 13:12:54.000000000 +0400 +@@ -1,4 +1,5 @@ +-src = nginterface.cpp writeuser.cpp writediffpack.cpp writeabaqus.cpp writefluent.cpp writepermas.cpp writetochnog.cpp writetecplot.cpp wuchemnitz.cpp writetochnog.cpp writefeap.cpp writeelmer.cpp writegmsh.cpp writejcm.cpp readuser.cpp importsolution.cpp ++#src = nginterface.cpp writeuser.cpp writediffpack.cpp writeabaqus.cpp writefluent.cpp writepermas.cpp writetochnog.cpp writetecplot.cpp wuchemnitz.cpp writetochnog.cpp writefeap.cpp writeelmer.cpp writegmsh.cpp writejcm.cpp readuser.cpp importsolution.cpp ++src = writeuser.cpp writediffpack.cpp writeabaqus.cpp writefluent.cpp writepermas.cpp writetochnog.cpp writetecplot.cpp wuchemnitz.cpp writetochnog.cpp writefeap.cpp writeelmer.cpp writegmsh.cpp writejcm.cpp readuser.cpp nglib.cpp ngnewdelete.cpp + # + lib = nginterface + libpath = libsrc/interface +diff -Nru netgen-4.5_orig/libsrc/interface/nglib.cpp netgen-4.5_patch/libsrc/interface/nglib.cpp +--- netgen-4.5_orig/libsrc/interface/nglib.cpp 2005-10-18 17:53:18.000000000 +0400 ++++ netgen-4.5_patch/libsrc/interface/nglib.cpp 2006-04-27 13:12:54.000000000 +0400 +@@ -56,7 +56,8 @@ + + void Ng_Exit () + { +- ; ++ delete testout; ++ testout = NULL; + } + + +diff -Nru netgen-4.5_orig/libsrc/makefile.inc netgen-4.5_patch/libsrc/makefile.inc +--- netgen-4.5_orig/libsrc/makefile.inc 2005-09-02 17:17:51.000000000 +0400 ++++ netgen-4.5_patch/libsrc/makefile.inc 2006-10-26 09:33:58.000000000 +0400 +@@ -8,17 +8,14 @@ + LIBSRC_DIR=$(CPP_DIR)/libsrc + LIB_DIR=$(CPP_DIR)/lib/$(MACHINE) + +-#OCC_DIR=../../occ +-#OCCINC_DIR=$(OCC_DIR)/inc +-#OCCLIB_DIR=$(OCC_DIR)/lib +-# OCC_DIR=/opt/OpenCASCADE5.2/ros +-# OCC_DIR=/home/joachim/download/occ/Linux +-# OCCINC_DIR=$(OCC_DIR)/inc -I$(OCC_DIR)/ros/inc +-# OCCLIB_DIR=$(OCC_DIR)/Linux/lib ++OCC_DIR=$(CASROOT) ++OCCINC_DIR=$(OCC_DIR)/inc ++OCCLIB_DIR=$(OCC_DIR)/Linux/lib + # + include $(LIBSRC_DIR)/makefile.mach.$(MACHINE) + # +-CPLUSPLUSFLAGS1 = -c -I$(LIBSRC_DIR)/include -I$(OCCINC_DIR) ++CPLUSPLUSFLAGS1 = -c -I$(LIBSRC_DIR)/include -I$(OCCINC_DIR) \ ++ -DOCCGEOMETRY -DOCC52 -DHAVE_IOSTREAM -DHAVE_LIMITS_H + # + ARFLAGS = r + # +diff -Nru netgen-4.5_orig/libsrc/makefile.mach.LINUX netgen-4.5_patch/libsrc/makefile.mach.LINUX +--- netgen-4.5_orig/libsrc/makefile.mach.LINUX 2004-10-11 23:49:26.000000000 +0400 ++++ netgen-4.5_patch/libsrc/makefile.mach.LINUX 2006-04-27 13:12:54.000000000 +0400 +@@ -16,7 +16,7 @@ + # + CFLAGS2 = + +-CPLUSPLUSFLAGS2 = -O2 -I/usr/include/GL3.5 -DLINUX -DOPENGL \ ++CPLUSPLUSFLAGS2 = -O2 -I/usr/include/GL3.5 -DLINUX \ + -ftemplate-depth-99 -finline-limit=10000 \ + -Wdisabled-optimization -funroll-loops -DnoNGSOLVE + +diff -Nru netgen-4.5_orig/libsrc/meshing/improve2.cpp netgen-4.5_patch/libsrc/meshing/improve2.cpp +--- netgen-4.5_orig/libsrc/meshing/improve2.cpp 2006-01-11 18:08:19.000000000 +0300 ++++ netgen-4.5_patch/libsrc/meshing/improve2.cpp 2006-04-27 13:12:54.000000000 +0400 +@@ -4,7 +4,7 @@ + #include + + #ifndef SMALLLIB +-#include ++//#include + #endif + + namespace netgen +diff -Nru netgen-4.5_orig/libsrc/meshing/improve2.hpp netgen-4.5_patch/libsrc/meshing/improve2.hpp +--- netgen-4.5_orig/libsrc/meshing/improve2.hpp 2004-10-12 23:22:55.000000000 +0400 ++++ netgen-4.5_patch/libsrc/meshing/improve2.hpp 2006-10-25 16:09:37.000000000 +0400 +@@ -32,17 +32,16 @@ + /// + virtual void SelectSurfaceOfPoint (const Point3d & p, + const PointGeomInfo & gi); +- /// +- virtual void ProjectPoint (INDEX /* surfind */, Point3d & /* p */) const { }; ++ ++ /// project point on surface, returns true if success ++ virtual bool ProjectPoint (INDEX /* surfind */, Point3d & /* p */) const { return false; } ++ /// fast project point on surface using point geom info of a neighboring point ++ /// if gi.trignum != 0, ++ /// returns true if success, gi is updated ++ virtual bool ProjectPoint (INDEX surfind, Point3d & p, PointGeomInfo& gi) const ++ { gi.trignum = 1; return ProjectPoint (surfind, p); } + /// + virtual void ProjectPoint2 (INDEX /* surfind */, INDEX /* surfind2 */, Point3d & /* p */) const { }; +- /// liefert zu einem 3d-Punkt die geominfo (Dreieck) und liefert 1, wenn erfolgreich, +- /// 0, wenn nicht (Punkt ausserhalb von chart) +- virtual int CalcPointGeomInfo(PointGeomInfo& gi, const Point3d& /*p3*/) const +- { gi.trignum = 1; return 1;}; +- +- virtual int CalcPointGeomInfo(int /* surfind */, PointGeomInfo& gi, const Point3d& p3) const +- { return CalcPointGeomInfo (gi, p3); } + + /// + virtual void GetNormalVector(INDEX surfind, const Point3d & p, PointGeomInfo & gi, Vec3d & n) const; +diff -Nru netgen-4.5_orig/libsrc/meshing/smoothing2.cpp netgen-4.5_patch/libsrc/meshing/smoothing2.cpp +--- netgen-4.5_orig/libsrc/meshing/smoothing2.cpp 2006-01-11 18:08:20.000000000 +0300 ++++ netgen-4.5_patch/libsrc/meshing/smoothing2.cpp 2006-10-25 16:10:46.000000000 +0400 +@@ -300,7 +300,7 @@ + double Opti2SurfaceMinFunction :: + FuncGrad (const Vector & x, Vector & grad) const + { +- Vec3d n, vgrad; ++ Vec3d vgrad; + Point3d pp1; + double g1x, g1y; + double badness, hbadness; +@@ -308,8 +308,6 @@ + vgrad = 0; + badness = 0; + +- meshthis -> GetNormalVector (surfi, sp1, gi1, n); +- + pp1 = sp1; + pp1.Add2 (x.Get(1), t1, x.Get(2), t2); + +@@ -360,7 +358,7 @@ + double Opti2SurfaceMinFunction :: + FuncDeriv (const Vector & x, const Vector & dir, double & deriv) const + { +- Vec3d n, vgrad; ++ Vec3d vgrad; + Point3d pp1; + double g1x, g1y; + double badness, hbadness; +@@ -368,8 +366,6 @@ + vgrad = 0; + badness = 0; + +- meshthis -> GetNormalVector (surfi, sp1, gi1, n); +- + pp1 = sp1; + pp1.Add2 (x.Get(1), t1, x.Get(2), t2); + +@@ -520,7 +516,7 @@ + // from 2d: + + int j, k, lpi, gpi; +- Vec3d n, vgrad; ++ Vec3d vgrad; + Point3d pp1; + Vec2d g1, vdir; + double badness, hbadness, hbad, hderiv; +@@ -528,8 +524,6 @@ + vgrad = 0; + badness = 0; + +- meshthis -> GetNormalVector (surfi, sp1, gi1, n); +- + pp1 = sp1; + pp1.Add2 (x.Get(1), t1, x.Get(2), t2); + +@@ -593,7 +587,7 @@ + // from 2d: + + int j, k, lpi, gpi; +- Vec3d n, vgrad; ++ Vec3d vgrad; + Point3d pp1; + Vec2d g1, vdir; + double badness, hbadness, hbad, hderiv; +@@ -601,8 +595,6 @@ + vgrad = 0; + badness = 0; + +- meshthis -> GetNormalVector (surfi, sp1, gi1, n); +- + pp1 = sp1; + pp1.Add2 (x.Get(1), t1, x.Get(2), t2); + +@@ -859,19 +851,21 @@ + locelements.SetSize(0); + locrots.SetSize (0); + lochs.SetSize (0); ++ ngi.trignum = 0; + + for (j = 0; j < elementsonpoint[pi].Size(); j++) + { + sei = elementsonpoint[pi][j]; + const Element2d & bel = mesh[sei]; + surfi = mesh.GetFaceDescriptor(bel.GetIndex()).SurfNr(); +- ++ + locelements.Append (sei); + + for (k = 1; k <= bel.GetNP(); k++) + if (bel.PNum(k) == pi) + { + locrots.Append (k); ++ ngi = bel.GeomInfoPi(k); + break; + } + +@@ -942,7 +936,7 @@ + } + + //optimizer loop (if not whole distance is not possible, move only a bit!!!!) +- while (loci <= 5 && !moveisok) ++ while (loci <= 5 && !moveisok) + { + loci ++; + mesh[pi].X() = origp.X() + (x.Get(1) * t1.X() + x.Get(2) * t2.X())*fact; +@@ -951,11 +945,9 @@ + fact = fact/2.; + + +- ProjectPoint (surfi, mesh[pi]); ++ moveisok = ProjectPoint (surfi, mesh[pi], ngi); + +- moveisok = CalcPointGeomInfo(surfi, ngi, mesh[pi]); +- // point lies on same chart in stlsurface +- ++ // point lies on same chart in stlsurface + if (moveisok) + { + for (j = 0; j < locelements.Size(); j++) +diff -Nru netgen-4.5_orig/libsrc/occ/occconstruction.cpp netgen-4.5_patch/libsrc/occ/occconstruction.cpp +--- netgen-4.5_orig/libsrc/occ/occconstruction.cpp 2005-12-06 17:15:53.000000000 +0300 ++++ netgen-4.5_patch/libsrc/occ/occconstruction.cpp 2006-04-27 13:12:54.000000000 +0400 +@@ -28,8 +28,8 @@ + #include + #include + #include +-#include +-#include ++//#include ++//#include + #include + #include + namespace netgen +diff -Nru netgen-4.5_orig/libsrc/occ/occgenmesh.cpp netgen-4.5_patch/libsrc/occ/occgenmesh.cpp +--- netgen-4.5_orig/libsrc/occ/occgenmesh.cpp 2006-02-07 12:12:48.000000000 +0300 ++++ netgen-4.5_patch/libsrc/occ/occgenmesh.cpp 2006-10-25 16:14:48.000000000 +0400 +@@ -28,7 +28,7 @@ + return Point<3> (p.X(), p.Y(), p.Z()); + } + +- void DivideEdge (TopoDS_Edge & edge, ++ static void DivideEdge (TopoDS_Edge & edge, + ARRAY & ps, + ARRAY & params, + Mesh & mesh) +@@ -49,23 +49,19 @@ + hvalue[0] = 0; + pnt = c->Value(s0); + +- double olddist = 0; +- double dist = 0; +- +- for (int i = 1; i <= DIVIDEEDGESECTIONS; i++) ++ int i; ++ for (i = 1; i <= DIVIDEEDGESECTIONS; i++) + { + oldpnt = pnt; + pnt = c->Value(s0+(i/double(DIVIDEEDGESECTIONS))*(s1-s0)); ++ double dist = pnt.Distance(oldpnt); + hvalue[i] = hvalue[i-1] + + 1.0/mesh.GetH(Point3d(pnt.X(), pnt.Y(), pnt.Z()))* +- pnt.Distance(oldpnt); ++ dist; + + //(*testout) << "mesh.GetH(Point3d(pnt.X(), pnt.Y(), pnt.Z())) " << mesh.GetH(Point3d(pnt.X(), pnt.Y(), pnt.Z())) + // << " pnt.Distance(oldpnt) " << pnt.Distance(oldpnt) << endl; + +- +- olddist = dist; +- dist = pnt.Distance(oldpnt); + } + + // nsubedges = int(ceil(hvalue[DIVIDEEDGESECTIONS])); +@@ -74,7 +70,7 @@ + ps.SetSize(nsubedges-1); + params.SetSize(nsubedges+1); + +- int i = 1; ++ i = 1; + int i1 = 0; + do + { +@@ -112,7 +108,7 @@ + + static void FindEdges (OCCGeometry & geom, Mesh & mesh) + { +- char * savetask = multithread.task; ++ const char * savetask = multithread.task; + multithread.task = "Edge meshing"; + + (*testout) << "edge meshing" << endl; +@@ -124,6 +120,7 @@ + (*testout) << "nedges = " << nedges << endl; + + double eps = 1e-6 * geom.GetBoundingBox().Diam(); ++ double eps2 = eps * eps; + + for (int i = 1; i <= nvertices; i++) + { +@@ -133,7 +130,7 @@ + bool exists = 0; + if (merge_solids) + for (PointIndex pi = 1; pi <= mesh.GetNP(); pi++) +- if ( Dist2 (mesh[pi], Point<3>(mp)) < eps*eps) ++ if ( Dist2 (mesh[pi], Point<3>(mp)) < eps2) + { + exists = 1; + break; +@@ -276,8 +273,8 @@ + pnums.Last() = -1; + for (PointIndex pi = 1; pi < first_ep; pi++) + { +- if (Dist2 (mesh[pi], fp) < eps*eps) pnums[0] = pi; +- if (Dist2 (mesh[pi], lp) < eps*eps) pnums.Last() = pi; ++ if (Dist2 (mesh[pi], fp) < eps2) pnums[0] = pi; ++ if (Dist2 (mesh[pi], lp) < eps2) pnums.Last() = pi; + } + } + +@@ -287,7 +284,7 @@ + bool exists = 0; + int j; + for (j = first_ep; j <= mesh.GetNP(); j++) +- if ((mesh.Point(j)-Point<3>(mp[i-1])).Length() < eps) ++ if (Dist2(mesh.Point(j), Point<3>(mp[i-1])) < eps2) + { + exists = 1; + break; +@@ -394,7 +391,7 @@ + int i, j, k; + int changed; + +- char * savetask = multithread.task; ++ const char * savetask = multithread.task; + multithread.task = "Surface meshing"; + + geom.facemeshstatus = 0; +@@ -751,7 +748,7 @@ + multithread.task = savetask; + } + +- double ComputeH (double kappa) ++ static double ComputeH (double kappa) + { + double hret; + kappa *= mparam.curvaturesafety; +@@ -779,7 +776,7 @@ + double nq = n*q; + + Point<3> p = p0 + 0.5*n; +- double lambda = (p-l.p0)*n / nq; ++ double lambda = (fabs(nq) > 1e-10 ? (p-l.p0)*n / nq : -1); + + if (lambda >= 0 && lambda <= 1) + { +@@ -799,55 +796,55 @@ + + + +- void RestrictHTriangle (gp_Pnt2d & par0, gp_Pnt2d & par1, gp_Pnt2d & par2, +- BRepLProp_SLProps * prop, Mesh & mesh, const double maxside, int depth, double h = 0) ++ static void RestrictHTriangle (gp_Pnt2d & par0, gp_Pnt2d & par1, gp_Pnt2d & par2, ++ BRepAdaptor_Surface& surf, Mesh & mesh, const double maxside, int depth, double h = 0) + { +- ++ BRepLProp_SLProps prop(surf, 2, 1e-5); + + gp_Pnt2d parmid; + + parmid.SetX(0.3*(par0.X()+par1.X()+par2.X())); + parmid.SetY(0.3*(par0.Y()+par1.Y()+par2.Y())); + +- if (depth == 0) ++ //if (depth == 0) + { + double curvature = 0; + +- prop->SetParameters (parmid.X(), parmid.Y()); +- if (!prop->IsCurvatureDefined()) ++ prop.SetParameters (parmid.X(), parmid.Y()); ++ if (!prop.IsCurvatureDefined()) + { + (*testout) << "curvature not defined!" << endl; + return; + } +- curvature = max(fabs(prop->MinCurvature()), +- fabs(prop->MaxCurvature())); ++ curvature = max(fabs(prop.MinCurvature()), ++ fabs(prop.MaxCurvature())); + +- prop->SetParameters (par0.X(), par0.Y()); +- if (!prop->IsCurvatureDefined()) ++ prop.SetParameters (par0.X(), par0.Y()); ++ if (!prop.IsCurvatureDefined()) + { + (*testout) << "curvature not defined!" << endl; + return; + } +- curvature = max(curvature,max(fabs(prop->MinCurvature()), +- fabs(prop->MaxCurvature()))); ++ curvature = max(curvature,max(fabs(prop.MinCurvature()), ++ fabs(prop.MaxCurvature()))); + +- prop->SetParameters (par1.X(), par1.Y()); +- if (!prop->IsCurvatureDefined()) ++ prop.SetParameters (par1.X(), par1.Y()); ++ if (!prop.IsCurvatureDefined()) + { + (*testout) << "curvature not defined!" << endl; + return; + } +- curvature = max(curvature,max(fabs(prop->MinCurvature()), +- fabs(prop->MaxCurvature()))); ++ curvature = max(curvature,max(fabs(prop.MinCurvature()), ++ fabs(prop.MaxCurvature()))); + +- prop->SetParameters (par2.X(), par2.Y()); +- if (!prop->IsCurvatureDefined()) ++ prop.SetParameters (par2.X(), par2.Y()); ++ if (!prop.IsCurvatureDefined()) + { + (*testout) << "curvature not defined!" << endl; + return; + } +- curvature = max(curvature,max(fabs(prop->MinCurvature()), +- fabs(prop->MaxCurvature()))); ++ curvature = max(curvature,max(fabs(prop.MinCurvature()), ++ fabs(prop.MaxCurvature()))); + + //(*testout) << "curvature " << curvature << endl; + +@@ -886,51 +883,47 @@ + pm1.SetX(0.5*(par0.X()+par2.X())); pm1.SetY(0.5*(par0.Y()+par2.Y())); + pm2.SetX(0.5*(par1.X()+par0.X())); pm2.SetY(0.5*(par1.Y()+par0.Y())); + +- RestrictHTriangle (pm0, pm1, pm2, prop, mesh, 0.5*maxside, depth+1, h); +- RestrictHTriangle (par0, pm1, pm2, prop, mesh, 0.5*maxside, depth+1, h); +- RestrictHTriangle (par1, pm0, pm2, prop, mesh, 0.5*maxside, depth+1, h); +- RestrictHTriangle (par2, pm1, pm0, prop, mesh, 0.5*maxside, depth+1, h); ++ RestrictHTriangle (pm0, pm1, pm2, surf, mesh, 0.5*maxside, depth+1, h); ++ RestrictHTriangle (par0, pm1, pm2, surf, mesh, 0.5*maxside, depth+1, h); ++ RestrictHTriangle (par1, pm0, pm2, surf, mesh, 0.5*maxside, depth+1, h); ++ RestrictHTriangle (par2, pm1, pm0, surf, mesh, 0.5*maxside, depth+1, h); + } + else + { + gp_Pnt pnt; + Point3d p3d; + +- prop->SetParameters (parmid.X(), parmid.Y()); +- pnt = prop->Value(); ++ surf.D0(parmid.X(), parmid.Y(), pnt); + p3d = Point3d(pnt.X(), pnt.Y(), pnt.Z()); + mesh.RestrictLocalH (p3d, h); + + +- prop->SetParameters (par0.X(), par0.Y()); +- pnt = prop->Value(); ++ surf.D0(par0.X(), par0.Y(), pnt); + p3d = Point3d(pnt.X(), pnt.Y(), pnt.Z()); + mesh.RestrictLocalH (p3d, h); + +- prop->SetParameters (par1.X(), par1.Y()); +- pnt = prop->Value(); ++ surf.D0(par1.X(), par1.Y(), pnt); + p3d = Point3d(pnt.X(), pnt.Y(), pnt.Z()); + mesh.RestrictLocalH (p3d, h); + +- prop->SetParameters (par2.X(), par2.Y()); +- pnt = prop->Value(); ++ surf.D0(par2.X(), par2.Y(), pnt); + p3d = Point3d(pnt.X(), pnt.Y(), pnt.Z()); + mesh.RestrictLocalH (p3d, h); + +- (*testout) << "p = " << p3d << ", h = " << h << ", maxside = " << maxside << endl; ++ //(*testout) << "p = " << p3d << ", h = " << h << ", maxside = " << maxside << endl; + /* + (*testout) << pnt.X() << " " << pnt.Y() << " " << pnt.Z() << endl; + +- prop->SetParameters (par0.X(), par0.Y()); +- pnt = prop->Value(); ++ prop.SetParameters (par0.X(), par0.Y()); ++ pnt = prop.Value(); + (*testout) << pnt.X() << " " << pnt.Y() << " " << pnt.Z() << endl; + +- prop->SetParameters (par1.X(), par1.Y()); +- pnt = prop->Value(); ++ prop.SetParameters (par1.X(), par1.Y()); ++ pnt = prop.Value(); + (*testout) << pnt.X() << " " << pnt.Y() << " " << pnt.Z() << endl; + +- prop->SetParameters (par2.X(), par2.Y()); +- pnt = prop->Value(); ++ prop.SetParameters (par2.X(), par2.Y()); ++ pnt = prop.Value(); + (*testout) << pnt.X() << " " << pnt.Y() << " " << pnt.Z() << endl; + */ + } +@@ -970,7 +963,7 @@ + if (mparam.uselocalh) + { + +- char * savetask = multithread.task; ++ const char * savetask = multithread.task; + multithread.percent = 0; + + mesh->SetLocalH (bb.PMin(), bb.PMax(), mparam.grading); +@@ -1075,7 +1068,6 @@ + if (triangulation.IsNull()) continue; + + BRepAdaptor_Surface sf(face, Standard_True); +- BRepLProp_SLProps prop(sf, 2, 1e-5); + + int ntriangles = triangulation -> NbTriangles(); + for (int j = 1; j <= ntriangles; j++) +@@ -1096,7 +1088,7 @@ + maxside = max (maxside, p[1].Distance(p[2])); + //cout << "\rFace " << i << " pos11 ntriangles " << ntriangles << " maxside " << maxside << flush; + +- RestrictHTriangle (par[0], par[1], par[2], &prop, *mesh, maxside, 0); ++ RestrictHTriangle (par[0], par[1], par[2], sf, *mesh, maxside, 0); + //cout << "\rFace " << i << " pos12 ntriangles " << ntriangles << flush; + } + } +diff -Nru netgen-4.5_orig/libsrc/occ/occgeom.cpp netgen-4.5_patch/libsrc/occ/occgeom.cpp +--- netgen-4.5_orig/libsrc/occ/occgeom.cpp 2006-01-25 15:35:50.000000000 +0300 ++++ netgen-4.5_patch/libsrc/occ/occgeom.cpp 2006-10-25 16:15:24.000000000 +0400 +@@ -7,6 +7,8 @@ + #include "ShapeAnalysis_ShapeContents.hxx" + #include "ShapeAnalysis_CheckSmallFace.hxx" + #include "ShapeAnalysis_DataMapOfShapeListOfReal.hxx" ++#include ++#include + #include "BRepAlgoAPI_Fuse.hxx" + #include "BRepCheck_Analyzer.hxx" + #include "BRepLib.hxx" +@@ -16,11 +18,19 @@ + #include "Partition_Spliter.hxx" + //#include "VrmlAPI.hxx" + //#include "StlAPI.hxx" ++#include + + + namespace netgen + { + ++ OCCGeometry::~OCCGeometry() ++ { ++ NCollection_DataMap::Iterator it(fclsmap); ++ for (; it.More(); it.Next()) ++ delete it.Value(); ++ } ++ + void OCCGeometry :: PrintNrShapes () + { + TopExp_Explorer e; +@@ -947,13 +957,13 @@ + + void OCCGeometry :: BuildVisualizationMesh () + { +- +- cout << "Preparing visualization (deflection = " << vispar.occdeflection << ") ... " << flush; ++ double vispar_occdeflection = 0.01; ++ cout << "Preparing visualization (deflection = " << vispar_occdeflection << ") ... " << flush; + + + BRepTools::Clean (shape); + //WriteOCC_STL("test.stl"); +- BRepMesh_IncrementalMesh::BRepMesh_IncrementalMesh (shape, vispar.occdeflection, true); ++ BRepMesh_IncrementalMesh::BRepMesh_IncrementalMesh (shape, vispar_occdeflection, true); + cout << "done" << endl; + + +@@ -973,8 +983,27 @@ + + } + ++ void OCCGeometry::GetFaceTools(int surfi, Handle(ShapeAnalysis_Surface)& proj, ++ BRepTopAdaptor_FClass2d*& cls) const ++ { ++ //MSV: organize caching projector in the map ++ if (fprjmap.IsBound(surfi)) ++ { ++ proj = fprjmap.Find(surfi); ++ cls = fclsmap.Find(surfi); ++ } ++ else ++ { ++ const TopoDS_Face& aFace = TopoDS::Face(fmap(surfi)); ++ Handle(Geom_Surface) aSurf = BRep_Tool::Surface(aFace); ++ proj = new ShapeAnalysis_Surface(aSurf); ++ fprjmap.Bind(surfi, proj); ++ cls = new BRepTopAdaptor_FClass2d(aFace,Precision::Confusion()); ++ fclsmap.Bind(surfi, cls); ++ } ++ } + +- void OCCGeometry :: Project (int surfi, Point<3> & p) const ++ bool OCCGeometry :: Project (int surfi, Point<3> & p, double& u, double& v) const + { + static int cnt = 0; + if (++cnt % 1000 == 0) cout << "Project cnt = " << cnt << endl; +@@ -983,18 +1012,22 @@ + + //(*testout) << "before " << pnt.X() << " "<< pnt.Y() << " "<< pnt.Z() << " " << endl; + +- GeomAPI_ProjectPointOnSurf proj(pnt, BRep_Tool::Surface(TopoDS::Face(fmap(surfi)))); +- if (proj.NbPoints() == 0) +- { +- cout << "Projection fails" << endl; +- } +- else +- { +- pnt = proj.NearestPoint(); +- //(*testout) << "after " << pnt.X() << " "<< pnt.Y() << " "<< pnt.Z() << " " << endl; ++ Handle(ShapeAnalysis_Surface) proj; ++ BRepTopAdaptor_FClass2d *cls; ++ GetFaceTools(surfi, proj, cls); + +- p = Point<3> (pnt.X(), pnt.Y(), pnt.Z()); +- } ++ gp_Pnt2d p2d = proj->ValueOfUV(pnt, Precision::Confusion()); ++ if (cls->Perform(p2d) == TopAbs_OUT) ++ { ++ //cout << "Projection fails" << endl; ++ return false; ++ } ++ pnt = proj->Value(p2d); ++ p2d.Coord(u, v); ++ //(*testout) << "after " << pnt.X() << " "<< pnt.Y() << " "<< pnt.Z() << " " << endl; ++ ++ p = Point<3> (pnt.X(), pnt.Y(), pnt.Z()); ++ return true; + } + + +@@ -1002,54 +1035,20 @@ + { + gp_Pnt p(ap(0), ap(1), ap(2)); + +- Handle(Geom_Surface) surface = BRep_Tool::Surface(TopoDS::Face(fmap(surfi))); ++ Handle(ShapeAnalysis_Surface) proj; ++ BRepTopAdaptor_FClass2d *cls; ++ GetFaceTools(surfi, proj, cls); + +- gp_Pnt x = surface->Value (u,v); +- +- if (p.SquareDistance(x) <= sqr(PROJECTION_TOLERANCE)) return true; +- +- gp_Vec du, dv; +- +- surface->D1(u,v,x,du,dv); +- +- int count = 0; +- +- gp_Pnt xold; +- gp_Vec n; +- double det, lambda, mu; +- +- do { +- count++; +- +- n = du^dv; +- +- det = Det3 (n.X(), du.X(), dv.X(), +- n.Y(), du.Y(), dv.Y(), +- n.Z(), du.Z(), dv.Z()); +- +- if (det < 1e-15) return false; +- +- lambda = Det3 (n.X(), p.X()-x.X(), dv.X(), +- n.Y(), p.Y()-x.Y(), dv.Y(), +- n.Z(), p.Z()-x.Z(), dv.Z())/det; +- +- mu = Det3 (n.X(), du.X(), p.X()-x.X(), +- n.Y(), du.Y(), p.Y()-x.Y(), +- n.Z(), du.Z(), p.Z()-x.Z())/det; +- +- u += lambda; +- v += mu; +- +- xold = x; +- surface->D1(u,v,x,du,dv); +- +- } while (xold.SquareDistance(x) > sqr(PROJECTION_TOLERANCE) && count < 50); +- +- // (*testout) << "FastProject count: " << count << endl; +- +- if (count == 50) return false; ++ gp_Pnt2d p2d = proj->NextValueOfUV(gp_Pnt2d(u,v), p, Precision::Confusion()); ++ if (cls->Perform(p2d) == TopAbs_OUT) ++ { ++ //cout << "Projection fails" << endl; ++ return false; ++ } + +- ap = Point<3> (x.X(), x.Y(), x.Z()); ++ p = proj->Value(p2d); ++ p2d.Coord(u, v); ++ ap = Point<3> (p.X(), p.Y(), p.Z()); + + return true; + } +diff -Nru netgen-4.5_orig/libsrc/occ/occgeom.hpp netgen-4.5_patch/libsrc/occ/occgeom.hpp +--- netgen-4.5_orig/libsrc/occ/occgeom.hpp 2006-01-25 15:35:50.000000000 +0300 ++++ netgen-4.5_patch/libsrc/occ/occgeom.hpp 2006-10-25 16:16:01.000000000 +0400 +@@ -15,8 +15,6 @@ + #include "Geom_Curve.hxx" + #include "Geom2d_Curve.hxx" + #include "Geom_Surface.hxx" +-#include "GeomAPI_ProjectPointOnSurf.hxx" +-#include "GeomAPI_ProjectPointOnCurve.hxx" + #include "BRepTools.hxx" + #include "TopExp.hxx" + #include "BRepBuilderAPI_MakeVertex.hxx" +@@ -41,8 +39,6 @@ + #include "Geom_Curve.hxx" + #include "Geom2d_Curve.hxx" + #include "Geom_Surface.hxx" +-#include "GeomAPI_ProjectPointOnSurf.hxx" +-#include "GeomAPI_ProjectPointOnCurve.hxx" + #include "TopoDS_Wire.hxx" + #include "BRepTools_WireExplorer.hxx" + #include "BRepTools.hxx" +@@ -69,7 +65,7 @@ + #include "IGESToBRep_Reader.hxx" + #include "Interface_Static.hxx" + #include "GeomAPI_ExtremaCurveCurve.hxx" +-#include "Standard_ErrorHandler.hxx" ++//#include "Standard_ErrorHandler.hxx" + #include "Standard_Failure.hxx" + #include "ShapeUpgrade_ShellSewing.hxx" + #include "ShapeFix_Shape.hxx" +@@ -84,11 +80,15 @@ + #include "STEPControl_Writer.hxx" + #include "StlAPI_Writer.hxx" + #include "STEPControl_StepModelType.hxx" ++#include ++ ++class Handle_ShapeAnalysis_Surface; ++class BRepTopAdaptor_FClass2d; + + namespace netgen + { + +-#include "../visualization/vispar.hpp" ++ //#include "../visualization/vispar.hpp" + // class VisualizationParameters; + // extern VisualizationParameters vispar; + +@@ -159,6 +159,8 @@ + class OCCGeometry + { + Point<3> center; ++ mutable NCollection_DataMap fprjmap; ++ mutable NCollection_DataMap fclsmap; + + public: + TopoDS_Shape shape; +@@ -189,6 +191,7 @@ + vmap.Clear(); + } + ++ ~OCCGeometry(); + + void BuildFMap(); + +@@ -204,10 +207,12 @@ + Point<3> Center() + { return center; } + +- void Project (int surfi, Point<3> & p) const; ++ bool Project (int surfi, Point<3> & p, double& u, double& v) const; + bool FastProject (int surfi, Point<3> & ap, double& u, double& v) const; + +- ++ void GetFaceTools(int surfi, Handle(ShapeAnalysis_Surface)& proj, ++ BRepTopAdaptor_FClass2d*& cls) const; ++ + OCCSurface GetSurface (int surfi) + { + cout << "OCCGeometry::GetSurface using PLANESPACE" << endl; +diff -Nru netgen-4.5_orig/libsrc/occ/occmeshsurf.cpp netgen-4.5_patch/libsrc/occ/occmeshsurf.cpp +--- netgen-4.5_orig/libsrc/occ/occmeshsurf.cpp 2006-01-25 15:36:26.000000000 +0300 ++++ netgen-4.5_patch/libsrc/occ/occmeshsurf.cpp 2006-10-25 16:16:26.000000000 +0400 +@@ -5,6 +5,8 @@ + #include + #include + #include ++#include ++#include + + + namespace netgen +@@ -411,11 +413,16 @@ + } + + +- void MeshOptimize2dOCCSurfaces :: ProjectPoint (INDEX surfind, Point3d & p) const ++ bool MeshOptimize2dOCCSurfaces :: ProjectPoint (INDEX surfind, Point3d & p, PointGeomInfo& gi) const + { + Point<3> hp = p; +- geometry.Project (surfind, hp); ++ bool ok; ++ if (gi.trignum > 0) ++ ok = geometry.FastProject (surfind, hp, gi.u, gi.v); ++ else ++ ok = geometry.Project (surfind, hp, gi.u, gi.v); + p = hp; ++ return ok; + } + + void MeshOptimize2dOCCSurfaces :: ProjectPoint2 (INDEX surfind, INDEX surfind2, +@@ -506,38 +513,6 @@ + } + + +- int MeshOptimize2dOCCSurfaces :: +- CalcPointGeomInfo(int surfind, PointGeomInfo& gi, const Point3d& p) const +- { +- Standard_Real u,v; +- +- gp_Pnt pnt(p.X(), p.Y(), p.Z()); +- +- Handle(Geom_Surface) occface; +- occface = BRep_Tool::Surface(TopoDS::Face(geometry.fmap(surfind))); +- +- GeomAPI_ProjectPointOnSurf proj(pnt, occface); +- +- if (proj.NbPoints() < 1) +- { +- cout << "ERROR: OCCSurface :: GetNormalVector: GeomAPI_ProjectPointOnSurf failed!" +- << endl; +- cout << p << endl; +- return 0; +- } +- +- proj.LowerDistanceParameters (u, v); +- +- gi.u = u; +- gi.v = v; +- return 1; +- } +- +- +- +- +- +- + OCCRefinementSurfaces :: OCCRefinementSurfaces (const OCCGeometry & ageometry) + : Refinement(), geometry(ageometry) + { +@@ -627,10 +602,11 @@ + if (!geometry.FastProject (surfi, hnewp, u, v)) + { + cout << "Fast projection to surface fails! Using OCC projection" << endl; +- geometry.Project (surfi, hnewp); ++ double u, v; ++ geometry.Project (surfi, hnewp, u, v); + } + +- newgi.trignum = 1; ++ newgi.trignum = surfi; + } + + newp = hnewp; +@@ -653,14 +629,17 @@ + hnewp = Point<3> (pnt.X(), pnt.Y(), pnt.Z()); + newp = hnewp; + newgi = ap1; +- }; ++ } + + + void OCCRefinementSurfaces :: ProjectToSurface (Point<3> & p, int surfi) + { + if (surfi > 0) +- geometry.Project (surfi, p); +- }; ++ { ++ double u, v; ++ geometry.Project (surfi, p, u, v); ++ } ++ } + + void OCCRefinementSurfaces :: ProjectToSurface (Point<3> & p, int surfi, PointGeomInfo & gi) + { +@@ -668,9 +647,10 @@ + if (!geometry.FastProject (surfi, p, gi.u, gi.v)) + { + cout << "Fast projection to surface fails! Using OCC projection" << endl; +- geometry.Project (surfi, p); ++ double u, v; ++ geometry.Project (surfi, p, u, v); + } +- }; ++ } + + + +diff -Nru netgen-4.5_orig/libsrc/occ/occmeshsurf.hpp netgen-4.5_patch/libsrc/occ/occmeshsurf.hpp +--- netgen-4.5_orig/libsrc/occ/occmeshsurf.hpp 2005-06-09 18:51:10.000000000 +0400 ++++ netgen-4.5_patch/libsrc/occ/occmeshsurf.hpp 2006-10-25 16:17:22.000000000 +0400 +@@ -151,7 +151,7 @@ + MeshOptimize2dOCCSurfaces (const OCCGeometry & ageometry); + + /// +- virtual void ProjectPoint (INDEX surfind, Point3d & p) const; ++ virtual bool ProjectPoint (INDEX surfind, Point3d & p, PointGeomInfo& gi) const; + /// + virtual void ProjectPoint2 (INDEX surfind, INDEX surfind2, Point3d & p) const; + /// +@@ -159,9 +159,6 @@ + /// + virtual void GetNormalVector(INDEX surfind, const Point3d & p, PointGeomInfo & gi, Vec3d & n) const; + +- +- virtual int CalcPointGeomInfo(int surfind, PointGeomInfo& gi, const Point3d& p3) const; +- + }; + + +diff -Nru netgen-4.5_orig/libsrc/stlgeom/meshstlsurface.cpp netgen-4.5_patch/libsrc/stlgeom/meshstlsurface.cpp +--- netgen-4.5_orig/libsrc/stlgeom/meshstlsurface.cpp 2006-01-11 18:08:20.000000000 +0300 ++++ netgen-4.5_patch/libsrc/stlgeom/meshstlsurface.cpp 2006-10-25 16:17:47.000000000 +0400 +@@ -946,20 +946,23 @@ + } + + +-void MeshOptimizeSTLSurface :: ProjectPoint (INDEX surfind, Point3d & p) const ++bool MeshOptimizeSTLSurface :: ProjectPoint (INDEX surfind, Point3d & p, PointGeomInfo& gi) const + { + Point<3> hp = p; +- if (!geom.Project (hp)) ++ if (gi.trignum > 0) ++ ((STLGeometry&)geom).SelectChartOfTriangle (gi.trignum); ++ if (!(gi.trignum = geom.Project (hp))) + { + PrintMessage(7,"project failed"); + +- if (!geom.ProjectOnWholeSurface(hp)) ++ if (!(gi.trignum = geom.ProjectOnWholeSurface(hp))) + { + PrintMessage(7, "project on whole surface failed"); + } + } + p = hp; + // geometry.GetSurface(surfind)->Project (p); ++ return gi.trignum > 0; + } + + void MeshOptimizeSTLSurface :: ProjectPoint2 (INDEX surfind, INDEX surfind2, Point3d & p) const +@@ -970,20 +973,6 @@ + */ + } + +-int MeshOptimizeSTLSurface :: CalcPointGeomInfo(PointGeomInfo& gi, const Point3d& p3) const +-{ +- Point<3> hp = p3; +- gi.trignum = geom.Project (hp); +- +- if (gi.trignum) +- { +- return 1; +- } +- +- return 0; +- +-} +- + void MeshOptimizeSTLSurface :: GetNormalVector(INDEX surfind, const Point3d & p, Vec3d & n) const + { + n = geom.GetChartNormalVector(); +diff -Nru netgen-4.5_orig/libsrc/stlgeom/meshstlsurface.hpp netgen-4.5_patch/libsrc/stlgeom/meshstlsurface.hpp +--- netgen-4.5_orig/libsrc/stlgeom/meshstlsurface.hpp 2004-09-30 17:13:56.000000000 +0400 ++++ netgen-4.5_patch/libsrc/stlgeom/meshstlsurface.hpp 2006-10-25 16:17:59.000000000 +0400 +@@ -79,12 +79,10 @@ + virtual void SelectSurfaceOfPoint (const Point3d & p, + const PointGeomInfo & gi); + /// +- virtual void ProjectPoint (INDEX surfind, Point3d & p) const; ++ virtual bool ProjectPoint (INDEX surfind, Point3d & p, PointGeomInfo& gi) const; + /// + virtual void ProjectPoint2 (INDEX surfind, INDEX surfind2, Point3d & p) const; + /// +- virtual int CalcPointGeomInfo(PointGeomInfo& gi, const Point3d& p3) const; +- /// + virtual void GetNormalVector(INDEX surfind, const Point3d & p, Vec3d & n) const; + }; + +diff -Nru netgen-4.5_orig/makeForSalome.sh netgen-4.5_patch/makeForSalome.sh +--- netgen-4.5_orig/makeForSalome.sh 1970-01-01 03:00:00.000000000 +0300 ++++ netgen-4.5_patch/makeForSalome.sh 2006-04-27 13:12:54.000000000 +0400 +@@ -0,0 +1,31 @@ ++#! /bin/sh ++cp ngtcltk/ngnewdelete.* libsrc/interface/ ++ ++MACHINE=LINUX ++export MACHINE ++make -C libsrc/csg ++make -C libsrc/general ++make -C libsrc/geom2d ++make -C libsrc/gprim ++make -C libsrc/interface ++make -C libsrc/linalg ++make -C libsrc/meshing ++make -C libsrc/opti ++make -C libsrc/stlgeom ++make -C libsrc/occ ++ ++if [ ! -d install ] ; then ++ mkdir install ++fi ++ ++cp -r lib install/ ++ ++if [ ! -d install/include ] ; then ++ mkdir install/include ++fi ++ ++cp libsrc/interface/nglib.h libsrc/general/*.hpp libsrc/csg/*.hpp libsrc/geom2d/*.hpp \ ++ libsrc/gprim/*.hpp libsrc/linalg/*.hpp libsrc/meshing/*.hpp \ ++ libsrc/occ/*.hpp libsrc/opti/*.hpp libsrc/include/mydefs.hpp \ ++ libsrc/stlgeom/*.hpp libsrc/include/mystdlib.h \ ++ install/include diff --git a/src/NETGEN/netgen45lib64.patch b/src/NETGEN/netgen45lib64.patch new file mode 100755 index 0000000..1593971 --- /dev/null +++ b/src/NETGEN/netgen45lib64.patch @@ -0,0 +1,45 @@ +diff -ur netgen-4.5.old/libsrc/makefile.inc netgen-4.5.new/libsrc/makefile.inc +--- netgen-4.5/libsrc/makefile.inc 2006-04-27 13:12:54.000000000 +0400 ++++ netgen-4.5/libsrc/makefile.inc 2006-09-05 14:16:32.000000000 +0400 +@@ -14,7 +14,7 @@ + # + include $(LIBSRC_DIR)/makefile.mach.$(MACHINE) + # +-CPLUSPLUSFLAGS1 = -c -I$(LIBSRC_DIR)/include -I$(OCCINC_DIR) \ ++CPLUSPLUSFLAGS1 = -c -m64 -fPIC -I$(LIBSRC_DIR)/include -I$(OCCINC_DIR) \ + -DOCCGEOMETRY -DOCC52 -DHAVE_IOSTREAM -DHAVE_LIMITS_H + # + ARFLAGS = r +diff -ur netgen-4.5.old/libsrc/makefile.mach.LINUX64 netgen-4.5.new/libsrc/makefile.mach.LINUX64 +--- netgen-4.5/libsrc/makefile.mach.LINUX64 2006-03-29 15:09:32.000000000 +0400 ++++ netgen-4.5/libsrc/makefile.mach.LINUX64 2006-09-07 15:48:39.000000000 +0400 +@@ -11,7 +11,7 @@ + # + # + CFLAGS2 = +-CPLUSPLUSFLAGS2 = -pg -march=nocona -O2 -DLINUX -DOPENGL \ ++CPLUSPLUSFLAGS2 = -pg -march=nocona -O2 -DLINUX \ + -ftemplate-depth-99 -finline-limit=100000 \ + -fforce-addr -funroll-loops \ + -DTRAFO -DNGSOLVE -DnoADDON -DnoLAPACK -DnoFAST \ +@@ -23,7 +23,7 @@ + # + # + +-LINKFLAGS2 = -pg -L/usr/openwin/lib64 -L/usr/X11R6/lib64 -L/usr/lib/GL3.5 -L/usr/lib64 ++LINKFLAGS2 = -fPIC -pg -L/usr/openwin/lib64 -L/usr/X11R6/lib64 -L/usr/lib/GL3.5 -L/usr/lib64 + + + SYSLIB2 = -lstdc++ +diff -ur netgen-4.5.old/Makefile netgen-4.5.new/Makefile +--- netgen-4.5/Makefile 2006-03-29 15:09:12.000000000 +0400 ++++ netgen-4.5/Makefile 2006-09-07 15:46:07.000000000 +0400 +@@ -72,7 +72,7 @@ + # + #CPLUSPLUSFLAGS1 = -c -I$(LIBSRC_DIR)/include -DOPENGL + +-CPLUSPLUSFLAGS1 = -c -I$(LIBSRC_DIR)/include -I$(OCCINC_DIR) -I./ngsolve/include -Ilibsrc/interface -DOPENGL -I$(METISINC) ++CPLUSPLUSFLAGS1 = -c -m64 -I$(LIBSRC_DIR)/include -I$(OCCINC_DIR) -I./ngsolve/include -Ilibsrc/interface -I$(METISINC) + + LINKFLAGS1 = -lGL -lGLU -lX11 -lXext -lXmu + # diff --git a/src/NETGENPlugin/Makefile.in b/src/NETGENPlugin/Makefile.in index 10a6742..920838d 100644 --- a/src/NETGENPlugin/Makefile.in +++ b/src/NETGENPlugin/Makefile.in @@ -52,6 +52,9 @@ LIB_SERVER_IDL = NETGENPlugin_Algorithm.idl LIB_CLIENT_IDL = \ SALOME_Component.idl \ SALOME_Comm.idl \ + SALOME_Exception.idl \ + SALOME_GenericObj.idl \ + SMESH_Hypothesis.idl \ GEOM_Gen.idl \ MED.idl @@ -61,6 +64,6 @@ LIB = libNETGENEngine.la NETGEN_INCLUDES = @NETGEN_INCLUDES@ CPPFLAGS += $(NETGEN_INCLUDES) CXXFLAGS += $(NETGEN_INCLUDES) -LDFLAGS += -lNETGEN +LDFLAGS += -L${NETGENPLUGIN_ROOT_DIR}/lib@LIB_LOCATION_SUFFIX@/salome -lNETGEN @CONCLUDE@ diff --git a/src/NETGENPlugin/NETGENPlugin_Defs.hxx b/src/NETGENPlugin/NETGENPlugin_Defs.hxx new file mode 100755 index 0000000..03bdc4e --- /dev/null +++ b/src/NETGENPlugin/NETGENPlugin_Defs.hxx @@ -0,0 +1,37 @@ +// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS, L3S, LJLL, MENSI +// +// 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 +// +//============================================================================= +// File : NETGENPlugin_Defs.hxx +// Author : Alexander A. BORODIN + +#ifndef _NETGENPlugin_DEFS_HXX_ +#define _NETGENPlugin_DEFS_HXX_ + +#ifdef WIN32 + #ifdef NETGENPLUGIN_EXPORTS + #define NETGENPLUGIN_EXPORT __declspec( dllexport ) + #else + #define NETGENPLUGIN_EXPORT __declspec( dllimport ) + #endif +#else + #define NETGENPLUGIN_EXPORT +#endif + +#endif \ No newline at end of file diff --git a/src/NETGENPlugin/NETGENPlugin_Hypothesis.cxx b/src/NETGENPlugin/NETGENPlugin_Hypothesis.cxx index d5f43cd..bda2508 100644 --- a/src/NETGENPlugin/NETGENPlugin_Hypothesis.cxx +++ b/src/NETGENPlugin/NETGENPlugin_Hypothesis.cxx @@ -26,10 +26,11 @@ // $Header$ //============================================================================= -using namespace std; #include #include +using namespace std; + //============================================================================= /*! * diff --git a/src/NETGENPlugin/NETGENPlugin_Hypothesis.hxx b/src/NETGENPlugin/NETGENPlugin_Hypothesis.hxx index 01a4c3e..f52504b 100644 --- a/src/NETGENPlugin/NETGENPlugin_Hypothesis.hxx +++ b/src/NETGENPlugin/NETGENPlugin_Hypothesis.hxx @@ -29,13 +29,17 @@ #ifndef _NETGENPlugin_Hypothesis_HXX_ #define _NETGENPlugin_Hypothesis_HXX_ +#include "NETGENPlugin_Defs.hxx" + #include "SMESH_Hypothesis.hxx" #include "Utils_SALOME_Exception.hxx" // Parameters for work of NETGEN // -class NETGENPlugin_Hypothesis: public SMESH_Hypothesis +using namespace std; + +class NETGENPLUGIN_EXPORT NETGENPlugin_Hypothesis: public SMESH_Hypothesis { public: @@ -87,8 +91,8 @@ public: // Persistence virtual ostream & SaveTo(ostream & save); virtual istream & LoadFrom(istream & load); - friend ostream & operator <<(ostream & save, NETGENPlugin_Hypothesis & hyp); - friend istream & operator >>(istream & load, NETGENPlugin_Hypothesis & hyp); + friend NETGENPLUGIN_EXPORT ostream & operator <<(ostream & save, NETGENPlugin_Hypothesis & hyp); + friend NETGENPLUGIN_EXPORT istream & operator >>(istream & load, NETGENPlugin_Hypothesis & hyp); /*! * \brief Does nothing diff --git a/src/NETGENPlugin/NETGENPlugin_Hypothesis_2D.cxx b/src/NETGENPlugin/NETGENPlugin_Hypothesis_2D.cxx index 46f89ef..0b157fc 100644 --- a/src/NETGENPlugin/NETGENPlugin_Hypothesis_2D.cxx +++ b/src/NETGENPlugin/NETGENPlugin_Hypothesis_2D.cxx @@ -26,10 +26,11 @@ // $Header$ //============================================================================= -using namespace std; #include #include +using namespace std; + //============================================================================= /*! * diff --git a/src/NETGENPlugin/NETGENPlugin_Hypothesis_2D.hxx b/src/NETGENPlugin/NETGENPlugin_Hypothesis_2D.hxx index a9b0acd..5b6d1eb 100644 --- a/src/NETGENPlugin/NETGENPlugin_Hypothesis_2D.hxx +++ b/src/NETGENPlugin/NETGENPlugin_Hypothesis_2D.hxx @@ -29,6 +29,8 @@ #ifndef _NETGENPlugin_Hypothesis_2D_HXX_ #define _NETGENPlugin_Hypothesis_2D_HXX_ +#include "NETGENPlugin_Defs.hxx" + #include "NETGENPlugin_Hypothesis.hxx" #include "Utils_SALOME_Exception.hxx" @@ -36,7 +38,7 @@ // This class is just to give 2D dimension, actually // it inherits all behaviour of the parent -class NETGENPlugin_Hypothesis_2D: public NETGENPlugin_Hypothesis +class NETGENPLUGIN_EXPORT NETGENPlugin_Hypothesis_2D: public NETGENPlugin_Hypothesis { public: diff --git a/src/NETGENPlugin/NETGENPlugin_Hypothesis_2D_i.cxx b/src/NETGENPlugin/NETGENPlugin_Hypothesis_2D_i.cxx index 36ed667..baabaeb 100644 --- a/src/NETGENPlugin/NETGENPlugin_Hypothesis_2D_i.cxx +++ b/src/NETGENPlugin/NETGENPlugin_Hypothesis_2D_i.cxx @@ -25,8 +25,6 @@ // Project : SALOME // $Header$ //============================================================================= -using namespace std; - #include "NETGENPlugin_Hypothesis_2D_i.hxx" #include "SMESH_Gen.hxx" #include "SMESH_PythonDump.hxx" @@ -34,6 +32,8 @@ using namespace std; #include "Utils_CorbaException.hxx" #include "utilities.h" +using namespace std; + //============================================================================= /*! * NETGENPlugin_Hypothesis_2D_i::NETGENPlugin_Hypothesis_2D_i diff --git a/src/NETGENPlugin/NETGENPlugin_Hypothesis_2D_i.hxx b/src/NETGENPlugin/NETGENPlugin_Hypothesis_2D_i.hxx index 1df8e19..44b8db2 100644 --- a/src/NETGENPlugin/NETGENPlugin_Hypothesis_2D_i.hxx +++ b/src/NETGENPlugin/NETGENPlugin_Hypothesis_2D_i.hxx @@ -29,6 +29,8 @@ #ifndef _NETGENPlugin_Hypothesis_2D_i_HXX_ #define _NETGENPlugin_Hypothesis_2D_i_HXX_ +#include "NETGENPlugin_Defs.hxx" + #include #include CORBA_SERVER_HEADER(NETGENPlugin_Algorithm) @@ -39,7 +41,7 @@ class SMESH_Gen; // NETGENPlugin parameters hypothesis (2D case) -class NETGENPlugin_Hypothesis_2D_i: +class NETGENPLUGIN_EXPORT NETGENPlugin_Hypothesis_2D_i: public virtual POA_NETGENPlugin::NETGENPlugin_Hypothesis_2D, public NETGENPlugin_Hypothesis_i { diff --git a/src/NETGENPlugin/NETGENPlugin_Hypothesis_i.cxx b/src/NETGENPlugin/NETGENPlugin_Hypothesis_i.cxx index 313fe31..9836d2c 100644 --- a/src/NETGENPlugin/NETGENPlugin_Hypothesis_i.cxx +++ b/src/NETGENPlugin/NETGENPlugin_Hypothesis_i.cxx @@ -25,8 +25,6 @@ // Project : SALOME // $Header$ //============================================================================= -using namespace std; - #include "NETGENPlugin_Hypothesis_i.hxx" #include "SMESH_Gen.hxx" #include "SMESH_PythonDump.hxx" @@ -34,6 +32,8 @@ using namespace std; #include "Utils_CorbaException.hxx" #include "utilities.h" +using namespace std; + //============================================================================= /*! * NETGENPlugin_Hypothesis_i::NETGENPlugin_Hypothesis_i diff --git a/src/NETGENPlugin/NETGENPlugin_Hypothesis_i.hxx b/src/NETGENPlugin/NETGENPlugin_Hypothesis_i.hxx index edde231..6651617 100644 --- a/src/NETGENPlugin/NETGENPlugin_Hypothesis_i.hxx +++ b/src/NETGENPlugin/NETGENPlugin_Hypothesis_i.hxx @@ -29,6 +29,8 @@ #ifndef _NETGENPlugin_Hypothesis_i_HXX_ #define _NETGENPlugin_Hypothesis_i_HXX_ +#include "NETGENPlugin_Defs.hxx" + #include #include CORBA_SERVER_HEADER(NETGENPlugin_Algorithm) @@ -39,7 +41,7 @@ class SMESH_Gen; // NETGENPlugin parameters hypothesis -class NETGENPlugin_Hypothesis_i: +class NETGENPLUGIN_EXPORT NETGENPlugin_Hypothesis_i: public virtual POA_NETGENPlugin::NETGENPlugin_Hypothesis, public virtual SMESH_Hypothesis_i { diff --git a/src/NETGENPlugin/NETGENPlugin_Mesher.cxx b/src/NETGENPlugin/NETGENPlugin_Mesher.cxx index 09c51aa..83fd8de 100644 --- a/src/NETGENPlugin/NETGENPlugin_Mesher.cxx +++ b/src/NETGENPlugin/NETGENPlugin_Mesher.cxx @@ -25,8 +25,6 @@ // Project : SALOME // $Header$ //============================================================================= -using namespace std; - #include "NETGENPlugin_Mesher.hxx" #include "NETGENPlugin_Hypothesis_2D.hxx" @@ -56,6 +54,8 @@ namespace netgen { extern MeshingParameters mparam; } +using namespace std; + //============================================================================= /*! * @@ -70,22 +70,27 @@ NETGENPlugin_Mesher::NETGENPlugin_Mesher (SMESHDS_Mesh* meshDS, _isVolume(isVolume), _optimize(true) { +#ifdef WNT + netgen::MeshingParameters& mparams = netgen::GlobalMeshingParameters(); +#else + netgen::MeshingParameters& mparams = netgen::mparam; +#endif // Initialize global NETGEN parameters by default values: // maximal mesh edge size - netgen::mparam.maxh = NETGENPlugin_Hypothesis::GetDefaultMaxSize(); + mparams.maxh = NETGENPlugin_Hypothesis::GetDefaultMaxSize(); // minimal number of segments per edge - netgen::mparam.segmentsperedge = NETGENPlugin_Hypothesis::GetDefaultNbSegPerEdge(); + mparams.segmentsperedge = NETGENPlugin_Hypothesis::GetDefaultNbSegPerEdge(); // rate of growth of size between elements - netgen::mparam.grading = NETGENPlugin_Hypothesis::GetDefaultGrowthRate(); + mparams.grading = NETGENPlugin_Hypothesis::GetDefaultGrowthRate(); // safety factor for curvatures (elements per radius) - netgen::mparam.curvaturesafety = NETGENPlugin_Hypothesis::GetDefaultNbSegPerRadius(); + mparams.curvaturesafety = NETGENPlugin_Hypothesis::GetDefaultNbSegPerRadius(); // create elements of second order - netgen::mparam.secondorder = NETGENPlugin_Hypothesis::GetDefaultSecondOrder() ? 1 : 0; + mparams.secondorder = NETGENPlugin_Hypothesis::GetDefaultSecondOrder() ? 1 : 0; // quad-dominated surface meshing if (_isVolume) - netgen::mparam.quad = 0; + mparams.quad = 0; else - netgen::mparam.quad = NETGENPlugin_Hypothesis_2D::GetDefaultQuadAllowed() ? 1 : 0; + mparams.quad = NETGENPlugin_Hypothesis_2D::GetDefaultQuadAllowed() ? 1 : 0; } //============================================================================= @@ -97,21 +102,26 @@ void NETGENPlugin_Mesher::SetParameters(const NETGENPlugin_Hypothesis* hyp) { if (hyp) { +#ifdef WNT + netgen::MeshingParameters& mparams = netgen::GlobalMeshingParameters(); +#else + netgen::MeshingParameters& mparams = netgen::mparam; +#endif // Initialize global NETGEN parameters: // maximal mesh segment size - netgen::mparam.maxh = hyp->GetMaxSize(); + mparams.maxh = hyp->GetMaxSize(); // minimal number of segments per edge - netgen::mparam.segmentsperedge = hyp->GetNbSegPerEdge(); + mparams.segmentsperedge = hyp->GetNbSegPerEdge(); // rate of growth of size between elements - netgen::mparam.grading = hyp->GetGrowthRate(); + mparams.grading = hyp->GetGrowthRate(); // safety factor for curvatures (elements per radius) - netgen::mparam.curvaturesafety = hyp->GetNbSegPerRadius(); + mparams.curvaturesafety = hyp->GetNbSegPerRadius(); // create elements of second order - netgen::mparam.secondorder = hyp->GetSecondOrder() ? 1 : 0; + mparams.secondorder = hyp->GetSecondOrder() ? 1 : 0; // quad-dominated surface meshing // only triangles are allowed for volumic mesh if (!_isVolume) - netgen::mparam.quad = static_cast + mparams.quad = static_cast (hyp)->GetQuadAllowed() ? 1 : 0; _optimize = hyp->GetOptimize(); } @@ -147,14 +157,19 @@ Standard_Boolean IsEqual(const Link& aLink1, const Link& aLink2) //============================================================================= bool NETGENPlugin_Mesher::Compute() { +#ifdef WNT + netgen::MeshingParameters& mparams = netgen::GlobalMeshingParameters(); +#else + netgen::MeshingParameters& mparams = netgen::mparam; +#endif MESSAGE("Compute with:\n" - " max size = " << netgen::mparam.maxh << "\n" - " segments per edge = " << netgen::mparam.segmentsperedge); + " max size = " << mparams.maxh << "\n" + " segments per edge = " << mparams.segmentsperedge); MESSAGE("\n" - " growth rate = " << netgen::mparam.grading << "\n" - " elements per radius = " << netgen::mparam.curvaturesafety << "\n" - " second order = " << netgen::mparam.secondorder << "\n" - " quad allowed = " << netgen::mparam.quad); + " growth rate = " << mparams.grading << "\n" + " elements per radius = " << mparams.curvaturesafety << "\n" + " second order = " << mparams.secondorder << "\n" + " quad allowed = " << mparams.quad); nglib::Ng_Init(); @@ -190,7 +205,7 @@ bool NETGENPlugin_Mesher::Compute() int endWith = (_optimize ? (_isVolume ? netgen::MESHCONST_OPTVOLUME : netgen::MESHCONST_OPTSURFACE) : netgen::MESHCONST_MESHSURFACE); - char *optstr; + char *optstr = 0; int err = 0; try @@ -202,7 +217,7 @@ bool NETGENPlugin_Mesher::Compute() startWith = endWith = netgen::MESHCONST_MESHVOLUME; err = netgen::OCCGenerateMesh(occgeo, ngMesh, startWith, endWith, optstr); } - if (!err && netgen::mparam.secondorder > 0) + if (!err && mparams.secondorder > 0) { netgen::OCCRefinementSurfaces ref (occgeo); ref.MakeSecondOrder (*ngMesh); diff --git a/src/NETGENPlugin/NETGENPlugin_Mesher.hxx b/src/NETGENPlugin/NETGENPlugin_Mesher.hxx index 4d09177..81c30e8 100644 --- a/src/NETGENPlugin/NETGENPlugin_Mesher.hxx +++ b/src/NETGENPlugin/NETGENPlugin_Mesher.hxx @@ -29,6 +29,8 @@ #ifndef _NETGENPlugin_Mesher_HXX_ #define _NETGENPlugin_Mesher_HXX_ +#include "NETGENPlugin_Defs.hxx" + class SMESHDS_Mesh; class TopoDS_Shape; class NETGENPlugin_Hypothesis; @@ -37,7 +39,7 @@ class NETGENPlugin_Hypothesis; * \brief This class calls the NETGEN mesher of OCC geometry */ -class NETGENPlugin_Mesher +class NETGENPLUGIN_EXPORT NETGENPlugin_Mesher { public: // ---------- PUBLIC METHODS ---------- diff --git a/src/NETGENPlugin/NETGENPlugin_NETGEN_2D.cxx b/src/NETGENPlugin/NETGENPlugin_NETGEN_2D.cxx index fcf4153..677e289 100644 --- a/src/NETGENPlugin/NETGENPlugin_NETGEN_2D.cxx +++ b/src/NETGENPlugin/NETGENPlugin_NETGEN_2D.cxx @@ -25,8 +25,6 @@ // Project : SALOME // $Header$ //============================================================================= -using namespace std; - #include "NETGENPlugin_NETGEN_2D.hxx" #include "NETGENPlugin_Hypothesis_2D.hxx" #include "NETGENPlugin_Mesher.hxx" @@ -39,6 +37,8 @@ using namespace std; #include +using namespace std; + //============================================================================= /*! * diff --git a/src/NETGENPlugin/NETGENPlugin_NETGEN_2D.hxx b/src/NETGENPlugin/NETGENPlugin_NETGEN_2D.hxx index aafcb2e..1b3fdf2 100644 --- a/src/NETGENPlugin/NETGENPlugin_NETGEN_2D.hxx +++ b/src/NETGENPlugin/NETGENPlugin_NETGEN_2D.hxx @@ -29,6 +29,8 @@ #ifndef _NETGENPlugin_NETGEN_2D_HXX_ #define _NETGENPlugin_NETGEN_2D_HXX_ +#include "NETGENPlugin_Defs.hxx" + #include "SMESH_2D_Algo.hxx" #include "SMESH_Mesh.hxx" #include "StdMeshers_MaxElementVolume.hxx" @@ -36,7 +38,7 @@ class NETGENPlugin_Hypothesis_2D; -class NETGENPlugin_NETGEN_2D: public SMESH_2D_Algo +class NETGENPLUGIN_EXPORT NETGENPlugin_NETGEN_2D: public SMESH_2D_Algo { public: NETGENPlugin_NETGEN_2D(int hypId, int studyId, SMESH_Gen* gen); diff --git a/src/NETGENPlugin/NETGENPlugin_NETGEN_2D3D.cxx b/src/NETGENPlugin/NETGENPlugin_NETGEN_2D3D.cxx index 0f392c1..c10e6b3 100644 --- a/src/NETGENPlugin/NETGENPlugin_NETGEN_2D3D.cxx +++ b/src/NETGENPlugin/NETGENPlugin_NETGEN_2D3D.cxx @@ -25,8 +25,6 @@ // Project : SALOME // $Header$ //============================================================================= -using namespace std; - #include "NETGENPlugin_NETGEN_2D3D.hxx" #include "NETGENPlugin_Hypothesis.hxx" #include "NETGENPlugin_Mesher.hxx" @@ -39,6 +37,8 @@ using namespace std; #include +using namespace std; + //============================================================================= /*! * diff --git a/src/NETGENPlugin/NETGENPlugin_NETGEN_2D3D.hxx b/src/NETGENPlugin/NETGENPlugin_NETGEN_2D3D.hxx index 169cb15..89c7a61 100644 --- a/src/NETGENPlugin/NETGENPlugin_NETGEN_2D3D.hxx +++ b/src/NETGENPlugin/NETGENPlugin_NETGEN_2D3D.hxx @@ -29,6 +29,8 @@ #ifndef _NETGENPlugin_NETGEN_2D3D_HXX_ #define _NETGENPlugin_NETGEN_2D3D_HXX_ +#include "NETGENPlugin_Defs.hxx" + #include "SMESH_3D_Algo.hxx" #include "SMESH_Mesh.hxx" #include "StdMeshers_MaxElementVolume.hxx" @@ -36,7 +38,7 @@ class NETGENPlugin_Hypothesis; -class NETGENPlugin_NETGEN_2D3D: public SMESH_3D_Algo +class NETGENPLUGIN_EXPORT NETGENPlugin_NETGEN_2D3D: public SMESH_3D_Algo { public: NETGENPlugin_NETGEN_2D3D(int hypId, int studyId, SMESH_Gen* gen); diff --git a/src/NETGENPlugin/NETGENPlugin_NETGEN_2D3D_i.cxx b/src/NETGENPlugin/NETGENPlugin_NETGEN_2D3D_i.cxx index accbeaf..e0afd74 100644 --- a/src/NETGENPlugin/NETGENPlugin_NETGEN_2D3D_i.cxx +++ b/src/NETGENPlugin/NETGENPlugin_NETGEN_2D3D_i.cxx @@ -24,13 +24,14 @@ // Module : NETGENPlugin // $Header$ -using namespace std; #include "NETGENPlugin_NETGEN_2D3D_i.hxx" #include "SMESH_Gen.hxx" #include "Utils_CorbaException.hxx" #include "utilities.h" +using namespace std; + //============================================================================= /*! * NETGENPlugin_NETGEN_2D3D_i::NETGENPlugin_NETGEN_2D3D_i diff --git a/src/NETGENPlugin/NETGENPlugin_NETGEN_2D3D_i.hxx b/src/NETGENPlugin/NETGENPlugin_NETGEN_2D3D_i.hxx index dc8f6d8..a6483d3 100644 --- a/src/NETGENPlugin/NETGENPlugin_NETGEN_2D3D_i.hxx +++ b/src/NETGENPlugin/NETGENPlugin_NETGEN_2D3D_i.hxx @@ -27,6 +27,8 @@ #ifndef _NETGENPlugin_NETGEN_2D3D_I_HXX_ #define _NETGENPlugin_NETGEN_2D3D_I_HXX_ +#include "NETGENPlugin_Defs.hxx" + #include #include CORBA_SERVER_HEADER(NETGENPlugin_Algorithm) @@ -36,7 +38,7 @@ // ====================================================== // NETGEN 3d algorithm // ====================================================== -class NETGENPlugin_NETGEN_2D3D_i: +class NETGENPLUGIN_EXPORT NETGENPlugin_NETGEN_2D3D_i: public virtual POA_NETGENPlugin::NETGENPlugin_NETGEN_2D3D, public virtual SMESH_3D_Algo_i { diff --git a/src/NETGENPlugin/NETGENPlugin_NETGEN_2D_i.cxx b/src/NETGENPlugin/NETGENPlugin_NETGEN_2D_i.cxx index 060af2e..0ba4c91 100644 --- a/src/NETGENPlugin/NETGENPlugin_NETGEN_2D_i.cxx +++ b/src/NETGENPlugin/NETGENPlugin_NETGEN_2D_i.cxx @@ -24,13 +24,14 @@ // Module : NETGENPlugin // $Header$ -using namespace std; #include "NETGENPlugin_NETGEN_2D_i.hxx" #include "SMESH_Gen.hxx" #include "Utils_CorbaException.hxx" #include "utilities.h" +using namespace std; + //============================================================================= /*! * NETGENPlugin_NETGEN_2D_i::NETGENPlugin_NETGEN_2D_i diff --git a/src/NETGENPlugin/NETGENPlugin_NETGEN_2D_i.hxx b/src/NETGENPlugin/NETGENPlugin_NETGEN_2D_i.hxx index af8e9fe..c574225 100644 --- a/src/NETGENPlugin/NETGENPlugin_NETGEN_2D_i.hxx +++ b/src/NETGENPlugin/NETGENPlugin_NETGEN_2D_i.hxx @@ -27,6 +27,8 @@ #ifndef _NETGENPlugin_NETGEN_2D_I_HXX_ #define _NETGENPlugin_NETGEN_2D_I_HXX_ +#include "NETGENPlugin_Defs.hxx" + #include #include CORBA_SERVER_HEADER(NETGENPlugin_Algorithm) @@ -36,7 +38,7 @@ // ====================================================== // NETGEN 3d algorithm // ====================================================== -class NETGENPlugin_NETGEN_2D_i: +class NETGENPLUGIN_EXPORT NETGENPlugin_NETGEN_2D_i: public virtual POA_NETGENPlugin::NETGENPlugin_NETGEN_2D, public virtual SMESH_2D_Algo_i { diff --git a/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx b/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx index c9031d8..107d112 100644 --- a/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx +++ b/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx @@ -26,8 +26,6 @@ // Copyright : CEA 2003 // $Header$ //============================================================================= -using namespace std; - #include "NETGENPlugin_NETGEN_3D.hxx" #include "SMESH_Gen.hxx" diff --git a/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.hxx b/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.hxx index e0d39f3..77d0488 100644 --- a/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.hxx +++ b/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.hxx @@ -23,19 +23,20 @@ // Created : lundi 27 Janvier 2003 // Author : Nadir BOUHAMOU (CEA) // Project : SALOME -// Copyright : CEA 2003 // $Header$ //============================================================================= #ifndef _NETGENPlugin_NETGEN_3D_HXX_ #define _NETGENPlugin_NETGEN_3D_HXX_ +#include "NETGENPlugin_Defs.hxx" + #include "SMESH_3D_Algo.hxx" #include "SMESH_Mesh.hxx" #include "StdMeshers_MaxElementVolume.hxx" #include "Utils_SALOME_Exception.hxx" -class NETGENPlugin_NETGEN_3D: public SMESH_3D_Algo +class NETGENPLUGIN_EXPORT NETGENPlugin_NETGEN_3D: public SMESH_3D_Algo { public: NETGENPlugin_NETGEN_3D(int hypId, int studyId, SMESH_Gen* gen); diff --git a/src/NETGENPlugin/NETGENPlugin_NETGEN_3D_i.cxx b/src/NETGENPlugin/NETGENPlugin_NETGEN_3D_i.cxx index 0429bc9..53f1f4c 100644 --- a/src/NETGENPlugin/NETGENPlugin_NETGEN_3D_i.cxx +++ b/src/NETGENPlugin/NETGENPlugin_NETGEN_3D_i.cxx @@ -27,13 +27,14 @@ // Module : SMESH // $Header$ -using namespace std; #include "NETGENPlugin_NETGEN_3D_i.hxx" #include "SMESH_Gen.hxx" #include "Utils_CorbaException.hxx" #include "utilities.h" +using namespace std; + //============================================================================= /*! * NETGENPlugin_NETGEN_3D_i::NETGENPlugin_NETGEN_3D_i diff --git a/src/NETGENPlugin/NETGENPlugin_NETGEN_3D_i.hxx b/src/NETGENPlugin/NETGENPlugin_NETGEN_3D_i.hxx index 08e0101..9fac5f3 100644 --- a/src/NETGENPlugin/NETGENPlugin_NETGEN_3D_i.hxx +++ b/src/NETGENPlugin/NETGENPlugin_NETGEN_3D_i.hxx @@ -30,6 +30,8 @@ #ifndef _NETGENPlugin_NETGEN_3D_I_HXX_ #define _NETGENPlugin_NETGEN_3D_I_HXX_ +#include "NETGENPlugin_Defs.hxx" + #include #include CORBA_SERVER_HEADER(NETGENPlugin_Algorithm) @@ -39,7 +41,7 @@ // ====================================================== // NETGEN 3d algorithm // ====================================================== -class NETGENPlugin_NETGEN_3D_i: +class NETGENPLUGIN_EXPORT NETGENPlugin_NETGEN_3D_i: public virtual POA_NETGENPlugin::NETGENPlugin_NETGEN_3D, public virtual SMESH_3D_Algo_i { diff --git a/src/NETGENPlugin/NETGENPlugin_i.cxx b/src/NETGENPlugin/NETGENPlugin_i.cxx index 720ba0a..0f01ec2 100644 --- a/src/NETGENPlugin/NETGENPlugin_i.cxx +++ b/src/NETGENPlugin/NETGENPlugin_i.cxx @@ -26,7 +26,6 @@ // Module : SMESH // $Header$ -using namespace std; #include "utilities.h" #include "NETGENPlugin_NETGEN_3D_i.hxx" @@ -49,6 +48,7 @@ template class NETGENPlugin_Creator_i:public HypothesisCreator_i extern "C" { + NETGENPLUGIN_EXPORT GenericHypothesisCreator_i* GetHypothesisCreator (const char* aHypName) { MESSAGE("GetHypothesisCreator " << aHypName); diff --git a/src/NETGENPlugin/NETGENPlugin_icons.po b/src/NETGENPlugin/NETGENPlugin_icons.po new file mode 100644 index 0000000..a3f6297 --- /dev/null +++ b/src/NETGENPlugin/NETGENPlugin_icons.po @@ -0,0 +1,20 @@ +# This is a Qt message file in .po format. Each msgid starts with +# a scope. This scope should *NOT* be translated - eg. "Foo::Bar" +# would be translated to "Pub", not "Foo::Pub". +msgid "" +msgstr "" +"Project-Id-Version: PROJECT VERSION\n" +"POT-Creation-Date: 2002-05-28 10:57:43 AM CEST\n" +"PO-Revision-Date: YYYY-MM-DD\n" +"Last-Translator: FULLNAME \n" +"Content-Type: text/plain; charset=iso-8859-1\n" + + +#----------------------------------------------------------- +# ObjectBrowser +#----------------------------------------------------------- + +#mesh_tree_algo_netgen +msgid "ICON_SMESH_TREE_ALGO_NETGEN_3D" +msgstr "mesh_tree_algo_tetra.png" +#msgstr "mesh_tree_algo_netgen.png" -- 2.39.2