d4b867e6 |
1 | puts "================" |
2 | puts "OCC25416" |
3 | puts "================" |
4 | puts "" |
5 | ####################################################################### |
6 | # Wrong section curve |
7 | ####################################################################### |
8 | |
9 | #Check if intersection algorithm produces overlapped curves |
10 | |
aa5f963b |
11 | restore [locate_data_file bug25416_s1.draw] s1 |
12 | restore [locate_data_file bug25416_s2.draw] s2 |
d4b867e6 |
13 | |
14 | set ll [intersect ii s1 s2] |
15 | |
16 | set status 0 |
17 | if { [llength $ll] < 1 } { |
18 | set status 1 |
19 | } |
20 | |
21 | foreach i $ll { |
22 | foreach j $ll { |
23 | if { $i >= $j } continue |
aa5f963b |
24 | |
d4b867e6 |
25 | decho off |
26 | mkedge e1 $i |
27 | mkedge e2 $j |
28 | set coe [checkoverlapedges e1 e2] |
29 | decho on |
aa5f963b |
30 | |
d4b867e6 |
31 | puts "$i<->$j: $coe" |
32 | if { [regexp "Edges is not overlaped" $coe] != 1 } { |
33 | set status 2 |
34 | } |
35 | } |
36 | } |
37 | |
38 | decho on |
39 | |
40 | if { $status != 0 } { |
41 | puts "Wrong section. Error with code $status" |
42 | } else { |
43 | puts "OK: Good section" |
44 | } |