KernelCAD Documentation

DInsight Home
Skip Navigation Links.
Start page
Quick Start
Installation
Overview of the software
What is new
Collapse KernelCAD ModelsKernelCAD Models
Collapse KernelCAD ComponentsKernelCAD Components
KernelCAD Control
KernelCAD .NET Control
Methods and Properties
Menu
Model Explorer
Birds Eye View
Programming
Direct User Access
Direct Operations
Interface Queries
Printing Support
Data Types
Modes of KernelCAD Control
DIObjectGenerator class
Properties
FlatObjectArray Poperty
Context
64 bit development
Dual Mode
Initialisation Context
Overlay Editor
Memory Management
Input validation
Collapse Advanced functionalityAdvanced functionality
Collapse InterfacesInterfaces
Alphabetical list
I3DGrid
I3DBugger
I3Dpt
IAxiBase
IAxis
IBoolSection
IBoolSectionEx
IBoundary
IColor
IConstraint
IData
IDiffSurface_KC
IDIFont
IDraw
IDrawUtil
IDraw2
IElem
IElement
IKCLine
ILightSource
ILocation
ILocationEx
IMaterial
IMetrics
IMetrics2
IModel
IModel2
IModelEx
IPatch
IKCPathCollisionDetector
IProfiles
IPropertyArray
IPropertyArray2
IStdShape
IStrip
ISurface
IText
ITexture
ITransform
IUnknown
Collapse Open Cascade TechnologyOpen Cascade Technology
Collapse DataData
Collapse MovementMovement
Collapse FramesFrames
Collapse Oriented ObjectsOriented Objects
Collapse SectionsSections
Collapse GeneralGeneral
Collapse Topological InterfacesTopological Interfaces
Collapse Viewing InterfacesViewing Interfaces
Collapse Lines And CurvesLines And Curves
Collapse Symmetry InterfacesSymmetry Interfaces
Collapse Clipping plane interfacesClipping plane interfaces
Collapse AlgorithmsAlgorithms
Collapse 2D Geometry2D Geometry
Collapse Programming Samples and TutorialsProgramming Samples and Tutorials
Collapse OverviewOverview
Collapse DeploymentDeployment
Collapse .NET Samples.NET Samples
Collapse C++ SamplesC++ Samples
Collapse Visual Basic SamplesVisual Basic Samples
Collapse Delphi SamplesDelphi Samples
Collapse 3D Debugger3D Debugger
Collapse DeploymentDeployment
Licensing
Model Viewer
Open C++ Source
Technical Support
Skip Navigation LinksHome Page > KernelCAD Components > Interfaces > Viewing Interfaces > IGraphicItem
IGraphicItem Interface

IGraphicItem Interface

Draw
DrawEx
AttachView

IGraphicItem interface is implemented by objects, which can be rendered in 3D view but are not normally part of the scene. Methods of IGraphicItem have to be called only from inside (between its start and before its end) of handler of ClientDraw event. See Patchwork Sample for an example.

Call either of the methods to render the item. Use IDraw.Color and other methods of IDraw to control the way the item is rendered.

Not all objects implement IGraphicItem. Objects which implement IPatch or ICurve implement IGraphicItem too. There are other obejects, which implement the interface. Please refer to topics for the specific object

Starting from version 5.0 the graphic item has to be aware of the view. This can be achieved during construction of the graphic item with IView*.GetGraphicItem() or by calling the AttachView method

To draw a standalone frame create new Graphic Item object with IDIObjectGenerator.Create(EObjectType.eObjTypeGraphicItem) and attach IView of the component, which must display the frame using AttachView.

.See also Patchwork Sample, Interface List


HRESULT Draw()

Remarks:

The method will draw the item this interface was queried from as part of the 3D scene. See the general description above..


HRESULT DrawEx(RenderContext* context)

Parameters

context - [in] additional options for rendering

Remarks:

The method will draw the item this interface was queried from as part of the 3D scene. See the general description above. members of context parameter allow selection between surface and wire frame rendering and whether normals to the surface should be drawn.


HRESULT AttachView(IView* view)

Parameters

view - [in] IView of the component, which is going to display the item

Remarks:

The method attaches view for items, which require the reference (Graphic Item of a frame). See CreateFrameGraphicItem() method of Collision Path sample for an example. Graphic Items queried from IPatch or ICurve do not need this call. See also Frame Graphic Item