79e7388fe22bda1023ae2c6d0a0e7160d5343d33
[occt.git] / tests / bugs / modalg_1 / bug165_4
1 puts "TODO ?OCC11111 ALL: An exception was caught"
2 puts "TODO ?OCC11111 ALL: \\*\\* Exception"
3 puts "TODO ?OCC11111 ALL: Error: Offset is not done."
4 puts "TODO ?OCC11111 ALL: Faulty OCC165"
5 puts "TODO ?OCC11111 ALL: Error : The length of result shape is"
6
7 cpulimit 600
8
9 puts "========"
10 puts "OCC165"
11 puts "========"
12 puts "Bug regression in BRepOffsetAPI_MakeOffset class (offsetting in OY direction)"
13
14
15 dchrono h reset
16 dchrono h start
17
18 restore [locate_data_file offset_wire_019.brep] a 
19 checkshape a
20
21 mkplane f a
22 checkshape f
23
24 set start_stepoffset -5.7
25 set incr_stepoffset 0.1
26 set finish_stepoffset -2.8
27
28 set interval_numb [expr int ( ($finish_stepoffset - $start_stepoffset) / $incr_stepoffset ) + 1]
29
30 set IsMade 0
31 set IsBeginMade 0
32 set IsGood 1
33 set i 0
34 set resume_string ""
35 for {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
63 puts ""
64 if {[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
72 if {$IsGood == 1} {
73     puts "OCC165 OK"
74 } else {
75     puts "Faulty OCC165"
76 }
77
78 dchrono h stop
79 dchrono h show
80
81 renamevar result_1 result
82
83 set length 0
84 set 2dviewer 0