Part::Geometry Class Reference

#include <Geometry.h>

Inheritance diagram for Part::Geometry:
Base::Persistence Base::BaseClass Part::GeomCurve Part::GeomPoint Part::GeomSurface Part::GeomArcOfCircle Part::GeomBezierCurve Part::GeomBSplineCurve Part::GeomCircle Part::GeomEllipse Part::GeomHyperbola Part::GeomLine Part::GeomLineSegment Part::GeomOffsetCurve Part::GeomParabola Part::GeomTrimmedCurve Part::GeomBezierSurface Part::GeomBSplineSurface Part::GeomCone Part::GeomCylinder Part::GeomOffsetSurface Part::GeomPlane Part::GeomSphere Part::GeomSurfaceOfExtrusion Part::GeomSurfaceOfRevolution Part::GeomToroid Part::GeomTrimmedSurface

List of all members.

Public Member Functions

virtual Geometryclone (void) const =0
 returns a cloned object
virtual unsigned int getMemSize (void) const
 This method is used to get the size of objects It is not meant to have the exact size, it is more or less an estimation which runs fast! Is it two bytes or a GB?
virtual Base::Type getTypeId (void) const
virtual const
Handle_Geom_Geometry & 
handle () const =0
virtual void Restore (Base::XMLReader &)
 This method is used to restore properties from an XML document.
virtual void Save (Base::Writer &) const
 This method is used to save properties to an XML document.
virtual TopoDS_Shape toShape () const =0
virtual ~Geometry ()

Static Public Member Functions

static void * create (void)
static Base::Type getClassTypeId (void)
static void init (void)

Public Attributes

bool Construction
 construction geometry (means no impact on a later built topo)

Protected Member Functions

 Geometry ()

Detailed Description

Definition at line 57 of file Geometry.h.


Constructor & Destructor Documentation

Geometry::~Geometry (  )  [virtual]

Definition at line 164 of file Geometry.cpp.

Geometry::Geometry (  )  [protected]

Definition at line 159 of file Geometry.cpp.


Member Function Documentation

virtual Geometry* Part::Geometry::clone ( void   )  const [pure virtual]
void * Part::Geometry::create ( void   )  [static]
Base::Type Part::Geometry::getClassTypeId ( void   )  [static]
unsigned int Geometry::getMemSize ( void   )  const [virtual]
Base::Type Part::Geometry::getTypeId ( void   )  const [virtual]

Reimplemented from Base::Persistence.

Reimplemented in Part::GeomPoint, Part::GeomCurve, Part::GeomBezierCurve, Part::GeomBSplineCurve, Part::GeomCircle, Part::GeomArcOfCircle, Part::GeomEllipse, Part::GeomHyperbola, Part::GeomParabola, Part::GeomLine, Part::GeomLineSegment, Part::GeomOffsetCurve, Part::GeomTrimmedCurve, Part::GeomSurface, Part::GeomBezierSurface, Part::GeomBSplineSurface, Part::GeomCylinder, Part::GeomCone, Part::GeomSphere, Part::GeomToroid, Part::GeomPlane, Part::GeomOffsetSurface, Part::GeomTrimmedSurface, Part::GeomSurfaceOfRevolution, and Part::GeomSurfaceOfExtrusion.

Definition at line 157 of file Geometry.cpp.

Referenced by CmdSketcherConstrainSymmetric::activated(), CmdSketcherConstrainEqual::activated(), CmdSketcherConstrainAngle::activated(), CmdSketcherConstrainRadius::activated(), CmdSketcherConstrainPerpendicular::activated(), CmdSketcherConstrainParallel::activated(), CmdSketcherConstrainDistanceY::activated(), CmdSketcherConstrainDistanceX::activated(), CmdSketcherConstrainPointOnObject::activated(), CmdSketcherConstrainDistance::activated(), Sketcher::Sketch::addGeometry(), SketcherGui::TrimmingSelection::allow(), SketcherGui::FilletSelection::allow(), SketcherGui::ViewProviderSketch::draw(), SketcherGui::ViewProviderSketch::drawConstraintIcons(), Sketcher::SketchObject::fillet(), SketcherGui::ViewProviderSketch::mouseButtonPressed(), SketcherGui::ViewProviderSketch::mouseMove(), SketcherGui::ViewProviderSketch::moveConstraint(), SketcherGui::ViewProviderSketch::rebuildConstraintsVisual(), DrawSketchHandlerTrimming::releaseButton(), DrawSketchHandlerFillet::releaseButton(), DrawSketchHandlerLineSet::releaseButton(), and Sketcher::SketchObject::trim().

virtual const Handle_Geom_Geometry& Part::Geometry::handle (  )  const [pure virtual]

Implemented in Part::GeomPoint, Part::GeomBezierCurve, Part::GeomBSplineCurve, Part::GeomCircle, Part::GeomArcOfCircle, Part::GeomEllipse, Part::GeomHyperbola, Part::GeomParabola, Part::GeomLine, Part::GeomLineSegment, Part::GeomOffsetCurve, Part::GeomTrimmedCurve, Part::GeomBezierSurface, Part::GeomBSplineSurface, Part::GeomCylinder, Part::GeomCone, Part::GeomSphere, Part::GeomToroid, Part::GeomPlane, Part::GeomOffsetSurface, Part::GeomTrimmedSurface, Part::GeomSurfaceOfRevolution, and Part::GeomSurfaceOfExtrusion.

