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 Components > 64 bit development
64 bit support

Support for 64 bit development

64 bit apllications are supported by x64 editions of KernelCAD products starting from the version 4.3.

Due to the fact that there is no full 64 bit version of Microsoft Visual Studio available, 64 bit applications have limited functionality in design mode (form editors). One limitation is that the 3D view of the actual model is not displayed in design mode (in runtime all works as expected). Another limitation is that embedding model into x64 applications is not supported starting from v4.3. These limitations will be removed as soon as Microsoft releases a 64 bit Visual Studio. We expect it should be available in 2014-2015.

Most of KernelCAD interface works seemlessly in 32 and 64 bit environments. Some of the interfaces have to be modified to be used for 64 bit development. See the next section. Apart from the interfaces below in the future new interfaces are intended to be bitness-independent

Interfaces specific to 64 applications

The interfaces listed below are 64 bit counterparts of the correspondent 32 interfaces:

I3DGrid64
ICollisionDetector64
IEdge_KC64
IIterator64
IKCPathCollisionDetector64
IKinematicSet_KC64
IList64
IListUnkn_KC64
IMesh64
IMeshEx64
IMeshMods64
IMeshPointKC64
IMeshShading_KC64
IMeshTopol64
IMetrics64
IRelation64 ISimplex64
ISimplexEx_KC64
ISurface64
IVertexEx_KC64

Upgrading to 64 bit environment

If an existing 32 bit application has to work in both 32 and 64 bit environment consider using constructs like (VB .NET):

#If KC_X64 Then
    Dim m_iDetector As IKCPathCollisionDetector64
    Dim m_iMetrics(1) As IMetrics64
    Dim m_iKinematicSet As IKinematicSet_KC64 
    Dim pos As Long
#Else
    Dim m_iDetector As
    IKCPathCollisionDetector Dim m_iMetrics(1) As IMetrics
    Dim m_iKinematicSet As IKinematicSet_KC
     Dim pos As Integer
#End If

The KC_X64 (or similar) constant can be added as a Conditional Compilation Symbol to project properties (Build page in Visual Studio C# project properties). See Samples\NET\VB\Collision\CollisionPath\CollisionPathForm.vb for an example

C# language has a slightly better construct:

#region KCDefines
#if KC_X64
    using POSNT = Int64;
using IIteratorT = IIterator64;
    using IListT = IList64;
#else
    using POSNT = Int32;
    using IIteratorT = IIterator;
    using IListT = IList;
#endif
#endregion

Which can be compacted into a single line as a collapsed region on the top of each file using the interfaces. See the paragraph below and  Samples\NET\C#\Collision\CollisionPath\CollisionPathForm.cs

Native C++ applicaations can just replace IIterator with IIteratorT or similar. The IIteratorT is already defined in Samples\VC\Include\TDefs.h to compile without any other changes with or without the 64 suffix depending on the current compiler configuration.The list position type used in the above interfaces is also defined in generic way as POSNT type which is mapped to int in 32 bit and to __int64 in 64 bit environments.