98974dcc |
1 | puts "========" |
2 | puts "OCC29972: Intersection curve has a weird gap in the middle of it" |
3 | puts "========" |
4 | puts "" |
5 | |
6 | set GoodNbCurves 2 |
7 | |
8 | foreach a [directory res*] {unset $a} |
9 | |
10 | restore [locate_data_file bug29972_s1.draw] s1 |
11 | cylinder s2 -120 54.2955104312028 -116 1 0 0 0 0 -1 28 |
12 | |
13 | intersect res s1 s2 |
14 | |
15 | set che [whatis res] |
16 | set ind [string first "3d curve" $che] |
17 | if {${ind} >= 0} { |
18 | #Only variable "res" exists |
19 | renamevar res res_1 |
20 | } |
21 | |
22 | bclearobjects |
23 | bcleartools |
24 | |
25 | set ic 1 |
26 | set AllowRepeat 1 |
27 | while { $AllowRepeat != 0 } { |
28 | set che [whatis res_$ic] |
29 | set ind [string first "3d curve" $che] |
30 | if {${ind} < 0} { |
31 | set AllowRepeat 0 |
32 | } else { |
33 | |
34 | bounds res_$ic U1 U2 |
35 | |
36 | if {[dval U2-U1] < 1.0e-9} { |
37 | puts "Error: Wrong curve's range!" |
38 | } |
39 | |
40 | xdistcs res_$ic s1 U1 U2 100 2.0e-6 |
41 | xdistcs res_$ic s2 U1 U2 100 2.0e-6 |
42 | |
43 | mkedge ee res_$ic |
44 | baddobjects ee |
45 | |
46 | incr ic |
47 | } |
48 | } |
49 | |
50 | # Check of gaps between intersection curves |
51 | bfillds |
52 | bbuild rs |
53 | |
54 | checknbshapes rs -edge $GoodNbCurves |
55 | checksection rs -r 0 |
56 | |
57 | smallview |
58 | don res_* |
59 | |
60 | fit |
61 | don s1 s2 |
62 | clpoles s1 |
63 | disp res_* |
64 | |
65 | checkview -screenshot -2d -path ${imagedir}/${test_image}.png |