-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2023 CEA, EDF, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#include <TColGeom_HArray2OfSurface.hxx>
+#if OCC_VERSION_LARGE < 0x07070000
#include <GeomAdaptor_HSurface.hxx>
-#include <GeomLib_IsPlanarSurface.hxx>
+#else
+#include <GeomAdaptor_Surface.hxx>
+#endif
+#include <GeomLib_IsPlanarSurface.hxx>
#include <Geom_Surface.hxx>
#include <Geom_Plane.hxx>
#include <Geom_OffsetSurface.hxx>
#include <Geom_SurfaceOfLinearExtrusion.hxx>
#include <Geom_RectangularTrimmedSurface.hxx>
#include <BRepAdaptor_Surface.hxx>
+#if OCC_VERSION_LARGE < 0x07070000
#include <BRepAdaptor_HSurface.hxx>
+#endif
#include <LocalAnalysis_SurfaceContinuity.hxx>
#include <GeomConvert_ApproxSurface.hxx>
#include <Bnd_Box.hxx>
#include <BRepBndLib.hxx>
+#include <Geom_TrimmedCurve.hxx>
#include <Geom_Curve.hxx>
#include <Geom_Line.hxx>
#include <Geom_Circle.hxx>
// Computation of the number of samples on the edge.
BRepAdaptor_Surface aBAS(theFace);
+#if OCC_VERSION_LARGE < 0x07070000
Handle(BRepAdaptor_HSurface) aBAHS = new BRepAdaptor_HSurface(aBAS);
+#else
+ Handle(BRepAdaptor_Surface) aBAHS = new BRepAdaptor_Surface(aBAS);
+#endif
Handle(BRepTopAdaptor_TopolTool) aTool = new BRepTopAdaptor_TopolTool(aBAHS);
Standard_Integer aNbSamples = aTool->NbSamples();
const Standard_Integer aNbSamplesMax = 23;
Handle(Geom_SurfaceOfRevolution) aRS =
Handle(Geom_SurfaceOfRevolution)::DownCast(theInSurface);
Handle(Geom_Curve) aBasis = aRS->BasisCurve();
+
+ while (aBasis->IsKind(STANDARD_TYPE(Geom_TrimmedCurve))) {
+ Handle(Geom_TrimmedCurve) aTc =
+ Handle(Geom_TrimmedCurve)::DownCast(aBasis);
+ aBasis = aTc->BasisCurve();
+ }
+
if (aBasis->IsKind(STANDARD_TYPE(Geom_Line))) {
Handle(Geom_Line) aBasisLine = Handle(Geom_Line)::DownCast(aBasis);
gp_Dir aDir = aRS->Direction();
Handle(Geom_SurfaceOfLinearExtrusion) aLES =
Handle(Geom_SurfaceOfLinearExtrusion)::DownCast(theInSurface);
Handle(Geom_Curve) aBasis = aLES->BasisCurve();
+
+ while (aBasis->IsKind(STANDARD_TYPE(Geom_TrimmedCurve))) {
+ Handle(Geom_TrimmedCurve) aTc =
+ Handle(Geom_TrimmedCurve)::DownCast(aBasis);
+ aBasis = aTc->BasisCurve();
+ }
+
if (aBasis->IsKind(STANDARD_TYPE(Geom_Circle))) {
Handle(Geom_Circle) aBasisCircle = Handle(Geom_Circle)::DownCast(aBasis);
gp_Dir aDir = aLES->Direction();
if (S1->IsKind(STANDARD_TYPE(Geom_ElementarySurface)) &&
S2->IsKind(STANDARD_TYPE(Geom_ElementarySurface)))
{
+#if OCC_VERSION_LARGE < 0x07070000
Handle(GeomAdaptor_HSurface) aGA1 = new GeomAdaptor_HSurface(S1);
Handle(GeomAdaptor_HSurface) aGA2 = new GeomAdaptor_HSurface(S2);
+#else
+ Handle(GeomAdaptor_Surface) aGA1 = new GeomAdaptor_Surface(S1);
+ Handle(GeomAdaptor_Surface) aGA2 = new GeomAdaptor_Surface(S2);
+#endif
Handle(BRepTopAdaptor_TopolTool) aTT1 = new BRepTopAdaptor_TopolTool();
Handle(BRepTopAdaptor_TopolTool) aTT2 = new BRepTopAdaptor_TopolTool();
return anIIInt.TangentFaces();
}
- catch (Standard_Failure) {
+ catch (Standard_Failure&) {
return false;
}
}