Part::GeometryPy Class Reference

The python export class for Geometry. More...

#include <GeometryPy.h>

Inheritance diagram for Part::GeometryPy:
Base::PyObjectBase Part::GeometryCurvePy Part::GeometrySurfacePy Part::ArcOfCirclePy Part::ArcPy Part::BezierCurvePy Part::BSplineCurvePy Part::CirclePy Part::EllipsePy Part::HyperbolaPy Part::LinePy Part::OffsetCurvePy Part::ParabolaPy Part::BezierSurfacePy Part::BSplineSurfacePy Part::ConePy Part::CylinderPy Part::OffsetSurfacePy Part::PlanePy Part::RectangularTrimmedSurfacePy Part::SpherePy Part::SurfaceOfExtrusionPy Part::SurfaceOfRevolutionPy Part::ToroidPy

List of all members.

Public Types

typedef Geometry * PointerType

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.
 GeometryPy (Geometry *pcObject, PyTypeObject *T=&Type)
PyObject * getCustomAttributes (const char *attr) const
 getter method for special attributes (e.g. dynamic ones)
Geometry * getGeometryPtr (void) const
 getter for the object handled by this class
virtual PyParentObject * GetParents (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)
 ~GeometryPy ()

Static Public Member Functions

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

Static Public Attributes

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

callbacks and implementers for the python object attributes



Py::Boolean getConstruction (void) const
 getter for the Construction attribute
void setConstruction (Py::Boolean arg)
 setter for the Construction attribute
static PyObject * staticCallback_getConstruction (PyObject *self, void *closure)
 getter callback for the Construction attribute
static int staticCallback_setConstruction (PyObject *self, PyObject *value, void *closure)
 setter callback for the Construction attribute

callbacks and implementers for the python object methods



PyObject * mirror (PyObject *args)
 implementer for the mirror() method
PyObject * rotate (PyObject *args)
 implementer for the rotate() method
PyObject * scale (PyObject *args)
 implementer for the scale() method
PyObject * transform (PyObject *args)
 implementer for the transform() method
PyObject * translate (PyObject *args)
 implementer for the translate() method
static PyObject * staticCallback_mirror (PyObject *self, PyObject *args)
 callback for the mirror() method
static PyObject * staticCallback_rotate (PyObject *self, PyObject *args)
 callback for the rotate() method
static PyObject * staticCallback_scale (PyObject *self, PyObject *args)
 callback for the scale() method
static PyObject * staticCallback_transform (PyObject *self, PyObject *args)
 callback for the transform() method
static PyObject * staticCallback_translate (PyObject *self, PyObject *args)
 callback for the translate() method

Detailed Description

The python export class for Geometry.

Definition at line 20 of file GeometryPy.h.


Member Typedef Documentation


Constructor & Destructor Documentation

GeometryPy::GeometryPy ( Geometry *  pcObject,
PyTypeObject *  T = &Type 
)

Definition at line 553 of file GeometryPy.cpp.

GeometryPy::~GeometryPy (  ) 

Definition at line 562 of file GeometryPy.cpp.

References Base::PyObjectBase::_pcTwinPointer.


Member Function Documentation

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

Reimplemented in Part::ArcOfCirclePy, Part::ArcPy, Part::BezierCurvePy, Part::BezierSurfacePy, Part::BSplineCurvePy, Part::BSplineSurfacePy, Part::CirclePy, Part::ConePy, Part::CylinderPy, Part::EllipsePy, Part::GeometryCurvePy, Part::GeometrySurfacePy, Part::HyperbolaPy, Part::LinePy, Part::OffsetCurvePy, Part::OffsetSurfacePy, Part::ParabolaPy, Part::PlanePy, Part::RectangularTrimmedSurfacePy, Part::SpherePy, Part::SurfaceOfExtrusionPy, Part::SurfaceOfRevolutionPy, and Part::ToroidPy.

Definition at line 580 of file GeometryPy.cpp.

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

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

Reimplemented in Part::ArcOfCirclePy, Part::ArcPy, Part::BezierCurvePy, Part::BezierSurfacePy, Part::BSplineCurvePy, Part::BSplineSurfacePy, Part::CirclePy, Part::ConePy, Part::CylinderPy, Part::EllipsePy, Part::GeometryCurvePy, Part::GeometrySurfacePy, Part::HyperbolaPy, Part::LinePy, Part::OffsetCurvePy, Part::OffsetSurfacePy, Part::ParabolaPy, Part::PlanePy, Part::RectangularTrimmedSurfacePy, Part::SpherePy, Part::SurfaceOfExtrusionPy, Part::SurfaceOfRevolutionPy, and Part::ToroidPy.

