5 ###########################################################
6 # Command bclear in DRAW does not clear all the data required for BOP re-initialization
7 ###########################################################
12 brestore [locate_data_file bug24244_ShellExternalHull.brep] hull
14 # box encompassing all objects
15 box over -11 -15 -1 220 30 22
17 # two simplified decks
18 box b -10 -14 10 210 28 5
23 # two simplified transverse bulkheads in the middle
24 box b 50 -14 -0.5 40 28 20
29 # two simplified transverse bulkheads in the fore
30 box b 180 -14 -0.5 10 28 20
35 # fill BOP data structures
37 baddobjects over hull deck1 deck2 bhd1 bhd2 bhd3 bhd4
42 puts [checkshape result]
44 # show compartments (solids) in shading with different colors
45 set compartments [explode result so]
47 set colors {red green blue magenta yellow cyan brown}
48 foreach s [lrange $compartments 1 end] {
50 vsetcolor $s [lindex $colors [expr [incr icol] % [llength $colors]]]
52 vsetmaterial $s plastic
55 # show all elements in wireframe
64 checkview -screenshot -3d -path ${imagedir}/${test_image}.png