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 > Items
SScene Items

Scene Items

A part of the model which can be rendered in the 3D/2D view is called Scene Item. Items are the common base type for Sections ( Objects) ), Labels, View Points, Measurements etc. Items keep Name, Visibility, and Parent properties, which are managed by IItem interface. Items, which are not sections (Labels, View Points,, etc) do not have surface or lines, i.e. they do not have geometry.

An item can be indepenendent (top-level) or be a child of a section. Items do not have children.Top-level scene items can be accessed via IModel.GetItem(). Child items can be accessed via ISection.GetItem()

Array of all top-level items of any type can also be accessed via query: KernelCAD >GetModel > IModel > IPropertyArray2 > GetProperty("ItemArray") > IArray2..Cast the obejct returned by IArray2.GetAt() to IItem. Query a specific interface from IItem to determine the actual type of the interface. For example labels implement IText interface and view points implement IViewPoint.

Use ISection > IPropertyArray2 > GetProperty("ItemArray") > IArray2 query to obtain array of child items of a section

Localized Items

Localized Items are Items, that also support an enhanced set of properties: "Location", which managed by ILocation interface, "Frame Type" and "Depth Position Type", which managed by ILocationEx interface. 3D Labels are the main example of Localized Items.

Possible Frame Type values are enumerated by EModelViewFrame. With Frame Type set to eModelViewFrameGlobal (default) the item is positioned relatively either the global frame of the model when the item is a top-level one or relative to the local frame of its parent. Coordinates of the item set via ILocation are normal Cartesian coordinates in the above frame.

When Frame Type is set to eModelViewFrameEye the item is positioned relatively either to the box of the Viewing Volume, when the item is a top-level one, or relative to the Bounding Box of the parent  object. The Bounding Box here is the minimal 3D box in Eye Frame containing the parent object. Coordinates of the item set via ILocation are normalized coordinates of the above box: For all coordinates range [-1,1] is mapped to dimension of the relevant box. Point (0,0,0) corresponds to the center of the box. Point (-1, -1, -1) is the left bottom back corner of the box. Point (1,1,1) is the right top front corner and (0.5, 0.5, 1) is the center of the front side of the box. Values outside the [-1,1] range are valid too and it is the common case. The item will be located outside the box in this situation.

Depth Position Type describes what additional, if any, positioning in z direction relative to the viewing plane (screen) is required. Depth Position Type values are enumerated by EModelEntity.

When Depth Position Type is eModelEntityUnknown (default) the depth is determined by coordinates of the item set via ILocation and no additional action is performed.

When Depth Position Type is eModelEntityObject the item will be translated in z direction to position it on the top of its parent object. In this case the item can be obscured by other objects in the model, but will always appear on the top of its parent.  If the item does not have a parent (top-level item) no z translation is performed.

When Depth Position Type is eModelEntityModel the item will be translated in z direction to position it on the top of all objects in the model, so it is never obscured.

See also: LabelEx Sample, Objects, Labels, IItem, ILocationEx