Skip to content

Commit

Permalink
Part: [skip ci] implement methods getBasisCurve of Surface of Revolut…
Browse files Browse the repository at this point in the history
…ion/Extrusion
  • Loading branch information
wwmayer committed Jan 22, 2020
1 parent 6fee2cd commit c532169
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
9 changes: 8 additions & 1 deletion src/Mod/Part/App/SurfaceOfExtrusionPyImp.cpp
Expand Up @@ -117,9 +117,16 @@ void SurfaceOfExtrusionPy::setDirection(Py::Object arg)
}
}

namespace Part {
extern const Py::Object makeGeometryCurvePy(const Handle(Geom_Curve)& c);
}

Py::Object SurfaceOfExtrusionPy::getBasisCurve(void) const
{
throw Py::Exception(PyExc_NotImplementedError, "Not yet implemented");
Handle(Geom_SurfaceOfLinearExtrusion) surf = Handle(Geom_SurfaceOfLinearExtrusion)::DownCast
(getGeometryPtr()->handle());
Handle(Geom_Curve) curve = surf->BasisCurve();
return makeGeometryCurvePy(curve);
}

void SurfaceOfExtrusionPy::setBasisCurve(Py::Object arg)
Expand Down
9 changes: 8 additions & 1 deletion src/Mod/Part/App/SurfaceOfRevolutionPyImp.cpp
Expand Up @@ -144,9 +144,16 @@ void SurfaceOfRevolutionPy::setDirection(Py::Object arg)
}
}

namespace Part {
extern const Py::Object makeGeometryCurvePy(const Handle(Geom_Curve)& c);
}

Py::Object SurfaceOfRevolutionPy::getBasisCurve(void) const
{
throw Py::Exception(PyExc_NotImplementedError, "Not yet implemented");
Handle(Geom_SurfaceOfRevolution) surf = Handle(Geom_SurfaceOfRevolution)::DownCast
(getGeometryPtr()->handle());
Handle(Geom_Curve) curve = surf->BasisCurve();
return makeGeometryCurvePy(curve);
}

void SurfaceOfRevolutionPy::setBasisCurve(Py::Object arg)
Expand Down

0 comments on commit c532169

Please sign in to comment.