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); }
void ProfileBased::transformPlacement(const Base::Placement &transform) { Part::Feature* feat = getBaseObject(/* silent = */ true); if (feat) { feat->transformPlacement(transform); } else { Part::Part2DObject *sketch = getVerifiedSketch(); sketch->transformPlacement(transform); } positionByPrevious(); }
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(); } }