File: bug825

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 (78 lines) | stat: -rw-r--r-- 2,406 bytes parent folder | download | duplicates (2)
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
puts "TODO OCC12345 ALL: Faulty OCC825"
puts "TODO OCC12345 ALL: Error : The command is not valid. The square is"

pload QAcommands

puts "============"
puts "OCC825"
puts "============"
puts ""
######################################
## BRepAlgoAPI_Cut fails on sphere and b-spline face
######################################
## (old topology)
#####################################

if { [ catch { set info_result [OCC825 a1 a2 a3 res1 res2 0] } ] } {
    puts "Faulty OCC825"
} else {
    if { [regexp {FAILED} $info_result] } {
        puts "Faulty OCC825"
    }

    set ExplodeList [explode res1]
    if {[llength ${ExplodeList}] < 1} {
        puts "Faulty OCC825"
    }

    set ExplodeList [explode res2]
    if {[llength ${ExplodeList}] < 1} {
        puts "Faulty OCC825"
    }
    checkshape res1

    set nbFace_exp 2
    set nbShell_exp 1
    set nbSolid_exp 1
    set nbCompSolid_exp 0
    set nbCompound_exp 1
    set nbShape_exp 15
        
    set nb_info [nbshapes res1]
    regexp {FACE +: +([-0-9.+eE]+)} $nb_info full nb_face
    regexp {SHELL +: +([-0-9.+eE]+)} $nb_info full nb_shell
    regexp {SOLID +: +([-0-9.+eE]+)} $nb_info full nb_solid
    regexp {COMPSOLID +: +([-0-9.+eE]+)} $nb_info full nbCompSolid
    regexp {COMPOUND +: +([-0-9.+eE]+)} $nb_info full nb_compound
    regexp {SHAPE +: +([-0-9.+eE]+)} $nb_info full nb_Shape
        
    if { $nb_face != $nbFace_exp } {
      puts [format "Faulty : result must contain %s FACE(S), but it contains %s only." $nbFace_exp $nb_face]
    }

    if { $nb_shell != $nbShell_exp } {
      puts [format "Faulty : result must contain %s SHELL(S), but it contains %s only." $nbShell_exp $nb_shell]
    }
    
    if { $nb_solid != $nbSolid_exp } {
      puts [format "Faulty : result must contain %s SOLID(S), but it contains %s only." $nbSolid_exp $nb_solid]
    }

    if { $nbCompSolid != $nbCompSolid_exp } {
      puts [format "Faulty : result must contain %s COMPSOLID(S), but it contains %s only." $nbCompSolid_exp $nbCompSolid]
    }

    if { $nb_compound != $nbCompound_exp } {
      puts [format "Faulty : result must contain %s COMPOUND(S), but it contains %s only." $nbCompound_exp $nb_compound]
    }

    if { $nb_Shape != $nbShape_exp } {
      puts [format "Faulty : result must contain %s SHAPE(S), but it contains %s only." $nbShape_exp $nb_Shape]
    }


    renamevar res2 result
}

set square 0
set 2dviewer 1