VDRAW(nged)
Allows drawing of lines and polygons (optionally with per vertex normals) in the MGED graphics display. It is used to build a named list of drawing commands for MGED, send the list to the MGEDβ¦
πΈ NAME πΈ
Hey bestie π welcome to VDRAW(nged), aka the BRL-CAD MGED Commands page thatβs lowkey all about drawing lines and polygons (optionally with per vertex normals) in the MGED graphics display. Itβs used to build a named list of drawing commands for MGED, send the list to the MGED display, modify the list, or delete all or part of the list. Periodt. β¨
β¨ SYNOPSIS β¨
vdraw {command} [args]
π¦ DESCRIPTION π¦
Okay so vdraw allows drawing of lines and polygons (optionally with per vertex normals) in the MGED graphics display. It is used to build a named list of drawing commands for MGED, send the list to the MGED display, modify the list, or delete all or part of the list.
All vertices in the vdraw command are in millimeters. The MGED drawing commands are represented by integers in the vdraw command. The MGED drawing commands and the integers that vdraw uses for them are:
π Table 1. Drawing Commands π
RT_VLIST_LINE_MOVEβ vdraw integer0β MGED action: begin a new line at this point.RT_VLIST_LINE_DRAWβ vdraw integer1β MGED action: draw line from previous point to this point.RT_VLIST_POLY_STARTβ vdraw integer2β MGED action: start polygon (argument is surface normal).RT_VLIST_POLY_MOVEβ vdraw integer3β MGED action: move to first polygon vertex.RT_VLIST_POLY_DRAWβ vdraw integer4β MGED action: subsequent polygon vertices.RT_VLIST_POLY_ENDβ vdraw integer5β MGED action: last polygon vertex (should be same as first).RT_VLIST_POLY_VERTNORMβ vdraw integer6β MGED action: vertex normal (for shading interpolation).
The vdraw commands are as follows:
openβ with no arguments, this returns1if there is an open list;0otherwise. If an argument is supplied, a command list is opened with the provided name.writeβ with arguments ofi c x y z, the MGED drawing command#cis placed in theith position of the command list with the vertex as( x y z).- With arguments of
next c x y z, the command is placed at the end of the list.
- With arguments of
insertβ with arguments ofi c x y z, the MGED drawing command#cis inserted just before theith position of the command list.deleteβ with an integer argument ofi, theith command is deleted.- With an argument of
last, the last command on the list is deleted. - With an argument of
all, all the commands on the list are deleted.
- With an argument of
paramsβ with an argument ofcolor rrggbb, the color of all objects on this list is set. Therrggbbis a hex number representing the color,ffffffis white,ff0000is red,00ff00is green, etc.- With a single string argument, the name of the current list is changed.
readβ with an integer argument ofi, theith command is returned.- With an argument of
color, the current color is returned. - With an argument of
length, the number of commands in the current list is returned. - With an argument of
name, the name of the current command list is returned.
- With an argument of
sendβ send the current command list to the MGED display manager.vlistβ with an argument oflist, return a list of the names of all existing command lists.- With an argument of
delete list_name, delete the specified command list.
- With an argument of
All textual arguments may be abbreviated by their first letter. π«Ά
π₯ EXAMPLES π₯
The eight examples show the use of the vdraw command with four different commands and various arguments to build a list of commands to draw a square.
π Example 1. Open a specified list.
mged>vdraw open square
Opens a list named square.
π Example 2. Set the color.
mged>vdraw params color ff00
Sets the color to green.
π Example 3. Start a line at the origin.
mged>vdraw write next 0 0 0 0
Starts a line at the origin.
π Example 4. Draw a line from the previous point to a specified point.
mged>vdraw write next 1 100 0 0
Draws a line from the origin to (100 0 0).
π Example 5. Draw a line from the previous point to a specified point.
mged>vdraw write next 1 100 100 0
Draws a line from the previous point to (100 100 0).
π Example 6. Draw a line from the previous point to a specified point.
mged>vdraw write next 1 0 100 0
Draws a line from the previous point to (0 100 0).
π Example 7. Draw a line from the previous point to the origin.
mged>vdraw write next 1 0 0 0
Draws a line from the previous point to the origin.
π Example 8. Send the command list to the display manager.
mged>vdraw send
Draws the square in the MGED display.
π AUTHOR π
BRL-CAD Team π
π BUG REPORTS π
Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org π«Ά
Cute sign-off bestie: source/version BRL-CAD π, manual page VDRAW(nged) β¨, date: not shown in the footer, so Iβm not inventing one π
π
π¦ where this page comes from
- nixpkgs unstable: brlcad 7.44.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms