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

@@ -348,7 +348,7 @@ Base::Vector3d Constraint::getBasePoint(const Base::Vector3d& base, const Base::
}
// Translate the plane in direction of the cylinder (for positive values of Distance)
Handle_Geom_Plane pln = new Geom_Plane(plane);
Handle(Geom_Plane) pln = new Geom_Plane(plane);
gp_Pnt cylbase(base.x, base.y, base.z);
GeomAPI_ProjectPointOnSurf proj(cylbase, pln);
if (!proj.IsDone())
@@ -357,10 +357,10 @@ Base::Vector3d Constraint::getBasePoint(const Base::Vector3d& base, const Base::
gp_Pnt projPnt = proj.NearestPoint();
if ((fabs(dist) > Precision::Confusion()) && (projPnt.IsEqual(cylbase, Precision::Confusion()) == Standard_False))
plane.Translate(gp_Vec(projPnt, cylbase).Normalized().Multiplied(dist));
Handle_Geom_Plane plnt = new Geom_Plane(plane);
Handle(Geom_Plane) plnt = new Geom_Plane(plane);
// Intersect translated plane with cylinder axis
Handle_Geom_Curve crv = new Geom_Line(cylbase, cylaxis);
Handle(Geom_Curve) crv = new Geom_Line(cylbase, cylaxis);
GeomAPI_IntCS intersector(crv, plnt);
if (!intersector.IsDone())
return Base::Vector3d(0,0,0);

View File

@@ -701,7 +701,7 @@ PyObject* FemMeshPy::getFacesByFace(PyObject *args)
return Py::new_reference_to(ret);
}
catch (Standard_Failure) {
Handle_Standard_Failure e = Standard_Failure::Caught();
Handle(Standard_Failure) e = Standard_Failure::Caught();
PyErr_SetString(Base::BaseExceptionFreeCADError, e->GetMessageString());
return 0;
}
@@ -734,7 +734,7 @@ PyObject* FemMeshPy::getVolumesByFace(PyObject *args)
return Py::new_reference_to(ret);
}
catch (Standard_Failure) {
Handle_Standard_Failure e = Standard_Failure::Caught();
Handle(Standard_Failure) e = Standard_Failure::Caught();
PyErr_SetString(Base::BaseExceptionFreeCADError, e->GetMessageString());
return 0;
}
@@ -767,7 +767,7 @@ PyObject* FemMeshPy::getccxVolumesByFace(PyObject *args)
return Py::new_reference_to(ret);
}
catch (Standard_Failure) {
Handle_Standard_Failure e = Standard_Failure::Caught();
Handle(Standard_Failure) e = Standard_Failure::Caught();
PyErr_SetString(Base::BaseExceptionFreeCADError, e->GetMessageString());
return 0;
}
@@ -814,7 +814,7 @@ PyObject* FemMeshPy::getNodesBySolid(PyObject *args)
}
catch (Standard_Failure) {
Handle_Standard_Failure e = Standard_Failure::Caught();
Handle(Standard_Failure) e = Standard_Failure::Caught();
PyErr_SetString(Base::BaseExceptionFreeCADError, e->GetMessageString());
return 0;
}
@@ -842,7 +842,7 @@ PyObject* FemMeshPy::getNodesByFace(PyObject *args)
}
catch (Standard_Failure) {
Handle_Standard_Failure e = Standard_Failure::Caught();
Handle(Standard_Failure) e = Standard_Failure::Caught();
PyErr_SetString(Base::BaseExceptionFreeCADError, e->GetMessageString());
return 0;
}
@@ -870,7 +870,7 @@ PyObject* FemMeshPy::getNodesByEdge(PyObject *args)
}
catch (Standard_Failure) {
Handle_Standard_Failure e = Standard_Failure::Caught();
Handle(Standard_Failure) e = Standard_Failure::Caught();
PyErr_SetString(Base::BaseExceptionFreeCADError, e->GetMessageString());
return 0;
}
@@ -898,7 +898,7 @@ PyObject* FemMeshPy::getNodesByVertex(PyObject *args)
}
catch (Standard_Failure) {
Handle_Standard_Failure e = Standard_Failure::Caught();
Handle(Standard_Failure) e = Standard_Failure::Caught();
PyErr_SetString(Base::BaseExceptionFreeCADError, e->GetMessageString());
return 0;
}
@@ -920,7 +920,7 @@ PyObject* FemMeshPy::getElementNodes(PyObject *args)
return Py::new_reference_to(ret);
}
catch (Standard_Failure) {
Handle_Standard_Failure e = Standard_Failure::Caught();
Handle(Standard_Failure) e = Standard_Failure::Caught();
PyErr_SetString(Base::BaseExceptionFreeCADError, e->GetMessageString());
return 0;
}

