Salome HOME
Merging with WPdev
authorabd <abd@opencascade.com>
Wed, 7 Feb 2007 12:33:37 +0000 (12:33 +0000)
committerabd <abd@opencascade.com>
Wed, 7 Feb 2007 12:33:37 +0000 (12:33 +0000)
41 files changed:
adm_local/unix/config_files/check_Geom.m4 [new file with mode: 0644]
adm_local/unix/config_files/check_NETGEN.m4 [new file with mode: 0644]
adm_local/unix/config_files/check_NETGENPLUGIN.m4
adm_local/unix/config_files/check_SMESH.m4 [new file with mode: 0644]
adm_local/unix/make_commence.in
configure.in.base
idl/Makefile.in
resources/NETGENPlugin.xml
src/GUI/Makefile.in
src/GUI/NETGENPluginGUI.cxx
src/GUI/NETGENPluginGUI_HypothesisCreator.h
src/NETGEN/ReadMeForNgUsers
src/NETGEN/netgen43ForSalome.patch [new file with mode: 0644]
src/NETGEN/netgen45ForSalome.patch
src/NETGEN/netgen45lib64.patch [new file with mode: 0755]
src/NETGENPlugin/Makefile.in
src/NETGENPlugin/NETGENPlugin_Defs.hxx [new file with mode: 0755]
src/NETGENPlugin/NETGENPlugin_Hypothesis.cxx
src/NETGENPlugin/NETGENPlugin_Hypothesis.hxx
src/NETGENPlugin/NETGENPlugin_Hypothesis_2D.cxx
src/NETGENPlugin/NETGENPlugin_Hypothesis_2D.hxx
src/NETGENPlugin/NETGENPlugin_Hypothesis_2D_i.cxx
src/NETGENPlugin/NETGENPlugin_Hypothesis_2D_i.hxx
src/NETGENPlugin/NETGENPlugin_Hypothesis_i.cxx
src/NETGENPlugin/NETGENPlugin_Hypothesis_i.hxx
src/NETGENPlugin/NETGENPlugin_Mesher.cxx
src/NETGENPlugin/NETGENPlugin_Mesher.hxx
src/NETGENPlugin/NETGENPlugin_NETGEN_2D.cxx
src/NETGENPlugin/NETGENPlugin_NETGEN_2D.hxx
src/NETGENPlugin/NETGENPlugin_NETGEN_2D3D.cxx
src/NETGENPlugin/NETGENPlugin_NETGEN_2D3D.hxx
src/NETGENPlugin/NETGENPlugin_NETGEN_2D3D_i.cxx
src/NETGENPlugin/NETGENPlugin_NETGEN_2D3D_i.hxx
src/NETGENPlugin/NETGENPlugin_NETGEN_2D_i.cxx
src/NETGENPlugin/NETGENPlugin_NETGEN_2D_i.hxx
src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx
src/NETGENPlugin/NETGENPlugin_NETGEN_3D.hxx
src/NETGENPlugin/NETGENPlugin_NETGEN_3D_i.cxx
src/NETGENPlugin/NETGENPlugin_NETGEN_3D_i.hxx
src/NETGENPlugin/NETGENPlugin_i.cxx
src/NETGENPlugin/NETGENPlugin_icons.po [new file with mode: 0644]

diff --git a/adm_local/unix/config_files/check_Geom.m4 b/adm_local/unix/config_files/check_Geom.m4
new file mode 100644 (file)
index 0000000..803ca75
--- /dev/null
@@ -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 (file)
index 0000000..97947eb
--- /dev/null
@@ -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 <iostream.h>
+#include <fstream.h>
+namespace nglib {
+#include "nglib.h"
+}
+#define OCCGEOMETRY
+#include <occgeom.hpp>
+,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 <iostream.h>
+#include <fstream.h>
+namespace nglib {
+#include "nglib.h"
+}
+#define OCCGEOMETRY
+#include <occgeom.hpp>
+,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
index 1838cde6c97d1988fca4169dcbbc69e584c25709..23e916f5365be4e42e2cf8f6bea151e5d068ce2a 100644 (file)
-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 <iostream.h>
-#include <fstream.h>
-namespace nglib {
-#include "nglib.h"
-}
-#define OCCGEOMETRY
-#include <occgeom.hpp>
-,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 <iostream.h>
-#include <fstream.h>
-namespace nglib {
-#include "nglib.h"
-}
-#define OCCGEOMETRY
-#include <occgeom.hpp>
-,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 (file)
index 0000000..86a8264
--- /dev/null
@@ -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
index e0a24f9c1dbd6e4c2db2cae0ec1a8d0aceed0e76..91a90d9f20f03a908d6267a1c94ebe1cb930b4e3 100644 (file)
@@ -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
index 4bf07964299beb3fe2954cf1d829965abf146043..09a38fcc30c33a6e1401852c6dcfc1018f0d476e 100644 (file)
@@ -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
index 980cd860087f2bec08eaf9ca5c696403dae8888c..db81b82c48cb7272c68b6484fbb69a487e5201c4 100644 (file)
@@ -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)
 
index df4e14d6e72b95d1c6dad0272c405de4167cdc3c..1a320553936d11c2bae674087368c9bb1fddd3bf 100644 (file)
@@ -7,8 +7,8 @@
 
 <meshers-group name="NETGEN"
                resources="NETGENPlugin"
-               server-lib="libNETGENEngine.so"
-               gui-lib="libNETGENPluginGUI.so">
+               server-lib="NETGENEngine"
+               gui-lib="NETGENPluginGUI">
   <hypotheses>
     <hypothesis type="NETGEN_Parameters"
                label-id="NETGEN 3D Parameters"
index d12da020909f349c6424a1fc2c9af47bab5a9ad2..4fea40aac66a29f8f8e9dbce0b8aef5c33a52f74 100644 (file)
@@ -67,8 +67,7 @@ CPPFLAGS += $(QT_INCLUDES) $(OCC_INCLUDES) $(PYTHON_INCLUDES) \
 CXXFLAGS += -I${KERNEL_ROOT_DIR}/include/salome -I${GUI_ROOT_DIR}/include/salome \
            -I${GEOM_ROOT_DIR}/include/salome  -I${SMESH_ROOT_DIR}/include/salome
 
-LDFLAGS += -lSMESH $(OCC_KERNEL_LIBS) -L${KERNEL_ROOT_DIR}/lib/salome \
-          -L${GUI_ROOT_DIR}/lib/salome -L${GEOM_ROOT_DIR}/lib/salome \
-          -L${SMESH_ROOT_DIR}/lib/salome
+LDFLAGS += $(OCC_KERNEL_LIBS) $(KERNEL_LDFLAGS) $(GUI_LDFLAGS) ${GEOM_LDFLAGS} ${SMESH_LDFLAGS} -lSMESH
+
 
 @CONCLUDE@
