KernelCAD Documentation

DInsight Home
Skip Navigation Links. Skip Navigation LinksHome Page > Programming Samples and Tutorials > Overview > Transform
Transform Sample Overview

Transform Sample

Source code for Transform sample is available in Samples\VB folder of the installation directory. Transform application demonstrates usage of ITransform for scaling and translation of different types of objects. It also demonstrates surface offset operation performed by IMeshMods.Offset

Note that VB 6.0 samples require Common Dialogs component enabled in the development environment (details).

See also:  ITransform, All VB samples

Running Transform Sample

Transform.glm model displayed by the application contains three objects of different types. Top group of radio buttons allows selection of an object to be transformed. The middle group of radio buttons selects the operation to be performed. Edit boxes at the bottom allow changing either scaling factors, translation vector or rotation axis, depending on the selected operation. The operation is executed on each apply button. File > Reload menu option allows discarding changes.

Translate Frame operation allows changing position of the local frame relative to the rest of the object

For Sphere object translation operation is allowed only for translation along z- axis because it is a Surface Of Revolution. Other translations are possible in this situations too but they modify shape of the object. This is caused by the requirement for the local z axis to be axis of the rotational symmetry. 

The offset operation is available currently only for Mesh Section type of objects.

The C# implementation is new and different. It demonstrates operations with transforms and frames


Please select your language:


VB 6