KernelCAD Documentation

DInsight Home
Skip Navigation Links.
Start page
Quick Start
Installation
Overview of the software
What is new
Collapse KernelCAD ModelsKernelCAD Models
Collapse KernelCAD ComponentsKernelCAD Components
KernelCAD Control
KernelCAD .NET Control
Methods and Properties
Menu
Model Explorer
Birds Eye View
Programming
Direct User Access
Direct Operations
Interface Queries
Printing Support
Data Types
Modes of KernelCAD Control
DIObjectGenerator class
Properties
FlatObjectArray Poperty
Context
64 bit development
Dual Mode
Initialisation Context
Overlay Editor
Memory Management
Input validation
Collapse Advanced functionalityAdvanced functionality
Collapse InterfacesInterfaces
Alphabetical list
I3DGrid
I3DBugger
I3Dpt
IAxiBase
IAxis
IBoolSection
IBoolSectionEx
IBoundary
IColor
IConstraint
IData
IDiffSurface_KC
IDIFont
IDraw
IDrawUtil
IDraw2
IElem
IElement
IKCLine
ILightSource
ILocation
ILocationEx
IMaterial
IMetrics
IMetrics2
IModel
IModel2
IModelEx
IPatch
IKCPathCollisionDetector
IProfiles
IPropertyArray
IPropertyArray2
IStdShape
IStrip
ISurface
IText
ITexture
ITransform
IUnknown
Collapse Open Cascade TechnologyOpen Cascade Technology
Collapse DataData
Collapse MovementMovement
Collapse FramesFrames
Collapse Oriented ObjectsOriented Objects
Collapse SectionsSections
Collapse GeneralGeneral
Collapse Topological InterfacesTopological Interfaces
Collapse Viewing InterfacesViewing Interfaces
Collapse Lines And CurvesLines And Curves
Collapse Symmetry InterfacesSymmetry Interfaces
Collapse Clipping plane interfacesClipping plane interfaces
Collapse AlgorithmsAlgorithms
Collapse 2D Geometry2D Geometry
Collapse Programming Samples and TutorialsProgramming Samples and Tutorials
Collapse OverviewOverview
Collapse DeploymentDeployment
Collapse .NET Samples.NET Samples
Collapse C++ SamplesC++ Samples
Collapse Visual Basic SamplesVisual Basic Samples
Collapse Delphi SamplesDelphi Samples
Collapse 3D Debugger3D Debugger
Collapse DeploymentDeployment
Licensing
Model Viewer
Open C++ Source
Technical Support
Skip Navigation LinksHome Page > KernelCAD Components > Interfaces > Lines And Curves > ILineMetr
ILineMetr Interface

ILineMetr(2) Interface

IntersectObject
IntersectModel

Note: ILineMetr and ILineMetr2 interfaces are supported only in Enterprise version of KernelCAD 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 intersection points and normal at point of intersection.

Returns

S_OK in case of success.

Remarks:

The method calculates intersection 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 intersection points and normal at point of intersection.

Returns

S_OK in case of success.

Remarks:

The method calculates intersection 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.