DG Kernel Documentation


Skip Navigation Links.
Start page
Quick Start
Search Page
Installation
Overview of the software
What is new
Licensing
Collapse ModelsModels
Collapse DG Kernel ComponentsDG Kernel Components
Collapse API ReferenceAPI Reference
Interface List
Vector Space
Collapse General GeometryGeneral Geometry
Collapse ModelModel
Collapse ViewView
Collapse General ComputingGeneral Computing
Collapse Samples and TutorialsSamples and Tutorials
Collapse GraphicsGraphics
Collapse Math ObjectsMath Objects
Collapse DeprecatedDeprecated
Redistribution
Model Viewer
Open Source
Support
Skip Navigation Links Search Documentation


Mesh Mods VB .NET Sample

Overview

Implementation

On the start of the application OnFormLoad event handler requests notifications for the selection events by setting WantSelectionEvent property of DG Kernel Context to true

When user selects a set of vertices using context menu or key commands the application receives OnKernelCADEvent call. Notice the checks in the OnKernelCADEvent that the call is addressed to this handler.

The line

m_iList = e.param1

stores the vertex list passed by the event as IList for later use.

When user cliks the Apply button OnApply handler iterates through the list and modifies coordinates of each vertex using IVertex interface.

Notice the important iMeshMods.FixupNormals() call. It recalculates normals to the surface to keep lighting of the modified surface realistic.

IMeshMods interface is queried from the only source in the case, which is the m_iList  interface. This is enabled by the DG Kernel component prior to calling the event handler.