index 47fd3c0144bd2251f80f62410621181817d05f44..1b8992147bd3158d4ac789f35353a398bc817b12 100755 (executable)
@@ -35,6 +35,7 @@
 //=============================================================================
 extern "C"
 {
+  NETGENPLUGIN_GUI_EXPORT
   SMESHGUI_GenericHypothesisCreator* GetHypothesisCreator( const QString& aHypType )
   {
     SMESHGUI_GenericHypothesisCreator* aCreator = NULL;
index c86b99f74e5d5d0064c3dcbfb8295f8df985df38..3cbd96aa7f99d0f8210aa5c626f5c3db5a8b2376 100644 (file)
 #ifndef NETGENPLUGINGUI_HypothesisCreator_HeaderFile
 #define NETGENPLUGINGUI_HypothesisCreator_HeaderFile
 
+#ifdef WIN32
+  #ifdef NETGENPLUGIN_GUI_EXPORTS
+    #define NETGENPLUGIN_GUI_EXPORT __declspec( dllexport )
+  #else
+    #define NETGENPLUGIN_GUI_EXPORT __declspec( dllimport )
+  #endif
+#else
+  #define NETGENPLUGIN_GUI_EXPORT
+#endif
+
 #include <SMESHGUI_Hypotheses.h>
 
 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
 
index e14d7142b83d36912e698d18c972e0ad11a8b234..0b7cb2806a7d08302bcf36d3a534356315038477 100644 (file)
@@ -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 <occt_installation_path>
 
-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 <netgen_installation_path> as follow:
+The file check_NETGEN.m4 assumes that Netgen is installed in 
+the directory <netgen_installation_path> as follow:
 
 prompt> ls <netgen_installation_path>
 
@@ -55,17 +67,16 @@ edgeflw.hpp      hpref_pyramid.hpp    msghandler.hpp      sparsmat.hpp
 
 prompt> ls <netgen_installation_path>/lib
 
-LINUX/
-
-prompt> ls <netgen_installation_path>/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 
-<netgen_installation_path>/lib/LINUX/libnginterface.a should contain the objects
+<netgen_installation_path>/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 (file)
index 0000000..5e08d88
--- /dev/null
@@ -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 <spline2d.hpp>
++#include <splinegeometry2.hpp>
++}
++
+ 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 <opti.hpp>
+-#include <visual.hpp>
++/*#include <visual.hpp>*/
+ 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 <stlgeom.hpp>
+ #include <meshing.hpp>
+-#include <visual.hpp>
++/*#include <visual.hpp>*/
+ 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
index 2ee4dab08302df9ec126fb7af96d73a4f710a316..e819950094ddcb161ad4e0858389f69c96cc26ea 100644 (file)
-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 <opti.hpp>
- #ifndef SMALLLIB
--#include <visual.hpp>
-+//#include <visual.hpp>
- #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 <BRepAlgoAPI_Common.hxx>
- #include <BRepAlgoAPI_Fuse.hxx>
- #include <BRepAlgoAPI_Section.hxx>
--#include <BRepOffsetAPI_Sewing.hxx>
--#include <BRepAlgo_Sewing.hxx>
-+//#include <BRepOffsetAPI_Sewing.hxx>
-+//#include <BRepAlgo_Sewing.hxx>
- #include <BRepOffsetAPI_MakeOffsetShape.hxx>
- #include <ShapeFix_Shape.hxx>
- 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\r
+--- netgen-4.5_orig/libsrc/csg/meshsurf.cpp    2006-02-14 10:54:35.000000000 +0300\r
++++ netgen-4.5_patch/libsrc/csg/meshsurf.cpp   2006-10-25 16:05:59.000000000 +0400\r
+@@ -77,11 +77,12 @@\r
+ }\r
\r
\r
+-void MeshOptimize2dSurfaces :: ProjectPoint (INDEX surfind, Point3d & p) const\r
++bool MeshOptimize2dSurfaces :: ProjectPoint (INDEX surfind, Point3d & p) const\r
+ {\r
+   Point<3> hp = p;\r
+   geometry.GetSurface(surfind)->Project (hp);\r
+   p = hp;\r
++  return true;\r
+ }\r
\r
+ void MeshOptimize2dSurfaces :: ProjectPoint2 (INDEX surfind, INDEX surfind2, \r
+diff -Nru netgen-4.5_orig/libsrc/csg/meshsurf.hpp netgen-4.5_patch/libsrc/csg/meshsurf.hpp\r
+--- netgen-4.5_orig/libsrc/csg/meshsurf.hpp    2004-01-20 13:49:44.000000000 +0300\r
++++ netgen-4.5_patch/libsrc/csg/meshsurf.hpp   2006-10-25 16:08:05.000000000 +0400\r
+@@ -45,7 +45,7 @@\r
+     MeshOptimize2dSurfaces (const CSGeometry & ageometry); \r
+    \r
+     ///\r
+-    virtual void ProjectPoint (INDEX surfind, Point3d & p) const;\r
++    virtual bool ProjectPoint (INDEX surfind, Point3d & p) const;\r
+     ///\r
+     virtual void ProjectPoint2 (INDEX surfind, INDEX surfind2, Point3d & p) const;\r
+     ///\r
+diff -Nru netgen-4.5_orig/libsrc/interface/Makefile netgen-4.5_patch/libsrc/interface/Makefile\r
+--- netgen-4.5_orig/libsrc/interface/Makefile  2005-08-09 18:14:59.000000000 +0400\r
++++ netgen-4.5_patch/libsrc/interface/Makefile 2006-04-27 13:12:54.000000000 +0400\r
+@@ -1,4 +1,5 @@\r
+-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 \r
++#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\r
++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\r
+ #\r
+ lib = nginterface\r
+ libpath = libsrc/interface\r
+diff -Nru netgen-4.5_orig/libsrc/interface/nglib.cpp netgen-4.5_patch/libsrc/interface/nglib.cpp\r
+--- netgen-4.5_orig/libsrc/interface/nglib.cpp 2005-10-18 17:53:18.000000000 +0400\r
++++ netgen-4.5_patch/libsrc/interface/nglib.cpp        2006-04-27 13:12:54.000000000 +0400\r
+@@ -56,7 +56,8 @@\r
\r
+ void Ng_Exit ()\r
+ {\r
+-  ;\r
++  delete testout;\r
++  testout = NULL;\r
+ }\r
+   \r
\r
+diff -Nru netgen-4.5_orig/libsrc/makefile.inc netgen-4.5_patch/libsrc/makefile.inc\r
+--- netgen-4.5_orig/libsrc/makefile.inc        2005-09-02 17:17:51.000000000 +0400\r
++++ netgen-4.5_patch/libsrc/makefile.inc       2006-10-26 09:33:58.000000000 +0400\r
+@@ -8,17 +8,14 @@\r
+ LIBSRC_DIR=$(CPP_DIR)/libsrc\r
+ LIB_DIR=$(CPP_DIR)/lib/$(MACHINE)\r
\r
+-#OCC_DIR=../../occ\r
+-#OCCINC_DIR=$(OCC_DIR)/inc\r
+-#OCCLIB_DIR=$(OCC_DIR)/lib\r
+-# OCC_DIR=/opt/OpenCASCADE5.2/ros\r
+-# OCC_DIR=/home/joachim/download/occ/Linux\r
+-# OCCINC_DIR=$(OCC_DIR)/inc  -I$(OCC_DIR)/ros/inc\r
+-# OCCLIB_DIR=$(OCC_DIR)/Linux/lib\r
++OCC_DIR=$(CASROOT)\r
++OCCINC_DIR=$(OCC_DIR)/inc\r
++OCCLIB_DIR=$(OCC_DIR)/Linux/lib\r
+ #\r
+ include $(LIBSRC_DIR)/makefile.mach.$(MACHINE)\r
+ #\r
+-CPLUSPLUSFLAGS1 = -c -I$(LIBSRC_DIR)/include -I$(OCCINC_DIR) \r
++CPLUSPLUSFLAGS1 = -c -I$(LIBSRC_DIR)/include -I$(OCCINC_DIR) \\r
++      -DOCCGEOMETRY -DOCC52 -DHAVE_IOSTREAM -DHAVE_LIMITS_H\r
+ #\r
+ ARFLAGS = r\r
+ #\r
+diff -Nru netgen-4.5_orig/libsrc/makefile.mach.LINUX netgen-4.5_patch/libsrc/makefile.mach.LINUX\r
+--- netgen-4.5_orig/libsrc/makefile.mach.LINUX 2004-10-11 23:49:26.000000000 +0400\r
++++ netgen-4.5_patch/libsrc/makefile.mach.LINUX        2006-04-27 13:12:54.000000000 +0400\r
+@@ -16,7 +16,7 @@\r
+ #\r
+ CFLAGS2 =\r
\r
+-CPLUSPLUSFLAGS2 = -O2 -I/usr/include/GL3.5 -DLINUX -DOPENGL \\r
++CPLUSPLUSFLAGS2 = -O2 -I/usr/include/GL3.5 -DLINUX \\r
+       -ftemplate-depth-99 -finline-limit=10000 \\r
+       -Wdisabled-optimization  -funroll-loops  -DnoNGSOLVE\r
\r
+diff -Nru netgen-4.5_orig/libsrc/meshing/improve2.cpp netgen-4.5_patch/libsrc/meshing/improve2.cpp\r
+--- netgen-4.5_orig/libsrc/meshing/improve2.cpp        2006-01-11 18:08:19.000000000 +0300\r
++++ netgen-4.5_patch/libsrc/meshing/improve2.cpp       2006-04-27 13:12:54.000000000 +0400\r
+@@ -4,7 +4,7 @@\r
+ #include <opti.hpp>\r
\r
+ #ifndef SMALLLIB\r
+-#include <visual.hpp>\r
++//#include <visual.hpp>\r
+ #endif\r
\r
+ namespace netgen\r
+diff -Nru netgen-4.5_orig/libsrc/meshing/improve2.hpp netgen-4.5_patch/libsrc/meshing/improve2.hpp\r
+--- netgen-4.5_orig/libsrc/meshing/improve2.hpp        2004-10-12 23:22:55.000000000 +0400\r
++++ netgen-4.5_patch/libsrc/meshing/improve2.hpp       2006-10-25 16:09:37.000000000 +0400\r
+@@ -32,17 +32,16 @@\r
+   ///\r
+   virtual void SelectSurfaceOfPoint (const Point3d & p,\r
+                                    const PointGeomInfo & gi);\r
+-  ///\r
+-  virtual void ProjectPoint (INDEX /* surfind */, Point3d & /* p */) const { };\r
++\r
++  /// project point on surface, returns true if success\r
++  virtual bool ProjectPoint (INDEX /* surfind */, Point3d & /* p */) const { return false; }\r
++  /// fast project point on surface using point geom info of a neighboring point\r
++  /// if gi.trignum != 0,\r
++  /// returns true if success, gi is updated\r
++  virtual bool ProjectPoint (INDEX surfind, Point3d & p, PointGeomInfo& gi) const\r
++  { gi.trignum = 1; return ProjectPoint (surfind, p); }\r
+   ///\r
+   virtual void ProjectPoint2 (INDEX /* surfind */, INDEX /* surfind2 */, Point3d & /* p */) const { };\r
+-  /// liefert zu einem 3d-Punkt die geominfo (Dreieck) und liefert 1, wenn erfolgreich, \r
+-  /// 0, wenn nicht (Punkt ausserhalb von chart)\r
+-  virtual int CalcPointGeomInfo(PointGeomInfo& gi, const Point3d& /*p3*/) const\r
+-    { gi.trignum = 1; return 1;};\r
+-\r
+-  virtual int CalcPointGeomInfo(int /* surfind */, PointGeomInfo& gi, const Point3d& p3) const\r
+-    { return CalcPointGeomInfo (gi, p3); }\r
\r
+   ///\r
+   virtual void GetNormalVector(INDEX surfind, const Point3d & p, PointGeomInfo & gi, Vec3d & n) const;\r
+diff -Nru netgen-4.5_orig/libsrc/meshing/smoothing2.cpp netgen-4.5_patch/libsrc/meshing/smoothing2.cpp\r
+--- netgen-4.5_orig/libsrc/meshing/smoothing2.cpp      2006-01-11 18:08:20.000000000 +0300\r
++++ netgen-4.5_patch/libsrc/meshing/smoothing2.cpp     2006-10-25 16:10:46.000000000 +0400\r
+@@ -300,7 +300,7 @@\r
+   double Opti2SurfaceMinFunction :: \r
+   FuncGrad (const Vector & x, Vector & grad) const\r
+   {\r
+-    Vec3d n, vgrad;\r
++    Vec3d vgrad;\r
+     Point3d pp1;\r
+     double g1x, g1y;\r
+     double badness, hbadness;\r
+@@ -308,8 +308,6 @@\r
+     vgrad = 0;\r
+     badness = 0;\r
\r
+-    meshthis -> GetNormalVector (surfi, sp1, gi1, n);\r
+-\r
+     pp1 = sp1;\r
+     pp1.Add2 (x.Get(1), t1, x.Get(2), t2);\r
\r
+@@ -360,7 +358,7 @@\r
+   double Opti2SurfaceMinFunction :: \r
+   FuncDeriv (const Vector & x, const Vector & dir, double & deriv) const\r
+   {\r
+-    Vec3d n, vgrad;\r
++    Vec3d vgrad;\r
+     Point3d pp1;\r
+     double g1x, g1y;\r
+     double badness, hbadness;\r
+@@ -368,8 +366,6 @@\r
+     vgrad = 0;\r
+     badness = 0;\r
\r
+-    meshthis -> GetNormalVector (surfi, sp1, gi1, n);\r
+-\r
+     pp1 = sp1;\r
+     pp1.Add2 (x.Get(1), t1, x.Get(2), t2);\r
\r
+@@ -520,7 +516,7 @@\r
+     // from 2d:\r
\r
+     int j, k, lpi, gpi;\r
+-    Vec3d n, vgrad;\r
++    Vec3d vgrad;\r
+     Point3d pp1;\r
+     Vec2d g1, vdir;\r
+     double badness, hbadness, hbad, hderiv;\r
+@@ -528,8 +524,6 @@\r
+     vgrad = 0;\r
+     badness = 0;\r
\r
+-    meshthis -> GetNormalVector (surfi, sp1, gi1, n);\r
+-\r
+     pp1 = sp1;\r
+     pp1.Add2 (x.Get(1), t1, x.Get(2), t2);\r
\r
+@@ -593,7 +587,7 @@\r
+     // from 2d:\r
\r
+     int j, k, lpi, gpi;\r
+-    Vec3d n, vgrad;\r
++    Vec3d vgrad;\r
+     Point3d pp1;\r
+     Vec2d g1, vdir;\r
+     double badness, hbadness, hbad, hderiv;\r
+@@ -601,8 +595,6 @@\r
+     vgrad = 0;\r
+     badness = 0;\r
\r
+-    meshthis -> GetNormalVector (surfi, sp1, gi1, n);\r
+-\r
+     pp1 = sp1;\r
+     pp1.Add2 (x.Get(1), t1, x.Get(2), t2);\r
\r
+@@ -859,19 +851,21 @@\r
+         locelements.SetSize(0);\r
+         locrots.SetSize (0);\r
+         lochs.SetSize (0);\r
++          ngi.trignum = 0;\r
+       \r
+         for (j = 0; j < elementsonpoint[pi].Size(); j++)\r
+           {\r
+             sei = elementsonpoint[pi][j];\r
+             const Element2d & bel = mesh[sei];\r
+             surfi = mesh.GetFaceDescriptor(bel.GetIndex()).SurfNr();\r
+-          \r
++\r
+             locelements.Append (sei);\r
+           \r
+             for (k = 1; k <= bel.GetNP(); k++)\r
+               if (bel.PNum(k) == pi)\r
+                 {\r
+                   locrots.Append (k);\r
++                    ngi = bel.GeomInfoPi(k);\r
+                   break;\r
+                 }\r
+             \r
+@@ -942,7 +936,7 @@\r
+           }\r
+         \r
+         //optimizer loop (if not whole distance is not possible, move only a bit!!!!)\r
+-        while (loci <= 5 && !moveisok)\r
++          while (loci <= 5 && !moveisok)\r
+           {\r
+             loci ++;\r
+             mesh[pi].X() = origp.X() + (x.Get(1) * t1.X() + x.Get(2) * t2.X())*fact;\r
+@@ -951,11 +945,9 @@\r
+             fact = fact/2.;\r
\r
\r
+-            ProjectPoint (surfi, mesh[pi]);\r
++            moveisok = ProjectPoint (surfi, mesh[pi], ngi);\r
\r
+-            moveisok = CalcPointGeomInfo(surfi, ngi, mesh[pi]); \r
+-            // point lies on same chart in stlsurface\r
+-          \r
++              // point lies on same chart in stlsurface\r
+             if (moveisok)\r
+               {\r
+                 for (j = 0; j < locelements.Size(); j++)\r
+diff -Nru netgen-4.5_orig/libsrc/occ/occconstruction.cpp netgen-4.5_patch/libsrc/occ/occconstruction.cpp\r
+--- netgen-4.5_orig/libsrc/occ/occconstruction.cpp     2005-12-06 17:15:53.000000000 +0300\r
++++ netgen-4.5_patch/libsrc/occ/occconstruction.cpp    2006-04-27 13:12:54.000000000 +0400\r
+@@ -28,8 +28,8 @@\r
+ #include <BRepAlgoAPI_Common.hxx>\r
+ #include <BRepAlgoAPI_Fuse.hxx>\r
+ #include <BRepAlgoAPI_Section.hxx>\r
+-#include <BRepOffsetAPI_Sewing.hxx>\r
+-#include <BRepAlgo_Sewing.hxx>\r
++//#include <BRepOffsetAPI_Sewing.hxx>\r
++//#include <BRepAlgo_Sewing.hxx>\r
+ #include <BRepOffsetAPI_MakeOffsetShape.hxx>\r
+ #include <ShapeFix_Shape.hxx>\r
+ namespace netgen\r
+diff -Nru netgen-4.5_orig/libsrc/occ/occgenmesh.cpp netgen-4.5_patch/libsrc/occ/occgenmesh.cpp\r
+--- netgen-4.5_orig/libsrc/occ/occgenmesh.cpp  2006-02-07 12:12:48.000000000 +0300\r
++++ netgen-4.5_patch/libsrc/occ/occgenmesh.cpp 2006-10-25 16:14:48.000000000 +0400\r
+@@ -28,7 +28,7 @@\r
+     return  Point<3> (p.X(), p.Y(), p.Z());\r
+   }\r
+  \r
+-  void DivideEdge (TopoDS_Edge & edge,\r
++  static void DivideEdge (TopoDS_Edge & edge,\r
+                  ARRAY<MeshPoint> & ps,\r
+                  ARRAY<double> & params,\r
+                  Mesh & mesh)\r
+@@ -49,23 +49,19 @@\r
+     hvalue[0] = 0;\r
+     pnt = c->Value(s0);\r
\r
+-    double olddist = 0;\r
+-    double dist = 0;\r
+-\r
+-    for (int i = 1; i <= DIVIDEEDGESECTIONS; i++)\r
++    int i;\r
++    for (i = 1; i <= DIVIDEEDGESECTIONS; i++)\r
+       {\r
+       oldpnt = pnt;\r
+       pnt = c->Value(s0+(i/double(DIVIDEEDGESECTIONS))*(s1-s0));\r
++      double dist = pnt.Distance(oldpnt);\r
+       hvalue[i] = hvalue[i-1] +\r
+         1.0/mesh.GetH(Point3d(pnt.X(), pnt.Y(), pnt.Z()))*\r
+-        pnt.Distance(oldpnt);\r
++        dist;\r
\r
+       //(*testout) << "mesh.GetH(Point3d(pnt.X(), pnt.Y(), pnt.Z())) " << mesh.GetH(Point3d(pnt.X(), pnt.Y(), pnt.Z())) \r
+       //         <<  " pnt.Distance(oldpnt) " << pnt.Distance(oldpnt) << endl;\r
\r
+-\r
+-      olddist = dist;\r
+-      dist = pnt.Distance(oldpnt);\r
+       }\r
\r
+     //  nsubedges = int(ceil(hvalue[DIVIDEEDGESECTIONS]));\r
+@@ -74,7 +70,7 @@\r
+     ps.SetSize(nsubedges-1);\r
+     params.SetSize(nsubedges+1);\r
\r
+-    int i = 1;\r
++    i = 1;\r
+     int i1 = 0;\r
+     do\r
+       {\r
+@@ -112,7 +108,7 @@\r
\r
+   static void FindEdges (OCCGeometry & geom, Mesh & mesh)\r
+   {\r
+-    char * savetask = multithread.task;\r
++    const char * savetask = multithread.task;\r
+     multithread.task = "Edge meshing";\r
\r
+     (*testout) << "edge meshing" << endl;\r
+@@ -124,6 +120,7 @@\r
+     (*testout) << "nedges = " << nedges << endl;\r
\r
+     double eps = 1e-6 * geom.GetBoundingBox().Diam();\r
++    double eps2 = eps * eps;\r
\r
+     for (int i = 1; i <= nvertices; i++)\r
+       {\r
+@@ -133,7 +130,7 @@\r
+       bool exists = 0;\r
+       if (merge_solids)\r
+         for (PointIndex pi = 1; pi <= mesh.GetNP(); pi++)\r
+-          if ( Dist2 (mesh[pi], Point<3>(mp)) < eps*eps)\r
++          if ( Dist2 (mesh[pi], Point<3>(mp)) < eps2)\r
+             {\r
+               exists = 1;\r
+               break;\r
+@@ -276,8 +273,8 @@\r
+                   pnums.Last() = -1;\r
+                   for (PointIndex pi = 1; pi < first_ep; pi++)\r
+                     {\r
+-                      if (Dist2 (mesh[pi], fp) < eps*eps) pnums[0] = pi;\r
+-                      if (Dist2 (mesh[pi], lp) < eps*eps) pnums.Last() = pi;\r
++                      if (Dist2 (mesh[pi], fp) < eps2) pnums[0] = pi;\r
++                      if (Dist2 (mesh[pi], lp) < eps2) pnums.Last() = pi;\r
+                     }\r
+                 }\r
+               \r
+@@ -287,7 +284,7 @@\r
+                   bool exists = 0;\r
+                   int j;\r
+                   for (j = first_ep; j <= mesh.GetNP(); j++)\r
+-                    if ((mesh.Point(j)-Point<3>(mp[i-1])).Length() < eps) \r
++                    if (Dist2(mesh.Point(j), Point<3>(mp[i-1])) < eps2)\r
+                       {\r
+                         exists = 1;\r
+                         break;\r
+@@ -394,7 +391,7 @@\r
+     int i, j, k;\r
+     int changed;\r
\r
+-    char * savetask = multithread.task;\r
++    const char * savetask = multithread.task;\r
+     multithread.task = "Surface meshing";\r
+   \r
+     geom.facemeshstatus = 0;\r
+@@ -751,7 +748,7 @@\r
+     multithread.task = savetask;\r
+   }\r
\r
+-  double ComputeH (double kappa)\r
++  static double ComputeH (double kappa)\r
+   {\r
+     double hret;\r
+     kappa *= mparam.curvaturesafety;\r
+@@ -779,7 +776,7 @@\r
+       double nq = n*q;\r
+     \r
+       Point<3> p = p0 + 0.5*n;\r
+-      double lambda = (p-l.p0)*n / nq;\r
++      double lambda = (fabs(nq) > 1e-10 ? (p-l.p0)*n / nq : -1);\r
\r
+       if (lambda >= 0 && lambda <= 1)\r
+       {\r
+@@ -799,55 +796,55 @@\r
\r
\r
\r
+-  void RestrictHTriangle (gp_Pnt2d & par0, gp_Pnt2d & par1, gp_Pnt2d & par2,\r
+-                        BRepLProp_SLProps * prop, Mesh & mesh, const double maxside, int depth, double h = 0)\r
++  static void RestrictHTriangle (gp_Pnt2d & par0, gp_Pnt2d & par1, gp_Pnt2d & par2,\r
++                        BRepAdaptor_Surface& surf, Mesh & mesh, const double maxside, int depth, double h = 0)\r
+   {\r
+-\r
++    BRepLProp_SLProps prop(surf, 2, 1e-5);\r
\r
+     gp_Pnt2d parmid;\r
\r
+     parmid.SetX(0.3*(par0.X()+par1.X()+par2.X()));\r
+     parmid.SetY(0.3*(par0.Y()+par1.Y()+par2.Y()));\r
+     \r
+-    if (depth == 0)\r
++    //if (depth == 0)\r
+       {\r
+       double curvature = 0;\r
\r
+-      prop->SetParameters (parmid.X(), parmid.Y());\r
+-      if (!prop->IsCurvatureDefined())\r
++      prop.SetParameters (parmid.X(), parmid.Y());\r
++      if (!prop.IsCurvatureDefined())\r
+         {\r
+           (*testout) << "curvature not defined!" << endl;\r
+           return;\r
+         }\r
+-      curvature = max(fabs(prop->MinCurvature()),\r
+-                      fabs(prop->MaxCurvature()));\r
++      curvature = max(fabs(prop.MinCurvature()),\r
++                      fabs(prop.MaxCurvature()));\r
\r
+-      prop->SetParameters (par0.X(), par0.Y());\r
+-      if (!prop->IsCurvatureDefined())\r
++      prop.SetParameters (par0.X(), par0.Y());\r
++      if (!prop.IsCurvatureDefined())\r
+         {\r
+           (*testout) << "curvature not defined!" << endl;\r
+           return;\r
+         }\r
+-      curvature = max(curvature,max(fabs(prop->MinCurvature()),\r
+-                                    fabs(prop->MaxCurvature())));\r
++      curvature = max(curvature,max(fabs(prop.MinCurvature()),\r
++                                    fabs(prop.MaxCurvature())));\r
\r
+-      prop->SetParameters (par1.X(), par1.Y());\r
+-      if (!prop->IsCurvatureDefined())\r
++      prop.SetParameters (par1.X(), par1.Y());\r
++      if (!prop.IsCurvatureDefined())\r
+         {\r
+           (*testout) << "curvature not defined!" << endl;\r
+           return;\r
+         }\r
+-      curvature = max(curvature,max(fabs(prop->MinCurvature()),\r
+-                                    fabs(prop->MaxCurvature())));\r
++      curvature = max(curvature,max(fabs(prop.MinCurvature()),\r
++                                    fabs(prop.MaxCurvature())));\r
\r
+-      prop->SetParameters (par2.X(), par2.Y());\r
+-      if (!prop->IsCurvatureDefined())\r
++      prop.SetParameters (par2.X(), par2.Y());\r
++      if (!prop.IsCurvatureDefined())\r
+         {\r
+           (*testout) << "curvature not defined!" << endl;\r
+           return;\r
+         }\r
+-      curvature = max(curvature,max(fabs(prop->MinCurvature()),\r
+-                                    fabs(prop->MaxCurvature())));\r
++      curvature = max(curvature,max(fabs(prop.MinCurvature()),\r
++                                    fabs(prop.MaxCurvature())));\r
\r
+       //(*testout) << "curvature " << curvature << endl;\r
\r
+@@ -886,51 +883,47 @@\r
+       pm1.SetX(0.5*(par0.X()+par2.X())); pm1.SetY(0.5*(par0.Y()+par2.Y()));\r
+       pm2.SetX(0.5*(par1.X()+par0.X())); pm2.SetY(0.5*(par1.Y()+par0.Y()));\r
\r
+-      RestrictHTriangle (pm0, pm1, pm2, prop, mesh, 0.5*maxside, depth+1, h);\r
+-      RestrictHTriangle (par0, pm1, pm2, prop, mesh, 0.5*maxside, depth+1, h);\r
+-      RestrictHTriangle (par1, pm0, pm2, prop, mesh, 0.5*maxside, depth+1, h);\r
+-      RestrictHTriangle (par2, pm1, pm0, prop, mesh, 0.5*maxside, depth+1, h);\r
++      RestrictHTriangle (pm0, pm1, pm2, surf, mesh, 0.5*maxside, depth+1, h);\r
++      RestrictHTriangle (par0, pm1, pm2, surf, mesh, 0.5*maxside, depth+1, h);\r
++      RestrictHTriangle (par1, pm0, pm2, surf, mesh, 0.5*maxside, depth+1, h);\r
++      RestrictHTriangle (par2, pm1, pm0, surf, mesh, 0.5*maxside, depth+1, h);\r
+       }\r
+     else\r
+       {\r
+       gp_Pnt pnt;\r
+       Point3d p3d;\r
\r
+-      prop->SetParameters (parmid.X(), parmid.Y());\r
+-      pnt = prop->Value();\r
++      surf.D0(parmid.X(), parmid.Y(), pnt);\r
+       p3d = Point3d(pnt.X(), pnt.Y(), pnt.Z());\r
+       mesh.RestrictLocalH (p3d, h);\r
\r
+       \r
+-      prop->SetParameters (par0.X(), par0.Y());\r
+-      pnt = prop->Value();\r
++      surf.D0(par0.X(), par0.Y(), pnt);\r
+       p3d = Point3d(pnt.X(), pnt.Y(), pnt.Z());\r
+       mesh.RestrictLocalH (p3d, h);\r
\r
+-      prop->SetParameters (par1.X(), par1.Y());\r
+-      pnt = prop->Value();\r
++      surf.D0(par1.X(), par1.Y(), pnt);\r
+       p3d = Point3d(pnt.X(), pnt.Y(), pnt.Z());\r
+       mesh.RestrictLocalH (p3d, h);\r
\r
+-      prop->SetParameters (par2.X(), par2.Y());\r
+-      pnt = prop->Value();\r
++      surf.D0(par2.X(), par2.Y(), pnt);\r
+       p3d = Point3d(pnt.X(), pnt.Y(), pnt.Z());\r
+       mesh.RestrictLocalH (p3d, h);\r
\r
+-      (*testout) << "p = " << p3d << ", h = " << h << ", maxside = " << maxside << endl;\r
++      //(*testout) << "p = " << p3d << ", h = " << h << ", maxside = " << maxside << endl;\r
+       /*\r
+         (*testout) << pnt.X() << " " << pnt.Y() << " " << pnt.Z() << endl;\r
\r
+-        prop->SetParameters (par0.X(), par0.Y());\r
+-        pnt = prop->Value();\r
++        prop.SetParameters (par0.X(), par0.Y());\r
++        pnt = prop.Value();\r
+         (*testout) << pnt.X() << " " << pnt.Y() << " " << pnt.Z() << endl;\r
\r
+-        prop->SetParameters (par1.X(), par1.Y());\r
+-        pnt = prop->Value();\r
++        prop.SetParameters (par1.X(), par1.Y());\r
++        pnt = prop.Value();\r
+         (*testout) << pnt.X() << " " << pnt.Y() << " " << pnt.Z() << endl;\r
\r
+-        prop->SetParameters (par2.X(), par2.Y());\r
+-        pnt = prop->Value();\r
++        prop.SetParameters (par2.X(), par2.Y());\r
++        pnt = prop.Value();\r
+         (*testout) << pnt.X() << " " << pnt.Y() << " " << pnt.Z() << endl;\r
+       */\r
+       }\r
+@@ -970,7 +963,7 @@\r
+       if (mparam.uselocalh)\r
+         {\r
\r
+-          char * savetask = multithread.task;\r
++          const char * savetask = multithread.task;\r
+           multithread.percent = 0;\r
\r
+           mesh->SetLocalH (bb.PMin(), bb.PMax(), mparam.grading);\r
+@@ -1075,7 +1068,6 @@\r
+               if (triangulation.IsNull()) continue;\r
+             \r
+               BRepAdaptor_Surface sf(face, Standard_True);\r
+-              BRepLProp_SLProps prop(sf, 2, 1e-5);\r
+               \r
+               int ntriangles = triangulation -> NbTriangles();\r
+               for (int j = 1; j <= ntriangles; j++)\r
+@@ -1096,7 +1088,7 @@\r
+                   maxside = max (maxside, p[1].Distance(p[2]));\r
+                   //cout << "\rFace " << i << " pos11 ntriangles " << ntriangles << " maxside " << maxside << flush;\r
\r
+-                  RestrictHTriangle (par[0], par[1], par[2], &prop, *mesh, maxside, 0);\r
++                  RestrictHTriangle (par[0], par[1], par[2], sf, *mesh, maxside, 0);\r
+                   //cout << "\rFace " << i << " pos12 ntriangles " << ntriangles << flush;\r
+                 }\r
+             }\r
+diff -Nru netgen-4.5_orig/libsrc/occ/occgeom.cpp netgen-4.5_patch/libsrc/occ/occgeom.cpp\r
+--- netgen-4.5_orig/libsrc/occ/occgeom.cpp     2006-01-25 15:35:50.000000000 +0300\r
++++ netgen-4.5_patch/libsrc/occ/occgeom.cpp    2006-10-25 16:15:24.000000000 +0400\r
+@@ -7,6 +7,8 @@\r
+ #include "ShapeAnalysis_ShapeContents.hxx"\r
+ #include "ShapeAnalysis_CheckSmallFace.hxx"\r
+ #include "ShapeAnalysis_DataMapOfShapeListOfReal.hxx"\r
++#include <ShapeAnalysis_Surface.hxx>\r
++#include <BRepTopAdaptor_FClass2d.hxx>\r
+ #include "BRepAlgoAPI_Fuse.hxx"\r
+ #include "BRepCheck_Analyzer.hxx"\r
+ #include "BRepLib.hxx"\r
+@@ -16,11 +18,19 @@\r
+ #include "Partition_Spliter.hxx"\r
+ //#include "VrmlAPI.hxx"\r
+ //#include "StlAPI.hxx"\r
++#include <TopAbs_State.hxx>\r
\r
\r
+ namespace netgen\r
+ {\r
\r
++  OCCGeometry::~OCCGeometry()\r
++  {\r
++    NCollection_DataMap<int,BRepTopAdaptor_FClass2d*>::Iterator it(fclsmap);\r
++    for (; it.More(); it.Next())\r
++      delete it.Value();\r
++  }\r
++\r
+   void OCCGeometry :: PrintNrShapes ()\r
+   {\r
+     TopExp_Explorer e;\r
+@@ -947,13 +957,13 @@\r
\r
+   void OCCGeometry :: BuildVisualizationMesh ()\r
+   {\r
+-\r
+-    cout << "Preparing visualization (deflection = " << vispar.occdeflection << ") ... " << flush;\r
++    double vispar_occdeflection = 0.01;\r
++    cout << "Preparing visualization (deflection = " << vispar_occdeflection << ") ... " << flush;\r
\r
\r
+     BRepTools::Clean (shape);\r
+     //WriteOCC_STL("test.stl");\r
+-    BRepMesh_IncrementalMesh::BRepMesh_IncrementalMesh (shape, vispar.occdeflection, true);\r
++    BRepMesh_IncrementalMesh::BRepMesh_IncrementalMesh (shape, vispar_occdeflection, true);\r
+     cout << "done" << endl;\r
\r
\r
+@@ -973,8 +983,27 @@\r
+   \r
+   }\r
\r
++  void OCCGeometry::GetFaceTools(int surfi, Handle(ShapeAnalysis_Surface)& proj,\r
++                                 BRepTopAdaptor_FClass2d*& cls) const\r
++  {\r
++    //MSV: organize caching projector in the map\r
++    if (fprjmap.IsBound(surfi))\r
++    {\r
++      proj = fprjmap.Find(surfi);\r
++      cls = fclsmap.Find(surfi);\r
++    }\r
++    else\r
++    {\r
++      const TopoDS_Face& aFace = TopoDS::Face(fmap(surfi));\r
++      Handle(Geom_Surface) aSurf = BRep_Tool::Surface(aFace);\r
++      proj = new ShapeAnalysis_Surface(aSurf);\r
++      fprjmap.Bind(surfi, proj);\r
++      cls = new BRepTopAdaptor_FClass2d(aFace,Precision::Confusion());\r
++      fclsmap.Bind(surfi, cls);\r
++    }\r
++  }\r
\r
+-  void OCCGeometry :: Project (int surfi, Point<3> & p) const\r
++  bool OCCGeometry :: Project (int surfi, Point<3> & p, double& u, double& v) const\r
+   {\r
+     static int cnt = 0;\r
+     if (++cnt % 1000 == 0) cout << "Project cnt = " << cnt << endl;\r
+@@ -983,18 +1012,22 @@\r
\r
+     //(*testout) << "before " << pnt.X() << " "<< pnt.Y() << " "<< pnt.Z() << " " << endl;\r
\r
+-    GeomAPI_ProjectPointOnSurf proj(pnt, BRep_Tool::Surface(TopoDS::Face(fmap(surfi))));\r
+-    if (proj.NbPoints() == 0)\r
+-      {\r
+-      cout << "Projection fails" << endl;\r
+-      }\r
+-    else\r
+-      {\r
+-      pnt = proj.NearestPoint();\r
+-      //(*testout) << "after " << pnt.X() << " "<< pnt.Y() << " "<< pnt.Z() << " " << endl;\r
++    Handle(ShapeAnalysis_Surface) proj;\r
++    BRepTopAdaptor_FClass2d *cls;\r
++    GetFaceTools(surfi, proj, cls);\r
\r
+-      p = Point<3> (pnt.X(), pnt.Y(), pnt.Z());\r
+-      }\r
++    gp_Pnt2d p2d = proj->ValueOfUV(pnt, Precision::Confusion());\r
++    if (cls->Perform(p2d) == TopAbs_OUT)\r
++    {\r
++      //cout << "Projection fails" << endl;\r
++      return false;\r
++    }\r
++    pnt = proj->Value(p2d);\r
++    p2d.Coord(u, v);\r
++    //(*testout) << "after " << pnt.X() << " "<< pnt.Y() << " "<< pnt.Z() << " " << endl;\r
++\r
++    p = Point<3> (pnt.X(), pnt.Y(), pnt.Z());\r
++    return true;\r
+   }\r
\r
\r
+@@ -1002,54 +1035,20 @@\r
+   {\r
+     gp_Pnt p(ap(0), ap(1), ap(2));\r
+   \r
+-    Handle(Geom_Surface) surface = BRep_Tool::Surface(TopoDS::Face(fmap(surfi)));\r
++    Handle(ShapeAnalysis_Surface) proj;\r
++    BRepTopAdaptor_FClass2d *cls;\r
++    GetFaceTools(surfi, proj, cls);\r
+   \r
+-    gp_Pnt x = surface->Value (u,v);\r
+-  \r
+-    if (p.SquareDistance(x) <= sqr(PROJECTION_TOLERANCE)) return true;\r
+-  \r
+-    gp_Vec du, dv;\r
+-  \r
+-    surface->D1(u,v,x,du,dv);\r
+-  \r
+-    int count = 0;\r
+-  \r
+-    gp_Pnt xold;\r
+-    gp_Vec n;\r
+-    double det, lambda, mu;\r
+-  \r
+-    do {\r
+-      count++;\r
+-  \r
+-      n = du^dv;\r
+-  \r
+-      det = Det3 (n.X(), du.X(), dv.X(),\r
+-                n.Y(), du.Y(), dv.Y(),\r
+-                n.Z(), du.Z(), dv.Z());\r
+-  \r
+-      if (det < 1e-15) return false; \r
+-  \r
+-      lambda = Det3 (n.X(), p.X()-x.X(), dv.X(),\r
+-                   n.Y(), p.Y()-x.Y(), dv.Y(),\r
+-                   n.Z(), p.Z()-x.Z(), dv.Z())/det;\r
+-  \r
+-      mu     = Det3 (n.X(), du.X(), p.X()-x.X(),\r
+-                   n.Y(), du.Y(), p.Y()-x.Y(),\r
+-                   n.Z(), du.Z(), p.Z()-x.Z())/det;\r
+-    \r
+-      u += lambda;\r
+-      v += mu;\r
+-  \r
+-      xold = x;\r
+-      surface->D1(u,v,x,du,dv);\r
+-  \r
+-    } while (xold.SquareDistance(x) > sqr(PROJECTION_TOLERANCE) && count < 50);\r
+-\r
+-    //    (*testout) << "FastProject count: " << count << endl;\r
+-  \r
+-    if (count == 50) return false;\r
++    gp_Pnt2d p2d = proj->NextValueOfUV(gp_Pnt2d(u,v), p, Precision::Confusion());\r
++    if (cls->Perform(p2d) == TopAbs_OUT)\r
++    {\r
++      //cout << "Projection fails" << endl;\r
++      return false;\r
++    }\r
+   \r
+-    ap = Point<3> (x.X(), x.Y(), x.Z());\r
++    p = proj->Value(p2d);\r
++    p2d.Coord(u, v);\r
++    ap = Point<3> (p.X(), p.Y(), p.Z());\r
+   \r
+     return true;\r
+   }\r
+diff -Nru netgen-4.5_orig/libsrc/occ/occgeom.hpp netgen-4.5_patch/libsrc/occ/occgeom.hpp\r
+--- netgen-4.5_orig/libsrc/occ/occgeom.hpp     2006-01-25 15:35:50.000000000 +0300\r
++++ netgen-4.5_patch/libsrc/occ/occgeom.hpp    2006-10-25 16:16:01.000000000 +0400\r
+@@ -15,8 +15,6 @@\r
+ #include "Geom_Curve.hxx"\r
+ #include "Geom2d_Curve.hxx"\r
+ #include "Geom_Surface.hxx"\r
+-#include "GeomAPI_ProjectPointOnSurf.hxx"\r
+-#include "GeomAPI_ProjectPointOnCurve.hxx"\r
+ #include "BRepTools.hxx"\r
+ #include "TopExp.hxx"\r
+ #include "BRepBuilderAPI_MakeVertex.hxx"\r
+@@ -41,8 +39,6 @@\r
+ #include "Geom_Curve.hxx"\r
+ #include "Geom2d_Curve.hxx"\r
+ #include "Geom_Surface.hxx"\r
+-#include "GeomAPI_ProjectPointOnSurf.hxx"\r
+-#include "GeomAPI_ProjectPointOnCurve.hxx"\r
+ #include "TopoDS_Wire.hxx"\r
+ #include "BRepTools_WireExplorer.hxx"\r
+ #include "BRepTools.hxx"\r
+@@ -69,7 +65,7 @@\r
+ #include "IGESToBRep_Reader.hxx"\r
+ #include "Interface_Static.hxx"\r
+ #include "GeomAPI_ExtremaCurveCurve.hxx"\r
+-#include "Standard_ErrorHandler.hxx"\r
++//#include "Standard_ErrorHandler.hxx"\r
+ #include "Standard_Failure.hxx"\r
+ #include "ShapeUpgrade_ShellSewing.hxx"\r
+ #include "ShapeFix_Shape.hxx"\r
+@@ -84,11 +80,15 @@\r
+ #include "STEPControl_Writer.hxx"\r
+ #include "StlAPI_Writer.hxx"\r
+ #include "STEPControl_StepModelType.hxx"\r
++#include <NCollection_DataMap.hxx>\r
++\r
++class Handle_ShapeAnalysis_Surface;\r
++class BRepTopAdaptor_FClass2d;\r
\r
+ namespace netgen\r
+ {\r
\r
+-#include "../visualization/vispar.hpp"\r
++  //#include "../visualization/vispar.hpp"\r
+   //  class VisualizationParameters;\r
+   //  extern VisualizationParameters vispar;\r
\r
+@@ -159,6 +159,8 @@\r
+ class OCCGeometry\r
+ {\r
+   Point<3> center;\r
++  mutable NCollection_DataMap<int,Handle_ShapeAnalysis_Surface> fprjmap;\r
++  mutable NCollection_DataMap<int,BRepTopAdaptor_FClass2d*> fclsmap;\r
\r
+ public:\r
+   TopoDS_Shape shape;\r
+@@ -189,6 +191,7 @@\r
+     vmap.Clear();\r
+   }\r
\r
++  ~OCCGeometry();\r
\r
+   void BuildFMap();\r
\r
+@@ -204,10 +207,12 @@\r
+   Point<3> Center()\r
+   { return center; }\r
\r
+-  void Project (int surfi, Point<3> & p) const;\r
++  bool Project (int surfi, Point<3> & p, double& u, double& v) const;\r
+   bool FastProject (int surfi, Point<3> & ap, double& u, double& v) const;\r
\r
+- \r
++  void GetFaceTools(int surfi, Handle(ShapeAnalysis_Surface)& proj,\r
++                    BRepTopAdaptor_FClass2d*& cls) const;\r
++\r
+   OCCSurface GetSurface (int surfi)\r
+   {\r
+     cout << "OCCGeometry::GetSurface using PLANESPACE" << endl;\r
+diff -Nru netgen-4.5_orig/libsrc/occ/occmeshsurf.cpp netgen-4.5_patch/libsrc/occ/occmeshsurf.cpp\r
+--- netgen-4.5_orig/libsrc/occ/occmeshsurf.cpp 2006-01-25 15:36:26.000000000 +0300\r
++++ netgen-4.5_patch/libsrc/occ/occmeshsurf.cpp        2006-10-25 16:16:26.000000000 +0400\r
+@@ -5,6 +5,8 @@\r
+ #include <occgeom.hpp>\r
+ #include <meshing.hpp>\r
+ #include <GeomLProp_SLProps.hxx>\r
++#include <GeomAPI_ProjectPointOnSurf.hxx>\r
++#include <GeomAPI_ProjectPointOnCurve.hxx>\r
\r
\r
+ namespace netgen\r
+@@ -411,11 +413,16 @@\r
+   }\r
\r
\r
+-  void MeshOptimize2dOCCSurfaces :: ProjectPoint (INDEX surfind, Point3d & p) const\r
++  bool MeshOptimize2dOCCSurfaces :: ProjectPoint (INDEX surfind, Point3d & p, PointGeomInfo& gi) const\r
+   {\r
+     Point<3> hp = p;\r
+-    geometry.Project (surfind, hp);\r
++    bool ok;\r
++    if (gi.trignum > 0)\r
++      ok = geometry.FastProject (surfind, hp, gi.u, gi.v);\r
++    else\r
++      ok = geometry.Project (surfind, hp, gi.u, gi.v);\r
+     p = hp;\r
++    return ok;\r
+   }\r
\r
+   void MeshOptimize2dOCCSurfaces :: ProjectPoint2 (INDEX surfind, INDEX surfind2, \r
+@@ -506,38 +513,6 @@\r
+   }\r
\r
\r
+-  int MeshOptimize2dOCCSurfaces :: \r
+-  CalcPointGeomInfo(int surfind, PointGeomInfo& gi, const Point3d& p) const\r
+-  {\r
+-    Standard_Real u,v;\r
+-\r
+-    gp_Pnt pnt(p.X(), p.Y(), p.Z());\r
+-\r
+-    Handle(Geom_Surface) occface;\r
+-    occface = BRep_Tool::Surface(TopoDS::Face(geometry.fmap(surfind)));\r
+-\r
+-    GeomAPI_ProjectPointOnSurf proj(pnt, occface);\r
+-\r
+-    if (proj.NbPoints() < 1)\r
+-      {\r
+-      cout << "ERROR: OCCSurface :: GetNormalVector: GeomAPI_ProjectPointOnSurf failed!"\r
+-           << endl;\r
+-      cout << p << endl;\r
+-      return 0;\r
+-      }\r
+- \r
+-    proj.LowerDistanceParameters (u, v);  \r
+-\r
+-    gi.u = u;\r
+-    gi.v = v;\r
+-    return 1;\r
+-  }\r
+-\r
+-\r
+-\r
+-\r
+-\r
+-\r
+   OCCRefinementSurfaces :: OCCRefinementSurfaces (const OCCGeometry & ageometry)\r
+     : Refinement(), geometry(ageometry)\r
+   {\r
+@@ -627,10 +602,11 @@\r
+       if (!geometry.FastProject (surfi, hnewp, u, v))\r
+         {\r
+           cout << "Fast projection to surface fails! Using OCC projection" << endl;\r
+-          geometry.Project (surfi, hnewp);\r
++            double u, v;\r
++          geometry.Project (surfi, hnewp, u, v);\r
+         }\r
\r
+-      newgi.trignum = 1;\r
++      newgi.trignum = surfi;\r
+       }\r
+   \r
+     newp = hnewp;\r
+@@ -653,14 +629,17 @@\r
+     hnewp = Point<3> (pnt.X(), pnt.Y(), pnt.Z());\r
+     newp = hnewp;\r
+     newgi = ap1;\r
+-  };\r
++  }\r
\r
\r
+   void OCCRefinementSurfaces :: ProjectToSurface (Point<3> & p, int surfi)\r
+   {\r
+     if (surfi > 0)\r
+-      geometry.Project (surfi, p);\r
+-  };\r
++    {\r
++      double u, v;\r
++      geometry.Project (surfi, p, u, v);\r
++    }\r
++  }\r
\r
+   void OCCRefinementSurfaces :: ProjectToSurface (Point<3> & p, int surfi, PointGeomInfo & gi)\r
+   {\r
+@@ -668,9 +647,10 @@\r
+       if (!geometry.FastProject (surfi, p, gi.u, gi.v))\r
+       {\r
+         cout << "Fast projection to surface fails! Using OCC projection" << endl;\r
+-        geometry.Project (surfi, p);\r
++          double u, v;\r
++        geometry.Project (surfi, p, u, v);\r
+       }\r
+-  };\r
++  }\r
\r
\r
\r
+diff -Nru netgen-4.5_orig/libsrc/occ/occmeshsurf.hpp netgen-4.5_patch/libsrc/occ/occmeshsurf.hpp\r
+--- netgen-4.5_orig/libsrc/occ/occmeshsurf.hpp 2005-06-09 18:51:10.000000000 +0400\r
++++ netgen-4.5_patch/libsrc/occ/occmeshsurf.hpp        2006-10-25 16:17:22.000000000 +0400\r
+@@ -151,7 +151,7 @@\r
+     MeshOptimize2dOCCSurfaces (const OCCGeometry & ageometry); \r
+    \r
+     ///\r
+-    virtual void ProjectPoint (INDEX surfind, Point3d & p) const;\r
++    virtual bool ProjectPoint (INDEX surfind, Point3d & p, PointGeomInfo& gi) const;\r
+     ///\r
+     virtual void ProjectPoint2 (INDEX surfind, INDEX surfind2, Point3d & p) const;\r
+     ///\r
+@@ -159,9 +159,6 @@\r
+     ///\r
+     virtual void GetNormalVector(INDEX surfind, const Point3d & p, PointGeomInfo & gi, Vec3d & n) const;\r
\r
+-    \r
+-  virtual int CalcPointGeomInfo(int surfind, PointGeomInfo& gi, const Point3d& p3) const;\r
+-\r
+ };\r
\r
\r
+diff -Nru netgen-4.5_orig/libsrc/stlgeom/meshstlsurface.cpp netgen-4.5_patch/libsrc/stlgeom/meshstlsurface.cpp\r
+--- netgen-4.5_orig/libsrc/stlgeom/meshstlsurface.cpp  2006-01-11 18:08:20.000000000 +0300\r
++++ netgen-4.5_patch/libsrc/stlgeom/meshstlsurface.cpp 2006-10-25 16:17:47.000000000 +0400\r
+@@ -946,20 +946,23 @@\r
+ }\r
\r
\r
+-void MeshOptimizeSTLSurface :: ProjectPoint (INDEX surfind, Point3d & p) const\r
++bool MeshOptimizeSTLSurface :: ProjectPoint (INDEX surfind, Point3d & p, PointGeomInfo& gi) const\r
+ {\r
+   Point<3> hp = p;\r
+-  if (!geom.Project (hp))\r
++  if (gi.trignum > 0)\r
++    ((STLGeometry&)geom).SelectChartOfTriangle (gi.trignum);\r
++  if (!(gi.trignum = geom.Project (hp)))\r
+     {\r
+       PrintMessage(7,"project failed");\r
+       \r
+-      if (!geom.ProjectOnWholeSurface(hp)) \r
++      if (!(gi.trignum = geom.ProjectOnWholeSurface(hp))) \r
+       {\r
+         PrintMessage(7, "project on whole surface failed");\r
+       }\r
+     }\r
+   p = hp;\r
+   //  geometry.GetSurface(surfind)->Project (p);\r
++  return gi.trignum > 0;\r
+ }\r
\r
+ void MeshOptimizeSTLSurface :: ProjectPoint2 (INDEX surfind, INDEX surfind2, Point3d & p) const\r
+@@ -970,20 +973,6 @@\r
+   */\r
+ }\r
\r
+-int  MeshOptimizeSTLSurface :: CalcPointGeomInfo(PointGeomInfo& gi, const Point3d& p3) const\r
+-{\r
+-  Point<3> hp = p3;\r
+-  gi.trignum = geom.Project (hp);\r
+-\r
+-  if (gi.trignum)\r
+-    {\r
+-      return 1;\r
+-    }\r
+-\r
+-  return 0;\r
+-  \r
+-}\r
+-\r
+ void MeshOptimizeSTLSurface :: GetNormalVector(INDEX surfind, const Point3d & p, Vec3d & n) const\r
+ {\r
+   n = geom.GetChartNormalVector();\r
+diff -Nru netgen-4.5_orig/libsrc/stlgeom/meshstlsurface.hpp netgen-4.5_patch/libsrc/stlgeom/meshstlsurface.hpp\r
+--- netgen-4.5_orig/libsrc/stlgeom/meshstlsurface.hpp  2004-09-30 17:13:56.000000000 +0400\r
++++ netgen-4.5_patch/libsrc/stlgeom/meshstlsurface.hpp 2006-10-25 16:17:59.000000000 +0400\r
+@@ -79,12 +79,10 @@\r
+     virtual void SelectSurfaceOfPoint (const Point3d & p,\r
+                                      const PointGeomInfo & gi);\r
+     ///\r
+-    virtual void ProjectPoint (INDEX surfind, Point3d & p) const;\r
++    virtual bool ProjectPoint (INDEX surfind, Point3d & p, PointGeomInfo& gi) const;\r
+     ///\r
+     virtual void ProjectPoint2 (INDEX surfind, INDEX surfind2, Point3d & p) const;\r
+     ///\r
+-    virtual int CalcPointGeomInfo(PointGeomInfo& gi, const Point3d& p3) const;\r
+-    ///\r
+     virtual void GetNormalVector(INDEX surfind, const Point3d & p, Vec3d & n) const;\r
+ };\r
\r
+diff -Nru netgen-4.5_orig/makeForSalome.sh netgen-4.5_patch/makeForSalome.sh\r
+--- netgen-4.5_orig/makeForSalome.sh   1970-01-01 03:00:00.000000000 +0300\r
++++ netgen-4.5_patch/makeForSalome.sh  2006-04-27 13:12:54.000000000 +0400\r
+@@ -0,0 +1,31 @@\r
++#! /bin/sh\r
++cp ngtcltk/ngnewdelete.* libsrc/interface/\r
++\r
++MACHINE=LINUX\r
++export MACHINE\r
++make -C libsrc/csg\r
++make -C libsrc/general\r
++make -C libsrc/geom2d\r
++make -C libsrc/gprim\r
++make -C libsrc/interface\r
++make -C libsrc/linalg\r
++make -C libsrc/meshing\r
++make -C libsrc/opti\r
++make -C libsrc/stlgeom\r
++make -C libsrc/occ\r
++\r
++if [ ! -d install ] ; then\r
++      mkdir install\r
++fi\r
++\r
++cp -r lib install/\r
++\r
++if [ ! -d install/include ] ; then\r
++      mkdir install/include\r
++fi\r
++\r
++cp libsrc/interface/nglib.h libsrc/general/*.hpp libsrc/csg/*.hpp libsrc/geom2d/*.hpp \\r
++    libsrc/gprim/*.hpp libsrc/linalg/*.hpp libsrc/meshing/*.hpp \\r
++    libsrc/occ/*.hpp libsrc/opti/*.hpp libsrc/include/mydefs.hpp \\r
++    libsrc/stlgeom/*.hpp libsrc/include/mystdlib.h \\r
++    install/include\r
diff --git a/src/NETGEN/netgen45lib64.patch b/src/NETGEN/netgen45lib64.patch
new file mode 100755 (executable)
index 0000000..1593971
--- /dev/null
@@ -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 
+ #
index 10a67429405e405d8585c68456d67351f768fdd3..920838dd3019e9ea19f1e4038903ec0f737aaf41 100644 (file)
@@ -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 (executable)
index 0000000..03bdc4e
--- /dev/null
@@ -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
index d5f43cd4230c52ea9b1bbb2695c7e391e50882cf..bda25085d9fe8e735b98aa5d24043c03e893d993 100644 (file)
 // $Header$
 //=============================================================================
 
-using namespace std;
 #include <NETGENPlugin_Hypothesis.hxx>
 #include <utilities.h>
 
+using namespace std;
+
 //=============================================================================
 /*!
  *  
index 01a4c3eb4a90f3f0cd7cd9f984a236274524aea0..f52504b29b66286357b259e6f20260b2ddee0c12 100644 (file)
 #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
index 46f89efef8003814afe910237605ca81acd0e27f..0b157fcbb0f99d1ec768fa8abf542270193ad708 100644 (file)
 // $Header$
 //=============================================================================
 
-using namespace std;
 #include <NETGENPlugin_Hypothesis_2D.hxx>
 #include <utilities.h>
 
+using namespace std;
+
 //=============================================================================
 /*!
  *  
index a9b0acd18c9317ce8e1e529ca796733b8e954745..5b6d1ebf6130490ea8b69d0a531b7dba31dffda5 100644 (file)
@@ -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:
 
index 36ed6672e505a7804c1abfa90b9d34f5dcff7d21..baabaebca5f1e40bffae1c50ba66704dde3b7f0e 100644 (file)
@@ -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
index 1df8e195f917768b03c0412eec51e579e0f43744..44b8db20b1ecd958467ccd3cd3b6b70f0ab7d55f 100644 (file)
@@ -29,6 +29,8 @@
 #ifndef _NETGENPlugin_Hypothesis_2D_i_HXX_
 #define _NETGENPlugin_Hypothesis_2D_i_HXX_
 
+#include "NETGENPlugin_Defs.hxx"
+
 #include <SALOMEconfig.h>
 #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
 {
index 313fe31c10065080e993698d1a3f1b56c5b6595e..9836d2cfe28b10e5f33a2bb04e58dbfd615b58b0 100644 (file)
@@ -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
index edde2312147edb9a52a27fb8d7dfd25c90529e52..66516170c8bb97e243cbb87b966eca4363deb1e0 100644 (file)
@@ -29,6 +29,8 @@
 #ifndef _NETGENPlugin_Hypothesis_i_HXX_
 #define _NETGENPlugin_Hypothesis_i_HXX_
 
+#include "NETGENPlugin_Defs.hxx"
+
 #include <SALOMEconfig.h>
 #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
 {
index 09c51aa1d3f582f761fa640abbc7f082e14a3198..83fd8de18b03b6c49828f1a5ea78366589257161 100644 (file)
@@ -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<const NETGENPlugin_Hypothesis_2D*>
+      mparams.quad = static_cast<const NETGENPlugin_Hypothesis_2D*>
         (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);
index 4d09177ef180bb2ce463bd3bb4308acadb87cf18..81c30e816aa7c3a021aabc0cdf1b258f47f0d5d7 100644 (file)
@@ -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 ----------
index fcf41532b44d603af6fac2ca5a3ee93a535f7424..677e2896a9a02b867472e15573f8742ed3ea3107 100644 (file)
@@ -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 <list>
 
+using namespace std;
+
 //=============================================================================
 /*!
  *  
index aafcb2e4e2b804f927e35d834fc9fe697fab52e7..1b3fdf2f157ff91947ee5e5d46f776605bd4dc2b 100644 (file)
@@ -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);
index 0f392c1a2f08eaefeb3eebbb9ead6905281ee2cd..c10e6b3181fd8ce72d93058cc61474019bdf937d 100644 (file)
@@ -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 <list>
 
+using namespace std;
+
 //=============================================================================
 /*!
  *  
index 169cb15a0e9fbfc066d84a3b8d587b44a3f21094..89c7a61b74423711c905f80264b5c90a840f27ee 100644 (file)
@@ -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);
index accbeafb3776464838a05e413ec45fdfc8038de0..e0afd748415f9b5c1bdcd4804105dcc369abd0ed 100644 (file)
 //  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
index dc8f6d8f339b2f842eb326c371a502a554c5b2bd..a6483d389fca707fd124a26b6f213622b6ffa746 100644 (file)
@@ -27,6 +27,8 @@
 #ifndef _NETGENPlugin_NETGEN_2D3D_I_HXX_
 #define _NETGENPlugin_NETGEN_2D3D_I_HXX_
 
+#include "NETGENPlugin_Defs.hxx"
+
 #include <SALOMEconfig.h>
 #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
 {
index 060af2ec21fae0102290921f3fe4dab15774c516..0ba4c91a87f268c4ece5753d992220282716f4fa 100644 (file)
 //  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
index af8e9fe75a4719ffd6bbfb8a7117335434c1b69b..c574225292b0cc1528199574089b72ae6a24f2a2 100644 (file)
@@ -27,6 +27,8 @@
 #ifndef _NETGENPlugin_NETGEN_2D_I_HXX_
 #define _NETGENPlugin_NETGEN_2D_I_HXX_
 
+#include "NETGENPlugin_Defs.hxx"
+
 #include <SALOMEconfig.h>
 #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
 {
index c9031d88c7a75a0af4b065a186f241e37b9bb90b..107d112a42bfb7b369ca8952124cf1bb454a201c 100644 (file)
@@ -26,8 +26,6 @@
 // Copyright : CEA 2003
 // $Header$
 //=============================================================================
-using namespace std;
-
 #include "NETGENPlugin_NETGEN_3D.hxx"
 
 #include "SMESH_Gen.hxx"
index e0d39f3bd37e4fd27e44ed1c314ec8333eb75319..77d048871390d210c501cc07111f488250169490 100644 (file)
 // 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);
index 0429bc9c191b296e9e686c5a066bc7371af9d438..53f1f4cf148b91616208511f46b28c9fca8fda24 100644 (file)
 //  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
index 08e01019c3bee282b3bfaf6af21ceee67524ea85..9fac5f3ef77edd5d1848879dbb655eeadcd3a3d4 100644 (file)
@@ -30,6 +30,8 @@
 #ifndef _NETGENPlugin_NETGEN_3D_I_HXX_
 #define _NETGENPlugin_NETGEN_3D_I_HXX_
 
+#include "NETGENPlugin_Defs.hxx"
+
 #include <SALOMEconfig.h>
 #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
 {
index 720ba0a9ca7031d27144d54dfb3c6f8c37f18d83..0f01ec2b01fdd17112b703fba2a64c4a0e740832 100644 (file)
@@ -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 T> class NETGENPlugin_Creator_i:public HypothesisCreator_i<T>
 
 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 (file)
index 0000000..a3f6297
--- /dev/null
@@ -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 <EMAIL@ADDRESS>\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"