0030829: BRepExtrema_ShapeProximity crashes with shape from STL/WRL
[occt.git] / tests / bugs / modalg_5 / bug25292_26
CommitLineData
02effd35 1puts "================"
2puts "OCC25292"
3puts "================"
4puts ""
5#######################################################################
6# Face/Face intersection algorithm gives different results for different order of the arguments
7#######################################################################
8
e8feb725 9puts "##############################"
10puts "#!!!Search \"Attention\" keyword on this web-page for additional checking!!!"
11puts "##############################"
12puts ""
13
02effd35 14# intersect command
15
e8feb725 16#This value must be equal to the analogical value in bug25292_21, bug25292_22, bug25292_25 and bug25292_26 of "bugs modalg_5" testgrid.
17set GoodNbCurv 2
18
02effd35 19restore [locate_data_file bug25292_Input_3.brep] b1
20restore [locate_data_file bug25292_Input_11.brep] b2
21
22explode b1 f
23copy b1_1 f1
24explode b2 f
25copy b2_1 f2
26
27mksurface s1 f1
28mksurface s2 f2
29
30#################
e8feb725 31intersect res s2 s1
02effd35 32#################
33
e8feb725 34set che [whatis res]
35set ind [string first "3d curve" $che]
36if {${ind} >= 0} {
37 #Only variable "res" exists
261b7d9e 38 renamevar res res_1
39}
40
41set ic 1
42set AllowRepeate 1
43while { $AllowRepeate != 0 } {
44 set che [whatis res_$ic]
45 set ind [string first "3d curve" $che]
46 if {${ind} < 0} {
47 set AllowRepeate 0
e8feb725 48 } else {
261b7d9e 49 display res_$ic
50
51 bounds res_$ic U1 U2
52
53 dval U1
54 dval U2
55
56 if {[dval U2-U1] < 1.0e-20} {
57 puts "Error: Wrong curve's range!"
58 }
59
60 xdistcs res_$ic s1 U1 U2 10 1.0e-7
61 xdistcs res_$ic s2 U1 U2 10 1.0e-7
62
63 incr ic
e8feb725 64 }
261b7d9e 65}
e8feb725 66
261b7d9e 67if {[expr {$ic - 1}] == $GoodNbCurv} {
68 puts "OK: Curve Number is good!"
02effd35 69} else {
261b7d9e 70 puts "Error: Curve Number is bad!"
02effd35 71}