2D Shape This is a specialiced version of the PartShape for use with flat (2D) geometry. More...
#include <Part2DObject.h>
Public Member Functions | |
virtual Base::Type | getTypeId (void) const |
Part2DObject () | |
methods overide Feature | |
App::DocumentObjectExecReturn * | execute (void) |
recalculate the Feature | |
const char * | getViewProviderName (void) const |
returns the type name of the ViewProvider | |
Static Public Member Functions | |
static void * | create (void) |
static Base::Type | getClassTypeId (void) |
static void | init (void) |
static Base::Placement | positionBySupport (const TopoDS_Face &face, const Base::Placement &Place) |
calculate a position out of a support face this methode will calculate the position of the 2D shape on a supporting Face. | |
static bool | seekTrimPoints (const std::vector< Geometry * > &geomlist, int GeoId, const Base::Vector3d &point, int &GeoId1, Base::Vector3d &intersect1, int &GeoId2, Base::Vector3d &intersect2) |
calculate the points where a curve with index GeoId should be trimmed with respect to the rest of the curves contained in the list geomlist and a picked point. | |
Public Attributes | |
App::PropertyLinkSub | Support |
if the 2DObject lies on the Face of an other object this links to it | |
Protected Member Functions | |
virtual const App::PropertyData & | getPropertyData (void) const |
Static Protected Member Functions | |
static const App::PropertyData * | getPropertyDataPtr (void) |
2D Shape This is a specialiced version of the PartShape for use with flat (2D) geometry.
The Z direction has always to be 0. The position and orientation of the Plane this 2D geometry is referenced is defined by the Placement property. It also has a link to a supporting Face which defines the position in space where it is located. If the support is changed the static methode positionBySupport() is used to calculate a new position for the Part2DObject. This object can be used stand alone or for constraint geometry as its descend Sketcher::SketchObject .
Definition at line 51 of file Part2DObject.h.
Part2DObject::Part2DObject | ( | ) |
Definition at line 58 of file Part2DObject.cpp.
References ADD_PROPERTY_TYPE, and App::Prop_None.
void * Part::Part2DObject::create | ( | void | ) | [static] |
Reimplemented from Part::Feature.
Reimplemented in PartDesign::Face, Sketcher::SketchObject, and Sketcher::SketchObjectSF.
Definition at line 55 of file Part2DObject.cpp.
App::DocumentObjectExecReturn * Part2DObject::execute | ( | void | ) | [virtual] |
recalculate the Feature
Reimplemented from Part::Feature.
Reimplemented in PartDesign::Face, Sketcher::SketchObject, and Sketcher::SketchObjectSF.
Definition at line 64 of file Part2DObject.cpp.
References App::DocumentObject::StdReturn.
Base::Type Part::Part2DObject::getClassTypeId | ( | void | ) | [static] |
Reimplemented from Part::Feature.
Reimplemented in PartDesign::Face, Sketcher::SketchObject, and Sketcher::SketchObjectSF.
Definition at line 55 of file Part2DObject.cpp.
Referenced by CmdPartDesignRevolution::activated(), CmdPartDesignPocket::activated(), CmdPartDesignPad::activated(), PartDesign::Revolution::execute(), PartDesign::Pocket::execute(), PartDesign::Pad::execute(), and PartDesign::Face::execute().
const App::PropertyData & Part::Part2DObject::getPropertyData | ( | void | ) | const [protected, virtual] |
Reimplemented from Part::Feature.
Reimplemented in PartDesign::Face, Sketcher::SketchObject, and Sketcher::SketchObjectSF.
Definition at line 55 of file Part2DObject.cpp.
const App::PropertyData * Part::Part2DObject::getPropertyDataPtr | ( | void | ) | [static, protected] |
Reimplemented from Part::Feature.
Reimplemented in PartDesign::Face, Sketcher::SketchObject, and Sketcher::SketchObjectSF.
Definition at line 55 of file Part2DObject.cpp.
Base::Type Part::Part2DObject::getTypeId | ( | void | ) | const [virtual] |
Reimplemented from Part::Feature.
Reimplemented in PartDesign::Face, Sketcher::SketchObject, and Sketcher::SketchObjectSF.
Definition at line 55 of file Part2DObject.cpp.
const char* Part::Part2DObject::getViewProviderName | ( | void | ) | const [inline, virtual] |
returns the type name of the ViewProvider
Reimplemented from Part::Feature.
Reimplemented in Sketcher::SketchObject.
Definition at line 89 of file Part2DObject.h.
void Part::Part2DObject::init | ( | void | ) | [static] |
Reimplemented from Part::Feature.
Reimplemented in PartDesign::Face, Sketcher::SketchObject, and Sketcher::SketchObjectSF.
Definition at line 55 of file Part2DObject.cpp.
Referenced by initPart().
Base::Placement Part2DObject::positionBySupport | ( | const TopoDS_Face & | face, | |
const Base::Placement & | Place | |||
) | [static] |
calculate a position out of a support face this methode will calculate the position of the 2D shape on a supporting Face.
The Normal(Orientation) get extracted from the Face and for the position an educated guess is made, by examining the placement of the support object (not only the face). If the support is changed this methode is called do determine a new postion of the 2D shape on the supporting Face
Definition at line 70 of file Part2DObject.cpp.
References Base::Placement::getPosition(), Handle(), FemExample::m, draftTools::p, App::GeoFeature::Placement, draftTools::plane, RobotExample::pos, and scale.
Referenced by Sketcher::SketchObject::execute().
bool Part2DObject::seekTrimPoints | ( | const std::vector< Geometry * > & | geomlist, | |
int | GeoId, | |||
const Base::Vector3d & | point, | |||
int & | GeoId1, | |||
Base::Vector3d & | intersect1, | |||
int & | GeoId2, | |||
Base::Vector3d & | intersect2 | |||
) | [static] |
calculate the points where a curve with index GeoId should be trimmed with respect to the rest of the curves contained in the list geomlist and a picked point.
The outputs intersect1 and intersect2 specify the tightest boundaries for trimming around the picked point and the indexes GeoId1 and GeoId2 specify the corresponding curves that intersect the curve GeoId.
Definition at line 167 of file Part2DObject.cpp.
References Py::abs(), StartPage::StartPage::handle(), Py::int, draftTools::p, draftTools::plane, Base::Vector3< _Precision >::x, and Base::Vector3< _Precision >::y.
Referenced by Sketcher::SketchObject::trim().
if the 2DObject lies on the Face of an other object this links to it
Definition at line 59 of file Part2DObject.h.
Referenced by CmdPartDesignRevolution::activated(), CmdPartDesignPocket::activated(), CmdPartDesignPad::activated(), Sketcher::SketchObjectPy::addExternal(), Sketcher::SketchObject::addExternal(), Sketcher::SketchObject::execute(), PartDesignGui::ViewProviderRevolution::onDelete(), PartDesignGui::ViewProviderPocket::onDelete(), PartDesignGui::ViewProviderPad::onDelete(), PartDesignGui::TaskDlgRevolutionParameters::reject(), PartDesignGui::TaskDlgPocketParameters::reject(), PartDesignGui::TaskDlgPadParameters::reject(), SketcherGui::SketchSelection::setUp(), and PartDesignGui::TaskPadParameters::TaskPadParameters().