- //jfa:test//for (Standard_Integer i = 1; i <= aLen && !doComment; i++) {
- for (Standard_Integer i = 1; i <= aLen; i++) {
- Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(aSeq.Value(i));
- //jfa:test//if (aFunction.IsNull()) doComment = true;
- //jfa:test//else if (!theProcessed.Contains(aFunction)) doComment = true;
- if (aFunction.IsNull()) return;
- if (!theProcessed.Contains(aFunction)) return;
+ for (Standard_Integer i = 1; i <= aLen && !doNotProcess; i++) {
+ TDF_Label aRefLabel = aSeq.Value(i);
+ Handle(TDF_Reference) aRef;
+ if (!aRefLabel.FindAttribute(TDF_Reference::GetID(), aRef)) {
+ doNotProcess = true;
+ }
+ else {
+ if (aRef.IsNull() || aRef->Get().IsNull()) {
+ doNotProcess = true;
+ }
+ else {
+ Handle(TDataStd_TreeNode) aT;
+ if (!TDataStd_TreeNode::Find(aRef->Get(), aT)) {
+ doNotProcess = true;
+ }
+ else {
+ TDF_Label aDepLabel = aT->Label();
+ Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(aDepLabel);
+
+ if (aFunction.IsNull()) doNotProcess = true;
+ else if (!theProcessed.Contains(aDepLabel)) doNotProcess = true;
+ }
+ }
+ }