The python export class for SketchObject. More...
#include <SketchObjectPy.h>
Public Types | |
typedef SketchObject * | PointerType |
Public Member Functions | |
PyObject * | _getattr (char *attr) |
GetAttribute implementation This method implements the retriavel of object attributes. | |
virtual PyObject * | _repr (void) |
_repr method Overide this method to return a string object with some invormation about the object. | |
int | _setattr (char *attr, PyObject *value) |
SetAttribute implementation This method implements the seting of object attributes. | |
PyObject * | getCustomAttributes (const char *attr) const |
getter method for special attributes (e.g. dynamic ones) | |
virtual PyParentObject * | GetParents (void) |
SketchObject * | getSketchObjectPtr (void) const |
getter for the object handled by this class | |
virtual PyTypeObject * | GetType (void) |
virtual int | PyInit (PyObject *args, PyObject *k) |
PyInit method Overide this method to initialize a newly created instance of the class (Constuctor). | |
std::string | representation (void) const |
int | setCustomAttributes (const char *attr, PyObject *obj) |
setter for special attributes (e.g. dynamic ones) | |
SketchObjectPy (SketchObject *pcObject, PyTypeObject *T=&Type) | |
~SketchObjectPy () | |
Static Public Member Functions | |
static PyObject * | PyMake (struct _typeobject *, PyObject *, PyObject *) |
Static Public Attributes | |
static PyGetSetDef | GetterSetter [] |
Attribute structure of SketchObjectPy. | |
static PyMethodDef | Methods [] |
Methods structure of SketchObjectPy. | |
static PyParentObject | Parents [] = { PARENTSSketcherSketchObjectPy } |
static PyTypeObject | Type |
Type structure of SketchObjectPy. | |
callbacks and implementers for the python object methods | |
| |
PyObject * | addConstraint (PyObject *args) |
implementer for the addConstraint() method | |
PyObject * | addExternal (PyObject *args) |
implementer for the addExternal() method | |
PyObject * | addGeometry (PyObject *args) |
implementer for the addGeometry() method | |
PyObject * | delConstraint (PyObject *args) |
implementer for the delConstraint() method | |
PyObject * | delConstraintOnPoint (PyObject *args) |
implementer for the delConstraintOnPoint() method | |
PyObject * | delExternal (PyObject *args) |
implementer for the delExternal() method | |
PyObject * | delGeometry (PyObject *args) |
implementer for the delGeometry() method | |
PyObject * | fillet (PyObject *args) |
implementer for the fillet() method | |
PyObject * | movePoint (PyObject *args) |
implementer for the movePoint() method | |
PyObject * | setDatum (PyObject *args) |
implementer for the setDatum() method | |
PyObject * | solve (PyObject *args) |
implementer for the solve() method | |
PyObject * | toggleConstruction (PyObject *args) |
implementer for the toggleConstruction() method | |
PyObject * | trim (PyObject *args) |
implementer for the trim() method | |
static PyObject * | staticCallback_addConstraint (PyObject *self, PyObject *args) |
callback for the addConstraint() method | |
static PyObject * | staticCallback_addExternal (PyObject *self, PyObject *args) |
callback for the addExternal() method | |
static PyObject * | staticCallback_addGeometry (PyObject *self, PyObject *args) |
callback for the addGeometry() method | |
static PyObject * | staticCallback_delConstraint (PyObject *self, PyObject *args) |
callback for the delConstraint() method | |
static PyObject * | staticCallback_delConstraintOnPoint (PyObject *self, PyObject *args) |
callback for the delConstraintOnPoint() method | |
static PyObject * | staticCallback_delExternal (PyObject *self, PyObject *args) |
callback for the delExternal() method | |
static PyObject * | staticCallback_delGeometry (PyObject *self, PyObject *args) |
callback for the delGeometry() method | |
static PyObject * | staticCallback_fillet (PyObject *self, PyObject *args) |
callback for the fillet() method | |
static PyObject * | staticCallback_movePoint (PyObject *self, PyObject *args) |
callback for the movePoint() method | |
static PyObject * | staticCallback_setDatum (PyObject *self, PyObject *args) |
callback for the setDatum() method | |
static PyObject * | staticCallback_solve (PyObject *self, PyObject *args) |
callback for the solve() method | |
static PyObject * | staticCallback_toggleConstruction (PyObject *self, PyObject *args) |
callback for the toggleConstruction() method | |
static PyObject * | staticCallback_trim (PyObject *self, PyObject *args) |
callback for the trim() method | |
callbacks and implementers for the python object attributes | |
| |
Py::Int | getConstraintCount (void) const |
getter for the ConstraintCount attribute | |
Py::Int | getGeometryCount (void) const |
getter for the GeometryCount attribute | |
static PyObject * | staticCallback_getConstraintCount (PyObject *self, void *closure) |
getter callback for the ConstraintCount attribute | |
static PyObject * | staticCallback_getGeometryCount (PyObject *self, void *closure) |
getter callback for the GeometryCount attribute | |
static int | staticCallback_setConstraintCount (PyObject *self, PyObject *value, void *closure) |
setter callback for the ConstraintCount attribute | |
static int | staticCallback_setGeometryCount (PyObject *self, PyObject *value, void *closure) |
setter callback for the GeometryCount attribute |
The python export class for SketchObject.
Definition at line 20 of file SketchObjectPy.h.
Reimplemented from Part::Part2DObjectPy.
Definition at line 36 of file SketchObjectPy.h.
SketchObjectPy::SketchObjectPy | ( | SketchObject * | pcObject, | |
PyTypeObject * | T = &Type | |||
) |
Definition at line 1224 of file SketchObjectPy.cpp.
SketchObjectPy::~SketchObjectPy | ( | ) |
Definition at line 1245 of file SketchObjectPy.cpp.
PyObject * SketchObjectPy::_getattr | ( | char * | attr | ) | [virtual] |
GetAttribute implementation This method implements the retriavel of object attributes.
If you want to implement attributes in your class, reimplement this method. You have to call the method of the base class. Note: if you reimplement _gettattr() in a inheriting class you need to call the method of the base class! Otherwise even the methods of the object will disapiear!
Reimplemented from Part::Part2DObjectPy.
Definition at line 1260 of file SketchObjectPy.cpp.
References Base::Console(), getCustomAttributes(), Methods, Base::Exception::ReportException(), and Base::Exception::what().
PyObject * SketchObjectPy::_repr | ( | void | ) | [virtual] |
_repr method Overide this method to return a string object with some invormation about the object.
PyObject *MeshFeaturePy::_repr(void) { std::stringstream a; a << "MeshFeature: [ "; a << "some realy important info about the object!"; a << "]" << std::endl; return Py_BuildValue("s", a.str().c_str()); }
Reimplemented from Part::Part2DObjectPy.
Definition at line 1252 of file SketchObjectPy.cpp.
References representation().
int SketchObjectPy::_setattr | ( | char * | attr, | |
PyObject * | value | |||
) | [virtual] |
SetAttribute implementation This method implements the seting of object attributes.
If you want to implement attributes in your class, reimplement this method. You have to call the method of the base class.
Reimplemented from Part::Part2DObjectPy.
Definition at line 1328 of file SketchObjectPy.cpp.
References Base::Console(), Base::Exception::ReportException(), setCustomAttributes(), and Base::Exception::what().
implementer for the addConstraint() method
Definition at line 100 of file SketchObjectPyImp.cpp.
References getSketchObjectPtr(), Py::new_reference_to(), Py_Return, and Sketcher::ConstraintPy::Type.
implementer for the addExternal() method
Definition at line 129 of file SketchObjectPyImp.cpp.
References Sketcher::SketchObject::addExternal(), App::DocumentObject::getDocument(), App::Document::getObject(), getSketchObjectPtr(), App::PropertyLinkSub::getValue(), Py_Return, and Part::Part2DObject::Support.
implementer for the addGeometry() method
Definition at line 55 of file SketchObjectPyImp.cpp.
References getSketchObjectPtr(), Py::new_reference_to(), Py_Return, and Part::GeometryPy::Type.
implementer for the delConstraint() method
Definition at line 113 of file SketchObjectPyImp.cpp.
References getSketchObjectPtr(), and Py_Return.
implementer for the delConstraintOnPoint() method
Definition at line 169 of file SketchObjectPyImp.cpp.
References getSketchObjectPtr(), and Py_Return.
implementer for the delExternal() method
Definition at line 163 of file SketchObjectPyImp.cpp.
implementer for the delGeometry() method
Definition at line 68 of file SketchObjectPyImp.cpp.
References getSketchObjectPtr(), and Py_Return.
implementer for the fillet() method
Definition at line 236 of file SketchObjectPyImp.cpp.
References Sketcher::SketchObject::fillet(), getSketchObjectPtr(), Py_Return, trim(), Base::VectorPy::Type, draftlibs::fcgeo::v1(), Py::value(), Base::Vector3< _Precision >::x, Base::Vector3< _Precision >::y, and Base::Vector3< _Precision >::z.
Py::Int SketchObjectPy::getConstraintCount | ( | void | ) | const |
getter for the ConstraintCount attribute
Definition at line 291 of file SketchObjectPyImp.cpp.
References getSketchObjectPtr().
Referenced by staticCallback_getConstraintCount().
PyObject * SketchObjectPy::getCustomAttributes | ( | const char * | attr | ) | const |
getter method for special attributes (e.g. dynamic ones)
Reimplemented from Part::Part2DObjectPy.
Definition at line 301 of file SketchObjectPyImp.cpp.
Referenced by _getattr().
Py::Int SketchObjectPy::getGeometryCount | ( | void | ) | const |
getter for the GeometryCount attribute
Definition at line 296 of file SketchObjectPyImp.cpp.
References getSketchObjectPtr().
Referenced by staticCallback_getGeometryCount().
virtual PyParentObject* Sketcher::SketchObjectPy::GetParents | ( | void | ) | [inline, virtual] |
Reimplemented from Part::Part2DObjectPy.
Definition at line 28 of file SketchObjectPy.h.
SketchObject * SketchObjectPy::getSketchObjectPtr | ( | void | ) | const |
getter for the object handled by this class
Definition at line 1387 of file SketchObjectPy.cpp.
References Base::PyObjectBase::_pcTwinPointer.
Referenced by addConstraint(), addExternal(), addGeometry(), delConstraint(), delConstraintOnPoint(), delGeometry(), fillet(), getConstraintCount(), getGeometryCount(), movePoint(), setCustomAttributes(), setDatum(), toggleConstruction(), and trim().
virtual PyTypeObject* Sketcher::SketchObjectPy::GetType | ( | void | ) | [inline, virtual] |
Reimplemented from Part::Part2DObjectPy.
Definition at line 27 of file SketchObjectPy.h.
implementer for the movePoint() method
Definition at line 214 of file SketchObjectPyImp.cpp.
References getSketchObjectPtr(), Sketcher::SketchObject::movePoint(), Py_Return, Base::VectorPy::Type, draftlibs::fcgeo::v1(), and Py::value().
PyInit method Overide this method to initialize a newly created instance of the class (Constuctor).
Reimplemented from Part::Part2DObjectPy.
Definition at line 1237 of file SketchObjectPy.cpp.
Reimplemented from Part::Part2DObjectPy.
Definition at line 1229 of file SketchObjectPy.cpp.
std::string SketchObjectPy::representation | ( | void | ) | const |
Reimplemented from Part::Part2DObjectPy.
Definition at line 43 of file SketchObjectPyImp.cpp.
Referenced by _repr().
int SketchObjectPy::setCustomAttributes | ( | const char * | attr, | |
PyObject * | obj | |||
) |
setter for special attributes (e.g. dynamic ones)
Reimplemented from Part::Part2DObjectPy.
Definition at line 306 of file SketchObjectPyImp.cpp.
References App::PropertyContainer::getPropertyByName(), App::PropertyContainer::getPropertyType(), getSketchObjectPtr(), App::Prop_ReadOnly, Sketcher::SketchObject::rebuildVertexIndex(), Base::BaseClass::setPyObject(), and Type.
Referenced by _setattr().
implementer for the setDatum() method
Definition at line 185 of file SketchObjectPyImp.cpp.
References getSketchObjectPtr(), Py_Return, and Sketcher::SketchObject::setDatum().
implementer for the solve() method
Definition at line 49 of file SketchObjectPyImp.cpp.
PyObject * SketchObjectPy::staticCallback_addConstraint | ( | PyObject * | self, | |
PyObject * | args | |||
) | [static] |
callback for the addConstraint() method
Definition at line 469 of file SketchObjectPy.cpp.
References Base::Console(), Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), Base::PyObjectBase::PyObjectBase(), Base::Exception::ReportException(), and Base::Exception::what().
callback for the addExternal() method
Definition at line 621 of file SketchObjectPy.cpp.
References Base::Console(), Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), Base::PyObjectBase::PyObjectBase(), Base::Exception::ReportException(), and Base::Exception::what().
callback for the addGeometry() method
Definition at line 241 of file SketchObjectPy.cpp.
References Base::Console(), Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), Base::PyObjectBase::PyObjectBase(), Base::Exception::ReportException(), and Base::Exception::what().
PyObject * SketchObjectPy::staticCallback_delConstraint | ( | PyObject * | self, | |
PyObject * | args | |||
) | [static] |
callback for the delConstraint() method
Definition at line 545 of file SketchObjectPy.cpp.
References Base::Console(), Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), Base::PyObjectBase::PyObjectBase(), Base::Exception::ReportException(), and Base::Exception::what().
PyObject * SketchObjectPy::staticCallback_delConstraintOnPoint | ( | PyObject * | self, | |
PyObject * | args | |||
) | [static] |
callback for the delConstraintOnPoint() method
Definition at line 773 of file SketchObjectPy.cpp.
References Base::Console(), Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), Base::PyObjectBase::PyObjectBase(), Base::Exception::ReportException(), and Base::Exception::what().
callback for the delExternal() method
Definition at line 697 of file SketchObjectPy.cpp.
References Base::Console(), Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), Base::PyObjectBase::PyObjectBase(), Base::Exception::ReportException(), and Base::Exception::what().
callback for the delGeometry() method
Definition at line 317 of file SketchObjectPy.cpp.
References Base::Console(), Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), Base::PyObjectBase::PyObjectBase(), Base::Exception::ReportException(), and Base::Exception::what().
callback for the fillet() method
Definition at line 1001 of file SketchObjectPy.cpp.
References Base::Console(), Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), Base::PyObjectBase::PyObjectBase(), Base::Exception::ReportException(), and Base::Exception::what().
PyObject * SketchObjectPy::staticCallback_getConstraintCount | ( | PyObject * | self, | |
void * | closure | |||
) | [static] |
getter callback for the ConstraintCount attribute
Definition at line 1153 of file SketchObjectPy.cpp.
References getConstraintCount(), Base::PyObjectBase::isValid(), Py::new_reference_to(), and Base::PyObjectBase::PyObjectBase().
PyObject * SketchObjectPy::staticCallback_getGeometryCount | ( | PyObject * | self, | |
void * | closure | |||
) | [static] |
getter callback for the GeometryCount attribute
Definition at line 1185 of file SketchObjectPy.cpp.
References getGeometryCount(), Base::PyObjectBase::isValid(), Py::new_reference_to(), and Base::PyObjectBase::PyObjectBase().
callback for the movePoint() method
Definition at line 925 of file SketchObjectPy.cpp.
References Base::Console(), Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), Base::PyObjectBase::PyObjectBase(), Base::Exception::ReportException(), and Base::Exception::what().
int SketchObjectPy::staticCallback_setConstraintCount | ( | PyObject * | self, | |
PyObject * | value, | |||
void * | closure | |||
) | [static] |
setter callback for the ConstraintCount attribute
Definition at line 1171 of file SketchObjectPy.cpp.
References Base::PyObjectBase::isValid(), and Base::PyObjectBase::PyObjectBase().
callback for the setDatum() method
Definition at line 849 of file SketchObjectPy.cpp.
References Base::Console(), Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), Base::PyObjectBase::PyObjectBase(), Base::Exception::ReportException(), and Base::Exception::what().
int SketchObjectPy::staticCallback_setGeometryCount | ( | PyObject * | self, | |
PyObject * | value, | |||
void * | closure | |||
) | [static] |
setter callback for the GeometryCount attribute
Definition at line 1203 of file SketchObjectPy.cpp.
References Base::PyObjectBase::isValid(), and Base::PyObjectBase::PyObjectBase().
callback for the solve() method
Definition at line 165 of file SketchObjectPy.cpp.
References Base::Console(), Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), Base::PyObjectBase::PyObjectBase(), Base::Exception::ReportException(), and Base::Exception::what().
PyObject * SketchObjectPy::staticCallback_toggleConstruction | ( | PyObject * | self, | |
PyObject * | args | |||
) | [static] |
callback for the toggleConstruction() method
Definition at line 393 of file SketchObjectPy.cpp.
References Base::Console(), Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), Base::PyObjectBase::PyObjectBase(), Base::Exception::ReportException(), and Base::Exception::what().
callback for the trim() method
Definition at line 1077 of file SketchObjectPy.cpp.
References Base::Console(), Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), Base::PyObjectBase::PyObjectBase(), Base::Exception::ReportException(), and Base::Exception::what().
implementer for the toggleConstruction() method
Definition at line 84 of file SketchObjectPyImp.cpp.
References getSketchObjectPtr(), and Py_Return.
implementer for the trim() method
Definition at line 270 of file SketchObjectPyImp.cpp.
References getSketchObjectPtr(), Py_Return, Sketcher::SketchObject::trim(), Base::VectorPy::Type, draftlibs::fcgeo::v1(), and Py::value().
Referenced by fillet().
PyGetSetDef SketchObjectPy::GetterSetter [static] |
{ {"ConstraintCount", (getter) staticCallback_getConstraintCount, (setter) staticCallback_setConstraintCount, "Number of Constraints in this sketch", NULL }, {"GeometryCount", (getter) staticCallback_getGeometryCount, (setter) staticCallback_setGeometryCount, "Number of geometric objects in this sketch", NULL }, {NULL, NULL, NULL, NULL, NULL} }
Attribute structure of SketchObjectPy.
Reimplemented from Part::Part2DObjectPy.
Definition at line 25 of file SketchObjectPy.h.
PyMethodDef SketchObjectPy::Methods [static] |
Methods structure of SketchObjectPy.
Reimplemented from Part::Part2DObjectPy.
Definition at line 24 of file SketchObjectPy.h.
Referenced by _getattr().
PyParentObject SketchObjectPy::Parents = { PARENTSSketcherSketchObjectPy } [static] |
Reimplemented from Part::Part2DObjectPy.
Definition at line 26 of file SketchObjectPy.h.
PyTypeObject SketchObjectPy::Type [static] |
Type structure of SketchObjectPy.
Reimplemented from Part::Part2DObjectPy.
Definition at line 23 of file SketchObjectPy.h.
Referenced by setCustomAttributes().