a8676008 |
1 | puts "============" |
2 | puts "OCC21091" |
3 | puts "OCC21450" |
4 | puts "============" |
5 | puts "" |
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 PS format |
9 | |
6fb1a930 |
10 | vfont add [locate_data_file DejaVuSans.ttf] SansFont |
11 | |
a8676008 |
12 | vinit |
a8676008 |
13 | vtrihedron trihedron |
14 | |
15 | vpoint p1 -300 -300 -300 |
6fb1a930 |
16 | vdrawtext 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 |
18 | vpoint p2 -300 -300 -100 |
6fb1a930 |
19 | vdrawtext 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 |
21 | vpoint p3 -100 -100 -300 |
6fb1a930 |
22 | vdrawtext 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 |
24 | vpoint p4 -100 -100 -100 |
6fb1a930 |
25 | vdrawtext 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 | |
28 | vpoint p5 -300 -100 -300 |
6fb1a930 |
29 | vdrawtext 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 |
31 | vpoint p6 -100 -300 -300 |
6fb1a930 |
32 | vdrawtext 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 |
34 | vpoint p7 -300 -100 -100 |
6fb1a930 |
35 | vdrawtext 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 |
29e2c6d2 |
36 | |
a8676008 |
37 | vpoint p8 -100 -300 -100 |
6fb1a930 |
38 | vdrawtext 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 |
39 | |
40 | vaxis ax1 100 100 100 100 100 0 |
41 | |
42 | box a 110 110 110 200 200 200 |
43 | vdisplay a |
44 | |
9aa684ed |
45 | file delete -force ${imagedir}/${test_image}.ps |
46 | set aFile ${imagedir}/${test_image}.ps |
a8676008 |
47 | |
48 | vexport ${aFile} PS |
49 | |
863f782a |
50 | if { [checkplatform -windows] } { |
6fb1a930 |
51 | set refsize 10410 |
863f782a |
52 | } else { |
53 | set refsize 10386 |
9aa684ed |
54 | } |
55 | |
a8676008 |
56 | if { [file exists ${aFile}] } { |
9aa684ed |
57 | puts "Export to PS format was done" |
58 | set filesize [file size ${aFile}] |
59 | if { $filesize != $refsize } { |
60 | puts "Error: Export to PS file was done but size of file is incorrect (refsize = $refsize, current = $filesize)." |
61 | puts "Error: Compare content of resulting PS file with reference." |
62 | puts "Error: Update refsize if it's necessary." |
63 | } |
a8676008 |
64 | } else { |
9aa684ed |
65 | puts "Faulty : Export to PS format was not done" |
a8676008 |
66 | } |
9aa684ed |
67 | |
5747059b |
68 | checkview -screenshot -3d -path ${imagedir}/${test_image}.png |