Part::TopoShapeWirePy Class Reference

The python export class for TopoShape. More...

#include <TopoShapeWirePy.h>

Inheritance diagram for Part::TopoShapeWirePy:
Part::TopoShapePy Data::ComplexGeoDataPy Base::PersistencePy Base::BaseClassPy Base::PyObjectBase

List of all members.

Public Types

typedef TopoShapePointerType

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)
TopoShapegetTopoShapePtr (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)
 TopoShapeWirePy (TopoShape *pcObject, PyTypeObject *T=&Type)
 ~TopoShapeWirePy ()

Static Public Member Functions

static PyObjectPyMake (struct _typeobject *, PyObject *, PyObject *)

Static Public Attributes

static PyGetSetDef GetterSetter []
 Attribute structure of TopoShapeWirePy.
static PyMethodDef Methods []
 Methods structure of TopoShapeWirePy.
static PyParentObject Parents [] = { PARENTSPartTopoShapeWirePy }
static PyTypeObject Type
 Type structure of TopoShapeWirePy.

callbacks and implementers for the python object methods



PyObjectapproximate (PyObject *args)
 implementer for the approximate() method
PyObjectmakeHomogenousWires (PyObject *args)
 implementer for the makeHomogenousWires() method
PyObjectmakeOffset (PyObject *args)
 implementer for the makeOffset() method
PyObjectmakePipe (PyObject *args)
 implementer for the makePipe() method
PyObjectmakePipeShell (PyObject *args)
 implementer for the makePipeShell() method
static PyObjectstaticCallback_approximate (PyObject *self, PyObject *args)
 callback for the approximate() method
static PyObjectstaticCallback_makeHomogenousWires (PyObject *self, PyObject *args)
 callback for the makeHomogenousWires() method
static PyObjectstaticCallback_makeOffset (PyObject *self, PyObject *args)
 callback for the makeOffset() method
static PyObjectstaticCallback_makePipe (PyObject *self, PyObject *args)
 callback for the makePipe() method
static PyObjectstaticCallback_makePipeShell (PyObject *self, PyObject *args)
 callback for the makePipeShell() method

callbacks and implementers for the python object attributes



Py::Object getCenterOfMass (void) const
 getter for the CenterOfMass attribute
static PyObjectstaticCallback_getCenterOfMass (PyObject *self, void *closure)
 getter callback for the CenterOfMass attribute
static int staticCallback_setCenterOfMass (PyObject *self, PyObject *value, void *closure)
 setter callback for the CenterOfMass attribute

Detailed Description

The python export class for TopoShape.

Definition at line 20 of file TopoShapeWirePy.h.


Member Typedef Documentation

Reimplemented from Part::TopoShapePy.

Definition at line 36 of file TopoShapeWirePy.h.


Constructor & Destructor Documentation

TopoShapeWirePy::TopoShapeWirePy ( TopoShape pcObject,
PyTypeObject *  T = &Type 
)

Definition at line 538 of file TopoShapeWirePy.cpp.

Referenced by makeHomogenousWires(), and PyMake().

TopoShapeWirePy::~TopoShapeWirePy (  ) 

Definition at line 547 of file TopoShapeWirePy.cpp.


Member Function Documentation

PyObject * TopoShapeWirePy::_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::TopoShapePy.

Definition at line 562 of file TopoShapeWirePy.cpp.

References Base::Console(), getCustomAttributes(), Methods, Base::Exception::ReportException(), and Base::Exception::what().

PyObject * TopoShapeWirePy::_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::TopoShapePy.

Definition at line 554 of file TopoShapeWirePy.cpp.

References representation().

int TopoShapeWirePy::_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::TopoShapePy.

Definition at line 630 of file TopoShapeWirePy.cpp.

References Base::Console(), Base::Exception::ReportException(), setCustomAttributes(), and Base::Exception::what().

PyObject * TopoShapeWirePy::approximate ( PyObject args  ) 

implementer for the approximate() method

Definition at line 225 of file TopoShapeWirePyImp.cpp.

References getTopoShapePtr().

Py::Object TopoShapeWirePy::getCenterOfMass ( void   )  const

getter for the CenterOfMass attribute

Definition at line 252 of file TopoShapeWirePyImp.cpp.

References getTopoShapePtr().

Referenced by staticCallback_getCenterOfMass().

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

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

Reimplemented from Part::TopoShapePy.

Definition at line 260 of file TopoShapeWirePyImp.cpp.

Referenced by _getattr().

virtual PyParentObject* Part::TopoShapeWirePy::GetParents ( void   )  [inline, virtual]

Reimplemented from Part::TopoShapePy.

Definition at line 28 of file TopoShapeWirePy.h.

TopoShape * TopoShapeWirePy::getTopoShapePtr ( void   )  const

getter for the object handled by this class

Reimplemented from Part::TopoShapePy.

Definition at line 689 of file TopoShapeWirePy.cpp.

References Base::PyObjectBase::_pcTwinPointer.

Referenced by approximate(), getCenterOfMass(), makeHomogenousWires(), makeOffset(), makePipe(), makePipeShell(), PyInit(), and representation().

virtual PyTypeObject* Part::TopoShapeWirePy::GetType ( void   )  [inline, virtual]

Reimplemented from Part::TopoShapePy.

