Sketcher: Enable positioning of sketches with the manual alignment tool
This commit is contained in:
parent
85585cf49e
commit
1f51ebf8cf
|
@ -186,6 +186,16 @@ void Part2DObject::positionBySupport(void)
|
||||||
Placement.setValue(Base::Placement(mtrx));
|
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
|
int Part2DObject::getAxisCount(void) const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -68,6 +68,10 @@ public:
|
||||||
* postion of the 2D shape on the supporting Face
|
* postion of the 2D shape on the supporting Face
|
||||||
*/
|
*/
|
||||||
void positionBySupport(void);
|
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)
|
/// returns the number of construction lines (to be used as axes)
|
||||||
virtual int getAxisCount(void) const;
|
virtual int getAxisCount(void) const;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user