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 > Sample List
Programming Samples and Tutorials

Samples

If a sample is not available in your language see the comparative samples below and look up a sample in a similar language or contact us...

Sample Description Difficulty Language
3DBugger Different methods and techniques for debugging 3D applications using KernelCAD 3D Debugger Advanced VB .NET, C++, C#, Delphi
BoolOp Demonstrates programming of Boolean Operations Medium Delphi, C++, C#, VB .NET
Calculator Background geometrical calculations Medium VB 6, Delphi
Capture Capturing the 2D image currently displayed in 3D view Simple C#,VB6, C++
Cannon Intersections of line with objects and/or model. Client Draw event Advanced Delphi, C#, C++
Clip Clipping Planes Simple C++, C#, WPF
Cloud Building surfaces from point clouds. Minimal Bounding Box Simple C++, VB6, VB .NET
Collision Usage of IMetrics for Collision Detection Medium C#, C++, VB .NET, Delphi
Collision Path

Demonstrates programming of Path Collision Detection.

Medium C#, VB .NET, C++
Cross View

Demonstrates different methods of calculation and display of intersection of 3D objects with a 3D plane.

Advanced VB6, C++, C#
Data Flow Programmatic Import / Export. Splitting unlinked meshes Medium C#, VB .NET, VB6, C++
Deploy Tutorial Demonstrates steps required to distribute an application which uses KernelCAD components Simple  
Deploy Module Tutorial Demonstrates steps required to distribute a KernelCAD-based application using merge modules Simple  
DeployWixBasic Deployment using Wix code to include KernelCAD modules Simple Wix
Diff Surface Demonstrates usage of IDiffSurface_KC for local approximation of a meshed surface with a  bspline patch Simple VB .NET, C++
Direct User Access Demo The application demonstrates usage of several relatively complex commands available to end user from the context menu Simple  
DIView KernelCAD control as resizable view. Programming gradient background. Printing support Simple C++, C#, VB .NET, VB 6
eMotion Boolean Operations in simulation of CNC machining. Programming of 3D movements and CAM Effects. Advanced C++
eXplorer Calculation of drilling path with alternating arc/line splines. Two-arcs spline. Runtime scene creation. Animation Simple N/A
Euclidean Shortest Path Demonstrates usage of IEuclideanShortestPath_KC. Medium VB .NET, C++
Gear Mechanical applied design Medium C++, C#
Label 3D Text Simple C#, VB 6, C++
LabelEx Advanced properties of 3D Labels and geometric text Medium C#, C++, Delphi
Layers Programming of layers Medium C++, C#
Light Properties of light sources. Material. Programming of Context Menu Simple C#, VB .NET, C++, VB 6
Lines Line Strips Simple C++, VB6, WPF
LowDim Programming of Point Sets Simple C++, C#, WPF
Measure

Programmatic creation of measurements and measurement-style labels

Simple C++, VB .NET, WPF
Mesh Ops Demonstrates extraction of submeshes Simple VB .NET, C++, WPF
MeshMods

Direct manipulation of surface and handling of selection events

Simple VB .NET, C++
Metrics Distances between objects Medium VB .NET, Delphi
Metrics C++ Distances between objects Simple C++
Metrics2 Distances between objects Medium C++
MiniCAD Parametric modifications of 3DS and SOR objects. Object movements Medium C++, C#. Delphi .NET, VB .NET, VB 6
Modal Modal Mode and movement constraints Medium C++, C#
Modeling Curves Demonstrates creation of surfaces and solids from arrays of curves using thru operation Medium C#, VB.NET, C++,Delphi
Morph Mesh manipulation. Exploring meshed surface. Shading Advanced Delphi, C#, VB.NET, VB 6, C++
Object Array Dynamic object creation and and manipulation of child/parent hierarchy Medium C++, C#, VB .NET, VB 6
OCCT Bridge Direct acces to OCCT technology via ITechnology_DG. Customisation of OCCT functionality Medium C++
Ogre Bridge Direct acces to Ogre technology via ITechnology_DG. Customisation of OCCT functionality Medium C++
Overlay Direct access and programming of overlays Medium VB.NET, C++, VB6
Patch Modifications of 3DS surfaces. Programming 3D Background Simple C#, WPF, Delphi .NET, VB .NET, C++, VB 6
Patchwork Discovering Patch / Edge / vertex structure of an object Medium C++, VB .NET, Delphi
Pick Different methods of runtime object and point selection. Events Medium C#, VB.NET, VB6,C++
Pipes Programming of Pipe Sections Medium VB .NET, C++, Delphi
Planar Ops Planar Boolean Operations and programming of Clipping Planes. Simple C#, C++, VB6
Point Of View User manipulation and programming of View Points Medium C++
Profile Modification of profiles of 3DS objects Medium C++, C#
Rotation View point manipulation Medium C++
Shape Explorer Browsing sub shape hierarchy of bspline objects. u,v parameters. Building new bspline objects at runtime Simple C#, Delphi,C++
Smart Labels Automatically positioned non-overlapping 3D text Medium C#, C++
Strip Topology Dynamic modification of surface structure Medium C++, C#
Surface Metrics Demonstrates  usage of ISurfaceMetric_KC for calculation of projection of points and curves to surface of an object Simple C++, VB .NET
Symmetry Types and properties of Symmetries (Arrays) Simple C++, C#, VB 6
Texture Textures of surfaces Medium C++
Transform Scaling, translation, rotation, offset and other transformations of surfaces. Operations with transforms and frames (C#) Simple VB .NET, VB 6, C++, C#
Turbine Applied design Medium C++
TwoD 2D View. Multiple views of a model. Printing support. Medium VB .NETC++
WpfCAD Usage of KernelCAD in a Windows Presentation Framework application Simple C#
User Data Usage of custom data in objects and Model Data Table Medium C++, C#
View Point View point manipulation Medium C++, C#
Zoom Programming of zoom and view point Medium C++
WixDeploy Tutorial Customisation, of Model Explorer; Building Model Explorer for .NET other than v4.0; Deployment using Wix Tool set Advanced Wix

Warning: For simplicity samples do not contain much of validation code. For production it is strongly recommended to add checks for success of interface query, assumptions about structure of the model etc

Language mapping examples

Below are samples of the same piece of code, which hides the first object in the model in different languages.

Visual Basic 6  (*.frm)

Dim iModel As IModel
Set iModel = m_KernelCADCtrl.GetModel
Dim iSection As ISection
Set iSection = m_iModel.GetSection(0)
iSection.SetVisible False

Visual Basic .NET (*.vb)

Dim iModel As IModel
iModel = m_KernelCADCtrl.GetModel()
Dim iSection As ISection
iSection = iModel.GetSection(0)
iSection.SetVisible(False)

C++  (*.cpp)

IModel* iModel;
iModel = (IModel*)m_KernelCADCtrl.GetModel();
ISection* iSection;
iModel->GetSection(0, &iSection);
iSection->SetVisible(VARIANT_FALSE);

Native Delphi (*.pas)

iModel : IModel;
iSection : ISection;
iModel := m_KernelCADCtrl.GetModel();
iModel.GetSection(0, &iSection);
iSection.SetVisible(true)

Delphi .NET (*.pas)

iModel : IModel;
iSection : ISection;
iModel := m_KernelCADCtrl.GetModel();
iModel.GetSection(0, iSection);
iSection.SetVisible(true)

C# (*.cs)

IModel iModel;
iModel = (IModel)m_KernelCADCtrl.GetModel();
ISection iSection;
iSection = iModel.GetSection(0);
iSection.SetVisible(false);