summarylogtreecommitdiffstats
path: root/nglib-occt7.patch
blob: a84a08576575e70728ce640c304a99ec42541db1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
diff --git a/configure b/configure
index 8aaf600..b8728ee 100755
--- a/configure
+++ b/configure
@@ -15354,7 +15354,7 @@ if test a$occon = atrue ; then
 
 	OCCFLAGS="-DOCCGEOMETRY -I$occdir/inc -I/usr/include/opencascade"
 
-	OCCLIBS="-L$occdir/lib -lTKernel -lTKGeomBase -lTKMath -lTKG2d -lTKG3d -lTKXSBase -lTKOffset -lTKFillet -lTKShHealing -lTKMesh -lTKMeshVS -lTKTopAlgo -lTKGeomAlgo -lTKBool -lTKPrim -lTKBO -lTKIGES -lTKBRep -lTKSTEPBase -lTKSTEP -lTKSTL -lTKSTEPAttr -lTKSTEP209 -lTKXDESTEP -lTKXDEIGES -lTKXCAF -lTKLCAF -lFWOSPlugin"
+	OCCLIBS="-L$occdir/lib -lTKernel -lTKGeomBase -lTKMath -lTKG2d -lTKG3d -lTKXSBase -lTKOffset -lTKFillet -lTKShHealing -lTKMesh -lTKMeshVS -lTKTopAlgo -lTKGeomAlgo -lTKBool -lTKPrim -lTKBO -lTKIGES -lTKBRep -lTKSTEPBase -lTKSTEP -lTKSTL -lTKSTEPAttr -lTKSTEP209 -lTKXDESTEP -lTKXDEIGES -lTKXCAF -lTKLCAF"
 
 
 #  -lTKDCAF
