The python export class for Placement. More...

#include <PlacementPy.h>

Public Types

typedef PlacementPointerType
 
- Public Types inherited from Base::PyObjectBase
typedef void * PointerType
 
enum  Status { Valid = 0 , Immutable = 1 , Notify = 2 , NoTrack = 3 }
 

Public Member Functions

virtual PyTypeObject * GetType (void)
 
 PlacementPy (Placement *pcObject, PyTypeObject *T=&Type)
 
virtual int PyInit (PyObject *args, PyObject *k)
 PyInit method Override this method to initialize a newly created instance of the class (Constructor) More...
 
std::string representation (void) const
 
additional declarations and methods for the wrapper class
 PlacementPy (const Placement &pla, PyTypeObject *T=&Type)
 
Placement value () const
 
- Public Member Functions inherited from Base::PyObjectBase
PyObjectBaseDecRef (void)
 decref method wrapper (see python extending manual) More...
 
PyObjectBaseIncRef (void)
 incref method wrapper (see python extending manual) More...
 
bool isConst ()
 
bool isNotTracking () const
 
bool isValid ()
 
 PyObjectBase (void *, PyTypeObject *T)
 Constructor Sets the Type of the object (for inheritance) and decrease the the reference count of the PyObject. More...
 
void setConst ()
 
void setInvalid ()
 
void setNotTracking (bool on=true)
 
void setShouldNotify (bool on)
 
bool shouldNotify () const
 
void startNotify ()
 

Static Public Member Functions

static PyObjectPyMake (struct _typeobject *, PyObject *, PyObject *)
 
static PyObjectrichCompare (PyObject *v, PyObject *w, int op)
 
callbacks and implementers for the python object number protocol
static PyObjectnumber_add_handler (PyObject *self, PyObject *other)
 callback for the number_add_handler More...
 
static PyObjectnumber_subtract_handler (PyObject *self, PyObject *other)
 callback for the number_subtract_handler More...
 
static PyObjectnumber_multiply_handler (PyObject *self, PyObject *other)
 callback for the number_multiply_handler More...
 
static PyObjectnumber_divide_handler (PyObject *self, PyObject *other)
 callback for the number_divide_handler More...
 
static PyObjectnumber_remainder_handler (PyObject *self, PyObject *other)
 callback for the number_remainder_handler More...
 
static PyObjectnumber_divmod_handler (PyObject *self, PyObject *other)
 callback for the number_divmod_handler More...
 
static PyObjectnumber_power_handler (PyObject *self, PyObject *other, PyObject *modulo)
 callback for the number_power_handler More...
 
static PyObjectnumber_negative_handler (PyObject *self)
 callback for the number_negative_handler More...
 
static PyObjectnumber_positive_handler (PyObject *self)
 callback for the number_positive_handler More...
 
static PyObjectnumber_absolute_handler (PyObject *self)
 callback for the number_absolute_handler More...
 
static int number_nonzero_handler (PyObject *self)
 callback for the number_nonzero_handler More...
 
static PyObjectnumber_invert_handler (PyObject *self)
 callback for the number_invert_handler More...
 
static PyObjectnumber_lshift_handler (PyObject *self, PyObject *other)
 callback for the number_lshift_handler More...
 
static PyObjectnumber_rshift_handler (PyObject *self, PyObject *other)
 callback for the number_rshift_handler More...
 
static PyObjectnumber_and_handler (PyObject *self, PyObject *other)
 callback for the number_and_handler More...
 
static PyObjectnumber_xor_handler (PyObject *self, PyObject *other)
 callback for the number_xor_handler More...
 
static PyObjectnumber_or_handler (PyObject *self, PyObject *other)
 callback for the number_or_handler More...
 
static int number_coerce_handler (PyObject **self, PyObject **other)
 callback for the number_coerce_handler More...
 
static PyObjectnumber_int_handler (PyObject *self)
 callback for the number_int_handler More...
 
static PyObjectnumber_long_handler (PyObject *self)
 callback for the number_long_handler More...
 
