From 727912d5157d61fcc12d54db2197ab7240e43d70 Mon Sep 17 00:00:00 2001 From: admin Date: Fri, 17 Dec 2004 11:07:36 +0000 Subject: [PATCH] This commit was generated by cvs2git to create tag 'V2_1_0'. Sprout from master 2004-12-17 11:07:35 UTC admin 'Merge with OCC-V2_1_0_deb' Delete: src/NETGEN/Makefile.in src/NETGEN/ReadMeForNgUsers src/NETGEN/netgen43ForSalome.patch src/NETGENPlugin/Makefile.in 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 --- src/NETGEN/Makefile.in | 152 --- src/NETGEN/ReadMeForNgUsers | 102 -- src/NETGEN/netgen43ForSalome.patch | 221 ---- src/NETGENPlugin/Makefile.in | 67 -- src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx | 1064 ----------------- src/NETGENPlugin/NETGENPlugin_NETGEN_3D.hxx | 43 - src/NETGENPlugin/NETGENPlugin_NETGEN_3D_i.cxx | 85 -- src/NETGENPlugin/NETGENPlugin_NETGEN_3D_i.hxx | 58 - src/NETGENPlugin/NETGENPlugin_i.cxx | 60 - src/NETGENPlugin/NETGENPlugin_icons.po | 20 - 10 files changed, 1872 deletions(-) delete mode 100644 src/NETGEN/Makefile.in delete mode 100644 src/NETGEN/ReadMeForNgUsers delete mode 100644 src/NETGEN/netgen43ForSalome.patch delete mode 100644 src/NETGENPlugin/Makefile.in delete mode 100644 src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx delete mode 100644 src/NETGENPlugin/NETGENPlugin_NETGEN_3D.hxx delete mode 100644 src/NETGENPlugin/NETGENPlugin_NETGEN_3D_i.cxx delete mode 100644 src/NETGENPlugin/NETGENPlugin_NETGEN_3D_i.hxx delete mode 100644 src/NETGENPlugin/NETGENPlugin_i.cxx delete mode 100644 src/NETGENPlugin/NETGENPlugin_icons.po diff --git a/src/NETGEN/Makefile.in b/src/NETGEN/Makefile.in deleted file mode 100644 index fc2e0476a..000000000 --- a/src/NETGEN/Makefile.in +++ /dev/null @@ -1,152 +0,0 @@ -# -* Makefile *- -# -# Author : Nadir Bouhamou (CEA) -# Module : SMESH -# Date : 10/10/2003 -# -# - -# source path -top_srcdir=@top_srcdir@ -top_builddir=../.. -srcdir=@srcdir@ -VPATH=.:@srcdir@ - -@COMMENCE@ - -# Libraries targets -LIB = libNETGEN.la - -# additionnal information to compil and link file -CPPFLAGS += -DSOLIDGEOM -DLINUX $(OCC_INCLUDES) -CXXFLAGS += -DSOLIDGEOM -DLINUX $(OCC_CXXFLAGS) - -LDFLAGS += $(OCC_KERNEL_LIBS) $(OCC_MODELER_LIBS) -lg2c - -NETGEN_LIBS_DIR=@NETGEN_LIBS_DIR@ - -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 - -$(LIB_OBJ_O): - ar x $(NETGEN_LIBS_DIR)/libnginterface.a - ar x $(NETGEN_LIBS_DIR)/libcsg.a - ar x $(NETGEN_LIBS_DIR)/libgprim.a - ar x $(NETGEN_LIBS_DIR)/libmesh.a - ar x $(NETGEN_LIBS_DIR)/libopti.a - ar x $(NETGEN_LIBS_DIR)/libgen.a - ar x $(NETGEN_LIBS_DIR)/libla.a - ar x $(NETGEN_LIBS_DIR)/libstlgeom.a - ar x $(NETGEN_LIBS_DIR)/libgeom2d.a - 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 - -LIB_OBJ_LO = $(LIB_OBJ_O:%.o=%.lo) - -#implicits rules - -.o.lo: - ln -s $< $@ || true - -@CONCLUDE@ - -$(LIB): $(LIB_OBJ_O) $(LIB_OBJ_LO) - @$(LT) --mode=link $(CXX) -rpath $(libdir) -o $@ $(CXXFLAGS) $(LIB_OBJ_LO) $(LDFLAGS) $(LIBS) - -mostlyclean: cleandep - -$(RM) $(LIB_OBJ_O) $(LIB_OBJ_LO) diff --git a/src/NETGEN/ReadMeForNgUsers b/src/NETGEN/ReadMeForNgUsers deleted file mode 100644 index 555eb9716..000000000 --- a/src/NETGEN/ReadMeForNgUsers +++ /dev/null @@ -1,102 +0,0 @@ -The Netgen 4.3 from the web location : http://www.hpfem.jku.at/netgen/ is used -in the SMESH Module of Salome2 distribution. - -How to build Netgen for Salome ------------------------------- - -Patch the official netgen 4.3 distribution: - -$ cd netgen43 -$ patch -p1 < patch_directory/netgen43ForSalome.patch - -Then run makeForSalome.sh: -$ sh makeForSalome.sh - - -Additional information for maintainers --------------------------------------- - -The SMESH Engine of SALOME2 (particularly the m4 file check_Netgen.m4) assume -that Netgen is installed in the directory as follow: - -prompt> ls - -bin/ cshrc_for_netgen doc/ include/ lib/ tutorials/ - -prompt> ls /bin - -LINUX/ - -prompt> ls /bin/LINUX/ - -demoapp/ ng ng.tcl ngtcltk/ startup.tcl - -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 -/lib/LINUX/libnginterface.a should contain the objects -nglib.o (from netgen43/libsrc/interface/nglib.cpp) and ngnewdelete.o -(from netgen43/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. - -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. - -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 * -******************************** diff --git a/src/NETGEN/netgen43ForSalome.patch b/src/NETGEN/netgen43ForSalome.patch deleted file mode 100644 index 5e08d8804..000000000 --- a/src/NETGEN/netgen43ForSalome.patch +++ /dev/null @@ -1,221 +0,0 @@ -diff -N -r -u netgen43/libsrc/include/spline2d.hpp /tmp/netgen43/libsrc/include/spline2d.hpp ---- netgen43/libsrc/include/spline2d.hpp 1970-01-01 01:00:00.000000000 +0100 -+++ /tmp/netgen43/libsrc/include/spline2d.hpp 2003-12-10 16:28:12.000000000 +0100 -@@ -0,0 +1 @@ -+#include "../geom2d/spline2d.hpp" -diff -N -r -u netgen43/libsrc/include/splinegeometry2.hpp /tmp/netgen43/libsrc/include/splinegeometry2.hpp ---- netgen43/libsrc/include/splinegeometry2.hpp 1970-01-01 01:00:00.000000000 +0100 -+++ /tmp/netgen43/libsrc/include/splinegeometry2.hpp 2003-12-10 16:28:23.000000000 +0100 -@@ -0,0 +1 @@ -+#include "../geom2d/splinegeometry2.hpp" -diff -N -r -u netgen43/libsrc/interface/Makefile /tmp/netgen43/libsrc/interface/Makefile ---- netgen43/libsrc/interface/Makefile 2003-05-07 16:01:43.000000000 +0200 -+++ /tmp/netgen43/libsrc/interface/Makefile 2003-12-10 15:59:47.000000000 +0100 -@@ -1,4 +1,4 @@ --src = nginterface.cpp writeuser.cpp writediffpack.cpp writeabaqus.cpp writefluent.cpp writepermas.cpp writetochnog.cpp writetecplot.cpp wuchemnitz.cpp writetochnog.cpp writefeap.cpp readuser.cpp importsolution.cpp -+src = writeuser.cpp writediffpack.cpp writeabaqus.cpp writefluent.cpp writepermas.cpp writetochnog.cpp writetecplot.cpp wuchemnitz.cpp writetochnog.cpp writefeap.cpp readuser.cpp importsolution.cpp nglib.cpp ngnewdelete.cpp - # - lib = nginterface - libpath = libsrc/interface -diff -N -r -u netgen43/libsrc/interface/nglib.cpp /tmp/netgen43/libsrc/interface/nglib.cpp ---- netgen43/libsrc/interface/nglib.cpp 2003-05-07 16:01:43.000000000 +0200 -+++ /tmp/netgen43/libsrc/interface/nglib.cpp 2003-12-10 16:32:54.000000000 +0100 -@@ -23,6 +23,20 @@ - - #include "nglib.h" - -+namespace netgen -+{ -+ char geomfilename [100]; -+ -+ //Destination for messages, errors, ... -+ void Ng_PrintDest(const char * s) -+ { -+ (*mycout) << s << flush; -+ } -+ -+#include -+#include -+} -+ - using namespace netgen; - - // constants and types: -@@ -171,8 +185,6 @@ - // CSG Geometry - - // FlexLexer * lexer; --char geomfilename [100]; -- - - // 2D Meshing Functions: - -@@ -362,7 +374,18 @@ - cout << "e(" << readedges.Get(i) << "," << readedges.Get(i+1) << ")" << endl; - } - */ -- geo->AddEdges(readedges); -+ -+ ARRAY< Point<3> > readedges1; -+ -+ for (i = 1; i <= readedges.Size(); i++) -+ { -+ Point3d readedgesData = readedges.Get(i); -+ Point <3> readedges1Data = Point<3>(readedgesData.X(),readedgesData.Y(),readedgesData.Z()); -+ -+ readedges1.Append(readedges1Data); -+ } -+ -+ geo->AddEdges(readedges1); - } - - if (geo->GetStatus() == STLTopology::STL_GOOD || geo->GetStatus() == STLTopology::STL_WARNING) return NG_OK; -@@ -472,7 +495,14 @@ - n = Vec3d(nv[0],nv[1],nv[2]); - } - -- readtrias.Append(STLReadTriangle(apts,n)); -+ Point<3> apts1[3]; -+ apts1[0] = Point<3>(p1[0],p1[1],p1[2]); -+ apts1[1] = Point<3>(p2[0],p2[1],p2[2]); -+ apts1[2] = Point<3>(p3[0],p3[1],p3[2]); -+ -+ Vec<3> n1 = Vec<3>(n.X(),n.Y(),n.Z()); -+ -+ readtrias.Append(STLReadTriangle(apts1,n1)); - } - - // add (optional) edges: -@@ -487,30 +517,29 @@ - - // compatibility functions: - --void MyError (const char * ch) -+void netgen::MyError (const char * ch) - { - cerr << ch; - } - --//Destination for messages, errors, ... --void Ng_PrintDest(const char * s) --{ -- (*mycout) << s << flush; --} -- -- --double GetTime () -+double netgen::GetTime () - { - return 0; - } - --void ResetTime () -+void netgen::ResetTime () - { - ; - } - --void MyBeep (int i) -+void netgen::MyBeep (int i) - { - ; - } - -+void MeshFromSpline2D (SplineGeometry2d & geometry, -+ Mesh *& mesh, -+ MeshingParameters & mp) -+{ -+ MeshFromSpline2D (geometry, mesh, mp); -+} -diff -N -r -u netgen43/libsrc/makefile.mach.LINUX /tmp/netgen43/libsrc/makefile.mach.LINUX ---- netgen43/libsrc/makefile.mach.LINUX 2003-05-07 16:01:43.000000000 +0200 -+++ /tmp/netgen43/libsrc/makefile.mach.LINUX 2003-12-10 15:12:18.000000000 +0100 -@@ -14,7 +14,8 @@ - # - CFLAGS2 = - # pg stands for profiling - also in linkflags2 --CPLUSPLUSFLAGS2 = -O2 -I/usr/X11R6/include -DLINUX -DOPENGL -+#CPLUSPLUSFLAGS2 = -O2 -I/usr/X11R6/include -DLINUX -DOPENGL -+CPLUSPLUSFLAGS2 = -O2 -I/usr/X11R6/include -DLINUX - # -fomit-frame-pointer - # -ffast-math - # -diff -N -r -u netgen43/libsrc/meshing/improve2.cpp /tmp/netgen43/libsrc/meshing/improve2.cpp ---- netgen43/libsrc/meshing/improve2.cpp 2003-05-07 16:01:43.000000000 +0200 -+++ /tmp/netgen43/libsrc/meshing/improve2.cpp 2003-12-10 15:42:00.000000000 +0100 -@@ -3,7 +3,7 @@ - #include "meshing.hpp" - #include - --#include -+/*#include */ - - - namespace netgen -diff -N -r -u netgen43/libsrc/meshing/meshing2.cpp /tmp/netgen43/libsrc/meshing/meshing2.cpp ---- netgen43/libsrc/meshing/meshing2.cpp 2003-05-07 16:01:43.000000000 +0200 -+++ /tmp/netgen43/libsrc/meshing/meshing2.cpp 2003-12-10 15:34:35.000000000 +0100 -@@ -1785,7 +1785,7 @@ - - - #else --void glrender (int wait) -+void netgen::glrender (int wait) - { - ; - } -diff -N -r -u netgen43/libsrc/visualization/stlmeshing.cpp /tmp/netgen43/libsrc/visualization/stlmeshing.cpp ---- netgen43/libsrc/visualization/stlmeshing.cpp 2003-05-07 16:01:43.000000000 +0200 -+++ /tmp/netgen43/libsrc/visualization/stlmeshing.cpp 2003-12-10 15:52:53.000000000 +0100 -@@ -5,7 +5,7 @@ - #include - - #include --#include -+/*#include */ - - namespace netgen - { -diff -N -r -u netgen43/Makefile /tmp/netgen43/Makefile ---- netgen43/Makefile 2003-05-07 16:01:43.000000000 +0200 -+++ /tmp/netgen43/Makefile 2003-12-10 15:11:41.000000000 +0100 -@@ -35,7 +35,8 @@ - .SUFFIXES: .cpp .o - # - # --CPLUSPLUSFLAGS1 = -c -I$(LIBSRC_DIR)/include -DOPENGL -+#CPLUSPLUSFLAGS1 = -c -I$(LIBSRC_DIR)/include -DOPENGL -+CPLUSPLUSFLAGS1 = -c -I$(LIBSRC_DIR)/include - LINKFLAGS1 = -lGL -lGLU -lX11 -lXext -lXmu - # - CPLUSPLUSFLAGS = $(CPLUSPLUSFLAGS1) $(CPLUSPLUSFLAGS2) $(CPLUSPLUSFLAGS3) -diff -N -r -u netgen43/makeForSalome.sh /tmp/netgen43/makeForSalome.sh ---- netgen43/makeForSalome.sh 1970-01-01 01:00:00.000000000 +0100 -+++ /tmp/netgen43/makeForSalome.sh 2004-01-05 12:33:59.000000000 +0100 -@@ -0,0 +1,26 @@ -+#! /bin/sh -+cp ngtcltk/ngnewdelete.* libsrc/interface/ -+ -+MACHINE=LINUX -+export MACHINE -+make -C libsrc/csg -+make -C libsrc/general -+make -C libsrc/geom2d -+make -C libsrc/gprim -+make -C libsrc/interface -+make -C libsrc/linalg -+make -C libsrc/meshing -+make -C libsrc/opti -+make -C libsrc/stlgeom -+ -+if [ ! -d install ] ; then -+ mkdir install -+fi -+ -+cp -r lib install/ -+ -+if [ ! -d install/include ] ; then -+ mkdir install/include -+fi -+ -+cp libsrc/interface/nglib.h install/include diff --git a/src/NETGENPlugin/Makefile.in b/src/NETGENPlugin/Makefile.in deleted file mode 100644 index 577190928..000000000 --- a/src/NETGENPlugin/Makefile.in +++ /dev/null @@ -1,67 +0,0 @@ -# SMESH NETGENPlugin : implementaion of SMESH idl descriptions -# -# Copyright (C) 2004 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# -# 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -# -# -# -# File : Makefile.in -# Author : Julia DOROVSKIKH -# Module : SMESH -# $Header$ - -top_srcdir=@top_srcdir@ -top_builddir=../.. -srcdir=@srcdir@ -VPATH=.:@srcdir@:@top_srcdir@/idl:$(top_builddir)/idl: - - -@COMMENCE@ - -EXPORT_PYSCRIPTS = - -# .po files to transform in .qm -PO_FILES = NETGENPlugin_icons.po - -# Libraries targets -LIB = libNETGENEngine.la -LIB_SRC = \ - NETGENPlugin_NETGEN_3D.cxx \ - NETGENPlugin_NETGEN_3D_i.cxx \ - NETGENPlugin_i.cxx - -LIB_SERVER_IDL = SMESH_NetgenAlgorithm.idl - -LIB_CLIENT_IDL = SMESH_Gen.idl SMESH_Mesh.idl SMESH_Group.idl - -# Executables targets -BIN = -BIN_SRC = - -# additionnal information to compil and link file -NETGEN_INCLUDES=@NETGEN_INCLUDES@ - -CPPFLAGS+= $(OCC_INCLUDES) $(HDF5_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome \ - -I${GEOM_ROOT_DIR}/include/salome $(NETGEN_INCLUDES) $(BOOST_CPPFLAGS) -CXXFLAGS+= $(OCC_CXXFLAGS) $(HDF5_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome \ - -I${GEOM_ROOT_DIR}/include/salome $(NETGEN_INCLUDES) - -LDFLAGS+= $(HDF5_LIBS) -lSMESHimpl -lSMESHEngine -lStdMeshers -lStdMeshersEngine -lNETGEN -L${KERNEL_ROOT_DIR}/lib/salome -L${GEOM_ROOT_DIR}/lib/salome -lSalomeGenericObj - -@CONCLUDE@ diff --git a/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx b/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx deleted file mode 100644 index 98b1e660b..000000000 --- a/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx +++ /dev/null @@ -1,1064 +0,0 @@ -//============================================================================= -// File : NETGENPlugin_NETGEN_3D.cxx -// Moved here from SMESH_NETGEN_3D.cxx -// Created : lundi 27 Janvier 2003 -// Author : Nadir BOUHAMOU (CEA) -// Project : SALOME -// Copyright : CEA 2003 -// $Header$ -//============================================================================= -using namespace std; - -#include "NETGENPlugin_NETGEN_3D.hxx" -#include "SMESH_Gen.hxx" -#include "SMESH_Mesh.hxx" - -#include "SMDS_MeshElement.hxx" -#include "SMDS_MeshNode.hxx" -#include "SMDS_FacePosition.hxx" - -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "utilities.h" - -/* - Netgen include files -*/ - -#include "nglib.h" - -//============================================================================= -/*! - * - */ -//============================================================================= - -NETGENPlugin_NETGEN_3D::NETGENPlugin_NETGEN_3D(int hypId, int studyId, - SMESH_Gen* gen) - : SMESH_3D_Algo(hypId, studyId, gen) -{ - MESSAGE("NETGENPlugin_NETGEN_3D::NETGENPlugin_NETGEN_3D"); - _name = "NETGEN_3D"; -// _shapeType = TopAbs_SOLID; - _shapeType = (1 << TopAbs_SHELL) | (1 << TopAbs_SOLID);// 1 bit /shape type -// MESSAGE("_shapeType octal " << oct << _shapeType); - _compatibleHypothesis.push_back("MaxElementVolume"); - - _maxElementVolume = 0.; - - _hypMaxElementVolume = NULL; -} - -//============================================================================= -/*! - * - */ -//============================================================================= - -NETGENPlugin_NETGEN_3D::~NETGENPlugin_NETGEN_3D() -{ - MESSAGE("NETGENPlugin_NETGEN_3D::~NETGENPlugin_NETGEN_3D"); -} - -//============================================================================= -/*! - * - */ -//============================================================================= - -bool NETGENPlugin_NETGEN_3D::CheckHypothesis - (SMESH_Mesh& aMesh, - const TopoDS_Shape& aShape, - SMESH_Hypothesis::Hypothesis_Status& aStatus) -{ - MESSAGE("NETGENPlugin_NETGEN_3D::CheckHypothesis"); - - _hypMaxElementVolume = NULL; - - list::const_iterator itl; - const SMESHDS_Hypothesis* theHyp; - - const list& hyps = GetUsedHypothesis(aMesh, aShape); - int nbHyp = hyps.size(); - if (!nbHyp) - { - aStatus = SMESH_Hypothesis::HYP_MISSING; - return false; // can't work with no hypothesis - } - - itl = hyps.begin(); - theHyp = (*itl); // use only the first hypothesis - - string hypName = theHyp->GetName(); - int hypId = theHyp->GetID(); - SCRUTE(hypName); - - bool isOk = false; - - if (hypName == "MaxElementVolume") - { - _hypMaxElementVolume = static_cast (theHyp); - ASSERT(_hypMaxElementVolume); - _maxElementVolume = _hypMaxElementVolume->GetMaxVolume(); - isOk =true; - aStatus = SMESH_Hypothesis::HYP_OK; - } - else - aStatus = SMESH_Hypothesis::HYP_INCOMPATIBLE; - - return isOk; -} - -//============================================================================= -/*! - *Here we are going to use the NETGEN mesher - */ -//============================================================================= - -bool NETGENPlugin_NETGEN_3D::Compute(SMESH_Mesh& aMesh, - const TopoDS_Shape& aShape) -{ - MESSAGE("NETGENPlugin_NETGEN_3D::Compute with maxElmentsize = " << _maxElementVolume); - - bool isOk = false; - SMESHDS_Mesh* meshDS = aMesh.GetMeshDS(); - SMESH_subMesh* theSubMesh = aMesh.GetSubMesh(aShape); - //const Handle(SMESHDS_SubMesh)& subMeshDS = theSubMesh->GetSubMeshDS(); - - map netgenToDS; - - MESSAGE("NETGENPlugin_NETGEN_3D::Compute Checking the mesh Faces"); - - // check if all faces were meshed by a triangle mesher (here MESFISTO_2D) - - vector meshFaces; - vector shapeFaces; - - for (TopExp_Explorer exp(aShape,TopAbs_FACE);exp.More();exp.Next()) - { - TopoDS_Shape aShapeFace = exp.Current(); - SMESH_subMesh* aSubMesh = aMesh.GetSubMeshContaining(exp.Current()); - ASSERT (aSubMesh); - int internal_size = meshFaces.size(); - int index = 0; - for (int i = 0;iGetSubShape(); - TopoDS_Shape aFace = shapeFaces[i]; - SMESH_Algo* algoFace = _gen->GetAlgo(aMesh, aShapeFace); - string algoFaceName = algoFace->GetName(); - SCRUTE(algoFaceName); - if (algoFaceName != "MEFISTO_2D") - { - SCRUTE(algoFaceName); - ASSERT(0); - return false; - } - - bool orientationMeshFace = (aFace.Orientation() == aShapeFace.Orientation()); - - const SMESHDS_SubMesh* aSubMeshDSFace = meshFaces[i]->GetSubMeshDS(); - SCRUTE(aSubMeshDSFace); - - int nbNodes = aSubMeshDSFace->NbNodes(); - NbTotOfNodesFaces += nbNodes; - int nbTria = aSubMeshDSFace->NbElements(); - NbTotOfTria += nbTria; - int index = 0; - - MESSAGE("NETGENPlugin_NETGEN_3D::Compute The mesh Face " << (i+1) << " has " << nbNodes << " face internal Nodes, " << nbTria << " triangles"); - - SCRUTE(orientationMeshFace); - - if (orientationMeshFace) - { - MESSAGE("The mesh and face have the same orientation"); - } - else - { - MESSAGE("The mesh and face have different orientations"); - } - - SMDS_NodeIteratorPtr iteratorNodes = aSubMeshDSFace->GetNodes(); - SCRUTE(nbNodes); - index = 0; - while(iteratorNodes->more()) - { - index++; - const SMDS_MeshNode * node = iteratorNodes->next(); -// int nodeId = node->GetID(); -// double nodeX = node->X(); -// double nodeY = node->Y(); -// double nodeZ = node->Z(); -// MESSAGE("NODE -> ID = " << nodeId << " X = " << nodeX << " Y = " << nodeY << " Z = " << nodeZ); - } - - SCRUTE(index); - - SMDS_ElemIteratorPtr iteratorTriangle = aSubMeshDSFace->GetElements(); - - SCRUTE(nbTria); - index = 0; - int numberOfDegeneratedTriangle = 0; - while(iteratorTriangle->more()) - { - index++; - const SMDS_MeshElement * triangle = iteratorTriangle->next(); - int triangleId = triangle->GetID(); - - SMDS_ElemIteratorPtr triangleNodesIt = triangle->nodesIterator(); - - const SMDS_MeshNode * node1 = static_cast(triangleNodesIt->next()); - double node1X = node1->X(); - double node1Y = node1->Y(); - double node1Z = node1->Z(); - - const SMDS_MeshNode * node2 = static_cast(triangleNodesIt->next()); - double node2X = node2->X(); - double node2Y = node2->Y(); - double node2Z = node2->Z(); - - const SMDS_MeshNode * node3 = static_cast(triangleNodesIt->next()); - double node3X = node3->X(); - double node3Y = node3->Y(); - double node3Z = node3->Z(); - - int triangleNode1 = node1->GetID(); - int triangleNode2 = node2->GetID(); - int triangleNode3 = node3->GetID(); - - // Compute the triangle surface - - double vect1 = ((node2Y - node1Y)*(node3Z - node1Z) - (node2Z - node1Z)*(node3Y - node1Y)); - double vect2 = - ((node2X - node1X)*(node3Z - node1Z) - (node2Z - node1Z)*(node3X - node1X)); - double vect3 = ((node2X - node1X)*(node3Y - node1Y) - (node2Y - node1Y)*(node3X - node1X)); - double epsilon = 1.0e-6; - - bool triangleIsDegenerated = ((abs(vect1) ID = " << triangleId << " N1 = " << triangleNode1 << " N2 = " << triangleNode2 << " N3 = " << triangleNode3 << " is degenerated"); -// MESSAGE("NODE -> ID = " << triangleNode1 << " X = " << node1X << " Y = " << node1Y << " Z = " << node1Z); -// MESSAGE("NODE -> ID = " << triangleNode2 << " X = " << node2X << " Y = " << node2Y << " Z = " << node2Z); -// MESSAGE("NODE -> ID = " << triangleNode3 << " X = " << node3X << " Y = " << node3Y << " Z = " << node3Z); - numberOfDegeneratedTriangle++; - } - else - { -// MESSAGE("TRIANGLE -> ID = " << triangleId << " N1 = " << triangleNode1 << " N2 = " << triangleNode2 << " N3 = " << triangleNode3 << " is normal"); - } - } - - if (numberOfDegeneratedTriangle > 0) - MESSAGE("WARNING THERE IS(ARE) " << numberOfDegeneratedTriangle << " degenerated triangle on this face"); - - SCRUTE(index); - } - - - - SCRUTE(NbTotOfTria); - SCRUTE(NbTotOfNodesFaces); - - MESSAGE("NETGENPlugin_NETGEN_3D::Compute Checking the mesh Edges"); - - // check if all edges were meshed by a edge mesher (here Regular_1D) - - vector meshEdges; - for (TopExp_Explorer exp(aShape,TopAbs_EDGE);exp.More();exp.Next()) - { - SMESH_subMesh* aSubMesh = aMesh.GetSubMeshContaining(exp.Current()); - ASSERT (aSubMesh); - int internal_size = meshEdges.size(); - int index = 0; - for (int i = 0;iGetSubShape(); - SMESH_Algo* algoEdge = _gen->GetAlgo(aMesh, aShapeEdge); - string algoEdgeName = algoEdge->GetName(); - SCRUTE(algoEdgeName); - if (algoEdgeName != "Regular_1D") - { - SCRUTE(algoEdgeName); - ASSERT(0); - return false; - } - - const SMESHDS_SubMesh* aSubMeshDSEdge = meshEdges[i]->GetSubMeshDS(); - SCRUTE(aSubMeshDSEdge); - - int nbNodes = aSubMeshDSEdge->NbNodes(); - NbTotOfNodesEdges += nbNodes; - int nbSegs = aSubMeshDSEdge->NbElements(); - NbTotOfSegs += nbSegs; - - MESSAGE("NETGENPlugin_NETGEN_3D::Compute The mesh Edge " << (i+1) << " has " << nbNodes << " edge internal Nodes, " << nbSegs << " segments"); - - SMDS_NodeIteratorPtr iteratorNodes = aSubMeshDSEdge->GetNodes(); - SCRUTE(nbNodes); - int index = 0; - while(iteratorNodes->more()) - { - index++; - const SMDS_MeshNode * node = iteratorNodes->next(); -// int nodeId = node->GetID(); -// double nodeX = node->X(); -// double nodeY = node->Y(); -// double nodeZ = node->Z(); -// MESSAGE("NODE -> ID = " << nodeId << " X = " << nodeX << " Y = " << nodeY << " Z = " << nodeZ); - } - - SCRUTE(index); - } - - SCRUTE(NbTotOfNodesEdges); - SCRUTE(NbTotOfSegs); - - MESSAGE("NETGENPlugin_NETGEN_3D::Compute Checking the mesh Vertices"); - - vector meshVertices; - for (TopExp_Explorer exp(aShape,TopAbs_VERTEX);exp.More();exp.Next()) - { - SMESH_subMesh* aSubMesh = aMesh.GetSubMeshContaining(exp.Current()); - ASSERT (aSubMesh); - int internal_size = meshVertices.size(); - int index = 0; - for (int i = 0;iGetSubShape(); - - const SMESHDS_SubMesh * aSubMeshDSVertex = meshVertices[i]->GetSubMeshDS(); - SCRUTE(aSubMeshDSVertex); - - int nbNodes = aSubMeshDSVertex->NbNodes(); - NbTotOfNodesVertices += nbNodes; - - MESSAGE("NETGENPlugin_NETGEN_3D::Compute The mesh Vertex " << (i+1) << " has " << nbNodes << " Nodes"); - - SMDS_NodeIteratorPtr iteratorNodes = aSubMeshDSVertex->GetNodes(); - SCRUTE(nbNodes); - int index = 0; - while(iteratorNodes->more()) - { - index++; - const SMDS_MeshNode * node = iteratorNodes->next(); -// int nodeId = node->GetID(); -// double nodeX = node->X(); -// double nodeY = node->Y(); -// double nodeZ = node->Z(); -// MESSAGE("NODE -> ID = " << nodeId << " X = " << nodeX << " Y = " << nodeY << " Z = " << nodeZ); - } - - SCRUTE(index); - } - - SCRUTE(NbTotOfNodesVertices); - - MESSAGE("NETGENPlugin_NETGEN_3D::Compute --> Analysis of all shell mesh"); - - vector meshShells; - TopoDS_Shell aShell; - - for (TopExp_Explorer exp(aShape,TopAbs_SHELL);exp.More();exp.Next()) - { - SMESH_subMesh* aSubMesh = aMesh.GetSubMesh(exp.Current()); - ASSERT(aSubMesh); - SCRUTE(aSubMesh); - aShell = TopoDS::Shell(exp.Current()); - meshShells.push_back(aSubMesh); - } - - int numberOfShells = meshShells.size(); - SCRUTE(numberOfShells); - - if (numberOfShells == 1) - { - MESSAGE("NETGENPlugin_NETGEN_3D::Compute Only one shell --> generation of the mesh using directly Netgen"); - - /* - Prepare the Netgen surface mesh from the SMESHDS - */ - - MESSAGE("NETGENPlugin_NETGEN_3D::Compute Prepare the Netgen surface mesh from the SMESHDS"); - - int spaceDimension = 3; - int nbNodesByTri = 3; - int nbNodesByTetra = 4; - - int Netgen_NbOfNodes = NbTotOfNodesFaces + - NbTotOfNodesEdges + - NbTotOfNodesVertices; - int Netgen_NbOfTria = NbTotOfTria; - int Netgen_param2ndOrder = 0; - double Netgen_paramFine = 1.; - double Netgen_paramSize = _maxElementVolume; - - SCRUTE(Netgen_NbOfNodes); - SCRUTE(Netgen_NbOfTria); - - double * Netgen_Coordinates = new double [spaceDimension* - Netgen_NbOfNodes]; - int * listNodeCoresNetgenSmesh = new int [Netgen_NbOfNodes]; - int * Netgen_Connectivity = new int [nbNodesByTri*Netgen_NbOfTria]; - double * Netgen_point = new double [spaceDimension]; - int * Netgen_triangle = new int [nbNodesByTri]; - int * Netgen_tetrahedron = new int [nbNodesByTetra]; - - for (int i=0; iGetSubMeshDS(); - - SMDS_NodeIteratorPtr iteratorNodes = aSubMeshDSVertex->GetNodes(); - - while(iteratorNodes->more()) - { - const SMDS_MeshNode * node = iteratorNodes->next(); - int nodeId = node->GetID(); - double nodeX = node->X(); - double nodeY = node->Y(); - double nodeZ = node->Z(); -// MESSAGE("NODE -> ID = " << nodeId << " X = " << nodeX << " Y = " << nodeY << " Z = " << nodeZ); - listNodeCoresNetgenSmesh[indexNodes] = nodeId; - int index = indexNodes*spaceDimension; - Netgen_Coordinates[index] = nodeX; - Netgen_Coordinates[index+1] = nodeY; - Netgen_Coordinates[index+2] = nodeZ; - netgenToDS[indexNodes] = node; - indexNodes++; - } - } - - for (int i=0; iGetSubMeshDS(); - - SMDS_NodeIteratorPtr iteratorNodes = aSubMeshDSEdge->GetNodes(); - - while(iteratorNodes->more()) - { - const SMDS_MeshNode * node = iteratorNodes->next(); - int nodeId = node->GetID(); - double nodeX = node->X(); - double nodeY = node->Y(); - double nodeZ = node->Z(); -// MESSAGE("NODE -> ID = " << nodeId << " X = " << nodeX << " Y = " << nodeY << " Z = " << nodeZ); - listNodeCoresNetgenSmesh[indexNodes] = node->GetID(); - int index = indexNodes*spaceDimension; - Netgen_Coordinates[index] = node->X(); - Netgen_Coordinates[index+1] = node->Y(); - Netgen_Coordinates[index+2] = node->Z(); - netgenToDS[indexNodes] = node; - indexNodes++; - } - } - - for (int i=0; iGetSubMeshDS(); - - SMDS_NodeIteratorPtr iteratorNodes = aSubMeshDSFace->GetNodes(); - - while(iteratorNodes->more()) - { - const SMDS_MeshNode * node = iteratorNodes->next(); - int nodeId = node->GetID(); - double nodeX = node->X(); - double nodeY = node->Y(); - double nodeZ = node->Z(); -// MESSAGE("NODE -> ID = " << nodeId << " X = " << nodeX << " Y = " << nodeY << " Z = " << nodeZ); - listNodeCoresNetgenSmesh[indexNodes] = nodeId; - int index = indexNodes*spaceDimension; - Netgen_Coordinates[index] = nodeX; - Netgen_Coordinates[index+1] = nodeY; - Netgen_Coordinates[index+2] = nodeZ; - netgenToDS[indexNodes] = node; - indexNodes++; - } - } - - SCRUTE(indexNodes); - - for (int i=0; iGetSubMeshDS(); - - TopoDS_Shape aFace = shapeFaces[i]; - - SMDS_ElemIteratorPtr iteratorTriangle = aSubMeshDSFace->GetElements(); - - TopoDS_Shape aShapeFace = meshFaces[i]->GetSubShape(); - - bool orientationMeshFace = (aFace.Orientation() == aShapeFace.Orientation()); - - SCRUTE(orientationMeshFace); - - if (orientationMeshFace) - { - MESSAGE("The mesh and face have the same orientation"); - - while(iteratorTriangle->more()) - { - const SMDS_MeshElement * triangle = iteratorTriangle->next(); - int triangleId = triangle->GetID(); - - SMDS_ElemIteratorPtr triangleNodesIt = triangle->nodesIterator(); - - int triangleNode1 = (triangleNodesIt->next())->GetID(); - int triangleNode2 = (triangleNodesIt->next())->GetID(); - int triangleNode3 = (triangleNodesIt->next())->GetID(); - -// MESSAGE("TRIANGLE -> ID = " << triangleId << " N1 = " << triangleNode1 << " N2 = " << triangleNode2 << " N3 = " << triangleNode3); - - int N1New = 0; - int N2New = 0; - int N3New = 0; - int index = indexTrias*nbNodesByTri; - - for (int j=0; jmore()) - { - const SMDS_MeshElement * triangle = iteratorTriangle->next(); - int triangleId = triangle->GetID(); - - SMDS_ElemIteratorPtr triangleNodesIt = triangle->nodesIterator(); - - int triangleNode1 = (triangleNodesIt->next())->GetID(); - int triangleNode3 = (triangleNodesIt->next())->GetID(); - int triangleNode2 = (triangleNodesIt->next())->GetID(); - -// MESSAGE("TRIANGLE -> ID = " << triangleId << " N1 = " << triangleNode1 << " N2 = " << triangleNode2 << " N3 = " << triangleNode3); - - int N1New = 0; - int N2New = 0; - int N3New = 0; - int index = indexTrias*nbNodesByTri; - - for (int j=0; j=1) && (Nij<=Netgen_NbOfNodes)); - - nodesUsed[Nij-1] = 1; - Netgen_Connectivity[i*nbNodesByTri+j] = Nij; - } - - for (int i=0; i Adding the New Nodes to SMESHDS"); - - for (int i=0; iAddNode(Netgen_CoordinatesNew[index], - Netgen_CoordinatesNew[index+1], - Netgen_CoordinatesNew[index+2]); - - meshDS->SetNodeInVolume(node, aShell); - - index = i+Netgen_NbOfNodes; - netgenToDS[index] = node; - - listNodeShellCoresNetgenSmesh[i] = node->GetID(); - } - - SCRUTE(Netgen_NbOfNodesNew); - - SCRUTE(netgenToDS.size()); - - for (int i=0; i Adding the New elements (Tetrahedrons) to the SMESHDS"); - - for (int i=0; iAddVolume(node1,node2,node3,node4); - - meshDS->SetMeshElementOnShape(elt, aShell); - } - - /* - Free the memory needed by to generate the Netgen Mesh - */ - - MESSAGE("NETGENPlugin_NETGEN_3D::Compute Free the memory needed by to generate the Netgen Mesh"); - - delete [] Netgen_Coordinates; - delete [] Netgen_Connectivity; - delete [] Netgen_CoordinatesNew; - delete [] Netgen_ConnectivityNew; - delete [] Netgen_point; - delete [] Netgen_triangle; - delete [] Netgen_tetrahedron; - - delete [] listNodeCoresNetgenSmesh; - delete [] listNodeShellCoresNetgenSmesh; - - Ng_DeleteMesh(Netgen_mesh); - Ng_Exit(); - - /* - Verification - */ - - { - MESSAGE("NETGENPlugin_NETGEN_3D::Compute Verification of the Shell mesh"); - - TopoDS_Shape aShapeShell = meshShells[0]->GetSubShape(); - SMESH_Algo* algoShell = _gen->GetAlgo(aMesh, aShapeShell); - string algoShellName = algoShell->GetName(); - SCRUTE(algoShellName); - if (algoShellName != "NETGEN_3D") - { - SCRUTE(algoShellName); - ASSERT(0); - return false; - } - - const SMESHDS_SubMesh * aSubMeshDSShell = meshShells[0]->GetSubMeshDS(); - SCRUTE(&aSubMeshDSShell); - - int nbNodes = aSubMeshDSShell->NbNodes(); - int nbTetra = aSubMeshDSShell->NbElements(); - - MESSAGE("NETGENPlugin_NETGEN_3D::Compute The mesh Shell has " << nbNodes << " shell internal Nodes, " << nbTetra << " tetrahedrons"); - - SMDS_NodeIteratorPtr iteratorNodes = aSubMeshDSShell->GetNodes(); - - SCRUTE(nbNodes); - - int index; - - index = 0; - - while(iteratorNodes->more()) - { - index++; - const SMDS_MeshNode * node = iteratorNodes->next(); - int nodeId = node->GetID(); - double nodeX = node->X(); - double nodeY = node->Y(); - double nodeZ = node->Z(); -// MESSAGE("NODE -> ID = " << nodeId << " X = " << nodeX << " Y = " << nodeY << " Z = " << nodeZ); - } - - SCRUTE(index); - - SMDS_ElemIteratorPtr iteratorTetra = aSubMeshDSShell->GetElements(); - - SCRUTE(nbTetra); - - index = 0; - while(iteratorTetra->more()) - { - index++; - const SMDS_MeshElement * tetra = iteratorTetra->next(); - int tetraId = tetra->GetID(); - - SMDS_ElemIteratorPtr tetraNodesIt = tetra->nodesIterator(); - - int tetraNode1 = (tetraNodesIt->next())->GetID(); - int tetraNode2 = (tetraNodesIt->next())->GetID(); - int tetraNode3 = (tetraNodesIt->next())->GetID(); - int tetraNode4 = (tetraNodesIt->next())->GetID(); - -// MESSAGE("TETRAHEDRON -> ID = " << tetraId << " N1 = " << tetraNode1 << " N2 = " << tetraNode2 << " N3 = " << tetraNode3 << " N4 = " << tetraNode4); - - } - - SCRUTE(index); - } - } - else - { - SCRUTE(numberOfShells); - MESSAGE("NETGENPlugin_NETGEN_3D::Compute ERROR More than one shell ????? "); - return false; - } - - return true; -} - - -//============================================================================= -/*! - * - */ -//============================================================================= - -ostream & NETGENPlugin_NETGEN_3D::SaveTo(ostream & save) -{ - return save; -} - -//============================================================================= -/*! - * - */ -//============================================================================= - -istream & NETGENPlugin_NETGEN_3D::LoadFrom(istream & load) -{ - return load; -} - -//============================================================================= -/*! - * - */ -//============================================================================= - -ostream & operator << (ostream & save, NETGENPlugin_NETGEN_3D & hyp) -{ - return hyp.SaveTo( save ); -} - -//============================================================================= -/*! - * - */ -//============================================================================= - -istream & operator >> (istream & load, NETGENPlugin_NETGEN_3D & hyp) -{ - return hyp.LoadFrom( load ); -} diff --git a/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.hxx b/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.hxx deleted file mode 100644 index b0858806d..000000000 --- a/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.hxx +++ /dev/null @@ -1,43 +0,0 @@ -//============================================================================= -// 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_ - -#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 -{ -public: - NETGENPlugin_NETGEN_3D(int hypId, int studyId, SMESH_Gen* gen); - virtual ~NETGENPlugin_NETGEN_3D(); - - virtual bool CheckHypothesis(SMESH_Mesh& aMesh, - const TopoDS_Shape& aShape, - SMESH_Hypothesis::Hypothesis_Status& aStatus); - - virtual bool Compute(SMESH_Mesh& aMesh, - const TopoDS_Shape& aShape); - - ostream & SaveTo(ostream & save); - istream & LoadFrom(istream & load); - friend ostream & operator << (ostream & save, NETGENPlugin_NETGEN_3D & hyp); - friend istream & operator >> (istream & load, NETGENPlugin_NETGEN_3D & hyp); - -protected: - double _maxElementVolume; - - const StdMeshers_MaxElementVolume* _hypMaxElementVolume; -}; - -#endif diff --git a/src/NETGENPlugin/NETGENPlugin_NETGEN_3D_i.cxx b/src/NETGENPlugin/NETGENPlugin_NETGEN_3D_i.cxx deleted file mode 100644 index 489d6822e..000000000 --- a/src/NETGENPlugin/NETGENPlugin_NETGEN_3D_i.cxx +++ /dev/null @@ -1,85 +0,0 @@ -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// -// File : NETGENPlugin_NETGEN_3D_i.cxx -// Moved here from SMESH_NETGEN_3D_i.cxx -// Author : Nadir Bouhamou CEA -// Module : SMESH -// $Header$ - -using namespace std; -#include "NETGENPlugin_NETGEN_3D_i.hxx" -#include "SMESH_Gen.hxx" - -#include "Utils_CorbaException.hxx" -#include "utilities.h" - -//============================================================================= -/*! - * NETGENPlugin_NETGEN_3D_i::NETGENPlugin_NETGEN_3D_i - * - * Constructor - */ -//============================================================================= - -NETGENPlugin_NETGEN_3D_i::NETGENPlugin_NETGEN_3D_i( PortableServer::POA_ptr thePOA, - int theStudyId, - ::SMESH_Gen* theGenImpl ) - : SALOME::GenericObj_i( thePOA ), - SMESH_Hypothesis_i( thePOA ), - SMESH_Algo_i( thePOA ), - SMESH_3D_Algo_i( thePOA ) -{ - MESSAGE( "NETGENPlugin_NETGEN_3D_i::NETGENPlugin_NETGEN_3D_i" ); - myBaseImpl = new ::NETGENPlugin_NETGEN_3D( theGenImpl->GetANewId(), - theStudyId, - theGenImpl ); -} - -//============================================================================= -/*! - * NETGENPlugin_NETGEN_3D_i::~NETGENPlugin_NETGEN_3D_i - * - * Destructor - */ -//============================================================================= - -NETGENPlugin_NETGEN_3D_i::~NETGENPlugin_NETGEN_3D_i() -{ - MESSAGE( "NETGENPlugin_NETGEN_3D_i::~NETGENPlugin_NETGEN_3D_i" ); -} - -//============================================================================= -/*! - * NETGENPlugin_NETGEN_3D_i::GetImpl - * - * Get implementation - */ -//============================================================================= - -::NETGENPlugin_NETGEN_3D* NETGENPlugin_NETGEN_3D_i::GetImpl() -{ - MESSAGE( "NETGENPlugin_NETGEN_3D_i::GetImpl" ); - return ( ::NETGENPlugin_NETGEN_3D* )myBaseImpl; -} - diff --git a/src/NETGENPlugin/NETGENPlugin_NETGEN_3D_i.hxx b/src/NETGENPlugin/NETGENPlugin_NETGEN_3D_i.hxx deleted file mode 100644 index 724fafa55..000000000 --- a/src/NETGENPlugin/NETGENPlugin_NETGEN_3D_i.hxx +++ /dev/null @@ -1,58 +0,0 @@ -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// -// File : NETGENPlugin_NETGEN_3D_i.hxx -// Moved here from SMESH_NETGEN_3D_i.hxx -// Author : Nadir Bouhamou CEA -// Module : SMESH -// $Header$ - -#ifndef _NETGENPlugin_NETGEN_3D_I_HXX_ -#define _NETGENPlugin_NETGEN_3D_I_HXX_ - -#include -#include CORBA_SERVER_HEADER(SMESH_NetgenAlgorithm) - -#include "SMESH_3D_Algo_i.hxx" -#include "NETGENPlugin_NETGEN_3D.hxx" - -// ====================================================== -// NETGEN 3d algorithm -// ====================================================== -class NETGENPlugin_NETGEN_3D_i: - public virtual POA_NETGENPlugin::NETGENPlugin_NETGEN_3D, - public virtual SMESH_3D_Algo_i -{ -public: - // Constructor - NETGENPlugin_NETGEN_3D_i( PortableServer::POA_ptr thePOA, - int theStudyId, - ::SMESH_Gen* theGenImpl ); - // Destructor - virtual ~NETGENPlugin_NETGEN_3D_i(); - - // Get implementation - ::NETGENPlugin_NETGEN_3D* GetImpl(); -}; - -#endif diff --git a/src/NETGENPlugin/NETGENPlugin_i.cxx b/src/NETGENPlugin/NETGENPlugin_i.cxx deleted file mode 100644 index 7ec0e06f5..000000000 --- a/src/NETGENPlugin/NETGENPlugin_i.cxx +++ /dev/null @@ -1,60 +0,0 @@ -// SMESH NETGENPlugin : implementaion of SMESH idl descriptions -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// -// File : NETGENPlugin.cxx -// Author : Julia DOROVSKIKH -// Module : SMESH -// $Header$ - -using namespace std; -#include "SMESH_Hypothesis_i.hxx" -#include "SMESH_Gen_i.hxx" - -#include "utilities.h" - -#include "NETGENPlugin_NETGEN_3D_i.hxx" - -//============================================================================= -/*! - * - */ -//============================================================================= - -extern "C" -{ - GenericHypothesisCreator_i* GetHypothesisCreator (const char* aHypName) - { - MESSAGE("GetHypothesisCreator " << aHypName); - - GenericHypothesisCreator_i* aCreator = 0; - - // Hypotheses - - // Algorithms - if (strcmp(aHypName, "NETGEN_3D") == 0) - aCreator = new HypothesisCreator_i; - else ; - - return aCreator; - } -} diff --git a/src/NETGENPlugin/NETGENPlugin_icons.po b/src/NETGENPlugin/NETGENPlugin_icons.po deleted file mode 100644 index a3f6297d7..000000000 --- a/src/NETGENPlugin/NETGENPlugin_icons.po +++ /dev/null @@ -1,20 +0,0 @@ -# This is a Qt message file in .po format. Each msgid starts with -# a scope. This scope should *NOT* be translated - eg. "Foo::Bar" -# would be translated to "Pub", not "Foo::Pub". -msgid "" -msgstr "" -"Project-Id-Version: PROJECT VERSION\n" -"POT-Creation-Date: 2002-05-28 10:57:43 AM CEST\n" -"PO-Revision-Date: YYYY-MM-DD\n" -"Last-Translator: FULLNAME \n" -"Content-Type: text/plain; charset=iso-8859-1\n" - - -#----------------------------------------------------------- -# ObjectBrowser -#----------------------------------------------------------- - -#mesh_tree_algo_netgen -msgid "ICON_SMESH_TREE_ALGO_NETGEN_3D" -msgstr "mesh_tree_algo_tetra.png" -#msgstr "mesh_tree_algo_netgen.png" -- 2.30.2