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 Models > Scene Items > Measurements > Persistent Measurements
Persistent Measurements

Persistent Measurements

See also: Measurements Overview

Persistent measurements are part of the model. Once added to the scene they persist during viewing manipulations: rotations etc. Note that persistent measurements are not saved and loaded with the model. Contact us to request this feature. Persistent mode is the default mode of the component.

To add a distance measurement:

  • If the view is three dimensional make sure the surface is not facing the viewer flat (normal to the surface should have some non-zero angle with direction toward the viewer)
  • Make sure the view has focus (click into the window) and press 'm' key to enter the measurement mode.
  • Select the first point on surface of any object in 3D or any point in 2D with left mouse button. The first selected point will be identified by a distance line from the current mouse location
  • Select the second point on surface of any object in 3D or any point in 2D  with left mouse button.
  • Move mouse away from distance line ( preferably in direction of the surface normal) to define location of the text box showing the distance. By default the text box will be positioned in the middle of the dimension line.

To modify location of measurement text box

  • Enter the measurement mode
  • Press 'n' key
  • Select a measurement text box with the mouse and move it around while keeping the left mouse button down
  • Click outside the text box to deselect the item.

To modify direction of limit lines

  • Enter the measurement mode
  • Press 'n' key
  • Select an end of one of the limit lines and move it to rotate the line around the distance line
  • Click outside the ends to deselect the item.

To delete a measurement

  • Enter the measurement mode
  • Press 'n' key
  • Select a measurement text box and press Delete key

To delete all measurements

  • Enter the measurement mode
  • Press 'd' key

To obtain coordinates of a selected point

  • Enter the measurement mode
  • Press 'p' key
  • Select any point on the screen. Move mouse to position the text box with coordinates. Unless disabled via UseClipboard property, coordinates of the selected point will also be copied to the clipboard. In 3D mode the selected point will be located on surface of the object under the mouse or in the viewing plane if there is no object.

To append units string to the measurement text

To use a measurement as a 3D text label

To change displayed number of digits in the measurement text

To change snap to line tolerance

To change snap to point tolerance

Measurements are viewing functionality and are not stored with the model. Contact us if your application requires persistent measurements

Programming Measurements

To add a measurement to 3D scene model programmatically:

  1. Call IDIObjGenerator.Create or IDIObjGenerator.Create2 with parameter eType = EObjectType.eObjTypeMeasurement
  2. Query IItem from the returned IUnknown
  3. Use IArray or IArray2 queried from IModel to add the new item to the model
  4. Query IMeasurement_KC from the above IItem
  5. Use methods of IMeasurement_KC to modify measurement points, positioning of the text pox and the displayed text

To programmatically modify an existing measurement in 3D scene:

Use steps 3 - 5 from the above

To add a measurement to two dimensional scene:

  1. Obtain IKCContext via KernelCAD > GetView > IView > I2DView_KC > I2DView_KC.GetContext
  2. Query IArray2 from the IKCContext
  3. Call IArray2.InsertNew(EObjectType.eObjTypeMeasurement, 0). 0 can be replaced here with any valid index.
  4. Call IArray2.GetAt(0) to retrieve the newly created 2D scene item. The returned interface has actual type of IItem
  5. Query IMeasurement_KC from the returned interface
  6. Use methods of IMeasurement_KC to modify measurement points, positioning of the text pox and the displayed text

To programmatically modify an existing measurement in two dimensional scene:

Use the above and skip the step 3