DG Kernel (ActiveX) Documentation


Skip Navigation Links.
Start page
Quick Start
Search Page
Installation
What is new
Upgrading Native Apps
Licensing
Collapse ModelsModels
Expand DG Kernel ControlsDG Kernel Controls
Expand API ReferenceAPI Reference
Expand ViewsViews
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 Go to DGKC docs 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 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

Boolean Properties

Property Description ID Default
Enabled Determines whether the grid is rendered 0 False
ShowGridSize Display the grid step size in the upper right corner of the window 1 True
WideLines Display every 5-th grid line wide 4 False
DrawLines Render grid lines 7 False
DrawFloor Render Floor 8 False
ManualLocation Manual Location 5 False
ManualSize Manual Size 6 False

Integer Properties

Property Description ID Default
Stype Valid options: 1 - Default grid rectangle, 2 - 3D Background 0 1
FontSize 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 2 200
3DBaseFontSize Font size for axes legend in 3D Background style 11 70
3DBaseFaceStyle Valid options: 0 - Flat color of faces, 1 - Show stripes 12 1
StepCountX Number of grid lines in X direction minus one 13 8
StepCountY Number of grid lines in Y direction minus one 14 8

String Properties

Property Description ID Default
Legend X X axis kegend for 3D Background 0 X
Legend Y Y axis kegend for 3D Background 1 Y
Legend Z Z axis kegend for 3D Background 2 Z

Double Properties

Property Description ID Default
StepSize Step size in the default style 0 1.0
StepSizeX3DBase X step size for 3D Background 1 1.0
StepSizeY3DBase Y step size for 3D Background 2 1.0
StepSizeZ3DBase Z step size for 3D Background 3 1.0

Color Properties

Property Description ID Default RGB
ColorText Text color for grid step annotation 0 0.2 0.2. 1.0
ColorLines Grid line color 1 0.6 0.8 0.5
ColorLines3DBase Line color for 3D Background 3 0.6 0.6 0.6
ColorFirstStripe3DBase Color of the first stripe in 3D Background 4 1.0 1.0 1.0
ColorSecodnStripe3DBase Color of the second stripe in 3D Background 5 0.8 0.8 1.0

 

See also: DIView sample,