1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
puts "============"
puts "OCC26155"
puts "============"
puts ""
###################################################################################
# TNaming, CurrentShape: order of shapes in Modification compound is unpredictable.
###################################################################################
pload QAcommands
NewDocument D MDTV-Standard
set x_ref 0.0
set x_tol 0.1
set result 1
for {set i 1} {$i <= 50} {incr i} {
set lab $i:1
box b 0 0 0 10 10 10
box b_1 0 0 0 5 10 10
box b_2 5 0 0 5 10 10
BuildNamedShape D [set lab]:1 PRIMITIVE b
BuildNamedShape D [set lab]:1:1 MODIFY b b_1
BuildNamedShape D [set lab]:1:2 MODIFY b b_2
CurrentShape D "[set lab]:1" r
explode r so
regexp {X += +([-0-9.+eE]+)} [vprops r_1 $x_tol] full x_1
if { $x_ref == 0 } {
set x_ref $x_1
} elseif { [expr abs ($x_1 - $x_ref)] > $x_tol } {
puts "Error: order of components of modified shape compound is not permanent."
break
}
}
|