std::set<AttributePtr>::const_iterator aIt;
for (aIt = aRefsList.cbegin(); aIt != aRefsList.cend(); ++aIt) {
FeaturePtr aConstrFeature = std::dynamic_pointer_cast<ModelAPI_Feature>((*aIt)->owner());
- if (aConstrFeature && aConstrFeature->getKind() == SketchPlugin_ConstraintCoincidence::ID())
+ if (aConstrFeature && (aConstrFeature->getKind() == SketchPlugin_ConstraintCoincidence::ID() ||
+ aConstrFeature->getKind() == SketchPlugin_ConstraintCoincidenceInternal::ID()))
aCoincident.insert(aConstrFeature);
}
return aCoincident;
theDimPrs->setColor(aColor[0], aColor[1], aColor[2]);
}
+void replaceInName(ObjectPtr theObject, const std::string& theSource, const std::string& theDest)
+{
+ std::string aName = theObject->data()->name();
+ size_t aPos = aName.find(theSource);
+ if (aPos != std::string::npos) {
+ std::string aNewName = aName.substr(0, aPos) + theDest
+ + aName.substr(aPos + theSource.size());
+ theObject->data()->setName(aNewName);
+ }
+}
+
} // namespace SketchPlugin_Tools