1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-05-31 11:15:31 +03:00
occt/tests/bugs/vis/bug25783_2
isz af65fb1941 0025783: Visualization - allow Z-layer to draw 2D objects and to make it alternative to Overlay and Underlay
Add one more pre-defined Z-layer Graphic3d_ZLayerId_BotOSD.

Define new Transformation Persistence flags Graphic3d_TMF_2d and Graphic3d_TMF_2d_IsTopDown
for displaying objects in screen coordinates.
Anchor point defines angle of the screen to display the object in similar way as for Graphic3d_TMF_TriedronPers.

Extend Draw Harness command vdisplay with new options:
 -overlay as alias for -toposd.
 -underlay and -botosd.
 -noselect to prevent automatic selection activation.
 -dispMode and -highMode to define displaying and highlighting modes.
 -2d, -2dtopdown and -3d to manage displaying in screen coordinates.
 -trsfPers and -trsfPersPos for Transformation Persistence options.

Drop command vsettransmode, replaced by vdisplay.

Correction of test-case bugs vis bug641
2015-04-16 11:35:04 +03:00

42 lines
1.5 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" Times-Roman 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" Times-Roman 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" Times-Roman 30 x=-27 y=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 Times-Roman 30 x=-145 y=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" Times-Roman 30 x=-130 y=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