0029807: [Regression to 7.0.0] Impossible to cut cone from prism
[occt.git] / tests / bugs / modalg_7 / bug23176
CommitLineData
63bd365e 1puts "================"
2puts "OCC23176"
3puts "================"
4puts ""
5#######################################################################
6# Intersection of cylinder and cone produces open curve
7#######################################################################
8
9restore [locate_data_file bug23176_surface1_draw.draw] s1
10restore [locate_data_file bug23176_surface2_draw.draw] s2
11
12intersect result s1 s2
13
3306fdd9 14set che [whatis result]
15set ind [string first "3d curve" $che]
16if {${ind} >= 0} {
17 #Only variable "result" exists
18 renamevar result result_1
19}
20
21bclearobjects
22bcleartools
23
24set ic 1
25set AllowRepeat 1
26while { $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
49bfillds
50bbuild rw
51
52checksection rw -r 0
53checkmaxtol rw -min_tol 2.0e-7
54
55checknbshapes rw -edge 4 -vertex 4
63bd365e 56
57smallview
3306fdd9 58don result*
63bd365e 59fit
60display s1 s2
61checkview -screenshot -2d -path ${imagedir}/${test_image}.png