Sketcher::SketchObjectPy Class Reference

The python export class for SketchObject. More...

#include <SketchObjectPy.h>

Inheritance diagram for Sketcher::SketchObjectPy:
Part::Part2DObjectPy Part::PartFeaturePy App::DocumentObjectPy App::PropertyContainerPy Base::PersistencePy Base::BaseClassPy Base::PyObjectBase

List of all members.

Public Types

typedef SketchObjectPointerType

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.
PyObjectgetCustomAttributes (const char *attr) const
 getter method for special attributes (e.g. dynamic ones)
virtual PyParentObjectGetParents (void)
SketchObjectgetSketchObjectPtr (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 PyObjectPyMake (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



PyObjectaddConstraint (PyObject *args)
 implementer for the addConstraint() method
PyObjectaddExternal (PyObject *args)
 implementer for the addExternal() method
PyObjectaddGeometry (PyObject *args)
 implementer for the addGeometry() method
PyObjectdelConstraint (PyObject *args)
 implementer for the delConstraint() method
PyObjectdelConstraintOnPoint (PyObject *args)
 implementer for the delConstraintOnPoint() method
PyObjectdelExternal (PyObject *args)
 implementer for the delExternal() method
PyObjectdelGeometry (PyObject *args)
 implementer for the delGeometry() method
PyObjectfillet (PyObject *args)
 implementer for the fillet() method
PyObjectmovePoint (PyObject *args)
 implementer for the movePoint() method
PyObjectsetDatum (PyObject *args)
 implementer for the setDatum() method
PyObjectsolve (PyObject *args)
 implementer for the solve() method
PyObjecttoggleConstruction (PyObject *args)
 implementer for the toggleConstruction() method
PyObjecttrim (PyObject *args)
 implementer for the trim() method
static PyObjectstaticCallback_addConstraint (PyObject *self, PyObject *args)
 callback for the addConstraint() method
static PyObjectstaticCallback_addExternal (PyObject *self, PyObject *args)
 callback for the addExternal() method
static PyObjectstaticCallback_addGeometry (PyObject *self, PyObject *args)
 callback for the addGeometry() method
static PyObjectstaticCallback_delConstraint (PyObject *self, PyObject *args)
 callback for the delConstraint() method
static PyObjectstaticCallback_delConstraintOnPoint (PyObject *self, PyObject *args)
 callback for the delConstraintOnPoint() method
static PyObjectstaticCallback_delExternal (PyObject *self, PyObject *args)
 callback for the delExternal() method
static PyObjectstaticCallback_delGeometry (PyObject *self, PyObject *args)
 callback for the delGeometry() method
static PyObjectstaticCallback_fillet (PyObject *self, PyObject *args)
 callback for the fillet() method
static PyObjectstaticCallback_movePoint (PyObject *self, PyObject *args)
 callback for the movePoint() method
static PyObjectstaticCallback_setDatum (PyObject *self, PyObject *args)
 callback for the setDatum() method
static PyObjectstaticCallback_solve (PyObject *self, PyObject *args)
 callback for the solve() method
static PyObjectstaticCallback_toggleConstruction (PyObject *self, PyObject *args)
 callback for the toggleConstruction() method
static PyObjectstaticCallback_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 PyObjectstaticCallback_getConstraintCount (PyObject *self, void *closure)
 getter callback for the ConstraintCount attribute
static PyObjectstaticCallback_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

Detailed Description

The python export class for SketchObject.

Definition at line 20 of file SketchObjectPy.h.


Member Typedef Documentation

Reimplemented from Part::Part2DObjectPy.

Definition at line 36 of file SketchObjectPy.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

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().

PyObject * SketchObjectPy::addConstraint ( PyObject args  ) 

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.

PyObject * SketchObjectPy::addExternal ( PyObject args  ) 
PyObject * SketchObjectPy::addGeometry ( PyObject args  ) 

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.

PyObject * SketchObjectPy::delConstraint ( PyObject args  ) 

implementer for the delConstraint() method

Definition at line 113 of file SketchObjectPyImp.cpp.

References getSketchObjectPtr(), and Py_Return.

PyObject * SketchObjectPy::delConstraintOnPoint ( PyObject args  ) 

implementer for the delConstraintOnPoint() method

Definition at line 169 of file SketchObjectPyImp.cpp.

References getSketchObjectPtr(), and Py_Return.

PyObject * SketchObjectPy::delExternal ( PyObject args  ) 

implementer for the delExternal() method

Definition at line 163 of file SketchObjectPyImp.cpp.

PyObject * SketchObjectPy::delGeometry ( PyObject args  ) 

implementer for the delGeometry() method

Definition at line 68 of file SketchObjectPyImp.cpp.

References getSketchObjectPtr(), and Py_Return.

PyObject * SketchObjectPy::fillet ( PyObject args  ) 
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
virtual PyTypeObject* Sketcher::SketchObjectPy::GetType ( void   )  [inline, virtual]

Reimplemented from Part::Part2DObjectPy.

Definition at line 27 of file SketchObjectPy.h.

PyObject * SketchObjectPy::movePoint ( PyObject args  ) 
int SketchObjectPy::PyInit ( PyObject ,
PyObject  
) [virtual]

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.

PyObject * SketchObjectPy::PyMake ( struct _typeobject *  ,
PyObject ,
PyObject  
) [static]

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 
)
PyObject * SketchObjectPy::setDatum ( PyObject args  ) 

implementer for the setDatum() method

Definition at line 185 of file SketchObjectPyImp.cpp.

References getSketchObjectPtr(), Py_Return, and Sketcher::SketchObject::setDatum().

PyObject * SketchObjectPy::solve ( PyObject args  ) 

implementer for the solve() method

Definition at line 49 of file SketchObjectPyImp.cpp.

PyObject * SketchObjectPy::staticCallback_addConstraint ( PyObject self,
PyObject args 
) [static]
PyObject * SketchObjectPy::staticCallback_addExternal ( PyObject self,
PyObject args 
) [static]
PyObject * SketchObjectPy::staticCallback_addGeometry ( PyObject self,
PyObject args 
) [static]
PyObject * SketchObjectPy::staticCallback_delConstraint ( PyObject self,
PyObject args 
) [static]
PyObject * SketchObjectPy::staticCallback_delConstraintOnPoint ( PyObject self,
PyObject args 
) [static]
PyObject * SketchObjectPy::staticCallback_delExternal ( PyObject self,
PyObject args 
) [static]
PyObject * SketchObjectPy::staticCallback_delGeometry ( PyObject self,
PyObject args 
) [static]
PyObject * SketchObjectPy::staticCallback_fillet ( PyObject self,
PyObject args 
) [static]
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().

PyObject * SketchObjectPy::staticCallback_movePoint ( PyObject self,
PyObject args 
) [static]
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().

PyObject * SketchObjectPy::staticCallback_setDatum ( PyObject self,
PyObject args 
) [static]
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().

PyObject * SketchObjectPy::staticCallback_solve ( PyObject self,
PyObject args 
) [static]
PyObject * SketchObjectPy::staticCallback_toggleConstruction ( PyObject self,
PyObject args 
) [static]
PyObject * SketchObjectPy::staticCallback_trim ( PyObject self,
PyObject args 
) [static]
PyObject * SketchObjectPy::toggleConstruction ( PyObject args  ) 

implementer for the toggleConstruction() method

Definition at line 84 of file SketchObjectPyImp.cpp.

References getSketchObjectPtr(), and Py_Return.

PyObject * SketchObjectPy::trim ( PyObject args  ) 

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().


Member Data Documentation

PyGetSetDef SketchObjectPy::GetterSetter [static]
Initial value:
 {
    {"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().


The documentation for this class was generated from the following files:

Generated on Wed Nov 23 19:02:47 2011 for FreeCAD by  doxygen 1.6.1