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


ILineMetr(2) Interface

IntersectObject
IntersectModel

Note: ILineMetr and ILineMetr2 interfaces are supported only in Enterprise version of DG Kernel components

ILineMetr interface is implemented by objects with location and direction (geometric lines). It allows performing different calculations related to a 3D line. In this release the interface has a single method. ILineMetr can be expanded (but not changed) in future releases. ILineMetr interface can be queried from an ILine interface.

ILineMetr and ILineMetr2 interfaces have the same methods which produce identical result in identical situations. The difference is in the algorithm applied internally and in performance, which is important as the operation applies considerable load on the computer.

Implementation of ILineMetr2 is more sophisticated. During the first call to either  methods of ILineMetr2 some intermediate information is calculated and stored in memory, which is used to improve performance in consecutive calls. This means that ILineMetr2 should be used when the application expects numerous repetitive calls to methods of ILineMetr2 for different positions/orientations of the line while internal geometry of the object or model remains unchanged.

When there are only few calls to the methods, ILineMetr quite often offers better performance. The final decision should be made after few experiments with both interfaces. The difference in performance is also greater for larger models with finer surface approximation

See also: Cannon sample, Interface List


HRESULT IntersectObject(ISection* iObject, IDIData** iPoints)

Parameters

iObject- [in] reference to a 3D Object. 

iPoints - [out] returned data objects, contacting information about all interentity points and normal at point of interentity.

Returns

S_OK in case of success.

Remarks:

The method calculates interentity of the line, which implements this interface (the line where this ILineMetr was queried from) with the object. The method is computationally intensive. See comments above.


HRESULT IntersectModel(IModel* iModel, IData** iPoints)

Parameters

iModel- [in] reference to IModel interface

iIPoints - [out] returned data objects, contacting information about all interentity points and normal at point of interentity.

Returns

S_OK in case of success.

Remarks:

The method calculates interentity of the line, which implements this interface (the line where this ILineMetr was queried from) with the object.The method is computationally intensive. See comments above.