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:
@@ -83,10 +83,10 @@ int PlateSurfacePy::PyInit(PyObject* args, PyObject* kwds)
|
||||
return -1;
|
||||
}
|
||||
|
||||
Handle_Geom_Surface surf;
|
||||
Handle(Geom_Surface) surf;
|
||||
if (surface) {
|
||||
GeometryPy* pcGeo = static_cast<GeometryPy*>(surface);
|
||||
surf = Handle_Geom_Surface::DownCast
|
||||
surf = Handle(Geom_Surface)::DownCast
|
||||
(pcGeo->getGeometryPtr()->handle());
|
||||
if (surf.IsNull()) {
|
||||
PyErr_SetString(PyExc_TypeError, "geometry is not a surface");
|
||||
@@ -131,7 +131,7 @@ int PlateSurfacePy::PyInit(PyObject* args, PyObject* kwds)
|
||||
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;
|
||||
}
|
||||
@@ -172,9 +172,9 @@ PyObject* PlateSurfacePy::makeApprox(PyObject *args, PyObject* kwds)
|
||||
continuity = GeomAbs_C1;
|
||||
|
||||
PY_TRY {
|
||||
GeomPlate_MakeApprox approx(Handle_GeomPlate_Surface::DownCast(getGeomPlateSurfacePtr()->handle()),
|
||||
GeomPlate_MakeApprox approx(Handle(GeomPlate_Surface)::DownCast(getGeomPlateSurfacePtr()->handle()),
|
||||
tol3d, maxSeg, maxDegree, dmax, critOrder, continuity, enlargeCoeff);
|
||||
Handle_Geom_BSplineSurface hSurf = approx.Surface();
|
||||
Handle(Geom_BSplineSurface) hSurf = approx.Surface();
|
||||
|
||||
if (!hSurf.IsNull()) {
|
||||
return new Part::BSplineSurfacePy(new Part::GeomBSplineSurface(hSurf));
|
||||
|
||||
Reference in New Issue
Block a user