mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-05-10 09:30:48 +08:00
0028442: Incorrect result of 3D offset operation in mode Complete, Join type - Intersection
1. For the support of the new configurations of the input shapes for the 3D offset algorithm (shapes containing the faces with holes, which are growing during offset operation and sometimes (depending on the offset value) even kill the faces themselves) the new function *FindFacesInsideHoleWires* has been implemented. This new function looks for the splits of the offset face located inside the new hole wire built from offset edges of the edges of the hole wires of the original face. All found splits are simply removed. 2. Test cases for the issue.
This commit is contained in:
28
tests/offset/shape_type_i_c/YA1
Normal file
28
tests/offset/shape_type_i_c/YA1
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_input.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 100
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 1.41675e+007 -s 507751
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 16 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
10
tests/offset/shape_type_i_c/YA2
Normal file
10
tests/offset/shape_type_i_c/YA2
Normal file
@@ -0,0 +1,10 @@
|
||||
restore [locate_data_file bug28442_input.brep] s
|
||||
|
||||
OFFSETSHAPE 130 {} $calcul $type
|
||||
|
||||
checkprops result -v 1.31751e+008 -s 1.66862e+006
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 11 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YA3
Normal file
28
tests/offset/shape_type_i_c/YA3
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 0.5
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 406.625 -s 605.617
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 16 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
10
tests/offset/shape_type_i_c/YA4
Normal file
10
tests/offset/shape_type_i_c/YA4
Normal file
@@ -0,0 +1,10 @@
|
||||
restore [locate_data_file bug28442_simple.brep] s
|
||||
|
||||
OFFSETSHAPE 1.5 {} $calcul $type
|
||||
|
||||
checkprops result -v 1504.61 -s 1006.51
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 16 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YA5
Normal file
28
tests/offset/shape_type_i_c/YA5
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple2.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 0.5
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 483.996 -s 587.42
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 16 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YA6
Normal file
28
tests/offset/shape_type_i_c/YA6
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple6.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 0.5
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 484.958 -s 589.936
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 21 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YA7
Normal file
28
tests/offset/shape_type_i_c/YA7
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_input.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 130
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 1.57185e+007 -s 547937
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 17 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YA8
Normal file
28
tests/offset/shape_type_i_c/YA8
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_input.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 150
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 1.67576e+007 -s 563859
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 15 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YA9
Normal file
28
tests/offset/shape_type_i_c/YA9
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_input.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 180
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 1.836e+007 -s 577200
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 6 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YB1
Normal file
28
tests/offset/shape_type_i_c/YB1
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_input.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 210
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 1.998e+007 -s 618600
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 6 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YB2
Normal file
28
tests/offset/shape_type_i_c/YB2
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 0.9
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 465.053 -s 629.882
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 17 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YB3
Normal file
28
tests/offset/shape_type_i_c/YB3
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 1.3
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 524.605 -s 649.688
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 17 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YB4
Normal file
28
tests/offset/shape_type_i_c/YB4
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 1.6
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 570.493 -s 664.008
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 17 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YB5
Normal file
28
tests/offset/shape_type_i_c/YB5
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 2
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 633.44 -s 682.386
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 15 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YB6
Normal file
28
tests/offset/shape_type_i_c/YB6
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 2.5
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 716.909 -s 682.741
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 15 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YB7
Normal file
28
tests/offset/shape_type_i_c/YB7
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 3.5
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 901.771 -s 692.252
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 14 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YB8
Normal file
28
tests/offset/shape_type_i_c/YB8
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 4
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 1000 -s 700
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 6 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YB9
Normal file
28
tests/offset/shape_type_i_c/YB9
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 4.3
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 1060 -s 718
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 6 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YC1
Normal file
28
tests/offset/shape_type_i_c/YC1
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple1.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 1.4
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 541.772 -s 665.099
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 17 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YC2
Normal file
28
tests/offset/shape_type_i_c/YC2
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple1.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 1.8
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 604.464 -s 682.853
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 17 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YC3
Normal file
28
tests/offset/shape_type_i_c/YC3
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple1.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 2
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 636.296 -s 691.505
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 15 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YC4
Normal file
28
tests/offset/shape_type_i_c/YC4
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple1.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 3.5
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 901.771 -s 692.252
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 14 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YC5
Normal file
28
tests/offset/shape_type_i_c/YC5
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple1.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 4
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 1000 -s 700
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 6 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YC6
Normal file
28
tests/offset/shape_type_i_c/YC6
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple1.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 4.5
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 1100 -s 730
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 6 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YC7
Normal file
28
tests/offset/shape_type_i_c/YC7
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple2.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 1.1
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 576.314 -s 626.227
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 17 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YC8
Normal file
28
tests/offset/shape_type_i_c/YC8
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple2.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 1.8
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 682.107 -s 668.86
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 17 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YC9
Normal file
28
tests/offset/shape_type_i_c/YC9
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple2.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 2.3
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 757.26 -s 696.397
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 19 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YD1
Normal file
28
tests/offset/shape_type_i_c/YD1
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple2.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 3.2
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 895.772 -s 734.031
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 20 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YD2
Normal file
28
tests/offset/shape_type_i_c/YD2
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple2.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 4.2
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 1061.61 -s 762.644
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 22 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YD3
Normal file
28
tests/offset/shape_type_i_c/YD3
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple2.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 4.7
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 1150.96 -s 775.193
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 18 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YD4
Normal file
28
tests/offset/shape_type_i_c/YD4
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple2.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 5.2
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 1244.51 -s 790.347
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 18 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YD5
Normal file
28
tests/offset/shape_type_i_c/YD5
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple3.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 0.2
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 437.086 -s 567.751
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 16 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YD6
Normal file
28
tests/offset/shape_type_i_c/YD6
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple3.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 1.5
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 638.971 -s 643.477
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 18 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YD7
Normal file
28
tests/offset/shape_type_i_c/YD7
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple3.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 2.5
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 796.631 -s 688.189
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 18 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YD8
Normal file
28
tests/offset/shape_type_i_c/YD8
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple3.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 3.6
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 980.046 -s 732.882
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 18 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YD9
Normal file
28
tests/offset/shape_type_i_c/YD9
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple3.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 4.2
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 1084.24 -s 760.754
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 19 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
33
tests/offset/shape_type_i_c/YE1
Normal file
33
tests/offset/shape_type_i_c/YE1
Normal file
@@ -0,0 +1,33 @@
|
||||
puts "TODO OCC27414 ALL: Error: The command cannot be built"
|
||||
puts "TODO OCC27414 ALL: Tcl Exception"
|
||||
puts "TODO OCC27414 ALL: TEST INCOMPLETE"
|
||||
|
||||
|
||||
restore [locate_data_file bug28442_simple3.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 5
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 1226.52 -s 799.334
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 13 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
33
tests/offset/shape_type_i_c/YE2
Normal file
33
tests/offset/shape_type_i_c/YE2
Normal file
@@ -0,0 +1,33 @@
|
||||
puts "TODO OCC27414 ALL: Error: The command cannot be built"
|
||||
puts "TODO OCC27414 ALL: Tcl Exception"
|
||||
puts "TODO OCC27414 ALL: TEST INCOMPLETE"
|
||||
|
||||
|
||||
restore [locate_data_file bug28442_simple3.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 6
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 0 -s 0
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 13 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YE3
Normal file
28
tests/offset/shape_type_i_c/YE3
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple4.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 0.8
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 508.318 -s 619.149
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 21 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YE4
Normal file
28
tests/offset/shape_type_i_c/YE4
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple4.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 1.4
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 593.919 -s 655.117
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 21 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YE5
Normal file
28
tests/offset/shape_type_i_c/YE5
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple4.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 1.7
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 636.586 -s 669.86
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 20 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YE6
Normal file
28
tests/offset/shape_type_i_c/YE6
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple4.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 2.7
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 783.404 -s 711.46
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 17 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YE7
Normal file
28
tests/offset/shape_type_i_c/YE7
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple4.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 3.5
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 914.348 -s 717.153
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 14 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YE8
Normal file
28
tests/offset/shape_type_i_c/YE8
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple4.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 4.5
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 1100.29 -s 736.424
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 14 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YE9
Normal file
28
tests/offset/shape_type_i_c/YE9
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple5.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 0.9
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 522.676 -s 625.27
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 21 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YF1
Normal file
28
tests/offset/shape_type_i_c/YF1
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple5.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 1.2
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 565.605 -s 642.455
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 19 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YF2
Normal file
28
tests/offset/shape_type_i_c/YF2
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple5.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 2
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 680.704 -s 684.886
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 20 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YF3
Normal file
28
tests/offset/shape_type_i_c/YF3
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple5.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 2.7
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 784.337 -s 712.928
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 17 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YF4
Normal file
28
tests/offset/shape_type_i_c/YF4
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple5.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 3
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 831.255 -s 714.751
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 14 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YF5
Normal file
28
tests/offset/shape_type_i_c/YF5
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple5.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 3.5
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 914.786 -s 720.359
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 14 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YF6
Normal file
28
tests/offset/shape_type_i_c/YF6
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple5.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 4.7
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 1140 -s 742
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 6 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YF7
Normal file
28
tests/offset/shape_type_i_c/YF7
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple6.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 1
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 560.833 -s 623.318
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 21 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YF8
Normal file
28
tests/offset/shape_type_i_c/YF8
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple6.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 1.5
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 635.5 -s 653.92
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 19 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YF9
Normal file
28
tests/offset/shape_type_i_c/YF9
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple6.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 3
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 858.491 -s 730.878
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 17 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YG1
Normal file
28
tests/offset/shape_type_i_c/YG1
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple6.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 3.5
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 937.546 -s 742.895
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 16 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YG2
Normal file
28
tests/offset/shape_type_i_c/YG2
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple7.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 0.9
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 532.498 -s 625.58
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 21 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YG3
Normal file
28
tests/offset/shape_type_i_c/YG3
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple7.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 1.3
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 591.624 -s 647.796
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 21 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YG4
Normal file
28
tests/offset/shape_type_i_c/YG4
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple7.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 1.7
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 650.813 -s 669.163
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 22 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YG5
Normal file
28
tests/offset/shape_type_i_c/YG5
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple7.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 3
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 849.197 -s 722.694
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 20 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YG6
Normal file
28
tests/offset/shape_type_i_c/YG6
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple7.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 4
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 1016.84 -s 750.316
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 18 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YG7
Normal file
28
tests/offset/shape_type_i_c/YG7
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple8.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 3.5
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 1446.71 -s 1074.67
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 25 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YG8
Normal file
28
tests/offset/shape_type_i_c/YG8
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple8.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 5
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 1837.67 -s 1118.82
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 24 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YG9
Normal file
28
tests/offset/shape_type_i_c/YG9
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple8.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 5.5
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 1973.21 -s 1128.39
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 24 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YH1
Normal file
28
tests/offset/shape_type_i_c/YH1
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple8.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 6.2
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 2169.52 -s 1151.22
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 22 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YH2
Normal file
28
tests/offset/shape_type_i_c/YH2
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple8.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 7.3
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 2490.91 -s 1189.42
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 14 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YH3
Normal file
28
tests/offset/shape_type_i_c/YH3
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple8.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 8
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 2700 -s 1230
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 6 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YH4
Normal file
28
tests/offset/shape_type_i_c/YH4
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple9.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 2.3
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 1173.38 -s 1002.15
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 22 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YH5
Normal file
28
tests/offset/shape_type_i_c/YH5
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple9.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 4
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 1596 -s 1099.91
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 16 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YH6
Normal file
28
tests/offset/shape_type_i_c/YH6
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple9.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 5.5
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 1977 -s 1167.43
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 15 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YH7
Normal file
28
tests/offset/shape_type_i_c/YH7
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple9.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 7
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 2400 -s 1160
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 6 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YH8
Normal file
28
tests/offset/shape_type_i_c/YH8
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple9.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 7.5
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 2550 -s 1195
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 6 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YH9
Normal file
28
tests/offset/shape_type_i_c/YH9
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple10.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 2.3
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 1173.38 -s 1002.15
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 22 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YI1
Normal file
28
tests/offset/shape_type_i_c/YI1
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple10.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 3.3
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 1420.77 -s 1055.6
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 22 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YI2
Normal file
28
tests/offset/shape_type_i_c/YI2
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple10.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 4.2
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 1649.74 -s 1092.64
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 16 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YI3
Normal file
28
tests/offset/shape_type_i_c/YI3
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple10.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 5.2
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 1914.35 -s 1128.32
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 15 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YI4
Normal file
28
tests/offset/shape_type_i_c/YI4
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple10.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 6.5
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 2271.64 -s 1187.85
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 13 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YI5
Normal file
28
tests/offset/shape_type_i_c/YI5
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple10.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 7.5
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 2555.91 -s 1227.21
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 12 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YI6
Normal file
28
tests/offset/shape_type_i_c/YI6
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple10.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 9.3
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 3090 -s 1321
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 6 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YI7
Normal file
28
tests/offset/shape_type_i_c/YI7
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple11.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 2.5
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 1196.69 -s 1020.67
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 24 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YI8
Normal file
28
tests/offset/shape_type_i_c/YI8
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple11.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 3.5
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 1442.83 -s 1065.3
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 25 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YI9
Normal file
28
tests/offset/shape_type_i_c/YI9
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple11.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 4.2
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 1622.85 -s 1081.68
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 23 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YJ1
Normal file
28
tests/offset/shape_type_i_c/YJ1
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple11.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 5
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 1837.33 -s 1101.2
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 22 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YJ2
Normal file
28
tests/offset/shape_type_i_c/YJ2
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple11.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 5.5
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 1976.05 -s 1125.25
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 22 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YJ3
Normal file
28
tests/offset/shape_type_i_c/YJ3
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple11.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 6.2
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 2172.83 -s 1149.47
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 21 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YJ4
Normal file
28
tests/offset/shape_type_i_c/YJ4
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple11.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 7.3
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 2493.03 -s 1195.43
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 14 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YJ5
Normal file
28
tests/offset/shape_type_i_c/YJ5
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple11.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 8
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 2700.83 -s 1235.47
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 10 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YJ6
Normal file
28
tests/offset/shape_type_i_c/YJ6
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple11.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 9.2
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 3060 -s 1314
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 6 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YJ7
Normal file
28
tests/offset/shape_type_i_c/YJ7
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple12.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 2.5
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 1163.57 -s 1020.66
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 20 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YJ8
Normal file
28
tests/offset/shape_type_i_c/YJ8
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple12.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 3.2
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 1327.75 -s 1049.86
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 20 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YJ9
Normal file
28
tests/offset/shape_type_i_c/YJ9
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple12.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 4.4
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 1640.18 -s 1049.39
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 16 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YK1
Normal file
28
tests/offset/shape_type_i_c/YK1
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple12.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 5
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 1810.17 -s 1052.79
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 10 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YK2
Normal file
28
tests/offset/shape_type_i_c/YK2
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple12.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 6
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 2102.46 -s 1105.62
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 10 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YK3
Normal file
28
tests/offset/shape_type_i_c/YK3
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple13.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 3.1
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 1316.75 -s 1063.5
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 21 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
28
tests/offset/shape_type_i_c/YK4
Normal file
28
tests/offset/shape_type_i_c/YK4
Normal file
@@ -0,0 +1,28 @@
|
||||
restore [locate_data_file bug28442_simple13.brep] s
|
||||
|
||||
offsetparameter 1e-7 c i r
|
||||
offsetload s 0
|
||||
|
||||
foreach f [explode s f] {
|
||||
mksurface surf $f
|
||||
set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
|
||||
if {$found == 0} {
|
||||
continue
|
||||
}
|
||||
# reverse normal direction for faces with orientation REVERSED
|
||||
if {[regexp {REVERSED} [whatis $f]]} {
|
||||
set z [expr -1*$z]
|
||||
}
|
||||
# set offset value for top faces only
|
||||
if {abs($z - 1) < 1.e-7 } {
|
||||
offsetonface $f 5
|
||||
}
|
||||
}
|
||||
offsetperform result
|
||||
|
||||
checkprops result -v 1811.61 -s 1059.5
|
||||
|
||||
unifysamedom result_unif result
|
||||
checknbshapes result_unif -face 14 -shell 1
|
||||
|
||||
checkview -display result_unif -2d -path ${imagedir}/${test_image}.png
|
||||
Reference in New Issue
Block a user