Files
OCCT/tests/bugs/vis/bug25783_2
T
isk ac84fcf602 0024272: Provide basic text formatting routines for Font_BRepFont
Add new class Font_BRepTextBuilder for generation of formatted BRep text.
Delete method Font_BRepFont::RenderText(), which should be replaced by Font_BRepTextBuilder::Perform().
2015-08-27 15:30:11 +03:00

42 lines
1.6 KiB
Plaintext

puts "============"
puts "OCC25783_1"
puts "Draw 2d objects in top-down mode."
puts "============"
puts ""
vinit View1
vclear
vaxo
# display polyline in overlay
text2brep tcc "Center" -font Times-Roman -height 30
vdisplay tcc -2dTopDown -osd
polyline lcc -50 -50 0 -50 50 0 50 50 0 50 0 0 0 -50 0 -50 -50 0
vdisplay lcc -2dTopDown -overlay
# display polyline in overlay in the top left corner of the view
text2brep ttl "Top-Left" -font Times-Roman -height 30
vdisplay ttl -2dTopDown -trsfPersPos -1 -1 5 -osd
polyline ltl 0 0 0 0 100 0 100 100 0 100 50 0 50 0 0 0 0 0
vdisplay ltl -2dTopDown -trsfPersPos -1 -1 3 -overlay
# display polyline in overlay in the bottom left corner of the view
text2brep tbl "Bottom-Left" -font Times-Roman -height 30 -pos -27 0 0
vdisplay tbl -2dTopDown -trsfPersPos -1 1 30 -osd
polyline lbl 0 -100 0 0 0 0 100 0 0 100 -50 0 50 -100 0 0 -100 0
vdisplay lbl -2dTopDown -trsfPersPos -1 1 3 -overlay
# display polyline in overlay in the bottom right corner of the view
text2brep tbr Bottom-Right -font Times-Roman -height 30 -pos -145 0 0
vdisplay tbr -2dTopDown -trsfPersPos 1 1 30 -osd
polyline lbr -100 -100 0 -100 0 0 0 0 0 0 -50 0 -50 -100 0 -100 -100 0
vdisplay lbr -2dTopDown -trsfPersPos 1 1 3 -overlay
# display polyline in overlay in the top right corner of the view
text2brep ttr "Top-Right" -font Times-Roman -height 30 -pos -130 0 0
vdisplay ttr -2dTopDown -trsfPersPos 1 -1 5 -osd
polyline ltr -100 0 0 -100 100 0 0 100 0 0 50 0 -50 0 0 -100 0 0
vdisplay ltr -2dTopDown -trsfPersPos 1 -1 3 -overlay
vdump ${imagedir}/${casename}.png