implement method to get GeomSurface from Geom_Surface
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include "PreCompiled.h"
|
||||
#ifndef _PreComp_
|
||||
# include <Geom_OffsetSurface.hxx>
|
||||
# include <memory>
|
||||
#endif
|
||||
|
||||
#include <Base/VectorPy.h>
|
||||
@@ -31,8 +32,8 @@
|
||||
|
||||
#include "OCCError.h"
|
||||
#include "Geometry.h"
|
||||
#include "OffsetSurfacePy.h"
|
||||
#include "OffsetSurfacePy.cpp"
|
||||
#include <Mod/Part/App/OffsetSurfacePy.h>
|
||||
#include <Mod/Part/App/OffsetSurfacePy.cpp>
|
||||
|
||||
using namespace Part;
|
||||
|
||||
@@ -92,7 +93,14 @@ void OffsetSurfacePy::setOffsetValue(Py::Float arg)
|
||||
|
||||
Py::Object OffsetSurfacePy::getBasisSurface(void) const
|
||||
{
|
||||
throw Py::Exception(PyExc_NotImplementedError, "Not yet implemented");
|
||||
Handle_Geom_OffsetSurface surf = Handle_Geom_OffsetSurface::DownCast
|
||||
(getGeometryPtr()->handle());
|
||||
if (surf.IsNull()) {
|
||||
throw Py::TypeError("geometry is not a surface");
|
||||
}
|
||||
|
||||
std::unique_ptr<GeomSurface> geo(makeFromSurface(surf->BasisSurface()));
|
||||
return Py::asObject(geo->getPyObject());
|
||||
}
|
||||
|
||||
void OffsetSurfacePy::setBasisSurface(Py::Object arg)
|
||||
|
||||
Reference in New Issue
Block a user