Definition at line 27 of file TopoShapeWirePy.h.

PyObject * TopoShapeWirePy::makeHomogenousWires ( PyObject args  ) 

implementer for the makeHomogenousWires() method

Definition at line 199 of file TopoShapeWirePyImp.cpp.

References Part::TopoShape::_Shape, getTopoShapePtr(), TopoShapeWirePy(), and Type.

PyObject * TopoShapeWirePy::makeOffset ( PyObject args  ) 
PyObject * TopoShapeWirePy::makePipe ( PyObject args  ) 
PyObject * TopoShapeWirePy::makePipeShell ( PyObject args  ) 
int TopoShapeWirePy::PyInit ( PyObject ,
PyObject  
) [virtual]

PyInit method Overide this method to initialize a newly created instance of the class (Constuctor).

Reimplemented from Part::TopoShapePy.

Definition at line 66 of file TopoShapeWirePyImp.cpp.

References Part::TopoShape::_Shape, Py::SeqBase< T >::begin(), Py::SeqBase< T >::end(), getTopoShapePtr(), and Part::TopoShapePy::Type.

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

Reimplemented from Part::TopoShapePy.

Definition at line 59 of file TopoShapeWirePyImp.cpp.

References TopoShapeWirePy().

std::string TopoShapeWirePy::representation ( void   )  const

Reimplemented from Part::TopoShapePy.

Definition at line 51 of file TopoShapeWirePyImp.cpp.

References getTopoShapePtr().

Referenced by _repr().

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

setter for special attributes (e.g. dynamic ones)

Reimplemented from Part::TopoShapePy.

Definition at line 265 of file TopoShapeWirePyImp.cpp.

Referenced by _setattr().

PyObject * TopoShapeWirePy::staticCallback_approximate ( PyObject self,
PyObject args 
) [static]
PyObject * TopoShapeWirePy::staticCallback_getCenterOfMass ( PyObject self,
void *  closure 
) [static]

getter callback for the CenterOfMass attribute

Definition at line 499 of file TopoShapeWirePy.cpp.

References getCenterOfMass(), Base::PyObjectBase::isValid(), Py::new_reference_to(), and Base::PyObjectBase::PyObjectBase().

PyObject * TopoShapeWirePy::staticCallback_makeHomogenousWires ( PyObject self,
PyObject args 
) [static]
PyObject * TopoShapeWirePy::staticCallback_makeOffset ( PyObject self,
PyObject args 
) [static]
PyObject * TopoShapeWirePy::staticCallback_makePipe ( PyObject self,
PyObject args 
) [static]
PyObject * TopoShapeWirePy::staticCallback_makePipeShell ( PyObject self,
PyObject args 
) [static]
int TopoShapeWirePy::staticCallback_setCenterOfMass ( PyObject self,
PyObject value,
void *  closure 
) [static]

setter callback for the CenterOfMass attribute

Definition at line 517 of file TopoShapeWirePy.cpp.

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


Member Data Documentation

PyGetSetDef TopoShapeWirePy::GetterSetter [static]
Initial value:
 {
    {"CenterOfMass",
        (getter) staticCallback_getCenterOfMass,
        (setter) staticCallback_setCenterOfMass, 
        "Returns the center of mass of the current system.\nIf the gravitational field is uniform, it is the center of gravity.\nThe coordinates returned for the center of mass are expressed in the\nabsolute Cartesian coordinate system.",
        NULL
    },
    {NULL, NULL, NULL, NULL, NULL}              
}

Attribute structure of TopoShapeWirePy.

Reimplemented from Part::TopoShapePy.

Definition at line 25 of file TopoShapeWirePy.h.

PyMethodDef TopoShapeWirePy::Methods [static]
Initial value:
 {
    {"makeOffset",
        (PyCFunction) staticCallback_makeOffset,
        METH_VARARGS,
        "Offset the shape by a given ammount"
    },
    {"makeHomogenousWires",
        (PyCFunction) staticCallback_makeHomogenousWires,
        METH_VARARGS,
        "Make this and the given wire homogenous to have the same number of edges"
    },
    {"makePipe",
        (PyCFunction) staticCallback_makePipe,
        METH_VARARGS,
        "Make a pipe by sweeping along a wire."
    },
    {"makePipeShell",
        (PyCFunction) staticCallback_makePipeShell,
        METH_VARARGS,
        "Make a loft defined by profiles along a wire."
    },
    {"approximate",
        (PyCFunction) staticCallback_approximate,
        METH_VARARGS,
        "Approximate B-Spline-curve from this wire"
    },
    {NULL, NULL, 0, NULL}               
}

Methods structure of TopoShapeWirePy.

Reimplemented from Part::TopoShapePy.

Definition at line 24 of file TopoShapeWirePy.h.

Referenced by _getattr().

PyParentObject TopoShapeWirePy::Parents = { PARENTSPartTopoShapeWirePy } [static]

Reimplemented from Part::TopoShapePy.

Definition at line 26 of file TopoShapeWirePy.h.

PyTypeObject TopoShapeWirePy::Type [static]

Type structure of TopoShapeWirePy.

Reimplemented from Part::TopoShapePy.

Definition at line 23 of file TopoShapeWirePy.h.

Referenced by initPart(), and makeHomogenousWires().


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

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