0024915: Wrong intersection curves between two cylinders
[occt.git] / tests / bugs / modalg_2 / bug23218
CommitLineData
809eca9d 1puts "============"
2puts "OCC23218"
3puts "============"
4puts ""
5#######################################################################
6# Wrong value of tolerance for the intersection curve.
7#######################################################################
8
9set BugNumber OCC23218
10
11puts "Load first shape ..."
12restore [locate_data_file bug23218_b1] b1
13
14puts "Load second shape ..."
15restore [locate_data_file bug23218_b4] b2
16
17puts "Start project operation ..."
18set result [bopcurves b1 b2]
19puts $result
20puts "Finish project operation ..."
21
ecc4f148 22set GoodToleranceReached 2.4950140688989345e-006
809eca9d 23regexp {Tolerance Reached=([-0-9.+eE]+)} $result full ToleranceReached
24
25proc GetPercent {Value GoodValue} {
26 set Percent 0.
27 if {${GoodValue} != 0.} {
28 set Percent [expr abs(${Value} - ${GoodValue}) / abs(double(${GoodValue})) * 100.]
29 } elseif {${Value} != 0.} {
30 set Percent [expr abs(${GoodValue} - ${Value}) / abs(double(${Value})) * 100.]
31 } else {
32 set Percent 0.
33 }
34 return ${Percent}
35}
36
37
38set percent_max 0.1
39set ToleranceReached_percent [expr abs ( [GetPercent ${ToleranceReached} ${GoodToleranceReached}] ) ]
40
41if {${ToleranceReached_percent} > ${percent_max}} {
42 puts "${BugNumber}: Faulty"
43} else {
44 puts "OK ${BugNumber}"
45}
46
47set 3dviewer 0
48