1 # test for #22778: compare number of triangles in triangulation
2 # produced on surface converted to nurbs, against number of triangles on
3 # original analytic (spherical) surface
5 puts "TODO #22778 All: too many triangles"
7 # original face on spherical surface
8 restore [locate_data_file bug22778_square.brep] s
11 set trinfo_s [trinfo s]
12 regexp {([0-9]+) triangles} $trinfo_s str nbtri_s
14 # face converted to NURBS
19 set trinfo_r [trinfo r]
20 regexp {([0-9]+) triangles} $trinfo_r str nbtri_r
24 checktrinfo s -tri -defl 0.00072921907260989653 -tol_abs_defl 1e-6
25 checktrinfo r -tri -max_defl 0.001 -tol_abs_defl 1e-6
27 # compare number of triangles, allow twice more
28 set exptri_s [expr 2. * $nbtri_s]
29 if { $nbtri_r > $exptri_s } {
30 puts "Error: too many triangles ($nbtri_r, while ~ $exptri_s would be sufficient)"
33 # extra check: deflection on rough mesh on NURBS
36 checktrinfo r -max_defl 0.1