mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-04 18:06:22 +03:00
Improve the algorithm BRepPrimAPI_MakeHalfSpace. Earlier it made projection of the point only on faces. If the nearest point does not conform to normal projection criterion the result is wrong. The fix includes search of projection on edges and vertices. This makes the algorithm robust for half spaces with boundaries.
20 lines
525 B
Plaintext
20 lines
525 B
Plaintext
puts "========"
|
|
puts "OCC28830"
|
|
puts "========"
|
|
puts ""
|
|
########################################
|
|
# HalfSpace command chooses the wrong side of the given shell
|
|
########################################
|
|
|
|
# Restore the initial shape
|
|
restore [locate_data_file bug28830_halfspace.brep] sh
|
|
|
|
point p 9.30222203002736 0.87421058209264 1.54257060749683
|
|
halfspace h sh 9.30222203002736 0.87421058209264 1.54257060749683
|
|
|
|
if {![regexp "IN" [bclassify h p]]} {
|
|
puts "Error: halfspace is wrong"
|
|
} else {
|
|
puts "OK: halfspace is good"
|
|
}
|