KernelCAD Documentation

DInsight Home
Skip Navigation Links.
Start page
Quick Start
Installation
Overview of the software
What is new
Collapse KernelCAD ModelsKernelCAD Models
Model Structure
Securing Models
Collapse Import/ExportImport/Export
Import and Export
Collapse Adanced Data ExchangeAdanced Data Exchange
Data Flow Sample
STL Tree
IDataContext Interface
ISTLDataContext Interface
Collapse Scene ItemsScene Items
Items
3D Text
Smart Labels
View Points
Collapse MeasurementsMeasurements
Measurements
Persistent Measurements
Grid
Collapse SectionsSections
Sections
Section Types
Collapse 2D2D
Overlays
2D Models
2D Items
Point Sets
Collapse Line and Curve SectionsLine and Curve Sections
Line Strips
Line Section
3DS Curves
Collapse Surface and Solid SectionsSurface and Solid Sections
Surfaces
Collapse Mesh SectionsMesh Sections
Mesh Section
Mesh
Surface Of Revolution
BRep 3D Objects
Collapse BRep BSpline objectsBRep BSpline objects
Bspline objects
BSpline Faces
BRep Section
Pipes
Collapse 3DS Sections3DS Sections
3D Section
Profiles
Surface Patches
Surfaces and Patch Strips
Collapse AttributesAttributes
Material
Clipping Planes
Symmetries (Arrays)
Textures
Collapse OperationsOperations
Boolean Operations
Surface Trim
Cut Surface
Collapse MovementsMovements
Movements
Kinematic Sections
Collision Detection
3D Grid
Collapse Mathematical ObjectsMathematical Objects
Pure Geometric Objects
Points and Vectors
Planes
Collapse CurvesCurves
Straight Lines
3D Circle
Ellipse
Free-Form Curves
Arc Spline Curves
Frames
Transfroms
Oriented Boxes
Collapse 2D Elements2D Elements
Geometric Elements
Arcs
Line Strips
Collapse Basics of 3D GraphicsBasics of 3D Graphics
Concepts
3D View
2D View
Viewing Volume
Birds Eye View
Viewing Plane
Perspective View
Background
Collapse AlgorithmsAlgorithms
Euclidean Shortest Path
Collapse User DataUser Data
Layers
Object User Data
Model User Data
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
Topological Modifications
Programming commands
Dynamic model restructuring
Dynamic Object Creation
Generator of 3D Sections
Generator of SOR Objects
Model class
Selection
Selection Event
External Models
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
IKO_Standard_Object
IKO_Model
IKO_TopExp_Explorer
Collapse BRepExtremaBRepExtrema
IKO_BRepExtrema_DistShapeShape
Collapse Geom2dGeom2d
IKO_Geom_CylindricalSurface
IKO_Geom_ElementarySurface
IKO_Geom2d_Circle
IKO_Geom2d_Conic
IKO_Geom2d_Curve
IKO_Geom2d_Geometry
IKO_Geom2d_Line
Collapse GeomGeom
IKO_Geom_BSplineCurve
IKO_Geom_BSplineSurface
Collapse GPGP
IKO_gp_Ax1
IKO_gp_Ax2
IKO_gp_Ax22d
IKO_gp_Ax2d
IKO_gp_Ax3
IKO_gp_Circ2d
IKO_gp_GTrsf2d
IKO_gp_Lin2d
IKO_gp_Mat2d
IKO_gp_Object
IKO_gp_Sphere
IKO_gp_Cone
IKO_gp_Torus
IKO_gp_Trsf
IKO_gp_Cylinder
IKO_gp_Pln
IKO_gp_Circ
IKO_gp_Trsf2d
Collapse GeomAPIGeomAPI
IKO_GeomAPI_PointsToBSpline
IKO_GeomAPI_Interpolate
Collapse TColStdTColStd
IKO_TColStd_Array1
IKO_TColStd_Array1OfInteger
Collapse TColgpTColgp
IKO_TColgp_Array1OfPnt
IKO_TColgp_Array1OfVec
Collapse BRepBRep
IKO_BRep_Builder
Collapse BRepBuilderAPIBRepBuilderAPI
IKO_BRep_Builder
IKO_BRepBuilderAPI_MakeWire
IKO_BRepBuilderAPI_MakeEdge
Collapse BRepOffsetAPIBRepOffsetAPI
IKO_BRepOffsetAPI_ThruSections
Collapse BRepPrimAPIBRepPrimAPI
IKO_BRepPrimAPI_MakePrism
Collapse ModModelingAlgorithmsModModelingAlgorithms
IKO_BRepGProp_Face
Collapse TopoDSTopoDS
IKO_TopoDS_Shape
IKO_TopoDS_Edge
IKO_TopoDS_Face
IKO_TopoDS_Wire
Collapse DataData
Collapse Import / ExportImport / Export
IDataConvert_KC
ICADFormat_KC
IDataContext
ISTLDataContext
IFormatVersionDataContext
Collapse User Data User Data
ILayers
IDataSource
IDataTable
IRecordSet
IDataMods
IUserData
IMatrixData
Collapse MovementMovement
IKinematicSection_KC
IMove_KC
IKinematicSet_KC
ICutEffect_KC
ISpinEffect_KC
Collapse FramesFrames
I3DObject
IFrame
IFrame2
IFrame3
IFrameEx
Collapse Oriented ObjectsOriented Objects
IObjectOriented
ISphere_KC
IBox
Collapse SectionsSections
Collapse ItemsItems
IItem
ILabel3D_KC
IDynamicScreenItem_KC
IDynamicScreenItemManager_KC
ISmartLabelManager_KC
ISection
ISection2
ISectionPointSet
ISectionLineStrip
ITextSection_KC
IPipeSection
ILineSection_KC
IObjectPosition_KC
ISticky_KC
ILabelSection_KC
IModelHealer_KC
IPointCloud_KC
IProfiledElement_KC
Collapse Mesh interfacesMesh interfaces
IMesh
IMeshTopol
ISimplex
IMeshMods
IVertex
IMeshEx
IIterator
IMeshPointKC
ISurfacePointKC
ISurfaceMetric_KC
IVertexEx_KC
IEdge_KC
ISimplexEx_KC
IMeshAlgor
IMeshShading_KC
Collapse GeneralGeneral
Collapse Collections InterfacesCollections Interfaces
IArray
IArray2
IList
IListUnkn_KC
IRelation
IArrayNum
IArray3D
IRefMap_KC
IObject_KC
ITypeBasic_KC2
IModelSearch_KC
IBitmap
IBlob
IKCContext
IKCContext2
IError_KC
IKCStack
ILineStyle_KC
IMenu_KC
IMenuItem_KC
IGlobalAPI_KC
IControlInitialisationContext_KC
IRange
IRectangleAxisAligned_KC
Collapse Topological InterfacesTopological Interfaces
IStripTopol
I3DSectionGenerator
ISORSectionGenerator 
IDIObjGenerator
Collapse Viewing InterfacesViewing Interfaces
IView
IView2
IViewPoint
IViewPointArray
ILookAt
IViewModal
ILook
ILookEx
IMeasurement_KC
IPick
ISelection_KC
IRectangleColor_KC
I2DView_KC
I2DView2_KC
I2DEditor_KC
IPrint_KC
IVirtualView
IGraphicItem
Collapse Lines And CurvesLines And Curves
ILine
ILineGeom
ILineMetr
ICurve
ICurveFreeForm
ICurveFreeFormEx
IArcSpline3DCurve
IArc
IArcEx
ICircle3D_KC2
IEllipse_KC
Collapse Symmetry InterfacesSymmetry Interfaces
ISymmetries
ISymmetry
IAxialSymmetry
Collapse Clipping plane interfacesClipping plane interfaces
IClipArray
IClipPlane
Collapse AlgorithmsAlgorithms
IEuclideanShortestPath_KC
Collapse 2D Geometry2D Geometry
ILine2D
IArc
IArcEx
IStripArcLine_KC
Collapse Programming Samples and TutorialsProgramming Samples and Tutorials
Collapse OverviewOverview
Sample List
3DBugger
BoolOp
PlanarOps
Calculator
Capture
Cannon
Clip
Cloud
Collision
Collision Path
Cross View
Data Flow
Data Flow
Deploy Tutorial
DiffSurface
Direct User Access Demo
DIView
eMotion
Euclidean Shortest Path
Gear
Label
LabelEx
Layers
Light
Lines
LowDim
Make Your Move
Measure
Mesh Mods
MeshOps
Metrics
MiniCAD
Modal
Modeling Curves
Morph
Object Array
Overlay
Patch
Patchwork
Pick
Point Of View
BoolOp
Profile
Rotation
Pipes
Layers
Shape Explorer
Smart Labels
Strip Topology
Surface Metrics
Symmetry
Transform
Texture
Turbine
TwoD
User Data
View Point
WpfCAD
Zoom
Collapse DeploymentDeployment
Deploy Tutorial
DeployModule
DeployWixBasic
WixDeploy
Collapse .NET Samples.NET Samples
Collapse C# SamplesC# Samples
Patch Tutorial
MiniCAD Sample
Strip Topology Sample
DI View Sample
Modal View Sample
Modeling Curves
Label
LabelEx
Pick
Object Array
Data Flow
Profile
Cross View
Low Dim
Morph
Clip
BoolOp
Collision
Collision Path
3DBugger
Data Flow
Shape Explorer
Smart Labels
Symmetry Sample
Cannon
View Point Sample
Capture
User Data
Layers
Zoom
Collapse Visual Basic SamplesVisual Basic Samples
Patch Tutorial
DI View Sample
MiniCAD Sample
Object Array Sample
BoolOp
Data Flow
Pipes
Transform
Measure
Mesh Mods
Mesh Ops
Metrics
Morph
TwoD
eMotion
Cross View
3DBugger Tutorial
Collision
Collision Path
Light
Patchwork
Capture
Collapse WPFWPF
Clip
Mesh Ops
Measure
Lines
LowDim
WPF
Patch
Collapse Delphi SamplesDelphi Samples
3DBugger
BoolOp
Calculator
Patch Sample
Modelling Curves
MiniCAD Sample
Morph
Shape Explorer
Object Array
Metrics
Cannon
Pipes
Patchwork
Collision
Collapse C++ SamplesC++ Samples
3DBugger
BoolOp
Cannon
Capture
Cloud
Collision
Collision Path
Cross View
DI View Sample
eMotion
Gear Sample
Label
LabelEx
Light Sample
Measure
Mesh Ops
MiniCAD Sample
Modal Sample
Modeling Curves
Object Array Sample
Overlay Sample
Patch Tutorial
Pick
Point Of View
Planar Ops
Rotation Sample
Profile Sample
Shape Explorer
Smart Labels
Strip Topology Sample
Layers
Lines
LowDim
Metrics
Metrics2
Morph Sample
Patchwork
Pipes
Symmetry Sample
Texture Sample
Transform
TwoD
Turbine Sample
User Data
View Point Sample
Zoom Sample
Collapse Visual Basic SamplesVisual Basic Samples
Patch
DI View
MiniCAD
Data Flow
Cross View
Cloud
Planar Ops
Calculator
Light
Pick
Object Array
Label
Symmetry
Transform
Morph
Line Strip
Capture
Collapse Delphi SamplesDelphi Samples
KernelCAD and Delphi
3DBugger
Data Flow
BoolOp
Calculator
Cannon
Collision
Label
LabelEx
Metrics
MiniCAD
ModelingCurves
Object Array
Patch
Patchwork
Pipes
Collapse 3D Debugger3D Debugger
Creating and editing models
Editing Generic 3D Objects
Topological Commands
Model Explorer
Export / Import
Modeling Tips
3D Debugger
Collapse EditorsEditors
Form View
3D View
Collapse 2D Editors2D Editors
Crossection View
Profile View
Drum View
Collapse DialogsDialogs
3D Curve Dialog
Symmetry Collection Editor
Clip Editor
Material Editor
Surface options dialog
Collapse Modelling TutorialsModelling Tutorials
Table Tutorial
Mouse Tutorial
Collapse DeploymentDeployment
Redistribution
Registration
Deploy Module Tutorial
WixDeploy Tutorial
DeployWixBasic
Deploy Tutorial
Licensing
Model Viewer
Open C++ Source
Technical Support
Skip Navigation LinksHome Page > Programming Samples and Tutorials > Deployment > Deploy Tutorial
Deploy Tutorial

