Salome HOME
bos #18711: Windows compilation
[tools/sat_salome.git] / products / patches / netgen.101.windows.patch
1 diff -Naur netgen-6.2.2101_SRC_orig/libsrc/core/version.hpp netgen-6.2.2101_SRC_modif/libsrc/core/version.hpp
2 --- netgen-6.2.2101_SRC_orig/libsrc/core/version.hpp    2021-03-26 15:27:42.000000000 +0300
3 +++ netgen-6.2.2101_SRC_modif/libsrc/core/version.hpp   2021-10-05 14:21:01.736494600 +0300
4 @@ -41,7 +41,12 @@
5                if(!vstring.empty())
6                  {
7                    dot = vstring.find('-');
8 -                  patch = std::stoi(vstring.substr(0,dot));
9 +                  try {
10 +                    patch = std::stoi(vstring.substr(0,dot));
11 +                  }
12 +                  catch (const std::exception& e) {
13 +                    patch = 0;
14 +                  }
15                    if(dot == size_t(-1)) vstring = "";
16                    else vstring = vstring.substr(dot+1, vstring.size()-dot-1);
17                    if(!vstring.empty())
18 diff -Naur netgen-6.2.2101_SRC_orig/libsrc/stlgeom/stlgeom.hpp netgen-6.2.2101_SRC_modif/libsrc/stlgeom/stlgeom.hpp
19 --- netgen-6.2.2101_SRC_orig/libsrc/stlgeom/stlgeom.hpp 2021-03-26 15:27:44.000000000 +0300
20 +++ netgen-6.2.2101_SRC_modif/libsrc/stlgeom/stlgeom.hpp        2021-10-05 14:51:15.044170800 +0300
21 @@ -188,7 +188,7 @@
22        STLTopology::DoArchive(ar);
23      }
24  
25 -    void Clear();
26 +    DLL_HEADER void Clear();
27  
28      virtual void Save (string filename) const override;
29  
30 @@ -369,19 +369,19 @@
31  
32      ///Build EdgeSegments
33      void ClearEdges();
34 -    void BuildEdges(const STLParameters& stlparam);
35 +    DLL_HEADER void BuildEdges(const STLParameters& stlparam);
36      void BuildEdgesPerPoint();
37      void UseExternalEdges();
38  
39  
40      void FindEdgesFromAngles(const STLParameters& stlparam);
41 -    void CalcFaceNums();
42 +    DLL_HEADER void CalcFaceNums();
43      int GetNOBodys();
44      int GetNOFaces() {return facecnt;}
45 -    void LinkEdges(const STLParameters& stlparam);
46 +    DLL_HEADER void LinkEdges(const STLParameters& stlparam);
47  
48      void AddConeAndSpiralEdges(const STLParameters& stlparam);
49 -    void AddFaceEdges(); //each face should have at least one starting edge (outherwise it won't be meshed)
50 +    DLL_HEADER void AddFaceEdges(); //each face should have at least one starting edge (outherwise it won't be meshed)
51  
52      void GetDirtyChartTrigs(int chartnum, STLChart& chart, const Array<ChartId, STLTrigId>& outercharttrigs, 
53                             NgArray<ChartId>& chartpointchecked, NgArray<int>& dirtytrigs);
54 @@ -398,7 +398,7 @@
55  
56  
57      //make charts with regions of a max. angle
58 -    void MakeAtlas(class Mesh & mesh, const MeshingParameters& mparam, const STLParameters& stlparam);
59 +    DLL_HEADER void MakeAtlas(class Mesh & mesh, const MeshingParameters& mparam, const STLParameters& stlparam);
60  
61      //outerchartspertrig, sorted!
62      int GetOCPTSize() const {return outerchartspertrig.Size();};
63 @@ -460,7 +460,7 @@
64      int GetLineP(int lnr, int pnr) const {return lines.Get(lnr)->PNum(pnr);}
65      int GetLineNP(int nr) const {return lines.Get(nr)->NP();}
66  
67 -    void SetLineEndPoint(int pn);
68 +    DLL_HEADER void SetLineEndPoint(int pn);
69      int IsLineEndPoint(int pn);
70      int LineEndPointsSet() const {return lineendpoints.Size() == GetNP();}
71      void ClearLineEndPoints();
72 diff -Naur netgen-6.2.2101_SRC_orig/libsrc/stlgeom/stltopology.hpp netgen-6.2.2101_SRC_modif/libsrc/stlgeom/stltopology.hpp
73 --- netgen-6.2.2101_SRC_orig/libsrc/stlgeom/stltopology.hpp     2021-03-26 15:27:44.000000000 +0300
74 +++ netgen-6.2.2101_SRC_modif/libsrc/stlgeom/stltopology.hpp    2021-10-05 14:45:13.980762200 +0300
75 @@ -342,7 +342,7 @@
76    int GetNP() const { return points.Size(); }
77    int AddPoint(const Point<3> & p) { points.Append(p); return points.Size(); }
78    const Point<3> & GetPoint(STLPointId nr) const { return points[nr]; } // .Get(nr); }
79 -  int GetPointNum (const Point<3> & p);
80 +  DLL_HEADER int GetPointNum (const Point<3> & p);
81    void SetPoint(STLPointId nr, const Point<3> & p) { points[nr] = p; } // { points.Elem(nr) = p; }
82    auto & GetPoints() const { return points; }
83  
84 diff -Naur netgen-6.2.2101_SRC_orig/nglib/nglib.cpp netgen-6.2.2101_SRC_modif/nglib/nglib.cpp
85 --- netgen-6.2.2101_SRC_orig/nglib/nglib.cpp    2021-09-21 17:05:14.000000000 +0300
86 +++ netgen-6.2.2101_SRC_modif/nglib/nglib.cpp   2021-10-05 14:55:59.205412900 +0300
87 @@ -550,7 +550,7 @@
88  
89  
90     NgArray<STLReadTriangle> readtrias; //only before initstlgeometry
91 -   NgArray<Point<3> > readedges; //only before init stlgeometry
92 +   DLL_HEADER NgArray<Point<3> > readedges; //only before init stlgeometry
93  
94     // loads geometry from STL file
95     DLL_HEADER Ng_STL_Geometry * Ng_STL_LoadGeometry (const char * filename, int binary)