Referenced by Part::GeometryCurvePy::discretize(), makeRevolution(), Part::GeometryCurvePy::makeRuledSurface(), Part::GeometryPy::mirror(), Part::GeometryCurvePy::parameter(), Part::TopoShapeEdgePy::PyInit(), Part::SurfaceOfRevolutionPy::PyInit(), Part::SurfaceOfExtrusionPy::PyInit(), Part::PlanePy::PyInit(), Part::OffsetSurfacePy::PyInit(), Part::OffsetCurvePy::PyInit(), Part::HyperbolaPy::PyInit(), Part::ConePy::PyInit(), Part::GeometryPy::rotate(), Part::GeometryPy::scale(), Part::SurfaceOfRevolutionPy::setBasisCurve(), Part::SurfaceOfExtrusionPy::setBasisCurve(), Part::OffsetCurvePy::setBasisCurve(), Part::OffsetSurfacePy::setBasisSurface(), Part::GeometrySurfacePy::tangent(), Part::GeometryCurvePy::tangent(), Part::GeomCurve::tangent(), Part::GeomSurface::tangentU(), Part::GeomSurface::tangentV(), Part::GeometrySurfacePy::toShape(), Part::GeometryCurvePy::toShape(), Part::GeomSurface::toShape(), Part::GeomCurve::toShape(), Part::GeometryPy::transform(), Part::GeometryPy::translate(), Part::GeometrySurfacePy::value(), and Part::GeometryCurvePy::value().

void Part::Geometry::init ( void   )  [static]
void Geometry::Restore ( Base::XMLReader  )  [virtual]

This method is used to restore properties from an XML document.

It uses the XMLReader class, which bases on SAX, to read the in Save() written information. Again the Vector as an example:

 void PropertyVector::Restore(Base::XMLReader &reader)
 {
   // read my Element
   reader.readElement("PropertyVector");
   // get the value of my Attribute
   _cVec.x = (float)reader.getAttributeAsFloat("valueX");
   _cVec.y = (float)reader.getAttributeAsFloat("valueY");
   _cVec.z = (float)reader.getAttributeAsFloat("valueZ");
 }

Implements Base::Persistence.

Reimplemented in Part::GeomPoint, Part::GeomBezierCurve, Part::GeomBSplineCurve, Part::GeomCircle, Part::GeomArcOfCircle, Part::GeomEllipse, Part::GeomHyperbola, Part::GeomParabola, Part::GeomLine, Part::GeomLineSegment, Part::GeomOffsetCurve, Part::GeomTrimmedCurve, Part::GeomBezierSurface, Part::GeomBSplineSurface, Part::GeomCylinder, Part::GeomCone, Part::GeomSphere, Part::GeomToroid, Part::GeomPlane, Part::GeomOffsetSurface, Part::GeomTrimmedSurface, Part::GeomSurfaceOfRevolution, and Part::GeomSurfaceOfExtrusion.

Definition at line 180 of file Geometry.cpp.

References Construction, Base::XMLReader::getAttributeAsInteger(), Py::int, and Base::XMLReader::readElement().

Referenced by Part::PropertyGeometryList::Restore().

void Geometry::Save ( Base::Writer  )  const [virtual]

This method is used to save properties to an XML document.

A good example you'll find in PropertyStandard.cpp, e.g. the vector:

  void PropertyVector::Save (Writer &writer) const
  {
     writer << writer.ind() << "<PropertyVector valueX=\"" <<  _cVec.x <<
                                            "\" valueY=\"" <<  _cVec.y <<
                                            "\" valueZ=\"" <<  _cVec.z <<"\"/>" << endl;
  }

The writer.ind() expression writes the indention, just for pretty printing of the XML. As you see, the writing of the XML document is not done with a DOM implementation because of performance reasons. Therefore the programmer has to take care that a valid XML document is written. This means closing tags and writing UTF-8.

See also:
Base::Writer

Implements Base::Persistence.

Reimplemented in Part::GeomPoint, Part::GeomBezierCurve, Part::GeomBSplineCurve, Part::GeomCircle, Part::GeomArcOfCircle, Part::GeomEllipse, Part::GeomHyperbola, Part::GeomParabola, Part::GeomLine, Part::GeomLineSegment, Part::GeomOffsetCurve, Part::GeomTrimmedCurve, Part::GeomBezierSurface, Part::GeomBSplineSurface, Part::GeomCylinder, Part::GeomCone, Part::GeomSphere, Part::GeomToroid, Part::GeomPlane, Part::GeomOffsetSurface, Part::GeomTrimmedSurface, Part::GeomSurfaceOfRevolution, and Part::GeomSurfaceOfExtrusion.

Definition at line 174 of file Geometry.cpp.

References Construction, Base::Writer::ind(), and Base::Writer::Stream().

virtual TopoDS_Shape Part::Geometry::toShape (  )  const [pure virtual]

Member Data Documentation


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

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