0025803: Defective tests contaminating current directory
[occt.git] / tests / bugs / xde / bug184
CommitLineData
075b21ec 1set os $env(os_type)
075b21ec 2
0e94a94e 3puts "========"
4puts "OCC184"
5puts "========"
6#
7## Bad IGES/BREP translation
8#
9puts "FaceBrep must be identical FaceIGES!!!"
10puts "========"
11
12restore [locate_data_file OCC184.brep] FaceBrep
352ffd73 13checkshape FaceBrep
0e94a94e 14
15set dum1 [nbshapes FaceBrep]
16regexp {VERTEX +: +([-0-9.+eE]+)} $dum1 full nb_v1
17regexp {EDGE +: +([-0-9.+eE]+)} $dum1 full nb_e1
18regexp {WIRE +: +([-0-9.+eE]+)} $dum1 full nb_w1
19regexp {FACE +: +([-0-9.+eE]+)} $dum1 full nb_f1
20regexp {SHELL +: +([-0-9.+eE]+)} $dum1 full nb_sh1
21regexp {SOLID +: +([-0-9.+eE]+)} $dum1 full nb_sol1
22regexp {COMPSOLID +: +([-0-9.+eE]+)} $dum1 full nb_compsol1
23regexp {COMPOUND +: +([-0-9.+eE]+)} $dum1 full nb_compound1
24regexp {SHAPE +: +([-0-9.+eE]+)} $dum1 full nb_shape1
25
26regexp {Mass +: +([-0-9.+eE]+)} [sprops FaceBrep] full square1
27
28catch {exec rm ${imagedir}/OCC184.igs}
29brepiges FaceBrep ${imagedir}/OCC184.igs
30catch {exec chmod 777 ${imagedir}/OCC184.igs}
31
32igesbrep ${imagedir}/OCC184.igs FaceIGES *
33
34sewing result FaceIGES
352ffd73 35checkshape result
0e94a94e 36
37set dum2 [nbshapes result]
38regexp {VERTEX +: +([-0-9.+eE]+)} $dum2 full nb_v2
39regexp {EDGE +: +([-0-9.+eE]+)} $dum2 full nb_e2
40regexp {WIRE +: +([-0-9.+eE]+)} $dum2 full nb_w2
41regexp {FACE +: +([-0-9.+eE]+)} $dum2 full nb_f2
42regexp {SHELL +: +([-0-9.+eE]+)} $dum2 full nb_sh2
43regexp {SOLID +: +([-0-9.+eE]+)} $dum2 full nb_sol2
44regexp {COMPSOLID +: +([-0-9.+eE]+)} $dum2 full nb_compsol2
45regexp {COMPOUND +: +([-0-9.+eE]+)} $dum2 full nb_compound2
46regexp {SHAPE +: +([-0-9.+eE]+)} $dum2 full nb_shape2
47
48regexp {Mass +: +([-0-9.+eE]+)} [sprops result] full square2
49
50
51if { ${nb_v2} != ${nb_v1}
52 || ${nb_e2} != ${nb_e1}
53 || ${nb_w2} != ${nb_w1}
54 || ${nb_f2} != ${nb_f1}
55 || ${nb_sh2} != ${nb_sh1}
56 || ${nb_sol2} != ${nb_sol1}
4e3aa6b7 57 || ${nb_compsol2} != ${nb_compsol1}
0e94a94e 58 || ${nb_compound2} != ${nb_compound1}
4e3aa6b7 59 || ${nb_shape2} != ${nb_shape1} } {
0e94a94e 60 puts "Error : Number of shapes is faulty"
61}
62
63if { ${square2} != ${square1} } {
4e3aa6b7 64 puts "Error : Square is not valid"
0e94a94e 65}
66
67set 2dviewer 0
68