File: bug165_4

package info (click to toggle)
oce 0.15-5
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 302,472 kB
  • ctags: 210,903
  • sloc: cpp: 1,165,052; ansic: 75,256; sh: 11,901; tcl: 4,488; python: 2,867; makefile: 337; perl: 37; csh: 12
file content (84 lines) | stat: -rwxr-xr-x 2,207 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
puts "TODO ?OCC11111 ALL: An exception was caught"
puts "TODO ?OCC11111 ALL: \\*\\* Exception"
puts "TODO ?OCC11111 ALL: Error: Offset is not done."
puts "TODO ?OCC11111 ALL: Faulty OCC165"
puts "TODO ?OCC11111 ALL: Error : The length of result shape is"

cpulimit 600

puts "========"
puts "OCC165"
puts "========"
puts "Bug regression in BRepOffsetAPI_MakeOffset class (offsetting in OY direction)"


dchrono h reset
dchrono h start

restore [locate_data_file offset_wire_019.brep] a 
checkshape a

mkplane f a
checkshape f

set start_stepoffset -5.7
set incr_stepoffset 0.1
set finish_stepoffset -2.8

set interval_numb [expr int ( ($finish_stepoffset - $start_stepoffset) / $incr_stepoffset ) + 1]

set IsMade 0
set IsBeginMade 0
set IsGood 1
set i 0
set resume_string ""
for {set stepoffset $start_stepoffset} {$stepoffset <= $finish_stepoffset} {set stepoffset [expr $stepoffset + $incr_stepoffset]} {
    incr i
    puts "i = $i"
    if { [catch {mkoffset result f 1 $stepoffset } catch_result] } {
        puts "Faulty OCC165 (stepoffset = $stepoffset) : function MKOFFSET works wrongly"
        set IsGood 0
        set IsMade 0
    } else {
        puts "OK OCC165 (stepoffset = $stepoffset)"
        set IsMade 1
    }
    if {$IsBeginMade == 0 && $IsMade == 1} {
        set IsBeginMade 1
        set BeginStepOffset $stepoffset
    }
    if {$IsMade == 1} {
        set FinishStepOffset $stepoffset
    }

    dchrono h show

    if {$IsBeginMade == 1 && ($IsMade == 0 || $i == $interval_numb) } {
        set IsBeginMade 0
        set resume_tmp "from [format "%0.2f" $BeginStepOffset] till [format "%0.2f" $FinishStepOffset]\n"
        set resume_string "${resume_string}${resume_tmp}"
    }
}

puts ""
if {[string length $resume_string] == 0} {
    puts "Offset is created wrongly on initial shape in following borders"
    puts "from [format "%0.2f" $start_stepoffset] till [format "%0.2f" $finish_stepoffset]"
} else {
    puts "Offset is created correctly on initial shape in following borders"
    puts "$resume_string"
}

if {$IsGood == 1} {
    puts "OCC165 OK"
} else {
    puts "Faulty OCC165"
}

dchrono h stop
dchrono h show

renamevar result_1 result

set length 0
set 2dviewer 0