Deploy Tutorial

The delployment method described below is flexible, but more involved way to redistribute KernelCAD. You might find a simpler method desribed in Redistribution

This tutorial demonstrates steps required to distribute an application which uses KernelCAD components. The tutorial is based on Microsoft Visual Studio 2008. The project can be opened with an automatic upgrade with later versios of Visual Studio. With adjustments for different user interface the same  steps are required when using different installer creation software like Install Shield.

The installer will install MiniCAD.exe from the MiniCAD sample. It is a native C++ application. If an application uses .NET version of components KerCADe.ocx below must be replaced with KerCADne.ocx with relevant adjustments of names in registry etc.

A copy of the completed project is available in Samples\Deploy folder. The completed project is based on 32 bit KernelCAD product. 

See also: Redistribution

File System

  • In Microsoft Visual Studio select File > New > Project. In the New Project dialog expand "Other Project types" in the left panel and select "Setup and Deployment"
  • In the right-hand side panel select "Setup Project". Select location for the project at the bottom and type "Deploy" for the name.
  • When the project is created Visual Studio opens File System window. It can be closed and re-opened using icons on top of the Solution Explorer.
  • Select "Application Folder" in the File System window and select Action > Add > File in menu. Browse to the installation folder of KernelCAD, which is C:\Projects\KernelCAD_5_2 by default
  • Select MiniCAD.exe. Press Open. The MiniCAD.exe will appear in the right hand side panel of the File System window.
  • In the same manner add all files, except the ones with .exe extension from KernelCAD_5_2\Bin folder of the KernelCAD installation directory to the Application Folder. Use Ctrl+a to select all files. Hold the control key and deselect any files which need to be excluded.
  • Add RegAll.exe located in KernelCAD_5_2\Bin directory to the Application Folder
  • The whole "data" subfolder of KernelCAD_5_2\Bin has to be added to the installation too without any change. Use right-click > Add > Folder option to create data folder and its subfolders. Add its contents.
  • Right-click the added KerCADe.ocx and select "Properties Window". Make sure that Register property in Property Window is vsdrfDoNotRegister. Repeat the same for KerCADne.ocx
  • If there are two copies of KerCADne.ocx (a duplicate can be automatically incorrectly added by Visual Studio) select one of them and delete. If deletion does not work select the file and its properties change Exclude to true
  • Select Application Folder in the left hand pane of the File System window and in context menu select Add > Folder. Change name of the folder to Models. The name can also be changed using the Properties Window. Add new Samples sub folder to the Models folder in the same manner.
  • Add MiniCAD.glm from Models\Samples folder of KernelCAD directory to the Models\Samples folder of the target directory
  • Add Gen.ico file located in KernelCAD_5_2 to the Application Folder
  • In the Solution Explorer of the Visual Studio select the Deploy top item. If the properties window (View > Properties Window) click at the end of the AddRemoveProgramIcon line and in the appeared dialog browse to the Gen.ico
  • If you are using 64 bit KernelCAD change TargetPlatform property of the project to x64
  • Change the remaining properties of the project as appropriate
  • Select User's Programs Menu folder in File System window. Right-click into right hand pane and select "Create New Shortcut". Select MiniCAD.exe in the dialog and press OK. Change name of the shortcut to MiniCAD. In the properties window change the Icon property to Gen.ico similar to the above
  • Make sure that the active configuration is Release (Builld > Configuration Manager). Select Build > Rebuild solution. The files located in the Deploy\Release folder are the files to be deployed to the target computer

