File: bug25742_2

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 (82 lines) | stat: -rw-r--r-- 1,597 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
puts "============"
puts "OCC25742"
puts "============"
puts ""
###############################
## A partition of 2 shapes stresses a performance issue
###############################

if { [regexp {Debug mode} [dversion]] } {
  if { [regexp {Windows} [dversion]] } {
    set max_time 10
    set max_time2 10
  } else {
    set max_time 10
    set max_time2 10
  }
} else {
  if { [regexp {Windows} [dversion]] } {
    set max_time 1
    set max_time2 1
  } else {
    set max_time 1
    set max_time2 1
  }
}

restore [locate_data_file bug25742_pipeFiss.brep] b1
restore [locate_data_file bug25742_shellFiss.brep] b2

explode b1 f
explode b2 f

smallview
donly b1_4 b2_1
fit

 
dchrono h reset
dchrono h start

bopcurves b1_4 b2_1 -2d

dchrono h stop
set q [dchrono h show]

regexp {CPU user time: ([-0-9.+eE]+) seconds} $q full z
puts "$z"

if { $z > ${max_time} } {
    puts "Elapsed time of bopcurves is more than ${max_time} seconds - Error"
} else {
    puts "Elapsed time of bopcurves is less than ${max_time} seconds - OK"
}


mksurface s1 b1_4
mksurface s2 b2_1

dchrono h2 stop
set q2 [dchrono h2 show]

set CurveNumb [intersect i s1 s2]

dchrono h2 stop
set q2 [dchrono h2 show]

regexp {CPU user time: ([-0-9.+eE]+) seconds} $q2 full z2
puts "$z2"

if { $z2 > ${max_time2} } {
    puts "Elapsed time of intersect is more than ${max_time2} seconds - Faulty"
} else {
    puts "Elapsed time of intersect is less than ${max_time2} seconds - OK"
}

if { [llength ${CurveNumb}] < 1 } {
    puts "Error : Bad intersection"
} else {
    puts "OK : Good intersection"
}

set only_screen_axo 1