1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
puts "REQUIRED All: Faulty shapes in variables faulty_1 to faulty_2"
box b1 10 10 10
box b2 2.5 0 0 5 10 5
shape s1 So
shape s2 So
shape sh1 Sh
shape sh2 Sh
foreach f [lrange [explode b1 f] 0 4] { add $f sh1 }
foreach f [lrange [explode b2 f] 0 4] { add $f sh2 }
add sh1 s1
add sh2 s2
bclearobjects
bcleartools
baddobjects s1
baddtools s2
bfillds
bbop r0 0
bbop r1 1
bbop r2 2
bbop r3 3
foreach r {r0 r1 r2 r3} {
checkshape $r
if {![regexp "OK" [bopcheck $r]]} {
puts "Error: shape is self-interfered"
}
}
checknbshapes r0 -vertex 8 -edge 12 -wire 5 -face 5 -shell 1 -solid 1
checkprops r0 -s 200
checknbshapes r1 -vertex 16 -edge 24 -wire 9 -face 9 -shell 1 -solid 1
checkprops r1 -s 500
checknbshapes r2 -vertex 16 -edge 24 -wire 8 -face 8 -shell 1 -solid 1
checkprops r2 -s 500
checknbshapes r3 -vertex 0 -edge 0 -wire 0 -face 0 -shell 0 -solid 0
checkprops r3 -s empty
|