DG Kernel Documentation


Skip Navigation Links.
Start page
Quick Start
Search Page
Installation
Overview of the software
What is new
Licensing
Expand ModelsModels
Expand DG Kernel ComponentsDG Kernel Components
Collapse API ReferenceAPI Reference
Interface List
Vector Space
Expand General GeometryGeneral Geometry
Collapse ModelModel
Expand ViewView
Expand General ComputingGeneral Computing
Expand Samples and TutorialsSamples and Tutorials
Expand GraphicsGraphics
Expand Math ObjectsMath Objects
Expand DeprecatedDeprecated
Redistribution
Model Viewer
Open Source
Support
Skip Navigation LinksHome Page > API Reference > Model > Entities > Movement > Collision Detection > IMetrics2 Search Documentation


IMetrics2 Interface

GetLocalDimensions
Dist

IMetrics2 can be queried from ISection. It allows extraction of dimensions of interentity the object it was queried from with a 3D box.

See also Interface List


HRESULT GetLocalDimensions(KCBox* localBox, KCBox* dims)

Parameters

localBox - [in] the local box aligned with local axes of the object. All dimensions are expressed relative to the local axes.

dims - [out] the returned dimensions of the interentity

Remarks:

This method is currently implemented by Mesh Entities only. For a given localBox the method extracts part of the Mesh Entity object, which implements this interface, contained in the box and returns its Bounding Box in the dims variable. Bounding Box is the minimal box in local coordinates of the object, which contains the interentity.

localBox is aligned with local frame of the object, which implements this interface. Its dimensions are expressed relative to the local frame.


HRESULT Dist( IMetrics2 * iIMetricObj, DIPoint* ptThis, DIPoint* ptOther, double* dist )

Parameters

iIMetricObj - [in] IMetrics interface implemented by the second object. See remarks.

dist - [out] Returned distance between the objects

ptThis - [out] - nearest point on this object (the object this interface was queried for)

ptOther - [out] - nearest point on object iIMetricObj

Remarks:

This method is a simplified version of IMetrics.Dist, which returns only a single pair of nearest points. When there are multiple nearest points (parallel lines) selection of the pair should be considered random.