1 puts "=========================================================="
2 puts "0027540: Run-to-run differences in the 3D Offset algorithm"
3 puts "=========================================================="
8 restore [locate_data_file bug27540_shapes2.brep] s
11 # make offset operations on two shapes
13 offsetparameter 1e-7 c i
14 # set offset 30 for top faces (normal direction 0 0 1), 10 for all other faces
16 set faces [explode s_1 f]
19 set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
20 if {$found && abs($z - 1) < 1.e-7} {
25 checkprops result1 -s 3.76166e+006
26 checkprops result1 -v 1.74521e+008
27 checknbshapes result1 -vertex 36 -edge 56 -wire 24 -face 23 -shell 1 -solid 1
31 offsetparameter 1e-7 c i
32 # set offset 30 for top faces (normal direction 0 0 1), 10 for all other faces
34 set faces [explode s_2 f]
37 set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
38 if {$found && abs($z - 1) < 1.e-7} {
43 checkprops result2 -s 3.76166e+006
44 checkprops result2 -v 1.74521e+008
45 checknbshapes result2 -vertex 36 -edge 56 -wire 24 -face 23 -shell 1 -solid 1
49 set vertices1 [nexplode result1 v]
50 set vertices2 [nexplode result2 v]
52 set nbv1 [llength $vertices1]
54 for {set i 0} {$i < $nbv1} {incr i} {
55 set v1 [lindex $vertices1 $i]
56 set v2 [lindex $vertices2 $i]
64 if {$dump_v1 != $dump_v2} {
65 puts "Error: the results are not the same - $v1 and $v2"