File: bug743

package info (click to toggle)
oce 0.18.3-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 301,548 kB
  • sloc: cpp: 1,190,609; ansic: 67,225; sh: 11,630; tcl: 7,954; cs: 5,221; python: 2,867; java: 1,522; makefile: 342; xml: 292; perl: 37
file content (42 lines) | stat: -rw-r--r-- 1,241 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

puts "========"
puts "OCC743"
puts "========"
puts ""
#######################################
## The result of offset operation on a planar wire is wrong
#######################################

restore [locate_data_file OCC743_corr2.brep] a 
checkshape a

if { [catch { mkoffset result a 1 -15 } status] } {
    puts "Faulty OCC743"
} else {
    renamevar result_1 result
    set nb_info [nbshapes result]
    regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info full ve
    puts [format "Result shape result contains %s vertexes" $ve]
    if { $ve == 0 } {
	puts [format "Faulty : Result shape is NULL shape"]
    } else {
	regexp {WIRE +: +([-0-9.+eE]+)} $nb_info full wi
        if {$wi > 1 } {
    	    set ll [explode result w]
    	    set num [llength $ll]
    	    puts [format "Faulty : Result shape result is COMPOUND and contains %s wires" $num]
    	    foreach {k} $ll {
    		checkshape $k
    		regexp {nb alone Vertices : ([-0-9.+eE]+)} [checksection $k] full cs
    		if { $cs != 0 } {
    	    	    puts [format "Faulty : Result shape is UNclosed wire !!! " $k]
    	        } else {
    	    	    puts [format "OK: Result shape is CLOSED wire !!! "]
    	        }
    	    }
        } 
    }
}

set length 3533.52
set 2dviewer 0