1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-04 18:06:22 +03:00
occt/tests/bugs/vis/bug21091_8
ski 863f782a42 0027146: Create command checkplatform
Command checkplatform was created.
All test cases were updated.

Global variable os_type was eliminated.
New option -osx (MacOS) for procedure checkplatform was added.
2016-04-08 11:42:00 +03:00

69 lines
2.5 KiB
Plaintext
Executable File

puts "============"
puts "OCC21091"
puts "OCC21450"
puts "============"
puts ""
#vexport
#vexport full_file_path {PS | EPS | TEX | PDF | SVG | PGF } : exports the view to a vector file of a given format
#Testing export to SVG format
vfont add [locate_data_file DejaVuSans.ttf] SansFont
vinit
vtrihedron trihedron
vpoint p1 -300 -300 -300
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
vpoint p2 -300 -300 -100
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
vpoint p3 -100 -100 -300
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
vpoint p4 -100 -100 -100
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
vpoint p5 -300 -100 -300
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
vpoint p6 -100 -300 -300
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
vpoint p7 -300 -100 -100
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
vpoint p8 -100 -300 -100
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
vaxis ax1 100 100 100 100 100 0
box a 110 110 110 200 200 200
vdisplay a
file delete -force ${imagedir}/${test_image}.svg
set aFile ${imagedir}/${test_image}.svg
vexport ${aFile} SVG
if { [checkplatform -windows] } {
set refsize 14091
} else {
set refsize 14207
}
if { [file exists ${aFile}] } {
puts "Export to SVG file was done"
set filesize [file size ${aFile}]
if { $filesize != $refsize } {
puts "Error: Export to SVG file was done but size of file is incorrect (refsize = $refsize, current = $filesize)."
puts "Error: Compare content of resulting SVG file with reference."
puts "Error: Update refsize if it's necessary."
}
} else {
puts "Faulty : Export to SVG file was not done"
}
checkview -screenshot -3d -path ${imagedir}/${test_image}.png