Measurement Grid
A 3D view grid can be added to DG Kernel view for quick estimation of distances
and locations.
To display/hide a grid select Advanced > View > Grid in the context menu of the
component and turn on/off the Enabled check box in the grid properties form.
The grid can be rotated around its perpendicular at the origin (0, 0) by the
"Rotate By" angle. If there was an angle measurement in screen plane the "Use
Last Measured Angle" check box will be enabled. It allows copying the angle into
the edit box. If "Interactive" check box is on, the grid can be rotated with
up/down mouse movements on closing the dialogue until the next mouse click.
If Control key was held, while selecting the Advanced > View > Grid menu option
the grid dialogue is skipped and default options are used to define the grid. The
defaults can be changed using
GridDefaultInteractive and
GridDefaultUseMeasuredAngle properties of the component's
context.
Position and orientation of the grid can be modified via the context menu properties dialogue or programmatically
Programmatic access
There is no special interface for manipulation of grids. To enable or manipulate
the grid programmatically obtain
IContext_DG of the grid via:
DG Kernel control > GetView() >
IEntity_DG.GetExtendedProperties() > IDictionary_DG > GetInterface("3DGrid") >
IContext_DG
To modify position and orientation of the grid query
IFrame_DG from the IContext_DG.
See DIView sample for an example.
Spacing of the grid can be modified in Dynamic mode by using the Step
property and in Model Space mode by using the StepModelSpace
property. See the table below for details
Properties of the grid
Property |
Description |
Type |
Parameter ID |
Default |
Enabled |
Determines whether the grid is rendered |
Boolean |
0 |
True |
Step |
Valid only when Style property above is 0. This is an indirect parameter in range 50 to 1000 which has to be
tuned in for each application. Reducing the parameter makes the grid finer |
Integer |
1 |
200 |
StepModelSpace |
Valid only when Style property above is 1. Geometric distance
between grid lines |
Double |
0 |
1.0 |
ColorLines |
Color of lines |
Color |
1 |
rgba=(0.6, 0.8, 0.6, 1) |
ColorText |
Color of the grid size text |
Color |
0 |
rgba=(0.2, 0.2, 1, 1) |
ShowGridSize |
Display the grid step size in
the upper right corner of the window |
Boolean |
1 |
True |
See also: DIView sample,
|