Definition at line 572 of file GeometryPy.cpp.

References representation().

int GeometryPy::_setattr ( char *  attr,
PyObject *  value 
) [virtual]
Py::Boolean GeometryPy::getConstruction ( void   )  const

getter for the Construction attribute

Definition at line 182 of file GeometryPyImp.cpp.

References getGeometryPtr().

Referenced by staticCallback_getConstruction().

PyObject * GeometryPy::getCustomAttributes ( const char *  attr  )  const
Geometry * GeometryPy::getGeometryPtr ( void   )  const

getter for the object handled by this class

Definition at line 707 of file GeometryPy.cpp.

References Base::PyObjectBase::_pcTwinPointer.

Referenced by Part::GeometrySurfacePy::bounds(), Part::BSplineSurfacePy::bounds(), Part::BezierSurfacePy::bounds(), Part::GeometryCurvePy::discretize(), Part::BSplineSurfacePy::exchangeUV(), Part::BezierSurfacePy::exchangeUV(), Part::ToroidPy::getAxis(), Part::SpherePy::getAxis(), Part::PlanePy::getAxis(), Part::ParabolaPy::getAxis(), Part::HyperbolaPy::getAxis(), Part::CylinderPy::getAxis(), Part::ConePy::getAxis(), Part::OffsetCurvePy::getBasisCurve(), getConstruction(), Part::BSplineCurvePy::getDegree(), Part::BezierCurvePy::getDegree(), Part::SurfaceOfRevolutionPy::getDirection(), Part::SurfaceOfExtrusionPy::getDirection(), Part::ParabolaPy::getEccentricity(), Part::HyperbolaPy::getEccentricity(), Part::BSplineCurvePy::getEndPoint(), Part::BezierCurvePy::getEndPoint(), Part::GeometryCurvePy::getFirstParameter(), Part::BSplineSurfacePy::getFirstUKnotIndex(), Part::BSplineCurvePy::getFirstUKnotIndex(), Part::BSplineSurfacePy::getFirstVKnotIndex(), Part::ParabolaPy::getFocal(), Part::HyperbolaPy::getFocal(), Part::ParabolaPy::getFocus(), Part::HyperbolaPy::getFocus1(), Part::HyperbolaPy::getFocus2(), Part::BSplineCurvePy::getKnot(), Part::BSplineCurvePy::getKnots(), Part::BSplineCurvePy::getKnotSequence(), Part::GeometryCurvePy::getLastParameter(), Part::BSplineSurfacePy::getLastUKnotIndex(), Part::BSplineCurvePy::getLastUKnotIndex(), Part::BSplineSurfacePy::getLastVKnotIndex(), Part::SurfaceOfRevolutionPy::getLocation(), Part::ParabolaPy::getLocation(), Part::HyperbolaPy::getLocation(), Part::HyperbolaPy::getMajorRadius(), Part::BSplineSurfacePy::getMaxDegree(), Part::BSplineCurvePy::getMaxDegree(), Part::BezierSurfacePy::getMaxDegree(), Part::BezierCurvePy::getMaxDegree(), Part::HyperbolaPy::getMinorRadius(), Part::BSplineCurvePy::getMultiplicities(), Part::BSplineCurvePy::getMultiplicity(), Part::BSplineCurvePy::getNbKnots(), Part::BSplineCurvePy::getNbPoles(), Part::BezierCurvePy::getNbPoles(), Part::BSplineSurfacePy::getNbUKnots(), Part::BSplineSurfacePy::getNbUPoles(), Part::BezierSurfacePy::getNbUPoles(), Part::BSplineSurfacePy::getNbVKnots(), Part::BSplineSurfacePy::getNbVPoles(), Part::BezierSurfacePy::getNbVPoles(), Part::OffsetCurvePy::getOffsetDirection(), Part::OffsetSurfacePy::getOffsetValue(), Part::OffsetCurvePy::getOffsetValue(), Part::ParabolaPy::getParameter(), Part::HyperbolaPy::getParameter(), Part::BSplineSurfacePy::getPole(), Part::BSplineCurvePy::getPole(), Part::BezierSurfacePy::getPole(), Part::BezierCurvePy::getPole(), Part::BSplineSurfacePy::getPoles(), Part::BSplineCurvePy::getPoles(), Part::BezierSurfacePy::getPoles(), Part::BezierCurvePy::getPoles(), Part::BSplineSurfacePy::getResolution(), Part::BSplineCurvePy::getResolution(), Part::BezierSurfacePy::getResolution(), Part::BezierCurvePy::getResolution(), Part::BSplineCurvePy::getStartPoint(), Part::BezierCurvePy::getStartPoint(), Part::BSplineSurfacePy::getUDegree(), Part::BezierSurfacePy::getUDegree(), Part::BSplineSurfacePy::getUKnot(), Part::BSplineSurfacePy::getUKnots(), Part::BSplineSurfacePy::getUKnotSequence(), Part::BSplineSurfacePy::getUMultiplicities(), Part::BSplineSurfacePy::getUMultiplicity(), Part::BSplineSurfacePy::getVDegree(), Part::BezierSurfacePy::getVDegree(), Part::BSplineSurfacePy::getVKnot(), Part::BSplineSurfacePy::getVKnots(), Part::BSplineSurfacePy::getVKnotSequence(), Part::BSplineSurfacePy::getVMultiplicities(), Part::BSplineSurfacePy::getVMultiplicity(), Part::BSplineSurfacePy::getWeight(), Part::BSplineCurvePy::getWeight(), Part::BezierSurfacePy::getWeight(), Part::BezierCurvePy::getWeight(), Part::BSplineSurfacePy::getWeights(), Part::BSplineCurvePy::getWeights(), Part::BezierSurfacePy::getWeights(), Part::BezierCurvePy::getWeights(), Part::BezierSurfacePy::increase(), Part::BezierCurvePy::increase(), Part::BSplineSurfacePy::increaseDegree(), Part::BSplineCurvePy::increaseDegree(), Part::BSplineCurvePy::increaseMultiplicity(), Part::BSplineSurfacePy::increaseUMultiplicity(), Part::BSplineSurfacePy::increaseVMultiplicity(), Part::BSplineCurvePy::incrementMultiplicity(), Part::BSplineSurfacePy::incrementUMultiplicity(), Part::BSplineSurfacePy::incrementVMultiplicity(), Part::BSplineCurvePy::insertKnot(), Part::BSplineCurvePy::insertKnots(), Part::BezierCurvePy::insertPoleAfter(), Part::BezierCurvePy::insertPoleBefore(), Part::BezierSurfacePy::insertPoleColAfter(), Part::BezierSurfacePy::insertPoleColBefore(), Part::BezierSurfacePy::insertPoleRowAfter(), Part::BezierSurfacePy::insertPoleRowBefore(), Part::BSplineSurfacePy::insertUKnot(), Part::BSplineSurfacePy::insertUKnots(), Part::BSplineSurfacePy::insertVKnot(), Part::BSplineSurfacePy::insertVKnots(), Part::BSplineCurvePy::isClosed(), Part::BezierCurvePy::isClosed(), Part::BSplineCurvePy::isPeriodic(), Part::BezierCurvePy::isPeriodic(), Part::BSplineCurvePy::isRational(), Part::BezierCurvePy::isRational(), Part::GeometrySurfacePy::isUClosed(), Part::BSplineSurfacePy::isUClosed(), Part::BezierSurfacePy::isUClosed(), Part::GeometrySurfacePy::isUPeriodic(), Part::BSplineSurfacePy::isUPeriodic(), Part::BezierSurfacePy::isUPeriodic(), Part::BSplineSurfacePy::isURational(), Part::BezierSurfacePy::isURational(), Part::GeometrySurfacePy::isVClosed(), Part::BSplineSurfacePy::isVClosed(), Part::BezierSurfacePy::isVClosed(), Part::GeometrySurfacePy::isVPeriodic(), Part::BSplineSurfacePy::isVPeriodic(), Part::BezierSurfacePy::isVPeriodic(), Part::BSplineSurfacePy::isVRational(), Part::BezierSurfacePy::isVRational(), makeRevolution(), Part::GeometryCurvePy::makeRuledSurface(), mirror(), Part::BSplineSurfacePy::movePoint(), Part::BSplineCurvePy::movePoint(), Part::GeometrySurfacePy::parameter(), Part::GeometryCurvePy::parameter(), Part::SurfaceOfRevolutionPy::PyInit(), Part::SurfaceOfExtrusionPy::PyInit(), Part::PlanePy::PyInit(), Part::ParabolaPy::PyInit(), Part::OffsetSurfacePy::PyInit(), Part::OffsetCurvePy::PyInit(), Part::HyperbolaPy::PyInit(), Part::ConePy::PyInit(), Part::BSplineCurvePy::removeKnot(), Part::BezierCurvePy::removePole(), Part::BezierSurfacePy::removePoleCol(), Part::BezierSurfacePy::removePoleRow(), Part::BSplineSurfacePy::removeUKnot(), Part::BSplineSurfacePy::removeVKnot(), Part::BSplineSurfacePy::reparametrize(), rotate(), scale(), Part::BSplineSurfacePy::segment(), Part::BSplineCurvePy::segment(), Part::BezierSurfacePy::segment(), Part::BezierCurvePy::segment(), Part::ToroidPy::setAxis(), Part::SpherePy::setAxis(), Part::PlanePy::setAxis(), Part::ParabolaPy::setAxis(), Part::HyperbolaPy::setAxis(), Part::CylinderPy::setAxis(), Part::ConePy::setAxis(), Part::SurfaceOfRevolutionPy::setBasisCurve(), Part::SurfaceOfExtrusionPy::setBasisCurve(), Part::OffsetCurvePy::setBasisCurve(), Part::OffsetSurfacePy::setBasisSurface(), setConstruction(), Part::SurfaceOfRevolutionPy::setDirection(), Part::SurfaceOfExtrusionPy::setDirection(), Part::ParabolaPy::setFocal(), Part::BSplineCurvePy::setKnot(), Part::BSplineCurvePy::setKnots(), Part::SurfaceOfRevolutionPy::setLocation(), Part::ParabolaPy::setLocation(), Part::HyperbolaPy::setLocation(), Part::HyperbolaPy::setMajorRadius(), Part::HyperbolaPy::setMinorRadius(), Part::BSplineCurvePy::setNotPeriodic(), Part::OffsetCurvePy::setOffsetDirection(), Part::OffsetSurfacePy::setOffsetValue(), Part::OffsetCurvePy::setOffsetValue(), Part::BSplineCurvePy::setOrigin(), Part::BSplineCurvePy::setPeriodic(), Part::BSplineSurfacePy::setPole(), Part::BSplineCurvePy::setPole(), Part::BezierSurfacePy::setPole(), Part::BezierCurvePy::setPole(), Part::BSplineSurfacePy::setPoleCol(), Part::BezierSurfacePy::setPoleCol(), Part::BSplineSurfacePy::setPoleRow(), Part::BezierSurfacePy::setPoleRow(), Part::PropertyGeometryList::setPyObject(), Part::BSplineSurfacePy::setUKnot(), Part::BSplineSurfacePy::setUKnots(), Part::BSplineSurfacePy::setUNotPeriodic(), Part::BSplineSurfacePy::setUOrigin(), Part::BSplineSurfacePy::setUPeriodic(), Part::BSplineSurfacePy::setVKnot(), Part::BSplineSurfacePy::setVKnots(), Part::BSplineSurfacePy::setVNotPeriodic(), Part::BSplineSurfacePy::setVOrigin(), Part::BSplineSurfacePy::setVPeriodic(), Part::BSplineSurfacePy::setWeight(), Part::BSplineCurvePy::setWeight(), Part::BezierSurfacePy::setWeight(), Part::BezierCurvePy::setWeight(), Part::BSplineSurfacePy::setWeightCol(), Part::BezierSurfacePy::setWeightCol(), Part::BSplineSurfacePy::setWeightRow(), Part::BezierSurfacePy::setWeightRow(), Part::GeometrySurfacePy::tangent(), Part::GeometryCurvePy::tangent(), Part::GeometrySurfacePy::toBSpline(), Part::GeometrySurfacePy::toShape(), Part::GeometryCurvePy::toShape(), transform(), translate(), Part::RectangularTrimmedSurfacePy::uIso(), Part::BSplineSurfacePy::uIso(), Part::BezierSurfacePy::uIso(), Part::GeometrySurfacePy::UPeriod(), Part::GeometrySurfacePy::value(), Part::GeometryCurvePy::value(), Part::RectangularTrimmedSurfacePy::vIso(), Part::BSplineSurfacePy::vIso(), Part::BezierSurfacePy::vIso(), and Part::GeometrySurfacePy::VPeriod().

