mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0031407: [Regression to 7.3.0] Extrema does not process parallel circles correctly
Use correct ranges of circles when processing the concentric case. Repeat the range comparison 3 times shifting each time for a half-period to process the extrema between boundary points of arcs.
This commit is contained in:
13
tests/bugs/modalg_7/bug31407_1
Normal file
13
tests/bugs/modalg_7/bug31407_1
Normal file
@@ -0,0 +1,13 @@
|
||||
puts "========"
|
||||
puts "0031407: Extrema does not process parallel circles correctly"
|
||||
puts "========"
|
||||
puts ""
|
||||
|
||||
circle c1 0 0 0 0 0 1 5
|
||||
circle c2 0 0 0 0 0 1 10
|
||||
|
||||
if { [regexp "Infinite number of extremas" [extrema c1 c2]] == 1} {
|
||||
puts "OK : Circles are treated as concentric"
|
||||
} else {
|
||||
puts "Error : Extrema does not find the circles are parallel"
|
||||
}
|
13
tests/bugs/modalg_7/bug31407_2
Normal file
13
tests/bugs/modalg_7/bug31407_2
Normal file
@@ -0,0 +1,13 @@
|
||||
puts "========"
|
||||
puts "0031407: Extrema does not process parallel circles correctly"
|
||||
puts "========"
|
||||
puts ""
|
||||
|
||||
circle c1 0 0 0 0 0 -1 5
|
||||
circle c2 0 0 0 0 0 1 10
|
||||
|
||||
if { [regexp "Infinite number of extremas" [extrema c1 c2]] == 1} {
|
||||
puts "OK : Circles are treated as concentric"
|
||||
} else {
|
||||
puts "Error : Extrema does not find the circles are parallel"
|
||||
}
|
20
tests/bugs/modalg_7/bug31407_3
Normal file
20
tests/bugs/modalg_7/bug31407_3
Normal file
@@ -0,0 +1,20 @@
|
||||
puts "========"
|
||||
puts "0031407: Extrema does not process parallel circles correctly"
|
||||
puts "========"
|
||||
puts ""
|
||||
|
||||
circle c1 0 0 0 0 0 1 5
|
||||
circle c2 0 0 0 0 0 1 10
|
||||
|
||||
trim cc1 c1 0 2
|
||||
trim cc2 c2 2 4
|
||||
|
||||
set res_extrema [extrema cc1 cc2]
|
||||
|
||||
if { [regexp "Infinite number of extremas" $res_extrema] == 0} {
|
||||
if {[llength $res_extrema] != 1} {
|
||||
puts "Error : expected 1 extrema, but found [llength $res_extrema]"
|
||||
}
|
||||
} else {
|
||||
puts "Error : Infinite number of extremas is found"
|
||||
}
|
Reference in New Issue
Block a user