1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0032882: Modeling Data - Extrema curve/curve cannot find all solutions (OCCT 7.6 backport)

Extrema/Extrema_GenExtCC.gxx - estimation of Lipchitz constant is improved
Extrema_GlobOptFuncCC.cxx - function value is changed

LocOpe/LocOpe_WiresOnShape.cxx - small correction to fix regression

lowalgos/extcc/bug32882 - new test case is added

some test were updated according new behavior of extrema algo
This commit is contained in:
ifv
2022-03-21 16:55:55 +03:00
committed by kgv
parent 1955914e73
commit a626c346b4
11 changed files with 148 additions and 381 deletions

View File

@@ -18,11 +18,12 @@ mkcurve c2 e2
set info [extrema c1 c2]
# Check result
regexp {Extrema 1 is point : +([-0-9.+eE]+) +([-0-9.+eE]+) +([-0-9.+eE]+)} $info full x y z
# Point check
set good_x 0.0
set good_y 0.070710562195021642
set good_z -0.65305318986891325
checkreal "Intersection point x:" ${x} ${good_x} 0.01 0.01
checkreal "Intersection point y:" ${y} ${good_y} 0.01 0.01
checkreal "Intersection point z:" ${z} ${good_z} 0.01 0.01
if {[regexp "ext_1" $info]} {
set dist [lindex [length ext_1] end]
if { $dist > 1.0e-10 } {
puts "Error: Extrema distance is too big"
}
} else {
puts "Error: Extrema is not found"
}

View File

@@ -0,0 +1,36 @@
puts "========"
puts "OCC32882: Modeling Data - Extrema curve/curve cannot find all solutions"
puts "========"
puts ""
# Read input
restore [locate_data_file bug32882.brep] cc
explode cc
# Extract geometry from topology
mkcurve c1 cc_1
mkcurve c2 cc_2
mkcurve c3 cc_3
# Run extrema c1/c3
set info [extrema c1 c3]
# Check number of solution
if { [llength $info] != 3 } {
puts "Error: Invalid extrema number in extrema c1-c3 output"
}
# Check result
checklength ext_1 -l 2.929642751e-14 -eps .01
checklength ext_2 -l 3.480934286e-14 -eps .01
checklength ext_3 -l 3.177643716e-14 -eps .01
# Run extrema c3/c2
set info [extrema c3 c2]
# Check number of solutions
if { [llength $info] != 2 } {
puts "Error: Invalid extrema number in extrema c3-c2 output"
}
checklength ext_1 -l 5.684341886e-14 -eps .01
checklength ext_2 -l 2.929642751e-14 -eps .01