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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user