if (myIsFullyConstrained) {
FeaturePtr aFeature = ModelAPI_Feature::feature(theObject);
// only entity features has custom color when sketch is fully constrained
- if (aFeature.get() && PartSet_SketcherMgr::isEntity(aFeature->getKind())) {
+ if (aFeature.get() && PartSet_SketcherMgr::isEntity(aFeature->getKind()) &&
+ !PartSet_SketcherMgr::isExternalFeature(aFeature)) {
PartSet_Module* aModule = module();
CompositeFeaturePtr aSketch = aModule->sketchMgr()->activeSketch();
// the given object is sub feature of the current sketch(created or edited)
(theId == SketchPlugin_Circle::ID());
}
+bool PartSet_SketcherMgr::isExternalFeature(const FeaturePtr& theFeature)
+{
+ std::shared_ptr<SketchPlugin_Feature> aSPFeature =
+ std::dynamic_pointer_cast<SketchPlugin_Feature>(theFeature);
+ return aSPFeature.get() && aSPFeature->isExternal();
+}
+
bool PartSet_SketcherMgr::isDistanceOperation(ModuleBase_Operation* theOperation)
{
std::string anId = theOperation ? theOperation->id().toStdString() : "";
/// \return a boolean value
static bool isEntity(const std::string& theId);
+ /// Returns whether the feature has external attribute filled with 'true' value
+ /// \param theFeature a feature object
+ /// \return a boolean value
+ static bool isExternalFeature(const FeaturePtr& theFeature);
+
/// Returns whether the current operation is a sketch distance - lenght, distance or radius
/// \param theOperation the operation
/// \return a boolean value