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.

Grid has three styles: Infinite Dynamic, Model Space grid and 3D Background. Its position and orientation can be modified via the context menu properties dialog or programmatically. Lines of a Dynamic Grid are visible through opaque objects.

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
Style 0 - Infinite Dynamic, 1 - Model Space, 2 - 3D Background Integer 0
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 location text for Dynamic style or grid size text for the Model Space style Color 0 rgba=(0.2, 0.2, 1, 1)
ShowGridSize Related to the Model Space style only. Display the grid step size in the upper right corner of the window Boolean 1 True
  3D Background      
Subdivision type 0 - by step size, 1 - by number of steps, 2 - automatic detection Integer 4 2
Step size X Step size along axis X (valid only for subdiv. type - "0") Double 8 1.0
Step size Y Step size along axis Y (valid only for subdiv. type - "0") Double 9 1.0
Step size Z Step size along axis Z (valid only for subdiv. type - "0") Double 10 1.0
Step count X Step count along axis X (valid only for subdiv. type - "1") Integer 5 10
Step count Y Step count along axis Y (valid only for subdiv. type - "1") Integer 6 10
Step count Z Step count along axis Z (valid only for subdiv. type - "1") Integer 7 10
Axis name X Name of the axis X (legend) String 0 10
Axis name Y Name of the axis Y (legend) String 1 10
Axis name Z Name of the axis Z (legend) String 2 10
Digits font Font name for numbers String 3 Calibri Light
Legend font Font name for axis names String 4 Calibri Light
Digits font size Size of the font for numbers Integer 2 60
Legend font size Size of the font for axis names Integer 11 70
Color style 0 - Solid, 1 - Striped Integer 12 0
Subscale Smaller scale divisions are marked with little notches when this option is  turned on. Boolean 2 False
Subscale division count Number of divisions per one grid step (valid only for subscale) Integer 3 10
Wide framing Wide frame is drawn along the edges of the 3DBase when this option is turned on. Boolean 3 False
Subscale color Color of the subscale (valid only for subscale). Query IKCContext2 from IKCContext to access Color 2 rgba=(0.0, 0.0, 0.0, 1)
First stripe color Valid only for color style of type "1". Query IKCContext2 from IKCContext to access Color 4 rgba=(1.0, 1.0, 1.0, 1)
Second stripe color Valid only for color style of type "1". Query IKCContext2 from IKCContext to access Color 5 rgba=(0.0, 1.0, 0.0, 1)

 

See also: DIView sample