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

@@ -76,7 +76,7 @@ int ArcPy::PyInit(PyObject* args, PyObject* /*kwd*/)
PyObject *sense=Py_True;
if (PyArg_ParseTuple(args, "O!dd|O!", &(Part::CirclePy::Type), &o, &u1, &u2, &PyBool_Type, &sense)) {
try {
Handle_Geom_Circle circle = Handle_Geom_Circle::DownCast
Handle(Geom_Circle) circle = Handle(Geom_Circle)::DownCast
(static_cast<CirclePy*>(o)->getGeomCirclePtr()->handle());
GC_MakeArcOfCircle arc(circle->Circ(), u1, u2, PyObject_IsTrue(sense) ? Standard_True : Standard_False);
if (!arc.IsDone()) {
@@ -88,7 +88,7 @@ int ArcPy::PyInit(PyObject* args, PyObject* /*kwd*/)
return 0;
}
catch (Standard_Failure) {
Handle_Standard_Failure e = Standard_Failure::Caught();
Handle(Standard_Failure) e = Standard_Failure::Caught();
PyErr_SetString(PartExceptionOCCError, e->GetMessageString());
return -1;
}
@@ -122,7 +122,7 @@ int ArcPy::PyInit(PyObject* args, PyObject* /*kwd*/)
PyErr_Clear();
if (PyArg_ParseTuple(args, "O!dd|O!", &(Part::EllipsePy::Type), &o, &u1, &u2, &PyBool_Type, &sense)) {
try {
Handle_Geom_Ellipse ellipse = Handle_Geom_Ellipse::DownCast
Handle(Geom_Ellipse) ellipse = Handle(Geom_Ellipse)::DownCast
(static_cast<EllipsePy*>(o)->getGeomEllipsePtr()->handle());
GC_MakeArcOfEllipse arc(ellipse->Elips(), u1, u2, PyObject_IsTrue(sense) ? Standard_True : Standard_False);
if (!arc.IsDone()) {
@@ -134,7 +134,7 @@ int ArcPy::PyInit(PyObject* args, PyObject* /*kwd*/)
return 0;
}
catch (Standard_Failure) {
Handle_Standard_Failure e = Standard_Failure::Caught();
Handle(Standard_Failure) e = Standard_Failure::Caught();
PyErr_SetString(PartExceptionOCCError, e->GetMessageString());
return -1;
}
@@ -148,7 +148,7 @@ int ArcPy::PyInit(PyObject* args, PyObject* /*kwd*/)
PyErr_Clear();
if (PyArg_ParseTuple(args, "O!dd|O!", &(Part::ParabolaPy::Type), &o, &u1, &u2, &PyBool_Type, &sense)) {
try {
Handle_Geom_Parabola parabola = Handle_Geom_Parabola::DownCast
Handle(Geom_Parabola) parabola = Handle(Geom_Parabola)::DownCast
(static_cast<ParabolaPy*>(o)->getGeomParabolaPtr()->handle());
GC_MakeArcOfParabola arc(parabola->Parab(), u1, u2, PyObject_IsTrue(sense) ? Standard_True : Standard_False);
if (!arc.IsDone()) {
@@ -160,7 +160,7 @@ int ArcPy::PyInit(PyObject* args, PyObject* /*kwd*/)
return 0;
}
catch (Standard_Failure) {
Handle_Standard_Failure e = Standard_Failure::Caught();
Handle(Standard_Failure) e = Standard_Failure::Caught();
PyErr_SetString(PartExceptionOCCError, e->GetMessageString());
return -1;
}
@@ -174,7 +174,7 @@ int ArcPy::PyInit(PyObject* args, PyObject* /*kwd*/)
if (PyArg_ParseTuple(args, "O!dd|O!", &(Part::HyperbolaPy::Type), &o, &u1, &u2, &PyBool_Type, &sense)) {
try {
Handle_Geom_Hyperbola hyperbola = Handle_Geom_Hyperbola::DownCast
Handle(Geom_Hyperbola) hyperbola = Handle(Geom_Hyperbola)::DownCast
(static_cast<HyperbolaPy*>(o)->getGeomHyperbolaPtr()->handle());
GC_MakeArcOfHyperbola arc(hyperbola->Hypr(), u1, u2, PyObject_IsTrue(sense) ? Standard_True : Standard_False);
if (!arc.IsDone()) {
@@ -186,7 +186,7 @@ int ArcPy::PyInit(PyObject* args, PyObject* /*kwd*/)
return 0;
}
catch (Standard_Failure) {
Handle_Standard_Failure e = Standard_Failure::Caught();
Handle(Standard_Failure) e = Standard_Failure::Caught();
PyErr_SetString(PartExceptionOCCError, e->GetMessageString());
return -1;
}