Use OCCT Handle macro for Handle_ classes

This is the result of running OCCT's upgrade script provided
with OCCT 7.0. See
https://www.opencascade.com/content/freecad-occt710-and-windows-rtti-data-missing#comment-form
and
https://www.forum.freecadweb.org/viewtopic.php?f=4&t=21405&start=120#p169019
for why this is necessary for OCCT >= 7.1
This commit is contained in:
Peter Lama
2017-04-17 20:33:29 -04:00
committed by wmayer
parent 4564e4f4a4
commit fa4bebf2e0
141 changed files with 2198 additions and 2208 deletions

View File

@@ -346,14 +346,14 @@ FaceTypedPlane::FaceTypedPlane() : FaceTypedBase(GeomAbs_Plane)
static Handle(Geom_Plane) getGeomPlane(const TopoDS_Face &faceIn)
{
Handle_Geom_Plane planeSurfaceOut;
Handle_Geom_Surface surface = BRep_Tool::Surface(faceIn);
Handle(Geom_Plane) planeSurfaceOut;
Handle(Geom_Surface) surface = BRep_Tool::Surface(faceIn);
if (!surface.IsNull())
{
planeSurfaceOut = Handle(Geom_Plane)::DownCast(surface);
if (planeSurfaceOut.IsNull())
{
Handle_Geom_RectangularTrimmedSurface trimmedSurface = Handle(Geom_RectangularTrimmedSurface)::DownCast(surface);
Handle(Geom_RectangularTrimmedSurface) trimmedSurface = Handle(Geom_RectangularTrimmedSurface)::DownCast(surface);
if (!trimmedSurface.IsNull())
planeSurfaceOut = Handle(Geom_Plane)::DownCast(trimmedSurface->BasisSurface());
}
@@ -437,14 +437,14 @@ FaceTypedCylinder::FaceTypedCylinder() : FaceTypedBase(GeomAbs_Cylinder)
static Handle(Geom_CylindricalSurface) getGeomCylinder(const TopoDS_Face &faceIn)
{
Handle_Geom_CylindricalSurface cylinderSurfaceOut;
Handle_Geom_Surface surface = BRep_Tool::Surface(faceIn);
Handle(Geom_CylindricalSurface) cylinderSurfaceOut;
Handle(Geom_Surface) surface = BRep_Tool::Surface(faceIn);
if (!surface.IsNull())
{
cylinderSurfaceOut = Handle(Geom_CylindricalSurface)::DownCast(surface);
if (cylinderSurfaceOut.IsNull())
{
Handle_Geom_RectangularTrimmedSurface trimmedSurface = Handle(Geom_RectangularTrimmedSurface)::DownCast(surface);
Handle(Geom_RectangularTrimmedSurface) trimmedSurface = Handle(Geom_RectangularTrimmedSurface)::DownCast(surface);
if (!trimmedSurface.IsNull())
cylinderSurfaceOut = Handle(Geom_CylindricalSurface)::DownCast(trimmedSurface->BasisSurface());
}
@@ -504,7 +504,7 @@ bool wireEncirclesAxis(const TopoDS_Wire& wire, const Handle(Geom_CylindricalSur
gp_Ax1 cylAxis = cylinder->Axis();
gp_Vec cv(cylAxis.Location().X(), cylAxis.Location().Y(), cylAxis.Location().Z()); // center of cylinder
gp_Vec av(cylAxis.Direction().X(), cylAxis.Direction().Y(), cylAxis.Direction().Z()); // axis of cylinder
Handle_Geom_Plane plane = new Geom_Plane(gp_Ax3(cylAxis.Location(), cylAxis.Direction()));
Handle(Geom_Plane) plane = new Geom_Plane(gp_Ax3(cylAxis.Location(), cylAxis.Direction()));
double totalArc = 0.0;
bool firstSegment = false;
bool secondSegment = false;
@@ -792,7 +792,7 @@ void collectConicEdges(const TopoDS_Shell &shell, TopTools_IndexedMapOfShape &ma
continue;
TopLoc_Location location;
Standard_Real first, last;
const Handle_Geom_Curve &curve = BRep_Tool::Curve(currentEdge, location, first, last);
const Handle(Geom_Curve) &curve = BRep_Tool::Curve(currentEdge, location, first, last);
if (curve.IsNull())
continue;
if (curve->IsKind(STANDARD_TYPE(Geom_Conic)))