0024923: BRepMesh_CircleTool produces bad circles
[occt.git] / tests / bugs / mesh / bug25519
CommitLineData
13cd069d 1puts "================"
2puts "CR25519"
3puts "================"
4puts ""
5###############################################
6## BRepMesh can break mesh regularity for BSpline surfaces
7###############################################
8
9restore [locate_data_file bug25519_testtriangulation.brep] a
10
11tclean a
12incmesh a 0.01
13front
14fit
15isos a 0
16triangles a
17
18set trinfo_s [trinfo a]
19regexp {([0-9]+) triangles} ${trinfo_s} str nbtri_s
20regexp {([0-9]+) nodes} ${trinfo_s} str nbnod_s
21regexp {deflection ([0-9.+e-]+)} ${trinfo_s} str defl_s
22
23set good_nbtri 2721
24set good_nbnod 1405
ec26bf88 25set good_defl 0.044436924588798624
13cd069d 26
27set good_percent 5
28
29set nbtri_percent [expr abs (${good_nbtri} - ${nbtri_s}) / double (${nbtri_s}) * 100 ]
30set nbnod_percent [expr abs (${good_nbnod} - ${nbnod_s}) / double (${nbnod_s}) * 100 ]
31set defl_percent [expr abs (${good_defl} - ${defl_s}) / ${defl_s} * 100 ]
32
33if { ${nbtri_percent} > ${good_percent} } {
34 puts "Error: triangle number is bad, it has changed to ${nbtri_percent} %"
35}
36
37if { ${nbnod_percent} > ${good_percent} } {
38 puts "Error: node number is bad, it has changed to ${nbnod_percent} %"
39}
40
41if { ${defl_percent} > ${good_percent} } {
42 puts "Error: deflection is bad, it has changed to ${defl_percent} %"
43}
44
45set only_screen_axo 1