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