Registration And DirectX

To register the installed controls on the target machine:

  • Select the Deploy project in Solution Explorer of Visual Studio and press Custom Actions editor icon on top of the Solution Explorer window
  • In the opened Custom Actions editor right-click on the Install stage and select Add Custom Action.
  • In the opened dialog browse and select RegAll.exe. Rename the appeared item to RegAll
  • With the RegAll item selected open properties window and replace contents of the Arguments property with KerCADne.xreg KerCADe.xreg
  • In the same manner add UnRegAll custom step to Uninstall stage. The action should use the same RegAll.exe. The Arguments property should be the same, apart from the /u switch: /u KerCADne.xreg KerCADe.xreg
  • In the Custom Actions Editor add another custom action to the Install stage. When prompted Browse to the Application Folder\Bin\DirectX9_43 and select DXSETUP.exe. Name the action DirectXSetup. Set /silent as its Arguments property

See also: Registration.

Locating model on target computer

Enabling EmbeddedModel property of the control allows bundling the required model into compiled executable file. With this option there is no need for adding MiniCAD.glm and Models folder to the target file system.

Another method to point an installed application to required model file is the <EXEPATH> modifier of the ModelPath. In our case MiniCAD application would have to be recompiled with ModelPath changed to <EXEPATH>Models\Samples\MiniCAD.glm. In this case <EXEPATH> would be interpreted on the target machine as location of MiniCAD.exe, which is the target folder

