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 ViewsViews
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


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.

Implements also: IMetrics.

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.