virtual PyParentObject* Part::GeometryPy::GetParents ( void   )  [inline, virtual]
virtual PyTypeObject* Part::GeometryPy::GetType ( void   )  [inline, virtual]
PyObject * GeometryPy::mirror ( PyObject *  args  ) 
int GeometryPy::PyInit ( PyObject *  ,
PyObject *   
) [virtual]
PyObject * GeometryPy::PyMake ( struct _typeobject *  ,
PyObject *  ,
PyObject *   
) [static]
std::string GeometryPy::representation ( void   )  const
PyObject * GeometryPy::rotate ( PyObject *  args  ) 
PyObject * GeometryPy::scale ( PyObject *  args  ) 
void GeometryPy::setConstruction ( Py::Boolean  arg  ) 

setter for the Construction attribute

Definition at line 187 of file GeometryPyImp.cpp.

References Part::Geometry::Construction, and getGeometryPtr().

int GeometryPy::setCustomAttributes ( const char *  attr,
PyObject *  obj 
)
PyObject * GeometryPy::staticCallback_getConstruction ( PyObject *  self,
void *  closure 
) [static]

getter callback for the Construction attribute

Definition at line 502 of file GeometryPy.cpp.

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

PyObject * GeometryPy::staticCallback_mirror ( PyObject *  self,
PyObject *  args 
) [static]
PyObject * GeometryPy::staticCallback_rotate ( PyObject *  self,
PyObject *  args 
) [static]
PyObject * GeometryPy::staticCallback_scale ( PyObject *  self,
PyObject *  args 
) [static]
int GeometryPy::staticCallback_setConstruction ( PyObject *  self,
PyObject *  value,
void *  closure 
) [static]