In this particular case ModelPath of the control in MiniCAD sample is set to Models\Samples\MiniCAD.glm, so by default the MiniCAD application looks for the MiniCAD.glm model in Models\Samples folder of KernelCAD installation directory, which is not expected to be installed on the target computer.

To avoid recompilation of MiniCAD we will demonstrate yet another method:

  • Select Deploy node in Solution Explorer and click on Registry Editor icon on the top of the window
  • In the opened Registry window Expand HKEY_LOCAL_MACHINE key. and select Software key. Select New > Key from background menu. Change name of the key to DInsight. Continue in the same manner to create HKEY_LOCAL_MACHINE\SOFTWARE\DInsight\KerCADe\5_2
  • Select the added 5_2 key and in context menu select New > String Value. Change name of the value to InstallDir. Select the InstallDir node and in Properties window change Value property to [TARGETDIR] with the brackets included.

Above will store the installation path of your application chosen by the user into InstallDir string and the control will find it there at runtime.

C++ Runtime libraries

To add Microsoft's C++ dependencies:
  • Download KcRedist_5_2.zip (KcRedist_x64_5_2.zip for 64 bit installer) from http://www.dynoinsight.com/ProDown.htm and extract it into KcRedist_5_2 folder in a temporary location
  • Right-click DeployModule project in Solution Explorer of Visual Studio and select Add>Merge Module. Browse and select the two Microsoft*.msm files in the KcRedist_5_2 folder. They will appear in Solution Explorer of Visual Studio

Installer titles and properties

  • Select Deploy node in solution explorer and change ProductName property in Properties Window to "MiniCAD v1.0"
  • Change Title property to "MiniCAD v1.0 Setup"

Building and testing

  • Make sure that the active configuration is Release via Build > "Configuration Manager" menu option of Visual Studio
  • Build the project with Build > Build Solution. Make sure that there are no errors in the output window
  • The Deploy.msi and setup.exe created in Release folder is the output of the project. To make sure the application works without KernelCAD it is recommended to copy the two files to another machine or uninstall KernelCAD temporary
  • Run setup.exe to install the application. Select MiniCAD in Start menu to test the application.
  • Uninstall the MiniCAD application using "Add or Remove Programs" from Control Panel