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.
|