File: bug23203

package info (click to toggle)
oce 0.15-5
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 302,472 kB
  • ctags: 210,903
  • sloc: cpp: 1,165,052; ansic: 75,256; sh: 11,901; tcl: 4,488; python: 2,867; makefile: 337; perl: 37; csh: 12
file content (60 lines) | stat: -rwxr-xr-x 1,647 bytes parent folder | download | duplicates (11)
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
puts "========================"
puts "OCC23203"
puts "========================"
puts ""
#######################################################################
# STEP import produces wrong surface of revolution on ellipse
#######################################################################

ellipse e 0 0 0 0 -1 0 1 0 -1 10 5
revsurf re e 0 0 0 0 0 1
mkface f re 0 3 0 1
newmodel

set aFile ${imagedir}/bug23203.stp
file delete ${aFile}
if { [file exists ${aFile}] } {
   puts "Error : There is old ${aFile} file."
}

stepwrite 0 f ${aFile}
stepread ${aFile} res *
file delete ${aFile}

explode res_1 f
mksurface ress1 res_1_1
set log [dump ress1]

if {[regexp {Trimmed +curve} ${log}]} {
  puts "Error: bad basis curve"
} else {
  puts "OK: good basis curve"
}

regexp {XAxis  :([-0-9.+eE]+), +([-0-9.+eE]+), +([-0-9.+eE]+)} ${log} full XAxis1 XAxis2 XAxis3
regexp {YAxis  :([-0-9.+eE]+), +([-0-9.+eE]+), +([-0-9.+eE]+)} ${log} full YAxis1 YAxis2 YAxis3

set good_XAxis1 0.707106781186548
set good_XAxis2 0
set good_XAxis3 -0.707106781186548
set good_YAxis1 0.707106781186548
set good_YAxis2 0
set good_YAxis3 0.707106781186548

set Precision 1.e6

if {[expr abs(${XAxis1} - ${good_XAxis1})] > ${Precision} ||
    [expr abs(${XAxis2} - ${good_XAxis2})] > ${Precision} ||
    [expr abs(${XAxis3} - ${good_XAxis3})] > ${Precision}} {
  puts "Error : bad XAxis"
} else {
  puts "OK : good XAxis"
}

if {[expr abs(${YAxis1} - ${good_YAxis1})] > ${Precision} ||
    [expr abs(${YAxis2} - ${good_YAxis2})] > ${Precision} ||
    [expr abs(${YAxis3} - ${good_YAxis3})] > ${Precision}} {
  puts "Error : bad YAxis"
} else {
  puts "OK : good YAxis"
}