Integration part of tests of grid chl
[occt.git] / tests / bugs / moddata / bug60852
CommitLineData
0e94a94e 1
2puts "========"
3puts "BUC60852"
4puts "BUC60923"
5puts "========"
6
7pload QAcommands
8
9set bndbox_X1 0
10set bndbox_Y1 0
11set bndbox_Z1 0
12set bndbox_X2 30
13set bndbox_Y2 10
14set bndbox_Z2 20
15
16set point_1_1_X -20
17set point_1_1_Y -5
18set point_1_1_Z 10
19set point_1_2_X 50
20set point_1_2_Y 15
21set point_1_2_Z 10
22
23vertex vertex_1_1 $point_1_1_X $point_1_1_Y $point_1_1_Z
24vertex vertex_1_2 $point_1_2_X $point_1_2_Y $point_1_2_Z
25
26edge edge_1 vertex_1_1 vertex_1_2
27
28puts ""
29
30set point_2_1_X -20
31set point_2_1_Y -10
32set point_2_1_Z 10
33set point_2_2_X 50
34set point_2_2_Y -10
35set point_2_2_Z 10
36
37vertex vertex_2_1 $point_2_1_X $point_2_1_Y $point_2_1_Z
38vertex vertex_2_2 $point_2_2_X $point_2_2_Y $point_2_2_Z
39
40edge edge_2 vertex_2_1 vertex_2_2
41
42puts ""
43
44box bndbox $bndbox_X1 $bndbox_Y1 $bndbox_Z1 $bndbox_X2 $bndbox_Y2 $bndbox_Z2
45
46
47line 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
49line 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
51puts ""
52
53set result1 [BUC60852 edge_1 $bndbox_X1 $bndbox_Y1 $bndbox_Z1 $bndbox_X2 $bndbox_Y2 $bndbox_Z2]
54if {${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
60puts ""
61
62set result2 [BUC60852 edge_2 $bndbox_X1 $bndbox_Y1 $bndbox_Z1 $bndbox_X2 $bndbox_Y2 $bndbox_Z2]
63if {${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