0027146: Create command checkplatform
[occt.git] / tests / bugs / vis / bug21091_6
CommitLineData
a8676008 1puts "============"
2puts "OCC21091"
3puts "OCC21450"
4puts "============"
5puts ""
6#vexport
7#vexport full_file_path {PS | EPS | TEX | PDF | SVG | PGF } : exports the view to a vector file of a given format
8#Testing export to EPS format
9
6fb1a930 10vfont add [locate_data_file DejaVuSans.ttf] SansFont
11
a8676008 12vinit
a8676008 13vtrihedron trihedron
14
15vpoint p1 -300 -300 -300
6fb1a930 16vdrawtext OC0 OpenCascade -pos -300 -300 -300 -color 0.0 1.0 0.0 -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font SansFont
29e2c6d2 17
a8676008 18vpoint p2 -300 -300 -100
6fb1a930 19vdrawtext OC1 OpenCascade -pos -300 -300 -100 -color 0.0 1.0 0.0 -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font SansFont
29e2c6d2 20
a8676008 21vpoint p3 -100 -100 -300
6fb1a930 22vdrawtext OC2 OpenCascade -pos -100 -100 -300 -color 0.0 1.0 0.0 -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font SansFont
29e2c6d2 23
a8676008 24vpoint p4 -100 -100 -100
6fb1a930 25vdrawtext OC3 OpenCascade -pos -100 -100 -100 -color 0.0 1.0 0.0 -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font SansFont
a8676008 26
27
28vpoint p5 -300 -100 -300
6fb1a930 29vdrawtext OC4 OpenCascade -pos -300 -100 -300 -color 0.0 1.0 0.0 -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font SansFont
29e2c6d2 30
a8676008 31vpoint p6 -100 -300 -300
6fb1a930 32vdrawtext OC5 OpenCascade -pos -100 -300 -300 -color 0.0 1.0 0.0 -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font SansFont
29e2c6d2 33
a8676008 34vpoint p7 -300 -100 -100
6fb1a930 35vdrawtext OC6 OpenCascade -pos -300 -100 -100 -color 0.0 1.0 0.0 -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font SansFont
a8676008 36
29e2c6d2 37vpoint p8 -100 -300 -100
6fb1a930 38vdrawtext OC7 OpenCascade -pos -100 -300 -100 -color 0.0 1.0 0.0 -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font SansFont
a8676008 39vaxis ax1 100 100 100 100 100 0
40
41box a 110 110 110 200 200 200
42vdisplay a
43
9aa684ed 44file delete -force ${imagedir}/${test_image}.eps
45set aFile ${imagedir}/${test_image}.eps
a8676008 46
47vexport ${aFile} EPS
48
863f782a 49if { [checkplatform -windows] } {
6fb1a930 50 set refsize 10354
863f782a 51} else {
52 set refsize 10330
9aa684ed 53}
54
a8676008 55if { [file exists ${aFile}] } {
56 puts "Export to EPS file was done"
57 set filesize [file size ${aFile}]
9aa684ed 58 if { $filesize != $refsize } {
59 puts "Error: Export to EPS file was done but size of file is incorrect (refsize = $refsize, current = $filesize)."
60 puts "Error: Compare content of resulting EPS file with reference."
61 puts "Error: Update refsize if it's necessary."
62 }
63} else {
64 puts "Faulty : Export to EPS file was not done"
65}
66
5747059b 67checkview -screenshot -3d -path ${imagedir}/${test_image}.png