Mesh::FacetPy Class Reference

The python export class for Facet. More...

#include <FacetPy.h>

Inheritance diagram for Mesh::FacetPy:
Base::PyObjectBase

List of all members.

Public Types

typedef FacetPointerType

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.
 FacetPy (Facet *pcObject, PyTypeObject *T=&Type)
PyObjectgetCustomAttributes (const char *attr) const
 getter method for special attributes (e.g. dynamic ones)
FacetgetFacetPtr (void) const
 getter for the object handled by this class
virtual PyParentObjectGetParents (void)
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)
 ~FacetPy ()

Static Public Member Functions

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

Static Public Attributes

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

callbacks and implementers for the python object attributes



Py::Boolean getBound (void) const
 getter for the Bound attribute
Py::Int getIndex (void) const
 getter for the Index attribute
Py::Object getNormal (void) const
 getter for the Normal attribute
Py::List getPoints (void) const
 getter for the Points attribute
static PyObjectstaticCallback_getBound (PyObject *self, void *closure)
 getter callback for the Bound attribute
static PyObjectstaticCallback_getIndex (PyObject *self, void *closure)
 getter callback for the Index attribute
static PyObjectstaticCallback_getNormal (PyObject *self, void *closure)
 getter callback for the Normal attribute
static PyObjectstaticCallback_getPoints (PyObject *self, void *closure)
 getter callback for the Points attribute
static int staticCallback_setBound (PyObject *self, PyObject *value, void *closure)
 setter callback for the Bound attribute
static int staticCallback_setIndex (PyObject *self, PyObject *value, void *closure)
 setter callback for the Index attribute
static int staticCallback_setNormal (PyObject *self, PyObject *value, void *closure)
 setter callback for the Normal attribute
static int staticCallback_setPoints (PyObject *self, PyObject *value, void *closure)
 setter callback for the Points attribute

callbacks and implementers for the python object methods



PyObjectintersect (PyObject *args)
 implementer for the intersect() method
PyObjectunbound (PyObject *args)
 implementer for the unbound() method
static PyObjectstaticCallback_intersect (PyObject *self, PyObject *args)
 callback for the intersect() method
static PyObjectstaticCallback_unbound (PyObject *self, PyObject *args)
 callback for the unbound() method

Detailed Description

The python export class for Facet.

Definition at line 20 of file FacetPy.h.


Member Typedef Documentation

Reimplemented from Base::PyObjectBase.

Definition at line 36 of file FacetPy.h.


Constructor & Destructor Documentation

FacetPy::FacetPy ( Facet pcObject,
PyTypeObject *  T = &Type 
)

Definition at line 415 of file FacetPy.cpp.

Referenced by PyMake().

FacetPy::~FacetPy (  ) 

Definition at line 424 of file FacetPy.cpp.

References Base::PyObjectBase::_pcTwinPointer.


Member Function Documentation

PyObject * FacetPy::_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 442 of file FacetPy.cpp.

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

PyObject * FacetPy::_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 434 of file FacetPy.cpp.

References representation().

int FacetPy::_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 510 of file FacetPy.cpp.

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

Py::Boolean FacetPy::getBound ( void   )  const

getter for the Bound attribute

Definition at line 83 of file FacetPyImp.cpp.

References getFacetPtr().

Referenced by staticCallback_getBound().

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

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

Definition at line 147 of file FacetPyImp.cpp.

Referenced by _getattr().

Facet * FacetPy::getFacetPtr ( void   )  const

getter for the object handled by this class

Definition at line 569 of file FacetPy.cpp.

References Base::PyObjectBase::_pcTwinPointer.

Referenced by Mesh::MeshPy::addFacets(), getBound(), getIndex(), getNormal(), getPoints(), intersect(), representation(), and unbound().

Py::Int FacetPy::getIndex ( void   )  const

getter for the Index attribute

Definition at line 78 of file FacetPyImp.cpp.

References getFacetPtr().

Referenced by staticCallback_getIndex().

Py::Object FacetPy::getNormal ( void   )  const

getter for the Normal attribute

Definition at line 88 of file FacetPyImp.cpp.

References getFacetPtr(), and Base::PyObjectBase::setConst().

Referenced by staticCallback_getNormal().

virtual PyParentObject* Mesh::FacetPy::GetParents ( void   )  [inline, virtual]

Reimplemented from Base::PyObjectBase.

Definition at line 28 of file FacetPy.h.

Py::List FacetPy::getPoints ( void   )  const
virtual PyTypeObject* Mesh::FacetPy::GetType ( void   )  [inline, virtual]

Reimplemented from Base::PyObjectBase.

Definition at line 27 of file FacetPy.h.

