boost::shared_ptr<ModelAPI_AttributeRefAttr> aRef =
boost::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(data()->attribute(SketchPlugin_Constraint::ENTITY_A()));
- FeaturePtr aFeature = aRef->feature();
+ ObjectPtr aFeature = aRef->object();
if (aFeature) {
// set length value
boost::shared_ptr<GeomDataAPI_Point2D> aPoint1 =
boost::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(data()->attribute(SketchPlugin_Constraint::ENTITY_A()));
if (!anAttr)
return thePrevious;
- FeaturePtr aFeature = anAttr->feature();
+ FeaturePtr aFeature = boost::dynamic_pointer_cast<ModelAPI_Feature>(anAttr->object());
if (!aFeature || aFeature->getKind() != SketchPlugin_Line::ID())
return thePrevious;