File: bug24899

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 (44 lines) | stat: -rw-r--r-- 1,204 bytes parent folder | download | duplicates (5)
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
puts "=========="
puts "OCC24899"
puts "=========="
puts ""
##################################################################################################
# Time of computation of intersection points with help of class BRepIntCurveSurface_Inter is big
##################################################################################################

polyline l -10 1 1 80 1 1
explode l e

restore [locate_data_file bug24899_TheHull.brep] h1
mkcurve c1 l_1
BRepIntCS c1 h1 r
distmini dd l_1 h1

dchrono t1 reset
dchrono t1 start

for { set i 0} { $i <= 100 } {incr i} {
  BRepIntCS c1 h1 r
}

dchrono t1 stop
set time1 [dchrono t1 show]
regexp {CPU user time: ([-0-9.+eE]+) seconds} $time1 full timeint
puts "Time performing BRepIntCurveSurface =  $timeint"

dchrono t2 reset
dchrono t2 start
for { set j 0} { $j <= 100 } {incr j} {
  distmini dd l_1 h1
}

dchrono t2 stop
set time2 [dchrono t2 show]
regexp {CPU user time: ([-0-9.+eE]+) seconds} $time2 full timeextr
puts "Time performing BRepExtrema_DistShapeShape = $timeextr"

if { $timeint > 2 * $timeextr } {
  puts "Error : Time of intersection of curve with shell is more than two time from BRepExtrema"
} else {
  puts "OK: Time is good"
}