0e94a94e |
1 | puts "========" |
2 | puts "OCC184" |
3 | puts "========" |
4 | # |
5 | ## Bad IGES/BREP translation |
6 | # |
7 | puts "FaceBrep must be identical FaceIGES!!!" |
8 | puts "========" |
9 | |
10 | restore [locate_data_file OCC184.brep] FaceBrep |
352ffd73 |
11 | checkshape FaceBrep |
0e94a94e |
12 | |
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 |
23 | |
24 | regexp {Mass +: +([-0-9.+eE]+)} [sprops FaceBrep] full square1 |
25 | |
26 | catch {exec rm ${imagedir}/OCC184.igs} |
27 | brepiges FaceBrep ${imagedir}/OCC184.igs |
28 | catch {exec chmod 777 ${imagedir}/OCC184.igs} |
29 | |
30 | igesbrep ${imagedir}/OCC184.igs FaceIGES * |
31 | |
32 | sewing result FaceIGES |
352ffd73 |
33 | checkshape result |
0e94a94e |
34 | |
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 |
45 | |
46 | regexp {Mass +: +([-0-9.+eE]+)} [sprops result] full square2 |
47 | |
48 | |
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} |
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 | |
61 | if { ${square2} != ${square1} } { |
4e3aa6b7 |
62 | puts "Error : Square is not valid" |
0e94a94e |
63 | } |
64 | |
fb60057d |
65 | checkmaxtol result -ref 9.9999999999999995e-008 |
5ae01c85 |
66 | checknbshapes result -shell 0 |
67 | checkfreebounds result 2 |
68 | |
0e94a94e |
69 | set 2dviewer 0 |
70 | |