mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +03:00
0029282: Data Exchange - UpdateAssemblies is not working for located root assemblies
Add check for located root assemblies.
This commit is contained in:
parent
98b3765966
commit
b2e3ec8d1c
@ -998,8 +998,12 @@ void XCAFDoc_ShapeTool::UpdateAssemblies()
|
|||||||
// Iterate over the free shapes
|
// Iterate over the free shapes
|
||||||
for ( TDF_LabelSequence::Iterator anIt(aRootLabels); anIt.More(); anIt.Next() )
|
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;
|
TopoDS_Shape anAssemblyShape;
|
||||||
updateComponent(aRootLab, anAssemblyShape);
|
updateComponent(aRootLab, anAssemblyShape);
|
||||||
}
|
}
|
||||||
|
32
tests/bugs/xde/bug29282
Normal file
32
tests/bugs/xde/bug29282
Normal 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
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user