Attacher: Py: create AttachEnginePy
Not very useful at the moment, just created the interface.
This commit is contained in:
@@ -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);
|
||||
|
||||
25
src/Mod/Part/App/AttachEnginePy.xml
Normal file
25
src/Mod/Part/App/AttachEnginePy.xml
Normal file
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
|
||||
<PythonExport
|
||||
Father="BaseClassPy"
|
||||
Name="AttachEnginePy"
|
||||
Twin="AttachEngine"
|
||||
TwinPointer="AttachEngine"
|
||||
Include="Mod/Part/App/Attacher.h"
|
||||
FatherInclude="Base/BaseClassPy.h"
|
||||
Namespace="Attacher"
|
||||
Delete="true"
|
||||
FatherNamespace="Base">
|
||||
<Documentation>
|
||||
<Author Licence="LGPL" Name="DeepSOIC" EMail="vv.titov@gmail.com" />
|
||||
<DeveloperDocu>AttachEngine abstract class</DeveloperDocu>
|
||||
<UserDocu>AttachEngine abstract class - the functinality of AttachableObject, but outside of DocumentObject</UserDocu>
|
||||
</Documentation>
|
||||
<Attribute Name="AttacherType" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Type of engine: 3d, plane, line, or point.</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="AttacherType" Type="String" />
|
||||
</Attribute>
|
||||
</PythonExport>
|
||||
</GenerateModel>
|
||||
33
src/Mod/Part/App/AttachEnginePyImp.cpp
Normal file
33
src/Mod/Part/App/AttachEnginePyImp.cpp
Normal file
@@ -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("<Attacher::AttachEngine>");
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 )
|
||||
|
||||
Reference in New Issue
Block a user