diff --git a/configure.ac b/configure.ac
index 89d2a8b..fb297f3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -43,7 +43,7 @@ AC_ARG_WITH([occ],
 if test a$occon = atrue ; then
 
 	AC_SUBST([OCCFLAGS], ["-DOCCGEOMETRY -I$occdir/inc -I/usr/include/opencascade"])
-	AC_SUBST([OCCLIBS], ["-L$occdir/lib -lTKernel -lTKGeomBase -lTKMath -lTKG2d -lTKG3d -lTKXSBase -lTKOffset -lTKFillet -lTKShHealing -lTKMesh -lTKMeshVS -lTKTopAlgo -lTKGeomAlgo -lTKBool -lTKPrim -lTKBO -lTKIGES -lTKBRep -lTKSTEPBase -lTKSTEP -lTKSTL -lTKSTEPAttr -lTKSTEP209 -lTKXDESTEP -lTKXDEIGES -lTKXCAF -lTKLCAF -lFWOSPlugin"])
+	AC_SUBST([OCCLIBS], ["-L$occdir/lib -lTKernel -lTKGeomBase -lTKMath -lTKG2d -lTKG3d -lTKXSBase -lTKOffset -lTKFillet -lTKShHealing -lTKMesh -lTKMeshVS -lTKTopAlgo -lTKGeomAlgo -lTKBool -lTKPrim -lTKBO -lTKIGES -lTKBRep -lTKSTEPBase -lTKSTEP -lTKSTL -lTKSTEPAttr -lTKSTEP209 -lTKXDESTEP -lTKXDEIGES -lTKXCAF -lTKLCAF"])
 
 #  -lTKDCAF
 
diff --git a/libsrc/meshing/improve2.hpp b/libsrc/meshing/improve2.hpp
index 9c3c1be..387e031 100644
--- a/libsrc/meshing/improve2.hpp
+++ b/libsrc/meshing/improve2.hpp
@@ -4,7 +4,7 @@
 
 
 ///
-class MeshOptimize2d
+DLL_HEADER class MeshOptimize2d
 {
   int faceindex;
   int improveedges;
diff --git a/libsrc/meshing/meshclass.hpp b/libsrc/meshing/meshclass.hpp
index d4bb028..e01b398 100644
--- a/libsrc/meshing/meshclass.hpp
+++ b/libsrc/meshing/meshclass.hpp
@@ -320,7 +320,7 @@ namespace netgen
     { dimension = dim; }
 
     /// sets internal tables
-    void CalcSurfacesOfNode ();
+    DLL_HEADER void CalcSurfacesOfNode ();
 
     /// additional (temporarily) fix points 
     void FixPoints (const BitArray & fixpoints);
diff --git a/libsrc/meshing/meshtype.hpp b/libsrc/meshing/meshtype.hpp
index 04485eb..463f584 100644
--- a/libsrc/meshing/meshtype.hpp
+++ b/libsrc/meshing/meshtype.hpp
@@ -175,7 +175,7 @@ namespace netgen
   }
 
 
-  class SurfaceElementIndex
+  DLL_HEADER class SurfaceElementIndex
   {
     int i;
   public:
@@ -231,7 +231,7 @@ namespace netgen
      Point in the mesh.
      Contains layer (a new feature in 4.3 for overlapping meshes.
   */
-  class MeshPoint : public Point<3>
+  DLL_HEADER class MeshPoint : public Point<3>
   {
     int layer;
     double singular; // singular factor for hp-refinement
@@ -325,7 +325,7 @@ namespace netgen
     ///
     Element2d ();
     ///
-    Element2d (int anp);
+    DLL_HEADER Element2d (int anp);
     ///
     DLL_HEADER Element2d (ELEMENT_TYPE type);
     ///
diff --git a/libsrc/occ/Partition_Inter2d.hxx b/libsrc/occ/Partition_Inter2d.hxx
index cfd4a9a..c107291 100644
--- a/libsrc/occ/Partition_Inter2d.hxx
+++ b/libsrc/occ/Partition_Inter2d.hxx
@@ -23,12 +23,13 @@
 //
 //  File   : Partition_Inter2d.hxx
 //  Module : GEOM
-
+#include <TopTools_MapOfShape.hxx>
+//  class TopTools_MapOfShape;
 #ifndef _Partition_Inter2d_HeaderFile
 #define _Partition_Inter2d_HeaderFile
 
 #ifndef _Handle_BRepAlgo_AsDes_HeaderFile
-#include <Handle_BRepAlgo_AsDes.hxx>
+#include <BRepAlgo_AsDes.hxx>
 #endif
 #ifndef _Standard_Real_HeaderFile
 #include <Standard_Real.hxx>
@@ -38,9 +39,8 @@
 #endif
 class BRepAlgo_AsDes;
 class TopoDS_Face;
-class TopTools_MapOfShape;
 class TopoDS_Vertex;
-class TopTools_ListOfShape;
+//class TopTools_ListOfShape;
 class TopoDS_Edge;
 
 
diff --git a/libsrc/occ/Partition_Inter3d.hxx b/libsrc/occ/Partition_Inter3d.hxx
index d8be2c5..2c68bf9 100644
--- a/libsrc/occ/Partition_Inter3d.hxx
+++ b/libsrc/occ/Partition_Inter3d.hxx
@@ -23,12 +23,12 @@
 //
 //  File   : Partition_Inter3d.hxx
 //  Module : GEOM
-
+#include <TopTools_DataMapOfShapeShape.hxx>
 #ifndef _Partition_Inter3d_HeaderFile
 #define _Partition_Inter3d_HeaderFile
 
 #ifndef _Handle_BRepAlgo_AsDes_HeaderFile
-#include <Handle_BRepAlgo_AsDes.hxx>
+#include <BRepAlgo_AsDes.hxx>
 #endif
 #ifndef _TopTools_DataMapOfShapeListOfShape_HeaderFile
 #include <TopTools_DataMapOfShapeListOfShape.hxx>
@@ -43,10 +43,10 @@
 #include <Standard_Boolean.hxx>
 #endif
 class BRepAlgo_AsDes;
-class TopTools_ListOfShape;
-class TopTools_DataMapOfShapeShape;
+// class TopTools_ListOfShape;
+// class TopTools_DataMapOfShapeShape;
 class TopoDS_Face;
-class TopTools_MapOfShape;
+// class TopTools_MapOfShape;
 class TopoDS_Shape;
 class TopoDS_Vertex;
 class TopoDS_Edge;
diff --git a/libsrc/occ/Partition_Loop.hxx b/libsrc/occ/Partition_Loop.hxx
index 56e05e2..e493c60 100644
--- a/libsrc/occ/Partition_Loop.hxx
+++ b/libsrc/occ/Partition_Loop.hxx
@@ -38,7 +38,7 @@
 #endif
 class TopoDS_Face;
 class TopoDS_Edge;
-class TopTools_ListOfShape;
+//class TopTools_ListOfShape;
 
 
 #ifndef _Standard_HeaderFile
diff --git a/libsrc/occ/Partition_Loop2d.cxx b/libsrc/occ/Partition_Loop2d.cxx
index d980a5c..e752ba0 100644
--- a/libsrc/occ/Partition_Loop2d.cxx
+++ b/libsrc/occ/Partition_Loop2d.cxx
@@ -52,6 +52,10 @@
 #include <gp_Pnt.hxx>
 #include <gp_Pnt2d.hxx>
 
+#ifndef PI
+    #define PI M_PI
+#endif
+
 //=======================================================================
 //function : Partition_Loop2d
 //purpose  :
diff --git a/libsrc/occ/Partition_Loop2d.hxx b/libsrc/occ/Partition_Loop2d.hxx
index bdf1c25..effd7be 100644
--- a/libsrc/occ/Partition_Loop2d.hxx
+++ b/libsrc/occ/Partition_Loop2d.hxx
@@ -24,7 +24,7 @@
 #endif
 class TopoDS_Face;
 class TopoDS_Edge;
-class TopTools_ListOfShape;
+//class TopTools_ListOfShape;
 class BRepAlgo_Image;
 
 
diff --git a/libsrc/occ/Partition_Loop3d.hxx b/libsrc/occ/Partition_Loop3d.hxx
index 52abd11..d834036 100644
--- a/libsrc/occ/Partition_Loop3d.hxx
+++ b/libsrc/occ/Partition_Loop3d.hxx
@@ -9,7 +9,9 @@
 
 #ifndef _Partition_Loop3d_HeaderFile
 #define _Partition_Loop3d_HeaderFile
-
+#include <TopTools_ShapeMapHasher.hxx>
+#include <TopTools_OrientedShapeMapHasher.hxx>
+#include <TopTools_MapOfOrientedShape.hxx>
 #ifndef _TopTools_ListOfShape_HeaderFile
 #include <TopTools_ListOfShape.hxx>
 #endif
@@ -23,8 +25,8 @@
 #include <Standard_Real.hxx>
 #endif
 class TopoDS_Shape;
-class TopTools_ListOfShape;
-class TopTools_MapOfOrientedShape;
+//class TopTools_ListOfShape;
+//class TopTools_MapOfOrientedShape;
 class TopoDS_Edge;
 class TopoDS_Face;
 class gp_Vec;
diff --git a/libsrc/occ/Partition_Spliter.hxx b/libsrc/occ/Partition_Spliter.hxx
index f29917a..e0fbb2a 100644
--- a/libsrc/occ/Partition_Spliter.hxx
+++ b/libsrc/occ/Partition_Spliter.hxx
@@ -29,7 +29,7 @@
 #include <TopTools_DataMapOfShapeShape.hxx>
 #endif
 #ifndef _Handle_BRepAlgo_AsDes_HeaderFile
-#include <Handle_BRepAlgo_AsDes.hxx>
+#include <BRepAlgo_AsDes.hxx>
 #endif
 #ifndef _BRepAlgo_Image_HeaderFile
 #include <BRepAlgo_Image.hxx>
@@ -43,9 +43,12 @@
 #ifndef _Standard_Boolean_HeaderFile
 #include <Standard_Boolean.hxx>
 #endif
+#include <TopTools_ShapeMapHasher.hxx>
+#include <TopTools_OrientedShapeMapHasher.hxx>
+#include <TopTools_MapOfOrientedShape.hxx>
 class BRepAlgo_AsDes;
 class TopoDS_Shape;
-class TopTools_ListOfShape;
+// class TopTools_ListOfShape;
 class TopoDS_Edge;
 
 
diff --git a/libsrc/occ/occgeom.cpp b/libsrc/occ/occgeom.cpp
index c1a5827..8887472 100644
--- a/libsrc/occ/occgeom.cpp
+++ b/libsrc/occ/occgeom.cpp
@@ -8,17 +8,20 @@
 #include "ShapeAnalysis_CheckSmallFace.hxx"
 #include "ShapeAnalysis_DataMapOfShapeListOfReal.hxx"
 #include "ShapeAnalysis_Surface.hxx"
-#include "BRepAlgoAPI_Fuse.hxx"
+
 #include "BRepCheck_Analyzer.hxx"
 #include "BRepLib.hxx"
 #include "ShapeBuild_ReShape.hxx"
 #include "ShapeFix.hxx"
+#include "ShapeFix_Edge.hxx"
 #include "ShapeFix_FixSmallFace.hxx"
+#include "StlTransfer.hxx"
+#include "TopoDS_Iterator.hxx"
 #include "Partition_Spliter.hxx"
 
-
 namespace netgen
 {
+
    void OCCGeometry :: PrintNrShapes ()
    {
       TopExp_Explorer e;
@@ -937,11 +940,15 @@ namespace netgen
 
    void OCCGeometry :: CalcBoundingBox ()
    {
-      Bnd_Box bb;
-      BRepBndLib::Add (shape, bb);
+      Bnd_Box b;
+
+// SDS Not defined !
+
+      BRepBndLib::Add ((const TopoDS_Shape) shape, b,(Standard_Boolean)true);
 
+// SDS
       double x1,y1,z1,x2,y2,z2;
-      bb.Get (x1,y1,z1,x2,y2,z2);
+      b.Get (x1,y1,z1,x2,y2,z2);
       Point<3> p1 = Point<3> (x1,y1,z1);
       Point<3> p2 = Point<3> (x2,y2,z2);
 
@@ -1038,9 +1045,9 @@ namespace netgen
    {
       cout << "writing stl..."; cout.flush();
       StlAPI_Writer writer;
-      writer.RelativeMode() = Standard_False;
+//      writer.RelativeMode() = Standard_False;
 
-      writer.SetDeflection(0.02);
+//      writer.SetDeflection(0.02);
       writer.Write(shape,filename);
 
       cout << "done" << endl;
diff --git a/libsrc/occ/occgeom.hpp b/libsrc/occ/occgeom.hpp
index 2ed9281..773a8f3 100644
--- a/libsrc/occ/occgeom.hpp
+++ b/libsrc/occ/occgeom.hpp
@@ -167,7 +167,7 @@ namespace netgen
 
 
 
-   class Line
+   DLL_HEADER class Line
    {
    public:
       Point<3> p0, p1;
@@ -189,7 +189,7 @@ namespace netgen
 
 
 
-   class OCCGeometry : public NetgenGeometry
+   DLL_HEADER class OCCGeometry : public NetgenGeometry
    {
       Point<3> center;
 
@@ -395,7 +395,7 @@ namespace netgen
 
 
 
-   class OCCParameters
+   DLL_HEADER class OCCParameters
    {
    public:
 
@@ -441,7 +441,7 @@ namespace netgen
    // Philippose - 31.09.2009
    // External access to the mesh generation functions within the OCC
    // subsystem (Not sure if this is the best way to implement this....!!)
-   extern int OCCGenerateMesh (OCCGeometry & occgeometry, Mesh*& mesh,
+   DLL_HEADER extern int OCCGenerateMesh (OCCGeometry & occgeometry, Mesh*& mesh,
 			       MeshingParameters & mparam,
 			       int perfstepsstart, int perfstepsend);
 
diff --git a/libsrc/occ/occmeshsurf.hpp b/libsrc/occ/occmeshsurf.hpp
index 198ade6..ac0c062 100644
--- a/libsrc/occ/occmeshsurf.hpp
+++ b/libsrc/occ/occmeshsurf.hpp
@@ -16,7 +16,7 @@ class SingularMatrixException
 class UVBoundsException
 {};
 
-class OCCSurface
+DLL_HEADER class OCCSurface
 {
 public:
   TopoDS_Face topods_face;
@@ -103,7 +103,7 @@ public:
 
 
 ///
-class Meshing2OCCSurfaces : public Meshing2
+DLL_HEADER class Meshing2OCCSurfaces : public Meshing2
 {
   ///
   OCCSurface surface;
@@ -141,7 +141,7 @@ protected:
 
 
 ///
-class MeshOptimize2dOCCSurfaces : public MeshOptimize2d
+DLL_HEADER class MeshOptimize2dOCCSurfaces : public MeshOptimize2d
   {
   ///
   const OCCGeometry & geometry;
@@ -169,7 +169,7 @@ public:
 class OCCGeometry;
 
 
-class OCCRefinementSurfaces : public Refinement
+DLL_HEADER class OCCRefinementSurfaces : public Refinement
 {
   const OCCGeometry & geometry;
 
diff --git a/libsrc/occ/vsocc.cpp b/libsrc/occ/vsocc.cpp
index 4d80600..a2ef07c 100644
--- a/libsrc/occ/vsocc.cpp
+++ b/libsrc/occ/vsocc.cpp
@@ -21,6 +21,7 @@
 #include "Poly_Triangle.hxx"
 #include "Poly_Polygon3D.hxx"
 #include "Poly_PolygonOnTriangulation.hxx"
+#include "Bnd_Box.hxx"
 
 #include <visual.hpp>
 
diff --git a/ng/Makefile.in b/ng/Makefile.in
index deb4595..2d0995f 100644
--- a/ng/Makefile.in
+++ b/ng/Makefile.in
@@ -327,10 +327,7 @@ netgen_LDADD = $(top_builddir)/libsrc/visualization/libvisual.la \
 #   /opt/netgen/lib/libngsolve.a /opt/netgen/lib/libngcomp.a /opt/netgen/lib/libngcomp.a  /opt/netgen/lib/libngfemng.a   /opt/netgen/lib/libngmg.a  /opt/netgen/lib/libngla.a  /opt/netgen/lib/libngbla.a  /opt/netgen/lib/libngstd.a -L/opt/intel/mkl/10.2.1.017/lib/em64t /opt/intel/mkl/10.2.1.017/lib/em64t/libmkl_solver_lp64.a  -lmkl_intel_lp64  -lmkl_gnu_thread -lmkl_core 
 #
 #
-dist_bin_SCRIPTS = dialog.tcl menustat.tcl ngicon.tcl ng.tcl	  \
-ngvisual.tcl sockets.tcl drawing.tcl nghelp.tcl ngshell.tcl	  \
-ngtesting.tcl parameters.tcl variables.tcl csgeom.tcl stlgeom.tcl \
-occgeom.tcl acisgeom.tcl netgen.ocf
+dist_bin_SCRIPTS =
 
 netgen_LDFLAGS = -export-dynamic
 all: all-am
diff --git a/ng/ngpkg.cpp b/ng/ngpkg.cpp
index 04d96f7..c813ae9 100644
--- a/ng/ngpkg.cpp
+++ b/ng/ngpkg.cpp
@@ -2266,7 +2266,7 @@ namespace netgen
     static int gopsize = DEFAULT_GOP_SIZE;
     static int bframes = DEFAULT_B_FRAMES;
     static int MPGbufsize = DEFAULT_MPG_BUFSIZE;
-    static CodecID codec_id = CODEC_ID_MPEG1VIDEO;
+    static AVCodecID codec_id = CODEC_ID_MPEG1VIDEO;
     static FILE *MPGfile;
     static buffer_t buff;
     static struct SwsContext *img_convert_ctx;