Base class of all shape feature classes in FreeCAD. More...
#include <PartFeature.h>
Public Member Functions | |
Feature (void) | |
Constructor. | |
virtual PyObject * | getPyObject (void) |
This method returns the Python wrapper for a C++ object. | |
virtual std::vector< PyObject * > | getPySubObjects (const std::vector< std::string > &) const |
its used to get the python sub objects by name (e.g. by the selection) | |
virtual Base::Type | getTypeId (void) const |
virtual const char * | getViewProviderName (void) const |
returns the type name of the ViewProvider | |
virtual | ~Feature () |
methods override feature | |
virtual App::DocumentObjectExecReturn * | execute (void) |
recalculate the feature | |
virtual short | mustExecute (void) const |
mustExecute We call this method to check if the object was modified to be invoked. | |
Static Public Member Functions | |
static void * | create (void) |
static Base::Type | getClassTypeId (void) |
static void | init (void) |
Public Attributes | |
PropertyPartShape | Shape |
Protected Member Functions | |
TopLoc_Location | getLocation () const |
virtual const App::PropertyData & | getPropertyData (void) const |
void | onChanged (const App::Property *prop) |
get called by the container when a property was changed | |
Static Protected Member Functions | |
static const App::PropertyData * | getPropertyDataPtr (void) |
Base class of all shape feature classes in FreeCAD.
Definition at line 40 of file PartFeature.h.
Feature::Feature | ( | void | ) |
Constructor.
Reimplemented in PartDesign::Feature.
Definition at line 52 of file PartFeature.cpp.
References ADD_PROPERTY, and DrawingExample::Shape.
Feature::~Feature | ( | ) | [virtual] |
Definition at line 57 of file PartFeature.cpp.
void * Part::Feature::create | ( | void | ) | [static] |
Reimplemented from App::PropertyContainer.
Reimplemented in Drawing::FeatureProjection, Part::CustomFeature, Part::Chamfer, Part::Extrusion, Part::Fillet, Part::FeatureGeometrySet, Part::Mirroring, Part::Boolean, Part::Box, Part::Circle, Part::Common, Part::MultiCommon, Part::CurveNet, Part::Cut, Part::Fuse, Part::MultiFuse, Part::ImportBrep, Part::ImportIges, Part::ImportStep, Part::Polygon, Part::Section, Part::Revolution, Part::Part2DObject, Part::FeatureExt, Part::RuledSurface, Part::Loft, Part::Primitive, Part::Vertex, Part::Plane, Part::Sphere, Part::Ellipsoid, Part::Cylinder, Part::Cone, Part::Torus, Part::Helix, Part::Wedge, PartDesign::Feature, PartDesign::Additive, PartDesign::Chamfer, PartDesign::DressUp, PartDesign::Face, PartDesign::Fillet, PartDesign::Hole, PartDesign::MainPart, PartDesign::Pad, PartDesign::PatternRectangular, PartDesign::Pocket, PartDesign::Revolution, PartDesign::SketchBased, PartDesign::Subtractive, Sketcher::SketchObject, and Sketcher::SketchObjectSF.
Definition at line 49 of file PartFeature.cpp.
App::DocumentObjectExecReturn * Feature::execute | ( | void | ) | [virtual] |
recalculate the feature
Reimplemented from App::DocumentObject.
Reimplemented in Drawing::FeatureProjection, Part::CustomFeature, Part::Chamfer, Part::Extrusion, Part::Fillet, Part::FeatureGeometrySet, Part::Mirroring, Part::Boolean, Part::Box, Part::Circle, Part::MultiCommon, Part::CurveNet, Part::MultiFuse, Part::ImportBrep, Part::ImportIges, Part::ImportStep, Part::Polygon, Part::Revolution, Part::Part2DObject, Part::RuledSurface, Part::Loft, Part::Primitive, Part::Vertex, Part::Plane, Part::Sphere, Part::Ellipsoid, Part::Cylinder, Part::Cone, Part::Torus, Part::Helix, Part::Wedge, PartDesign::Chamfer, PartDesign::Face, PartDesign::Fillet, PartDesign::Hole, PartDesign::MainPart, PartDesign::Pad, PartDesign::PatternRectangular, PartDesign::Pocket, PartDesign::Revolution, Sketcher::SketchObject, and Sketcher::SketchObjectSF.
Definition at line 66 of file PartFeature.cpp.
References App::DocumentObject::StdReturn.
Base::Type Part::Feature::getClassTypeId | ( | void | ) | [static] |
Reimplemented from App::PropertyContainer.
Reimplemented in Drawing::FeatureProjection, Part::CustomFeature, Part::Chamfer, Part::Extrusion, Part::Fillet, Part::FeatureGeometrySet, Part::Mirroring, Part::Boolean, Part::Box, Part::Circle, Part::Common, Part::MultiCommon, Part::CurveNet, Part::Cut, Part::Fuse, Part::MultiFuse, Part::ImportBrep, Part::ImportIges, Part::ImportStep, Part::Polygon, Part::Section, Part::Revolution, Part::Part2DObject, Part::FeatureExt, Part::RuledSurface, Part::Loft, Part::Primitive, Part::Vertex, Part::Plane, Part::Sphere, Part::Ellipsoid, Part::Cylinder, Part::Cone, Part::Torus, Part::Helix, Part::Wedge, PartDesign::Feature, PartDesign::Additive, PartDesign::Chamfer, PartDesign::DressUp, PartDesign::Face, PartDesign::Fillet, PartDesign::Hole, PartDesign::MainPart, PartDesign::Pad, PartDesign::PatternRectangular, PartDesign::Pocket, PartDesign::Revolution, PartDesign::SketchBased, PartDesign::Subtractive, Sketcher::SketchObject, and Sketcher::SketchObjectSF.
Definition at line 49 of file PartFeature.cpp.
Referenced by CmdRaytracingWritePart::activated(), CmdPartDesignFillet::activated(), CmdPartCrossSections::activated(), CmdPartReverseShape::activated(), CmdPartMakeSolid::activated(), CmdPartSection::activated(), CmdPartFuse::activated(), CmdPartCommon::activated(), CmdPartCut::activated(), CmdDrawingNewView::activated(), PartGui::ShapeSelection::allow(), PartGui::DlgExtrusion::apply(), PartGui::CrossSections::apply(), PartGui::DlgExtrusion::DlgExtrusion(), PartGui::DlgRevolution::DlgRevolution(), Sketcher::SketchObject::execute(), Raytracing::RayFeature::execute(), Part::Loft::execute(), Part::RuledSurface::execute(), Inspection::Feature::execute(), Drawing::FeatureViewPart::execute(), PartDesign::Revolution::execute(), Part::Revolution::execute(), Drawing::FeatureProjection::execute(), PartDesign::Pocket::execute(), Part::MultiFuse::execute(), Part::MultiCommon::execute(), PartDesign::Pad::execute(), Part::Mirroring::execute(), PartDesign::Fillet::execute(), Part::Fillet::execute(), Part::Extrusion::execute(), Part::Chamfer::execute(), Robot::Edge2TracObject::execute(), exporter(), PartDesignGui::ChamferWidget::findShapes(), PartGui::DlgFilletEdges::findShapes(), PartGui::DlgExtrusion::findShapes(), CmdRaytracingWriteView::isActive(), CmdRaytracingWritePart::isActive(), CmdShapeInfo::isActive(), CmdPartCrossSections::isActive(), CmdPartReverseShape::isActive(), CmdPartMakeSolid::isActive(), CmdPartExport::isActive(), CmdPartSection::isActive(), CmdPartFuse::isActive(), CmdPartCommon::isActive(), CmdPartCut::isActive(), CmdDrawingProjectShape::isActive(), PartGui::Mirroring::Mirroring(), CamGui::Cutting::selectShape(), CamGui::Cutting::setFace(), SketcherGui::SketchSelection::setUp(), and RobotGui::ViewProviderRobotObject::updateData().
TopLoc_Location Feature::getLocation | ( | ) | const [protected] |
Definition at line 115 of file PartFeature.cpp.
References draftlibs::fcvec::angle(), Base::Placement::getPosition(), Base::Placement::getRotation(), and App::GeoFeature::Placement.
const App::PropertyData & Part::Feature::getPropertyData | ( | void | ) | const [protected, virtual] |
Reimplemented from App::PropertyContainer.
Reimplemented in Drawing::FeatureProjection, Part::CustomFeature, Part::Chamfer, Part::Extrusion, Part::Fillet, Part::FeatureGeometrySet, Part::Mirroring, Part::Boolean, Part::Box, Part::Circle, Part::Common, Part::MultiCommon, Part::CurveNet, Part::Cut, Part::Fuse, Part::MultiFuse, Part::ImportBrep, Part::ImportIges, Part::ImportStep, Part::Polygon, Part::Section, Part::Revolution, Part::Part2DObject, Part::FeatureExt, Part::RuledSurface, Part::Loft, Part::Primitive, Part::Vertex, Part::Plane, Part::Sphere, Part::Ellipsoid, Part::Cylinder, Part::Cone, Part::Torus, Part::Helix, Part::Wedge, PartDesign::Feature, PartDesign::Additive, PartDesign::Chamfer, PartDesign::DressUp, PartDesign::Face, PartDesign::Fillet, PartDesign::Hole, PartDesign::MainPart, PartDesign::Pad, PartDesign::PatternRectangular, PartDesign::Pocket, PartDesign::Revolution, PartDesign::SketchBased, PartDesign::Subtractive, Sketcher::SketchObject, and Sketcher::SketchObjectSF.
Definition at line 49 of file PartFeature.cpp.
const App::PropertyData * Part::Feature::getPropertyDataPtr | ( | void | ) | [static, protected] |
Reimplemented from App::PropertyContainer.
Reimplemented in Drawing::FeatureProjection, Part::CustomFeature, Part::Chamfer, Part::Extrusion, Part::Fillet, Part::FeatureGeometrySet, Part::Mirroring, Part::Boolean, Part::Box, Part::Circle, Part::Common, Part::MultiCommon, Part::CurveNet, Part::Cut, Part::Fuse, Part::MultiFuse, Part::ImportBrep, Part::ImportIges, Part::ImportStep, Part::Polygon, Part::Section, Part::Revolution, Part::Part2DObject, Part::FeatureExt, Part::RuledSurface, Part::Loft, Part::Primitive, Part::Vertex, Part::Plane, Part::Sphere, Part::Ellipsoid, Part::Cylinder, Part::Cone, Part::Torus, Part::Helix, Part::Wedge, PartDesign::Feature, PartDesign::Additive, PartDesign::Chamfer, PartDesign::DressUp, PartDesign::Face, PartDesign::Fillet, PartDesign::Hole, PartDesign::MainPart, PartDesign::Pad, PartDesign::PatternRectangular, PartDesign::Pocket, PartDesign::Revolution, PartDesign::SketchBased, PartDesign::Subtractive, Sketcher::SketchObject, and Sketcher::SketchObjectSF.
Definition at line 49 of file PartFeature.cpp.
PyObject * Feature::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 App::DocumentObject.
Reimplemented in Sketcher::SketchObject.
Definition at line 71 of file PartFeature.cpp.
References Py::_None(), Py::Object::is(), Py::new_reference_to(), and App::DocumentObject::PythonObject.
Referenced by Part::ImportStepParts().
std::vector< PyObject * > Feature::getPySubObjects | ( | const std::vector< std::string > & | ) | const [virtual] |
its used to get the python sub objects by name (e.g. by the selection)
Reimplemented from App::DocumentObject.
Definition at line 80 of file PartFeature.cpp.
References Part::TopoShape::getPySubShape(), Part::PropertyPartShape::getShape(), and Shape.
Base::Type Part::Feature::getTypeId | ( | void | ) | const [virtual] |
Reimplemented from App::PropertyContainer.
Reimplemented in Drawing::FeatureProjection, Part::CustomFeature, Part::Chamfer, Part::Extrusion, Part::Fillet, Part::FeatureGeometrySet, Part::Mirroring, Part::Boolean, Part::Box, Part::Circle, Part::Common, Part::MultiCommon, Part::CurveNet, Part::Cut, Part::Fuse, Part::MultiFuse, Part::ImportBrep, Part::ImportIges, Part::ImportStep, Part::Polygon, Part::Section, Part::Revolution, Part::Part2DObject, Part::FeatureExt, Part::RuledSurface, Part::Loft, Part::Primitive, Part::Vertex, Part::Plane, Part::Sphere, Part::Ellipsoid, Part::Cylinder, Part::Cone, Part::Torus, Part::Helix, Part::Wedge, PartDesign::Feature, PartDesign::Additive, PartDesign::Chamfer, PartDesign::DressUp, PartDesign::Face, PartDesign::Fillet, PartDesign::Hole, PartDesign::MainPart, PartDesign::Pad, PartDesign::PatternRectangular, PartDesign::Pocket, PartDesign::Revolution, PartDesign::SketchBased, PartDesign::Subtractive, Sketcher::SketchObject, and Sketcher::SketchObjectSF.
Definition at line 49 of file PartFeature.cpp.
Referenced by Sketcher::SketchObject::execute().
const char * Feature::getViewProviderName | ( | void | ) | const [virtual] |
returns the type name of the ViewProvider
Reimplemented from App::DocumentObject.
Reimplemented in Part::CustomFeature, Part::Chamfer, Part::Extrusion, Part::Fillet, Part::FeatureGeometrySet, Part::Mirroring, Part::Boolean, Part::Box, Part::MultiCommon, Part::CurveNet, Part::MultiFuse, Part::ImportBrep, Part::ImportIges, Part::ImportStep, Part::Part2DObject, Part::FeatureExt, Part::Ellipsoid, PartDesign::Chamfer, PartDesign::Fillet, PartDesign::Hole, PartDesign::Pad, PartDesign::PatternRectangular, PartDesign::Pocket, PartDesign::Revolution, and Sketcher::SketchObject.
Definition at line 129 of file PartFeature.cpp.
void Part::Feature::init | ( | void | ) | [static] |
Reimplemented from App::PropertyContainer.
Reimplemented in Drawing::FeatureProjection, Part::CustomFeature, Part::Chamfer, Part::Extrusion, Part::Fillet, Part::FeatureGeometrySet, Part::Mirroring, Part::Boolean, Part::Box, Part::Circle, Part::Common, Part::MultiCommon, Part::CurveNet, Part::Cut, Part::Fuse, Part::MultiFuse, Part::ImportBrep, Part::ImportIges, Part::ImportStep, Part::Polygon, Part::Section, Part::Revolution, Part::Part2DObject, Part::FeatureExt, Part::RuledSurface, Part::Loft, Part::Primitive, Part::Vertex, Part::Plane, Part::Sphere, Part::Ellipsoid, Part::Cylinder, Part::Cone, Part::Torus, Part::Helix, Part::Wedge, PartDesign::Feature, PartDesign::Additive, PartDesign::Chamfer, PartDesign::DressUp, PartDesign::Face, PartDesign::Fillet, PartDesign::Hole, PartDesign::MainPart, PartDesign::Pad, PartDesign::PatternRectangular, PartDesign::Pocket, PartDesign::Revolution, PartDesign::SketchBased, PartDesign::Subtractive, Sketcher::SketchObject, and Sketcher::SketchObjectSF.
Definition at line 49 of file PartFeature.cpp.
Referenced by initPart().
short Feature::mustExecute | ( | void | ) | const [virtual] |
mustExecute We call this method to check if the object was modified to be invoked.
If the object label or an argument is modified. If we must recompute the object - to call the method execute(). 0: no recompution is needed 1: recompution needed -1: the document examine all links of this object and if one is touched -> recompute
Reimplemented from App::DocumentObject.
Reimplemented in Part::CustomFeature, Part::Chamfer, Part::Extrusion, Part::Fillet, Part::Mirroring, Part::Boolean, Part::Box, Part::Circle, Part::MultiCommon, Part::CurveNet, Part::MultiFuse, Part::ImportBrep, Part::ImportIges, Part::ImportStep, Part::Polygon, Part::Revolution, Part::RuledSurface, Part::Loft, Part::Primitive, Part::Vertex, Part::Plane, Part::Sphere, Part::Ellipsoid, Part::Cylinder, Part::Cone, Part::Torus, Part::Helix, Part::Wedge, PartDesign::Chamfer, PartDesign::Face, PartDesign::Fillet, PartDesign::MainPart, PartDesign::Pad, PartDesign::Pocket, PartDesign::Revolution, and Sketcher::SketchObjectSF.
Definition at line 61 of file PartFeature.cpp.
void Feature::onChanged | ( | const App::Property * | prop | ) | [protected, virtual] |
get called by the container when a property was changed
Reimplemented from App::DocumentObject.
Reimplemented in Part::Mirroring, Part::Box, Part::Circle, Part::RuledSurface, Part::Loft, Part::Primitive, Part::Vertex, Part::Wedge, and Sketcher::SketchObject.
Definition at line 91 of file PartFeature.cpp.
References Base::Placement::fromMatrix(), Part::PropertyPartShape::getShape(), Part::TopoShape::getTransform(), App::DocumentObject::isRecomputing(), draftTools::p, App::GeoFeature::Placement, Part::TopoShape::setTransform(), and Shape.
Definition at line 49 of file PartFeature.h.
Referenced by CmdSketcherMapSketch::activated(), CmdSketcherNewSketch::activated(), CmdPartDesignRevolution::activated(), CmdPartDesignPocket::activated(), CmdPartDesignPad::activated(), CmdPartRuledSurface::activated(), PartGui::DlgExtrusion::apply(), PartGui::CrossSections::apply(), Sketcher::SketchObject::execute(), Part::Wedge::execute(), Part::Helix::execute(), Part::Torus::execute(), Part::Cone::execute(), Part::Cylinder::execute(), Part::Ellipsoid::execute(), Part::Sphere::execute(), Part::Plane::execute(), Part::Vertex::execute(), Part::Loft::execute(), Part::RuledSurface::execute(), Inspection::Feature::execute(), PartDesign::Revolution::execute(), Part::Revolution::execute(), Drawing::FeatureProjection::execute(), PartDesign::Pocket::execute(), Part::Polygon::execute(), Part::ImportStep::execute(), Part::ImportIges::execute(), Part::ImportBrep::execute(), Part::MultiFuse::execute(), Part::CurveNet::execute(), Part::MultiCommon::execute(), Part::Circle::execute(), Part::Box::execute(), Part::Boolean::execute(), PartDesign::Pad::execute(), Part::Mirroring::execute(), Part::FeatureGeometrySet::execute(), PartDesign::Fillet::execute(), Part::Fillet::execute(), PartDesign::Face::execute(), Part::Extrusion::execute(), Part::Chamfer::execute(), Robot::Edge2TracObject::execute(), exporter(), getPySubObjects(), Part::ImportIgesParts(), Part::ImportStepParts(), onChanged(), Part::Box::onChanged(), Part::Box::Restore(), PartGui::ViewProviderMirror::setEdit(), and show().