DG Kernel Documentation


Skip Navigation Links.
Start page
Quick Start
Search Page
Installation
Overview of the software
What is new
Licensing
Collapse ModelsModels
Expand DG Kernel ComponentsDG Kernel Components
Expand API ReferenceAPI Reference
Expand Samples and TutorialsSamples and Tutorials
Expand GraphicsGraphics
Expand Math ObjectsMath Objects
Expand DeprecatedDeprecated
Redistribution
Model Viewer
Open Source
Support
Skip Navigation LinksHome Page > Models > Entities > Model Items > Measurements > Grid Search Documentation


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 dialog until the next mouse click.

If Control key was held, while selecting the Advanced > View > Grid menu option the grid dialog 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 dialog or programmatically

Programmatic access

There is no special interface for manipulation of grids. To enable or manipulate the grid programmatically obtain IKCContext of the grid via:

DG Kernel control > GetView() > IPropertyArray > IPropertyArray.GetProperty("3DGrid", ...) > IKCContext

To modify color of lines and text query IKCContext2 from IKCContext

To modify position and orientation of the grid query IFrame from the IKCContext. 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. Query IKCContext2 from IKCContext to access 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