boost::shared_ptr<ModelAPI_AttributeRefAttr> aRef =
boost::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(data()->attribute(SketchPlugin_Constraint::ENTITY_A()));
- FeaturePtr aFeature = boost::dynamic_pointer_cast<ModelAPI_Feature>(aRef->object());
+ FeaturePtr aFeature = SketchPlugin_Sketch::getFeature(aRef->object());
if (aFeature) {
double aRadius = 0;
boost::shared_ptr<ModelAPI_Data> aData = aFeature->data();
boost::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(aData->attribute(SketchPlugin_Constraint::ENTITY_A()));
if (!anAttr)
return thePrevious;
- FeaturePtr aFeature = boost::dynamic_pointer_cast<ModelAPI_Feature>(anAttr->object());
+ FeaturePtr aFeature = SketchPlugin_Sketch::getFeature(anAttr->object());
std::string aKind = aFeature ? aFeature->getKind() : "";
if (aKind != SketchPlugin_Circle::ID() && aKind != SketchPlugin_Arc::ID())
return thePrevious;
boost::shared_ptr<ModelAPI_AttributeRefAttr> aRef =
boost::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(data()->attribute(SketchPlugin_Constraint::ENTITY_A()));
- FeaturePtr aFeature = boost::dynamic_pointer_cast<ModelAPI_Feature>(aRef->object());
+ FeaturePtr aFeature = SketchPlugin_Sketch::getFeature(aRef->object());
if (!aFeature)
return;
std::string aCenterAttrName;