Base class of all Points feature classes in FreeCAD. More...
#include <PointsFeature.h>
Public Member Functions | |
Feature (void) | |
Constructor. | |
virtual Base::Type | getTypeId (void) const |
virtual | ~Feature (void) |
Static Public Member Functions | |
static void * | create (void) |
static Base::Type | getClassTypeId (void) |
static void | init (void) |
Public Attributes | |
PropertyPointKernel | Points |
The point kernel property. | |
Protected Member Functions | |
virtual const App::PropertyData & | getPropertyData (void) const |
Static Protected Member Functions | |
static const App::PropertyData * | getPropertyDataPtr (void) |
methods overide Feature | |
| |
virtual App::DocumentObjectExecReturn * | execute (void) |
recalculate the Feature | |
virtual const char * | getViewProviderName (void) const |
returns the type name of the ViewProvider | |
void | Restore (Base::XMLReader &reader) |
This method is used to restore properties from an XML document. | |
void | RestoreDocFile (Base::Reader &reader) |
This method is used to restore large amounts of data from a file In this method you simply stream in your with SaveDocFile() saved data. | |
void | onChanged (const App::Property *prop) |
get called by the container when a property was changed |
Base class of all Points feature classes in FreeCAD.
This class holds an PointsKernel object.
Definition at line 51 of file PointsFeature.h.
Feature::Feature | ( | void | ) |
Feature::~Feature | ( | void | ) | [virtual] |
Definition at line 53 of file PointsFeature.cpp.
void * Points::Feature::create | ( | void | ) | [static] |
Reimplemented from App::PropertyContainer.
Reimplemented in Points::ImportAscii, and Points::Export.
Definition at line 46 of file PointsFeature.cpp.
App::DocumentObjectExecReturn * Feature::execute | ( | void | ) | [virtual] |
recalculate the Feature
Reimplemented from App::DocumentObject.
Reimplemented in Points::ImportAscii, and Points::Export.
Definition at line 57 of file PointsFeature.cpp.
References App::DocumentObject::StdReturn.
Base::Type Points::Feature::getClassTypeId | ( | void | ) | [static] |
Reimplemented from App::PropertyContainer.
Reimplemented in Points::ImportAscii, and Points::Export.
Definition at line 46 of file PointsFeature.cpp.
Referenced by CmdPointsPolyCut::activated(), CmdPointsExport::activated(), Inspection::Feature::execute(), CmdPointsPolyCut::isActive(), CmdPointsTransform::isActive(), and CmdPointsExport::isActive().
const App::PropertyData & Points::Feature::getPropertyData | ( | void | ) | const [protected, virtual] |
Reimplemented from App::PropertyContainer.
Reimplemented in Points::ImportAscii, and Points::Export.
Definition at line 46 of file PointsFeature.cpp.
const App::PropertyData * Points::Feature::getPropertyDataPtr | ( | void | ) | [static, protected] |
Reimplemented from App::PropertyContainer.
Reimplemented in Points::ImportAscii, and Points::Export.
Definition at line 46 of file PointsFeature.cpp.
Base::Type Points::Feature::getTypeId | ( | void | ) | const [virtual] |
Reimplemented from App::PropertyContainer.
Reimplemented in Points::ImportAscii, and Points::Export.
Definition at line 46 of file PointsFeature.cpp.
virtual const char* Points::Feature::getViewProviderName | ( | void | ) | const [inline, virtual] |
returns the type name of the ViewProvider
Reimplemented from App::DocumentObject.
Definition at line 67 of file PointsFeature.h.
void Points::Feature::init | ( | void | ) | [static] |
Reimplemented from App::PropertyContainer.
Reimplemented in Points::ImportAscii, and Points::Export.
Definition at line 46 of file PointsFeature.cpp.
Referenced by initPoints().
void Feature::onChanged | ( | const App::Property * | prop | ) | [protected, virtual] |
get called by the container when a property was changed
Reimplemented from App::DocumentObject.
Definition at line 73 of file PointsFeature.cpp.
References Base::Placement::fromMatrix(), Points::PointKernel::getTransform(), Points::PropertyPointKernel::getValue(), draftTools::p, App::GeoFeature::Placement, Points, pts, and Points::PointKernel::setTransform().
void Feature::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 App::PropertyContainer.
Definition at line 62 of file PointsFeature.cpp.
void Feature::RestoreDocFile | ( | Base::Reader & | ) | [virtual] |
This method is used to restore large amounts of data from a file In this method you simply stream in your with SaveDocFile() saved data.
Again you have to apply for the call of this method in the Restore() call:
void PropertyMeshKernel::Restore(Base::XMLReader &reader) { reader.readElement("Mesh"); std::string file (reader.getAttribute("file") ); if(file == "") { // read XML MeshCore::MeshDocXML restorer(*_pcMesh); restorer.Restore(reader); }else{ // initate a file read reader.addFile(file.c_str(),this); } }
After you issued the reader.addFile() your RestoreDocFile() is called:
void PropertyMeshKernel::RestoreDocFile(Base::Reader &reader) { _pcMesh->Read( reader ); }
Reimplemented from Base::Persistence.
Definition at line 67 of file PointsFeature.cpp.
References Points, and Points::PropertyPointKernel::RestoreDocFile().
The point kernel property.
Definition at line 75 of file PointsFeature.h.
Referenced by PointsGui::ViewProviderPoints::cut(), Points::Export::execute(), Inspection::Feature::execute(), Points::ImportAscii::execute(), insert(), onChanged(), open(), RestoreDocFile(), and show().