PyObject * FacetPy::intersect ( PyObject args  ) 
int FacetPy::PyInit ( PyObject ,
PyObject  
) [virtual]

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

Reimplemented from Base::PyObjectBase.

Definition at line 64 of file FacetPyImp.cpp.

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

Definition at line 57 of file FacetPyImp.cpp.

References FacetPy().

std::string FacetPy::representation ( void   )  const
int FacetPy::setCustomAttributes ( const char *  attr,
PyObject obj 
)

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

Definition at line 152 of file FacetPyImp.cpp.

Referenced by _setattr().

PyObject * FacetPy::staticCallback_getBound ( PyObject self,
void *  closure 
) [static]

getter callback for the Bound attribute

Definition at line 312 of file FacetPy.cpp.

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

PyObject * FacetPy::staticCallback_getIndex ( PyObject self,
void *  closure 
) [static]

getter callback for the Index attribute

Definition at line 280 of file FacetPy.cpp.

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

PyObject * FacetPy::staticCallback_getNormal ( PyObject self,
void *  closure 
) [static]

getter callback for the Normal attribute

Definition at line 344 of file FacetPy.cpp.

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

PyObject * FacetPy::staticCallback_getPoints ( PyObject self,
void *  closure 
) [static]

getter callback for the Points attribute

Definition at line 376 of file FacetPy.cpp.

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

PyObject * FacetPy::staticCallback_intersect ( PyObject self,
PyObject args 
) [static]
int FacetPy::staticCallback_setBound ( PyObject self,
PyObject value,
void *  closure 
) [static]

setter callback for the Bound attribute

Definition at line 330 of file FacetPy.cpp.

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

int FacetPy::staticCallback_setIndex ( PyObject self,
PyObject value,
void *  closure 
) [static]

setter callback for the Index attribute

Definition at line 298 of file FacetPy.cpp.

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

int FacetPy::staticCallback_setNormal ( PyObject self,
PyObject value,
void *  closure 
) [static]

setter callback for the Normal attribute

Definition at line 362 of file FacetPy.cpp.

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

int FacetPy::staticCallback_setPoints ( PyObject self,
PyObject value,
void *  closure 
) [static]

setter callback for the Points attribute

Definition at line 394 of file FacetPy.cpp.

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

PyObject * FacetPy::staticCallback_unbound ( PyObject self,
PyObject args 
) [static]
PyObject * FacetPy::unbound ( PyObject args  ) 

implementer for the unbound() method

Definition at line 69 of file FacetPyImp.cpp.

References getFacetPtr(), Mesh::Facet::Index, Mesh::Facet::Mesh, and Py_Return.


Member Data Documentation

PyGetSetDef FacetPy::GetterSetter [static]
Initial value:
 {
    {"Index",
        (getter) staticCallback_getIndex,
        (setter) staticCallback_setIndex, 
        "The index of this facet in the MeshObject",
        NULL
    },
    {"Bound",
        (getter) staticCallback_getBound,
        (setter) staticCallback_setBound, 
        "Bound state of the facet",
        NULL
    },
    {"Normal",
        (getter) staticCallback_getNormal,
        (setter) staticCallback_setNormal, 
        "Normal vector of the facet.",
        NULL
    },
    {"Points",
        (getter) staticCallback_getPoints,
        (setter) staticCallback_setPoints, 
        "A list of points of the facet",
        NULL
    },
    {NULL, NULL, NULL, NULL, NULL}              
}

Attribute structure of FacetPy.

Definition at line 25 of file FacetPy.h.

PyMethodDef FacetPy::Methods [static]
Initial value:
 {
    {"unbound",
        (PyCFunction) staticCallback_unbound,
        METH_VARARGS,
        "method unbound()\nCut the connection to a MeshObject. The facet becomes\nfree and is more or less a simple facet.\nAfter calling unbound() no topological operation will\nwork!\n                        "
    },
    {"intersect",
        (PyCFunction) staticCallback_intersect,
        METH_VARARGS,
        "intersect(Facet) -> list \nGet a list of intersection points with another triangle.\n                    "
    },
    {NULL, NULL, 0, NULL}               
}

Methods structure of FacetPy.

Reimplemented from Base::PyObjectBase.

Definition at line 24 of file FacetPy.h.

Referenced by _getattr().

PyParentObject FacetPy::Parents = { PARENTSMeshFacetPy } [static]

Reimplemented from Base::PyObjectBase.

Definition at line 26 of file FacetPy.h.

PyTypeObject FacetPy::Type [static]

Type structure of FacetPy.

Reimplemented from Base::PyObjectBase.

Definition at line 23 of file FacetPy.h.

Referenced by Mesh::MeshPy::addFacets(), initMesh(), and intersect().


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

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