0029282: Data Exchange - UpdateAssemblies is not working for located root assemblies

Add check for located root assemblies.
This commit is contained in:
ika
2017-11-01 17:28:26 +03:00
committed by bugmaster
parent 98b3765966
commit b2e3ec8d1c
2 changed files with 38 additions and 2 deletions
+6 -2
View File
@@ -998,8 +998,12 @@ void XCAFDoc_ShapeTool::UpdateAssemblies()
// Iterate over the free shapes
for ( TDF_LabelSequence::Iterator anIt(aRootLabels); anIt.More(); anIt.Next() )
{
const TDF_Label& aRootLab = anIt.Value();
TDF_Label aRefLabel = anIt.Value();
if (IsReference(aRefLabel))
{
GetReferredShape(aRefLabel, aRefLabel);
}
const TDF_Label& aRootLab = aRefLabel;
TopoDS_Shape anAssemblyShape;
updateComponent(aRootLab, anAssemblyShape);
}
+32
View File
@@ -0,0 +1,32 @@
puts "=========="
puts "OCC29282"
puts "=========="
puts ""
###########################################################
# UpdateAssemblies is not worked for located root assemblies
###########################################################
pload DCAF
# create test Document
box b 1 1 1
compound b c
ttranslate c 0 1 0
XNewDoc D
XAddShape D c
# replace box by another one
box bb 2 1 1
XSetShape D 0:1:1:3 bb
XUpdateAssemblies D
XGetOneShape result D
# check results
set props [vprops result]
regexp {Mass +: +([-0-9.+eE]+).+} $props full mass
if {$mass != "2"} {
puts "Error: Assemblies are not updated."
}
Close D