File: bug165_7

package info (click to toggle)
oce 0.17.2-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 297,992 kB
  • ctags: 203,291
  • sloc: cpp: 1,176,369; ansic: 67,206; sh: 11,647; tcl: 6,890; cs: 5,221; python: 2,867; java: 1,522; makefile: 338; xml: 292; perl: 37
file content (77 lines) | stat: -rw-r--r-- 1,954 bytes parent folder | download | duplicates (6)
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
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.1
set incr_stepoffset 0.1
set finish_stepoffset 6.3

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"
}

renamevar result_1 result

set length 1113.06
set 2dviewer 0

dchrono h stop
dchrono h show