theConstraint->data()->attribute(SketchPlugin_Constraint::ATTRIBUTE(indAttr))
);
if (!anAttr) continue;
- if (anAttr->isFeature() && anAttr->feature())
+ if (anAttr->isObject() && anAttr->object())
{ // verify posiible entities
- const std::string& aKind = anAttr->feature()->getKind();
+ const std::string& aKind = boost::dynamic_pointer_cast<ModelAPI_Feature>
+ (anAttr->object())->getKind();
if (aKind.compare(SketchPlugin_Point::ID()) == 0)
{
myAttributesList[aNbPoints++] = SketchPlugin_Constraint::ATTRIBUTE(indAttr);
theConstraint->data()->attribute(SketchPlugin_Constraint::ATTRIBUTE(indAttr))
);
if (!anAttr) continue;
- if (anAttr->isFeature() && anAttr->feature() &&
- anAttr->feature()->getKind().compare(SketchPlugin_Line::ID()) == 0)
+ if (anAttr->isObject() && anAttr->object() &&
+ boost::dynamic_pointer_cast<ModelAPI_Feature>(anAttr->object())->getKind().
+ compare(SketchPlugin_Line::ID()) == 0)
{
myAttributesList[aNbLines++] = SketchPlugin_Constraint::ATTRIBUTE(indAttr);
break;
boost::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(
theConstraint->data()->attribute(SketchPlugin_Constraint::ATTRIBUTE(indAttr))
);
- if (!anAttr || !anAttr->isFeature() || !anAttr->feature()) continue;
- const std::string& aKind = anAttr->feature()->getKind();
+ if (!anAttr || !anAttr->isObject() || !anAttr->object()) continue;
+ const std::string& aKind = boost::dynamic_pointer_cast<ModelAPI_Feature>
+ (anAttr->object())->getKind();
if (aKind.compare(SketchPlugin_Line::ID()) == 0)
{
myAttributesList[aNbEntities++] = SketchPlugin_Constraint::ATTRIBUTE(indAttr);
boost::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(
theConstraint->data()->attribute(SketchPlugin_Constraint::ATTRIBUTE(indAttr))
);
- if (!anAttr || !anAttr->isFeature() || !anAttr->feature()) continue;
- const std::string& aKind = anAttr->feature()->getKind();
+ if (!anAttr || !anAttr->isObject() || !anAttr->object()) continue;
+ const std::string& aKind = boost::dynamic_pointer_cast<ModelAPI_Feature>
+ (anAttr->object())->getKind();
if (aKind.compare(SketchPlugin_Circle::ID()) == 0 || aKind.compare(SketchPlugin_Arc::ID()) == 0)
{
myAttributesList[aNbEntities++] = SketchPlugin_Constraint::ATTRIBUTE(indAttr);