| 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 EPS format |
| 9 | |
| 10 | vfont add [locate_data_file DejaVuSans.ttf] SansFont |
| 11 | |
| 12 | vinit |
| 13 | vtrihedron trihedron |
| 14 | |
| 15 | vpoint p1 -300 -300 -300 |
| 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 |
| 17 | |
| 18 | vpoint p2 -300 -300 -100 |
| 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 |
| 20 | |
| 21 | vpoint p3 -100 -100 -300 |
| 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 |
| 23 | |
| 24 | vpoint p4 -100 -100 -100 |
| 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 |
| 26 | |
| 27 | |
| 28 | vpoint p5 -300 -100 -300 |
| 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 |
| 30 | |
| 31 | vpoint p6 -100 -300 -300 |
| 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 |
| 33 | |
| 34 | vpoint p7 -300 -100 -100 |
| 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 |
| 36 | |
| 37 | vpoint p8 -100 -300 -100 |
| 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 |
| 39 | vaxis ax1 100 100 100 100 100 0 |
| 40 | |
| 41 | box a 110 110 110 200 200 200 |
| 42 | vdisplay a |
| 43 | |
| 44 | file delete -force ${imagedir}/${test_image}.eps |
| 45 | set aFile ${imagedir}/${test_image}.eps |
| 46 | |
| 47 | vexport ${aFile} EPS |
| 48 | |
| 49 | if { [string compare $tcl_platform(platform) "windows"] != 0 } { |
| 50 | set refsize 10330 |
| 51 | } else { |
| 52 | set refsize 10354 |
| 53 | } |
| 54 | |
| 55 | if { [file exists ${aFile}] } { |
| 56 | puts "Export to EPS file was done" |
| 57 | set filesize [file size ${aFile}] |
| 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 | |
| 67 | set only_screen 1 |