0025423: Incorrect result of splitting some shapes
[occt.git] / tests / bugs / modalg_6 / bug21507
CommitLineData
687574c0 1puts "=========="
2puts "OCC21507"
3puts "=========="
4puts ""
5############################################################
6# Bug in BOP: bcut produces invalid result without notice
7############################################################
8
9# Demonstrates bug in bcut command
10pload XDE
11
12# Load face
13puts "Loading face"
14restore [locate_data_file bug21507_bcut_bug_face.brep] face
15
16# Make tool - an elliptic cylinder
17puts "Constructing tool"
18ellipse c 10000 0 0 0 1 0 600 300
19mkedge e c
20wire w e
21tcopy w w1
22tcopy w w2
23ttranslate w1 0 5000 0
24ttranslate w2 0 -5000 0
25thrusections tool 1 1 w1 w2
26
27# Check validity of face and tool
28puts "Checking face: [checkshape face]; [lrange [tolerance face] 0 1]"
29puts "Checking tool: [checkshape tool]; [lrange [tolerance tool] 0 1]"
30bopcheck face
31bopcheck tool
32
33# Do cut
34puts "Running bcut"
35bcut result face tool
36
37# Evaluate result by number of faces (bcut)
38set rfaces [explode result f]
39if { [llength $rfaces] != 1 } {
40 puts "Error: [llength $rfaces] faces instead of 1"
41} else {
42 puts "Result is as expected"
43}
44
45# Do the same using cut
46puts "Now running old cut"
47cut rcut face tool
48
49# Evaluate result by number of faces (cut)
50set rcfaces [explode rcut f]
51if { [llength $rcfaces] != 1 } {
52 puts "Error: [llength $rcfaces] faces instead of 1"
53} else {
54 puts "Result is as expected"
55}
56
5747059b 57checkview -display result -2d -path ${imagedir}/${test_image}.png