aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAiden Grossman <agrossman154@yahoo.com>2021-11-12 18:26:26 +0000
committerLeo <thinkabit.ukim@gmail.com>2021-11-25 07:24:01 +0000
commit0743bda2651e1514aca5e2d170ea7b19e6f7959f (patch)
tree684dd6c30fdb3b6cfde15f7441f52224fec55a6d
parent5571811950847d6a3de96fc38bac79b4d6db4442 (diff)
downloadaports-0743bda2651e1514aca5e2d170ea7b19e6f7959f.tar.gz
aports-0743bda2651e1514aca5e2d170ea7b19e6f7959f.tar.bz2
aports-0743bda2651e1514aca5e2d170ea7b19e6f7959f.tar.xz
community/freecad: rebuild against opencascade 7.6.0
-rw-r--r--testing/freecad/APKBUILD46
-rw-r--r--testing/freecad/opencascade.patch629
2 files changed, 674 insertions, 1 deletions
diff --git a/testing/freecad/APKBUILD b/testing/freecad/APKBUILD
index fddb4b18a5..09243d7dab 100644
--- a/testing/freecad/APKBUILD
+++ b/testing/freecad/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Aiden Grossman <agrossman154@yahoo.com>
pkgname=freecad
pkgver=0.19.2
-pkgrel=3
+pkgrel=4
pkgdesc="Free and open source 3D parametric modeler"
url="https://freecadweb.org/"
license="LGPL-2.0-or-later"
@@ -22,6 +22,28 @@ source="https://github.com/FreeCAD/FreeCAD/archive/$pkgver/freecad-$pkgver.tar.g
backtrace.patch
tbb.patch
resourceDirectory.patch
+ https://github.com/FreeCAD/FreeCAD/commit/6f3b00d67ec0bd0072b7b493e2a38d2a2e3af27d.patch
+ https://github.com/FreeCAD/FreeCAD/commit/77b198048a63f1e9ca15eef64c8042d599a14cf3.patch
+ https://github.com/FreeCAD/FreeCAD/commit/9b4db7e06472bf5550d0b7627b28b425bfcc8470.patch
+ opencascade.patch
+ https://github.com/FreeCAD/FreeCAD/commit/c9d17ebde2400f83d1e1e799bdb0a7f85a0da96d.patch
+ https://github.com/FreeCAD/FreeCAD/commit/442c8d52a1989da8f17d60fafea5b81d79cbf0ab.patch
+ https://github.com/FreeCAD/FreeCAD/commit/8e6dab209ee59be61d83a0ff249283a8809fa917.patch
+ https://github.com/FreeCAD/FreeCAD/commit/0f3b5d275070477b7cd2bbfa2dc930135448fb0c.patch
+ https://github.com/FreeCAD/FreeCAD/commit/08d46b5f882420c8d4066427fcc8dab5b1882097.patch
+ https://github.com/FreeCAD/FreeCAD/commit/51e4366085e59a9b511f7160d66493e9b3dfc7d8.patch
+ https://github.com/FreeCAD/FreeCAD/commit/c2c5ae1bf0c571270ecacf257a51e9b064fc609a.patch
+ https://github.com/FreeCAD/FreeCAD/commit/302568d177ddde171c28eaca89e8b4a49466974f.patch
+ https://github.com/FreeCAD/FreeCAD/commit/66d3dd897f63c2e4f8ffd6eced730c6a3372ad51.patch
+ https://github.com/FreeCAD/FreeCAD/commit/03be15cc6b460ab62548142287eb9f677f463a44.patch
+ https://github.com/FreeCAD/FreeCAD/commit/f628050732cc5d1d49fc18282ed508ca3061bb10.patch
+ https://github.com/FreeCAD/FreeCAD/commit/16ff933b09176d83fb0785e74f36038311f0eaeb.patch
+ https://github.com/FreeCAD/FreeCAD/commit/03da9d3501c6b596ad1828b99cb8d923cea56485.patch
+ https://github.com/FreeCAD/FreeCAD/commit/fecf9c2e8492ddab0858b4af23b56da36bff6f6a.patch
+ https://github.com/FreeCAD/FreeCAD/commit/8453d415150f289d36dfe4cbe6b91dfc512e82fe.patch
+ https://github.com/FreeCAD/FreeCAD/commit/3131b97aa88736ac628428a8ceb025d9b7a8a965.patch
+ https://github.com/FreeCAD/FreeCAD/commit/5b4c246944c72459016efff6ae903ac66c090991.patch
+ https://github.com/FreeCAD/FreeCAD/commit/f55c46cc86344a6d7389156c015194f7d0fd2b63.patch
"
builddir="$srcdir/FreeCAD-$pkgver"
@@ -68,4 +90,26 @@ sha512sums="
04e9a2cb4323aa66445eab0e27648272b84a9459f9b55784454edb74b2f3f9031749777ac4b8d01ebcae63703398d7e0033b62196461378cc9a16d7f372d5e10 backtrace.patch
46558d5f979836e7ea4571b9806c6d8d95753a0b6ae16aced0ecd63ba5679c319a1ee94a08b058be191fa2835e168a7702ca0005fb110b76fbbc2eb42852d47c tbb.patch
a12be7920a9ba0076c45c40d4afc43e9b9a4f8370430f8be0b505c30401564c25d9ae651b840332a716d4de2f0b0ebfb61b2f4c7952b9ea6d4d2e08d3a42bfef resourceDirectory.patch
+e79b92f208fb24cdb8a729645db0774b33ce31890d4b99775900fc17070d5569c7072589e7b2c021d320cc6168b5b004f83f8625b724d992a0853b3a108dfa94 6f3b00d67ec0bd0072b7b493e2a38d2a2e3af27d.patch
+5a0897872a7f5f817a1300651e77d7fd9a2b4bca1a752bb02dc722a94cf6ac49e87fd98a22853a3147479acdb936023a110a404f9b1c1027755ae5dc08a4ca9f 77b198048a63f1e9ca15eef64c8042d599a14cf3.patch
+bbb3eb25e903941ce641442c6ad1ede063bd1d47911ea7583f5eb88db97b20e8441ab7db2426d99ead1ddc03a263df29c147c6a56fb7c56a6031edc198e6f539 9b4db7e06472bf5550d0b7627b28b425bfcc8470.patch
+3ea009c5d3654b4e8002f3a446ba84b35afea31b1df973f260aef6499b64edce96b8b50b2b3c0629f1f0814863c5b28f4d91f4648b4869ce477f1adda6c03236 opencascade.patch
+1c91a71e2624b51f5600d56eca7ca0e63341effe5429fd003fb1cbab5f78d3119075f1fe9b49be32377aba80f4b56ebeedf020565fa3d4c9bd610def0ebd5fb8 c9d17ebde2400f83d1e1e799bdb0a7f85a0da96d.patch
+3cd23462ebe8593d7b397a3bcff19dd3a068e917dcd4d75943a6bb3984527150ba71d8d1b16a7def71f9a149e083d7e7138810729528edc34b5445c53cb9b094 442c8d52a1989da8f17d60fafea5b81d79cbf0ab.patch
+6b1e3733e4d191e70a1af6edad13fdf51fa7c21297d5a65cfba8891027675cb82b6e66342a40ef16045a3150ac6b0e63aae8eeeb48378afa1b4f4f10ff6c8ed1 8e6dab209ee59be61d83a0ff249283a8809fa917.patch
+302a7e8eb5544ab7b610a1e3a706d4dd1afde554874e3677288991ecda6928489000c670db0873e34e803c5e5fcdee4fb1c290d6342b7f7450c30997fa00b0fc 0f3b5d275070477b7cd2bbfa2dc930135448fb0c.patch
+e33702c32073539a9135e17feab221cd34bb3aaa2bdb4d864767c7ec19be2bcb3dc7714db534dcb1ebbbca29793ef1c74edcab7d7a06bda59f1211aec37d5672 08d46b5f882420c8d4066427fcc8dab5b1882097.patch
+48c244d6a07f2dfd6d2fcc54afe53020ec3126f613207cee2d3b7125e187b4dcceabb46b9a893b5f276d4e243ca907097bcc8b6a55c9701ce806da18b2870fde 51e4366085e59a9b511f7160d66493e9b3dfc7d8.patch
+b99dfdccf4e79bfc072e5aeace49e8433456dcdab0ee701b3137aa1e177cd3f48ee32f3ba7946e7a4d7e80cf7387c71d1ab2a5f417faa6dc5a235820f2a081cd c2c5ae1bf0c571270ecacf257a51e9b064fc609a.patch
+65a71e1aec106236c3141819b8f03e37d596e0df0271b03b5ee67ae3f2de9da8c0b96613ab7226a849022442e24382473cff4ce7aee48548d66326942ffb1abb 302568d177ddde171c28eaca89e8b4a49466974f.patch
+4d188c8886a810cfa9b7a853315a3fa782fb28e79882ce87be27335b111e263161151990acd0c5351e09876088976570cb2b55f4a358d9a96ddb12b3ea1d42cb 66d3dd897f63c2e4f8ffd6eced730c6a3372ad51.patch
+6d6d5cc1d8f00160b3d06c86ae89976e560df886a83e7279cf29fbdda582e8ccad53d8fb974ccc719104e490ddab24311ea1683b179121211e5306cf55a91946 03be15cc6b460ab62548142287eb9f677f463a44.patch
+6a413f455423569e3fe77f96ea2e4961456054b850e35e2ee3f560655a13776ccac5153f72acb4ce7c0b5671e66a91a145b7e2a0c5606aefc53f7562158c3f90 f628050732cc5d1d49fc18282ed508ca3061bb10.patch
+d530d195f8b96bff3b4083c7ec60fbcb78813f872ab4cadab09340eb98fcbcc95649095c07760b7fe9d66db7f2ce5a475cbb753d4c7b73afa5b13009fccdc805 16ff933b09176d83fb0785e74f36038311f0eaeb.patch
+3a00f3b1d3c60ccfb577afb2414968ad7f1a57948fe8df66054f4e30ca9e80f90a77dfb0ed29267333cd3f8aae34856efbf5071ef07817f03b660db6ca265051 03da9d3501c6b596ad1828b99cb8d923cea56485.patch
+d3633d9ea927015f07599d9962e76f88905a94706c8f98badbdd9cdf4c9df798e452802867080d2c8c28f360762f2b829f892f8172954a88037a38f884961788 fecf9c2e8492ddab0858b4af23b56da36bff6f6a.patch
+a285a62a88fc932e391784aecdb6fb93e40aec2c139075c10737d6083492ea2eb41b334544771c263a9e0da7c53670a0fc5a92a76a922ff2ad8967a300788196 8453d415150f289d36dfe4cbe6b91dfc512e82fe.patch
+574532209917525ac3019aa55ade8b3be42864cd0b80e102bcd9bcdb90e8adfd8c350e7cb94bf2100d099668c7088fe8cab72aedac5dd0ca74cb0287f7f512b7 3131b97aa88736ac628428a8ceb025d9b7a8a965.patch
+b536eea2f3bcbb596e13689d62954914e3634b235f253e4949d7c83715245ebf4d8c23c4bf24d56de1b6893fc3c6c762c03b1117b1966e520838090610e87269 5b4c246944c72459016efff6ae903ac66c090991.patch
+deddc46ce3362bf2855bb74436c8a1f3547cfb777771c9a0420d96ddd92375129287ffe62966f16d204be89f0c6a384b916e428ff4ebd147480de2f7b886865c f55c46cc86344a6d7389156c015194f7d0fd2b63.patch
"
diff --git a/testing/freecad/opencascade.patch b/testing/freecad/opencascade.patch
new file mode 100644
index 0000000000..9a72b7c5cb
--- /dev/null
+++ b/testing/freecad/opencascade.patch
@@ -0,0 +1,629 @@
+From 74639da997d5f2e53f001d9f256be86ceee901f5 Mon Sep 17 00:00:00 2001
+From: wmayer <wmayer@users.sourceforge.net>
+Date: Sat, 9 Oct 2021 13:49:02 +0200
+Subject: [PATCH] OCCT: port FreeCAD sources to version 7.6 SMESH is not yet
+ ported Although FreeCAD code compiles with OCCT 7.6 it doesn't work at the
+ moment
+
+---
+ src/Mod/Drawing/App/DrawingExport.cpp | 11 ++-
+ src/Mod/Drawing/App/ProjectionAlgos.cpp | 3 -
+ src/Mod/Import/App/ImpExpDxf.cpp | 9 +-
+ .../App/GeomPlate/CurveConstraintPyImp.cpp | 41 +++++++++-
+ src/Mod/Part/App/Geometry.cpp | 7 +-
+ src/Mod/Part/App/PartFeatures.cpp | 22 ++---
+ src/Mod/Part/App/TopoShape.cpp | 82 ++++++-------------
+ src/Mod/Part/App/TopoShapeFacePyImp.cpp | 10 +++
+ src/Mod/Part/App/TopoShapeWirePyImp.cpp | 6 +-
+ src/Mod/Part/Gui/TaskCheckGeometry.cpp | 6 +-
+ src/Mod/Part/Gui/ViewProviderExt.cpp | 17 ++++
+ src/Mod/Path/App/AppPathPy.cpp | 5 +-
+ src/Mod/TechDraw/App/Geometry.cpp | 12 ++-
+ 13 files changed, 138 insertions(+), 93 deletions(-)
+
+diff --git a/src/Mod/Drawing/App/DrawingExport.cpp b/src/Mod/Drawing/App/DrawingExport.cpp
+index b87891ed507..7572be417cf 100644
+--- a/src/Mod/Drawing/App/DrawingExport.cpp
++++ b/src/Mod/Drawing/App/DrawingExport.cpp
+@@ -64,10 +64,7 @@
+ #include <BRep_Tool.hxx>
+
+ #include <BRepAdaptor_CompCurve.hxx>
+-#include <BRepAdaptor_HCompCurve.hxx>
+ #include <Approx_Curve3d.hxx>
+-#include <BRepAdaptor_HCurve.hxx>
+-#include <BRepAdaptor_HCurve.hxx>
+ #include <Geom_BSplineCurve.hxx>
+ #include <Geom_BezierCurve.hxx>
+ #include <GeomConvert_BSplineCurveToBezierCurve.hxx>
+@@ -75,11 +72,19 @@
+ #include <Geom2d_BSplineCurve.hxx>
+ #include <BRepLProp_CLProps.hxx>
+ #include <Standard_Failure.hxx>
++#include <Standard_Version.hxx>
++#if OCC_VERSION_HEX < 0x070600
++#include <BRepAdaptor_HCurve.hxx>
++#endif
+
+ #include "DrawingExport.h"
+ #include <Base/Tools.h>
+ #include <Base/Vector3D.h>
+
++#if OCC_VERSION_HEX >= 0x070600
++using BRepAdaptor_HCurve = BRepAdaptor_Curve;
++#endif
++
+ using namespace Drawing;
+ using namespace std;
+
+diff --git a/src/Mod/Drawing/App/ProjectionAlgos.cpp b/src/Mod/Drawing/App/ProjectionAlgos.cpp
+index 9afae7e9c00..da03d490579 100644
+--- a/src/Mod/Drawing/App/ProjectionAlgos.cpp
++++ b/src/Mod/Drawing/App/ProjectionAlgos.cpp
+@@ -61,10 +61,7 @@
+ #include <BRepMesh_IncrementalMesh.hxx>
+ #include <BRepLib.hxx>
+ #include <BRepAdaptor_CompCurve.hxx>
+-#include <BRepAdaptor_HCompCurve.hxx>
+ #include <Approx_Curve3d.hxx>
+-#include <BRepAdaptor_HCurve.hxx>
+-#include <BRepAdaptor_HCurve.hxx>
+ #include <Geom_BSplineCurve.hxx>
+ #include <Geom_BezierCurve.hxx>
+ #include <GeomConvert_BSplineCurveToBezierCurve.hxx>
+diff --git a/src/Mod/Import/App/ImpExpDxf.cpp b/src/Mod/Import/App/ImpExpDxf.cpp
+index 09827bd9285..dcd88ef1384 100644
+--- a/src/Mod/Import/App/ImpExpDxf.cpp
++++ b/src/Mod/Import/App/ImpExpDxf.cpp
+@@ -29,7 +29,6 @@
+
+ #include <Approx_Curve3d.hxx>
+ #include <BRepAdaptor_Curve.hxx>
+-#include <BRepAdaptor_HCurve.hxx>
+ #include <BRep_Builder.hxx>
+ #include <BRepBuilderAPI_MakeEdge.hxx>
+ #include <BRepBuilderAPI_MakeVertex.hxx>
+@@ -47,6 +46,7 @@
+ #include <gp_Pnt.hxx>
+ #include <gp_Dir.hxx>
+ #include <gp_Vec.hxx>
++#include <Standard_Version.hxx>
+ #include <TopoDS.hxx>
+ #include <TopoDS_Edge.hxx>
+ #include <TopoDS_Vertex.hxx>
+@@ -55,6 +55,9 @@
+ #include <TopExp_Explorer.hxx>
+ #include <TopoDS_Edge.hxx>
+ #include <TColgp_Array1OfPnt.hxx>
++#if OCC_VERSION_HEX < 0x070600
++#include <BRepAdaptor_HCurve.hxx>
++#endif
+
+ #include <Base/Console.h>
+ #include <Base/Parameter.h>
+@@ -68,6 +71,10 @@
+
+ using namespace Import;
+
++#if OCC_VERSION_HEX >= 0x070600
++using BRepAdaptor_HCurve = BRepAdaptor_Curve;
++#endif
++
+
+ //******************************************************************************
+ // reading
+diff --git a/src/Mod/Part/App/GeomPlate/CurveConstraintPyImp.cpp b/src/Mod/Part/App/GeomPlate/CurveConstraintPyImp.cpp
+index 3271f3651a8..b63227d5374 100644
+--- a/src/Mod/Part/App/GeomPlate/CurveConstraintPyImp.cpp
++++ b/src/Mod/Part/App/GeomPlate/CurveConstraintPyImp.cpp
+@@ -24,10 +24,13 @@
+ #include "PreCompiled.h"
+ #ifndef _PreComp_
+ # include <GeomAdaptor_Curve.hxx>
+-# include <GeomAdaptor_HCurve.hxx>
+ # include <Geom2dAdaptor_Curve.hxx>
+-# include <Geom2dAdaptor_HCurve.hxx>
+ # include <Standard_Failure.hxx>
++# include <Standard_Version.hxx>
++# if OCC_VERSION_HEX < 0x070600
++# include <GeomAdaptor_HCurve.hxx>
++# include <Geom2dAdaptor_HCurve.hxx>
++# endif
+ #endif
+
+ #include "GeomPlate/CurveConstraintPy.h"
+@@ -76,6 +79,16 @@ int CurveConstraintPy::PyInit(PyObject* args, PyObject* kwds)
+ return -1;
+ }
+
++#if OCC_VERSION_HEX >= 0x070600
++ Handle(Adaptor3d_Curve) hCurve;
++ if (curve->getTypeId().isDerivedFrom(GeomTrimmedCurve::getClassTypeId())) {
++ GeomTrimmedCurve* trim = static_cast<GeomTrimmedCurve*>(curve);
++ hCurve = new GeomAdaptor_Curve(handle, trim->getFirstParameter(), trim->getLastParameter());
++ }
++ else {
++ hCurve = new GeomAdaptor_Curve(handle);
++ }
++#else
+ Handle(Adaptor3d_HCurve) hCurve;
+ if (curve->getTypeId().isDerivedFrom(GeomTrimmedCurve::getClassTypeId())) {
+ GeomTrimmedCurve* trim = static_cast<GeomTrimmedCurve*>(curve);
+@@ -86,6 +99,7 @@ int CurveConstraintPy::PyInit(PyObject* args, PyObject* kwds)
+ GeomAdaptor_Curve adapt(handle);
+ hCurve = new GeomAdaptor_HCurve(adapt);
+ }
++#endif
+
+ ptr.reset(new GeomPlate_CurveConstraint(hCurve, order, nbPts, tolDist, tolAng, tolCurv));
+ }
+@@ -212,11 +226,15 @@ PyObject* CurveConstraintPy::curve3d(PyObject *args)
+ return nullptr;
+
+ try {
+- Handle(Adaptor3d_HCurve) hAdapt = getGeomPlate_CurveConstraintPtr()->Curve3d();
++ auto hAdapt = getGeomPlate_CurveConstraintPtr()->Curve3d();
+ if (hAdapt.IsNull())
+ Py_Return;
+
++#if OCC_VERSION_HEX >= 0x070600
++ const Adaptor3d_Curve& a3d = *hAdapt;
++#else
+ const Adaptor3d_Curve& a3d = hAdapt->Curve();
++#endif
+ std::unique_ptr<GeomCurve> ptr(Part::makeFromCurveAdaptor(a3d));
+ return ptr->getPyObject();
+ }
+@@ -282,6 +300,16 @@ PyObject* CurveConstraintPy::setProjectedCurve(PyObject *args)
+ return nullptr;
+ }
+
++#if OCC_VERSION_HEX >= 0x070600
++ Handle(Adaptor2d_Curve2d) hCurve;
++ if (handle->IsKind(STANDARD_TYPE(Geom2d_TrimmedCurve))) {
++ Handle(Geom2d_TrimmedCurve) aTC (Handle(Geom2d_TrimmedCurve)::DownCast (handle));
++ hCurve = new Geom2dAdaptor_Curve(handle, aTC->FirstParameter(), aTC->LastParameter());
++ }
++ else {
++ hCurve = new Geom2dAdaptor_Curve(handle);
++ }
++#else
+ Handle(Adaptor2d_HCurve2d) hCurve;
+ if (handle->IsKind(STANDARD_TYPE(Geom2d_TrimmedCurve))) {
+ Handle(Geom2d_TrimmedCurve) aTC (Handle(Geom2d_TrimmedCurve)::DownCast (handle));
+@@ -292,6 +320,7 @@ PyObject* CurveConstraintPy::setProjectedCurve(PyObject *args)
+ Geom2dAdaptor_Curve adapt(handle);
+ hCurve = new Geom2dAdaptor_HCurve(adapt);
+ }
++#endif
+
+ getGeomPlate_CurveConstraintPtr()->SetProjectedCurve(hCurve, tolU, tolV);
+ Py_Return;
+@@ -308,11 +337,15 @@ PyObject* CurveConstraintPy::projectedCurve(PyObject *args)
+ return nullptr;
+
+ try {
+- Handle(Adaptor2d_HCurve2d) hAdapt = getGeomPlate_CurveConstraintPtr()->ProjectedCurve();
++ auto hAdapt = getGeomPlate_CurveConstraintPtr()->ProjectedCurve();
+ if (hAdapt.IsNull())
+ Py_Return;
+
++#if OCC_VERSION_HEX >= 0x070600
++ const Adaptor2d_Curve2d& a2d = *hAdapt;
++#else
+ const Adaptor2d_Curve2d& a2d = hAdapt->Curve2d();
++#endif
+ std::unique_ptr<Geom2dCurve> ptr(Part::makeFromCurveAdaptor2d(a2d));
+ return ptr->getPyObject();
+ }
+diff --git a/src/Mod/Part/App/Geometry.cpp b/src/Mod/Part/App/Geometry.cpp
+index e6d6396ca94..1d1d67d4f01 100644
+--- a/src/Mod/Part/App/Geometry.cpp
++++ b/src/Mod/Part/App/Geometry.cpp
+@@ -51,7 +51,6 @@
+ # include <Geom_RectangularTrimmedSurface.hxx>
+ # include <Geom_SurfaceOfRevolution.hxx>
+ # include <Geom_SurfaceOfLinearExtrusion.hxx>
+-# include <GeomAdaptor_HCurve.hxx>
+ # include <GeomAPI_Interpolate.hxx>
+ # include <GeomConvert.hxx>
+ # include <GeomConvert_CompCurveToBSplineCurve.hxx>
+@@ -101,6 +100,9 @@
+ # include <GeomAPI_ExtremaCurveCurve.hxx>
+ # include <ShapeConstruct_Curve.hxx>
+ # include <LProp_NotDefined.hxx>
++# if OCC_VERSION_HEX < 0x070600
++# include <GeomAdaptor_HCurve.hxx>
++# endif
+
+ # include <ctime>
+ # include <cmath>
+@@ -144,6 +146,9 @@
+
+ #include "Geometry.h"
+
++#if OCC_VERSION_HEX >= 0x070600
++using GeomAdaptor_HCurve = GeomAdaptor_Curve;
++#endif
+
+ using namespace Part;
+
+diff --git a/src/Mod/Part/App/PartFeatures.cpp b/src/Mod/Part/App/PartFeatures.cpp
+index 2dc503bdf21..4d9e1fc0f99 100644
+--- a/src/Mod/Part/App/PartFeatures.cpp
++++ b/src/Mod/Part/App/PartFeatures.cpp
+@@ -25,9 +25,7 @@
+ #ifndef _PreComp_
+ # include <BRepFill.hxx>
+ # include <BRepAdaptor_Curve.hxx>
+-# include <BRepAdaptor_HCurve.hxx>
+ # include <BRepAdaptor_CompCurve.hxx>
+-# include <BRepAdaptor_HCompCurve.hxx>
+ # include <BRepLib_MakeWire.hxx>
+ # include <Geom_BSplineSurface.hxx>
+ # include <TopoDS.hxx>
+@@ -43,7 +41,7 @@
+ # include <TopExp_Explorer.hxx>
+ # include <TopoDS.hxx>
+ # include <Precision.hxx>
+-# include <Adaptor3d_HCurve.hxx>
++# include <memory>
+ #endif
+
+
+@@ -170,22 +168,18 @@ App::DocumentObjectExecReturn *RuledSurface::execute(void)
+
+ if (Orientation.getValue() == 0) {
+ // Automatic
+- Handle(Adaptor3d_HCurve) a1;
+- Handle(Adaptor3d_HCurve) a2;
++ std::unique_ptr<Adaptor3d_Curve> a1;
++ std::unique_ptr<Adaptor3d_Curve> a2;
+ if (!isWire) {
+- BRepAdaptor_Curve adapt1(TopoDS::Edge(S1));
+- BRepAdaptor_Curve adapt2(TopoDS::Edge(S2));
+- a1 = new BRepAdaptor_HCurve(adapt1);
+- a2 = new BRepAdaptor_HCurve(adapt2);
++ a1 = std::make_unique<BRepAdaptor_Curve>(TopoDS::Edge(S1));
++ a2 = std::make_unique<BRepAdaptor_Curve>(TopoDS::Edge(S2));
+ }
+ else {
+- BRepAdaptor_CompCurve adapt1(TopoDS::Wire(S1));
+- BRepAdaptor_CompCurve adapt2(TopoDS::Wire(S2));
+- a1 = new BRepAdaptor_HCompCurve(adapt1);
+- a2 = new BRepAdaptor_HCompCurve(adapt2);
++ a1 = std::make_unique<BRepAdaptor_CompCurve>(TopoDS::Wire(S1));
++ a2 = std::make_unique<BRepAdaptor_CompCurve>(TopoDS::Wire(S2));
+ }
+
+- if (!a1.IsNull() && !a2.IsNull()) {
++ if (a1 && a2) {
+ // get end points of 1st curve
+ Standard_Real first, last;
+ first = a1->FirstParameter();
+diff --git a/src/Mod/Part/App/TopoShape.cpp b/src/Mod/Part/App/TopoShape.cpp
+index 05341de3d66..b7617a3943e 100644
+--- a/src/Mod/Part/App/TopoShape.cpp
++++ b/src/Mod/Part/App/TopoShape.cpp
+@@ -38,8 +38,6 @@
+ # include <BRep_Tool.hxx>
+ # include <BRepAdaptor_Curve.hxx>
+ # include <BRepAdaptor_CompCurve.hxx>
+-# include <BRepAdaptor_HCurve.hxx>
+-# include <BRepAdaptor_HCompCurve.hxx>
+ # include <BRepAdaptor_Surface.hxx>
+ # include <BRepAlgoAPI_Common.hxx>
+ # include <BRepAlgoAPI_Cut.hxx>
+@@ -186,6 +184,12 @@
+ #if OCC_VERSION_HEX >= 0x070300
+ # include <BRepAlgoAPI_Defeaturing.hxx>
+ #endif
++
++#if OCC_VERSION_HEX < 0x070600
++# include <BRepAdaptor_HCurve.hxx>
++# include <BRepAdaptor_HCompCurve.hxx>
++#endif
++
+ #endif // _PreComp_
+
+ #include <boost/algorithm/string/predicate.hpp>
+@@ -2133,12 +2137,20 @@ TopoDS_Shape TopoShape::makeTube(double radius, double tol, int cont, int maxdeg
+ if (this->_Shape.IsNull())
+ Standard_Failure::Raise("Cannot sweep along empty spine");
+
++#if OCC_VERSION_HEX >= 0x070600
++ Handle(Adaptor3d_Curve) myPath;
++ if (this->_Shape.ShapeType() == TopAbs_EDGE) {
++ const TopoDS_Edge& path_edge = TopoDS::Edge(this->_Shape);
++ myPath = new BRepAdaptor_Curve(path_edge);
++ }
++#else
+ Handle(Adaptor3d_HCurve) myPath;
+ if (this->_Shape.ShapeType() == TopAbs_EDGE) {
+ const TopoDS_Edge& path_edge = TopoDS::Edge(this->_Shape);
+ BRepAdaptor_Curve path_adapt(path_edge);
+ myPath = new BRepAdaptor_HCurve(path_adapt);
+ }
++#endif
+ //else if (this->_Shape.ShapeType() == TopAbs_WIRE) {
+ // const TopoDS_Wire& path_wire = TopoDS::Wire(this->_Shape);
+ // BRepAdaptor_CompCurve path_adapt(path_wire);
+@@ -3777,72 +3789,32 @@ void TopoShape::getLinesFromSubElement(const Data::Segment* element,
+ for(TopExp_Explorer exp(shape,TopAbs_EDGE);exp.More();exp.Next()) {
+
+ TopoDS_Edge aEdge = TopoDS::Edge(exp.Current());
+- TopLoc_Location aLoc;
+- Handle(Poly_Polygon3D) aPoly = BRep_Tool::Polygon3D(aEdge, aLoc);
++ std::vector<gp_Pnt> points;
+
+- gp_Trsf myTransf;
+- Standard_Integer nbNodesInFace;
+-
+- auto line_start = vertices.size();
+-
+- // triangulation succeeded?
+- if (!aPoly.IsNull()) {
+- if (!aLoc.IsIdentity()) {
+- myTransf = aLoc.Transformation();
+- }
+- nbNodesInFace = aPoly->NbNodes();
+-
+- const TColgp_Array1OfPnt& Nodes = aPoly->Nodes();
+-
+- gp_Pnt V;
+- for (Standard_Integer i=0;i < nbNodesInFace;i++) {
+- V = Nodes(i+1);
+- V.Transform(myTransf);
+- vertices.emplace_back(V.X(),V.Y(),V.Z());
+- }
+- }
+- else {
++ if (!Tools::getPolygon3D(aEdge, points)) {
+ // the edge has not its own triangulation, but then a face the edge is attached to
+ // must provide this triangulation
+
+ // Look for one face in our map (it doesn't care which one we take)
+ int index = edge2Face.FindIndex(aEdge);
+- if(!index)
++ if (index < 1)
+ continue;
+ const auto &faces = edge2Face.FindFromIndex(index);
+- if(!faces.Extent())
++ if (faces.Extent() == 0)
+ continue;
+ const TopoDS_Face& aFace = TopoDS::Face(faces.First());
+
+- // take the face's triangulation instead
+- Handle(Poly_Triangulation) aPolyTria = BRep_Tool::Triangulation(aFace,aLoc);
+- if (!aLoc.IsIdentity()) {
+- myTransf = aLoc.Transformation();
+- }
+-
+- if (aPolyTria.IsNull()) break;
+-
+- // this holds the indices of the edge's triangulation to the actual points
+- Handle(Poly_PolygonOnTriangulation) aPoly = BRep_Tool::PolygonOnTriangulation(aEdge, aPolyTria, aLoc);
+- if (aPoly.IsNull())
+- continue; // polygon does not exist
+-
+- // getting size and create the array
+- nbNodesInFace = aPoly->NbNodes();
+-
+- const TColStd_Array1OfInteger& indices = aPoly->Nodes();
+- const TColgp_Array1OfPnt& Nodes = aPolyTria->Nodes();
+-
+- gp_Pnt V;
+- // go through the index array
+- for (Standard_Integer i=indices.Lower();i <= indices.Upper();i++) {
+- V = Nodes(indices(i));
+- V.Transform(myTransf);
+- vertices.emplace_back(V.X(),V.Y(),V.Z());
+- }
++ if (!Part::Tools::getPolygonOnTriangulation(aEdge, aFace, points))
++ continue;
+ }
+
+- if(line_start+1 < vertices.size()) {
++ auto line_start = vertices.size();
++ vertices.reserve(vertices.size() + points.size());
++ std::for_each(points.begin(), points.end(), [&vertices](const gp_Pnt& p) {
++ vertices.push_back(Base::convertTo<Base::Vector3d>(p));
++ });
++
++ if (line_start+1 < vertices.size()) {
+ lines.emplace_back();
+ lines.back().I1 = line_start;
+ lines.back().I2 = vertices.size()-1;
+diff --git a/src/Mod/Part/App/TopoShapeFacePyImp.cpp b/src/Mod/Part/App/TopoShapeFacePyImp.cpp
+index ea6cd98bdf4..63e8bead74d 100644
+--- a/src/Mod/Part/App/TopoShapeFacePyImp.cpp
++++ b/src/Mod/Part/App/TopoShapeFacePyImp.cpp
+@@ -493,6 +493,15 @@ PyObject* TopoShapeFacePy::getUVNodes(PyObject *args)
+ return Py::new_reference_to(list);
+ }
+
++#if OCC_VERSION_HEX >= 0x070600
++ for (int i=1; i<=mesh->NbNodes(); i++) {
++ gp_Pnt2d pt2d = mesh->UVNode(i);
++ Py::Tuple uv(2);
++ uv.setItem(0, Py::Float(pt2d.X()));
++ uv.setItem(1, Py::Float(pt2d.Y()));
++ list.append(uv);
++ }
++#else
+ const TColgp_Array1OfPnt2d& aNodesUV = mesh->UVNodes();
+ for (int i=aNodesUV.Lower(); i<=aNodesUV.Upper(); i++) {
+ gp_Pnt2d pt2d = aNodesUV(i);
+@@ -501,6 +510,7 @@ PyObject* TopoShapeFacePy::getUVNodes(PyObject *args)
+ uv.setItem(1, Py::Float(pt2d.Y()));
+ list.append(uv);
+ }
++#endif
+
+ return Py::new_reference_to(list);
+ }
+diff --git a/src/Mod/Part/App/TopoShapeWirePyImp.cpp b/src/Mod/Part/App/TopoShapeWirePyImp.cpp
+index 95c1aff6814..a1f32d6d03c 100644
+--- a/src/Mod/Part/App/TopoShapeWirePyImp.cpp
++++ b/src/Mod/Part/App/TopoShapeWirePyImp.cpp
+@@ -344,9 +344,9 @@ PyObject* TopoShapeWirePy::approximate(PyObject *args, PyObject *kwds)
+ return 0;
+ try {
+ BRepAdaptor_CompCurve adapt(TopoDS::Wire(getTopoShapePtr()->getShape()));
+- Handle(Adaptor3d_HCurve) hcurve = adapt.Trim(adapt.FirstParameter(),
+- adapt.LastParameter(),
+- tol2d);
++ auto hcurve = adapt.Trim(adapt.FirstParameter(),
++ adapt.LastParameter(),
++ tol2d);
+ Approx_Curve3d approx(hcurve, tol3d, GeomAbs_C0, maxseg, maxdeg);
+ if (approx.IsDone()) {
+ return new BSplineCurvePy(new GeomBSplineCurve(approx.Curve()));
+diff --git a/src/Mod/Part/Gui/TaskCheckGeometry.cpp b/src/Mod/Part/Gui/TaskCheckGeometry.cpp
+index 5de7c169205..aaef13d9d07 100644
+--- a/src/Mod/Part/Gui/TaskCheckGeometry.cpp
++++ b/src/Mod/Part/Gui/TaskCheckGeometry.cpp
+@@ -711,8 +711,10 @@ int TaskCheckGeometryResults::goBOPSingleCheck(const TopoDS_Shape& shapeIn, Resu
+ #if OCC_VERSION_HEX >= 0x060900
+ #if OCC_VERSION_HEX < 0x070500
+ BOPCheck.SetProgressIndicator(theProgress);
+-#else
++#elif OCC_VERSION_HEX < 0x070600
+ BOPCheck.SetProgressIndicator(theScope);
++#else
++ Q_UNUSED(theScope)
+ #endif // 0x070500
+ #else
+ Q_UNUSED(theProgress);
+@@ -740,7 +742,7 @@ int TaskCheckGeometryResults::goBOPSingleCheck(const TopoDS_Shape& shapeIn, Resu
+ Base::TimeInfo start_time;
+ #endif
+
+-BOPCheck.Perform();
++ BOPCheck.Perform();
+
+ #ifdef FC_DEBUG
+ float bopAlgoTime = Base::TimeInfo::diffTimeF(start_time,Base::TimeInfo());
+diff --git a/src/Mod/Part/Gui/ViewProviderExt.cpp b/src/Mod/Part/Gui/ViewProviderExt.cpp
+index 77cefbe3e08..8a52f1701ba 100644
+--- a/src/Mod/Part/Gui/ViewProviderExt.cpp
++++ b/src/Mod/Part/Gui/ViewProviderExt.cpp
+@@ -1102,7 +1111,11 @@ void ViewProviderPartExt::updateVisual()
+ }
+
+ // get the 3 points of this triangle
++#if OCC_VERSION_HEX < 0x070600
+ gp_Pnt V1(Nodes(N1)), V2(Nodes(N2)), V3(Nodes(N3));
++#else
++ gp_Pnt V1(mesh->Node(N1)), V2(mesh->Node(N2)), V3(mesh->Node(N3));
++#endif
+
+ // get the 3 normals of this triangle
+ gp_Vec NV1, NV2, NV3;
+@@ -1179,7 +1192,11 @@ void ViewProviderPartExt::updateVisual()
+ // rare cases where some points are only referenced by the polygon
+ // but not by any triangle. Thus, we must apply the coordinates to
+ // make sure that everything is properly set.
++#if OCC_VERSION_HEX < 0x070600
+ gp_Pnt p(Nodes(nodeIndex));
++#else
++ gp_Pnt p(mesh->Node(nodeIndex));
++#endif
+ if (!identity)
+ p.Transform(myTransf);
+ verts[index].setValue((float)(p.X()),(float)(p.Y()),(float)(p.Z()));
+diff --git a/src/Mod/Path/App/AppPathPy.cpp b/src/Mod/Path/App/AppPathPy.cpp
+index 6e0c72d2f53..ce912b44749 100644
+--- a/src/Mod/Path/App/AppPathPy.cpp
++++ b/src/Mod/Path/App/AppPathPy.cpp
+@@ -49,10 +49,7 @@
+ #include <TopExp_Explorer.hxx>
+ #include <gp_Lin.hxx>
+ #include <BRep_Tool.hxx>
+-#include <BRepAdaptor_CompCurve.hxx>
+-#include <BRepAdaptor_HCompCurve.hxx>
+-#include <Approx_Curve3d.hxx>
+-#include <BRepAdaptor_HCurve.hxx>
++#include <BRepAdaptor_Curve.hxx>
+
+ #include "CommandPy.h"
+ #include "PathPy.h"
+diff --git a/src/Mod/TechDraw/App/Geometry.cpp b/src/Mod/TechDraw/App/Geometry.cpp
+index b6c36371377..59a92d7e51b 100644
+--- a/src/Mod/TechDraw/App/Geometry.cpp
++++ b/src/Mod/TechDraw/App/Geometry.cpp
+@@ -28,13 +28,13 @@
+ #include <BRepAdaptor_Curve.hxx>
+ #include <BRep_Tool.hxx>
+ #include <BRepTools.hxx>
+-#include <BRepAdaptor_HCurve.hxx>
+ #include <BRepLib.hxx>
+ #include <BRepBuilderAPI_MakeVertex.hxx>
+ #include <BRepBuilderAPI_MakeEdge.hxx>
+ #include <BRepBuilderAPI_MakeWire.hxx>
+ #include <BRepBuilderAPI_MakeFace.hxx>
+ #include <BRepExtrema_DistShapeShape.hxx>
++#include <BRepLProp_CLProps.hxx>
+ #include <Precision.hxx>
+ #include <GCPnts_AbscissaPoint.hxx>
+ #include <gce_MakeCirc.hxx>
+@@ -58,14 +58,16 @@
+ #include <GeomLProp_CLProps.hxx>
+ #include <GeomAPI_ProjectPointOnCurve.hxx>
+ #include <Poly_Polygon3D.hxx>
++#include <Standard_Version.hxx>
+ #include <TopoDS.hxx>
+ #include <TopoDS_Edge.hxx>
+ #include <TopExp.hxx>
+ #include <TopExp_Explorer.hxx>
+ #include <TColgp_Array1OfPnt2d.hxx>
+ #include <TColgp_Array1OfPnt.hxx>
+-#include <BRepLProp_CLProps.hxx>
+-
++#if OCC_VERSION_HEX < 0x070600
++#include <BRepAdaptor_HCurve.hxx>
++#endif
+ #include <cmath>
+ #endif // #ifndef _PreComp_
+
+@@ -86,6 +88,10 @@
+ using namespace TechDraw;
+ using namespace std;
+
++#if OCC_VERSION_HEX >= 0x070600
++using BRepAdaptor_HCurve = BRepAdaptor_Curve;
++#endif
++
+ #define GEOMETRYEDGE 0
+ #define COSMETICEDGE 1
+ #define CENTERLINE 2
+diff --git a/src/Mod/Part/Gui/ViewProviderExt.cpp b/src/Mod/Part/Gui/ViewProviderExt.cpp
+index 77cefbe3e0..8a52f1701b 100644
+--- a/src/Mod/Part/Gui/ViewProviderExt.cpp
++++ b/src/Mod/Part/Gui/ViewProviderExt.cpp
+@@ -1154,16 +1154,25 @@
+
+
+ // cycling through the poly mesh
++#if OCC_VERSION_HEX < 0x070600
+ const Poly_Array1OfTriangle& Triangles = mesh->Triangles();
+ const TColgp_Array1OfPnt& Nodes = mesh->Nodes();
+ TColgp_Array1OfDir Normals (Nodes.Lower(), Nodes.Upper());
++#else
++ int numNodes = mesh->NbNodes();
++ TColgp_Array1OfDir Normals (1, numNodes);
++#endif
+ if (NormalsFromUV)
+ getNormals(actFace, mesh, Normals);
+
+ for (int g=1;g<=nbTriInFace;g++) {
+ // Get the triangle
+ Standard_Integer N1,N2,N3;
++#if OCC_VERSION_HEX < 0x070600
+ Triangles(g).Get(N1,N2,N3);
++#else
++ mesh->Triangle(g).Get(N1,N2,N3);
++#endif
+
+ // change orientation of the triangle if the face is reversed
+ if ( orient != TopAbs_FORWARD ) {