1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-05 18:16:23 +03:00

0025207: GCPnts_QuasiUniformDeflection achieves incorrect result on some curve.

Test case for issue CR25207
This commit is contained in:
jgv 2014-09-25 14:43:28 +04:00 committed by bugmaster
parent ca3c13d1e8
commit d8726c7c6b
2 changed files with 41 additions and 1 deletions

View File

@ -144,7 +144,7 @@ static Standard_Boolean PerformCurve (TColStd_SequenceOfReal& Parameters,
const Standard_Real EPSILON, const Standard_Real EPSILON,
const GeomAbs_Shape Continuity) const GeomAbs_Shape Continuity)
{ {
Standard_Integer Nbmin = 21; Standard_Integer Nbmin = 2;
gp_Pnt Pdeb; gp_Pnt Pdeb;
if (Continuity <= GeomAbs_G1) if (Continuity <= GeomAbs_G1)

40
tests/bugs/moddata_3/bug25207 Executable file
View File

@ -0,0 +1,40 @@
puts "============"
puts "CR25207"
puts "==========="
puts ""
###############################################################################
# GCPnts_QuasiUniformDeflection achieves incorrect result on some curve.
###############################################################################
restore [locate_data_file bug25207_DumpShape2.brep] cc
mkcurve cc cc
set info [crvpoints r cc 1.e-3]
set str1 "Nb points +: +(\[-0-9.+eE\]+)\n"
set str2 "Max defl: +(\[-0-9.+eE\]+) +(\[-0-9.+eE\]+) +(\[-0-9.+eE\]+) +(\[-0-9.+eE\]+)"
regexp "${str1}${str2}" ${info} full Nb dmax ufmax ulmax i
set expected_Nb 76
if { ${Nb} != ${expected_Nb} } {
puts "Error : bad value of Nb points=${Nb}"
}
set tol_abs 1.0e-05
set tol_rel 0.01
set expected_dmax 5.8270132894239685e-10
set expected_ufmax 0.984375
checkreal "dmax" ${dmax} ${expected_dmax} ${tol_abs} ${tol_rel}
checkreal "ufmax" ${ufmax} ${expected_ufmax} ${tol_abs} ${tol_rel}
set expected_ulmax 1
if { ${ulmax} != ${expected_ulmax} } {
puts "Error : bad value of ulmax=${ulmax}"
}
set expected_i 77
if { ${i} != ${expected_i} } {
puts "Error : bad value of i=${i}"
}