0024696: Lower performance of the new Edge/Edge intersection algorithm
[occt.git] / tests / caf / nam / A4
1 set Test "TNaming_Translator test"
2 set IsDone 1
3 set TestError ""
4
5 if {[catch {set TestLab}] == 1} {
6         NewDocument D
7         set TestLab 0:1
8 }
9
10 #################### make box and it's copy ####################
11 box b 12 13 14
12 set cb [CopyShape b]
13
14 explode b F
15 if {[llength [explode $cb F]] != 6} {
16         set IsDone 0
17         set TestError "$TestError # Copy of box has bad number of faces"
18 }
19
20 if {[IsSameShapes b $cb]==1} {
21         set IsDone 0
22         set TestError "$TestError # Box and it's copy are same"
23 }
24 for {set i 1} {$i <= 6} {incr i} {
25   set comp 0
26   for {set j 1} {$j <= 6} {incr j} {
27     if {[IsSameShapes b_$i [set cb]_$j]==1} {
28         set IsDone 0
29         set TestError "$TestError # Subface of copy of box [set cb]_$j] and face b_$i are same"
30     }
31     if {[CenterOfShape b_$i] == [CenterOfShape [set cb]_$j]} {incr comp}
32   }
33   if {$comp != 1} {
34         set IsDone 0
35         set TestError "$TestError # face b_$i has no twin in the copy subshapes set"
36   }
37 }
38
39 #################### translation testing ####################
40 if {[CenterOfShape b] != [CenterOfShape $cb]} {
41         set IsDone 0
42         set TestError "$TestError # shapes has different location"
43 }
44 ttranslate b 50 40 30
45 if {[CenterOfShape b] == [CenterOfShape $cb]} {
46         set IsDone 0
47         set TestError "$TestError # shapes has same location after retranslation"
48 }
49 set cb [CopyShape b]
50 if {[CenterOfShape b] != [CenterOfShape $cb]} {
51         set IsDone 0
52         set TestError "$TestError # shapes has different location after retranslation"
53 }