+ else if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_GET_DOF_OBJECTS)) {
+ std::shared_ptr<ModelAPI_ObjectUpdatedMessage> anUpdateMsg =
+ std::dynamic_pointer_cast<ModelAPI_ObjectUpdatedMessage>(theMessage);
+ std::set<ObjectPtr> aObjects = anUpdateMsg->objects();
+ if (aObjects.size() == 1) {
+ std::set<ObjectPtr>::const_iterator aIt;
+ for (aIt = aObjects.cbegin(); aIt != aObjects.cend(); aIt++) {
+ CompositeFeaturePtr aFeature =
+ std::dynamic_pointer_cast<ModelAPI_CompositeFeature>(*aIt);
+ if (aFeature) {
+ SketchGroupPtr aGroup = findGroup(aFeature);
+
+ std::set<ObjectPtr> aFreeFeatures;
+ aGroup->underconstrainedFeatures(aFreeFeatures);
+
+ std::list<ObjectPtr> aFeatures;
+ std::set<ObjectPtr>::const_iterator aIt;
+ for (aIt = aFreeFeatures.cbegin(); aIt != aFreeFeatures.cend(); ++aIt) {
+ aFeatures.push_back(*aIt);
+ }
+
+ // send features to GUI
+ static const Events_ID anEvent = Events_Loop::eventByName(EVENT_DOF_OBJECTS);
+ ModelAPI_EventCreator::get()->sendUpdated(aFeatures, anEvent);
+ Events_Loop::loop()->flush(anEvent);
+ }
+ }
+ }
+ }