2bc5e8f1 |
1 | puts "=========" |
2 | puts "OCC24244" |
3 | puts "=========" |
4 | puts "" |
5 | ########################################################### |
6 | # Command bclear in DRAW does not clear all the data required for BOP re-initialization |
7 | ########################################################### |
8 | |
9 | vinit View1 |
10 | |
11 | proc bclear_proc {} { |
12 | brestore [locate_data_file bug24244_ShellExternalHull.brep] hull |
13 | |
14 | # box encompassing all objects |
15 | box over -11 -15 -1 220 30 22 |
16 | |
17 | # two simplified decks |
18 | box b -10 -14 10 210 28 5 |
19 | explode b f |
20 | renamevar b_5 deck1 |
21 | renamevar b_6 deck2 |
22 | |
23 | # two simplified transverse bulkheads in the middle |
24 | box b 50 -14 -0.5 40 28 20 |
25 | explode b f |
26 | renamevar b_1 bhd1 |
27 | renamevar b_2 bhd2 |
28 | |
29 | # two simplified transverse bulkheads in the fore |
30 | box b 180 -14 -0.5 10 28 20 |
31 | explode b f |
32 | renamevar b_1 bhd3 |
33 | renamevar b_2 bhd4 |
34 | |
35 | # fill BOP data structures |
36 | bclear |
37 | baddobjects over hull deck1 deck2 bhd1 bhd2 bhd3 bhd4 |
38 | bfillds |
39 | bbuild result |
40 | |
41 | # check validity |
42 | puts [checkshape result] |
43 | |
44 | # show compartments (solids) in shading with different colors |
45 | set compartments [explode result so] |
46 | set icol 0 |
47 | set colors {red green blue1 magenta1 yellow cyan1 brown} |
48 | foreach s [lrange $compartments 1 end] { |
49 | vdisplay $s |
50 | vsetcolor $s [lindex $colors [expr [incr icol] % [llength $colors]]] |
51 | vsetdispmode $s 1 |
52 | vsetmaterial $s plastic |
53 | } |
54 | |
55 | # show all elements in wireframe |
56 | vdisplay result |
57 | vsetdispmode result 0 |
58 | vfit |
59 | } |
60 | |
61 | bclear_proc |
62 | bclear_proc |
63 | |
5747059b |
64 | checkview -screenshot -3d -path ${imagedir}/${test_image}.png |