static PyObjectnumber_float_handler (PyObject *self)
 callback for the number_float_handler More...
 
static PyObjectnumber_oct_handler (PyObject *self)
 callback for the number_oct_handler More...
 
static PyObjectnumber_hex_handler (PyObject *self)
 callback for the number_hex_handler More...
 
- Static Public Member Functions inherited from Base::PyObjectBase
static void PyDestructor (PyObject *P)
 Wrapper for the Python destructor. More...
 

Static Public Attributes

static PyGetSetDef GetterSetter []
 Attribute structure of PlacementPy. More...
 
static PyMethodDef Methods []
 Methods structure of PlacementPy. More...
 
static PyNumberMethods Number []
 
static PyTypeObject Type
 Type structure of PlacementPy. More...
 
- Static Public Attributes inherited from Base::PyObjectBase
static PyMethodDef Methods []
 
static PyTypeObject Type
 Py_Header struct from python.h. More...
 

Protected Member Functions

 ~PlacementPy ()
 
- Protected Member Functions inherited from Base::PyObjectBase
void setTwinPointer (void *ptr)
 Overrides the pointer to the twin object. More...
 
virtual ~PyObjectBase ()
 destructor More...
 

callbacks and implementers for the python object methods

static PyObjectstaticCallback_copy (PyObject *self, PyObject *args)
 callback for the copy() method More...
 
static PyObjectstaticCallback_move (PyObject *self, PyObject *args)
 callback for the move() method More...
 
static PyObjectstaticCallback_translate (PyObject *self, PyObject *args)
 callback for the translate() method More...
 
static PyObjectstaticCallback_rotate (PyObject *self, PyObject *args)
 callback for the rotate() method More...
 
static PyObjectstaticCallback_multiply (PyObject *self, PyObject *args)
 callback for the multiply() method More...
 
static PyObjectstaticCallback_multVec (PyObject *self, PyObject *args)
 callback for the multVec() method More...
 
static PyObjectstaticCallback_toMatrix (PyObject *self, PyObject *args)
 callback for the toMatrix() method More...
 
static PyObjectstaticCallback_inverse (PyObject *self, PyObject *args)
 callback for the inverse() method More...
 
static PyObjectstaticCallback_pow (PyObject *self, PyObject *args)
 callback for the pow() method More...
 
static PyObjectstaticCallback_sclerp (PyObject *self, PyObject *args)
 callback for the sclerp() method More...
 
static PyObjectstaticCallback_slerp (PyObject *self, PyObject *args)
 callback for the slerp() method More...
 
static PyObjectstaticCallback_isIdentity (PyObject *self, PyObject *args)
 callback for the isIdentity() method More...
 
PyObjectcopy (PyObject *args)
 implementer for the copy() method More...
 
PyObjectmove (PyObject *args)
 implementer for the move() method More...
 
PyObjecttranslate (PyObject *args)
 implementer for the translate() method More...
 
PyObjectrotate (PyObject *args)
 implementer for the rotate() method More...
 
PyObjectmultiply (PyObject *args)
 implementer for the multiply() method More...
 
PyObjectmultVec (PyObject *args)
 implementer for the multVec() method More...
 
PyObjecttoMatrix (PyObject *args)
 implementer for the toMatrix() method More...
 
PyObjectinverse (PyObject *args)
 implementer for the inverse() method More...
 
PyObjectpow (PyObject *args)
 implementer for the pow() method More...
 
PyObjectsclerp (PyObject *args)
 implementer for the sclerp() method More...
 
PyObjectslerp (PyObject *args)
 implementer for the slerp() method More...
 
PyObjectisIdentity (PyObject *args)
 implementer for the isIdentity() method More...
 

callbacks and implementers for the python object attributes

static PyObjectstaticCallback_getBase (PyObject *self, void *closure)
 getter callback for the Base attribute More...
 
static int staticCallback_setBase (PyObject *self, PyObject *value, void *closure)
 setter callback for the Base attribute More...
 
static PyObjectstaticCallback_getRotation (PyObject *self, void *closure)
 getter callback for the Rotation attribute More...
 
