Salome HOME
Join modifications from BR_Dev_For_4_0 tag V4_1_1.
[plugins/netgenplugin.git] / src / NETGEN / netgen45ForSalome.patch
1 diff -Nru netgen-4.5_orig/libsrc/csg/meshsurf.cpp netgen-4.5_patch/libsrc/csg/meshsurf.cpp
2 --- netgen-4.5_orig/libsrc/csg/meshsurf.cpp     2006-02-14 10:54:35.000000000 +0300
3 +++ netgen-4.5_patch/libsrc/csg/meshsurf.cpp    2006-10-25 16:05:59.000000000 +0400
4 @@ -77,11 +77,12 @@
5  }
6  
7  
8 -void MeshOptimize2dSurfaces :: ProjectPoint (INDEX surfind, Point3d & p) const
9 +bool MeshOptimize2dSurfaces :: ProjectPoint (INDEX surfind, Point3d & p) const
10  {
11    Point<3> hp = p;
12    geometry.GetSurface(surfind)->Project (hp);
13    p = hp;
14 +  return true;
15  }
16  
17  void MeshOptimize2dSurfaces :: ProjectPoint2 (INDEX surfind, INDEX surfind2, 
18 diff -Nru netgen-4.5_orig/libsrc/csg/meshsurf.hpp netgen-4.5_patch/libsrc/csg/meshsurf.hpp
19 --- netgen-4.5_orig/libsrc/csg/meshsurf.hpp     2004-01-20 13:49:44.000000000 +0300
20 +++ netgen-4.5_patch/libsrc/csg/meshsurf.hpp    2006-10-25 16:08:05.000000000 +0400
21 @@ -45,7 +45,7 @@
22      MeshOptimize2dSurfaces (const CSGeometry & ageometry); 
23     
24      ///
25 -    virtual void ProjectPoint (INDEX surfind, Point3d & p) const;
26 +    virtual bool ProjectPoint (INDEX surfind, Point3d & p) const;
27      ///
28      virtual void ProjectPoint2 (INDEX surfind, INDEX surfind2, Point3d & p) const;
29      ///
30 diff -Nru netgen-4.5_orig/libsrc/interface/Makefile netgen-4.5_patch/libsrc/interface/Makefile
31 --- netgen-4.5_orig/libsrc/interface/Makefile   2005-08-09 18:14:59.000000000 +0400
32 +++ netgen-4.5_patch/libsrc/interface/Makefile  2006-04-27 13:12:54.000000000 +0400
33 @@ -1,4 +1,5 @@
34 -src = nginterface.cpp writeuser.cpp writediffpack.cpp writeabaqus.cpp writefluent.cpp writepermas.cpp writetochnog.cpp writetecplot.cpp wuchemnitz.cpp writetochnog.cpp writefeap.cpp writeelmer.cpp  writegmsh.cpp writejcm.cpp readuser.cpp importsolution.cpp 
35 +#src = nginterface.cpp writeuser.cpp writediffpack.cpp writeabaqus.cpp writefluent.cpp writepermas.cpp writetochnog.cpp writetecplot.cpp wuchemnitz.cpp writetochnog.cpp writefeap.cpp writeelmer.cpp  writegmsh.cpp writejcm.cpp readuser.cpp importsolution.cpp
36 +src = writeuser.cpp writediffpack.cpp writeabaqus.cpp writefluent.cpp writepermas.cpp writetochnog.cpp writetecplot.cpp wuchemnitz.cpp writetochnog.cpp writefeap.cpp writeelmer.cpp  writegmsh.cpp writejcm.cpp readuser.cpp nglib.cpp ngnewdelete.cpp
37  #
38  lib = nginterface
39  libpath = libsrc/interface
40 diff -Nru netgen-4.5_orig/libsrc/interface/nglib.cpp netgen-4.5_patch/libsrc/interface/nglib.cpp
41 --- netgen-4.5_orig/libsrc/interface/nglib.cpp  2005-10-18 17:53:18.000000000 +0400
42 +++ netgen-4.5_patch/libsrc/interface/nglib.cpp 2006-04-27 13:12:54.000000000 +0400
43 @@ -56,7 +56,8 @@
44  
45  void Ng_Exit ()
46  {
47 -  ;
48 +  delete testout;
49 +  testout = NULL;
50  }
51    
52  
53 diff -Nru netgen-4.5_orig/libsrc/makefile.inc netgen-4.5_patch/libsrc/makefile.inc
54 --- netgen-4.5_orig/libsrc/makefile.inc 2005-09-02 17:17:51.000000000 +0400
55 +++ netgen-4.5_patch/libsrc/makefile.inc        2006-10-26 09:33:58.000000000 +0400
56 @@ -8,17 +8,14 @@
57  LIBSRC_DIR=$(CPP_DIR)/libsrc
58  LIB_DIR=$(CPP_DIR)/lib/$(MACHINE)
59  
60 -#OCC_DIR=../../occ
61 -#OCCINC_DIR=$(OCC_DIR)/inc
62 -#OCCLIB_DIR=$(OCC_DIR)/lib
63 -# OCC_DIR=/opt/OpenCASCADE5.2/ros
64 -# OCC_DIR=/home/joachim/download/occ/Linux
65 -# OCCINC_DIR=$(OCC_DIR)/inc  -I$(OCC_DIR)/ros/inc
66 -# OCCLIB_DIR=$(OCC_DIR)/Linux/lib
67 +OCC_DIR=$(CASROOT)
68 +OCCINC_DIR=$(OCC_DIR)/inc
69 +OCCLIB_DIR=$(OCC_DIR)/Linux/lib
70  #
71  include $(LIBSRC_DIR)/makefile.mach.$(MACHINE)
72  #
73 -CPLUSPLUSFLAGS1 = -c -I$(LIBSRC_DIR)/include -I$(OCCINC_DIR) 
74 +CPLUSPLUSFLAGS1 = -c -I$(LIBSRC_DIR)/include -I$(OCCINC_DIR) \
75 +       -DOCCGEOMETRY -DOCC52 -DHAVE_IOSTREAM -DHAVE_LIMITS_H
76  #
77  ARFLAGS = r
78  #
79 diff -Nru netgen-4.5_orig/libsrc/makefile.mach.LINUX netgen-4.5_patch/libsrc/makefile.mach.LINUX
80 --- netgen-4.5_orig/libsrc/makefile.mach.LINUX  2004-10-11 23:49:26.000000000 +0400
81 +++ netgen-4.5_patch/libsrc/makefile.mach.LINUX 2006-04-27 13:12:54.000000000 +0400
82 @@ -16,7 +16,7 @@
83  #
84  CFLAGS2 =
85  
86 -CPLUSPLUSFLAGS2 = -O2 -I/usr/include/GL3.5 -DLINUX -DOPENGL \
87 +CPLUSPLUSFLAGS2 = -O2 -I/usr/include/GL3.5 -DLINUX \
88         -ftemplate-depth-99 -finline-limit=10000 \
89         -Wdisabled-optimization  -funroll-loops  -DnoNGSOLVE
90  
91 diff -Nru netgen-4.5_orig/libsrc/meshing/improve2.cpp netgen-4.5_patch/libsrc/meshing/improve2.cpp
92 --- netgen-4.5_orig/libsrc/meshing/improve2.cpp 2006-01-11 18:08:19.000000000 +0300
93 +++ netgen-4.5_patch/libsrc/meshing/improve2.cpp        2006-04-27 13:12:54.000000000 +0400
94 @@ -4,7 +4,7 @@
95  #include <opti.hpp>
96  
97  #ifndef SMALLLIB
98 -#include <visual.hpp>
99 +//#include <visual.hpp>
100  #endif
101  
102  namespace netgen
103 diff -Nru netgen-4.5_orig/libsrc/meshing/improve2.hpp netgen-4.5_patch/libsrc/meshing/improve2.hpp
104 --- netgen-4.5_orig/libsrc/meshing/improve2.hpp 2004-10-12 23:22:55.000000000 +0400
105 +++ netgen-4.5_patch/libsrc/meshing/improve2.hpp        2006-10-25 16:09:37.000000000 +0400
106 @@ -32,17 +32,16 @@
107    ///
108    virtual void SelectSurfaceOfPoint (const Point3d & p,
109                                      const PointGeomInfo & gi);
110 -  ///
111 -  virtual void ProjectPoint (INDEX /* surfind */, Point3d & /* p */) const { };
112 +
113 +  /// project point on surface, returns true if success
114 +  virtual bool ProjectPoint (INDEX /* surfind */, Point3d & /* p */) const { return false; }
115 +  /// fast project point on surface using point geom info of a neighboring point
116 +  /// if gi.trignum != 0,
117 +  /// returns true if success, gi is updated
118 +  virtual bool ProjectPoint (INDEX surfind, Point3d & p, PointGeomInfo& gi) const
119 +  { gi.trignum = 1; return ProjectPoint (surfind, p); }
120    ///
121    virtual void ProjectPoint2 (INDEX /* surfind */, INDEX /* surfind2 */, Point3d & /* p */) const { };
122 -  /// liefert zu einem 3d-Punkt die geominfo (Dreieck) und liefert 1, wenn erfolgreich, 
123 -  /// 0, wenn nicht (Punkt ausserhalb von chart)
124 -  virtual int CalcPointGeomInfo(PointGeomInfo& gi, const Point3d& /*p3*/) const
125 -    { gi.trignum = 1; return 1;};
126 -
127 -  virtual int CalcPointGeomInfo(int /* surfind */, PointGeomInfo& gi, const Point3d& p3) const
128 -    { return CalcPointGeomInfo (gi, p3); }
129  
130    ///
131    virtual void GetNormalVector(INDEX surfind, const Point3d & p, PointGeomInfo & gi, Vec3d & n) const;
132 diff -Nru netgen-4.5_orig/libsrc/meshing/smoothing2.cpp netgen-4.5_patch/libsrc/meshing/smoothing2.cpp
133 --- netgen-4.5_orig/libsrc/meshing/smoothing2.cpp       2006-01-11 18:08:20.000000000 +0300
134 +++ netgen-4.5_patch/libsrc/meshing/smoothing2.cpp      2006-10-25 16:10:46.000000000 +0400
135 @@ -300,7 +300,7 @@
136    double Opti2SurfaceMinFunction :: 
137    FuncGrad (const Vector & x, Vector & grad) const
138    {
139 -    Vec3d n, vgrad;
140 +    Vec3d vgrad;
141      Point3d pp1;
142      double g1x, g1y;
143      double badness, hbadness;
144 @@ -308,8 +308,6 @@
145      vgrad = 0;
146      badness = 0;
147  
148 -    meshthis -> GetNormalVector (surfi, sp1, gi1, n);
149 -
150      pp1 = sp1;
151      pp1.Add2 (x.Get(1), t1, x.Get(2), t2);
152  
153 @@ -360,7 +358,7 @@
154    double Opti2SurfaceMinFunction :: 
155    FuncDeriv (const Vector & x, const Vector & dir, double & deriv) const
156    {
157 -    Vec3d n, vgrad;
158 +    Vec3d vgrad;
159      Point3d pp1;
160      double g1x, g1y;
161      double badness, hbadness;
162 @@ -368,8 +366,6 @@
163      vgrad = 0;
164      badness = 0;
165  
166 -    meshthis -> GetNormalVector (surfi, sp1, gi1, n);
167 -
168      pp1 = sp1;
169      pp1.Add2 (x.Get(1), t1, x.Get(2), t2);
170  
171 @@ -520,7 +516,7 @@
172      // from 2d:
173  
174      int j, k, lpi, gpi;
175 -    Vec3d n, vgrad;
176 +    Vec3d vgrad;
177      Point3d pp1;
178      Vec2d g1, vdir;
179      double badness, hbadness, hbad, hderiv;
180 @@ -528,8 +524,6 @@
181      vgrad = 0;
182      badness = 0;
183  
184 -    meshthis -> GetNormalVector (surfi, sp1, gi1, n);
185 -
186      pp1 = sp1;
187      pp1.Add2 (x.Get(1), t1, x.Get(2), t2);
188  
189 @@ -593,7 +587,7 @@
190      // from 2d:
191  
192      int j, k, lpi, gpi;
193 -    Vec3d n, vgrad;
194 +    Vec3d vgrad;
195      Point3d pp1;
196      Vec2d g1, vdir;
197      double badness, hbadness, hbad, hderiv;
198 @@ -601,8 +595,6 @@
199      vgrad = 0;
200      badness = 0;
201  
202 -    meshthis -> GetNormalVector (surfi, sp1, gi1, n);
203 -
204      pp1 = sp1;
205      pp1.Add2 (x.Get(1), t1, x.Get(2), t2);
206  
207 @@ -859,19 +851,21 @@
208           locelements.SetSize(0);
209           locrots.SetSize (0);
210           lochs.SetSize (0);
211 +          ngi.trignum = 0;
212         
213           for (j = 0; j < elementsonpoint[pi].Size(); j++)
214             {
215               sei = elementsonpoint[pi][j];
216               const Element2d & bel = mesh[sei];
217               surfi = mesh.GetFaceDescriptor(bel.GetIndex()).SurfNr();
218 -           
219 +
220               locelements.Append (sei);
221             
222               for (k = 1; k <= bel.GetNP(); k++)
223                 if (bel.PNum(k) == pi)
224                   {
225                     locrots.Append (k);
226 +                    ngi = bel.GeomInfoPi(k);
227                     break;
228                   }
229               
230 @@ -942,7 +936,7 @@
231             }
232           
233           //optimizer loop (if not whole distance is not possible, move only a bit!!!!)
234 -         while (loci <= 5 && !moveisok)
235 +          while (loci <= 5 && !moveisok)
236             {
237               loci ++;
238               mesh[pi].X() = origp.X() + (x.Get(1) * t1.X() + x.Get(2) * t2.X())*fact;
239 @@ -951,11 +945,9 @@
240               fact = fact/2.;
241  
242  
243 -             ProjectPoint (surfi, mesh[pi]);
244 +             moveisok = ProjectPoint (surfi, mesh[pi], ngi);
245  
246 -             moveisok = CalcPointGeomInfo(surfi, ngi, mesh[pi]); 
247 -             // point lies on same chart in stlsurface
248 -           
249 +              // point lies on same chart in stlsurface
250               if (moveisok)
251                 {
252                   for (j = 0; j < locelements.Size(); j++)
253 diff -Nru netgen-4.5_orig/libsrc/occ/occconstruction.cpp netgen-4.5_patch/libsrc/occ/occconstruction.cpp
254 --- netgen-4.5_orig/libsrc/occ/occconstruction.cpp      2005-12-06 17:15:53.000000000 +0300
255 +++ netgen-4.5_patch/libsrc/occ/occconstruction.cpp     2006-04-27 13:12:54.000000000 +0400
256 @@ -28,8 +28,8 @@
257  #include <BRepAlgoAPI_Common.hxx>
258  #include <BRepAlgoAPI_Fuse.hxx>
259  #include <BRepAlgoAPI_Section.hxx>
260 -#include <BRepOffsetAPI_Sewing.hxx>
261 -#include <BRepAlgo_Sewing.hxx>
262 +//#include <BRepOffsetAPI_Sewing.hxx>
263 +//#include <BRepAlgo_Sewing.hxx>
264  #include <BRepOffsetAPI_MakeOffsetShape.hxx>
265  #include <ShapeFix_Shape.hxx>
266  namespace netgen
267 diff -Nru netgen-4.5_orig/libsrc/occ/occgenmesh.cpp netgen-4.5_patch/libsrc/occ/occgenmesh.cpp
268 --- netgen-4.5_orig/libsrc/occ/occgenmesh.cpp   2006-02-07 12:12:48.000000000 +0300
269 +++ netgen-4.5_patch/libsrc/occ/occgenmesh.cpp  2006-10-25 16:14:48.000000000 +0400
270 @@ -28,7 +28,7 @@
271      return  Point<3> (p.X(), p.Y(), p.Z());
272    }
273   
274 -  void DivideEdge (TopoDS_Edge & edge,
275 +  static void DivideEdge (TopoDS_Edge & edge,
276                    ARRAY<MeshPoint> & ps,
277                    ARRAY<double> & params,
278                    Mesh & mesh)
279 @@ -49,23 +49,19 @@
280      hvalue[0] = 0;
281      pnt = c->Value(s0);
282  
283 -    double olddist = 0;
284 -    double dist = 0;
285 -
286 -    for (int i = 1; i <= DIVIDEEDGESECTIONS; i++)
287 +    int i;
288 +    for (i = 1; i <= DIVIDEEDGESECTIONS; i++)
289        {
290         oldpnt = pnt;
291         pnt = c->Value(s0+(i/double(DIVIDEEDGESECTIONS))*(s1-s0));
292 +       double dist = pnt.Distance(oldpnt);
293         hvalue[i] = hvalue[i-1] +
294           1.0/mesh.GetH(Point3d(pnt.X(), pnt.Y(), pnt.Z()))*
295 -         pnt.Distance(oldpnt);
296 +         dist;
297  
298         //(*testout) << "mesh.GetH(Point3d(pnt.X(), pnt.Y(), pnt.Z())) " << mesh.GetH(Point3d(pnt.X(), pnt.Y(), pnt.Z())) 
299         //         <<  " pnt.Distance(oldpnt) " << pnt.Distance(oldpnt) << endl;
300  
301 -
302 -       olddist = dist;
303 -       dist = pnt.Distance(oldpnt);
304        }
305  
306      //  nsubedges = int(ceil(hvalue[DIVIDEEDGESECTIONS]));
307 @@ -74,7 +70,7 @@
308      ps.SetSize(nsubedges-1);
309      params.SetSize(nsubedges+1);
310  
311 -    int i = 1;
312 +    i = 1;
313      int i1 = 0;
314      do
315        {
316 @@ -112,7 +108,7 @@
317  
318    static void FindEdges (OCCGeometry & geom, Mesh & mesh)
319    {
320 -    char * savetask = multithread.task;
321 +    const char * savetask = multithread.task;
322      multithread.task = "Edge meshing";
323  
324      (*testout) << "edge meshing" << endl;
325 @@ -124,6 +120,7 @@
326      (*testout) << "nedges = " << nedges << endl;
327  
328      double eps = 1e-6 * geom.GetBoundingBox().Diam();
329 +    double eps2 = eps * eps;
330  
331      for (int i = 1; i <= nvertices; i++)
332        {
333 @@ -133,7 +130,7 @@
334         bool exists = 0;
335         if (merge_solids)
336           for (PointIndex pi = 1; pi <= mesh.GetNP(); pi++)
337 -           if ( Dist2 (mesh[pi], Point<3>(mp)) < eps*eps)
338 +           if ( Dist2 (mesh[pi], Point<3>(mp)) < eps2)
339               {
340                 exists = 1;
341                 break;
342 @@ -276,8 +273,8 @@
343                     pnums.Last() = -1;
344                     for (PointIndex pi = 1; pi < first_ep; pi++)
345                       {
346 -                       if (Dist2 (mesh[pi], fp) < eps*eps) pnums[0] = pi;
347 -                       if (Dist2 (mesh[pi], lp) < eps*eps) pnums.Last() = pi;
348 +                       if (Dist2 (mesh[pi], fp) < eps2) pnums[0] = pi;
349 +                       if (Dist2 (mesh[pi], lp) < eps2) pnums.Last() = pi;
350                       }
351                   }
352                 
353 @@ -287,7 +284,7 @@
354                     bool exists = 0;
355                     int j;
356                     for (j = first_ep; j <= mesh.GetNP(); j++)
357 -                     if ((mesh.Point(j)-Point<3>(mp[i-1])).Length() < eps) 
358 +                     if (Dist2(mesh.Point(j), Point<3>(mp[i-1])) < eps2)
359                         {
360                           exists = 1;
361                           break;
362 @@ -394,7 +391,7 @@
363      int i, j, k;
364      int changed;
365  
366 -    char * savetask = multithread.task;
367 +    const char * savetask = multithread.task;
368      multithread.task = "Surface meshing";
369    
370      geom.facemeshstatus = 0;
371 @@ -751,7 +748,7 @@
372      multithread.task = savetask;
373    }
374  
375 -  double ComputeH (double kappa)
376 +  static double ComputeH (double kappa)
377    {
378      double hret;
379      kappa *= mparam.curvaturesafety;
380 @@ -779,7 +776,7 @@
381        double nq = n*q;
382      
383        Point<3> p = p0 + 0.5*n;
384 -      double lambda = (p-l.p0)*n / nq;
385 +      double lambda = (fabs(nq) > 1e-10 ? (p-l.p0)*n / nq : -1);
386  
387        if (lambda >= 0 && lambda <= 1)
388         {
389 @@ -799,55 +796,55 @@
390  
391  
392  
393 -  void RestrictHTriangle (gp_Pnt2d & par0, gp_Pnt2d & par1, gp_Pnt2d & par2,
394 -                         BRepLProp_SLProps * prop, Mesh & mesh, const double maxside, int depth, double h = 0)
395 +  static void RestrictHTriangle (gp_Pnt2d & par0, gp_Pnt2d & par1, gp_Pnt2d & par2,
396 +                         BRepAdaptor_Surface& surf, Mesh & mesh, const double maxside, int depth, double h = 0)
397    {
398 -
399 +    BRepLProp_SLProps prop(surf, 2, 1e-5);
400  
401      gp_Pnt2d parmid;
402  
403      parmid.SetX(0.3*(par0.X()+par1.X()+par2.X()));
404      parmid.SetY(0.3*(par0.Y()+par1.Y()+par2.Y()));
405      
406 -    if (depth == 0)
407 +    //if (depth == 0)
408        {
409         double curvature = 0;
410  
411 -       prop->SetParameters (parmid.X(), parmid.Y());
412 -       if (!prop->IsCurvatureDefined())
413 +       prop.SetParameters (parmid.X(), parmid.Y());
414 +       if (!prop.IsCurvatureDefined())
415           {
416             (*testout) << "curvature not defined!" << endl;
417             return;
418           }
419 -       curvature = max(fabs(prop->MinCurvature()),
420 -                       fabs(prop->MaxCurvature()));
421 +       curvature = max(fabs(prop.MinCurvature()),
422 +                       fabs(prop.MaxCurvature()));
423  
424 -       prop->SetParameters (par0.X(), par0.Y());
425 -       if (!prop->IsCurvatureDefined())
426 +       prop.SetParameters (par0.X(), par0.Y());
427 +       if (!prop.IsCurvatureDefined())
428           {
429             (*testout) << "curvature not defined!" << endl;
430             return;
431           }
432 -       curvature = max(curvature,max(fabs(prop->MinCurvature()),
433 -                                     fabs(prop->MaxCurvature())));
434 +       curvature = max(curvature,max(fabs(prop.MinCurvature()),
435 +                                     fabs(prop.MaxCurvature())));
436  
437 -       prop->SetParameters (par1.X(), par1.Y());
438 -       if (!prop->IsCurvatureDefined())
439 +       prop.SetParameters (par1.X(), par1.Y());
440 +       if (!prop.IsCurvatureDefined())
441           {
442             (*testout) << "curvature not defined!" << endl;
443             return;
444           }
445 -       curvature = max(curvature,max(fabs(prop->MinCurvature()),
446 -                                     fabs(prop->MaxCurvature())));
447 +       curvature = max(curvature,max(fabs(prop.MinCurvature()),
448 +                                     fabs(prop.MaxCurvature())));
449  
450 -       prop->SetParameters (par2.X(), par2.Y());
451 -       if (!prop->IsCurvatureDefined())
452 +       prop.SetParameters (par2.X(), par2.Y());
453 +       if (!prop.IsCurvatureDefined())
454           {
455             (*testout) << "curvature not defined!" << endl;
456             return;
457           }
458 -       curvature = max(curvature,max(fabs(prop->MinCurvature()),
459 -                                     fabs(prop->MaxCurvature())));
460 +       curvature = max(curvature,max(fabs(prop.MinCurvature()),
461 +                                     fabs(prop.MaxCurvature())));
462  
463         //(*testout) << "curvature " << curvature << endl;
464  
465 @@ -886,51 +883,47 @@
466         pm1.SetX(0.5*(par0.X()+par2.X())); pm1.SetY(0.5*(par0.Y()+par2.Y()));
467         pm2.SetX(0.5*(par1.X()+par0.X())); pm2.SetY(0.5*(par1.Y()+par0.Y()));
468  
469 -       RestrictHTriangle (pm0, pm1, pm2, prop, mesh, 0.5*maxside, depth+1, h);
470 -       RestrictHTriangle (par0, pm1, pm2, prop, mesh, 0.5*maxside, depth+1, h);
471 -       RestrictHTriangle (par1, pm0, pm2, prop, mesh, 0.5*maxside, depth+1, h);
472 -       RestrictHTriangle (par2, pm1, pm0, prop, mesh, 0.5*maxside, depth+1, h);
473 +       RestrictHTriangle (pm0, pm1, pm2, surf, mesh, 0.5*maxside, depth+1, h);
474 +       RestrictHTriangle (par0, pm1, pm2, surf, mesh, 0.5*maxside, depth+1, h);
475 +       RestrictHTriangle (par1, pm0, pm2, surf, mesh, 0.5*maxside, depth+1, h);
476 +       RestrictHTriangle (par2, pm1, pm0, surf, mesh, 0.5*maxside, depth+1, h);
477        }
478      else
479        {
480         gp_Pnt pnt;
481         Point3d p3d;
482  
483 -       prop->SetParameters (parmid.X(), parmid.Y());
484 -       pnt = prop->Value();
485 +       surf.D0(parmid.X(), parmid.Y(), pnt);
486         p3d = Point3d(pnt.X(), pnt.Y(), pnt.Z());
487         mesh.RestrictLocalH (p3d, h);
488  
489         
490 -       prop->SetParameters (par0.X(), par0.Y());
491 -       pnt = prop->Value();
492 +       surf.D0(par0.X(), par0.Y(), pnt);
493         p3d = Point3d(pnt.X(), pnt.Y(), pnt.Z());
494         mesh.RestrictLocalH (p3d, h);
495  
496 -       prop->SetParameters (par1.X(), par1.Y());
497 -       pnt = prop->Value();
498 +       surf.D0(par1.X(), par1.Y(), pnt);
499         p3d = Point3d(pnt.X(), pnt.Y(), pnt.Z());
500         mesh.RestrictLocalH (p3d, h);
501  
502 -       prop->SetParameters (par2.X(), par2.Y());
503 -       pnt = prop->Value();
504 +       surf.D0(par2.X(), par2.Y(), pnt);
505         p3d = Point3d(pnt.X(), pnt.Y(), pnt.Z());
506         mesh.RestrictLocalH (p3d, h);
507  
508 -       (*testout) << "p = " << p3d << ", h = " << h << ", maxside = " << maxside << endl;
509 +       //(*testout) << "p = " << p3d << ", h = " << h << ", maxside = " << maxside << endl;
510         /*
511           (*testout) << pnt.X() << " " << pnt.Y() << " " << pnt.Z() << endl;
512  
513 -         prop->SetParameters (par0.X(), par0.Y());
514 -         pnt = prop->Value();
515 +         prop.SetParameters (par0.X(), par0.Y());
516 +         pnt = prop.Value();
517           (*testout) << pnt.X() << " " << pnt.Y() << " " << pnt.Z() << endl;
518  
519 -         prop->SetParameters (par1.X(), par1.Y());
520 -         pnt = prop->Value();
521 +         prop.SetParameters (par1.X(), par1.Y());
522 +         pnt = prop.Value();
523           (*testout) << pnt.X() << " " << pnt.Y() << " " << pnt.Z() << endl;
524  
525 -         prop->SetParameters (par2.X(), par2.Y());
526 -         pnt = prop->Value();
527 +         prop.SetParameters (par2.X(), par2.Y());
528 +         pnt = prop.Value();
529           (*testout) << pnt.X() << " " << pnt.Y() << " " << pnt.Z() << endl;
530         */
531        }
532 @@ -970,7 +963,7 @@
533         if (mparam.uselocalh)
534           {
535  
536 -           char * savetask = multithread.task;
537 +           const char * savetask = multithread.task;
538             multithread.percent = 0;
539  
540             mesh->SetLocalH (bb.PMin(), bb.PMax(), mparam.grading);
541 @@ -1075,7 +1068,6 @@
542                 if (triangulation.IsNull()) continue;
543               
544                 BRepAdaptor_Surface sf(face, Standard_True);
545 -               BRepLProp_SLProps prop(sf, 2, 1e-5);
546                 
547                 int ntriangles = triangulation -> NbTriangles();
548                 for (int j = 1; j <= ntriangles; j++)
549 @@ -1096,7 +1088,7 @@
550                     maxside = max (maxside, p[1].Distance(p[2]));
551                     //cout << "\rFace " << i << " pos11 ntriangles " << ntriangles << " maxside " << maxside << flush;
552  
553 -                   RestrictHTriangle (par[0], par[1], par[2], &prop, *mesh, maxside, 0);
554 +                   RestrictHTriangle (par[0], par[1], par[2], sf, *mesh, maxside, 0);
555                     //cout << "\rFace " << i << " pos12 ntriangles " << ntriangles << flush;
556                   }
557               }
558 diff -Nru netgen-4.5_orig/libsrc/occ/occgeom.cpp netgen-4.5_patch/libsrc/occ/occgeom.cpp
559 --- netgen-4.5_orig/libsrc/occ/occgeom.cpp      2006-01-25 15:35:50.000000000 +0300
560 +++ netgen-4.5_patch/libsrc/occ/occgeom.cpp     2006-10-25 16:15:24.000000000 +0400
561 @@ -7,6 +7,8 @@
562  #include "ShapeAnalysis_ShapeContents.hxx"
563  #include "ShapeAnalysis_CheckSmallFace.hxx"
564  #include "ShapeAnalysis_DataMapOfShapeListOfReal.hxx"
565 +#include <ShapeAnalysis_Surface.hxx>
566 +#include <BRepTopAdaptor_FClass2d.hxx>
567  #include "BRepAlgoAPI_Fuse.hxx"
568  #include "BRepCheck_Analyzer.hxx"
569  #include "BRepLib.hxx"
570 @@ -16,11 +18,19 @@
571  #include "Partition_Spliter.hxx"
572  //#include "VrmlAPI.hxx"
573  //#include "StlAPI.hxx"
574 +#include <TopAbs_State.hxx>
575  
576  
577  namespace netgen
578  {
579  
580 +  OCCGeometry::~OCCGeometry()
581 +  {
582 +    NCollection_DataMap<int,BRepTopAdaptor_FClass2d*>::Iterator it(fclsmap);
583 +    for (; it.More(); it.Next())
584 +      delete it.Value();
585 +  }
586 +
587    void OCCGeometry :: PrintNrShapes ()
588    {
589      TopExp_Explorer e;
590 @@ -947,13 +957,13 @@
591  
592    void OCCGeometry :: BuildVisualizationMesh ()
593    {
594 -
595 -    cout << "Preparing visualization (deflection = " << vispar.occdeflection << ") ... " << flush;
596 +    double vispar_occdeflection = 0.01;
597 +    cout << "Preparing visualization (deflection = " << vispar_occdeflection << ") ... " << flush;
598  
599  
600      BRepTools::Clean (shape);
601      //WriteOCC_STL("test.stl");
602 -    BRepMesh_IncrementalMesh::BRepMesh_IncrementalMesh (shape, vispar.occdeflection, true);
603 +    BRepMesh_IncrementalMesh::BRepMesh_IncrementalMesh (shape, vispar_occdeflection, true);
604      cout << "done" << endl;
605  
606  
607 @@ -973,8 +983,27 @@
608    
609    }
610  
611 +  void OCCGeometry::GetFaceTools(int surfi, Handle(ShapeAnalysis_Surface)& proj,
612 +                                 BRepTopAdaptor_FClass2d*& cls) const
613 +  {
614 +    //MSV: organize caching projector in the map
615 +    if (fprjmap.IsBound(surfi))
616 +    {
617 +      proj = fprjmap.Find(surfi);
618 +      cls = fclsmap.Find(surfi);
619 +    }
620 +    else
621 +    {
622 +      const TopoDS_Face& aFace = TopoDS::Face(fmap(surfi));
623 +      Handle(Geom_Surface) aSurf = BRep_Tool::Surface(aFace);
624 +      proj = new ShapeAnalysis_Surface(aSurf);
625 +      fprjmap.Bind(surfi, proj);
626 +      cls = new BRepTopAdaptor_FClass2d(aFace,Precision::Confusion());
627 +      fclsmap.Bind(surfi, cls);
628 +    }
629 +  }
630  
631 -  void OCCGeometry :: Project (int surfi, Point<3> & p) const
632 +  bool OCCGeometry :: Project (int surfi, Point<3> & p, double& u, double& v) const
633    {
634      static int cnt = 0;
635      if (++cnt % 1000 == 0) cout << "Project cnt = " << cnt << endl;
636 @@ -983,18 +1012,22 @@
637  
638      //(*testout) << "before " << pnt.X() << " "<< pnt.Y() << " "<< pnt.Z() << " " << endl;
639  
640 -    GeomAPI_ProjectPointOnSurf proj(pnt, BRep_Tool::Surface(TopoDS::Face(fmap(surfi))));
641 -    if (proj.NbPoints() == 0)
642 -      {
643 -       cout << "Projection fails" << endl;
644 -      }
645 -    else
646 -      {
647 -       pnt = proj.NearestPoint();
648 -       //(*testout) << "after " << pnt.X() << " "<< pnt.Y() << " "<< pnt.Z() << " " << endl;
649 +    Handle(ShapeAnalysis_Surface) proj;
650 +    BRepTopAdaptor_FClass2d *cls;
651 +    GetFaceTools(surfi, proj, cls);
652  
653 -       p = Point<3> (pnt.X(), pnt.Y(), pnt.Z());
654 -      }
655 +    gp_Pnt2d p2d = proj->ValueOfUV(pnt, Precision::Confusion());
656 +    if (cls->Perform(p2d) == TopAbs_OUT)
657 +    {
658 +      //cout << "Projection fails" << endl;
659 +      return false;
660 +    }
661 +    pnt = proj->Value(p2d);
662 +    p2d.Coord(u, v);
663 +    //(*testout) << "after " << pnt.X() << " "<< pnt.Y() << " "<< pnt.Z() << " " << endl;
664 +
665 +    p = Point<3> (pnt.X(), pnt.Y(), pnt.Z());
666 +    return true;
667    }
668  
669  
670 @@ -1002,54 +1035,20 @@
671    {
672      gp_Pnt p(ap(0), ap(1), ap(2));
673    
674 -    Handle(Geom_Surface) surface = BRep_Tool::Surface(TopoDS::Face(fmap(surfi)));
675 +    Handle(ShapeAnalysis_Surface) proj;
676 +    BRepTopAdaptor_FClass2d *cls;
677 +    GetFaceTools(surfi, proj, cls);
678    
679 -    gp_Pnt x = surface->Value (u,v);
680 -  
681 -    if (p.SquareDistance(x) <= sqr(PROJECTION_TOLERANCE)) return true;
682 -  
683 -    gp_Vec du, dv;
684 -  
685 -    surface->D1(u,v,x,du,dv);
686 -  
687 -    int count = 0;
688 -  
689 -    gp_Pnt xold;
690 -    gp_Vec n;
691 -    double det, lambda, mu;
692 -  
693 -    do {
694 -      count++;
695 -  
696 -      n = du^dv;
697 -  
698 -      det = Det3 (n.X(), du.X(), dv.X(),
699 -                 n.Y(), du.Y(), dv.Y(),
700 -                 n.Z(), du.Z(), dv.Z());
701 -  
702 -      if (det < 1e-15) return false; 
703 -  
704 -      lambda = Det3 (n.X(), p.X()-x.X(), dv.X(),
705 -                    n.Y(), p.Y()-x.Y(), dv.Y(),
706 -                    n.Z(), p.Z()-x.Z(), dv.Z())/det;
707 -  
708 -      mu     = Det3 (n.X(), du.X(), p.X()-x.X(),
709 -                    n.Y(), du.Y(), p.Y()-x.Y(),
710 -                    n.Z(), du.Z(), p.Z()-x.Z())/det;
711 -    
712 -      u += lambda;
713 -      v += mu;
714 -  
715 -      xold = x;
716 -      surface->D1(u,v,x,du,dv);
717 -  
718 -    } while (xold.SquareDistance(x) > sqr(PROJECTION_TOLERANCE) && count < 50);
719 -
720 -    //    (*testout) << "FastProject count: " << count << endl;
721 -  
722 -    if (count == 50) return false;
723 +    gp_Pnt2d p2d = proj->NextValueOfUV(gp_Pnt2d(u,v), p, Precision::Confusion());
724 +    if (cls->Perform(p2d) == TopAbs_OUT)
725 +    {
726 +      //cout << "Projection fails" << endl;
727 +      return false;
728 +    }
729    
730 -    ap = Point<3> (x.X(), x.Y(), x.Z());
731 +    p = proj->Value(p2d);
732 +    p2d.Coord(u, v);
733 +    ap = Point<3> (p.X(), p.Y(), p.Z());
734    
735      return true;
736    }
737 diff -Nru netgen-4.5_orig/libsrc/occ/occgeom.hpp netgen-4.5_patch/libsrc/occ/occgeom.hpp
738 --- netgen-4.5_orig/libsrc/occ/occgeom.hpp      2006-01-25 15:35:50.000000000 +0300
739 +++ netgen-4.5_patch/libsrc/occ/occgeom.hpp     2006-10-25 16:16:01.000000000 +0400
740 @@ -15,8 +15,6 @@
741  #include "Geom_Curve.hxx"
742  #include "Geom2d_Curve.hxx"
743  #include "Geom_Surface.hxx"
744 -#include "GeomAPI_ProjectPointOnSurf.hxx"
745 -#include "GeomAPI_ProjectPointOnCurve.hxx"
746  #include "BRepTools.hxx"
747  #include "TopExp.hxx"
748  #include "BRepBuilderAPI_MakeVertex.hxx"
749 @@ -41,8 +39,6 @@
750  #include "Geom_Curve.hxx"
751  #include "Geom2d_Curve.hxx"
752  #include "Geom_Surface.hxx"
753 -#include "GeomAPI_ProjectPointOnSurf.hxx"
754 -#include "GeomAPI_ProjectPointOnCurve.hxx"
755  #include "TopoDS_Wire.hxx"
756  #include "BRepTools_WireExplorer.hxx"
757  #include "BRepTools.hxx"
758 @@ -69,7 +65,7 @@
759  #include "IGESToBRep_Reader.hxx"
760  #include "Interface_Static.hxx"
761  #include "GeomAPI_ExtremaCurveCurve.hxx"
762 -#include "Standard_ErrorHandler.hxx"
763 +//#include "Standard_ErrorHandler.hxx"
764  #include "Standard_Failure.hxx"
765  #include "ShapeUpgrade_ShellSewing.hxx"
766  #include "ShapeFix_Shape.hxx"
767 @@ -84,11 +80,15 @@
768  #include "STEPControl_Writer.hxx"
769  #include "StlAPI_Writer.hxx"
770  #include "STEPControl_StepModelType.hxx"
771 +#include <NCollection_DataMap.hxx>
772 +
773 +class Handle_ShapeAnalysis_Surface;
774 +class BRepTopAdaptor_FClass2d;
775  
776  namespace netgen
777  {
778  
779 -#include "../visualization/vispar.hpp"
780 +  //#include "../visualization/vispar.hpp"
781    //  class VisualizationParameters;
782    //  extern VisualizationParameters vispar;
783  
784 @@ -159,6 +159,8 @@
785  class OCCGeometry
786  {
787    Point<3> center;
788 +  mutable NCollection_DataMap<int,Handle_ShapeAnalysis_Surface> fprjmap;
789 +  mutable NCollection_DataMap<int,BRepTopAdaptor_FClass2d*> fclsmap;
790  
791  public:
792    TopoDS_Shape shape;
793 @@ -189,6 +191,7 @@
794      vmap.Clear();
795    }
796  
797 +  ~OCCGeometry();
798  
799    void BuildFMap();
800  
801 @@ -204,10 +207,12 @@
802    Point<3> Center()
803    { return center; }
804  
805 -  void Project (int surfi, Point<3> & p) const;
806 +  bool Project (int surfi, Point<3> & p, double& u, double& v) const;
807    bool FastProject (int surfi, Point<3> & ap, double& u, double& v) const;
808  
809
810 +  void GetFaceTools(int surfi, Handle(ShapeAnalysis_Surface)& proj,
811 +                    BRepTopAdaptor_FClass2d*& cls) const;
812 +
813    OCCSurface GetSurface (int surfi)
814    {
815      cout << "OCCGeometry::GetSurface using PLANESPACE" << endl;
816 diff -Nru netgen-4.5_orig/libsrc/occ/occmeshsurf.cpp netgen-4.5_patch/libsrc/occ/occmeshsurf.cpp
817 --- netgen-4.5_orig/libsrc/occ/occmeshsurf.cpp  2006-01-25 15:36:26.000000000 +0300
818 +++ netgen-4.5_patch/libsrc/occ/occmeshsurf.cpp 2006-10-25 16:16:26.000000000 +0400
819 @@ -5,6 +5,8 @@
820  #include <occgeom.hpp>
821  #include <meshing.hpp>
822  #include <GeomLProp_SLProps.hxx>
823 +#include <GeomAPI_ProjectPointOnSurf.hxx>
824 +#include <GeomAPI_ProjectPointOnCurve.hxx>
825  
826  
827  namespace netgen
828 @@ -411,11 +413,16 @@
829    }
830  
831  
832 -  void MeshOptimize2dOCCSurfaces :: ProjectPoint (INDEX surfind, Point3d & p) const
833 +  bool MeshOptimize2dOCCSurfaces :: ProjectPoint (INDEX surfind, Point3d & p, PointGeomInfo& gi) const
834    {
835      Point<3> hp = p;
836 -    geometry.Project (surfind, hp);
837 +    bool ok;
838 +    if (gi.trignum > 0)
839 +      ok = geometry.FastProject (surfind, hp, gi.u, gi.v);
840 +    else
841 +      ok = geometry.Project (surfind, hp, gi.u, gi.v);
842      p = hp;
843 +    return ok;
844    }
845  
846    void MeshOptimize2dOCCSurfaces :: ProjectPoint2 (INDEX surfind, INDEX surfind2, 
847 @@ -506,38 +513,6 @@
848    }
849  
850  
851 -  int MeshOptimize2dOCCSurfaces :: 
852 -  CalcPointGeomInfo(int surfind, PointGeomInfo& gi, const Point3d& p) const
853 -  {
854 -    Standard_Real u,v;
855 -
856 -    gp_Pnt pnt(p.X(), p.Y(), p.Z());
857 -
858 -    Handle(Geom_Surface) occface;
859 -    occface = BRep_Tool::Surface(TopoDS::Face(geometry.fmap(surfind)));
860 -
861 -    GeomAPI_ProjectPointOnSurf proj(pnt, occface);
862 -
863 -    if (proj.NbPoints() < 1)
864 -      {
865 -       cout << "ERROR: OCCSurface :: GetNormalVector: GeomAPI_ProjectPointOnSurf failed!"
866 -            << endl;
867 -       cout << p << endl;
868 -       return 0;
869 -      }
870
871 -    proj.LowerDistanceParameters (u, v);  
872 -
873 -    gi.u = u;
874 -    gi.v = v;
875 -    return 1;
876 -  }
877 -
878 -
879 -
880 -
881 -
882 -
883    OCCRefinementSurfaces :: OCCRefinementSurfaces (const OCCGeometry & ageometry)
884      : Refinement(), geometry(ageometry)
885    {
886 @@ -627,10 +602,11 @@
887         if (!geometry.FastProject (surfi, hnewp, u, v))
888           {
889             cout << "Fast projection to surface fails! Using OCC projection" << endl;
890 -           geometry.Project (surfi, hnewp);
891 +            double u, v;
892 +           geometry.Project (surfi, hnewp, u, v);
893           }
894  
895 -       newgi.trignum = 1;
896 +       newgi.trignum = surfi;
897        }
898    
899      newp = hnewp;
900 @@ -653,14 +629,17 @@
901      hnewp = Point<3> (pnt.X(), pnt.Y(), pnt.Z());
902      newp = hnewp;
903      newgi = ap1;
904 -  };
905 +  }
906  
907  
908    void OCCRefinementSurfaces :: ProjectToSurface (Point<3> & p, int surfi)
909    {
910      if (surfi > 0)
911 -      geometry.Project (surfi, p);
912 -  };
913 +    {
914 +      double u, v;
915 +      geometry.Project (surfi, p, u, v);
916 +    }
917 +  }
918  
919    void OCCRefinementSurfaces :: ProjectToSurface (Point<3> & p, int surfi, PointGeomInfo & gi)
920    {
921 @@ -668,9 +647,10 @@
922        if (!geometry.FastProject (surfi, p, gi.u, gi.v))
923         {
924           cout << "Fast projection to surface fails! Using OCC projection" << endl;
925 -         geometry.Project (surfi, p);
926 +          double u, v;
927 +         geometry.Project (surfi, p, u, v);
928         }
929 -  };
930 +  }
931  
932  
933  
934 diff -Nru netgen-4.5_orig/libsrc/occ/occmeshsurf.hpp netgen-4.5_patch/libsrc/occ/occmeshsurf.hpp
935 --- netgen-4.5_orig/libsrc/occ/occmeshsurf.hpp  2005-06-09 18:51:10.000000000 +0400
936 +++ netgen-4.5_patch/libsrc/occ/occmeshsurf.hpp 2006-10-25 16:17:22.000000000 +0400
937 @@ -151,7 +151,7 @@
938      MeshOptimize2dOCCSurfaces (const OCCGeometry & ageometry); 
939     
940      ///
941 -    virtual void ProjectPoint (INDEX surfind, Point3d & p) const;
942 +    virtual bool ProjectPoint (INDEX surfind, Point3d & p, PointGeomInfo& gi) const;
943      ///
944      virtual void ProjectPoint2 (INDEX surfind, INDEX surfind2, Point3d & p) const;
945      ///
946 @@ -159,9 +159,6 @@
947      ///
948      virtual void GetNormalVector(INDEX surfind, const Point3d & p, PointGeomInfo & gi, Vec3d & n) const;
949  
950 -    
951 -  virtual int CalcPointGeomInfo(int surfind, PointGeomInfo& gi, const Point3d& p3) const;
952 -
953  };
954  
955  
956 diff -Nru netgen-4.5_orig/libsrc/stlgeom/meshstlsurface.cpp netgen-4.5_patch/libsrc/stlgeom/meshstlsurface.cpp
957 --- netgen-4.5_orig/libsrc/stlgeom/meshstlsurface.cpp   2006-01-11 18:08:20.000000000 +0300
958 +++ netgen-4.5_patch/libsrc/stlgeom/meshstlsurface.cpp  2006-10-25 16:17:47.000000000 +0400
959 @@ -946,20 +946,23 @@
960  }
961  
962  
963 -void MeshOptimizeSTLSurface :: ProjectPoint (INDEX surfind, Point3d & p) const
964 +bool MeshOptimizeSTLSurface :: ProjectPoint (INDEX surfind, Point3d & p, PointGeomInfo& gi) const
965  {
966    Point<3> hp = p;
967 -  if (!geom.Project (hp))
968 +  if (gi.trignum > 0)
969 +    ((STLGeometry&)geom).SelectChartOfTriangle (gi.trignum);
970 +  if (!(gi.trignum = geom.Project (hp)))
971      {
972        PrintMessage(7,"project failed");
973        
974 -      if (!geom.ProjectOnWholeSurface(hp)) 
975 +      if (!(gi.trignum = geom.ProjectOnWholeSurface(hp))) 
976         {
977           PrintMessage(7, "project on whole surface failed");
978         }
979      }
980    p = hp;
981    //  geometry.GetSurface(surfind)->Project (p);
982 +  return gi.trignum > 0;
983  }
984  
985  void MeshOptimizeSTLSurface :: ProjectPoint2 (INDEX surfind, INDEX surfind2, Point3d & p) const
986 @@ -970,20 +973,6 @@
987    */
988  }
989  
990 -int  MeshOptimizeSTLSurface :: CalcPointGeomInfo(PointGeomInfo& gi, const Point3d& p3) const
991 -{
992 -  Point<3> hp = p3;
993 -  gi.trignum = geom.Project (hp);
994 -
995 -  if (gi.trignum)
996 -    {
997 -      return 1;
998 -    }
999 -
1000 -  return 0;
1001 -  
1002 -}
1003 -
1004  void MeshOptimizeSTLSurface :: GetNormalVector(INDEX surfind, const Point3d & p, Vec3d & n) const
1005  {
1006    n = geom.GetChartNormalVector();
1007 diff -Nru netgen-4.5_orig/libsrc/stlgeom/meshstlsurface.hpp netgen-4.5_patch/libsrc/stlgeom/meshstlsurface.hpp
1008 --- netgen-4.5_orig/libsrc/stlgeom/meshstlsurface.hpp   2004-09-30 17:13:56.000000000 +0400
1009 +++ netgen-4.5_patch/libsrc/stlgeom/meshstlsurface.hpp  2006-10-25 16:17:59.000000000 +0400
1010 @@ -79,12 +79,10 @@
1011      virtual void SelectSurfaceOfPoint (const Point3d & p,
1012                                        const PointGeomInfo & gi);
1013      ///
1014 -    virtual void ProjectPoint (INDEX surfind, Point3d & p) const;
1015 +    virtual bool ProjectPoint (INDEX surfind, Point3d & p, PointGeomInfo& gi) const;
1016      ///
1017      virtual void ProjectPoint2 (INDEX surfind, INDEX surfind2, Point3d & p) const;
1018      ///
1019 -    virtual int CalcPointGeomInfo(PointGeomInfo& gi, const Point3d& p3) const;
1020 -    ///
1021      virtual void GetNormalVector(INDEX surfind, const Point3d & p, Vec3d & n) const;
1022  };
1023  
1024 diff -Nru netgen-4.5_orig/makeForSalome.sh netgen-4.5_patch/makeForSalome.sh
1025 --- netgen-4.5_orig/makeForSalome.sh    1970-01-01 03:00:00.000000000 +0300
1026 +++ netgen-4.5_patch/makeForSalome.sh   2006-04-27 13:12:54.000000000 +0400
1027 @@ -0,0 +1,31 @@
1028 +#! /bin/sh
1029 +cp ngtcltk/ngnewdelete.* libsrc/interface/
1030 +
1031 +MACHINE=LINUX
1032 +export MACHINE
1033 +make -C libsrc/csg
1034 +make -C libsrc/general
1035 +make -C libsrc/geom2d
1036 +make -C libsrc/gprim
1037 +make -C libsrc/interface
1038 +make -C libsrc/linalg
1039 +make -C libsrc/meshing
1040 +make -C libsrc/opti
1041 +make -C libsrc/stlgeom
1042 +make -C libsrc/occ
1043 +
1044 +if [ ! -d install ] ; then
1045 +       mkdir install
1046 +fi
1047 +
1048 +cp -r lib install/
1049 +
1050 +if [ ! -d install/include ] ; then
1051 +       mkdir install/include
1052 +fi
1053 +
1054 +cp libsrc/interface/nglib.h libsrc/general/*.hpp libsrc/csg/*.hpp libsrc/geom2d/*.hpp \
1055 +    libsrc/gprim/*.hpp libsrc/linalg/*.hpp libsrc/meshing/*.hpp \
1056 +    libsrc/occ/*.hpp libsrc/opti/*.hpp libsrc/include/mydefs.hpp \
1057 +    libsrc/stlgeom/*.hpp libsrc/include/mystdlib.h \
1058 +    install/include