0028207: Unexpected result of the unify same domain algorithm
[occt.git] / tests / caf / nam / A8
1 puts "TODO OCC24025 ALL: Two opened shells intersection"
2 puts "TODO OCC24025 ALL: Two shells intersection \\(one opened\\)"
3 puts "TODO OCC24025 ALL: ERROR OCCURS DURING TEST - FAULTY"
4
5 set Test "Boolean operations naming test"
6 set IsDone 1
7 set TestError ""
8
9 if {[catch {set TestLab}] == 1} {
10         NewDocument D
11         set TestLab 0:1
12 }
13
14 set myLab [set TestLab]:1
15 set myNameLab [set TestLab]:105
16
17 #################### four boxes:  fuse, cut, common, intersection ####################
18 NameBox D $myLab 20 30 25
19 GetShape D $myLab b1
20 set Box1Lab $myLab
21 NextLabel myLab
22 box b2 10 15 10 15 20 25
23 BuildNamedShape D $myLab PRIMITIVE b2
24 set Box2Lab $myLab
25 set bf [explode b2 F]
26 for {set i 0} {[lindex $bf $i]!=""} {incr i} {
27   BuildNamedShape D [set myLab]:[expr $i+1] PRIMITIVE [lindex $bf $i]
28 }
29 NextLabel myLab
30 box b3 20 25 30 20 20 20
31 BuildNamedShape D $myLab PRIMITIVE b3
32 set Box3Lab $myLab
33 set bf [explode b3 F]
34 for {set i 0} {[lindex $bf $i]!=""} {incr i} {
35   BuildNamedShape D [set myLab]:[expr $i+1] PRIMITIVE [lindex $bf $i]
36 }
37 NextLabel myLab
38 box b4 15 10 20 20 20 20
39 #box b4 5 5 5 20 20 20
40 BuildNamedShape D $myLab PRIMITIVE b4
41 set Box4Lab $myLab
42 set bf [explode b4 F]
43 for {set i 0} {[lindex $bf $i]!=""} {incr i} {
44   BuildNamedShape D [set myLab]:[expr $i+1] PRIMITIVE [lindex $bf $i]
45 }
46 NextLabel myLab
47
48 NameFuse D $myLab b1 b2
49 set FuseLab $myLab
50 Checking "Two boxes fuse"
51 GetShape D $FuseLab FuseShape
52 GetShape D $Box3Lab b3
53 NameCut D $myLab FuseShape b3
54 set CutLab $myLab
55 Checking "Fuse result and box cut"
56 GetShape D $CutLab CutShape
57 GetShape D $Box4Lab b4
58 NameCommon D $myLab b4 CutShape
59 set CommonLab $myLab
60 Checking "Fuse cut result and box common"
61 GetShape D $CommonLab CommonShape
62 GetShape D $Box2Lab b2
63 #NameIntersection D $myLab CommonShape b2
64 #Checking "Fuse cut common result and box intersection"
65
66 #################### limit operation ####################
67 NameBox D $myLab 20 10 30
68 GetShape D $myLab b1
69 NextLabel myLab
70 NextLabel myNameLab
71 vertex v1 -10 -10 15
72 vertex v2 -10 100 15
73 vertex v3 100 -10 15
74 line l1 -10 -10 15 0 1 0
75 line l2 -10 100 15 1 -1 0
76 line l3 100 -10 15 -1 0 0
77 mkedge e1 l1 v1 v2
78 mkedge e2 l2 v2 v3
79 mkedge e3 l3 v3 v1
80 wire w e1 e2 e3
81 plane pl 0 0 15 0 0 15
82 mkface f pl w
83 NameImportShape D $myLab f
84 NextLabel myLab
85 NextLabel myNameLab
86 NameLimit D $myLab b1 f
87 Checking "Limit naming (box and planar face)"
88
89 #################### Intersection operation ####################
90 restore [locate_data_file Int_Sh1_3.brep] Obj1
91 NameImportShape D $myLab Obj1
92 NextLabel myLab
93 NextLabel myNameLab
94
95 restore [locate_data_file Int_Sh2_3.brep] Tool1
96 NameImportShape D $myLab Tool1
97 NextLabel myLab
98 NextLabel myNameLab
99
100 NameIntersection D $myLab Obj1 Tool1
101 Checking "Two opened shells intersection"
102
103 restore [locate_data_file Int_shell1.brep] Obj2
104 NameImportShape D $myLab Obj2
105 NextLabel myLab
106 NextLabel myNameLab
107
108 restore [locate_data_file Int_Sh1_3.brep] Tool2
109 NameImportShape D $myLab Tool2
110 NextLabel myLab
111 NextLabel myNameLab
112
113 NameIntersection D $myLab Obj2 Tool2
114 Checking "Two shells intersection (one opened)"
115
116
117 restore [locate_data_file Int_shell.brep] Obj3
118 NameImportShape D $myLab Obj3
119 NextLabel myLab
120 NextLabel myNameLab
121
122 restore [locate_data_file Int_wire.brep] Tool3
123 NameImportShape D $myLab Tool3
124 NextLabel myLab
125 NextLabel myNameLab
126
127 NameIntersection D $myLab Obj3 Tool3
128 Checking "Shell and wire intersection"
129
130 #################### bug with premature "IDENTIFY" naming: one cylinder cut another in the middle  ####################
131 NameCylinder D $myLab 20 100 0 1
132 GetShape D $myLab c1
133 NextLabel myLab
134 NextLabel myNameLab
135 pcylinder c2 20 30
136 ttranslate c2 0 0 30
137 BuildNamedShape D $myLab PRIMITIVE c2
138 set cf [explode c2 F]
139 for {set i 0} {[lindex $cf $i]!=""} {incr i} {
140   BuildNamedShape D [set myLab]:[expr $i+1] PRIMITIVE [lindex $cf $i]
141 }
142 NextLabel myLab
143 NextLabel myNameLab
144 NameCut D $myLab c1 c2
145 Checking "Cut of two cylinders ( = = )"
146
147 #################### bug with MODIFUNTIL conceit: three cutted cylinders ####################
148 NameCylinder D $myLab 20 100 0 1
149 GetShape D $myLab c1
150 NextLabel myLab
151 NextLabel myNameLab
152 NameCylinder D $myLab 10 100 0 1
153 GetShape D $myLab c2
154 NextLabel myLab
155 NextLabel myNameLab
156 pcylinder c3 20 30
157 ttranslate c3 0 0 30
158 BuildNamedShape D $myLab PRIMITIVE c3
159 set cf [explode c3 F]
160 for {set i 0} {[lindex $cf $i]!=""} {incr i} {
161   BuildNamedShape D [set myLab]:[expr $i+1] PRIMITIVE [lindex $cf $i]
162 }
163 NextLabel myLab
164 NextLabel myNameLab
165 NameCut D $myLab c1 c2
166 GetShape D $myLab CutShape
167 NextLabel myLab
168 NextLabel myNameLab
169 NameCut D $myLab CutShape c3
170 #Checking "Cut of three cylinders ( 0=) 0=) )"
171
172 # mpv: BRepNaming_Fillet is not ready now for this test
173 #################### bug with FILTERBYNEIGHBOURGS confusion: cylinder, cutted by shpere + fillet ####################
174 #NameCylinder D $myLab 20 100 0 1
175 #GetShape D $myLab c1
176 #NextLabel myLab
177 #NextLabel myNameLab
178 #psphere s 20
179 #ttranslate s 30 20 50
180 #BuildNamedShape D $myLab PRIMITIVE s
181 #explode s F
182 ##name only face of sphere: it's enoth for this example
183 #BuildNamedShape D [set myLab]:1 PRIMITIVE s_1
184 #NextLabel myLab
185 #NextLabel myNameLab
186 #NameCut D $myLab c1 s
187 #set CutLab $myLab
188 #GetShape D $myLab CutShape
189 #NextLabel myLab
190 #NextLabel myNameLab
191 #set se [explode CutShape E]
192 #set CutEdge CutShape_1
193 #set minX [lindex [CenterOfShape CutShape_1] 0]
194 #for {set i 1} {[lindex $se $i]!=""} {incr i} {
195 #  set minC [lindex [CenterOfShape [lindex $se $i]] 0]
196 #  if {$minC < $minX} {
197 #    set minX $minC
198 #    set CutEdge [lindex $se $i]
199 #  }
200 #}
201 #SelectShape D $myLab $CutEdge CutShape
202 #set EdgeLab $myLab
203 #NextLabel myLab
204 #NextLabel myNameLab
205 #NameFillet D $myLab $CutLab $EdgeLab 10
206 #Checking "Fillet at cut cylinder by sphere ( \[( )"