-// Copyright (C) 2014-2019 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2021 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
}
}
else if (anAttrType == ModelAPI_AttributeSelection::typeId()) {
- AttributeSelectionPtr anAttr =
+ AttributeSelectionPtr anAttrSel =
std::dynamic_pointer_cast<ModelAPI_AttributeSelection>(theAttribute);
- ResultPtr aContext = anAttr->context();
- FeaturePtr aContextFeature = anAttr->contextFeature();
- GeomShapePtr aShape = anAttr->value();
+ ResultPtr aContext = anAttrSel->context();
+ FeaturePtr aContextFeature = anAttrSel->contextFeature();
+ GeomShapePtr aShape = anAttrSel->value();
// Check selection attributes
anAttrs = aFeature->data()->attributes(ModelAPI_AttributeSelection::typeId());
}
}
else if (anAttrType == ModelAPI_AttributeReference::typeId()) {
- AttributeReferencePtr anAttr =
+ AttributeReferencePtr anAttrRef =
std::dynamic_pointer_cast<ModelAPI_AttributeReference>(theAttribute);
- ObjectPtr anObject = anAttr->value();
+ ObjectPtr anObject = anAttrRef->value();
// Check selection attributes
anAttrs = aFeature->data()->attributes(ModelAPI_AttributeReference::typeId());
if (anAttrs.size() > 0) {
return false;
}
}
- return true;
}
+ return true;
}
}
else if(anAttrType == ModelAPI_AttributeSelectionList::typeId()) {
// there is a check whether the feature contains a point and a linear edge or two point values
std::string aParamA = theArguments.front();
- SessionPtr aMgr = ModelAPI_Session::get();
- ModelAPI_ValidatorsFactory* aFactory = aMgr->validators();
FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(theAttribute->owner());
AttributeRefAttrPtr aRefAttr = std::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(theAttribute);
AttributePtr aAR = aRAttr->attr();
if (aAR->id() != SketchPlugin_Arc::CENTER_ID()) // ignore constraint to center of arc
aCoinList.insert(aConstrFeature);
- QList<bool> anIsAttributes;
- PartSet_Tools::findCoincidences(aConstrFeature, aCoinsideLines, aCoins,
- SketchPlugin_ConstraintCoincidence::ENTITY_A(),
- anIsAttributes);
- PartSet_Tools::findCoincidences(aConstrFeature, aCoinsideLines, aCoins,
- SketchPlugin_ConstraintCoincidence::ENTITY_B(),
- anIsAttributes);
+ QList<bool> anIsAttributes;
+ PartSet_Tools::findCoincidences(aConstrFeature, aCoinsideLines, aCoins,
+ SketchPlugin_ConstraintCoincidence::ENTITY_A(),
+ anIsAttributes);
+ PartSet_Tools::findCoincidences(aConstrFeature, aCoinsideLines, aCoins,
+ SketchPlugin_ConstraintCoincidence::ENTITY_B(),
+ anIsAttributes);
}
}
// if there is no coincidence then it is not valid