DG Kernel (ActiveX) Documentation


Skip Navigation Links.
Start page
Quick Start
Search Page
Installation
What is new
Upgrading Native Apps
Licensing
Expand ModelsModels
Collapse DG Kernel ControlsDG Kernel Controls
Expand API ReferenceAPI Reference
Expand ViewsViews
Expand Samples and TutorialsSamples and Tutorials
Expand GraphicsGraphics
Expand Math ObjectsMath Objects
Expand DeprecatedDeprecated
Redistribution
Model Viewer
Open Source
Support
Skip Navigation LinksHome Page > DG Kernel Controls > Programmatic Functionality > Object Construction Go to DGKC docs Search Documentation


Runtime Object Construction

Generally new objects of various kind can be created using Object Generator.

Creating New Entities

There are other ways of creating entities. One is via IModel_DG.AddNew*() methods. Example:
IBRepSolid_DG iSolid = iModel_DG.AddNewBRepSolid();
IEntity_DG newEntity = iModel_DG.AddNewEntity(); newEntity.SetGeometryType("Mesh");
Or similar calls to IEntity_DG.AddNewChild*()

Standalone entities can be constructed with IObjectGenerator_DG.Create("IEntity_DG") call.

IStdShape_DG interface provides a simplified way for creation of standard entities like Cylinder, Sphere, etc.

IDraw_DG provides another way for quickly building entities. This method is useful for creation of auxiliary objects, which show simple lines, curves or surface patches. IDraw_DG follows OpenGL Begin()/End() pattern

IScene_DG allows simple creation of entities, which present general (non-entity) geometric objects like box or sphere.

Creating Standalone Models

Standalone models can be constructed with IObjectGenerator_DG.Create("IModel_DG") call. Details