}
}
-void updateMultiAttribute(const AttributePtr& theFirstAngleAttribute,
- const AttributePtr& theSecondAngleAttribute,
- const int& theValue,
- const bool toMultiply)
-{
- if (theValue == 0 || !theFirstAngleAttribute->isInitialized())
- return;
-
- AttributeDoublePtr aDoubleFirstAttr = std::dynamic_pointer_cast<ModelAPI_AttributeDouble>(
- theFirstAngleAttribute);
- double aValue = aDoubleFirstAttr->value();
-
- AttributeDoublePtr aDoubleSecondAttr = std::dynamic_pointer_cast<ModelAPI_AttributeDouble>(
- theSecondAngleAttribute);
- if (toMultiply)
- aDoubleSecondAttr->setValue(aValue*theValue);
- else
- aDoubleSecondAttr->setValue(aValue/theValue);
-}
-
} // namespace SketchPlugin_Tools