File: A6

package info (click to toggle)
opencascade 7.9.2%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 301,924 kB
  • sloc: cpp: 1,523,264; tcl: 10,159; cs: 5,173; java: 1,554; sh: 1,342; ansic: 827; xml: 699; makefile: 30; javascript: 22
file content (110 lines) | stat: -rw-r--r-- 3,319 bytes parent folder | download
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
puts "============"
puts "0032821: DEWrapper - Implementation of a common toolkit for importing and exporting CAD files"
puts "============"
puts ""

catch { Close D0 }
catch { Close D1 }
catch { Close D6 }
catch { Close D7 }

pload MODELING

set write_path ${imagedir}/${casename}.obj

param xstep.cascade.unit MM
if [catch {ReadObj D0 $filename} catch_result] {
    puts "Error : Problem with reading file"
} else {
    puts "OK : Reading is correct"
}
XGetOneShape S0 D0

param xstep.cascade.unit M
if [catch {ReadObj D1 $filename -fileUnit mm } catch_result] {
    puts "Error : Problem with reading file"
} else {
    puts "OK : Reading is correct"
}
XGetOneShape S1 D1

if [catch {WriteFile D0 $write_path -conf "global.general.length.unit : 1 "} catch_result] {
    puts "Error : Problem with writing file"
} else {
    puts "OK : Writing is correct"
}
if [catch {readfile S2 $write_path -conf "provider.OBJ.OCC.file.length.unit : 0.001 "} catch_result] {
    puts "Error : Problem with reading file"
} else {
    puts "OK : Reading is correct"
}

if [catch {writefile S0 $write_path} catch_result] {
    puts "Error : Problem with writing file"
} else {
    puts "OK : Writing is correct"
}
if [catch {readfile S3 $write_path  -conf "provider.OBJ.OCC.file.length.unit : 0.001 "} catch_result] {
    puts "Error : Problem with reading file"
} else {
    puts "OK : Reading is correct"
}

if [catch {WriteFile D1 $write_path -conf "global.general.length.unit : 1000 "} catch_result] {
    puts "Error : Problem with writing file"
} else {
    puts "OK : Writing is correct"
}
if [catch {readfile S4 $write_path -conf "global.general.length.unit : 1000 \n provider.OBJ.OCC.file.length.unit : 1"} catch_result] {
    puts "Error : Problem with reading file"
} else {
    puts "OK : Reading is correct"
}

if [catch {writefile S1 $write_path} catch_result] {
    puts "Error : Problem with writing file"
} else {
    puts "OK : Writing is correct"
}
if [catch {readfile S5 $write_path -conf "provider.OBJ.OCC.file.length.unit : 0.001 "} catch_result] {
    puts "Error : Problem with reading file"
} else {
    puts "OK : Reading is correct"
}

if [catch {WriteFile D0 $write_path -conf "global.general.length.unit : 1 "} catch_result] {
    puts "Error : Problem with writing file"
} else {
    puts "OK : Writing is correct"
}
if [catch {ReadFile D6 $write_path -conf "global.general.length.unit : 1 "} catch_result] {
    puts "Error : Problem with reading file"
} else {
    puts "OK : Reading is correct"
}
XGetOneShape S6 D6

if [catch {writefile S1 $write_path -conf "global.general.length.unit : 1000 "} catch_result] {
    puts "Error : Problem with writing file"
} else {
    puts "OK : Writing is correct"
}
if [catch {ReadFile D7 $write_path -conf "global.general.length.unit : 1000 \n provider.OBJ.OCC.file.length.unit : 1"} catch_result] {
    puts "Error : Problem with reading file"
} else {
    puts "OK : Reading is correct"
}
XGetOneShape S7 D7

array set areas {0 1.21752e+07 1 12.1752 2 1.21752e+07 3 1.21752e+07 4 12.1752 5 12.1752 6 1.21752e+07 7 1.21773e-05}
array set results {0 S0 1 S1 2 S2 3 S3 4 S4 5 S5 6 S6 7 S7}
for { set anind 0} { $anind < 8 } { incr anind } {
  checkprops $results($anind) -s $areas($anind) -eps 1e-2
}

file delete $write_path

Close D0
Close D1
Close D6
Close D7