The python export class for Axis. More...

#include <AxisPy.h>

Public Types

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

Public Member Functions

 AxisPy (Axis *pcObject, PyTypeObject *T=&Type)
 
virtual PyTypeObject * GetType (void)
 
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
 
- 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 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 AxisPy. More...
 
static PyMethodDef Methods []
 Methods structure of AxisPy. More...
 
static PyTypeObject Type
 Type structure of AxisPy. More...
 
- Static Public Attributes inherited from Base::PyObjectBase
static PyMethodDef Methods []
 
static PyTypeObject Type
 Py_Header struct from python.h. More...
 

Protected Member Functions

 ~AxisPy ()
 
- 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

PyObjectcopy (PyObject *args)
 implementer for the copy() method More...
 
PyObjectmove (PyObject *args)
 implementer for the move() method More...
 
PyObjectmultiply (PyObject *args)
 implementer for the multiply() method More...
 
PyObjectreversed (PyObject *args)
 implementer for the reversed() method More...
 
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_multiply (PyObject *self, PyObject *args)
 callback for the multiply() method More...
 
static PyObjectstaticCallback_reversed (PyObject *self, PyObject *args)
 callback for the reversed() method More...
 

callbacks and implementers for the python object attributes

Py::Object getBase (void) const
 getter for the Base attribute More...
 
void setBase (Py::Object arg)
 setter for the Base attribute More...
 
Py::Object getDirection (void) const
 getter for the Direction attribute More...
 
void setDirection (Py::Object arg)
 setter for the Direction 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...
 
AxisgetAxisPtr (void) const
 getter for the object handled by this class More...
 
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_getDirection (PyObject *self, void *closure)
 getter callback for the Direction attribute More...
 
static int staticCallback_setDirection (PyObject *self, PyObject *value, void *closure)
 setter callback for the Direction attribute More...
 

Additional Inherited Members

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

Detailed Description

The python export class for Axis.

Member Typedef Documentation

◆ PointerType

Constructor & Destructor Documentation

◆ ~AxisPy()

AxisPy::~AxisPy ( )
protected

◆ AxisPy()

AxisPy::AxisPy ( Axis pcObject,
PyTypeObject *  T = &Type 
)

Referenced by copy(), multiply(), PyMake(), and reversed().

Member Function Documentation

◆ copy()

PyObject * AxisPy::copy ( PyObject args)

implementer for the copy() method

References AxisPy(), and getAxisPtr().

Referenced by staticCallback_copy().

◆ getAxisPtr()

Axis * AxisPy::getAxisPtr ( void  ) const

getter for the object handled by this class

Referenced by copy(), getBase(), getDirection(), move(), multiply(), PyInit(), reversed(), Base::CoordinateSystemPy::setAxis(), setBase(), and setDirection().

◆ getBase()

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

getter for the Base attribute

References getAxisPtr().

Referenced by staticCallback_getBase().

◆ getCustomAttributes()

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

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

◆ getDirection()

Py::Object AxisPy::getDirection ( void  ) const

getter for the Direction attribute

References getAxisPtr().

Referenced by staticCallback_getDirection().

◆ GetType()

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

Reimplemented from Base::PyObjectBase.

◆ move()

◆ multiply()

◆ PyInit()

int AxisPy::PyInit ( PyObject ,
PyObject  
)
virtual

PyInit method Override this method to initialize a newly created instance of the class (Constructor)

Reimplemented from Base::PyObjectBase.

References Base::BaseExceptionFreeCADError, getAxisPtr(), Type, and Base::VectorPy::Type.

◆ PyMake()

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

References AxisPy().

◆ representation()

◆ reversed()

PyObject * AxisPy::reversed ( PyObject args)

implementer for the reversed() method

References AxisPy(), getAxisPtr(), and Base::Axis::reversed().

Referenced by staticCallback_reversed().

◆ setBase()

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

setter for the Base attribute

References getAxisPtr(), Base::Axis::setBase(), and Base::toVector().

Referenced by staticCallback_setBase().

◆ setCustomAttributes()

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

setter for special attributes (e.g.

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

◆ setDirection()

void AxisPy::setDirection ( Py::Object  arg)

setter for the Direction attribute

References getAxisPtr(), Base::Axis::setDirection(), and Base::toVector().

Referenced by staticCallback_setDirection().

◆ staticCallback_copy()

◆ staticCallback_getBase()

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

getter callback for the Base attribute

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

◆ staticCallback_getDirection()

PyObject * AxisPy::staticCallback_getDirection ( PyObject self,
void *  closure 
)
static

getter callback for the Direction attribute

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

◆ staticCallback_move()

◆ staticCallback_multiply()

◆ staticCallback_reversed()

◆ staticCallback_setBase()

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

◆ staticCallback_setDirection()

int AxisPy::staticCallback_setDirection ( PyObject self,
PyObject value,
void *  closure 
)
static

Member Data Documentation

◆ GetterSetter

PyGetSetDef AxisPy::GetterSetter
static
Initial value:
= {
{"Base",
"Vector to the Base position of the Axis",
NULL
},
{"Direction",
"Direction vector of the Axis",
NULL
},
{NULL, NULL, NULL, NULL, NULL}
}
static PyObject * staticCallback_getBase(PyObject *self, void *closure)
getter callback for the Base attribute
Definition: AxisPy.cpp:416
static int staticCallback_setDirection(PyObject *self, PyObject *value, void *closure)
setter callback for the Direction attribute
Definition: AxisPy.cpp:478
static int staticCallback_setBase(PyObject *self, PyObject *value, void *closure)
setter callback for the Base attribute
Definition: AxisPy.cpp:434
static PyObject * staticCallback_getDirection(PyObject *self, void *closure)
getter callback for the Direction attribute
Definition: AxisPy.cpp:460

Attribute structure of AxisPy.

◆ Methods

PyMethodDef AxisPy::Methods
static
Initial value:
= {
{"copy",
reinterpret_cast<PyCFunction>( staticCallback_copy ),
METH_VARARGS,
"\n copy()\n Returns a copy of this Axis\n "
},
{"move",
reinterpret_cast<PyCFunction>( staticCallback_move ),
METH_VARARGS,
"\n move(Vector)\n Move the axis base along the vector\n "
},
{"multiply",
reinterpret_cast<PyCFunction>( staticCallback_multiply ),
METH_VARARGS,
"\n multiply(Placement)\n Multiply this axis with a placement\n "
},
{"reversed",
reinterpret_cast<PyCFunction>( staticCallback_reversed ),
METH_VARARGS,
"\n reversed() -> Axis\n compute the reversed axis\n "
},
{NULL, NULL, 0, NULL}
}
static PyObject * staticCallback_multiply(PyObject *self, PyObject *args)
callback for the multiply() method
Definition: AxisPy.cpp:280
static PyObject * staticCallback_move(PyObject *self, PyObject *args)
callback for the move() method
Definition: AxisPy.cpp:212
static PyObject * staticCallback_reversed(PyObject *self, PyObject *args)
callback for the reversed() method
Definition: AxisPy.cpp:348
static PyObject * staticCallback_copy(PyObject *self, PyObject *args)
callback for the copy() method
Definition: AxisPy.cpp:144

Methods structure of AxisPy.

◆ Type


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