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 > Viewing Interfaces > IMeasurement_KC
IMeasurement_KC Interface

IMeasurement_KC Interface

GetPointCount
SetPointCount
GetPoint
SetPoint
GetText
SetText
GetDirection
SetDirection
GetTextLocation
SetTextLocation
GetTextPosition
SetTextPosition

IMeasurement_KC interface gives programmatic access to measurements

See also: Interface List


HRESULT GetPointCount(int* count)

Parameters

count - [out, retval] The retuned number points involved in the measurement

Remarks:

The methods returns number points involved in the measurement. In the current release possible values are: 2 for a distance measurement, 1 - for a single point


HRESULT SetPointCount(int count)

Parameters

count - [in] Number points involved in the measurement. Valid values are: 2 for a distance measurement, 1 - for a single point

Remarks:

The methods modifies number points involved in the measurement. In the current release possible values are: 2 for a distance measurement, 1 - for a single point. Number of points determines type of the measurement and the way it is rendered.


HRESULT GetPoint(int i, double* x, double* y, double* z)

Parameters

i - [in] 0-based index of the point to obtain. Must be non-negative number less than count returned by the GetPointCount method above

x, y, z [out] - coordinates of the i-th point involved in the measurement.

Remarks:

The methods returns coordinates of the i-th point involved in the measurement


HRESULT SetPoint(int i, double x, double y, double z)

Parameters

i - [in] 0-based index of the point to obtain. Must be non-negative number less than count returned by the GetPointCount method above

x, y, z [in] - coordinates of the i-th point involved in the measurement.

Remarks:

The methods modifies coordinates of the ii-th point involved in the measurement. The point has to be close to surface of an object for the measurement to be displayed corectly. This distance of snap to surface is determined dynamically as equivalent of 8 screen pixels (may be changed in future versions). Contact us about changing this parameter of snapping to the nearest obejct without a threshold


HRESULT GetText(BSTR *text)/STRONG>

Parameters

text - [out, retval] Text displayed in the text box of the measurement

Remarks:

The methods returns text displayed in the text box of the measurement. By default the text is the distance or coordinates of the single point. This can be changed by setting the text directly with a call to the SetText method below


HRESULT SetText(char* text)/STRONG>

Parameters

text - [in] The text to be displayed in the text box of the measurement

Remarks:

TThe methods modifies the text displayed in the text box of the measurement. By default the text is the distance or coordinates of the single point, but it can be changed to any single line of text so that the measurement will act as a text label attached to the specified surface.

Once this method is called the measurement displays only the specified text. Recreate the measurement to resume display of the distance or coordinates


HRESULT GetDirection(double* vx, double* vy, double* vz)/STRONG>

Parameters

vx, vy, vz - [out] coordinates of direction vector of the text box of the measurement

Remarks:

The methods returns coordinates of direction vector of the text box of the measurement. Location of center of the text box is determined by this direction along with TextLocation and TextPosition values determined by the methods below. By default the direction coincides with direction of normal to the surface at the point of measurement


HRESULT SetDirection(double vx, double vy, double vz)

Parameters

vertices - [out, retval] new array with elements of type IVertex

Remarks:

The methods allows programmatic modification of direction.

vector of the text box of the measurement. Location of center of the text box is determined by this direction along with TextLocation and TextPosition values determined by the methods below. By default the direction coincides with direction of normal to the surface at the point of measurement.


HRESULT GetTextLocation(double* dist)

Parameters

dist - [out, retval] The returned distance of center of the text box to the measurement point or measurement line

Remarks:

Returns distance of center of the text box to the measurement point or measurement line


HRESULT SetTextLocation(double dist)

Parameters

dist - [in]  New distance of center of the text box to the measurement point or measurement line

Remarks:

The method allows positioning the text box further from or close to the measurement line or the measurement point


HRESULT GetTextPosition(double* ratio)

Parameters

ratio - [out, retval] The returned position of the text box along the measurement line.

Remarks:

The methods returns position of the text box along the measurement line. See SetTextPosition below for details. The call does not have any effect for single point measurements.


HRESULT SetTextPosition(double ratio)

Parameters

ratio - [in] Position of the text box along the measurement line.

Remarks:

Modifies position of the text box along the measurement line. If ratio is 0 the text will be positioned above the first measurement point. If ratio is 1 the text will be positioned above the second measurement point. The call does not have any effect for single point measurements