Tables
tables/ vport
#include "dxfio/tables/vport.hpp"In DxfIO::Tables
struct VportVPORT
A VPORT table record: a tiled viewport of model space. The tiled viewports on screen together share the name "*Active".
| Field | Type and default | Meaning |
|---|---|---|
Record | Tables::Record | The name, flags and handles every table record carries. |
Lower | Vector | The lower left corner on screen, from 0 to 1 across and up. Groups 10, 20. |
Upper | Vector{.X = 1, .Y = 1, .Z = 0} | The upper right corner on screen, from 0 to 1 across and up. Groups 11, 21. |
Center | Vector | The center of the view, in display coordinates. Groups 12, 22. |
Base | Vector | The snap base point, in display coordinates. Groups 13, 23. |
Snap | Vector{.X = Snapunit, .Y = Snapunit, .Z = 0} | The snap spacing along X and Y. Groups 14, 24. |
Grid | Vector{.X = Gridunit, .Y = Gridunit, .Z = 0} | The grid spacing along X and Y. Groups 15, 25. |
Direction | Vector{.X = 0, .Y = 0, .Z = 1} | The direction the view looks from, toward the target, in world coordinates. Groups 16, 26, 36. |
Target | Vector | The point the view looks at, in world coordinates. Groups 17, 27, 37. |
Height | double{1} | How tall the view is, in display coordinates. Group 40. |
Aspect | double{1} | The width of the viewport over its height. Group 41. |
Focal | double{Lens} | The lens length, in millimeters, of a perspective view. Group 42. |
Front | double | The front clipping plane, as an offset from the target. Group 43. |
Back | double | The back clipping plane, as an offset from the target. Group 44. |
Rotation | double | The snap angle, in degrees. Group 50. |
Twist | double | The rotation of the view about its direction, in degrees. Group 51. |
Mode | int | Bits, as $VIEWMODE: 1 perspective, 2 front clipping, 4 back clipping, 8 UCS follow, 16 front clip not at the eye. Group 71. |
Zoom | int{Viewres} | The circle zoom percent, as $VIEWRES: how smooth arcs and circles are drawn. Group 72. |
Fast | bool{true} | Whether fast zoom is on. Group 73. |
Icon | int{3} | The UCS icon, as $UCSICON: 1 shown, 2 at the origin. Group 74. |
Snapped | bool | Whether snap is on. Group 75. |
Gridded | bool{true} | Whether the grid is shown. Group 76. |
Isometric | bool | Whether snap is isometric rather than square. Group 77. |
Isoplane | int | The isometric plane: 0 left, 1 top, 2 right. Group 78. |
Render | int | How the view is shaded: 0 2D optimized, 1 wireframe, 2 hidden line, 3 flat, 4 Gouraud, 5 and 6 those two with wireframe. Group 281, from R2000. |
Ucsvp | bool{true} | Whether the viewport keeps a UCS of its own, made current when the viewport is. Group 65, from R2000. |
Axes | Tables::Axes | The UCS of the viewport; from R2000. |
Style | Handle | The visual style. Group 348, from R2007. |
Display | int{3} | How the grid is shown, as $GRIDDISPLAY bits. Group 60, from R2007. |
Major | int{Gridmajor} | The grid lines between major ones, as $GRIDMAJOR. Group 61, from R2007. |
Lit | bool{true} | Whether the default lighting is on. Group 292, from R2007. |
Lighting | int{1} | The default lighting: 0 one distant light, 1 two. Group 282, from R2007. |
Brightness | double | How bright the viewport's lighting is. Group 141, from R2007. |
Contrast | double | How much the viewport's lighting contrasts. Group 142, from R2007. |
Ambient | int{Ambience} | The AutoCAD Color Index of the ambient light. Group 63, from R2007. |
Rgb | std::optional<int> | The ambient light as a true color 0xRRGGBB, when it has one. Group 421, from R2007. |
Background | Handle | The background object. Group 332, from R2007. |
Shadow | Handle | The shade plot object. Group 333, from R2007. |
Constants
Snapunit | double = 10 | The snap spacing of a new viewport, as $SNAPUNIT. |
Gridunit | double = 10 | The grid spacing of a new viewport, as $GRIDUNIT. |
Viewres | int = 1000 | The circle zoom percent of a new viewport, as $VIEWRES. |
Gridmajor | int = 5 | The grid lines between major ones in a new viewport. |
Ambience | int = 250 | The color of a new viewport's ambient light: color index 250, a dark gray. |