Add Python functionality for DrawHatch

This commit is contained in:
WandererFan
2016-01-28 12:43:51 -05:00
committed by wmayer
parent 4f4e343d5f
commit c47bdf5d9a
7 changed files with 77 additions and 12 deletions

View File

@@ -37,6 +37,8 @@
#include "DrawHatch.h"
#include "DrawHatchPy.h" // generated from DrawHatchPy.xml
using namespace TechDraw;
using namespace std;
@@ -97,6 +99,15 @@ App::DocumentObjectExecReturn *DrawHatch::execute(void)
return App::DocumentObject::StdReturn;
}
PyObject *DrawHatch::getPyObject(void)
{
if (PythonObject.is(Py::_None())) {
// ref counter is set to 1
PythonObject = Py::Object(new DrawHatchPy(this),true);
}
return Py::new_reference_to(PythonObject);
}
// Python Drawing feature ---------------------------------------------------------
namespace App {