1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00
2024-09-17 17:22:30 +01:00

113 lines
3.1 KiB
Plaintext

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}.stp
param xstep.cascade.unit MM
if [catch {ReadStep 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 {ReadStep D1 $filename } catch_result] {
puts "Error : Problem with reading file"
} else {
puts "OK : Reading is correct"
}
XGetOneShape S1 D1
param xstep.cascade.unit MM
if [catch {WriteFile D0 $write_path -conf "global.general.length.unit : 25.4 "} catch_result] {
puts "Error : Problem with writing file"
} else {
puts "OK : Writing is correct"
}
if [catch {readfile S2 $write_path } catch_result] {
puts "Error : Problem with reading file"
} else {
puts "OK : Reading is correct"
}
if [catch {writefile S0 $write_path -conf "global.general.system.unit : 1 "} catch_result] {
puts "Error : Problem with writing file"
} else {
puts "OK : Writing is correct"
}
if [catch {readfile S3 $write_path} 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 : 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} 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 : 25.4 "} 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 : 0.0254"} catch_result] {
puts "Error : Problem with reading file"
} else {
puts "OK : Reading is correct"
}
XGetOneShape S7 D7
array set areas {0 2.52381e+06 1 2.52381 2 2.52381e+06 3 2.52381e+06 4 2.52381e+06 5 2.52381 6 2.52381e+06 7 3911.92}
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