c1e0171c |
1 | puts "MKV============" |
a8676008 |
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 PDF format |
9 | |
10 | vinit |
a8676008 |
11 | vtrihedron trihedron |
12 | |
13 | vpoint p1 -300 -300 -300 |
29e2c6d2 |
14 | 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 Courier |
15 | |
a8676008 |
16 | vpoint p2 -300 -300 -100 |
29e2c6d2 |
17 | 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 Courier |
18 | |
a8676008 |
19 | vpoint p3 -100 -100 -300 |
29e2c6d2 |
20 | 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 Courier |
21 | |
a8676008 |
22 | vpoint p4 -100 -100 -100 |
29e2c6d2 |
23 | 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 Courier |
a8676008 |
24 | |
25 | |
26 | vpoint p5 -300 -100 -300 |
29e2c6d2 |
27 | 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 Courier |
28 | |
a8676008 |
29 | vpoint p6 -100 -300 -300 |
29e2c6d2 |
30 | 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 Courier |
31 | |
a8676008 |
32 | vpoint p7 -300 -100 -100 |
29e2c6d2 |
33 | 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 Courier |
34 | |
a8676008 |
35 | vpoint p8 -100 -300 -100 |
29e2c6d2 |
36 | 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 Courier |
a8676008 |
37 | |
38 | vaxis ax1 100 100 100 100 100 0 |
39 | |
40 | box a 110 110 110 200 200 200 |
41 | vdisplay a |
42 | |
9aa684ed |
43 | file delete -force ${imagedir}/${test_image}.pdf |
44 | set aFile ${imagedir}/${test_image}.pdf |
a8676008 |
45 | |
46 | vexport ${aFile} PDF |
47 | |
9aa684ed |
48 | if { [string compare $tcl_platform(platform) "windows"] != 0 } { |
49 | set refsize 10091 |
50 | } else { |
c1e0171c |
51 | set refsize 10115 |
9aa684ed |
52 | } |
53 | |
a8676008 |
54 | if { [file exists ${aFile}] } { |
9aa684ed |
55 | puts "Export to PDF file was done" |
a8676008 |
56 | set filesize [file size ${aFile}] |
9aa684ed |
57 | if { $filesize != $refsize } { |
58 | puts "Error: Export to PDF file was done but size of file is incorrect (refsize = $refsize, current = $filesize)." |
59 | puts "Error: Compare content of resulting PDF file with reference." |
60 | puts "Error: Update refsize if it's necessary." |
61 | } |
a8676008 |
62 | } else { |
9aa684ed |
63 | puts "Faulty : Export to PDF file was not done" |
a8676008 |
64 | } |
9aa684ed |
65 | |
29e2c6d2 |
66 | set only_screen 1 |