1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0029716: Some TDF and XCAFDoc labels-related issues

1. "Descendants" closure mode is not taken into account by TDF closure tool
2. CopyTool always creates a new label at the target ignoring the relocation table
3. XCAFDoc_GraphNode throws an exception if Child of Father is not found during the unsetting
This commit is contained in:
drazmyslovich
2018-04-23 15:47:52 +02:00
committed by bugmaster
parent cf4bee7c0c
commit 6e7791948b
3 changed files with 85 additions and 32 deletions

View File

@@ -72,7 +72,8 @@ void TDF_ClosureTool::Closure
const TDF_Label& lab = labLItr.Value();
if (lab.HasAttribute())
TDF_ClosureTool::LabelAttributes(lab,labMap,attMap,aFilter,aMode);
TDF_ClosureTool::Closure(lab,labMap,attMap,aFilter,aMode);
if (aMode.Descendants())
TDF_ClosureTool::Closure(lab,labMap,attMap,aFilter,aMode);
}
}

View File

@@ -153,12 +153,25 @@ void TDF_CopyTool::CopyLabels
// Does the same for the children.
for (TDF_ChildIterator childItr(aSLabel); childItr.More(); childItr.Next()){
const TDF_Label& childSLab = childItr.Value();
if (aSrcLabelMap.Contains(childSLab)) {
TDF_Label childTIns = aTargetLabel.FindChild(childSLab.Tag());
aLabMap.Bind(childSLab,childTIns);
TDF_CopyTool::CopyLabels(childSLab,childTIns,
aLabMap,aAttMap,
aSrcLabelMap,aSrcAttributeMap);
if (aSrcLabelMap.Contains(childSLab))
{
TDF_Label childTIns;
if (aLabMap.IsBound (childSLab))
{
childTIns = aLabMap.Find (childSLab);
}
else
{
childTIns = aTargetLabel.FindChild (childSLab.Tag ());
aLabMap.Bind (childSLab, childTIns);
}
TDF_CopyTool::CopyLabels
(
childSLab,childTIns,
aLabMap,aAttMap,
aSrcLabelMap,aSrcAttributeMap
);
}
}
}