0027146: Create command checkplatform
[occt.git] / tests / bugs / vis / bug21091_3
CommitLineData
a8676008 1puts "============"
2puts "OCC21091"
3puts "OCC21450"
4puts "============"
5puts ""
6#vinit
7#vexport
8#vexport full_file_path {PS | EPS | TEX | PDF | SVG | PGF } : exports the view to a vector file of a given format
9#
10
11pload XSDRAW
12vinit
a8676008 13
14meshfromstl m [locate_data_file shape.stl]
15
709e97a0 16meshtext m
17
18vsetdispmode m 34
a8676008 19
9aa684ed 20file delete -force ${imagedir}/${test_image}.pdf
21set aFile ${imagedir}/${test_image}.pdf
a8676008 22
23vexport ${aFile} PDF
24
863f782a 25if { [checkplatform -windows] } {
9aa684ed 26 set refsize 153993
863f782a 27} else {
28 set refsize 144401
9aa684ed 29}
30
a8676008 31if { [file exists ${aFile}] } {
9aa684ed 32 puts "Export to PDF file was done"
a8676008 33 set filesize [file size ${aFile}]
9aa684ed 34 if { $filesize != $refsize } {
35 puts "Error: Export to PDF file was done but size of file is incorrect (refsize = $refsize, current = $filesize)."
36 puts "Error: Compare content of resulting PDF file with reference."
37 puts "Error: Update refsize if it's necessary."
a8676008 38 }
39} else {
9aa684ed 40 puts "Faulty : Export to PDF file was not done"
a8676008 41}
42
5747059b 43checkview -screenshot -3d -path ${imagedir}/${test_image}.png
a8676008 44