5 ############################################################
6 # Bug in BOP: bcut produces invalid result without notice
7 ############################################################
9 # Demonstrates bug in bcut command
14 restore [locate_data_file bug21507_bcut_bug_face.brep] face
16 # Make tool - an elliptic cylinder
17 puts "Constructing tool"
18 ellipse c 10000 0 0 0 1 0 600 300
23 ttranslate w1 0 5000 0
24 ttranslate w2 0 -5000 0
25 thrusections tool 1 1 w1 w2
27 # Check validity of face and tool
28 puts "Checking face: [checkshape face]; [lrange [tolerance face] 0 1]"
29 puts "Checking tool: [checkshape tool]; [lrange [tolerance tool] 0 1]"
37 # Evaluate result by number of faces (bcut)
38 set rfaces [explode result f]
39 if { [llength $rfaces] != 1 } {
40 puts "Error: [llength $rfaces] faces instead of 1"
42 puts "Result is as expected"
45 # Do the same using cut
46 puts "Now running old cut"
49 # Evaluate result by number of faces (cut)
50 set rcfaces [explode rcut f]
51 if { [llength $rcfaces] != 1 } {
52 puts "Error: [llength $rcfaces] faces instead of 1"
54 puts "Result is as expected"