View File

@@ -72,7 +72,7 @@ bool Fem::Tools::isPlanar(const TopoDS_Face& face)
return true;
}
else if (surface.GetType() == GeomAbs_BSplineSurface) {
Handle_Geom_BSplineSurface spline = surface.BSpline();
Handle(Geom_BSplineSurface) spline = surface.BSpline();
try {
TColgp_Array2OfPnt poles(1,spline->NbUPoles(),1,spline->NbVPoles());
spline->Poles(poles);
@@ -104,7 +104,7 @@ bool Fem::Tools::isPlanar(const TopoDS_Face& face)
}
}
else if (surface.GetType() == GeomAbs_BezierSurface) {
Handle_Geom_BezierSurface bezier = surface.Bezier();
Handle(Geom_BezierSurface) bezier = surface.Bezier();
try {
TColgp_Array2OfPnt poles(1,bezier->NbUPoles(),1,bezier->NbVPoles());
bezier->Poles(poles);
@@ -148,7 +148,7 @@ gp_XYZ Fem::Tools::getDirection(const TopoDS_Face& face)
dir = surface.Plane().Axis().Direction().XYZ();
}
else if (surface.GetType() == GeomAbs_BSplineSurface) {
Handle_Geom_BSplineSurface spline = surface.BSpline();
Handle(Geom_BSplineSurface) spline = surface.BSpline();
try {
TColgp_Array2OfPnt poles(1,spline->NbUPoles(),1,spline->NbVPoles());
spline->Poles(poles);
@@ -167,7 +167,7 @@ gp_XYZ Fem::Tools::getDirection(const TopoDS_Face& face)
}
}
else if (surface.GetType() == GeomAbs_BezierSurface) {
Handle_Geom_BezierSurface bezier = surface.Bezier();
Handle(Geom_BezierSurface) bezier = surface.Bezier();
try {
TColgp_Array2OfPnt poles(1,bezier->NbUPoles(),1,bezier->NbVPoles());
bezier->Poles(poles);
@@ -196,7 +196,7 @@ bool Fem::Tools::isLinear(const TopoDS_Edge& edge)
return true;
}
else if (curve.GetType() == GeomAbs_BSplineCurve) {
Handle_Geom_BSplineCurve spline = curve.BSpline();
Handle(Geom_BSplineCurve) spline = curve.BSpline();
try {
gp_Pnt s1 = spline->Pole(1);
gp_Pnt sn = spline->Pole(spline->NbPoles());
@@ -218,7 +218,7 @@ bool Fem::Tools::isLinear(const TopoDS_Edge& edge)
}
}
else if (curve.GetType() == GeomAbs_BezierCurve) {
Handle_Geom_BezierCurve bezier = curve.Bezier();
Handle(Geom_BezierCurve) bezier = curve.Bezier();
try {
gp_Pnt s1 = bezier->Pole(1);
gp_Pnt sn = bezier->Pole(bezier->NbPoles());
@@ -252,7 +252,7 @@ gp_XYZ Fem::Tools::getDirection(const TopoDS_Edge& edge)
dir = curve.Line().Direction().XYZ();
}
else if (curve.GetType() == GeomAbs_BSplineCurve) {
Handle_Geom_BSplineCurve spline = curve.BSpline();
Handle(Geom_BSplineCurve) spline = curve.BSpline();
try {
gp_Pnt s1 = spline->Pole(1);
gp_Pnt sn = spline->Pole(spline->NbPoles());
@@ -264,7 +264,7 @@ gp_XYZ Fem::Tools::getDirection(const TopoDS_Edge& edge)
}
}
else if (curve.GetType() == GeomAbs_BezierCurve) {
Handle_Geom_BezierCurve bezier = curve.Bezier();
Handle(Geom_BezierCurve) bezier = curve.Bezier();
try {
gp_Pnt s1 = bezier->Pole(1);
gp_Pnt sn = bezier->Pole(bezier->NbPoles());