setter callback for the Construction attribute

Definition at line 520 of file GeometryPy.cpp.

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

PyObject * GeometryPy::staticCallback_transform ( PyObject *  self,
PyObject *  args 
) [static]
PyObject * GeometryPy::staticCallback_translate ( PyObject *  self,
PyObject *  args 
) [static]
PyObject * GeometryPy::transform ( PyObject *  args  ) 

implementer for the transform() method

Definition at line 144 of file GeometryPyImp.cpp.

References getGeometryPtr(), Part::Geometry::handle(), Py_Return, Base::MatrixPy::Type, and Py::value().

PyObject * GeometryPy::translate ( PyObject *  args  ) 

Member Data Documentation

PyGetSetDef GeometryPy::GetterSetter [static]
PyMethodDef GeometryPy::Methods [static]
Initial value:
 {
    {"mirror",
        (PyCFunction) staticCallback_mirror,
        METH_VARARGS,
        "Performs the symmetrical transformation of this geometric object"
    },
    {"rotate",
        (PyCFunction) staticCallback_rotate,
        METH_VARARGS,
        "Rotates this geometric object at angle Ang (in radians) about axis"
    },
    {"scale",
        (PyCFunction) staticCallback_scale,
        METH_VARARGS,
        "Applies a scaling transformation on this geometric object with a center and scaling factor"
    },
    {"transform",
        (PyCFunction) staticCallback_transform,
        METH_VARARGS,
        "Applies a transformation to this geometric object"
    },
    {"translate",
        (PyCFunction) staticCallback_translate,
        METH_VARARGS,
        "Translates this geometric object"
    },
    {NULL, NULL, 0, NULL}               
}

Methods structure of GeometryPy.

Reimplemented from Base::PyObjectBase.

Reimplemented in Part::ArcOfCirclePy, Part::ArcPy, Part::BezierCurvePy, Part::BezierSurfacePy, Part::BSplineCurvePy, Part::BSplineSurfacePy, Part::CirclePy, Part::ConePy, Part::CylinderPy, Part::EllipsePy, Part::GeometryCurvePy, Part::GeometrySurfacePy, Part::HyperbolaPy, Part::LinePy, Part::OffsetCurvePy, Part::OffsetSurfacePy, Part::ParabolaPy, Part::PlanePy, Part::RectangularTrimmedSurfacePy, Part::SpherePy, Part::SurfaceOfExtrusionPy, Part::SurfaceOfRevolutionPy, and Part::ToroidPy.

Definition at line 24 of file GeometryPy.h.

Referenced by _getattr().

PyParentObject GeometryPy::Parents = { PARENTSPartGeometryPy } [static]
PyTypeObject GeometryPy::Type [static]

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

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