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


External Models

Normally a DG Kernel component displays a single model. Sometimes it is necessary to display different views of the same model, for example different projections or view points.

This can be achieved with External Models.

External model is a reference to another model which belongs to another instance of a DG Kernel component or model created and loaded independently. Reference to an external model cal be added with IView2.AddExternalModel

IView2 can be obtained via: DG Kernel > GetView > IView > IView2

When there is one or more external models attached to the component, where this IView2 was queried from, on every UpdateSurface call all objects of all external models are replicated and new copies are added to the model of the component. Replicas added by pervious call to UpdateSurface are removed before the operation.

Note that objects of the external models are. added "By Value", which means that any modifications made to the external model appear in this component only after an UpdateSurface call, not automatically.

For example, to create an additional two dimensional view, which displays interentity of the model with a plane:

  1. Add another DG Kernel control to the form
  2. During the form load obtain IModel of the original 3D control: myKernelCAD_3D > GetModel > IModel
  3. Query IView2 from the second control via: myKernelCAD_2D > GetView > IView > IView2
  4. Call IView2.AddExternalModel supplying IModel obtained on the step 2.
  5. Setup two dimensional view of the second control as described in 2D Views.
  6. Call myKernelCAD_2D.UpdateSurface to create 2D items

See Cross View Sample for an example.