DG Kernel Documentation


Skip Navigation Links.
Start page
Quick Start
Search Page
Installation
Overview of the software
What is new
Licensing
Collapse ModelsModels
Models
Persistence
Collapse EntitiesEntities
Collapse GeometryGeometry
Geometry
Collapse BSpline BRepBSpline BRep
BSpline BRep Overview
BSpline Geometry
Curves
Faces
Wires
Edges
Collapse MeshMesh
Mesh Geometry
Mesh
Line Strips
Point Sets
Collapse Entity AttributesEntity Attributes
Local Frame
Material
Texture
Clipping Planes
Properties of an Entity
3D Grid
Collapse Model ItemsModel Items
Items
View Points
Collapse MeasurementsMeasurements
Measurements
Persistent Measurements
Grid
Collapse Operations and AlgorithmsOperations and Algorithms
Boolean Operations
Euclidean Shortest Path
Collapse MovementMovement
Movements
Kinematic Sections
Collision Detection
Collapse Import/ExportImport/Export
Import/Export Overview
Data Flow Sample
STL Tree
Collapse DG Kernel ComponentsDG Kernel Components
Components
DG Kernel Control
Collapse Properies, Methods, EventsProperies, Methods, Events
Properies
Methods
Events
Collapse Interactive FunctionalityInteractive Functionality
Context Menu
Measurements
Direct User Access
Modes of DG Kernel
Current Entities
Collapse View of DGK ControlView of DGK Control
Global Axes
Background
3D Background
Collapse Selection OverviewSelection Overview
Selection
Selection Event
Collapse Auxiliary ViewsAuxiliary Views
Model Explorer
Birds Eye View
Full Screen window
Collapse Programmatic FunctionalityProgrammatic Functionality
Programming
Porting V5 Apps to DGK
Queries
Data Types
Object Construction
Generator
Component Context
Model Properties
Initialisation Context
Collapse AdvancedAdvanced
64 Bit Development
Memory Management
Third Party Technologies
Collapse API ReferenceAPI Reference
Interface List
Vector Space
Collapse General GeometryGeneral Geometry
IPointArray_DG
IPointMatrix_DG
Collapse CurvesCurves
ICurve_DG
ICircle_DG
ILine_DG
IBSplineCurve_DG
IBSplineCurveInterpolator_DG
ICurveFreeForm
ICurveFreeFormEx
IArcSpline3DCurve
Collapse 2D2D
ICurve2d_DG
IBSplineCurve2d_DG
ICircle2d_DG
ILine2D
IArc
IArcEx
IEllipse_KC
IStripArcLine_KC
Collapse Oriented ObjectsOriented Objects
IObjectOriented
IPlane_DG
ISphere_DG
ICylinder_DG
ICone_DG
ITorus_DG
IBox_DG
IPolygon3D_DG
IPrizmInfinite_KC
IUVSurface_DG
IGeometricObject_DG
IPartialSplineProps_DG
IBSplineSurface_DG
ISurface
IRectangleAxisAligned_KC
Collapse GeneralGeneral
IStrip
IStripTopol
IElem
IElement
ILocation
ILocationEx
Collapse ModelModel
IModel_DG
Collapse EntitiesEntities
IEntity_DG
IEntityArray_DG
IStdShape_DG
IStdShapeRef_DG
IDraw_DG
IConstraint
Collapse GeometryGeometry
IGeometry_DG
ISurfacePoint_DG
ISurfaceMetric_KC
Collapse BSpline BRep GeometryBSpline BRep Geometry
Collapse Advanced AlgorithmsAdvanced Algorithms
IBRepChamfer_DG
IBRepDraftAngle_DG
IBRepFillet_DG
IFeaturePrism_DG
IBRepShape_DG
IBRepVertex_DG
IBRepEdge_DG
IBRepWire_DG
IBRepFace_DG
IBRepShell_DG
IBRepSolid_DG
IBRepCompositeSolid_DG
IBRepCompound_DG
IShapeArray_DG
IBRepBuilderEx_DG
IWireArrayToSurfaceBuilder_DG
IBRepGeometry_DG
IBRepBuilder_DG
Collapse Native OCCTNative OCCT
IIKO_Standard_Object
IKO_Model
IKO_TopExp_Explorer
BRep
BRepBuilderAPI
BRepExtrema
BRepOffsetAPI
BRepPrimAPI
Geom2d
GeomAPI
GP
ModModeling Algorithms
TColgp
TColStd
TopoDS
TopTools
Collapse Mesh GeometryMesh Geometry
IMesh
IMeshTopol
ISimplex
IMeshMods
IVertex
IMeshEx
IMeshPointKC
IVertexEx_KC
IEdge_KC
ISimplexEx_KC
IMeshAlgor
IMeshBuilder_KC
IMeshShading_KC
Collapse AppearenceAppearence
IAppearance_DG
IColor
IMaterial
ITexture
ILineStyle_KC
Collapse MovementMovement
Collapse Collision DetectionCollision Detection
IMetrics
IMetrics2
IKCPathCollisionDetector
IKinematicSection_KC
IMove_KC
IKinematicSet_KC
ICutEffect_KC
ISpinEffect_KC
Collapse ItemsItems
IModelItem_DG
IItemArray_DG
Collapse Import / ExportImport / Export
ICADFormat_KC
IDataContext
IFormatVersionDataContext
ISTLDataContext
IDataConvert_KC
Collapse Operations and AgorithmsOperations and Agorithms
IBooleanEntity_DG
IBoolSectionEx
ITransform
IDiffSurface_KC
IEuclideanShortestPath_KC
Collapse User DataUser Data
ILayers
IUserData_DG
IMatrixData
Collapse ViewView
IView_DG
ISelection_DG
IViewPoint
IViewPointArray
IScene_DG
IRectangleColor_KC
I2DView_KC
I2DView2_KC
I2DEditor_KC
IPrint_KC
IVirtualView
ILightSource
I3DGrid
Collapse General ComputingGeneral Computing
IObjectGenerator_DG
IControlInitialisationContext_KC
Collections
IUnknown
IObject_DG
ITypeBasic_KC
IBitmap
IBlob
IKCContext
IKCContext2
IError_KC
IKCStack
IMenu_KC
IMenuItem_KC
IGlobalAPI_KC
IRange
IText
IDIFont
I3DBugger
Collapse Embedded User DBEmbedded User DB
IData
Collapse Samples and TutorialsSamples and Tutorials
Sample List
.NET Samples
Delphi and C++ Samples
Collapse GraphicsGraphics
Concepts
3D View
Viewing Volume
Eye Frame
Perspective View
Collapse Math ObjectsMath Objects
Mathematical Objects
Points and Vectors
Planes
Frames
Transforms
Oriented Objects
Boxes
Collapse CurvesCurves
Curve Technologies
Native Curves
Collapse 2D Elements2D Elements
Geometric Elements
Arcs
Line Strips
Collapse DeprecatedDeprecated
Collapse Deprecated GeometryDeprecated Geometry
Collapse 3DS3DS
3DS Generator
Profiles
Surface Patches
Surfaces and Patch Strips
Input Validation
Collapse Lines and CurvesLines and Curves
Line Section
3DS Curves
Surface Of Revolution
Pipes
Collapse Deprecated API ReferenceDeprecated API Reference
Vector Space
General Geometry
Collapse ModelModel
IModel
IModel2
IModelEx
IModelSearch_KC
Collapse SectionSection
IBoundary
IStdShape
ISurfacePointKC
ISurfacePointArrayKC
IBoolSection
ISection
ISection2
ISectionPointSet
ISectionLineStrip
IPipeSection
ILineSection_KC
IObjectPosition_KC
IModelHealer_KC
IPointCloud_KC
Collapse 3DS3DS
I3DSectionGenerator
IAxiBase
IProfiles
IProfiledElement_KC
Collapse SORSOR
ISORSectionGenerator
Clipping Planes
IDraw
IDrawUtil
IDraw2
View
Collapse General ComputingGeneral Computing
IDIObjGenerator
IObject_KC
Collapse CollectionsCollections
IArray
IArray2
IList
IListUnkn_KC
IRelation
IArrayNum
IArray3D
IRefMap_KC
Redistribution
Model Viewer
Open Source
Support
Skip Navigation Links Search Documentation


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)

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