static int staticCallback_setRotation (PyObject *self, PyObject *value, void *closure)
 setter callback for the Rotation attribute More...
 
static PyObjectstaticCallback_getMatrix (PyObject *self, void *closure)
 getter callback for the Matrix attribute More...
 
static int staticCallback_setMatrix (PyObject *self, PyObject *value, void *closure)
 setter callback for the Matrix attribute More...
 
Py::Object getBase (void) const
 getter for the Base attribute More...
 
void setBase (Py::Object arg)
 setter for the Base attribute More...
 
Py::Object getRotation (void) const
 getter for the Rotation attribute More...
 
void setRotation (Py::Object arg)
 setter for the Rotation attribute More...
 
Py::Object getMatrix (void) const
 getter for the Matrix attribute More...
 
void setMatrix (Py::Object arg)
 setter for the Matrix attribute More...
 
PyObjectgetCustomAttributes (const char *attr) const
 getter method for special attributes (e.g. dynamic ones) More...
 
int setCustomAttributes (const char *attr, PyObject *obj)
 setter for special attributes (e.g. More...
 
PlacementgetPlacementPtr (void) const
 getter for the object handled by this class More...
 

Additional Inherited Members

- Protected Attributes inherited from Base::PyObjectBase
std::bitset< 32 > StatusBits
 

Detailed Description

The python export class for Placement.

Member Typedef Documentation

◆ PointerType

Constructor & Destructor Documentation

◆ ~PlacementPy()

PlacementPy::~PlacementPy ( )
protected

◆ PlacementPy() [1/2]

PlacementPy::PlacementPy ( Placement pcObject,
PyTypeObject *  T = &Type 
)

◆ PlacementPy() [2/2]

Base::PlacementPy::PlacementPy ( const Placement pla,
PyTypeObject *  T = &Type 
)

Member Function Documentation

◆ copy()

PyObject * PlacementPy::copy ( PyObject args)

implementer for the copy() method

References getPlacementPtr(), and PlacementPy().

Referenced by staticCallback_copy().

◆ getBase()

Py::Object PlacementPy::getBase ( void  ) const

getter for the Base attribute

References getPlacementPtr().

Referenced by staticCallback_getBase().

◆ getCustomAttributes()

PyObject * PlacementPy::getCustomAttributes ( const char *  attr) const

getter method for special attributes (e.g. dynamic ones)

◆ getMatrix()

Py::Object PlacementPy::getMatrix ( void  ) const

getter for the Matrix attribute

References getPlacementPtr(), and toMatrix().

Referenced by staticCallback_getMatrix().

◆ getPlacementPtr()

◆ getRotation()

Py::Object PlacementPy::getRotation ( void  ) const

getter for the Rotation attribute

References getPlacementPtr().

Referenced by staticCallback_getRotation().

◆ GetType()

virtual PyTypeObject* Base::PlacementPy::GetType ( void  )
virtual

Reimplemented from Base::PyObjectBase.

◆ inverse()

PyObject * PlacementPy::inverse ( PyObject args)

implementer for the inverse() method

References getPlacementPtr(), Base::Placement::inverse(), and PlacementPy().

Referenced by staticCallback_inverse().

◆ isIdentity()

◆ move()

◆ multiply()

◆ multVec()

PyObject * PlacementPy::multVec ( PyObject args)

◆ number_absolute_handler()

PyObject * PlacementPy::number_absolute_handler ( PyObject self)
static

callback for the number_absolute_handler

◆ number_add_handler()

PyObject * PlacementPy::number_add_handler ( PyObject self,
PyObject other 
)
static

callback for the number_add_handler

◆ number_and_handler()

PyObject * PlacementPy::number_and_handler ( PyObject self,
PyObject other 
)
static

callback for the number_and_handler

◆ number_coerce_handler()

int PlacementPy::number_coerce_handler ( PyObject **  self,
PyObject **  other 
)
static

callback for the number_coerce_handler

◆ number_divide_handler()

PyObject * PlacementPy::number_divide_handler ( PyObject self,
PyObject other 
)
static

callback for the number_divide_handler

◆ number_divmod_handler()

PyObject * PlacementPy::number_divmod_handler ( PyObject self,
PyObject other 
)
static

callback for the number_divmod_handler

◆ number_float_handler()

PyObject * PlacementPy::number_float_handler ( PyObject self)
static

callback for the number_float_handler

◆ number_hex_handler()

PyObject * PlacementPy::number_hex_handler ( PyObject self)
static

callback for the number_hex_handler

◆ number_int_handler()

PyObject * PlacementPy::number_int_handler ( PyObject self)
static

callback for the number_int_handler

◆ number_invert_handler()

PyObject * PlacementPy::number_invert_handler ( PyObject self)
static

callback for the number_invert_handler

◆ number_long_handler()

PyObject * PlacementPy::number_long_handler ( PyObject self)
static

callback for the number_long_handler

◆ number_lshift_handler()

PyObject * PlacementPy::number_lshift_handler ( PyObject self,
PyObject other 
)
static

callback for the number_lshift_handler

◆ number_multiply_handler()

PyObject * PlacementPy::number_multiply_handler ( PyObject self,
PyObject other 
)
static

◆ number_negative_handler()

PyObject * PlacementPy::number_negative_handler ( PyObject self)
static

callback for the number_negative_handler

◆ number_nonzero_handler()

int PlacementPy::number_nonzero_handler ( PyObject self)
static

callback for the number_nonzero_handler

◆ number_oct_handler()

PyObject * PlacementPy::number_oct_handler ( PyObject self)
static

callback for the number_oct_handler

◆ number_or_handler()

PyObject * PlacementPy::number_or_handler ( PyObject self,
PyObject other 
)
static

callback for the number_or_handler

◆ number_positive_handler()

PyObject * PlacementPy::number_positive_handler ( PyObject self)
static

callback for the number_positive_handler

◆ number_power_handler()

PyObject * PlacementPy::number_power_handler ( PyObject self,
PyObject other,
PyObject modulo 
)
static

callback for the number_power_handler

References PlacementPy(), DraftVecUtils::tup(), Type, and value().

◆ number_remainder_handler()

PyObject * PlacementPy::number_remainder_handler ( PyObject self,
PyObject other 
)
static

callback for the number_remainder_handler

◆ number_rshift_handler()

PyObject * PlacementPy::number_rshift_handler ( PyObject self,
PyObject other 
)
static

callback for the number_rshift_handler

◆ number_subtract_handler()

PyObject * PlacementPy::number_subtract_handler ( PyObject self,
PyObject other 
)
static

callback for the number_subtract_handler

◆ number_xor_handler()

PyObject * PlacementPy::number_xor_handler ( PyObject self,
PyObject other 
)
static

callback for the number_xor_handler

◆ pow()

PyObject * PlacementPy::pow ( PyObject args)

implementer for the pow() method

References getPlacementPtr(), PlacementPy(), and Base::Placement::pow().

Referenced by staticCallback_pow().

◆ PyInit()

int PlacementPy::PyInit ( PyObject ,
PyObject  
)
virtual

◆ PyMake()

PyObject * PlacementPy::PyMake ( struct _typeobject *  ,
PyObject ,
PyObject  
)
static

References PlacementPy().

◆ representation()

◆ richCompare()

PyObject * PlacementPy::richCompare ( PyObject v,
PyObject w,
int  op 
)
static

References getPlacementPtr(), and Type.

◆ rotate()

◆ sclerp()

PyObject * PlacementPy::sclerp ( PyObject args)

implementer for the sclerp() method

References getPlacementPtr(), PlacementPy(), Base::Placement::sclerp(), Type, and value().

Referenced by staticCallback_sclerp().

◆ setBase()

void PlacementPy::setBase ( Py::Object  arg)

setter for the Base attribute

References getPlacementPtr(), Base::Placement::setPosition(), and Base::toVector().

Referenced by staticCallback_setBase().

◆ setCustomAttributes()

int PlacementPy::setCustomAttributes ( const char *  attr,
PyObject obj 
)

setter for special attributes (e.g.

dynamic ones) Output: Success=1, Failure=-1, Ignore=0

◆ setMatrix()

void PlacementPy::setMatrix ( Py::Object  arg)

setter for the Matrix attribute

References Base::Placement::fromMatrix(), and getPlacementPtr().

Referenced by staticCallback_setMatrix().

◆ setRotation()

void PlacementPy::setRotation ( Py::Object  arg)

setter for the Rotation attribute

References getPlacementPtr(), and Base::Placement::setRotation().

Referenced by staticCallback_setRotation().

◆ slerp()

PyObject * PlacementPy::slerp ( PyObject args)

implementer for the slerp() method

References getPlacementPtr(), PlacementPy(), Base::Placement::slerp(), Type, and value().

Referenced by staticCallback_slerp().

◆ staticCallback_copy()

PyObject * PlacementPy::staticCallback_copy ( PyObject self,
PyObject args 
)
static

◆ staticCallback_getBase()

PyObject * PlacementPy::staticCallback_getBase ( PyObject self,
void *  closure 
)
static

getter callback for the Base attribute

References Base::BaseExceptionFreeCADError, getBase(), and Base::PyObjectBase::isValid().

◆ staticCallback_getMatrix()

PyObject * PlacementPy::staticCallback_getMatrix ( PyObject self,
void *  closure 
)
static

getter callback for the Matrix attribute

References Base::BaseExceptionFreeCADError, getMatrix(), and Base::PyObjectBase::isValid().

◆ staticCallback_getRotation()

PyObject * PlacementPy::staticCallback_getRotation ( PyObject self,
void *  closure 
)
static

getter callback for the Rotation attribute

References Base::BaseExceptionFreeCADError, getRotation(), and Base::PyObjectBase::isValid().

◆ staticCallback_inverse()

PyObject * PlacementPy::staticCallback_inverse ( PyObject self,
PyObject args 
)
static

◆ staticCallback_isIdentity()

PyObject * PlacementPy::staticCallback_isIdentity ( PyObject self,
PyObject args 
)
static

◆ staticCallback_move()

◆ staticCallback_multiply()

PyObject * PlacementPy::staticCallback_multiply ( PyObject self,
PyObject args 
)
static

◆ staticCallback_multVec()

PyObject * PlacementPy::staticCallback_multVec ( PyObject self,
PyObject args 
)
static

◆ staticCallback_pow()

PyObject * PlacementPy::staticCallback_pow ( PyObject self,
PyObject args 
)
static

◆ staticCallback_rotate()

◆ staticCallback_sclerp()

PyObject * PlacementPy::staticCallback_sclerp ( PyObject self,
PyObject args 
)
static

◆ staticCallback_setBase()

int PlacementPy::staticCallback_setBase ( PyObject self,
PyObject value,
void *  closure 
)
static

◆ staticCallback_setMatrix()

int PlacementPy::staticCallback_setMatrix ( PyObject self,
PyObject value,
void *  closure 
)
static

◆ staticCallback_setRotation()

int PlacementPy::staticCallback_setRotation ( PyObject self,
PyObject value,
void *  closure 
)
static

◆ staticCallback_slerp()

PyObject * PlacementPy::staticCallback_slerp ( PyObject self,
PyObject args 
)
static

◆ staticCallback_toMatrix()

PyObject * PlacementPy::staticCallback_toMatrix ( PyObject self,
PyObject args 
)
static

◆ staticCallback_translate()

◆ toMatrix()

PyObject * PlacementPy::toMatrix ( PyObject args)

implementer for the toMatrix() method

References getPlacementPtr(), and Base::Placement::toMatrix().

Referenced by getMatrix(), and staticCallback_toMatrix().

◆ translate()

PyObject * PlacementPy::translate ( PyObject args)

implementer for the translate() method

References move().

Referenced by staticCallback_translate().

◆ value()

Member Data Documentation

◆ GetterSetter

PyGetSetDef PlacementPy::GetterSetter
static
Initial value:
= {
{"Base",
"Vector to the Base Position of the Placement",
NULL
},
{"Rotation",
"Orientation of the placement expressed as rotation",
NULL
},
{"Matrix",
"Set/get matrix representation of this placement",
NULL
},
{NULL, NULL, NULL, NULL, NULL}
}
static int staticCallback_setRotation(PyObject *self, PyObject *value, void *closure)
setter callback for the Rotation attribute
Definition: PlacementPy.cpp:1070
static PyObject * staticCallback_getMatrix(PyObject *self, void *closure)
getter callback for the Matrix attribute
Definition: PlacementPy.cpp:1096
static int staticCallback_setMatrix(PyObject *self, PyObject *value, void *closure)
setter callback for the Matrix attribute
Definition: PlacementPy.cpp:1114
static PyObject * staticCallback_getRotation(PyObject *self, void *closure)
getter callback for the Rotation attribute
Definition: PlacementPy.cpp:1052
static int staticCallback_setBase(PyObject *self, PyObject *value, void *closure)
setter callback for the Base attribute
Definition: PlacementPy.cpp:1026
static PyObject * staticCallback_getBase(PyObject *self, void *closure)
getter callback for the Base attribute
Definition: PlacementPy.cpp:1008

Attribute structure of PlacementPy.

◆ Methods

PyMethodDef PlacementPy::Methods
static

Methods structure of PlacementPy.

◆ Number

PyNumberMethods PlacementPy::Number
static

◆ Type

PyTypeObject PlacementPy::Type
static

Type structure of PlacementPy.

Referenced by ArchPanel.CommandPanelSheet::Activated(), draftobjects.draft_annotation.DraftAnnotation::add_missing_properties_0v19(), ArchStructure.StructSelectionObserver::addSelection(), PathSimulator::PathSimPy::ApplyCommand(), ArchSite.Compass::buildCoordinates(), Attacher::AttachEnginePy::calculateAttachedPlacement(), App::FunctionExpression::evaluate(), ArchComponent.Component::execute(), draftobjects.layer.LayerContainer::execute(), Gui::ViewProviderLink::initDraggingPlacement(), Robot::TrajectoryPy::insertWaypoints(), ArchAxis.CommandArchGrid::IsActive(), ArchSchedule.CommandArchSchedule::IsActive(), Base::AxisPy::multiply(), multiply(), Base::MatrixPy::number_multiply_handler(), number_multiply_handler(), Base::RotationPy::number_multiply_handler(), number_power_handler(), PyInit(), Path::CommandPy::PyInit(), Robot::WaypointPy::PyInit(), richCompare(), Part::GeometryPy::rotate(), Sketcher::ExternalGeometryFacadePy::rotate(), Sketcher::GeometryFacadePy::rotate(), sclerp(), draftobjects.layer.Layer::set_properties(), Attacher::AttachEnginePy::setAttachmentOffset(), Gui::ViewProviderLinkPy::setDraggingPlacement(), Data::ComplexGeoDataPy::setPlacement(), Path::CommandPy::setPlacement(), Base::CoordinateSystemPy::setPlacement(), Robot::WaypointPy::setPos(), ArchReference.ArchReference::setProperties(), App::PropertyPlacement::setPyObject(), Fem::PropertyFemMesh::setPyObject(), Robot::Robot6AxisPy::setTcp(), Fem::FemMeshPy::setTransform(), Gui::ViewProviderPy::setTransformation(), slerp(), Gui::View3DInventorPy::toggleClippingPlane(), Base::CoordinateSystemPy::transform(), Path::CommandPy::transform(), and Gui::View3DInventorPy::viewPosition().


The documentation for this class was generated from the following files:
  • Sources/FreeCAD-SourceDocs/src/Base/PlacementPy.h
  • Sources/FreeCAD/src/Base/PlacementPyImp.cpp
  • Sources/FreeCAD-SourceDocs/src/Base/PlacementPy.cpp