File: bug25519

package info (click to toggle)
oce 0.18.3-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 301,548 kB
  • sloc: cpp: 1,190,609; ansic: 67,225; sh: 11,630; tcl: 7,954; cs: 5,221; python: 2,867; java: 1,522; makefile: 342; xml: 292; perl: 37
file content (45 lines) | stat: -rw-r--r-- 1,255 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
puts "================"
puts "CR25519"
puts "================"
puts ""
###############################################
## BRepMesh can break mesh regularity for BSpline surfaces
###############################################

restore [locate_data_file bug25519_testtriangulation.brep] a

tclean a
incmesh a 0.01
front
fit
isos a 0
triangles a

set trinfo_s [trinfo a]
regexp {([0-9]+) triangles} ${trinfo_s} str nbtri_s
regexp {([0-9]+) nodes} ${trinfo_s} str nbnod_s
regexp {deflection ([0-9.+e-]+)} ${trinfo_s} str defl_s

set good_nbtri 2721
set good_nbnod 1405
set good_defl 0.044436924588798624

set good_percent 5

set nbtri_percent [expr abs (${good_nbtri} - ${nbtri_s}) / double (${nbtri_s}) * 100 ]
set nbnod_percent [expr abs (${good_nbnod} - ${nbnod_s}) / double (${nbnod_s}) * 100 ]
set defl_percent  [expr abs (${good_defl} - ${defl_s}) / ${defl_s} * 100 ]

if { ${nbtri_percent} > ${good_percent} } {
  puts "Error: triangle number is bad, it has changed to ${nbtri_percent} %"
}

if { ${nbnod_percent} > ${good_percent} } {
  puts "Error: node number is bad, it has changed to ${nbnod_percent} %"
}

if { ${defl_percent} > ${good_percent} } {
  puts "Error: deflection is bad, it has changed to ${defl_percent} %"
}

set only_screen_axo 1