]> SALOME platform Git repositories - plugins/netgenplugin.git/blob - src/NETGEN/netgen43ForSalome.patch
Salome HOME
Initial version
[plugins/netgenplugin.git] / src / NETGEN / netgen43ForSalome.patch
1 diff -N -r -u netgen43/libsrc/include/spline2d.hpp /tmp/netgen43/libsrc/include/spline2d.hpp
2 --- netgen43/libsrc/include/spline2d.hpp        1970-01-01 01:00:00.000000000 +0100
3 +++ /tmp/netgen43/libsrc/include/spline2d.hpp   2003-12-10 16:28:12.000000000 +0100
4 @@ -0,0 +1 @@
5 +#include "../geom2d/spline2d.hpp"
6 diff -N -r -u netgen43/libsrc/include/splinegeometry2.hpp /tmp/netgen43/libsrc/include/splinegeometry2.hpp
7 --- netgen43/libsrc/include/splinegeometry2.hpp 1970-01-01 01:00:00.000000000 +0100
8 +++ /tmp/netgen43/libsrc/include/splinegeometry2.hpp    2003-12-10 16:28:23.000000000 +0100
9 @@ -0,0 +1 @@
10 +#include "../geom2d/splinegeometry2.hpp"
11 diff -N -r -u netgen43/libsrc/interface/Makefile /tmp/netgen43/libsrc/interface/Makefile
12 --- netgen43/libsrc/interface/Makefile  2003-05-07 16:01:43.000000000 +0200
13 +++ /tmp/netgen43/libsrc/interface/Makefile     2003-12-10 15:59:47.000000000 +0100
14 @@ -1,4 +1,4 @@
15 -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
16 +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
17  #
18  lib = nginterface
19  libpath = libsrc/interface
20 diff -N -r -u netgen43/libsrc/interface/nglib.cpp /tmp/netgen43/libsrc/interface/nglib.cpp
21 --- netgen43/libsrc/interface/nglib.cpp 2003-05-07 16:01:43.000000000 +0200
22 +++ /tmp/netgen43/libsrc/interface/nglib.cpp    2003-12-10 16:32:54.000000000 +0100
23 @@ -23,6 +23,20 @@
24  
25  #include "nglib.h"
26  
27 +namespace netgen
28 +{
29 +  char geomfilename [100];
30 +
31 +  //Destination for messages, errors, ...
32 +  void Ng_PrintDest(const char * s)
33 +  {
34 +    (*mycout) << s << flush;
35 +  }
36 +
37 +#include <spline2d.hpp>
38 +#include <splinegeometry2.hpp>
39 +}
40 +
41  using namespace netgen;
42  
43  // constants and types:
44 @@ -171,8 +185,6 @@
45  // CSG Geometry
46  
47  // FlexLexer * lexer;
48 -char geomfilename [100];
49 -
50  
51  // 2D Meshing Functions:
52  
53 @@ -362,7 +374,18 @@
54           cout << "e(" << readedges.Get(i) << "," << readedges.Get(i+1) << ")" << endl;
55         }
56        */
57 -      geo->AddEdges(readedges);
58 +
59 +      ARRAY< Point<3> > readedges1;
60 +
61 +      for (i = 1; i <= readedges.Size(); i++)
62 +       {
63 +         Point3d readedgesData = readedges.Get(i);
64 +         Point <3> readedges1Data = Point<3>(readedgesData.X(),readedgesData.Y(),readedgesData.Z());
65 +
66 +         readedges1.Append(readedges1Data);
67 +       }
68 +
69 +      geo->AddEdges(readedges1);
70      }
71  
72    if (geo->GetStatus() == STLTopology::STL_GOOD || geo->GetStatus() == STLTopology::STL_WARNING) return NG_OK;
73 @@ -472,7 +495,14 @@
74      n = Vec3d(nv[0],nv[1],nv[2]);
75    }
76  
77 -  readtrias.Append(STLReadTriangle(apts,n));
78 +  Point<3> apts1[3];
79 +  apts1[0] = Point<3>(p1[0],p1[1],p1[2]);
80 +  apts1[1] = Point<3>(p2[0],p2[1],p2[2]);
81 +  apts1[2] = Point<3>(p3[0],p3[1],p3[2]);
82 +
83 +  Vec<3> n1 = Vec<3>(n.X(),n.Y(),n.Z());
84 +
85 +  readtrias.Append(STLReadTriangle(apts1,n1));
86  }
87  
88    // add (optional) edges:
89 @@ -487,30 +517,29 @@
90  
91  // compatibility functions:
92  
93 -void MyError (const char * ch)
94 +void netgen::MyError (const char * ch)
95  {
96    cerr << ch;
97  }
98  
99 -//Destination for messages, errors, ...
100 -void Ng_PrintDest(const char * s)
101 -{
102 -  (*mycout) << s << flush;
103 -}
104 -
105 -
106 -double GetTime ()
107 +double netgen::GetTime ()
108  {
109    return 0;
110  }
111  
112 -void ResetTime ()
113 +void netgen::ResetTime ()
114  {
115    ;
116  }
117  
118 -void MyBeep (int i)
119 +void netgen::MyBeep (int i)
120  {
121    ;
122  }
123  
124 +void MeshFromSpline2D (SplineGeometry2d & geometry,
125 +                      Mesh *& mesh, 
126 +                      MeshingParameters & mp)
127 +{
128 +  MeshFromSpline2D (geometry, mesh,  mp);
129 +}
130 diff -N -r -u netgen43/libsrc/makefile.mach.LINUX /tmp/netgen43/libsrc/makefile.mach.LINUX
131 --- netgen43/libsrc/makefile.mach.LINUX 2003-05-07 16:01:43.000000000 +0200
132 +++ /tmp/netgen43/libsrc/makefile.mach.LINUX    2003-12-10 15:12:18.000000000 +0100
133 @@ -14,7 +14,8 @@
134  #
135  CFLAGS2 =
136  # pg stands for profiling - also in linkflags2
137 -CPLUSPLUSFLAGS2 =  -O2 -I/usr/X11R6/include -DLINUX -DOPENGL
138 +#CPLUSPLUSFLAGS2 =  -O2 -I/usr/X11R6/include -DLINUX -DOPENGL
139 +CPLUSPLUSFLAGS2 =  -O2 -I/usr/X11R6/include -DLINUX
140  # -fomit-frame-pointer
141  # -ffast-math
142  #
143 diff -N -r -u netgen43/libsrc/meshing/improve2.cpp /tmp/netgen43/libsrc/meshing/improve2.cpp
144 --- netgen43/libsrc/meshing/improve2.cpp        2003-05-07 16:01:43.000000000 +0200
145 +++ /tmp/netgen43/libsrc/meshing/improve2.cpp   2003-12-10 15:42:00.000000000 +0100
146 @@ -3,7 +3,7 @@
147  #include "meshing.hpp"
148  #include <opti.hpp>
149  
150 -#include <visual.hpp>
151 +/*#include <visual.hpp>*/
152  
153  
154  namespace netgen
155 diff -N -r -u netgen43/libsrc/meshing/meshing2.cpp /tmp/netgen43/libsrc/meshing/meshing2.cpp
156 --- netgen43/libsrc/meshing/meshing2.cpp        2003-05-07 16:01:43.000000000 +0200
157 +++ /tmp/netgen43/libsrc/meshing/meshing2.cpp   2003-12-10 15:34:35.000000000 +0100
158 @@ -1785,7 +1785,7 @@
159  
160  
161  #else
162 -void glrender (int wait)
163 +void netgen::glrender (int wait)
164  {
165    ;
166  } 
167 diff -N -r -u netgen43/libsrc/visualization/stlmeshing.cpp /tmp/netgen43/libsrc/visualization/stlmeshing.cpp
168 --- netgen43/libsrc/visualization/stlmeshing.cpp        2003-05-07 16:01:43.000000000 +0200
169 +++ /tmp/netgen43/libsrc/visualization/stlmeshing.cpp   2003-12-10 15:52:53.000000000 +0100
170 @@ -5,7 +5,7 @@
171  #include <stlgeom.hpp>
172  
173  #include <meshing.hpp>
174 -#include <visual.hpp>
175 +/*#include <visual.hpp>*/
176  
177  namespace netgen
178  {
179 diff -N -r -u netgen43/Makefile /tmp/netgen43/Makefile
180 --- netgen43/Makefile   2003-05-07 16:01:43.000000000 +0200
181 +++ /tmp/netgen43/Makefile      2003-12-10 15:11:41.000000000 +0100
182 @@ -35,7 +35,8 @@
183  .SUFFIXES: .cpp .o
184  #
185  #
186 -CPLUSPLUSFLAGS1 = -c -I$(LIBSRC_DIR)/include  -DOPENGL
187 +#CPLUSPLUSFLAGS1 = -c -I$(LIBSRC_DIR)/include  -DOPENGL
188 +CPLUSPLUSFLAGS1 = -c -I$(LIBSRC_DIR)/include
189  LINKFLAGS1 =   -lGL -lGLU -lX11 -lXext -lXmu
190  #
191  CPLUSPLUSFLAGS = $(CPLUSPLUSFLAGS1) $(CPLUSPLUSFLAGS2) $(CPLUSPLUSFLAGS3)
192 diff -N -r -u netgen43/makeForSalome.sh /tmp/netgen43/makeForSalome.sh
193 --- netgen43/makeForSalome.sh   1970-01-01 01:00:00.000000000 +0100
194 +++ /tmp/netgen43/makeForSalome.sh      2004-01-05 12:33:59.000000000 +0100
195 @@ -0,0 +1,26 @@
196 +#! /bin/sh
197 +cp ngtcltk/ngnewdelete.* libsrc/interface/
198 +
199 +MACHINE=LINUX
200 +export MACHINE
201 +make -C libsrc/csg
202 +make -C libsrc/general
203 +make -C libsrc/geom2d
204 +make -C libsrc/gprim
205 +make -C libsrc/interface
206 +make -C libsrc/linalg
207 +make -C libsrc/meshing
208 +make -C libsrc/opti
209 +make -C libsrc/stlgeom
210 +
211 +if [ ! -d install ] ; then
212 +       mkdir install
213 +fi
214 +
215 +cp -r lib install/
216 +
217 +if [ ! -d install/include ] ; then
218 +       mkdir install/include
219 +fi
220 +
221 +cp libsrc/interface/nglib.h install/include