-
- /*
- TNaming_NewShapeIterator aModifIter(aPairIter.NewShape(), aContLab);
- if (aModifIter.More()) aModifIter.Next(); // skip this shape result
- for(; aModifIter.More(); aModifIter.Next()) {
- ResultPtr aModifierObj = std::dynamic_pointer_cast<ModelAPI_Result>
- (aDoc->objects()->object(aModifIter.Label().Father()));
- if (!aModifierObj.get())
- break;
- FeaturePtr aModifierFeat = aDoc->feature(aModifierObj);
- if (!aModifierFeat.get())
- break;
- if (aModifierFeat == aThisFeature || aDoc->objects()->isLater(aModifierFeat, aThisFeature))
- break; // the modifier feature is later than this, so, should not be used
- Handle(TNaming_NamedShape) aNewNS = aModifIter.NamedShape();
- if (aNewNS->Evolution() == TNaming_MODIFY || aNewNS->Evolution() == TNaming_GENERATED) {
- aModifierResFound = aModifierObj;
- } else if (aNewNS->Evolution() == TNaming_DELETE) { // a shape was deleted => result is null
- ResultPtr anEmptyContext;
- std::shared_ptr<GeomAPI_Shape> anEmptyShape;
- setValue(anEmptyContext, anEmptyShape); // nullify the selection
- return;
- } else { // not-precessed modification => don't support it
- break;
- }
- }
- // already found what is needed, don't iterate the next pair since normally
- if (aModifierResFound.get()) // there must be only one pair in the result-shape
- break;
- */