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