Files
OCCT/tests/bugs/moddata_3/bug27890
Pasukhin Dmitry 39db714224 Modeling Data - Migrate BndLib to delegate to GeomBndLib (#1137)
- Replace monolithic switch statements in BndLib_Add3dCurve, BndLib_AddSurface, and BndLib_Add2dCurve with thin wrappers delegating to GeomBndLib_Curve, GeomBndLib_Surface, and GeomBndLib_Curve2d respectively.
- Remove now-dead internal helpers AddGenCurv, AddGenSurf, and BndLib_Box2dCurve. Public BndLib API is preserved unchanged.
- Implement proper BoxOptimal() in GeomBndLib_OffsetSurface: try the analytic equivalent surface first (offset plane -> plane, offset sphere -> sphere), then fall back to OtherSurface PSO sampling for general cases.
- Refactor GeomBndLib_OffsetCurve2d to share exact fast paths for line and circle offsets between Box() and BoxOptimal(), matching the 3D OffsetCurve pattern; BoxOptimal falls back to OtherCurve2d PSO for general curves.
- Update tests to reflect tighter bounds from GeomBndLib delegation.
2026-03-07 17:55:33 +00:00

35 lines
1014 B
Plaintext
Executable File

puts "============"
puts "CR27890"
puts "==========="
puts ""
###############################################################################
# BndLib_Add2dCurve::Add(..) works incorrect on some curves
###############################################################################
restore [locate_data_file bug27890_t1.draw]
set rr [gbounding bug27890_t1]
regexp { *([-0-9.+eE]+) +([-0-9.+eE]+) +([-0-9.+eE]+) +([-0-9.+eE]+)} $rr full v1_x v1_y v2_x v2_y
set tol_abs 1.0e-4
set tol_rel 0.0001
set expected_v1_x -34.696157014910277
checkreal "v1_x" ${v1_x} ${expected_v1_x} ${tol_abs} ${tol_rel}
set expected_v1_y -70.031982331514001
checkreal "v1_y" ${v1_y} ${expected_v1_y} ${tol_abs} ${tol_rel}
set expected_v2_x -15.500706089827537
checkreal "v2_x" ${v2_x} ${expected_v2_x} ${tol_abs} ${tol_rel}
set expected_v2_y -21.06204133417317
checkreal "v2_y" ${v2_y} ${expected_v2_y} ${tol_abs} ${tol_rel}
#v2d2
view 1 -2D- 728 20 400 400
2dfit
checkview -screenshot -2d -path ${imagedir}/${test_image}.png