Part::Part2DObject Class Reference

2D Shape This is a specialiced version of the PartShape for use with flat (2D) geometry. More...

#include <Part2DObject.h>

Inheritance diagram for Part::Part2DObject:
Part::Feature App::GeoFeature App::DocumentObject App::PropertyContainer Base::Persistence Base::BaseClass PartDesign::Face Sketcher::SketchObject Sketcher::SketchObjectSF

List of all members.

Public Member Functions

virtual Base::Type getTypeId (void) const
 Part2DObject ()
methods overide Feature



App::DocumentObjectExecReturnexecute (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::PropertyDatagetPropertyData (void) const

Static Protected Member Functions

static const App::PropertyDatagetPropertyDataPtr (void)

Detailed Description

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.


Constructor & Destructor Documentation

Part2DObject::Part2DObject (  ) 

Definition at line 58 of file Part2DObject.cpp.

References ADD_PROPERTY_TYPE, and App::Prop_None.


Member Function Documentation

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]
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().


Member Data Documentation


The documentation for this class was generated from the following files:

Generated on Wed Nov 23 19:02:36 2011 for FreeCAD by  doxygen 1.6.1