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 > IDrawUtil
IDrawUtil Interface

IDrawUtil Interface

Cylinder
Disk
Sphere
SetResolution
GetResolution
Box
Rectangle

IDrawUtil interface allows slightly higher-level control than IDraw for direct rendering (See ClientDraw event). IDrawUtil can be queried from IDraw interface.

Note that IDrawUtil can be expanded (without changing the currently published methods) in future releases.

See also Morph sample, Interface List


HRESULT Cylinder(double baseRadius, double topRadius, double height)

Parameters

baseRadius- [in] Bottom radius of the cylinder.. 

topRadius - [in] - Top radius of the cylinder

height - [in] height of the cylinder

Remarks:
 Call to this method renders a cylinder along z-axis of the current drawing frame. (See Translate method of IDraw). Use Translate and Rotate to manipulate location and orientation of the cylinder. Use SetResolution method to change level of approximation for the surface.

HRESULT Disk(double innerRadius, double outerRadius)

Parameters

innerRadius - [in] Inner  radius of the disc.. 

outerRadius - [in] - outer radius of the disc.. 

Remarks:  Call to this method renders a disc. Axis of the disc coincides with z axis of the current drawing frame. (See Translate method of IDraw). Use Translate and Rotate to manipulate location and orientation of the Disc. Use SetResolution method to change level of approximation for the surface.

HRESULT Sphere(double radius)

Parameters

radius - [in] Radius of the sphere

Remarks:

Call to this method renders a sphere. Axis of the disc coincides with z-axis of the current drawing frame. (See Translate method of IDraw). Use Translate and Rotate to manipulate location and orientation of the sphere. Use SetResolution method to change level of approximation for the surface.


HRESULT SetResolution(int resol)

Parameters

resol - [in] Resolution (See remarks).

Remarks:  

Resolution is an integer number, which defines how fine the surfaces drawn with IDrawUtil will be approximated. Very roughly resolution equals to number of slices used to render axially symmetric objects from the above methods. As resolution affect the performance the best way is to establish the resolution experimentally. It should be the smallest integer, which gives satisfactory approximation.


HRESULT GetResolution(int* resol)

Parameters

esol - [out] Resolution (See remarks).

Remarks:  

Returns the current resolution. See remarks to SetResolution method.


HRESULT Box(double width, double height, double length, int wireframe)

Parameters:

width, height, length- [in] dimensions of the box

wireframe - [in] Should be considered as a Boolean variable. If not zero the box will be rendered in wire frame and as surface otherwise.

Remarks:  

Draws a box aligned with axes of the current drawing frame.


HRESULT Rectangle(double width, double height, int wireframe)

Parameters:

width, height- [in] dimensions of the rectangle

wireframe - [in] Should be considered as a Boolean variable. If not zero the box will be rendered in wire frame and as surface otherwise.

Remarks:  

Draws a rectangle in x and y axes of the current drawing frame.