mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +03:00
0029465: Regression relation to 691 version: Extrema_ExtCC returns IsParallel equal to true for not parallel curves
Strengthening of the criteria of the parallel status of the curves by additional checking if the ends of the curves do not diverge. Test cases for the issue.
This commit is contained in:
12
tests/lowalgos/extcc/begin
Normal file
12
tests/lowalgos/extcc/begin
Normal file
@@ -0,0 +1,12 @@
|
||||
proc CheckExtResult {info ref_dist} {
|
||||
global ext_1
|
||||
if {[regexp "ext_1" $info]} {
|
||||
set dist [lindex [length ext_1] end]
|
||||
if { $dist > $ref_dist } {
|
||||
puts "Error: Extrema distance is too big"
|
||||
}
|
||||
} else {
|
||||
puts "Error: Extrema is not found"
|
||||
}
|
||||
}
|
||||
|
29
tests/lowalgos/extcc/bug29465_1
Normal file
29
tests/lowalgos/extcc/bug29465_1
Normal file
@@ -0,0 +1,29 @@
|
||||
puts "============"
|
||||
puts "OCC29465"
|
||||
puts "============"
|
||||
puts ""
|
||||
#########################################################################
|
||||
# Regression relation to 691 version: Extrema_ExtCC returns IsParallel equal to true for not parallel curves
|
||||
#########################################################################
|
||||
|
||||
set dist 3.e-5
|
||||
|
||||
restore [locate_data_file bug29465.brep] ce
|
||||
explode ce e
|
||||
mkcurve c1 ce_1
|
||||
mkcurve c2 ce_2
|
||||
|
||||
CheckExtResult [extrema c1 c2] $dist
|
||||
CheckExtResult [extrema c2 c1] $dist
|
||||
|
||||
reverse c1
|
||||
CheckExtResult [extrema c1 c2] $dist
|
||||
CheckExtResult [extrema c2 c1] $dist
|
||||
|
||||
reverse c2
|
||||
CheckExtResult [extrema c1 c2] $dist
|
||||
CheckExtResult [extrema c2 c1] $dist
|
||||
|
||||
reverse c1
|
||||
CheckExtResult [extrema c1 c2] $dist
|
||||
CheckExtResult [extrema c2 c1] $dist
|
31
tests/lowalgos/extcc/bug29465_2
Normal file
31
tests/lowalgos/extcc/bug29465_2
Normal file
@@ -0,0 +1,31 @@
|
||||
puts "============"
|
||||
puts "OCC29465"
|
||||
puts "============"
|
||||
puts ""
|
||||
#########################################################################
|
||||
# Regression relation to 691 version: Extrema_ExtCC returns IsParallel equal to true for not parallel curves
|
||||
#########################################################################
|
||||
|
||||
set dist 0.2
|
||||
|
||||
restore [locate_data_file bug27371.brep] s
|
||||
explode s
|
||||
explode s_1 e
|
||||
mkcurve c1 s_1_1
|
||||
explode s_2 e
|
||||
mkcurve c2 s_2_20
|
||||
|
||||
CheckExtResult [extrema c1 c2] $dist
|
||||
CheckExtResult [extrema c2 c1] $dist
|
||||
|
||||
reverse c1
|
||||
CheckExtResult [extrema c1 c2] $dist
|
||||
CheckExtResult [extrema c2 c1] $dist
|
||||
|
||||
reverse c2
|
||||
CheckExtResult [extrema c1 c2] $dist
|
||||
CheckExtResult [extrema c2 c1] $dist
|
||||
|
||||
reverse c1
|
||||
CheckExtResult [extrema c1 c2] $dist
|
||||
CheckExtResult [extrema c2 c1] $dist
|
Reference in New Issue
Block a user