DG Kernel (ActiveX) Documentation


Skip Navigation Links.
Start page
Quick Start
Search Page
Installation
What is new
Upgrading Native Apps
Licensing
Collapse ModelsModels
Collapse DG Kernel ControlsDG Kernel Controls
Collapse API ReferenceAPI Reference
Interface List
Vector Space
Collapse General GeometryGeneral Geometry
Collapse ModelModel
Collapse ViewView
Collapse General ComputingGeneral Computing
Collapse Samples and TutorialsSamples and Tutorials
Collapse GraphicsGraphics
Collapse Math ObjectsMath Objects
Collapse DeprecatedDeprecated
Redistribution
Model Viewer
Open Source
Support
Skip Navigation Links Go to DGKC docs Search Documentation


Metrics Sample

Metrics sample demonstrates calculation of distances, and nearest points between two objects and usage of IMetrics_DG.Dist method.

Running the application

The application expects the model to have at least two top level objects. Names of the first and the second objects are displayed on the right-hand side of the form. The Calculate button calculates distances between the two objects and displays the result in 3D view.

By default, pairs of the nearest points are rendered connected with a red segment in 3D view. Check boxes in the Display group allow turning on and off rendering shortest distances, nearest points and normals.

When "Find All" check box is on, all pairs of nearest points (at the same distances in this sample) are found and displayed. More.

"Include Children" check box forces the algorithm to consider children of both objects as single object with its parent.

The Move Object control group allows changing position and orientation of either of the two objects. The movement is performed relative to the current location and orientation of the local frame of the object. Show check box displays or hides the local frame.

The "Is Closer Than" controls allow to determine whether the objects are closer than the distance specified in the edit box.

File menu allows loading new and saving the current model.

See also IMetrics_DG Interface, Sample List.