1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-05 18:16:23 +03:00
occt/tests/bugs/modalg_5/bug24585_1
nbv c2c2f2b62c 0024585: Wrong pcurve of the section curve
PCurve is extended to surface boundary forcefully.
It is made by finding some additional points (if it is possibly).
"bopcurves" DRAW-command returns number of found 3D-curves and (as an option) 2D-curve (see help for more detail information).

Test cases for issue CR24585
2014-02-13 14:04:42 +04:00

77 lines
2.0 KiB
Plaintext

puts "========="
puts "OCC24585"
puts "========="
puts ""
###########################################################
# Wrong pcurve of the section curve
###########################################################
set MaxTol 1.0e-7
set NbCurv_OK 1
restore [locate_data_file bug24585_b1.brep] b1
restore [locate_data_file bug24585_b2.brep] b2
mksurface s1 b1
bounds s1 U1f_exp U1l_exp V1f_exp V1l_exp
set log [bopcurves b1 b2 -2d]
regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} ${log} full Toler NbCurv
if {${NbCurv} != ${NbCurv_OK}} {
puts "Error: ${NbCurv_OK} curve(s) expected, but ${NbCurv} found."
}
if {${Toler} > ${MaxTol}} {
puts "Error: Tolerance is too big!"
}
#Theoretically, c2d1_1 must cover U-diapason of surface s1 fully.
set log [dump c2d1_1]
regexp {Degree +([-0-9.+eE]+), +([-0-9.+eE]+) Poles, +([-0-9.+eE]+)} ${log} full Degree Poles KnotsPoles
puts "Degree=${Degree}"
puts "Poles=${Poles}"
puts "KnotsPoles=${KnotsPoles}"
puts ""
set Pole 1
set exp_string " +${Pole} : +(\[-0-9.+eE\]+), +(\[-0-9.+eE\]+)"
regexp ${exp_string} ${log} full U_begin V_begin
puts "Pole=${Pole}"
puts "U_begin=${U_begin}"
puts "V_begin=${V_begin}"
dset U_begin ${U_begin}
puts ""
set Pole ${Poles}
set exp_string " +${Pole} : +(\[-0-9.+eE\]+), +(\[-0-9.+eE\]+)"
regexp ${exp_string} ${log} full U_end V_end
puts "Pole=${Pole}"
puts "U_end=${U_end}"
puts "V_end=${V_end}"
dset U_end ${U_end}
puts ""
set delta_f [dval U1f_exp-U_begin]
#ATTENTION!!! U_begin must be strictly equal U1f_exp (without any tolerance)
if {${delta_f} != 0} {
puts "Error: Bad value. U_begin = [dval U_begin], Ufirst = [dval U1f_exp]."
} else {
puts "OK: Good value. U_begin matches with Ufirst of surface."
}
puts ""
set delta_l [dval U1l_exp-U_end]
#ATTENTION!!! U_end must be strictly equal U1l_exp (without any tolerance)
if {${delta_l} != 0} {
puts "Error: Bad value. U_end = [dval U_end], Ulast = [dval U1l_exp]."
} else {
puts "OK: Good value. U_end matches with Ulast of surface."
}