#include <Geometry.h>
Public Member Functions | |
virtual Geometry * | clone (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 () |
Definition at line 57 of file Geometry.h.
Geometry::~Geometry | ( | ) | [virtual] |
Definition at line 164 of file Geometry.cpp.
Geometry::Geometry | ( | ) | [protected] |
Definition at line 159 of file Geometry.cpp.
virtual Geometry* Part::Geometry::clone | ( | void | ) | const [pure virtual] |
returns a cloned object
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 Sketcher::SketchObject::addGeometry(), and Part::PropertyGeometryList::setValue().
void * Part::Geometry::create | ( | void | ) | [static] |
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.
Base::Type Part::Geometry::getClassTypeId | ( | void | ) | [static] |
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.
unsigned int Geometry::getMemSize | ( | void | ) | const [virtual] |
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?
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 169 of file Geometry.cpp.
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] |
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 initPart().
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.
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] |
Implemented in Part::GeomPoint, Part::GeomCurve, and Part::GeomSurface.
construction geometry (means no impact on a later built topo)
Definition at line 72 of file Geometry.h.
Referenced by Sketcher::Sketch::addArc(), Sketcher::Sketch::addCircle(), Sketcher::Sketch::addLineSegment(), Part::GeomSurfaceOfExtrusion::clone(), Part::GeomSurfaceOfRevolution::clone(), Part::GeomTrimmedSurface::clone(), Part::GeomOffsetSurface::clone(), Part::GeomPlane::clone(), Part::GeomSphere::clone(), Part::GeomToroid::clone(), Part::GeomCone::clone(), Part::GeomCylinder::clone(), Part::GeomBSplineSurface::clone(), Part::GeomBezierSurface::clone(), Part::GeomTrimmedCurve::clone(), Part::GeomOffsetCurve::clone(), Part::GeomLineSegment::clone(), Part::GeomLine::clone(), Part::GeomParabola::clone(), Part::GeomHyperbola::clone(), Part::GeomEllipse::clone(), Part::GeomArcOfCircle::clone(), Part::GeomCircle::clone(), Part::GeomBSplineCurve::clone(), Part::GeomBezierCurve::clone(), Part::GeomPoint::clone(), Restore(), Save(), Part::GeometryPy::setConstruction(), and Sketcher::SketchObject::toggleConstruction().