The python export class for Placement. More...
#include <PlacementPy.h>
Public Types | |
typedef Placement * | 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) |
Placement * | getPlacementPtr (void) const |
getter for the object handled by this class | |
virtual PyTypeObject * | GetType (void) |
PlacementPy (Placement *pcObject, PyTypeObject *T=&Type) | |
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) | |
~PlacementPy () | |
Static Public Member Functions | |
static PyObject * | PyMake (struct _typeobject *, PyObject *, PyObject *) |
Static Public Attributes | |
static PyGetSetDef | GetterSetter [] |
Attribute structure of PlacementPy. | |
static PyMethodDef | Methods [] |
Methods structure of PlacementPy. | |
static PyParentObject | Parents [] = { PARENTSBasePlacementPy } |
static PyTypeObject | Type |
Type structure of PlacementPy. | |
callbacks and implementers for the python object methods | |
| |
PyObject * | copy (PyObject *args) |
implementer for the copy() method | |
PyObject * | inverse (PyObject *args) |
implementer for the inverse() method | |
PyObject * | move (PyObject *args) |
implementer for the move() method | |
PyObject * | multiply (PyObject *args) |
implementer for the multiply() method | |
PyObject * | multVec (PyObject *args) |
implementer for the multVec() method | |
PyObject * | toMatrix (PyObject *args) |
implementer for the toMatrix() method | |
static PyObject * | staticCallback_copy (PyObject *self, PyObject *args) |
callback for the copy() method | |
static PyObject * | staticCallback_inverse (PyObject *self, PyObject *args) |
callback for the inverse() method | |
static PyObject * | staticCallback_move (PyObject *self, PyObject *args) |
callback for the move() method | |
static PyObject * | staticCallback_multiply (PyObject *self, PyObject *args) |
callback for the multiply() method | |
static PyObject * | staticCallback_multVec (PyObject *self, PyObject *args) |
callback for the multVec() method | |
static PyObject * | staticCallback_toMatrix (PyObject *self, PyObject *args) |
callback for the toMatrix() method | |
callbacks and implementers for the python object attributes | |
| |
Py::Object | getBase (void) const |
getter for the Base attribute | |
Py::Object | getRotation (void) const |
getter for the Rotation attribute | |
void | setBase (Py::Object arg) |
setter for the Base attribute | |
void | setRotation (Py::Object arg) |
setter for the Rotation attribute | |
static PyObject * | staticCallback_getBase (PyObject *self, void *closure) |
getter callback for the Base attribute | |
static PyObject * | staticCallback_getRotation (PyObject *self, void *closure) |
getter callback for the Rotation attribute | |
static int | staticCallback_setBase (PyObject *self, PyObject *value, void *closure) |
setter callback for the Base attribute | |
static int | staticCallback_setRotation (PyObject *self, PyObject *value, void *closure) |
setter callback for the Rotation attribute |
The python export class for Placement.
Definition at line 20 of file PlacementPy.h.
typedef Placement* Base::PlacementPy::PointerType |
Reimplemented from Base::PyObjectBase.
Definition at line 36 of file PlacementPy.h.
Definition at line 692 of file PlacementPy.cpp.
Referenced by copy(), inverse(), multiply(), and PyMake().
PlacementPy::~PlacementPy | ( | ) |
Definition at line 701 of file PlacementPy.cpp.
References Base::PyObjectBase::_pcTwinPointer.
PyObject * PlacementPy::_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 Base::PyObjectBase.
Definition at line 719 of file PlacementPy.cpp.
References Base::Console(), Base::ConsoleSingleton::Error(), getCustomAttributes(), Methods, Base::Exception::ReportException(), and Base::Exception::what().
PyObject * PlacementPy::_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 Base::PyObjectBase.
Definition at line 711 of file PlacementPy.cpp.
References representation().
int PlacementPy::_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 Base::PyObjectBase.
Definition at line 787 of file PlacementPy.cpp.
References Base::Console(), Base::ConsoleSingleton::Error(), Base::Exception::ReportException(), setCustomAttributes(), and Base::Exception::what().
implementer for the copy() method
Definition at line 149 of file PlacementPyImp.cpp.
References getPlacementPtr(), and PlacementPy().
Py::Object PlacementPy::getBase | ( | void | ) | const |
getter for the Base attribute
Definition at line 172 of file PlacementPyImp.cpp.
References getPlacementPtr().
Referenced by staticCallback_getBase().
PyObject * PlacementPy::getCustomAttributes | ( | const char * | attr | ) | const |
getter method for special attributes (e.g. dynamic ones)
Definition at line 208 of file PlacementPyImp.cpp.
Referenced by _getattr().
virtual PyParentObject* Base::PlacementPy::GetParents | ( | void | ) | [inline, virtual] |
Reimplemented from Base::PyObjectBase.
Definition at line 28 of file PlacementPy.h.
Placement * PlacementPy::getPlacementPtr | ( | void | ) | const |
getter for the object handled by this class
Definition at line 846 of file PlacementPy.cpp.
References Base::PyObjectBase::_pcTwinPointer.
Referenced by copy(), getBase(), getRotation(), inverse(), move(), multiply(), multVec(), PyInit(), setBase(), setRotation(), Gui::ViewProviderPy::setTransformation(), and toMatrix().
Py::Object PlacementPy::getRotation | ( | void | ) | const |
getter for the Rotation attribute
Definition at line 182 of file PlacementPyImp.cpp.
References getPlacementPtr().
Referenced by staticCallback_getRotation().
virtual PyTypeObject* Base::PlacementPy::GetType | ( | void | ) | [inline, virtual] |
Reimplemented from Base::PyObjectBase.
Definition at line 27 of file PlacementPy.h.
implementer for the inverse() method
Definition at line 164 of file PlacementPyImp.cpp.
References getPlacementPtr(), Base::Placement::inverse(), draftTools::p, and PlacementPy().
implementer for the move() method
Definition at line 121 of file PlacementPyImp.cpp.
References getPlacementPtr(), Base::Placement::move(), Py_Return, Base::VectorPy::Type, Py::value(), and draftlibs::fcgeo::vec().
implementer for the multiply() method
Definition at line 130 of file PlacementPyImp.cpp.
References getPlacementPtr(), PlacementPy(), and Type.
implementer for the multVec() method
Definition at line 139 of file PlacementPyImp.cpp.
References getPlacementPtr(), Base::Placement::multVec(), Base::VectorPy::Type, Py::value(), and draftlibs::fcgeo::vec().
PyInit method Overide this method to initialize a newly created instance of the class (Constuctor).
Reimplemented from Base::PyObjectBase.
Definition at line 61 of file PlacementPyImp.cpp.
References draftlibs::fcvec::angle(), D_PI, Base::Placement::fromMatrix(), getPlacementPtr(), draftTools::p, RobotExample::pos, Base::Placement::setPosition(), Base::Placement::setRotation(), Base::RotationPy::Type, Base::VectorPy::Type, Type, Base::MatrixPy::Type, and Py::value().
Definition at line 54 of file PlacementPyImp.cpp.
References PlacementPy().
std::string PlacementPy::representation | ( | void | ) | const |
Definition at line 40 of file PlacementPyImp.cpp.
References Base::PyObjectBase::_pcTwinPointer, Base::Placement::getPosition(), Base::Placement::getRotation(), Base::Rotation::getYawPitchRoll(), Base::Vector3< _Precision >::x, Base::Vector3< _Precision >::y, and Base::Vector3< _Precision >::z.
Referenced by _repr().
void PlacementPy::setBase | ( | Py::Object | arg | ) |
setter for the Base attribute
Definition at line 177 of file PlacementPyImp.cpp.
References getPlacementPtr(), Base::Placement::setPosition(), and Base::toVector().
int PlacementPy::setCustomAttributes | ( | const char * | attr, | |
PyObject * | obj | |||
) |
setter for special attributes (e.g. dynamic ones)
Definition at line 213 of file PlacementPyImp.cpp.
Referenced by _setattr().
void PlacementPy::setRotation | ( | Py::Object | arg | ) |
setter for the Rotation attribute
Definition at line 187 of file PlacementPyImp.cpp.
References Py::Tuple::accepts(), Py::GeometryT< T, PyT, valuePtr >::accepts(), getPlacementPtr(), Py::Object::ptr(), and Base::Placement::setRotation().
callback for the copy() method
Definition at line 141 of file PlacementPy.cpp.
References Base::Console(), Base::ConsoleSingleton::Error(), Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), Base::Exception::ReportException(), and Base::Exception::what().
getter callback for the Base attribute
Definition at line 597 of file PlacementPy.cpp.
References getBase(), Base::PyObjectBase::isValid(), and Py::new_reference_to().
getter callback for the Rotation attribute
Definition at line 641 of file PlacementPy.cpp.
References getRotation(), Base::PyObjectBase::isValid(), and Py::new_reference_to().
callback for the inverse() method
Definition at line 521 of file PlacementPy.cpp.
References Base::Console(), Base::ConsoleSingleton::Error(), Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), Base::Exception::ReportException(), and Base::Exception::what().
callback for the move() method
Definition at line 217 of file PlacementPy.cpp.
References Base::Console(), Base::ConsoleSingleton::Error(), Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), Base::Exception::ReportException(), and Base::Exception::what().
callback for the multiply() method
Definition at line 293 of file PlacementPy.cpp.
References Base::Console(), Base::ConsoleSingleton::Error(), Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), Base::Exception::ReportException(), and Base::Exception::what().
callback for the multVec() method
Definition at line 369 of file PlacementPy.cpp.
References Base::Console(), Base::ConsoleSingleton::Error(), Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), Base::Exception::ReportException(), and Base::Exception::what().
int PlacementPy::staticCallback_setBase | ( | PyObject * | self, | |
PyObject * | value, | |||
void * | closure | |||
) | [static] |
setter callback for the Base attribute
Definition at line 615 of file PlacementPy.cpp.
References Base::PyObjectBase::isConst(), and Base::PyObjectBase::isValid().
int PlacementPy::staticCallback_setRotation | ( | PyObject * | self, | |
PyObject * | value, | |||
void * | closure | |||
) | [static] |
setter callback for the Rotation attribute
Definition at line 659 of file PlacementPy.cpp.
References Base::PyObjectBase::isConst(), and Base::PyObjectBase::isValid().
callback for the toMatrix() method
Definition at line 445 of file PlacementPy.cpp.
References Base::Console(), Base::ConsoleSingleton::Error(), Base::PyObjectBase::isConst(), Base::PyObjectBase::isValid(), Base::Exception::ReportException(), and Base::Exception::what().
implementer for the toMatrix() method
Definition at line 156 of file PlacementPyImp.cpp.
References getPlacementPtr(), and Base::Placement::toMatrix().
PyGetSetDef PlacementPy::GetterSetter [static] |
{ {"Base", (getter) staticCallback_getBase, (setter) staticCallback_setBase, "Vector to the Base Position of the Placement", NULL }, {"Rotation", (getter) staticCallback_getRotation, (setter) staticCallback_setRotation, "Orientation of the placement expressed as rotation", NULL }, {NULL, NULL, NULL, NULL, NULL} }
Attribute structure of PlacementPy.
Definition at line 25 of file PlacementPy.h.
PyMethodDef PlacementPy::Methods [static] |
Methods structure of PlacementPy.
Reimplemented from Base::PyObjectBase.
Definition at line 24 of file PlacementPy.h.
Referenced by _getattr().
PyParentObject PlacementPy::Parents = { PARENTSBasePlacementPy } [static] |
Reimplemented from Base::PyObjectBase.
Definition at line 26 of file PlacementPy.h.
PyTypeObject PlacementPy::Type [static] |
Type structure of PlacementPy.
Reimplemented from Base::PyObjectBase.
Definition at line 23 of file PlacementPy.h.
Referenced by checkBB(), Robot::TrajectoryPy::insertWaypoints(), multiply(), Robot::WaypointPy::PyInit(), PyInit(), Part::GeometryPy::rotate(), Data::ComplexGeoDataPy::setPlacement(), Robot::WaypointPy::setPos(), App::PropertyPlacement::setPyObject(), Robot::Robot6AxisPy::setTcp(), Fem::FemMeshPy::setTransform(), Gui::ViewProviderPy::setTransformation(), Gui::View3DInventorPy::viewPosition(), and Fem::FemMeshPy::writeABAQUS().