63bd365e |
1 | puts "================" |
2 | puts "OCC23176" |
3 | puts "================" |
4 | puts "" |
5 | ####################################################################### |
6 | # Intersection of cylinder and cone produces open curve |
7 | ####################################################################### |
8 | |
9 | restore [locate_data_file bug23176_surface1_draw.draw] s1 |
10 | restore [locate_data_file bug23176_surface2_draw.draw] s2 |
11 | |
12 | intersect result s1 s2 |
13 | |
3306fdd9 |
14 | set che [whatis result] |
15 | set ind [string first "3d curve" $che] |
16 | if {${ind} >= 0} { |
17 | #Only variable "result" exists |
18 | renamevar result result_1 |
19 | } |
20 | |
21 | bclearobjects |
22 | bcleartools |
23 | |
24 | set ic 1 |
25 | set AllowRepeat 1 |
26 | while { $AllowRepeat != 0 } { |
27 | set che [whatis result_$ic] |
28 | set ind [string first "3d curve" $che] |
29 | if {${ind} < 0} { |
30 | set AllowRepeat 0 |
31 | } else { |
32 | |
33 | bounds result_$ic U1 U2 |
34 | |
35 | if {[dval U2-U1] < 1.0e-20} { |
36 | puts "Error: Wrong curve's range!" |
37 | } |
38 | |
39 | xdistcs result_$ic s1 U1 U2 10 2.0e-7 |
40 | xdistcs result_$ic s2 U1 U2 10 2.0e-7 |
41 | |
42 | mkedge ee result_$ic |
43 | baddobjects ee |
44 | incr ic |
45 | } |
46 | } |
47 | |
48 | # Check gaps in result |
49 | bfillds |
50 | bbuild rw |
51 | |
52 | checksection rw -r 0 |
53 | checkmaxtol rw -min_tol 2.0e-7 |
54 | |
55 | checknbshapes rw -edge 4 -vertex 4 |
63bd365e |
56 | |
57 | smallview |
3306fdd9 |
58 | don result* |
63bd365e |
59 | fit |
60 | display s1 s2 |
61 | checkview -screenshot -2d -path ${imagedir}/${test_image}.png |