diff --git a/INSTALL b/INSTALL
index 1834a89..e1da349 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,5 +1 @@
-This is the version 3.2.0a1 of NETGENPLUGIN
-Compatible with :
- - KERNEL 3.2.0a1
- - SALOMEGUI 3.2.0a1
- - SMESH 3.2.0a1
+SALOME2 : NETGENPLUGIN module (SMESH plugin)
diff --git a/Makefile.in b/Makefile.in
index bc00cd6..216b2a0 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,3 +1,22 @@
+# 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
+#
# -* Makefile *-
#
# Author : Patrick GOLDBRONN (CEA)
@@ -9,27 +28,43 @@
top_srcdir=@top_srcdir@
top_builddir=.
srcdir=@srcdir@
-VPATH=.:@srcdir@:@top_srcdir@/bin:@top_srcdir@/resources:./bin:@top_srcdir@/idl
+VPATH=.:@srcdir@:@top_srcdir@/bin:./bin/salome:@top_srcdir@/resources:./bin:@top_srcdir@/idl
@COMMENCE@
-SUBDIRS = idl src
+SUBDIRS = idl src adm_local
-RESOURCES_FILES = NETGENPlugin.xml
+RESOURCES_FILES = \
+ NETGENPlugin.xml \
+ mesh_hypo_netgen.png \
+ mesh_hypo_netgen_2d.png \
+ mesh_algo_netgen_2d3d.png \
+ mesh_algo_netgen_2d.png \
+ mesh_tree_hypo_netgen.png \
+ mesh_tree_hypo_netgen_2d.png \
+ mesh_tree_algo_netgen_2d3d.png \
+ mesh_tree_algo_netgen_2d.png
BIN_SCRIPT = VERSION
# copy header files in common directory ------------
-ifeq ($(HAVE_SSTREAM),yes)
- include_list=include/salome/SALOMEconfig.h
-else
- include_list=include/salome/SALOMEconfig.h include/salome/sstream
+include_list = include/salome/SALOMEconfig.h \
+ include/salome/NETGENPLUGIN_version.h
+
+ifneq ($(HAVE_SSTREAM),yes)
+ include_list += include/salome/sstream
endif
inc: idl $(include_list)
+bin: bin/salome/VERSION
+
+bin/salome/VERSION : bin/VERSION
+ -$(RM) $@
+ $(LN_S) ../../$< $@
+
include/salome/SALOMEconfig.h: salome_adm/unix/SALOMEconfig.ref
-$(RM) $@
$(LN_S) ../../$< $@
@@ -47,6 +82,18 @@ include/salome/sstream: salome_adm/unix/sstream
-$(RM) $@
$(LN_S) ../../$< $@
+include/salome/NETGENPLUGIN_version.h: NETGENPLUGIN_version.h
+ -$(RM) $@
+ $(LN_S) ../../$< $@
+
+install-include: $(include_list)
+ $(INSTALL) -d $(includedir)
+ @for f in X $(include_list); do \
+ if test $$f != X; then \
+ ($(INSTALL_DATA) -p $$f $(includedir)/. || exit 1); \
+ fi; \
+ done
+
# install script in $(bindir) :
install-bin: $(BIN_SCRIPT)
$(INSTALL) -d $(bindir)
@@ -66,4 +113,4 @@ distclean-other:
@MODULE@
-install: install-bin
+install: install-bin install-include
diff --git a/adm_local/unix/make_commence.in b/adm_local/unix/make_commence.in
index 2d39b96..19336a2 100644
--- a/adm_local/unix/make_commence.in
+++ b/adm_local/unix/make_commence.in
@@ -105,6 +105,7 @@ OCC_VIEWER_LIBS=@CAS_VIEWER@
OCC_MODELER_LIBS=@CAS_MODELER@
OCC_DATAEXCHANGE_LIBS=@CAS_DATAEXCHANGE@
OCC_LIBS=@CAS_LDFLAGS@
+OCC_LDPATH=@CAS_LDPATH@
# MPICH
@@ -234,7 +235,13 @@ all:
Makefile: $(top_builddir)/config.status $(srcdir)/Makefile.in
cd $(top_builddir) ; ./config.status
-$(top_builddir)/config.status: $(top_srcdir)/configure
+LOCAL_MAKE = make_commence make_omniorb
+
+KERNEL_MAKE = make_module make_conclude depend SALOMEconfig.h F77config.h sstream envScript
+
+$(top_builddir)/config.status: $(top_srcdir)/configure \
+ $(LOCAL_MAKE:%=$(top_srcdir)/adm_local/unix/%.in) \
+ $(KERNEL_MAKE:%=$(KERNEL_ROOT_DIR)/salome_adm/unix/%.in)
cd $(top_builddir) ; ./config.status --recheck
# VPATH contain $(srcdir), so make configure is good in top_srcdir and we must add target configure otherwise :-)
@@ -249,19 +256,33 @@ $(top_srcdir)/configure.in: $(top_srcdir)/configure.in.base
cd $(top_srcdir) && ./build_configure
-ACLOCAL_SRC = \
-ac_cxx_bool.m4 check_corba.m4 check_vtk.m4 \
+ACLOCAL_KERNEL = \
+ac_cxx_bool.m4 check_corba.m4 \
ac_cxx_depend_flag.m4 check_hdf5.m4 enable_pthreads.m4 \
ac_cxx_mutable.m4 check_mico.m4 libtool.m4 \
ac_cxx_namespaces.m4 check_omniorb.m4 pyembed.m4 \
-ac_cxx_partial_specialization.m4 check_opengl.m4 python.m4 \
+ac_cxx_partial_specialization.m4 python.m4 \
ac_cxx_typename.m4 check_pthreads.m4 check_cas.m4 \
-ac_cc_warnings.m4 check_qt.m4 check_swig.m4 \
-check_boost.m4
+ac_cc_warnings.m4 check_swig.m4 check_boost.m4
#ifeq (@WITHNETGEN@,yes)
# ACLOCAL_SRC += check_Netgen.m4
#endif
-$(top_srcdir)/aclocal.m4: $(ACLOCAL_SRC:%=@KERNEL_ROOT_DIR@/salome_adm/unix/config_files/%)
- cd $(top_srcdir) ; aclocal --acdir=adm_local/unix/config_files -I @KERNEL_ROOT_DIR@/salome_adm/unix/config_files
+ACLOCAL_GUI = \
+check_vtk.m4 check_opengl.m4 check_qt.m4 \
+check_GUI.m4 check_corba_in_GUI.m4
+
+ACLOCAL_GEOM = check_GEOM.m4
+
+ACLOCAL_SMESH = check_SMESH.m4
+
+$(top_srcdir)/aclocal.m4: $(ACLOCAL_KERNEL%=@KERNEL_ROOT_DIR@/salome_adm/unix/config_files/%) \
+ $(ACLOCAL_GUI:%=@GUI_ROOT_DIR@/adm_local/unix/config_files/%) \
+ $(ACLOCAL_GEOM:%=@GEOM_ROOT_DIR@/adm_local/unix/config_files/%) \
+ $(ACLOCAL_SMESH:%=@SMESH_ROOT_DIR@/adm_local/unix/config_files/%)
+ cd $(top_srcdir) ; aclocal -I adm_local/unix/config_files -I @KERNEL_ROOT_DIR@/salome_adm/unix/config_files \
+ -I @GUI_ROOT_DIR@/adm_local/unix/config_files \
+ -I @GEOM_ROOT_DIR@/adm_local/unix/config_files \
+ -I @SMESH_ROOT_DIR@/adm_local/unix/config_files
+
diff --git a/bin/VERSION b/bin/VERSION
deleted file mode 100755
index ef7decd..0000000
--- a/bin/VERSION
+++ /dev/null
@@ -1 +0,0 @@
-THIS IS SALOME - NETGENPLUGIN VERSION: 3.2.0a1
diff --git a/build_configure b/build_configure
index 7a78b87..cf7d322 100755
--- a/build_configure
+++ b/build_configure
@@ -26,6 +26,38 @@ fi
# echo "failed : KERNEL_SRC variable is not correct !"
# exit
#fi
+########################################################################
+# Test if the GUI_ROOT_DIR is set correctly
+
+if test ! -d "${GUI_ROOT_DIR}"; then
+ echo "failed : GUI_ROOT_DIR variable is not correct !"
+ exit
+fi
+
+########################################################################
+# Test if the MED_ROOT_DIR is set correctly
+
+if test ! -d "${MED_ROOT_DIR}"; then
+ echo "failed : MED_ROOT_DIR variable is not correct !"
+ exit
+fi
+
+########################################################################
+# Test if the GEOM_ROOT_DIR is set correctly
+
+if test ! -d "${GEOM_ROOT_DIR}"; then
+ echo "failed : GEOM_ROOT_DIR variable is not correct !"
+ exit
+fi
+
+########################################################################
+# Test if the SMESH_ROOT_DIR is set correctly
+
+if test ! -d "${SMESH_ROOT_DIR}"; then
+ echo "failed : SMESH_ROOT_DIR variable is not correct !"
+ exit
+fi
+
########################################################################
# find_in - utility function
#
@@ -125,9 +157,9 @@ echo " ./salome_adm/unix/SALOMEconfig.h \\" >> configure.in_tmp1
echo " ./salome_adm/unix/F77config.h \\" >> configure.in_tmp1
echo " ./salome_adm/unix/sstream \\" >> configure.in_tmp1
echo " ./salome_adm/unix/depend \\" >> configure.in_tmp1
-echo " ./adm_local/unix/make_omniorb \\" >> configure.in_tmp1
+echo " ./adm_local/unix/make_omniorb:${ABS_CONF_DIR}/adm_local/unix/make_omniorb.in \\" >> configure.in_tmp1
echo " ./salome_adm/unix/envScript \\" >> configure.in_tmp1
-echo " ./adm_local/unix/make_commence \\" >> configure.in_tmp1
+echo " ./adm_local/unix/make_commence:${ABS_CONF_DIR}/adm_local/unix/make_commence.in \\" >> configure.in_tmp1
echo " ./salome_adm/unix/make_conclude \\" >> configure.in_tmp1
echo " ./salome_adm/unix/make_module \\" >> configure.in_tmp1
@@ -203,7 +235,11 @@ else
echo -n "Creating 'configure' script ... "
fi
-aclocal --acdir=adm_local/unix/config_files -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files
+aclocal -I adm_local/unix/config_files -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files \
+ -I ${GUI_ROOT_DIR}/adm_local/unix/config_files \
+ -I ${MED_ROOT_DIR}/adm_local/unix/config_files \
+ -I ${GEOM_ROOT_DIR}/adm_local/unix/config_files \
+ -I ${SMESH_ROOT_DIR}/adm_local/unix/config_files
if autoconf
then
echo "done"
diff --git a/configure.in.base b/configure.in.base
index 10b05f1..42a557a 100644
--- a/configure.in.base
+++ b/configure.in.base
@@ -22,8 +22,10 @@ AC_CANONICAL_HOST
PACKAGE=salome
AC_SUBST(PACKAGE)
-VERSION=0.0.1
+VERSION=3.2.0
+XVERSION=0x030200
AC_SUBST(VERSION)
+AC_SUBST(XVERSION)
dnl
dnl Initialize source and build root directories
@@ -257,6 +259,26 @@ echo
CHECK_HTML_GENERATORS
+echo
+echo ---------------------------------------------
+echo Testing GUI
+echo ---------------------------------------------
+echo
+
+CHECK_SALOME_GUI
+
+echo
+echo ---------------------------------------------
+echo Testing full GUI
+echo ---------------------------------------------
+echo
+
+CHECK_CORBA_IN_GUI
+if test "x${CORBA_IN_GUI}" != "xyes"; then
+ echo "failed : For configure NETGENPLUGIN module necessary full GUI !"
+ exit
+fi
+
echo
echo ---------------------------------------------
echo Testing Kernel
diff --git a/idl/Makefile.in b/idl/Makefile.in
index f5aac86..980cd86 100644
--- a/idl/Makefile.in
+++ b/idl/Makefile.in
@@ -1,3 +1,22 @@
+# 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
+#
#
# generate dependencies for idl file :
#
diff --git a/idl/NETGENPlugin_Algorithm.idl b/idl/NETGENPlugin_Algorithm.idl
index d8d0263..ffee6c4 100644
--- a/idl/NETGENPlugin_Algorithm.idl
+++ b/idl/NETGENPlugin_Algorithm.idl
@@ -15,7 +15,7 @@
// 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
//
//
@@ -40,6 +40,56 @@ module NETGENPlugin
{
};
+ /*!
+ * NETGENPlugin_NETGEN_2D: interface of "1D-2D (Netgen)" algorithm
+ */
+ interface NETGENPlugin_NETGEN_2D : SMESH::SMESH_2D_Algo
+ {
+ };
+
+ /*!
+ * NETGENPlugin_NETGEN_2D3D: interface of "1D-2D-3D (Netgen)" algorithm
+ */
+ interface NETGENPlugin_NETGEN_2D3D : SMESH::SMESH_3D_Algo
+ {
+ };
+
+ /*!
+ * NETGENPlugin_Hypothesis: interface of "NETGEN parameters" hypothesis
+ */
+ interface NETGENPlugin_Hypothesis : SMESH::SMESH_Hypothesis
+ {
+ void SetMaxSize(in double value);
+ double GetMaxSize();
+
+ void SetSecondOrder(in boolean value);
+ boolean GetSecondOrder();
+
+ void SetOptimize(in boolean value);
+ boolean GetOptimize();
+
+ void SetFineness(in long value);
+ long GetFineness();
+
+ void SetGrowthRate(in double value);
+ double GetGrowthRate();
+
+ void SetNbSegPerEdge(in double value);
+ double GetNbSegPerEdge();
+
+ void SetNbSegPerRadius(in double value);
+ double GetNbSegPerRadius();
+ };
+
+ /*!
+ * NETGENPlugin_Hypothesis_2D: interface of "NETGEN 2D parameters" hypothesis
+ */
+ interface NETGENPlugin_Hypothesis_2D : NETGENPlugin_Hypothesis
+ {
+ void SetQuadAllowed(in boolean value);
+ boolean GetQuadAllowed();
+ };
+
};
#endif
diff --git a/resources/NETGENPlugin.xml b/resources/NETGENPlugin.xml
index 951d4bf..1a32055 100644
--- a/resources/NETGENPlugin.xml
+++ b/resources/NETGENPlugin.xml
@@ -8,11 +8,34 @@
+ gui-lib="NETGENPluginGUI">
+
+
+
+
+
+
diff --git a/resources/mesh_algo_netgen_2d.png b/resources/mesh_algo_netgen_2d.png
index 2629a2b..08e38b1 100644
Binary files a/resources/mesh_algo_netgen_2d.png and b/resources/mesh_algo_netgen_2d.png differ
diff --git a/resources/mesh_algo_netgen_2d3d.png b/resources/mesh_algo_netgen_2d3d.png
index 2629a2b..08e38b1 100644
Binary files a/resources/mesh_algo_netgen_2d3d.png and b/resources/mesh_algo_netgen_2d3d.png differ
diff --git a/resources/mesh_hypo_netgen.png b/resources/mesh_hypo_netgen.png
index 3fb67d5..cd41543 100644
Binary files a/resources/mesh_hypo_netgen.png and b/resources/mesh_hypo_netgen.png differ
diff --git a/resources/mesh_hypo_netgen_2d.png b/resources/mesh_hypo_netgen_2d.png
index 487fdb7..567e61c 100644
Binary files a/resources/mesh_hypo_netgen_2d.png and b/resources/mesh_hypo_netgen_2d.png differ
diff --git a/resources/mesh_tree_algo_netgen_2d.png b/resources/mesh_tree_algo_netgen_2d.png
index 092eae3..81d2659 100755
Binary files a/resources/mesh_tree_algo_netgen_2d.png and b/resources/mesh_tree_algo_netgen_2d.png differ
diff --git a/resources/mesh_tree_algo_netgen_2d3d.png b/resources/mesh_tree_algo_netgen_2d3d.png
index eeaf98a..99a84a1 100644
Binary files a/resources/mesh_tree_algo_netgen_2d3d.png and b/resources/mesh_tree_algo_netgen_2d3d.png differ
diff --git a/resources/mesh_tree_hypo_netgen.png b/resources/mesh_tree_hypo_netgen.png
index ad5e9f3..43bd81e 100644
Binary files a/resources/mesh_tree_hypo_netgen.png and b/resources/mesh_tree_hypo_netgen.png differ
diff --git a/resources/mesh_tree_hypo_netgen_2d.png b/resources/mesh_tree_hypo_netgen_2d.png
index cd813c8..c72e4af 100644
Binary files a/resources/mesh_tree_hypo_netgen_2d.png and b/resources/mesh_tree_hypo_netgen_2d.png differ
diff --git a/src/Makefile.in b/src/Makefile.in
index 6b66e77..e171c7a 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -15,7 +15,7 @@
# 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
#
#
@@ -31,6 +31,6 @@ VPATH=.:@srcdir@
@COMMENCE@
-SUBDIRS = NETGEN NETGENPlugin
+SUBDIRS = NETGEN NETGENPlugin GUI
@MODULE@
diff --git a/src/NETGEN/Makefile.in b/src/NETGEN/Makefile.in
index e2092a8..4ca3df1 100644
--- a/src/NETGEN/Makefile.in
+++ b/src/NETGEN/Makefile.in
@@ -1,3 +1,22 @@
+# 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
+#
# -* Makefile *-
#
# Author : Edward AGAPOV (OCC)
@@ -21,24 +40,26 @@ LIB = libNETGEN.la
LIB_OBJ_O = \
linopt.o bfgs.o linsearch.o global.o bisect.o meshtool.o refine.o ruler3.o \
- improve3.o adfront3.o tetrarls.o prism2rls.o pyramidrls.o pyramid2rls.o \
- netrule3.o ruler2.o meshclass.o improve2.o adfront2.o netrule2.o triarls.o \
- geomsearch.o secondorder.o meshtype.o parser3.o quadrls.o specials.o parser2.o \
- meshing2.o meshing3.o meshfunc.o localh.o improve2gen.o delaunay.o boundarylayer.o \
- msghandler.o meshfunc2d.o smoothing2.o smoothing3.o topology.o curvedelems.o \
- clusters.o zrefine.o ngexception.o geomtest3d.o geom2d.o geom3d.o adtree.o \
- transform3d.o geomfuncs.o polynomial.o densemat.o vector.o basemat.o sparsmat.o \
- algprim.o brick.o manifold.o bspline2d.o meshsurf.o csgeom.o polyhedra.o curve2d.o \
- singularref.o edgeflw.o solid.o explicitcurve2d.o specpoin.o gencyl.o revolution.o \
- genmesh.o spline3d.o surface.o identify.o triapprox.o meshstlsurface.o stlline.o \
- stltopology.o stltool.o stlgeom.o stlgeomchart.o stlgeommesh.o table.o optmem.o \
- spbita2d.o hashtabl.o sort.o flags.o seti.o bitarray.o array.o symbolta.o mystring.o \
- moveablemem.o spline2d.o splinegeometry2.o ngnewdelete.o nglib.o
+ 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
NETGEN_LIBS_DIR=@NETGEN_LIBS_DIR@
$(LIB_OBJ_O):
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
@@ -47,7 +68,7 @@ $(LIB_OBJ_O):
ar x $(NETGEN_LIBS_DIR)/libla.a
ar x $(NETGEN_LIBS_DIR)/libstlgeom.a
ar x $(NETGEN_LIBS_DIR)/libgeom2d.a
- rm -rf sgparser.o hprefinement.o parthreads.o writediffpack.o writepermas.o writeuser.o dynamicmem.o importsolution.o readuser.o writefeap.o writetecplot.o wuchemnitz.o extrusion.o writeabaqus.o writefluent.o writetochnog.o csgparser.o geom2dmesh.o
+ rm -rf 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
LIB_OBJ_LO = $(LIB_OBJ_O:%.o=%.lo)
@@ -62,4 +83,6 @@ else
LDFLAGS += -lg2c
endif
+LDFLAGS += $(OCC_LDPATH) -lTKBRep -lTKShHealing -lTKSTEP -lTKXSBase -lTKIGES
+
MOSTLYCLEAN += $(LIB_OBJ_O)
diff --git a/src/NETGEN/ReadMeForNgUsers b/src/NETGEN/ReadMeForNgUsers
index 555eb97..4abb2b1 100644
--- a/src/NETGEN/ReadMeForNgUsers
+++ b/src/NETGEN/ReadMeForNgUsers
@@ -1,102 +1,78 @@
-The Netgen 4.3 from the web location : http://www.hpfem.jku.at/netgen/ is used
-in the SMESH Module of Salome2 distribution.
+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
------------------------------
-Patch the official netgen 4.3 distribution:
+Patch the netgen 4.5 distribution:
-$ cd netgen43
-$ patch -p1 < patch_directory/netgen43ForSalome.patch
+$ cd netgen45
+$ patch -p1 < patch_directory/netgen45ForSalome.patch
-Then run makeForSalome.sh:
+Then run makeForSalome.sh (it will be created by the patch):
$ sh makeForSalome.sh
Additional information for maintainers
--------------------------------------
-The SMESH Engine of SALOME2 (particularly the m4 file check_Netgen.m4) assume
+The file check_NETGENPLUGIN.m4 assumes
that Netgen is installed in the directory as follow:
prompt> ls
-bin/ cshrc_for_netgen doc/ include/ lib/ tutorials/
+include/ lib/
-prompt> ls /bin
+prompt> ls /include
+
+adfront2.hpp explicitcurve2d.hpp hpref_quad.hpp myadt.hpp spbita2d.hpp
+adfront3.hpp extrusion.hpp hpref_segm.hpp mydefs.hpp specials.hpp
+adtree.hpp findip.hpp hpref_tet.hpp mystdlib.h specpoin.hpp
+algprim.hpp findip2.hpp hpref_trig.hpp mystring.hpp spline.hpp
+array.hpp flags.hpp hprefinement.hpp ngexception.hpp spline2d.hpp
+autoptr.hpp gencyl.hpp identify.hpp nglib.h spline3d.hpp
+basemat.hpp geom2d.hpp improve2.hpp occgeom.hpp splinegeometry.hpp
+bisect.hpp geom2dmesh.hpp improve3.hpp occmeshsurf.hpp splinegeometry2.hpp
+bitarray.hpp geom3d.hpp linalg.hpp opti.hpp stack.hpp
+boundarylayer.hpp geometry2d.hpp localh.hpp optmem.hpp stlgeom.hpp
+brick.hpp geomfuncs.hpp manifold.hpp parthreads.hpp stlline.hpp
+classifyhpel.hpp geoml.hpp meshclass.hpp polyhedra.hpp stltool.hpp
+clusters.hpp geomobjects.hpp meshfunc.hpp polynomial.hpp stltopology.hpp
+csg.hpp geomops.hpp meshing.hpp profiler.hpp surface.hpp
+csgeom.hpp geomsearch.hpp meshing2.hpp revolution.hpp symbolta.hpp
+csgparser.hpp geomtest3d.hpp meshing3.hpp ruler2.hpp table.hpp
+curve2d.hpp global.hpp meshstlsurface.hpp ruler3.hpp template.hpp
+curvedelems.hpp gprim.hpp meshsurf.hpp seti.hpp topology.hpp
+curvedelems_new.hpp hashtabl.hpp meshtool.hpp singularref.hpp transform3d.hpp
+densemat.hpp hpref_hex.hpp meshtype.hpp solid.hpp triapprox.hpp
+dynamicmem.hpp hpref_prism.hpp moveablemem.hpp sort.hpp vector.hpp
+edgeflw.hpp hpref_pyramid.hpp msghandler.hpp sparsmat.hpp
+
+prompt> ls /lib
LINUX/
-prompt> ls /bin/LINUX/
+prompt> ls /lib/LINUX
-demoapp/ ng ng.tcl ngtcltk/ startup.tcl
+libcsg.a libgeom2d.a libla.a libnginterface.a libopti.a
+libgen.a libgprim.a libmesh.a libocc.a libstlgeom.a
-prompt> ls /bin/LINUX/demoapp/
-
-demoapp.tcl
-
-prompt> ls /bin/LINUX/ngtcltk/
-
-dialog.tcl menustat.tcl ngicon.tcl parameters.tcl
-drawing.tcl nghelp.tcl ngvisual.tcl variables.tcl
-
-prompt> ls /doc/
-
-ng4.pdf usenetgen.ps
-
-prompt> ls /include/
-
-nglib.h
-
-prompt> ls /lib/
-
-LINUX/
-
-prompt> ls /lib/LINUX/
-
-libcsg.a libgeom2d.a libla.a libnginterface.a libstlgeom.a
-libgen.a libgprim.a libmesh.a libopti.a libvis.a
-
-prompt> ls /tutorials/
-
-boxcyl.geo cylinder.geo ficherea.geo part1.stl square.in2d
-cone.geo cylsphere.geo hinge.stl sculpture.geo trafo.geo
-cubeandspheres.geo demo2d.in2d lshape3d.geo shaft.geo twobricks.geo
-cube.geo ellipsoid.geo manyholes.geo sphere.geo twocubes.geo
-cubemcyl.geo ellipticcyl.geo matrix.geo sphereincube.geo twocyl.geo
-cubemsphere.geo
-
-All *.tcl files are needed to control and initiate the Netgen mesher throughout its
-MHI (Machine Human Interface)./bin/LINUX/ng is the Netgen
-executable with its embarked MHI. All the libraries *.a should be compiled without
-the option -DOPENGL which is only needed for the Netgen MHI. netgen43 is assumed to
-be the directory downloaded from the above web location archive of Netgen. The library
+All the libraries *.a should be compiled without the option -DOPENGL.
+netgen45 is assumed to be the directory downloaded from the above web
+location archive of Netgen. The library
/lib/LINUX/libnginterface.a should contain the objects
-nglib.o (from netgen43/libsrc/interface/nglib.cpp) and ngnewdelete.o
-(from netgen43/ngtcltk/ngnewdelete.cpp).
+nglib.o (from netgen45/libsrc/interface/nglib.cpp) and ngnewdelete.o
+(from netgen45/ngtcltk/ngnewdelete.cpp).
To have that kind of distribution from the version in the above web location you
-should first compile Netgen as suggested in the netgen43/README.INSTALL file. It will
-then produce the executable ng linked statically with the libraries *.a. Then modify
-the Makefiles to remove -DOPENGL from compiler flags list, add the objects nglib.o
-and ngnewdelete.o to the library libnginterface.a and recompile the libraries only.
+need not to compile Netgen as suggested in the netgen45/README.INSTALL file.
+Simply modify the Makefiles to remove -DOPENGL from compiler flags
+list and to add OCC include dir and flags to compiler flags, add the objects
+nglib.o and ngnewdelete.o to the library libnginterface.a and
+recompile the libraries only.
+All this job is done by applying the patch and running the script makeForSalome.sh.
-From the above web location perhaps, you will have to alter some Netgen sources to
-compile them; if you find any difficulties to do that, just ask me.
+Th suggested patch alters some Netgen sources to compile them.
-Nadir
-
-********************************
-* Dr Nadir Bouhamou *
-* Ingénieur-chercheur *
-* Engineer-Researcher *
-* *
-* CEA Saclay *
-* DEN/DM2S/SFME/LGLS *
-* Bat 454 Pièce 5A *
-* 91191 Gif-Sur-Yvette cédex *
-* *
-* Tél: +33 (0)1 69 08 73 07 *
-* Fax: +33 (0)1 69 08 96 96 *
-* email: nadir.bouhamou@cea.fr *
-********************************
+Michael SAZONOV
+m-sazonov@opencascade.com
diff --git a/src/NETGENPlugin/Makefile.in b/src/NETGENPlugin/Makefile.in
index c33380d..10a6742 100644
--- a/src/NETGENPlugin/Makefile.in
+++ b/src/NETGENPlugin/Makefile.in
@@ -1,3 +1,22 @@
+# 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
+#
# -* Makefile *-
#
# Author : Edward AGAPOV (OCC)
@@ -10,20 +29,32 @@
top_srcdir=@top_srcdir@
top_builddir=../..
srcdir=@srcdir@
-VPATH=.:@srcdir@
+VPATH=.:@srcdir@:@top_srcdir@/idl:$(top_builddir)/idl:${KERNEL_ROOT_DIR}/idl/salome:${GUI_ROOT_DIR}/idl/salome:${GEOM_ROOT_DIR}/idl/salome:${SMESH_ROOT_DIR}/idl/salome:${MED_ROOT_DIR}/idl/salome
@COMMENCE@
-# .po files to transform in .qm
-PO_FILES = NETGENPlugin_icons.po
-
LIB_SRC = \
NETGENPlugin_NETGEN_3D.cxx \
NETGENPlugin_NETGEN_3D_i.cxx \
+ NETGENPlugin_NETGEN_2D.cxx \
+ NETGENPlugin_NETGEN_2D_i.cxx \
+ NETGENPlugin_NETGEN_2D3D.cxx \
+ NETGENPlugin_NETGEN_2D3D_i.cxx \
+ NETGENPlugin_Hypothesis.cxx \
+ NETGENPlugin_Hypothesis_i.cxx \
+ NETGENPlugin_Hypothesis_2D.cxx \
+ NETGENPlugin_Hypothesis_2D_i.cxx \
+ NETGENPlugin_Mesher.cxx \
NETGENPlugin_i.cxx
LIB_SERVER_IDL = NETGENPlugin_Algorithm.idl
+LIB_CLIENT_IDL = \
+ SALOME_Component.idl \
+ SALOME_Comm.idl \
+ GEOM_Gen.idl \
+ MED.idl
+
# Libraries targets
LIB = libNETGENEngine.la
diff --git a/src/NETGENPlugin/NETGENPlugin_Hypothesis.cxx b/src/NETGENPlugin/NETGENPlugin_Hypothesis.cxx
index d5f43cd..bda2508 100644
--- a/src/NETGENPlugin/NETGENPlugin_Hypothesis.cxx
+++ b/src/NETGENPlugin/NETGENPlugin_Hypothesis.cxx
@@ -26,10 +26,11 @@
// $Header$
//=============================================================================
-using namespace std;
#include
#include
+using namespace std;
+
//=============================================================================
/*!
*
diff --git a/src/NETGENPlugin/NETGENPlugin_Hypothesis.hxx b/src/NETGENPlugin/NETGENPlugin_Hypothesis.hxx
index 01a4c3e..f52504b 100644
--- a/src/NETGENPlugin/NETGENPlugin_Hypothesis.hxx
+++ b/src/NETGENPlugin/NETGENPlugin_Hypothesis.hxx
@@ -29,13 +29,17 @@
#ifndef _NETGENPlugin_Hypothesis_HXX_
#define _NETGENPlugin_Hypothesis_HXX_
+#include "NETGENPlugin_Defs.hxx"
+
#include "SMESH_Hypothesis.hxx"
#include "Utils_SALOME_Exception.hxx"
// Parameters for work of NETGEN
//
-class NETGENPlugin_Hypothesis: public SMESH_Hypothesis
+using namespace std;
+
+class NETGENPLUGIN_EXPORT NETGENPlugin_Hypothesis: public SMESH_Hypothesis
{
public:
@@ -87,8 +91,8 @@ public:
// Persistence
virtual ostream & SaveTo(ostream & save);
virtual istream & LoadFrom(istream & load);
- friend ostream & operator <<(ostream & save, NETGENPlugin_Hypothesis & hyp);
- friend istream & operator >>(istream & load, NETGENPlugin_Hypothesis & hyp);
+ friend NETGENPLUGIN_EXPORT ostream & operator <<(ostream & save, NETGENPlugin_Hypothesis & hyp);
+ friend NETGENPLUGIN_EXPORT istream & operator >>(istream & load, NETGENPlugin_Hypothesis & hyp);
/*!
* \brief Does nothing
diff --git a/src/NETGENPlugin/NETGENPlugin_Hypothesis_2D.cxx b/src/NETGENPlugin/NETGENPlugin_Hypothesis_2D.cxx
index 46f89ef..0b157fc 100644
--- a/src/NETGENPlugin/NETGENPlugin_Hypothesis_2D.cxx
+++ b/src/NETGENPlugin/NETGENPlugin_Hypothesis_2D.cxx
@@ -26,10 +26,11 @@
// $Header$
//=============================================================================
-using namespace std;
#include
#include
+using namespace std;
+
//=============================================================================
/*!
*
diff --git a/src/NETGENPlugin/NETGENPlugin_Hypothesis_2D.hxx b/src/NETGENPlugin/NETGENPlugin_Hypothesis_2D.hxx
index a9b0acd..5b6d1eb 100644
--- a/src/NETGENPlugin/NETGENPlugin_Hypothesis_2D.hxx
+++ b/src/NETGENPlugin/NETGENPlugin_Hypothesis_2D.hxx
@@ -29,6 +29,8 @@
#ifndef _NETGENPlugin_Hypothesis_2D_HXX_
#define _NETGENPlugin_Hypothesis_2D_HXX_
+#include "NETGENPlugin_Defs.hxx"
+
#include "NETGENPlugin_Hypothesis.hxx"
#include "Utils_SALOME_Exception.hxx"
@@ -36,7 +38,7 @@
// This class is just to give 2D dimension, actually
// it inherits all behaviour of the parent
-class NETGENPlugin_Hypothesis_2D: public NETGENPlugin_Hypothesis
+class NETGENPLUGIN_EXPORT NETGENPlugin_Hypothesis_2D: public NETGENPlugin_Hypothesis
{
public:
diff --git a/src/NETGENPlugin/NETGENPlugin_Hypothesis_2D_i.cxx b/src/NETGENPlugin/NETGENPlugin_Hypothesis_2D_i.cxx
index 36ed667..baabaeb 100644
--- a/src/NETGENPlugin/NETGENPlugin_Hypothesis_2D_i.cxx
+++ b/src/NETGENPlugin/NETGENPlugin_Hypothesis_2D_i.cxx
@@ -25,8 +25,6 @@
// Project : SALOME
// $Header$
//=============================================================================
-using namespace std;
-
#include "NETGENPlugin_Hypothesis_2D_i.hxx"
#include "SMESH_Gen.hxx"
#include "SMESH_PythonDump.hxx"
@@ -34,6 +32,8 @@ using namespace std;
#include "Utils_CorbaException.hxx"
#include "utilities.h"
+using namespace std;
+
//=============================================================================
/*!
* NETGENPlugin_Hypothesis_2D_i::NETGENPlugin_Hypothesis_2D_i
diff --git a/src/NETGENPlugin/NETGENPlugin_Hypothesis_2D_i.hxx b/src/NETGENPlugin/NETGENPlugin_Hypothesis_2D_i.hxx
index 1df8e19..44b8db2 100644
--- a/src/NETGENPlugin/NETGENPlugin_Hypothesis_2D_i.hxx
+++ b/src/NETGENPlugin/NETGENPlugin_Hypothesis_2D_i.hxx
@@ -29,6 +29,8 @@
#ifndef _NETGENPlugin_Hypothesis_2D_i_HXX_
#define _NETGENPlugin_Hypothesis_2D_i_HXX_
+#include "NETGENPlugin_Defs.hxx"
+
#include
#include CORBA_SERVER_HEADER(NETGENPlugin_Algorithm)
@@ -39,7 +41,7 @@ class SMESH_Gen;
// NETGENPlugin parameters hypothesis (2D case)
-class NETGENPlugin_Hypothesis_2D_i:
+class NETGENPLUGIN_EXPORT NETGENPlugin_Hypothesis_2D_i:
public virtual POA_NETGENPlugin::NETGENPlugin_Hypothesis_2D,
public NETGENPlugin_Hypothesis_i
{
diff --git a/src/NETGENPlugin/NETGENPlugin_Hypothesis_i.cxx b/src/NETGENPlugin/NETGENPlugin_Hypothesis_i.cxx
index 313fe31..9836d2c 100644
--- a/src/NETGENPlugin/NETGENPlugin_Hypothesis_i.cxx
+++ b/src/NETGENPlugin/NETGENPlugin_Hypothesis_i.cxx
@@ -25,8 +25,6 @@
// Project : SALOME
// $Header$
//=============================================================================
-using namespace std;
-
#include "NETGENPlugin_Hypothesis_i.hxx"
#include "SMESH_Gen.hxx"
#include "SMESH_PythonDump.hxx"
@@ -34,6 +32,8 @@ using namespace std;
#include "Utils_CorbaException.hxx"
#include "utilities.h"
+using namespace std;
+
//=============================================================================
/*!
* NETGENPlugin_Hypothesis_i::NETGENPlugin_Hypothesis_i
diff --git a/src/NETGENPlugin/NETGENPlugin_Hypothesis_i.hxx b/src/NETGENPlugin/NETGENPlugin_Hypothesis_i.hxx
index edde231..6651617 100644
--- a/src/NETGENPlugin/NETGENPlugin_Hypothesis_i.hxx
+++ b/src/NETGENPlugin/NETGENPlugin_Hypothesis_i.hxx
@@ -29,6 +29,8 @@
#ifndef _NETGENPlugin_Hypothesis_i_HXX_
#define _NETGENPlugin_Hypothesis_i_HXX_
+#include "NETGENPlugin_Defs.hxx"
+
#include
#include CORBA_SERVER_HEADER(NETGENPlugin_Algorithm)
@@ -39,7 +41,7 @@ class SMESH_Gen;
// NETGENPlugin parameters hypothesis
-class NETGENPlugin_Hypothesis_i:
+class NETGENPLUGIN_EXPORT NETGENPlugin_Hypothesis_i:
public virtual POA_NETGENPlugin::NETGENPlugin_Hypothesis,
public virtual SMESH_Hypothesis_i
{
diff --git a/src/NETGENPlugin/NETGENPlugin_Mesher.cxx b/src/NETGENPlugin/NETGENPlugin_Mesher.cxx
index 09c51aa..eaf010a 100644
--- a/src/NETGENPlugin/NETGENPlugin_Mesher.cxx
+++ b/src/NETGENPlugin/NETGENPlugin_Mesher.cxx
@@ -25,8 +25,6 @@
// Project : SALOME
// $Header$
//=============================================================================
-using namespace std;
-
#include "NETGENPlugin_Mesher.hxx"
#include "NETGENPlugin_Hypothesis_2D.hxx"
@@ -56,6 +54,8 @@ namespace netgen {
extern MeshingParameters mparam;
}
+using namespace std;
+
//=============================================================================
/*!
*
@@ -70,22 +70,23 @@ NETGENPlugin_Mesher::NETGENPlugin_Mesher (SMESHDS_Mesh* meshDS,
_isVolume(isVolume),
_optimize(true)
{
+ netgen::MeshingParameters& mparams = netgen::GlobalMeshingParameters();
// 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 +98,22 @@ void NETGENPlugin_Mesher::SetParameters(const NETGENPlugin_Hypothesis* hyp)
{
if (hyp)
{
+ netgen::MeshingParameters& mparams = netgen::GlobalMeshingParameters();
// Initialize global NETGEN parameters:
// maximal mesh segment size
- netgen::mparam.maxh = hyp->GetMaxSize();
+ mparams.maxh = hyp->GetMaxSize();
// minimal number of segments per edge
- netgen::mparam.segmentsperedge = hyp->GetNbSegPerEdge();
+ mparams.segmentsperedge = hyp->GetNbSegPerEdge();
// rate of growth of size between elements
- netgen::mparam.grading = hyp->GetGrowthRate();
+ mparams.grading = hyp->GetGrowthRate();
// safety factor for curvatures (elements per radius)
- netgen::mparam.curvaturesafety = hyp->GetNbSegPerRadius();
+ mparams.curvaturesafety = hyp->GetNbSegPerRadius();
// create elements of second order
- netgen::mparam.secondorder = hyp->GetSecondOrder() ? 1 : 0;
+ mparams.secondorder = hyp->GetSecondOrder() ? 1 : 0;
// quad-dominated surface meshing
// only triangles are allowed for volumic mesh
if (!_isVolume)
- netgen::mparam.quad = static_cast
+ mparams.quad = static_cast
(hyp)->GetQuadAllowed() ? 1 : 0;
_optimize = hyp->GetOptimize();
}
@@ -147,14 +149,15 @@ Standard_Boolean IsEqual(const Link& aLink1, const Link& aLink2)
//=============================================================================
bool NETGENPlugin_Mesher::Compute()
{
+ netgen::MeshingParameters& mparams = netgen::GlobalMeshingParameters();
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();
@@ -202,7 +205,7 @@ bool NETGENPlugin_Mesher::Compute()
startWith = endWith = netgen::MESHCONST_MESHVOLUME;
err = netgen::OCCGenerateMesh(occgeo, ngMesh, startWith, endWith, optstr);
}
- if (!err && netgen::mparam.secondorder > 0)
+ if (!err && mparams.secondorder > 0)
{
netgen::OCCRefinementSurfaces ref (occgeo);
ref.MakeSecondOrder (*ngMesh);
diff --git a/src/NETGENPlugin/NETGENPlugin_Mesher.hxx b/src/NETGENPlugin/NETGENPlugin_Mesher.hxx
index 4d09177..81c30e8 100644
--- a/src/NETGENPlugin/NETGENPlugin_Mesher.hxx
+++ b/src/NETGENPlugin/NETGENPlugin_Mesher.hxx
@@ -29,6 +29,8 @@
#ifndef _NETGENPlugin_Mesher_HXX_
#define _NETGENPlugin_Mesher_HXX_
+#include "NETGENPlugin_Defs.hxx"
+
class SMESHDS_Mesh;
class TopoDS_Shape;
class NETGENPlugin_Hypothesis;
@@ -37,7 +39,7 @@ class NETGENPlugin_Hypothesis;
* \brief This class calls the NETGEN mesher of OCC geometry
*/
-class NETGENPlugin_Mesher
+class NETGENPLUGIN_EXPORT NETGENPlugin_Mesher
{
public:
// ---------- PUBLIC METHODS ----------
diff --git a/src/NETGENPlugin/NETGENPlugin_NETGEN_2D.cxx b/src/NETGENPlugin/NETGENPlugin_NETGEN_2D.cxx
index fcf4153..677e289 100644
--- a/src/NETGENPlugin/NETGENPlugin_NETGEN_2D.cxx
+++ b/src/NETGENPlugin/NETGENPlugin_NETGEN_2D.cxx
@@ -25,8 +25,6 @@
// Project : SALOME
// $Header$
//=============================================================================
-using namespace std;
-
#include "NETGENPlugin_NETGEN_2D.hxx"
#include "NETGENPlugin_Hypothesis_2D.hxx"
#include "NETGENPlugin_Mesher.hxx"
@@ -39,6 +37,8 @@ using namespace std;
#include
+using namespace std;
+
//=============================================================================
/*!
*
diff --git a/src/NETGENPlugin/NETGENPlugin_NETGEN_2D.hxx b/src/NETGENPlugin/NETGENPlugin_NETGEN_2D.hxx
index aafcb2e..1b3fdf2 100644
--- a/src/NETGENPlugin/NETGENPlugin_NETGEN_2D.hxx
+++ b/src/NETGENPlugin/NETGENPlugin_NETGEN_2D.hxx
@@ -29,6 +29,8 @@
#ifndef _NETGENPlugin_NETGEN_2D_HXX_
#define _NETGENPlugin_NETGEN_2D_HXX_
+#include "NETGENPlugin_Defs.hxx"
+
#include "SMESH_2D_Algo.hxx"
#include "SMESH_Mesh.hxx"
#include "StdMeshers_MaxElementVolume.hxx"
@@ -36,7 +38,7 @@
class NETGENPlugin_Hypothesis_2D;
-class NETGENPlugin_NETGEN_2D: public SMESH_2D_Algo
+class NETGENPLUGIN_EXPORT NETGENPlugin_NETGEN_2D: public SMESH_2D_Algo
{
public:
NETGENPlugin_NETGEN_2D(int hypId, int studyId, SMESH_Gen* gen);
diff --git a/src/NETGENPlugin/NETGENPlugin_NETGEN_2D3D.cxx b/src/NETGENPlugin/NETGENPlugin_NETGEN_2D3D.cxx
index 0f392c1..c10e6b3 100644
--- a/src/NETGENPlugin/NETGENPlugin_NETGEN_2D3D.cxx
+++ b/src/NETGENPlugin/NETGENPlugin_NETGEN_2D3D.cxx
@@ -25,8 +25,6 @@
// Project : SALOME
// $Header$
//=============================================================================
-using namespace std;
-
#include "NETGENPlugin_NETGEN_2D3D.hxx"
#include "NETGENPlugin_Hypothesis.hxx"
#include "NETGENPlugin_Mesher.hxx"
@@ -39,6 +37,8 @@ using namespace std;
#include
+using namespace std;
+
//=============================================================================
/*!
*
diff --git a/src/NETGENPlugin/NETGENPlugin_NETGEN_2D3D.hxx b/src/NETGENPlugin/NETGENPlugin_NETGEN_2D3D.hxx
index 169cb15..89c7a61 100644
--- a/src/NETGENPlugin/NETGENPlugin_NETGEN_2D3D.hxx
+++ b/src/NETGENPlugin/NETGENPlugin_NETGEN_2D3D.hxx
@@ -29,6 +29,8 @@
#ifndef _NETGENPlugin_NETGEN_2D3D_HXX_
#define _NETGENPlugin_NETGEN_2D3D_HXX_
+#include "NETGENPlugin_Defs.hxx"
+
#include "SMESH_3D_Algo.hxx"
#include "SMESH_Mesh.hxx"
#include "StdMeshers_MaxElementVolume.hxx"
@@ -36,7 +38,7 @@
class NETGENPlugin_Hypothesis;
-class NETGENPlugin_NETGEN_2D3D: public SMESH_3D_Algo
+class NETGENPLUGIN_EXPORT NETGENPlugin_NETGEN_2D3D: public SMESH_3D_Algo
{
public:
NETGENPlugin_NETGEN_2D3D(int hypId, int studyId, SMESH_Gen* gen);
diff --git a/src/NETGENPlugin/NETGENPlugin_NETGEN_2D3D_i.cxx b/src/NETGENPlugin/NETGENPlugin_NETGEN_2D3D_i.cxx
index accbeaf..e0afd74 100644
--- a/src/NETGENPlugin/NETGENPlugin_NETGEN_2D3D_i.cxx
+++ b/src/NETGENPlugin/NETGENPlugin_NETGEN_2D3D_i.cxx
@@ -24,13 +24,14 @@
// Module : NETGENPlugin
// $Header$
-using namespace std;
#include "NETGENPlugin_NETGEN_2D3D_i.hxx"
#include "SMESH_Gen.hxx"
#include "Utils_CorbaException.hxx"
#include "utilities.h"
+using namespace std;
+
//=============================================================================
/*!
* NETGENPlugin_NETGEN_2D3D_i::NETGENPlugin_NETGEN_2D3D_i
diff --git a/src/NETGENPlugin/NETGENPlugin_NETGEN_2D3D_i.hxx b/src/NETGENPlugin/NETGENPlugin_NETGEN_2D3D_i.hxx
index dc8f6d8..a6483d3 100644
--- a/src/NETGENPlugin/NETGENPlugin_NETGEN_2D3D_i.hxx
+++ b/src/NETGENPlugin/NETGENPlugin_NETGEN_2D3D_i.hxx
@@ -27,6 +27,8 @@
#ifndef _NETGENPlugin_NETGEN_2D3D_I_HXX_
#define _NETGENPlugin_NETGEN_2D3D_I_HXX_
+#include "NETGENPlugin_Defs.hxx"
+
#include
#include CORBA_SERVER_HEADER(NETGENPlugin_Algorithm)
@@ -36,7 +38,7 @@
// ======================================================
// NETGEN 3d algorithm
// ======================================================
-class NETGENPlugin_NETGEN_2D3D_i:
+class NETGENPLUGIN_EXPORT NETGENPlugin_NETGEN_2D3D_i:
public virtual POA_NETGENPlugin::NETGENPlugin_NETGEN_2D3D,
public virtual SMESH_3D_Algo_i
{
diff --git a/src/NETGENPlugin/NETGENPlugin_NETGEN_2D_i.cxx b/src/NETGENPlugin/NETGENPlugin_NETGEN_2D_i.cxx
index 060af2e..0ba4c91 100644
--- a/src/NETGENPlugin/NETGENPlugin_NETGEN_2D_i.cxx
+++ b/src/NETGENPlugin/NETGENPlugin_NETGEN_2D_i.cxx
@@ -24,13 +24,14 @@
// Module : NETGENPlugin
// $Header$
-using namespace std;
#include "NETGENPlugin_NETGEN_2D_i.hxx"
#include "SMESH_Gen.hxx"
#include "Utils_CorbaException.hxx"
#include "utilities.h"
+using namespace std;
+
//=============================================================================
/*!
* NETGENPlugin_NETGEN_2D_i::NETGENPlugin_NETGEN_2D_i
diff --git a/src/NETGENPlugin/NETGENPlugin_NETGEN_2D_i.hxx b/src/NETGENPlugin/NETGENPlugin_NETGEN_2D_i.hxx
index af8e9fe..c574225 100644
--- a/src/NETGENPlugin/NETGENPlugin_NETGEN_2D_i.hxx
+++ b/src/NETGENPlugin/NETGENPlugin_NETGEN_2D_i.hxx
@@ -27,6 +27,8 @@
#ifndef _NETGENPlugin_NETGEN_2D_I_HXX_
#define _NETGENPlugin_NETGEN_2D_I_HXX_
+#include "NETGENPlugin_Defs.hxx"
+
#include
#include CORBA_SERVER_HEADER(NETGENPlugin_Algorithm)
@@ -36,7 +38,7 @@
// ======================================================
// NETGEN 3d algorithm
// ======================================================
-class NETGENPlugin_NETGEN_2D_i:
+class NETGENPLUGIN_EXPORT NETGENPlugin_NETGEN_2D_i:
public virtual POA_NETGENPlugin::NETGENPlugin_NETGEN_2D,
public virtual SMESH_2D_Algo_i
{
diff --git a/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx b/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx
index ccc427f..107d112 100644
--- a/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx
+++ b/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx
@@ -1,3 +1,22 @@
+// 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_NETGEN_3D.cxx
// Moved here from SMESH_NETGEN_3D.cxx
@@ -15,6 +34,7 @@
#include "SMESHDS_Mesh.hxx"
#include "SMDS_MeshElement.hxx"
#include "SMDS_MeshNode.hxx"
+#include "SMESH_MesherHelper.hxx"
#include
#include
@@ -31,15 +51,11 @@
Netgen include files
*/
-namespace nglib
-{
- #include
+namespace nglib {
+#include
}
-
using namespace nglib;
-using namespace std;
-
//=============================================================================
/*!
*
@@ -142,6 +158,9 @@ bool NETGENPlugin_NETGEN_3D::Compute(SMESH_Mesh& aMesh,
// get triangles on aShell and make a map of nodes to Netgen node IDs
// -------------------------------------------------------------------
+ SMESH_MesherHelper* myTool = new SMESH_MesherHelper(aMesh);
+ bool _quadraticMesh = myTool->IsQuadraticSubMesh(aShape);
+
typedef map< const SMDS_MeshNode*, int> TNodeToIDMap;
TNodeToIDMap nodeToNetgenID;
list< const SMDS_MeshElement* > triangles;
@@ -166,8 +185,10 @@ bool NETGENPlugin_NETGEN_3D::Compute(SMESH_Mesh& aMesh,
{
// check element
const SMDS_MeshElement* elem = iteratorElem->next();
- if ( !elem || elem->NbNodes() != 3 ) {
+ if ( !elem ||
+ !( elem->NbNodes()==3 || ( _quadraticMesh && elem->NbNodes()==6) ) ) {
INFOS( "NETGENPlugin_NETGEN_3D::Compute(), bad mesh");
+ delete myTool; myTool = 0;
return false;
}
// keep a triangle
@@ -178,6 +199,8 @@ bool NETGENPlugin_NETGEN_3D::Compute(SMESH_Mesh& aMesh,
while ( triangleNodesIt->more() ) {
const SMDS_MeshNode * node =
static_cast(triangleNodesIt->next());
+ if(myTool->IsMedium(node))
+ continue;
nodeToNetgenID.insert( make_pair( node, invalid_ID ));
}
#ifdef _DEBUG_
@@ -250,6 +273,7 @@ bool NETGENPlugin_NETGEN_3D::Compute(SMESH_Mesh& aMesh,
if ( isDegen ) // all nodes on a degen edge get one netgen ID
*(shId_ngId->second) = n_id->second;
}
+
// set triangles
list< const SMDS_MeshElement* >::iterator tria = triangles.begin();
list< bool >::iterator reverse = isReversed.begin();
@@ -260,6 +284,8 @@ bool NETGENPlugin_NETGEN_3D::Compute(SMESH_Mesh& aMesh,
while ( triangleNodesIt->more() ) {
const SMDS_MeshNode * node =
static_cast(triangleNodesIt->next());
+ if(myTool->IsMedium(node))
+ continue;
Netgen_triangle[ *reverse ? 2 - i : i ] = nodeToNetgenID[ node ];
++i;
}
@@ -285,7 +311,8 @@ bool NETGENPlugin_NETGEN_3D::Compute(SMESH_Mesh& aMesh,
try {
status = Ng_GenerateVolumeMesh(Netgen_mesh, &Netgen_param);
- } catch (...) {
+ }
+ catch (...) {
MESSAGE("An exception has been caught during the Volume Mesh Generation ...");
status = NG_VOLUME_FAILURE;
}
@@ -308,8 +335,9 @@ bool NETGENPlugin_NETGEN_3D::Compute(SMESH_Mesh& aMesh,
// vector of nodes in which node index == netgen ID
vector< const SMDS_MeshNode* > nodeVec ( Netgen_NbOfNodesNew + 1 );
// insert old nodes into nodeVec
- for ( n_id = nodeToNetgenID.begin(); n_id != nodeToNetgenID.end(); ++n_id )
+ for ( n_id = nodeToNetgenID.begin(); n_id != nodeToNetgenID.end(); ++n_id ) {
nodeVec.at( n_id->second ) = n_id->first;
+ }
// create and insert new nodes into nodeVec
int nodeIndex = Netgen_NbOfNodes + 1;
int shapeID = meshDS->ShapeToIndex( aShape );
@@ -327,7 +355,7 @@ bool NETGENPlugin_NETGEN_3D::Compute(SMESH_Mesh& aMesh,
for ( int elemIndex = 1; elemIndex <= Netgen_NbOfTetra; ++elemIndex )
{
Ng_GetVolumeElement(Netgen_mesh, elemIndex, Netgen_tetrahedron);
- SMDS_MeshVolume * elt = meshDS->AddVolume (nodeVec.at( Netgen_tetrahedron[0] ),
+ SMDS_MeshVolume * elt = myTool->AddVolume (nodeVec.at( Netgen_tetrahedron[0] ),
nodeVec.at( Netgen_tetrahedron[1] ),
nodeVec.at( Netgen_tetrahedron[2] ),
nodeVec.at( Netgen_tetrahedron[3] ));
@@ -338,6 +366,8 @@ bool NETGENPlugin_NETGEN_3D::Compute(SMESH_Mesh& aMesh,
Ng_DeleteMesh(Netgen_mesh);
Ng_Exit();
+ delete myTool; myTool = 0;
+
return isOK;
}
diff --git a/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.hxx b/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.hxx
index 7785365..77d0488 100644
--- a/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.hxx
+++ b/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.hxx
@@ -1,25 +1,35 @@
+// 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_NETGEN_3D.hxx
// Moved here from SMESH_NETGEN_3D.hxx
// 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_
-#ifdef WIN32
- #ifdef NETGENPLUGIN_EXPORTS
- #define NETGENPLUGIN_EXPORT __declspec( dllexport )
- #else
- #define NETGENPLUGIN_EXPORT __declspec( dllimport )
- #endif
-#else
- #define NETGENPLUGIN_EXPORT
-#endif
+#include "NETGENPlugin_Defs.hxx"
#include "SMESH_3D_Algo.hxx"
#include "SMESH_Mesh.hxx"
diff --git a/src/NETGENPlugin/NETGENPlugin_NETGEN_3D_i.cxx b/src/NETGENPlugin/NETGENPlugin_NETGEN_3D_i.cxx
index 2e06f23..53f1f4c 100644
--- a/src/NETGENPlugin/NETGENPlugin_NETGEN_3D_i.cxx
+++ b/src/NETGENPlugin/NETGENPlugin_NETGEN_3D_i.cxx
@@ -17,7 +17,7 @@
// 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
//
//
diff --git a/src/NETGENPlugin/NETGENPlugin_NETGEN_3D_i.hxx b/src/NETGENPlugin/NETGENPlugin_NETGEN_3D_i.hxx
index ab78124..9fac5f3 100644
--- a/src/NETGENPlugin/NETGENPlugin_NETGEN_3D_i.hxx
+++ b/src/NETGENPlugin/NETGENPlugin_NETGEN_3D_i.hxx
@@ -17,7 +17,7 @@
// 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
//
//
@@ -30,6 +30,8 @@
#ifndef _NETGENPlugin_NETGEN_3D_I_HXX_
#define _NETGENPlugin_NETGEN_3D_I_HXX_
+#include "NETGENPlugin_Defs.hxx"
+
#include
#include CORBA_SERVER_HEADER(NETGENPlugin_Algorithm)
diff --git a/src/NETGENPlugin/NETGENPlugin_i.cxx b/src/NETGENPlugin/NETGENPlugin_i.cxx
index ef7fb17..db6b3ad 100644
--- a/src/NETGENPlugin/NETGENPlugin_i.cxx
+++ b/src/NETGENPlugin/NETGENPlugin_i.cxx
@@ -17,7 +17,7 @@
// 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
//
//
@@ -29,6 +29,16 @@
#include "utilities.h"
#include "NETGENPlugin_NETGEN_3D_i.hxx"
+#include "NETGENPlugin_NETGEN_2D_i.hxx"
+#include "NETGENPlugin_NETGEN_2D3D_i.hxx"
+#include "NETGENPlugin_Hypothesis_i.hxx"
+#include "NETGENPlugin_Hypothesis_2D_i.hxx"
+
+template class NETGENPlugin_Creator_i:public HypothesisCreator_i
+{
+ // as we have 'module NETGENPlugin' in NETGENPlugin_Algorithm.idl
+ virtual std::string GetModuleName() { return "NETGENPlugin"; }
+};
using namespace std;
@@ -51,7 +61,16 @@ extern "C"
// Algorithms
if (strcmp(aHypName, "NETGEN_3D") == 0)
- aCreator = new HypothesisCreator_i;
+ aCreator = new NETGENPlugin_Creator_i;
+ else if (strcmp(aHypName, "NETGEN_2D") == 0)
+ aCreator = new NETGENPlugin_Creator_i;
+ else if (strcmp(aHypName, "NETGEN_2D3D") == 0)
+ aCreator = new NETGENPlugin_Creator_i;
+ // Hypotheses
+ else if (strcmp(aHypName, "NETGEN_Parameters") == 0)
+ aCreator = new NETGENPlugin_Creator_i;
+ else if (strcmp(aHypName, "NETGEN_Parameters_2D") == 0)
+ aCreator = new NETGENPlugin_Creator_i;
else ;
return aCreator;