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


2D Entities

A 2D entity represents an isolated linked 2D object. Currently 2D entities are only line strips. They implement IStrip_DG interfaces.

See the overlays topic about creating and editing 2D scene items at runtime in Direct User Access mode.

To access a 2D entity call IModel2d_DG.GetEntityAt() to obtain IEntity2d_DG of the object. Query IStrip_DG and from the IEntity2d_DG.

Use IStrip_DG.GetElement(i, False) to access i-th point of the segment strip. Use IElement_DG.GetParam(k) to obtain k-th coordinate of the point. k is expected to be 0 for x or 1 for y. Similarily, use IElement_DG.SetParam(k, val) to modify the coordinate.

Use IStrip_DG.Add() to add new points to the strip. Use IStrip_DG.Break() to insert a new point. Use IStrip_DG.Delete() to delete segment or point

See also: Overlay sample