DG Kernel (ActiveX) Documentation


Skip Navigation Links.
Start page
Quick Start
Search Page
Installation
What is new
Upgrading Native Apps
Licensing
Collapse ModelsModels
Collapse DG Kernel ControlsDG Kernel Controls
Collapse API ReferenceAPI Reference
Interface List
Vector Space
Collapse General GeometryGeneral Geometry
Collapse ModelModel
Collapse ViewView
Collapse General ComputingGeneral Computing
Collapse ViewsViews
Collapse Samples and TutorialsSamples and Tutorials
Collapse GraphicsGraphics
Collapse Math ObjectsMath Objects
Collapse DeprecatedDeprecated
Redistribution
Model Viewer
Open Source
Support
Skip Navigation Links Go to DGKC docs Search Documentation


Transform Native C++ Sample

Overview

 See also:  ITransform

Implementation

All important work is done inside TransformDlg::OnApply() handler for the Apply button

IModel* iModel = (IModel*)m_kernCAD.GetModel();

retrieves IModel interface, from which all other interfaces are accessed.  Interface to the current entity is kept into iSect variable. It is obtained in the same procedure using calls identical to

iModel->GetEntity(m_nObject, &iSect);

An instance of ITransform interface implemented by the object is obtained with a query: 

iSect->QueryInterface(IID_ITransform, (void**)&iTransf);

m_kernCAD.UpdateSurface();

call in the end of the function is required to recalculate surface of the object after changes of its parameters.

The offset operation is performed with IMeshMods.Offset in the same function. IMeshMods is obtained via query ISection > IMesh > IMeshMods.