0029351: Boolean Operations create invalid pcurves
[occt.git] / tests / bugs / moddata_1 / bug163
CommitLineData
0e94a94e 1
2puts "========"
3puts "OCC163"
4puts "========"
5puts ""
6###########################################################
032d0272 7## The result of extrema command is not correct.
8## Extrema command return max, but it acceptable because relative error near 1.0e-30.
0e94a94e 9###########################################################
10
11restore [locate_data_file OCC130.brep] res
12
352ffd73 13checkshape res
0e94a94e 14
15line l -120 -100 400 0 0 1
16mksurface s res
17
18set che [extrema l s]
19set err [llength $che]
032d0272 20
21# Amount Check
22if { $err != 1} {
23 puts "Error: Invalid extrema number"
0e94a94e 24}
25
032d0272 26set status 0
27set info [dump ext_1]
28regexp "Parameters : 0 +(\[-0-9*\.+eE\]+)" $info full extLength
29
30# Test max
31if { $extLength > 35 && $extLength < 36} {
32 set good_dist 35.6687907545308
33 checkreal "Max distance:" ${extLength} ${good_dist} 0.01 0.01
34 set status 1
35}
0e94a94e 36
032d0272 37# Test min
38if {$extLength > 0 && $extLength < 1} {
39 set good_dist 0.0
40 checkreal "Min distance:" ${extLength} ${good_dist} 0.01 0.01
41 set status 1
0e94a94e 42}
43
032d0272 44# Not min or max
45if {$status == 0} {
46 puts "Error: wrong extrema point"
47}