1 diff -Naur netgen-4.9.13_SRC/libsrc/occ/occgeom.cpp netgen-4.9.13_SRC_new/libsrc/occ/occgeom.cpp
2 --- netgen-4.9.13_SRC/libsrc/occ/occgeom.cpp 2016-02-15 09:50:31.000000000 +0300
3 +++ netgen-4.9.13_SRC_new/libsrc/occ/occgeom.cpp 2016-02-05 16:44:26.000000000 +0300
5 double surfacecont = 0;
8 - Handle_ShapeBuild_ReShape rebuild = new ShapeBuild_ReShape;
9 + Handle(ShapeBuild_ReShape) rebuild = new ShapeBuild_ReShape;
10 rebuild->Apply(shape);
11 for (exp1.Init (shape, TopAbs_EDGE); exp1.More(); exp1.Next())
14 cout << endl << "- repairing faces" << endl;
16 Handle(ShapeFix_Face) sff;
17 - Handle_ShapeBuild_ReShape rebuild = new ShapeBuild_ReShape;
18 + Handle(ShapeBuild_ReShape) rebuild = new ShapeBuild_ReShape;
19 rebuild->Apply(shape);
26 - Handle_ShapeBuild_ReShape rebuild = new ShapeBuild_ReShape;
27 + Handle(ShapeBuild_ReShape) rebuild = new ShapeBuild_ReShape;
28 rebuild->Apply(shape);
29 for (exp1.Init (shape, TopAbs_EDGE); exp1.More(); exp1.Next())
32 cout << endl << "- fixing small edges" << endl;
34 Handle(ShapeFix_Wire) sfw;
35 - Handle_ShapeBuild_ReShape rebuild = new ShapeBuild_ReShape;
36 + Handle(ShapeBuild_ReShape) rebuild = new ShapeBuild_ReShape;
37 rebuild->Apply(shape);
44 - Handle_ShapeBuild_ReShape rebuild = new ShapeBuild_ReShape;
45 + Handle(ShapeBuild_ReShape) rebuild = new ShapeBuild_ReShape;
46 rebuild->Apply(shape);
48 for (exp1.Init (shape, TopAbs_EDGE); exp1.More(); exp1.Next())
53 - Handle_ShapeBuild_ReShape rebuild = new ShapeBuild_ReShape;
54 + Handle(ShapeBuild_ReShape) rebuild = new ShapeBuild_ReShape;
55 rebuild->Apply(shape);
56 for (exp1.Init (shape, TopAbs_EDGE); exp1.More(); exp1.Next())
62 - Handle_ShapeBuild_ReShape rebuild = new ShapeBuild_ReShape;
63 + Handle(ShapeBuild_ReShape) rebuild = new ShapeBuild_ReShape;
64 rebuild->Apply(shape);
65 for (exp1.Init (shape, TopAbs_EDGE); exp1.More(); exp1.Next())
68 TopoDS_Solid solid = TopoDS::Solid(exp0.Current());
69 TopoDS_Solid newsolid = solid;
70 BRepLib::OrientClosedSolid (newsolid);
71 - Handle_ShapeBuild_ReShape rebuild = new ShapeBuild_ReShape;
72 + Handle(ShapeBuild_ReShape) rebuild = new ShapeBuild_ReShape;
73 // rebuild->Apply(shape);
74 rebuild->Replace(solid, newsolid, Standard_False);
75 TopoDS_Shape newshape = rebuild->Apply(shape, TopAbs_COMPSOLID);//, 1);
77 TopoDS_Solid solid = TopoDS::Solid(exp0.Current());
78 TopoDS_Solid newsolid = solid;
79 BRepLib::OrientClosedSolid (newsolid);
80 - Handle_ShapeBuild_ReShape rebuild = new ShapeBuild_ReShape;
81 + Handle(ShapeBuild_ReShape) rebuild = new ShapeBuild_ReShape;
82 rebuild->Replace(solid, newsolid, Standard_False);
84 TopoDS_Shape newshape = rebuild->Apply(shape, TopAbs_SHAPE, 1);
85 @@ -1116,10 +1116,10 @@
86 occgeo = new OCCGeometry;
88 // Initiate a dummy XCAF Application to handle the IGES XCAF Document
89 - static Handle_XCAFApp_Application dummy_app = XCAFApp_Application::GetApplication();
90 + static Handle(XCAFApp_Application) dummy_app = XCAFApp_Application::GetApplication();
92 // Create an XCAF Document to contain the IGES file itself
93 - Handle_TDocStd_Document iges_doc;
94 + Handle(TDocStd_Document) iges_doc;
96 // Check if a IGES File is already open under this handle, if so, close it to prevent
97 // Segmentation Faults when trying to create a new document
99 reader.Transfer(iges_doc);
101 // Read in the shape(s) and the colours present in the IGES File
102 - Handle_XCAFDoc_ShapeTool iges_shape_contents = XCAFDoc_DocumentTool::ShapeTool(iges_doc->Main());
103 - Handle_XCAFDoc_ColorTool iges_colour_contents = XCAFDoc_DocumentTool::ColorTool(iges_doc->Main());
104 + Handle(XCAFDoc_ShapeTool) iges_shape_contents = XCAFDoc_DocumentTool::ShapeTool(iges_doc->Main());
105 + Handle(XCAFDoc_ColorTool) iges_colour_contents = XCAFDoc_DocumentTool::ColorTool(iges_doc->Main());
107 TDF_LabelSequence iges_shapes;
108 iges_shape_contents->GetShapes(iges_shapes);
109 @@ -1194,10 +1194,10 @@
110 occgeo = new OCCGeometry;
112 // Initiate a dummy XCAF Application to handle the STEP XCAF Document
113 - static Handle_XCAFApp_Application dummy_app = XCAFApp_Application::GetApplication();
114 + static Handle(XCAFApp_Application) dummy_app = XCAFApp_Application::GetApplication();
116 // Create an XCAF Document to contain the STEP file itself
117 - Handle_TDocStd_Document step_doc;
118 + Handle(TDocStd_Document) step_doc;
120 // Check if a STEP File is already open under this handle, if so, close it to prevent
121 // Segmentation Faults when trying to create a new document
122 @@ -1224,8 +1224,8 @@
123 reader.Transfer(step_doc);
125 // Read in the shape(s) and the colours present in the STEP File
126 - Handle_XCAFDoc_ShapeTool step_shape_contents = XCAFDoc_DocumentTool::ShapeTool(step_doc->Main());
127 - Handle_XCAFDoc_ColorTool step_colour_contents = XCAFDoc_DocumentTool::ColorTool(step_doc->Main());
128 + Handle(XCAFDoc_ShapeTool) step_shape_contents = XCAFDoc_DocumentTool::ShapeTool(step_doc->Main());
129 + Handle(XCAFDoc_ColorTool) step_colour_contents = XCAFDoc_DocumentTool::ColorTool(step_doc->Main());
131 TDF_LabelSequence step_shapes;
132 step_shape_contents->GetShapes(step_shapes);
133 @@ -1278,7 +1278,7 @@
134 // Fixed a bug in the OpenCascade XDE Colour handling when
135 // opening BREP Files, since BREP Files have no colour data.
136 // Hence, the face_colours Handle needs to be created as a NULL handle.
137 - occgeo->face_colours = Handle_XCAFDoc_ColorTool();
138 + occgeo->face_colours = Handle(XCAFDoc_ColorTool)();
139 occgeo->face_colours.Nullify();
142 diff -Naur netgen-4.9.13_SRC/libsrc/occ/occgeom.hpp netgen-4.9.13_SRC_new/libsrc/occ/occgeom.hpp
143 --- netgen-4.9.13_SRC/libsrc/occ/occgeom.hpp 2016-02-15 09:50:31.000000000 +0300
144 +++ netgen-4.9.13_SRC_new/libsrc/occ/occgeom.hpp 2016-02-05 16:44:26.000000000 +0300
147 // -- Optimization: to use cached projector and classifier
148 #include <NCollection_DataMap.hxx>
149 -class Handle_ShapeAnalysis_Surface;
150 +class ShapeAnalysis_Surface;
151 class BRepTopAdaptor_FClass2d;
153 // Philippose - 29/01/2009
157 // -- Optimization: to use cached projector and classifier
158 - mutable NCollection_DataMap<int,Handle_ShapeAnalysis_Surface> fprjmap;
159 + mutable NCollection_DataMap<int,Handle(ShapeAnalysis_Surface)> fprjmap;
160 mutable NCollection_DataMap<int,BRepTopAdaptor_FClass2d*> fclsmap;
164 // OpenCascade XDE Support
165 // XCAF Handle to make the face colours available to the rest of
167 - Handle_XCAFDoc_ColorTool face_colours;
168 + Handle(XCAFDoc_ColorTool) face_colours;
171 Array<int> facemeshstatus;
172 diff -Naur netgen-4.9.13_SRC/libsrc/occ/Partition_Inter2d.cxx netgen-4.9.13_SRC_new/libsrc/occ/Partition_Inter2d.cxx
173 --- netgen-4.9.13_SRC/libsrc/occ/Partition_Inter2d.cxx 2009-08-24 06:12:24.000000000 +0400
174 +++ netgen-4.9.13_SRC_new/libsrc/occ/Partition_Inter2d.cxx 2016-02-12 14:47:51.000000000 +0300
176 #include <TopOpeBRep_EdgesIntersector.hxx>
177 #include <TopOpeBRep_Point2d.hxx>
178 #include <TopTools_ListIteratorOfListOfShape.hxx>
179 -#include <TopTools_ListOfShape.hxx>
180 #include <TopTools_MapIteratorOfMapOfShape.hxx>
181 -#include <TopTools_MapOfShape.hxx>
182 #include <TopoDS.hxx>
183 #include <TopoDS_Edge.hxx>
184 #include <TopoDS_Vertex.hxx>
185 diff -Naur netgen-4.9.13_SRC/libsrc/occ/Partition_Inter2d.hxx netgen-4.9.13_SRC_new/libsrc/occ/Partition_Inter2d.hxx
186 --- netgen-4.9.13_SRC/libsrc/occ/Partition_Inter2d.hxx 2009-08-24 06:12:24.000000000 +0400
187 +++ netgen-4.9.13_SRC_new/libsrc/occ/Partition_Inter2d.hxx 2016-02-12 15:29:02.000000000 +0300
189 #ifndef _Partition_Inter2d_HeaderFile
190 #define _Partition_Inter2d_HeaderFile
192 -#ifndef _Handle_BRepAlgo_AsDes_HeaderFile
193 -#include <Handle_BRepAlgo_AsDes.hxx>
194 +#include <Standard_Version.hxx>
196 +#if OCC_VERSION_MAJOR < 7
197 + #include <Handle_BRepAlgo_AsDes.hxx>
199 #ifndef _Standard_Real_HeaderFile
200 #include <Standard_Real.hxx>
202 #ifndef _Standard_Boolean_HeaderFile
203 #include <Standard_Boolean.hxx>
206 +#include <TopTools_MapOfShape.hxx>
207 +#include <TopTools_ListOfShape.hxx>
209 class BRepAlgo_AsDes;
211 -class TopTools_MapOfShape;
213 -class TopTools_ListOfShape;
217 diff -Naur netgen-4.9.13_SRC/libsrc/occ/Partition_Inter3d.cxx netgen-4.9.13_SRC_new/libsrc/occ/Partition_Inter3d.cxx
218 --- netgen-4.9.13_SRC/libsrc/occ/Partition_Inter3d.cxx 2016-02-15 09:50:31.000000000 +0300
219 +++ netgen-4.9.13_SRC_new/libsrc/occ/Partition_Inter3d.cxx 2016-02-05 16:44:26.000000000 +0300
221 #include <TopOpeBRepTool_BoxSort.hxx>
222 #include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx>
223 #include <TopTools_ListIteratorOfListOfShape.hxx>
224 -#include <TopTools_ListOfShape.hxx>
225 #include <TopoDS.hxx>
226 #include <TopoDS_Compound.hxx>
227 #include <TopoDS_Edge.hxx>
229 Handle (Geom_Surface) S = BRep_Tool::Surface(F,L);
231 if (S->IsKind(STANDARD_TYPE(Geom_RectangularTrimmedSurface))) {
232 - S = (*(Handle_Geom_RectangularTrimmedSurface*)&S)->BasisSurface();
233 + S = Handle(Geom_RectangularTrimmedSurface)::DownCast (S)->BasisSurface();
235 if (!S->IsUPeriodic() && !S->IsVPeriodic())
237 diff -Naur netgen-4.9.13_SRC/libsrc/occ/Partition_Inter3d.hxx netgen-4.9.13_SRC_new/libsrc/occ/Partition_Inter3d.hxx
238 --- netgen-4.9.13_SRC/libsrc/occ/Partition_Inter3d.hxx 2009-08-24 06:12:24.000000000 +0400
239 +++ netgen-4.9.13_SRC_new/libsrc/occ/Partition_Inter3d.hxx 2016-02-12 15:29:36.000000000 +0300
241 #ifndef _Partition_Inter3d_HeaderFile
242 #define _Partition_Inter3d_HeaderFile
244 -#ifndef _Handle_BRepAlgo_AsDes_HeaderFile
245 -#include <Handle_BRepAlgo_AsDes.hxx>
246 +#include <Standard_Version.hxx>
248 +#if OCC_VERSION_MAJOR < 7
249 + #include <Handle_BRepAlgo_AsDes.hxx>
251 #ifndef _TopTools_DataMapOfShapeListOfShape_HeaderFile
252 #include <TopTools_DataMapOfShapeListOfShape.hxx>
254 #ifndef _TopTools_MapOfShape_HeaderFile
255 #include <TopTools_MapOfShape.hxx>
257 +#ifndef _TopTools_ListOfShape_HeaderFile
258 +#include <TopTools_ListOfShape.hxx>
260 #ifndef _TopTools_DataMapOfShapeShape_HeaderFile
261 #include <TopTools_DataMapOfShapeShape.hxx>
264 #include <Standard_Boolean.hxx>
266 class BRepAlgo_AsDes;
267 -class TopTools_ListOfShape;
268 -class TopTools_DataMapOfShapeShape;
270 -class TopTools_MapOfShape;
275 void FacesPartition(const TopoDS_Face& F1,const TopoDS_Face& F2) ;
276 Standard_Boolean IsDone(const TopoDS_Face& F1,const TopoDS_Face& F2) const;
277 TopTools_MapOfShape& TouchedFaces() ;
278 - Handle_BRepAlgo_AsDes AsDes() const;
279 + Handle(BRepAlgo_AsDes) AsDes() const;
280 TopTools_MapOfShape& NewEdges() ;
281 Standard_Boolean HasSameDomainF(const TopoDS_Shape& F) const;
282 Standard_Boolean IsSameDomainF(const TopoDS_Shape& F1,const TopoDS_Shape& F2) const;
283 const TopTools_ListOfShape& SameDomain(const TopoDS_Face& F) const;
284 TopoDS_Vertex ReplaceSameDomainV(const TopoDS_Vertex& V,const TopoDS_Edge& E) const;
285 - Handle_BRepAlgo_AsDes SectionEdgesAD() const;
286 + Handle(BRepAlgo_AsDes) SectionEdgesAD() const;
287 Standard_Boolean IsSectionEdge(const TopoDS_Edge& E) const;
288 Standard_Boolean HasSectionEdge(const TopoDS_Face& F) const;
289 Standard_Boolean IsSplitOn(const TopoDS_Edge& NewE,const TopoDS_Edge& OldE,const TopoDS_Face& F) const;
290 @@ -121,11 +123,11 @@
294 - Handle_BRepAlgo_AsDes myAsDes;
295 + Handle(BRepAlgo_AsDes) myAsDes;
296 TopTools_DataMapOfShapeListOfShape myDone;
297 TopTools_MapOfShape myTouched;
298 TopTools_MapOfShape myNewEdges;
299 - Handle_BRepAlgo_AsDes mySectionEdgesAD;
300 + Handle(BRepAlgo_AsDes) mySectionEdgesAD;
301 TopTools_DataMapOfShapeListOfShape mySameDomainFM;
302 TopTools_DataMapOfShapeShape mySameDomainVM;
304 diff -Naur netgen-4.9.13_SRC/libsrc/occ/Partition_Loop2d.hxx netgen-4.9.13_SRC_new/libsrc/occ/Partition_Loop2d.hxx
305 --- netgen-4.9.13_SRC/libsrc/occ/Partition_Loop2d.hxx 2009-08-24 06:12:24.000000000 +0400
306 +++ netgen-4.9.13_SRC_new/libsrc/occ/Partition_Loop2d.hxx 2016-02-05 16:44:26.000000000 +0300
311 -class TopTools_ListOfShape;
312 class BRepAlgo_Image;
315 diff -Naur netgen-4.9.13_SRC/libsrc/occ/Partition_Loop3d.hxx netgen-4.9.13_SRC_new/libsrc/occ/Partition_Loop3d.hxx
316 --- netgen-4.9.13_SRC/libsrc/occ/Partition_Loop3d.hxx 2009-08-24 06:12:24.000000000 +0400
317 +++ netgen-4.9.13_SRC_new/libsrc/occ/Partition_Loop3d.hxx 2016-02-05 16:44:26.000000000 +0300
319 #ifndef _TopTools_ListOfShape_HeaderFile
320 #include <TopTools_ListOfShape.hxx>
322 +#ifndef _TopTools_MapOfOrientedShape_HeaderFile
323 +#include <TopTools_MapOfOrientedShape.hxx>
325 #ifndef _TopTools_IndexedDataMapOfShapeListOfShape_HeaderFile
326 #include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
329 #include <Standard_Real.hxx>
332 -class TopTools_ListOfShape;
333 -class TopTools_MapOfOrientedShape;
337 diff -Naur netgen-4.9.13_SRC/libsrc/occ/Partition_Loop.hxx netgen-4.9.13_SRC_new/libsrc/occ/Partition_Loop.hxx
338 --- netgen-4.9.13_SRC/libsrc/occ/Partition_Loop.hxx 2009-08-24 06:12:24.000000000 +0400
339 +++ netgen-4.9.13_SRC_new/libsrc/occ/Partition_Loop.hxx 2016-02-05 16:44:26.000000000 +0300
344 -class TopTools_ListOfShape;
347 #ifndef _Standard_HeaderFile
348 #include <Standard.hxx>
349 diff -Naur netgen-4.9.13_SRC/libsrc/occ/Partition_Spliter.cxx netgen-4.9.13_SRC_new/libsrc/occ/Partition_Spliter.cxx
350 --- netgen-4.9.13_SRC/libsrc/occ/Partition_Spliter.cxx 2016-02-15 09:50:31.000000000 +0300
351 +++ netgen-4.9.13_SRC_new/libsrc/occ/Partition_Spliter.cxx 2016-02-05 16:44:26.000000000 +0300
353 #include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
354 #include <TopTools_IndexedMapOfShape.hxx>
355 #include <TopTools_ListIteratorOfListOfShape.hxx>
356 -#include <TopTools_ListOfShape.hxx>
357 #include <TopTools_MapIteratorOfMapOfShape.hxx>
358 #include <TopTools_SequenceOfShape.hxx>
360 diff -Naur netgen-4.9.13_SRC/libsrc/occ/Partition_Spliter.hxx netgen-4.9.13_SRC_new/libsrc/occ/Partition_Spliter.hxx
361 --- netgen-4.9.13_SRC/libsrc/occ/Partition_Spliter.hxx 2009-08-24 06:12:24.000000000 +0400
362 +++ netgen-4.9.13_SRC_new/libsrc/occ/Partition_Spliter.hxx 2016-02-05 16:44:26.000000000 +0300
364 #ifndef _TopTools_DataMapOfShapeShape_HeaderFile
365 #include <TopTools_DataMapOfShapeShape.hxx>
367 -#ifndef _Handle_BRepAlgo_AsDes_HeaderFile
368 -#include <Handle_BRepAlgo_AsDes.hxx>
370 #ifndef _BRepAlgo_Image_HeaderFile
371 #include <BRepAlgo_Image.hxx>
375 class BRepAlgo_AsDes;
377 -class TopTools_ListOfShape;
382 TopTools_DataMapOfShapeShape myFaceShapeMap;
383 TopTools_DataMapOfShapeShape myInternalFaces;
384 TopTools_DataMapOfShapeShape myIntNotClFaces;
385 - Handle_BRepAlgo_AsDes myAsDes;
386 + Handle(BRepAlgo_AsDes) myAsDes;
387 BRepAlgo_Image myImagesFaces;
388 BRepAlgo_Image myImagesEdges;
389 BRepAlgo_Image myImageShape;
390 diff -Naur netgen-4.9.13_SRC/libsrc/visualization/mvdraw.cpp netgen-4.9.13_SRC_new/libsrc/visualization/mvdraw.cpp
391 --- netgen-4.9.13_SRC/libsrc/visualization/mvdraw.cpp 2010-03-04 16:03:16.000000000 +0300
392 +++ netgen-4.9.13_SRC_new/libsrc/visualization/mvdraw.cpp 2016-02-05 16:44:26.000000000 +0300
395 Point3d VisualScene :: center;
396 double VisualScene :: rad;
397 - GLdouble VisualScene :: backcolor;
398 + GLfloat VisualScene :: backcolor;
401 #if TOGL_MAJOR_VERSION!=2
402 diff -Naur netgen-4.9.13_SRC/libsrc/visualization/mvdraw.hpp netgen-4.9.13_SRC_new/libsrc/visualization/mvdraw.hpp
403 --- netgen-4.9.13_SRC/libsrc/visualization/mvdraw.hpp 2009-09-07 22:28:44.000000000 +0400
404 +++ netgen-4.9.13_SRC_new/libsrc/visualization/mvdraw.hpp 2016-02-05 16:44:26.000000000 +0300
406 GLdouble clipplane[4];
409 - static GLdouble backcolor;
410 + static GLfloat backcolor;
413 static int selelement;
414 diff -Naur netgen-4.9.13_SRC/libsrc/visualization/vscsg.cpp netgen-4.9.13_SRC_new/libsrc/visualization/vscsg.cpp
415 --- netgen-4.9.13_SRC/libsrc/visualization/vscsg.cpp 2009-08-10 15:40:50.000000000 +0400
416 +++ netgen-4.9.13_SRC_new/libsrc/visualization/vscsg.cpp 2016-02-05 16:44:26.000000000 +0300
418 const TopLevelObject * tlo = geometry -> GetTopLevelObject (i);
419 if (tlo->GetVisible() && !tlo->GetTransparent())
421 - float mat_col[] = { tlo->GetRed(), tlo->GetGreen(), tlo->GetBlue(), 1 };
422 + float mat_col[] = { float(tlo->GetRed()), float(tlo->GetGreen()), float(tlo->GetBlue()), 1 };
423 glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_col);
425 glCallList (trilists[i]);
427 const TopLevelObject * tlo = geometry -> GetTopLevelObject (i);
428 if (tlo->GetVisible() && tlo->GetTransparent())
430 - float mat_col[] = { tlo->GetRed(), tlo->GetGreen(), tlo->GetBlue(), transp };
431 + float mat_col[] = { float(tlo->GetRed()), float(tlo->GetGreen()), float(tlo->GetBlue()), float(transp) };
433 glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_col);