Sketcher: Enable positioning of sketches with the manual alignment tool

This commit is contained in:
logari81 2012-12-09 18:17:02 +01:00 committed by wmayer
parent 85585cf49e
commit 1f51ebf8cf
2 changed files with 14 additions and 0 deletions

View File

@ -186,6 +186,16 @@ void Part2DObject::positionBySupport(void)
Placement.setValue(Base::Placement(mtrx));
}
void Part2DObject::transformPlacement(const Base::Placement &transform)
{
Part::Feature *part = static_cast<Part::Feature*>(Support.getValue());
if (part && part->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId())) {
part->transformPlacement(transform);
positionBySupport();
} else
GeoFeature::transformPlacement(transform);
}
int Part2DObject::getAxisCount(void) const
{
return 0;

View File

@ -68,6 +68,10 @@ public:
* postion of the 2D shape on the supporting Face
*/
void positionBySupport(void);
/** applies a transform on the Placement of the Sketch or its
* support if it has one
*/
virtual void transformPlacement(const Base::Placement &transform);
/// returns the number of construction lines (to be used as axes)
virtual int getAxisCount(void) const;