Methods of DGKC Control
- GetModel
- AttachModel
- Save
- SaveAs
- UpdateDeep
- GetView
- RequestEvent
- UpdateView
See also: Properties, Events
IModel_DG GetModel()
Returns the current model, either the constructed automatically default, or one attached via the AttachModel() method below.
void AttachModel(IModel_DG model)
Replaces the current (commonly the default) model in the control with a new one. Provides a way for sharing models between two or more components, thus enabling multi-view functionality. If model is null, the current model is released (detached from the control and deleted, if it was the last reference).
bool Save()
Call to save the model to the file it was loaded from. Ignored if there was no load operation since the application start
bool SaveAs(string modelPath)
Call to save the model to a new file. The
ModelPath
property will be changed to modelPath.
modelPath
can have extension for any supported format. If modelPath
has no extension it is interpreted as an STL directory path. The new STL
directory tree will be created and objects of the model will be saved as
separate .stl files in the directory. See "STL Tree" topic for more details.
void UpdateDeep()
The method recalculates the surface of the objects after any changes to parameters of the model.
Starting with v6.0 in most situation this is done automatically when a modification has been detected. In some situations, low level attributes have no way of notifying the model and the view about a modification, in which case this method should be called from the application code. This documentation often describes cases when this is needed.
It is recommended adding this call only when a modification is not reflected in the view even after an UpdateView() or IView_DG.Update().
UpdateDeep() is costly in terms of computational load, so it is recommended
to check first that the automated updates do not work, and, if required, call it once per logically complete sequence of user input.
IView_DG GetView()
void RequestEvent(Event_DG eventType, bool request)
void UpdateView()
Forces redrawing the window of the control. Often redrawing is executed automatically in response to user input like mouse view manipulation.
|