File: bug26155

package info (click to toggle)
oce 0.18.3-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 301,548 kB
  • sloc: cpp: 1,190,609; ansic: 67,225; sh: 11,630; tcl: 7,954; cs: 5,221; python: 2,867; java: 1,522; makefile: 342; xml: 292; perl: 37
file content (37 lines) | stat: -rw-r--r-- 975 bytes parent folder | download | duplicates (3)
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
  }
}