5 ## Bad IGES/BREP translation
7 puts "FaceBrep must be identical FaceIGES!!!"
10 restore [locate_data_file OCC184.brep] FaceBrep
11 puts [checkshape FaceBrep]
13 set dum1 [nbshapes FaceBrep]
14 regexp {VERTEX +: +([-0-9.+eE]+)} $dum1 full nb_v1
15 regexp {EDGE +: +([-0-9.+eE]+)} $dum1 full nb_e1
16 regexp {WIRE +: +([-0-9.+eE]+)} $dum1 full nb_w1
17 regexp {FACE +: +([-0-9.+eE]+)} $dum1 full nb_f1
18 regexp {SHELL +: +([-0-9.+eE]+)} $dum1 full nb_sh1
19 regexp {SOLID +: +([-0-9.+eE]+)} $dum1 full nb_sol1
20 regexp {COMPSOLID +: +([-0-9.+eE]+)} $dum1 full nb_compsol1
21 regexp {COMPOUND +: +([-0-9.+eE]+)} $dum1 full nb_compound1
22 regexp {SHAPE +: +([-0-9.+eE]+)} $dum1 full nb_shape1
24 regexp {Mass +: +([-0-9.+eE]+)} [sprops FaceBrep] full square1
26 catch {exec rm ${imagedir}/OCC184.igs}
27 brepiges FaceBrep ${imagedir}/OCC184.igs
28 catch {exec chmod 777 ${imagedir}/OCC184.igs}
30 igesbrep ${imagedir}/OCC184.igs FaceIGES *
32 sewing result FaceIGES
33 puts [checkshape result]
35 set dum2 [nbshapes result]
36 regexp {VERTEX +: +([-0-9.+eE]+)} $dum2 full nb_v2
37 regexp {EDGE +: +([-0-9.+eE]+)} $dum2 full nb_e2
38 regexp {WIRE +: +([-0-9.+eE]+)} $dum2 full nb_w2
39 regexp {FACE +: +([-0-9.+eE]+)} $dum2 full nb_f2
40 regexp {SHELL +: +([-0-9.+eE]+)} $dum2 full nb_sh2
41 regexp {SOLID +: +([-0-9.+eE]+)} $dum2 full nb_sol2
42 regexp {COMPSOLID +: +([-0-9.+eE]+)} $dum2 full nb_compsol2
43 regexp {COMPOUND +: +([-0-9.+eE]+)} $dum2 full nb_compound2
44 regexp {SHAPE +: +([-0-9.+eE]+)} $dum2 full nb_shape2
46 regexp {Mass +: +([-0-9.+eE]+)} [sprops result] full square2
49 if { ${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}
55 || ${nb_compsol2} != ${nb_compsol2}
56 || ${nb_compound2} != ${nb_compound1}
57 || ${nb_shape2} != ${nb_shape2} } {
58 puts "Error : Number of shapes is faulty"
61 if { ${square2} != ${square1} } {
62 puts "Error : "Square is not valid"