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 > Mathematical Objects > Frames
Frames

Frames

Frame is a system of coordinate axes. It is uniquely determined by 3D point of its origin in global coordinates and 3D vectors of its axes. To be valid, vectors of the axes must have length 1.0 and be perpendicular to each other.  Programmatically frames are manipulated by frame interfaces

Frame is very important and frequently used concept because it represents purified concept of location and orientation.

Nearly all items in 3D scene of KernelCAD have intrinsic frame member (property) called local frame, which defines location and orientation of the object (section). Geometry of a section is always defined relative to its local axes to make it invariant under any movement.

To create a new (standalone) frame call IDIObjGenerator.Create or IDIObjGenerator.Create2 with eType parameter set to eObjTypeFrame member of EObjectType enumeration. The returned IUnknown reference has actual type IFrame and can be safely cast to or queried from to convert to IFrame type.

Frames and Transforms

There is a close correspondence between farmes and transforms of 3D space. In particular this correspondence allows perfoming multiplication operation on frames similar to composition of transforms. See more details at Transforms topic

Drawing a frame

Local frame of a section is rendered if the visibility flag controlled by ISection.GetVisibleFlag() / ISection.SetVisible() is on.

A standalone frame can be added to the scene with the help of Frame Graphic Item, which is a software object implementing IGraphicItem. To draw a frame:

See CreateFrameGraphicItem() method of Collision Path sample for an example.

A permanent object, which represents a frame and can be saved with the model can be modeled in 3D Debugger or created programmatically using Line Strips