DG Kernel (ActiveX) Documentation


Skip Navigation Links.
Start page
Quick Start
Search Page
Installation
What is new
Upgrading Native Apps
Licensing
Expand ModelsModels
Expand DG Kernel ControlsDG Kernel Controls
Expand API ReferenceAPI Reference
Expand ViewsViews
Collapse Samples and TutorialsSamples and Tutorials
Expand GraphicsGraphics
Expand Math ObjectsMath Objects
Expand DeprecatedDeprecated
Redistribution
Model Viewer
Open Source
Support
Skip Navigation LinksHome Page > Samples and Tutorials > Sample List Go to DGKC docs Search Documentation


Samples

.NET samples installed with DG Kernel 7.2 are based on the latest DGKCn6 .NET 6.0 control. ActiveX-based .NET samples are available on the download page..

C++ and Delphi samples are up to date in DG Kernel 7.2.

Sample Description Difficulty
BoolOp Demonstrates programming of Boolean Operations Medium
Capture Off-screen rendering Simple
Cloud Building surfaces from point clouds. Minimal Bounding Box Simple
Collision Usage of IMetrics_DG for Collision Detection Medium
Collision Path Demonstrates programming of Path Collision Detection. Medium
Console Demonstrates using DGK component for calculations in a command line application. Simple
Curves Demonstrates different methods of Curve construction, access to its properties and visualisation. Medium
Data Flow Programmatic Import / Export. Splitting unlinked meshes Medium
Diff Surface Demonstrates usage of IDiffSurface_DG for local approximation of a meshed surface with a  bspline patch Simple
DIView DG Kernel control as resizable view. Programming gradient background. Printing support Simple
eMotion Boolean Operations in simulation of CNC machining. Programming of 3D movements and CAM Effects. Advanced
Engrave Using IEngrave_DG for engraving text into surface. Simple
Euclidean Shortest Path Demonstrates usage of IEuclideanShortestPath_DG. Medium
Face Construction of curves on surfaces via pcurves and projection. Building BRep faces. Medium
Label 3D Text Simple
LabelEx Advanced properties of 3D Labels and geometric text Medium
Light Properties of light sources. Material. Programming of Context Menu Simple
Lines Line Strips Simple
LowDim Programming of Point Sets Simple
Measure Programmatic creation of measurements and measurement-style labels Simple
Mesh Ops Demonstrates extraction of submeshes Simple
MeshMods Direct manipulation of surface and handling of selection events Simple
Metrics Distances between objects Medium
MiniCAD Parametric modifications of 3DS and SOR objects. Object movements Medium
Modal Modal Mode and movement constraints Medium
Morph Mesh manipulation. Exploring meshed surface. Shading Advanced
MultiView Sharing a model between controls Simple
Object Array Dynamic object creation and manipulation of child/parent hierarchy Medium
Overlay Direct access and programming of overlays Medium
Patch Tutorial Hello World kind of tutorial on creating a DG Kernel-based application from scratch Simple
Pick Different methods of runtime object and point selection. Events Medium
Point Of View User manipulation and programming of View Points Medium
Profile Modification of profiles of 3DS objects Medium
Rotation View point manipulation Medium
Selection Handling selection events Simple
Shape Explorer Browsing sub shape hierarchy of bspline objects. u,v parameters. Simple
Shape Builder Runtime construction of BRep shapes. Standalone shapes. Medium
Shape Mods Different methods of entity modification and managing references to its attributes Simple
Solids Advanced operations on solids Advanced
Smart Labels Automatically positioned non-overlapping 3D text Medium
Strip Topology Dynamic modification of surface structure Medium
Surfaces Various ways of construction of bspline surfaces Simple
Texture Textures of surfaces Medium
Transform Scaling, translation, rotation, offset and other transformations of surfaces. Operations with transforms and frames (C#) Simple
View Point View point manipulation Medium
Zoom Programming of zoom and view point Medium

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.

C# (*.cs)

IModel_DG iModel;
iModel = m_dgkc.GetModel();
IEntity_DG iEntity = iModel.GetEntityAt(0);
iEntity.SetVisible(false);

Visual Basic .NET (*.vb)

Dim iModel As IModel_DG
iModel = m_dgkc.GetModel()
Dim iEntity As IEntity_DG = iModel.GetEntityAt(0)
iEntity.SetVisible(False)

C++  (*.cpp)

IModel_DG* iModel;
iModel = (IModel_DG*)m_dgkc.GetModel();
IEntity_DG* iEntity;
iModel->GetEntityAt(0, &iEntity);
iEntity->SetVisible(VARIANT_FALSE);

Delphi (*.pas)

iModel : IModel_DG;
iEntity : IEntity_DG;
iModel := m_dgkc.GetModel();
iModel.GetEntityAt(0, &iEntity);
iEntity.SetVisible(true)