0033661: Data Exchange, Step Import - Tessellated GDTs are not imported
[occt.git] / tests / bugs / mesh / bug22778
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
4
5 puts "TODO #22778 All: too many triangles"
6
7 # original face on spherical surface
8 restore [locate_data_file bug22778_square.brep] s
9 checkshape s
10 incmesh s 0.001
11 set trinfo_s [trinfo s]
12 regexp {([0-9]+) triangles} $trinfo_s str nbtri_s
13
14 # face converted to NURBS
15 nurbsconvert r s
16 checkshape r
17 tclean r
18 incmesh r 0.001
19 set trinfo_r [trinfo r]
20 regexp {([0-9]+) triangles} $trinfo_r str nbtri_r
21
22
23 # check deflections
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
26
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)"
31 }
32
33 # extra check: deflection on rough mesh on NURBS
34 tclean r
35 incmesh r 0.1
36 checktrinfo r -max_defl 0.1