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 > View Points
View Points

Viewpoints

 
Kernel CAD  models keep an array of viewpoints (Viewpoint Array). Viewpoint stores information about the current configuration of view, which is the result of the previous viewing manipulations Zoom/Pan/Rotate. This information can be saved with the model and used to restore the configuration programmatically via IViewPoint.SetCurrent method.

One of viewpoints can be set as the Default Viewpoint. Default viewpoint is restored automatically on the model load, including application start-up.

Viewpoints stored in the Viewpoint Array are called Persistent Viewpoints. View of  a KernelCAD Component also maintains a single viewpoint called Transient Viewpoint. It is not saved with the model and exists only to facilitate programmatic modification for the configuration of view.

Viewpoints are Scene Items, hence they have Name and Visibility properties, which can be managed via IItem interface. Viewpoints are always top-level items, so they do not have parents. Like Sections viewpoints have Local Frame property. Its visibility can be managed via ISection2 interface.

Collection of Persistent viewpoints is managed by IViewPointArray interface, which can be queried via path: KernelCAD > GetView > IView > IViewPointArray.

IArray2 queried via path: KernelCAD > GetView > IPropertyArray > IPropertyArray.GetProperty("ViewPoints") > IArray2 allows some additional operations like search for a viewpoint by its name, changing order of viewpoints in the array and insertion of an existing viewpoint.

Individual viewpoint is managed by IViewPoint, which can be obtained with ViewPointArray.GetAt or IArray2.GetAt.

IViewPoint for the transient viewpoint can be queried directly from IView without any add or create operations.

To add a new persistent viewpoint use IViewPointArray.Add or relevant methods of IArray2 with val parameter set to NULL. The new viewpoint will store the current configuration of view automatically.

To add a new viewpoint in 3D Debugger use Views > "Store Viewpoint" menu command. Name and other properties of the added viewpoint can be modified in the Model Explorer.

See also Point Of View Sample