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 > Programming Samples and Tutorials > Overview > Collision Path
Collision Path Sample

Collision Path Sample

Collision Path sample demonstrates programming of Path Collision Detection.

See also: IKCPathCollisionDetector, Collision Sample Metrics Sample, All samples.

Running the application  

The application expects the model to have at least two top level objects. Names of the first and the second objects are displayed on the right hand side of the form. Each object has an associated  Movement defined by an array of frames

When Path check box is on a red line in 3D shows path of movement of the current object. Turn off Objects check box and turn on Points to see a clearer picture. Path of the second object is not visible by default when the current object has changed to 1 because the second object only rotates around its constant location.

On click of the Animate button the application calculates collision moment and will move along paths defined by the Path group of controls until the collision is reached. If there where no collision the objects will run full length of the path and will stop at the end.

The top Up Down control in the Current Object group changes between objects in the model. When Static check box is on the objects will not move so its path does not have to be defined.

Path of the current object is defined by an array of frames, which can be edited using the Path group. Size of the array can be increased with the Frame Count control, so more smooth or more complicated movement can be defined. The current frame is rendered in 3D when the "Current Frame" check box is on.

The Quadratic Interpolation option in the Interpolation group makes the path a smooth curve fit into location points, which are origins of frames from the frame array. Turn on Points check box to see the point set.

Reset button restores display to the initial position of the movement after the previous animation.

Implementation

C++

Visual Basic .NET

C#