PartDesign: Enable manual alignment tool for PartDesign features
This commit is contained in:
@@ -116,6 +116,19 @@ void SketchBased::positionBySketch(void)
|
||||
}
|
||||
}
|
||||
|
||||
void SketchBased::transformPlacement(const Base::Placement &transform)
|
||||
{
|
||||
Part::Part2DObject *sketch = static_cast<Part::Part2DObject*>(Sketch.getValue());
|
||||
if (sketch && sketch->getTypeId().isDerivedFrom(Part::Part2DObject::getClassTypeId())) {
|
||||
Part::Feature *part = static_cast<Part::Feature*>(sketch->Support.getValue());
|
||||
if (part && part->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId()))
|
||||
part->transformPlacement(transform);
|
||||
else
|
||||
sketch->transformPlacement(transform);
|
||||
positionBySketch();
|
||||
}
|
||||
}
|
||||
|
||||
Part::Part2DObject* SketchBased::getVerifiedSketch() const {
|
||||
App::DocumentObject* result = Sketch.getValue();
|
||||
if (!result)
|
||||
|
||||
@@ -57,6 +57,10 @@ public:
|
||||
* or its support if it has one
|
||||
*/
|
||||
void positionBySketch(void);
|
||||
/** applies a transform on the Placement of the Sketch or its
|
||||
* support if it has one
|
||||
*/
|
||||
virtual void transformPlacement(const Base::Placement &transform);
|
||||
|
||||
/// Verifies the linked Sketch object
|
||||
Part::Part2DObject* getVerifiedSketch() const;
|
||||
|
||||
Reference in New Issue
Block a user