Correction of unstable testing cases
[occt.git] / tests / bugs / moddata_1 / buc60852
1
2 puts "========"
3 puts "BUC60852"
4 puts "BUC60923"
5 puts "========"
6
7 pload QAcommands
8
9 set bndbox_X1 0
10 set bndbox_Y1 0
11 set bndbox_Z1 0
12 set bndbox_X2 30
13 set bndbox_Y2 10
14 set bndbox_Z2 20
15
16 set point_1_1_X -20
17 set point_1_1_Y -5
18 set point_1_1_Z 10
19 set point_1_2_X 50
20 set point_1_2_Y 15
21 set point_1_2_Z 10
22
23 vertex vertex_1_1 $point_1_1_X $point_1_1_Y $point_1_1_Z
24 vertex vertex_1_2 $point_1_2_X $point_1_2_Y $point_1_2_Z
25
26 edge edge_1 vertex_1_1 vertex_1_2
27
28 puts ""
29
30 set point_2_1_X -20
31 set point_2_1_Y -10
32 set point_2_1_Z 10
33 set point_2_2_X 50
34 set point_2_2_Y -10
35 set point_2_2_Z 10
36
37 vertex vertex_2_1 $point_2_1_X $point_2_1_Y $point_2_1_Z
38 vertex vertex_2_2 $point_2_2_X $point_2_2_Y $point_2_2_Z
39
40 edge edge_2 vertex_2_1 vertex_2_2
41
42 puts ""
43
44 box bndbox $bndbox_X1 $bndbox_Y1 $bndbox_Z1 $bndbox_X2 $bndbox_Y2 $bndbox_Z2
45
46
47 line line_1 $point_1_1_X $point_1_1_Y $point_1_1_Z [ expr { $point_1_1_X - $point_1_2_X } ] [ expr { $point_1_1_Y - $point_1_2_Y } ] [ expr { $point_1_1_Z - $point_1_2_Z } ]
48
49 line line_2 $point_2_1_X $point_2_1_Y $point_2_1_Z [ expr { $point_2_1_X - $point_2_2_X } ] [ expr { $point_2_1_Y - $point_2_2_Y } ] [ expr { $point_2_1_Z - $point_2_2_Z } ]
50
51 puts ""
52
53 set result1 [BUC60852 edge_1 $bndbox_X1 $bndbox_Y1 $bndbox_Z1 $bndbox_X2 $bndbox_Y2 $bndbox_Z2]
54 if {${result1} != "Line that lies on edge intersects the box\n"} {
55   puts "BUC60852: Error; (case 1)"
56 } else {
57   puts "BUC60852: OK; (case 1)"
58 }
59
60 puts ""
61
62 set result2 [BUC60852 edge_2 $bndbox_X1 $bndbox_Y1 $bndbox_Z1 $bndbox_X2 $bndbox_Y2 $bndbox_Z2]
63 if {${result2} != "Line that lies on edge does not intersect the box\n"} {
64   puts "BUC60852: Error; (case 2)"
65 } else {
66   puts "BUC60852: OK; (case 2)"
67 }
68