Skip to content

Commit

Permalink
Part: fix build for OCC 7.6
Browse files Browse the repository at this point in the history
  • Loading branch information
realthunder committed Dec 10, 2021
1 parent a2a368a commit 83d634c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
12 changes: 10 additions & 2 deletions src/Mod/Part/App/Geometry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
# include <BRep_Tool.hxx>
# include <BRepAdaptor_Curve.hxx>
# include <BRepAdaptor_Surface.hxx>
# include <BRepAdaptor_HSurface.hxx>
# include <Geom_CartesianPoint.hxx>
# include <Geom_Circle.hxx>
# include <Geom_Curve.hxx>
Expand Down Expand Up @@ -107,7 +106,8 @@
# include <LProp_NotDefined.hxx>
# include <TopoDS.hxx>
# if OCC_VERSION_HEX < 0x070600
# include <GeomAdaptor_HCurve.hxx>
# include <GeomAdaptor_HCurve.hxx>
# include <BRepAdaptor_HSurface.hxx>
# endif

# include <memory>
Expand Down Expand Up @@ -4530,12 +4530,20 @@ static Standard_Boolean IsPlanar(const Adaptor3d_Surface& theS)
const GeomAbs_SurfaceType aST = theS.GetType();
if(aST == GeomAbs_OffsetSurface)
{
# if OCC_VERSION_HEX < 0x070600
return IsPlanar(theS.BasisSurface()->Surface());
#else
return IsPlanar(*theS.BasisSurface());
#endif
}

if(aST == GeomAbs_SurfaceOfExtrusion)
{
# if OCC_VERSION_HEX < 0x070600
return IsLinear(theS.BasisCurve()->Curve());
#else
return IsLinear(*theS.BasisCurve());
#endif
}

if((aST == GeomAbs_BSplineSurface) || (aST == GeomAbs_BezierSurface))
Expand Down
9 changes: 8 additions & 1 deletion src/Mod/Part/App/TopoShapeEx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,14 @@
# include <BRep_Tool.hxx>
# include <BRepAdaptor_Curve.hxx>
# include <BRepAdaptor_CompCurve.hxx>
# if OCC_VERSION_HEX < 0x070600
# include <BRepAdaptor_HCurve.hxx>
# include <BRepAdaptor_HCompCurve.hxx>
# endif
# include <BRepAdaptor_Surface.hxx>
# include <BRepAlgoAPI_Common.hxx>
# include <BRepAlgoAPI_Cut.hxx>
# include <BRepAlgoAPI_Fuse.hxx>
# include <BRepAlgo_Fuse.hxx>
# include <BRepAlgoAPI_Section.hxx>
# include <BRepBndLib.hxx>
# include <BRepBuilderAPI_FindPlane.hxx>
Expand Down Expand Up @@ -208,6 +209,12 @@

FC_LOG_LEVEL_INIT("TopoShape",true,2);

#if OCC_VERSION_HEX >= 0x070600
using Adaptor3d_HCurve = Adaptor3d_Curve;
using BRepAdaptor_HCurve = BRepAdaptor_Curve;
using BRepAdaptor_HCompCurve = BRepAdaptor_CompCurve;
#endif

using namespace Part;
using namespace Data;
namespace bio = boost::iostreams;
Expand Down

0 comments on commit 83d634c

Please sign in to comment.