0026342: No materials are read from STEP
[occt.git] / tests / bugs / xde / bug4648
1 puts "TODO OCC12345 ALL: Faulty OCC4648"
2
3 puts "================"
4 puts "OCC4648"
5 puts "================"
6 puts ""
7 #################################
8 # Problems with writing to STEP
9 #################################
10
11 set BugNumber OCC4648
12
13 igesbrep [locate_data_file annie_surf.igs] a *
14 set info [nbshapes a]
15 regexp {Mass +: +([-0-9.+eE]+)} [sprops a] full good_square
16 regexp {VERTEX +: +([-0-9.+eE]+)} $info full good_vertex
17 regexp {EDGE +: +([-0-9.+eE]+)} $info full good_edge
18 regexp {WIRE +: +([-0-9.+eE]+)} $info full good_wire
19 regexp {FACE +: +([-0-9.+eE]+)} $info full good_face
20 regexp {SHELL +: +([-0-9.+eE]+)} $info full good_shell
21 regexp {SOLID +: +([-0-9.+eE]+)} $info full good_solid
22 regexp {COMPSOLID +: +([-0-9.+eE]+)} $info full good_compsolid
23 regexp {COMPOUND +: +([-0-9.+eE]+)} $info full good_compound
24 regexp {SHAPE +: +([-0-9.+eE]+)} $info full good_shape
25
26 file delete ${imagedir}/annie
27 stepwrite 0 a ${imagedir}/annie
28 if { ![file exists ${imagedir}/annie] } {
29     puts "Faulty ${BugNumber} : There is not file"
30 }
31 catch {exec chmod 777 ${imagedir}/annie}
32
33 if [catch { stepread ${imagedir}/annie b *} res] {
34     puts "Faulty ${BugNumber} : stepread is wrong"
35 } else {
36     renamevar b_1 res
37     set info1 [nbshapes res]
38     regexp {Mass +: +([-0-9.+eE]+)} [sprops res] full sq
39     regexp {VERTEX +: +([-0-9.+eE]+)} $info1 full vertex
40     regexp {EDGE +: +([-0-9.+eE]+)} $info1 full edge
41     regexp {WIRE +: +([-0-9.+eE]+)} $info1 full wire
42     regexp {FACE +: +([-0-9.+eE]+)} $info1 full face
43     regexp {SHELL +: +([-0-9.+eE]+)} $info1 full shell
44     regexp {SOLID +: +([-0-9.+eE]+)} $info1 full solid
45     regexp {COMPSOLID +: +([-0-9.+eE]+)} $info1 full compsolid
46     regexp {COMPOUND +: +([-0-9.+eE]+)} $info1 full compound
47     regexp {SHAPE +: +([-0-9.+eE]+)} $info1 full shape
48         
49     if { $sq != $good_square
50         || $vertex != $good_vertex
51         || $edge != $good_edge
52         || $wire != $good_wire
53         || $face != $good_face
54         || $shell != $good_shell
55         || $solid != $good_solid
56         || $compsolid != $good_compsolid
57         || $compound != $good_compound
58         || $shape != $good_shape } {
59             puts "Faulty ${BugNumber}"
60     }
61 }
62
63 file delete ${imagedir}/annie
64
65