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