-void PartSet_OperationEditFeature::moveLinePoint(FeaturePtr theFeature,
- double theDeltaX, double theDeltaY,
- const std::string& theAttribute)
-{
- if (!theFeature || theFeature->getKind() != SKETCH_LINE_KIND)
- return;
-
- boost::shared_ptr<ModelAPI_Data> aData = theFeature->data();
- if (!aData->isValid())
- return;
- boost::shared_ptr<GeomDataAPI_Point2D> aPoint =
- boost::dynamic_pointer_cast<GeomDataAPI_Point2D>(aData->attribute(theAttribute));
-
- aPoint->setValue(aPoint->x() + theDeltaX, aPoint->y() + theDeltaY);
-}
-