diff --git a/src/Mod/Part/App/AppPart.cpp b/src/Mod/Part/App/AppPart.cpp index f573eef8e1..eaa8f9ea58 100644 --- a/src/Mod/Part/App/AppPart.cpp +++ b/src/Mod/Part/App/AppPart.cpp @@ -90,6 +90,7 @@ #include "ToroidPy.h" #include "BRepOffsetAPI_MakePipeShellPy.h" #include "PartFeaturePy.h" +#include "AttachEnginePy.h" #include "PropertyGeometryList.h" #include "DatumFeature.h" #include "Attacher.h" @@ -209,6 +210,8 @@ PyMODINIT_FUNC initPart() Base::Interpreter().addType(&Part::PartFeaturePy ::Type,partModule,"Feature"); + Base::Interpreter().addType(&Attacher::AttachEnginePy ::Type,partModule,"AttachEngine"); + PyObject* brepModule = Py_InitModule3("BRepOffsetAPI", 0, "BrepOffsetAPI"); Py_INCREF(brepModule); PyModule_AddObject(partModule, "BRepOffsetAPI", brepModule); diff --git a/src/Mod/Part/App/AttachEnginePy.xml b/src/Mod/Part/App/AttachEnginePy.xml new file mode 100644 index 0000000000..a38a81c2a5 --- /dev/null +++ b/src/Mod/Part/App/AttachEnginePy.xml @@ -0,0 +1,25 @@ + + + + + + AttachEngine abstract class + AttachEngine abstract class - the functinality of AttachableObject, but outside of DocumentObject + + + + Type of engine: 3d, plane, line, or point. + + + + + diff --git a/src/Mod/Part/App/AttachEnginePyImp.cpp b/src/Mod/Part/App/AttachEnginePyImp.cpp new file mode 100644 index 0000000000..ebc2e06d93 --- /dev/null +++ b/src/Mod/Part/App/AttachEnginePyImp.cpp @@ -0,0 +1,33 @@ +#include "PreCompiled.h" + +#include "Mod/Part/App/Attacher.h" + +#include "OCCError.h" + +// inclusion of the generated files (generated out of AttachableObjectPy.xml) +#include "AttachEnginePy.h" +#include "AttachEnginePy.cpp" + +using namespace Attacher; + +// returns a string which represents the object e.g. when printed in python +std::string AttachEnginePy::representation(void) const +{ + return std::string(""); +} + +Py::String AttachEnginePy::getAttacherType(void) const +{ + return Py::String(std::string(this->getAttachEnginePtr()->getTypeId().getName())); +} + +PyObject* AttachEnginePy::getCustomAttributes(const char*) const +{ + return 0; +} + +int AttachEnginePy::setCustomAttributes(const char*,PyObject*) +{ + return 0; +} + diff --git a/src/Mod/Part/App/CMakeLists.txt b/src/Mod/Part/App/CMakeLists.txt index 68a7181237..333557ad60 100644 --- a/src/Mod/Part/App/CMakeLists.txt +++ b/src/Mod/Part/App/CMakeLists.txt @@ -71,6 +71,7 @@ generate_from_xml(SurfaceOfRevolutionPy) generate_from_xml(PartFeaturePy) generate_from_xml(AttachableObjectPy) generate_from_xml(Part2DObjectPy) +generate_from_xml(AttachEnginePy) generate_from_xml(TopoShapePy) generate_from_xml(TopoShapeCompoundPy) generate_from_xml(TopoShapeCompSolidPy) @@ -221,6 +222,8 @@ SET(Python_SRCS AttachableObjectPyImp.cpp Part2DObjectPy.xml Part2DObjectPyImp.cpp + AttachEnginePy.xml + AttachEnginePyImp.cpp TopoShapePy.xml TopoShapePyImp.cpp TopoShapeCompSolidPy.xml diff --git a/src/Mod/Part/App/PreCompiled.h b/src/Mod/Part/App/PreCompiled.h index 67c8bc391e..ad0c3508f7 100644 --- a/src/Mod/Part/App/PreCompiled.h +++ b/src/Mod/Part/App/PreCompiled.h @@ -34,6 +34,9 @@ # define PartExport #endif +//needed to make autogenerated Py interface source code to compile +#define AttacherExport PartExport + // here get the warnings of too long specifiers disabled (needed for VC6) #ifdef _MSC_VER # pragma warning( disable : 4251 )