1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00
occt/tests/bugs/modalg_6/bug21507
emv efac173377 0030151: Modeling Algorithms - Removal of the API level of old Boolean operations algorithm (BRepAlgo_BooleanOperation)
The following classes have been removed as obsolete:
- BRepAlgo_BooleanOperation
- BRepAlgo_Fuse
- BRepAlgo_Cut
- BRepAlgo_Common
- BRepAlgo_Section

The corresponding classes from BRepAlgoAPI package have to be used instead.

Draw commands:
- fuse
- cut
- common
- section/psection
have also been removed as obsolete.

The corresponding commands for modern Boolean operations algorithm (bfuse/bcut/bcommon/bsection) have to be used instead.

Adjustment of the test cases to use the commands for modern algorithm.
2021-09-10 20:24:50 +03:00

46 lines
1.1 KiB
Plaintext

puts "=========="
puts "OCC21507"
puts "=========="
puts ""
############################################################
# Bug in BOP: bcut produces invalid result without notice
############################################################
# Demonstrates bug in bcut command
pload XDE
# Load face
puts "Loading face"
restore [locate_data_file bug21507_bcut_bug_face.brep] face
# Make tool - an elliptic cylinder
puts "Constructing tool"
ellipse c 10000 0 0 0 1 0 600 300
mkedge e c
wire w e
tcopy w w1
tcopy w w2
ttranslate w1 0 5000 0
ttranslate w2 0 -5000 0
thrusections tool 1 1 w1 w2
# Check validity of face and tool
puts "Checking face: [checkshape face]; [lrange [tolerance face] 0 1]"
puts "Checking tool: [checkshape tool]; [lrange [tolerance tool] 0 1]"
bopcheck face
bopcheck tool
# Do cut
puts "Running bcut"
bcut result face tool
# Evaluate result by number of faces (bcut)
set rfaces [explode result f]
if { [llength $rfaces] != 1 } {
puts "Error: [llength $rfaces] faces instead of 1"
} else {
puts "Result is as expected"
}
checkview -display result -2d -path ${imagedir}/${test_image}.png