1 puts "================"
3 puts "================"
5 ###############################################
6 ## BRepMesh can break mesh regularity for BSpline surfaces
7 ###############################################
9 restore [locate_data_file bug25519_testtriangulation.brep] a
18 set trinfo_s [trinfo a]
19 regexp {([0-9]+) triangles} ${trinfo_s} str nbtri_s
20 regexp {([0-9]+) nodes} ${trinfo_s} str nbnod_s
21 regexp {deflection ([0-9.+e-]+)} ${trinfo_s} str defl_s
25 set good_defl 0.048938765264496524
29 set nbtri_percent [expr abs (${good_nbtri} - ${nbtri_s}) / double (${nbtri_s}) * 100 ]
30 set nbnod_percent [expr abs (${good_nbnod} - ${nbnod_s}) / double (${nbnod_s}) * 100 ]
31 set defl_percent [expr abs (${good_defl} - ${defl_s}) / ${defl_s} * 100 ]
33 if { ${nbtri_percent} > ${good_percent} } {
34 puts "Error: triangle number is bad, it has changed to ${nbtri_percent} %"
37 if { ${nbnod_percent} > ${good_percent} } {
38 puts "Error: node number is bad, it has changed to ${nbnod_percent} %"
41 if { ${defl_percent} > ${good_percent} } {
42 puts "Error: deflection is bad, it has changed to ${defl_percent} %"