0023576: Intersection algorithm produces trimmed circle with illegal parametric range.
[occt.git] / tests / bugs / moddata / bug165_2
CommitLineData
075b21ec 1if { [array get env os_type] != "" } {
2 set os $env(os_type)
3}
4if { [string compare $os "windows"] != 0 } {
5 puts "TODO OCC12345 ALL: An exception was caught"
6 puts "TODO OCC12345 ALL: \\*\\* Exception \\*\\*.*"
7 puts "TODO OCC12345 ALL: OCC165 Faulty"
8}
9
0e94a94e 10puts "========"
11puts "OCC165"
12puts "Bug regression in BRepOffsetAPI_MakeOffset class (offsetting in OY direction)"
13puts "========"
14
15restore [locate_data_file offset_wire_019.brep] a
16puts [checkshape a]
17
18mkplane f a
19puts [checkshape f]
20
21set IsGood 1
22if [catch {mkoffset res1 f 1 4.8 } result] {
23 set IsGood 0
24} else {
25 puts "OCC165 OK (case 1): function MKOFFSET works properly"
26 puts [checkshape res1_1]
27 mkplane pl1 res1_1
28 puts [checkshape pl1]
29}
30
31if [catch {mkoffset res2 f 1 -2.9 } result] {
32 set IsGood 0
33} else {
34 puts "OCC165 OK (case 2): function MKOFFSET works properly"
35 puts [checkshape res2_1]
36 mkplane pl2 res2_1
37 puts [checkshape pl2]
38}
39
40if {$IsGood == 1} {
41 compound a res1_1 res2_1 res
42
43 regexp {Mass +: +([-0-9.+eE]+)} [lprops res1_1] full len
44
45 set good_len 1112.29
46 set percent_max 0.1
47 set percent [expr abs(${len} - ${good_len}) / double(${good_len}) * 100.]
48
49 puts "good_len = ${good_len}"
50 puts "length = ${len}"
51 puts "percent = ${percent}"
52
53 if {${percent} > ${percent_max}} {
54 set IsGood 0
55 }
56
57 regexp {Mass +: +([-0-9.+eE]+)} [lprops res2_1] full len
58
59 set good_len 1063.91
60 set percent_max 0.1
61 set percent [expr abs(${len} - ${good_len}) / double(${good_len}) * 100.]
62
63 puts "good_len = ${good_len}"
64 puts "length = ${len}"
65 puts "percent = ${percent}"
66
67 if {${percent} > ${percent_max}} {
68 set IsGood 0
69 }
70
71 if {$IsGood == 1} {
72 puts "OCC165 OK"
73 } else {
74 puts "OCC165 Faulty"
75 }
76
77} else {
78 puts "OCC165 Faulty"
79}