0023748: Bad monitoring of intermediate results in offset commands
[occt.git] / tests / bugs / modalg_1 / bug165_4
CommitLineData
ab87e6fc 1puts "TODO ?OCC11111 ALL: An exception was caught"
2puts "TODO ?OCC11111 ALL: \\*\\* Exception"
3puts "TODO ?OCC11111 ALL: Error: Offset is not done."
4puts "TODO ?OCC11111 ALL: Faulty OCC165"
5puts "TODO ?OCC11111 ALL: Error : The length of result shape is"
61c421bf 6
7cpulimit 600
8
9puts "========"
10puts "OCC165"
11puts "========"
12puts "Bug regression in BRepOffsetAPI_MakeOffset class (offsetting in OY direction)"
13
14
15dchrono h reset
16dchrono h start
17
18restore [locate_data_file offset_wire_019.brep] a
19checkshape a
20
21mkplane f a
22checkshape f
23
24set start_stepoffset -5.7
25set incr_stepoffset 0.1
26set finish_stepoffset -2.8
27
28set interval_numb [expr int ( ($finish_stepoffset - $start_stepoffset) / $incr_stepoffset ) + 1]
29
30set IsMade 0
31set IsBeginMade 0
32set IsGood 1
33set i 0
34set resume_string ""
35for {set stepoffset $start_stepoffset} {$stepoffset <= $finish_stepoffset} {set stepoffset [expr $stepoffset + $incr_stepoffset]} {
36 incr i
37 puts "i = $i"
38 if { [catch {mkoffset result f 1 $stepoffset } catch_result] } {
39 puts "Faulty OCC165 (stepoffset = $stepoffset) : function MKOFFSET works wrongly"
40 set IsGood 0
41 set IsMade 0
42 } else {
43 puts "OK OCC165 (stepoffset = $stepoffset)"
44 set IsMade 1
45 }
46 if {$IsBeginMade == 0 && $IsMade == 1} {
47 set IsBeginMade 1
48 set BeginStepOffset $stepoffset
49 }
50 if {$IsMade == 1} {
51 set FinishStepOffset $stepoffset
52 }
53
54 dchrono h show
55
56 if {$IsBeginMade == 1 && ($IsMade == 0 || $i == $interval_numb) } {
57 set IsBeginMade 0
58 set resume_tmp "from [format "%0.2f" $BeginStepOffset] till [format "%0.2f" $FinishStepOffset]\n"
59 set resume_string "${resume_string}${resume_tmp}"
60 }
61}
62
63puts ""
64if {[string length $resume_string] == 0} {
65 puts "Offset is created wrongly on initial shape in following borders"
66 puts "from [format "%0.2f" $start_stepoffset] till [format "%0.2f" $finish_stepoffset]"
67} else {
68 puts "Offset is created correctly on initial shape in following borders"
69 puts "$resume_string"
70}
71
72if {$IsGood == 1} {
73 puts "OCC165 OK"
74} else {
75 puts "Faulty OCC165"
76}
77
78dchrono h stop
79dchrono h show
80
81renamevar result_1 result
82
83set length 0
84set 2dviewer 0