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_5/bug21564
aml 0cbfb9f151 0021564: Intersection of two planar faces produces curve with too many poles
I ComputePurgedWLine() function:
Excess points in walking line are deleted when:
1) Distance between neighboring points too small.
2) Points lie in one pipe without big jump on chord length.

III
Fixed problem with extremaPC with too close knot distribution to [minParam, maxParam] borders.

IV ApproxInt_Approx.gxx
New division criteria in intersection approximator.

III Test case
Test cases update to the new behavior.
Test case for CR21564

Correction of test cases for issue CR21564
2015-08-13 11:04:48 +03:00

62 lines
2.0 KiB
Plaintext

puts "================"
puts "OCC21564"
puts "================"
puts ""
#######################################################################
# Intersection of two planar faces produces curve with too many poles
#######################################################################
puts "Construct horizontal plane, convert it to b-spline, and create a face on it"
plane p1 0 0 0 0 0 1
trim p1t p1 -10 10 -10 10
convert bs1 p1t
mkface f1 bs1
puts "Construct vertical plane and face on it"
plane p2 0 0 0 1 0 0
mkface f2 p2 -10 10 -10 10
puts "\nBuild intersection of two faces"
bsection sec f1 f2
puts "Check number of points in resulting curve"
if { ! [regexp {([0-9]+) Poles} [dump sec] str nbp] } {
puts "Error: Could not check number of poles in resulting curve!"
} elseif { $nbp != 2 } {
puts "Error: Intersection curve has too many poles ($nbp while 2 is expected)"
}
puts "\nBuild intersection with approximation of resulting curve"
bsection sec f1 f2 -a
puts "Check number of points in resulting curve"
if { ! [regexp {([0-9]+) Poles} [dump sec] str nbp] } {
puts "Error: Could not check number of poles in resulting curve!"
} elseif { $nbp != 2 } {
puts "Error: Intersection curve has too many poles ($nbp while 2 is expected)"
}
puts "\nNow trying with inclined plane"
plane p2 0 0 0 1 2 0
mkface f2 p2 -15 15 -15 15
puts "\nBuild intersection of two faces"
bsection sec f1 f2
puts "Check number of points in resulting curve"
if { ! [regexp {([0-9]+) Poles} [dump sec] str nbp] } {
puts "Error: Could not check number of poles in resulting curve!"
} elseif { $nbp != 2 } {
puts "Error: Intersection curve has too many poles ($nbp while 2 is expected)"
}
puts "\nBuild intersection with approximation of resulting curve"
bsection sec f1 f2 -a
puts "Check number of points in resulting curve"
if { ! [regexp {([0-9]+) Poles} [dump sec] str nbp] } {
puts "Error: Could not check number of poles in resulting curve!"
} elseif { $nbp != 2 } {
puts "Error: Intersection curve has too many poles ($nbp while 2 is expected)"
}