#include <Geometry.h>
Public Member Functions | |
virtual Geometry * | clone (void) const |
returns a cloned object | |
GeomArcOfCircle (const Handle_Geom_Circle &) | |
GeomArcOfCircle () | |
Base::Vector3d | getCenter (void) const |
Base::Vector3d | getEndPoint () const |
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 PyObject * | getPyObject (void) |
This method returns the Python wrapper for a C++ object. | |
double | getRadius (void) const |
void | getRange (double &u, double &v) const |
Base::Vector3d | getStartPoint () const |
virtual Base::Type | getTypeId (void) const |
const Handle_Geom_Geometry & | handle () const |
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. | |
void | setCenter (const Base::Vector3d &Center) |
void | setHandle (const Handle_Geom_TrimmedCurve &) |
void | setRadius (double Radius) |
void | setRange (double u, double v) |
virtual | ~GeomArcOfCircle () |
Static Public Member Functions | |
static void * | create (void) |
static Base::Type | getClassTypeId (void) |
static void | init (void) |
Definition at line 199 of file Geometry.h.
GeomArcOfCircle::GeomArcOfCircle | ( | ) |
Definition at line 610 of file Geometry.cpp.
Referenced by clone().
GeomArcOfCircle::GeomArcOfCircle | ( | const Handle_Geom_Circle & | c | ) |
Definition at line 616 of file Geometry.cpp.
GeomArcOfCircle::~GeomArcOfCircle | ( | ) | [virtual] |
Definition at line 621 of file Geometry.cpp.
Geometry * GeomArcOfCircle::clone | ( | void | ) | const [virtual] |
returns a cloned object
Implements Part::Geometry.
Definition at line 638 of file Geometry.cpp.
References Part::Geometry::Construction, draftlibs::dxfLibrary::copy, GeomArcOfCircle(), and setHandle().
Referenced by Sketcher::Sketch::addArc(), and getPyObject().
void * Part::GeomArcOfCircle::create | ( | void | ) | [static] |
Reimplemented from Part::GeomCurve.
Definition at line 608 of file Geometry.cpp.
Base::Vector3d GeomArcOfCircle::getCenter | ( | void | ) | const |
Definition at line 658 of file Geometry.cpp.
Referenced by Sketcher::Sketch::addArc(), SketcherGui::ViewProviderSketch::draw(), Sketcher::SketchObject::getPoint(), SketcherGui::ViewProviderSketch::moveConstraint(), SketcherGui::DrawSketchHandler::seekAutoConstraint(), and Sketcher::SketchObject::trim().
Base::Type Part::GeomArcOfCircle::getClassTypeId | ( | void | ) | [static] |
Reimplemented from Part::GeomCurve.
Definition at line 608 of file Geometry.cpp.
Referenced by CmdSketcherConstrainEqual::activated(), CmdSketcherConstrainRadius::activated(), CmdSketcherConstrainPointOnObject::activated(), SketcherGui::TrimmingSelection::allow(), DrawSketchHandlerTrimming::releaseButton(), and SketcherGui::DrawSketchHandler::seekAutoConstraint().
Base::Vector3d GeomArcOfCircle::getEndPoint | ( | ) | const |
Definition at line 652 of file Geometry.cpp.
Referenced by Sketcher::Sketch::addArc(), SketcherGui::ViewProviderSketch::draw(), Sketcher::SketchObject::fillet(), and Sketcher::SketchObject::getPoint().
unsigned int GeomArcOfCircle::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?
Reimplemented from Part::Geometry.
Definition at line 713 of file Geometry.cpp.
PyObject * GeomArcOfCircle::getPyObject | ( | void | ) | [virtual] |
This method returns the Python wrapper for a C++ object.
It's in the responsibility of the programmer to do the correct reference counting. Basically there are two ways how to implement that: Either always return a new Python object then reference counting is not a matter or return always the same Python object then the reference counter must be incremented by one. However, it's absolutely forbidden to return always the same Python object without incrementing the reference counter.
The default implementation returns 'None'.
Reimplemented from Base::BaseClass.
Definition at line 786 of file Geometry.cpp.
References clone().
double GeomArcOfCircle::getRadius | ( | void | ) | const |
Definition at line 666 of file Geometry.cpp.
Referenced by CmdSketcherConstrainRadius::activated(), Sketcher::Sketch::addArc(), SketcherGui::ViewProviderSketch::draw(), SketcherGui::ViewProviderSketch::moveConstraint(), and SketcherGui::DrawSketchHandler::seekAutoConstraint().
void GeomArcOfCircle::getRange | ( | double & | u, | |
double & | v | |||
) | const |
Definition at line 701 of file Geometry.cpp.
Referenced by Sketcher::Sketch::addArc(), SketcherGui::ViewProviderSketch::draw(), SketcherGui::ViewProviderSketch::moveConstraint(), SketcherGui::DrawSketchHandler::seekAutoConstraint(), and Sketcher::SketchObject::trim().
Base::Vector3d GeomArcOfCircle::getStartPoint | ( | ) | const |
Definition at line 646 of file Geometry.cpp.
Referenced by Sketcher::Sketch::addArc(), SketcherGui::ViewProviderSketch::draw(), Sketcher::SketchObject::fillet(), and Sketcher::SketchObject::getPoint().
Base::Type Part::GeomArcOfCircle::getTypeId | ( | void | ) | const [virtual] |
Reimplemented from Part::GeomCurve.
Definition at line 608 of file Geometry.cpp.
const Handle_Geom_Geometry & GeomArcOfCircle::handle | ( | ) | const [virtual] |
Implements Part::Geometry.
Definition at line 633 of file Geometry.cpp.
Referenced by SketcherGui::ViewProviderSketch::draw().
void Part::GeomArcOfCircle::init | ( | void | ) | [static] |
Reimplemented from Part::GeomCurve.
Definition at line 608 of file Geometry.cpp.
Referenced by initPart().
void GeomArcOfCircle::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"); }
Reimplemented from Part::Geometry.
Definition at line 743 of file Geometry.cpp.
References gce_ErrorStatusText(), Base::XMLReader::getAttributeAsFloat(), Sketcher::Radius, and Base::XMLReader::readElement().
void GeomArcOfCircle::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.
Reimplemented from Part::Geometry.
Definition at line 718 of file Geometry.cpp.
References Base::Writer::ind(), and Base::Writer::Stream().
void GeomArcOfCircle::setCenter | ( | const Base::Vector3d & | Center | ) |
Definition at line 672 of file Geometry.cpp.
References Base::Vector3< _Precision >::x, Base::Vector3< _Precision >::y, and Base::Vector3< _Precision >::z.
Referenced by Part::ArcOfCirclePy::setCenter(), and Sketcher::SketchObject::trim().
void GeomArcOfCircle::setHandle | ( | const Handle_Geom_TrimmedCurve & | c | ) |
Definition at line 625 of file Geometry.cpp.
Referenced by clone(), and Part::ArcOfCirclePy::PyInit().
void GeomArcOfCircle::setRadius | ( | double | Radius | ) |
Definition at line 686 of file Geometry.cpp.
Referenced by Part::ArcOfCirclePy::setRadius(), and Sketcher::SketchObject::trim().
void GeomArcOfCircle::setRange | ( | double | u, | |
double | v | |||
) |
Definition at line 707 of file Geometry.cpp.
Referenced by Sketcher::SketchObject::trim().