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

I3DGrid(64) Interface

Create
GetCellCount
GetRanges
GetBox
FindBox
GetCover

I3DGrid interface gives access to 3D grid of of an object. It can be queried from the relevant ISection interface.

See also: Interface List


HRESULT Create(int cellsMaxDimension)

Parameters

cellsMaxDimension - [in] number of cells the longest dimension of the Bounding Box of the object will be divided into.

Remarks:

Creates the grid for the object I3DGrid was queried form. The method obtains Axis Aligned Bounding Box of the object, copies it as initial size of the box of the grid, divides its longest side into cellsMaxDimension cells. Two other dimensions of the bounding box are are adjusted by increasing its size to satisfy requirements. After this number of cells in remaining dimensions are calculated. These parameters can be retrieved with calls to GetRanges and GetCellCount methods below.


HRESULT GetCellCount(KCN3* cellCount)

Parameters

cellCount - [out]  The returned count of cells in each dimension.

Remarks:

Returns count of cells in each dimension.


HRESULT GetRanges(KCBox* ranges)

Parameters

ranges - [out] The returned dimensions of the box of the grid.

Remarks:

Returns dimensions of the box of the grid


HRESULT GetBox(KCN3* index, KCBox* ranges)

Parameters

ranges [out] The returned subdivision box of cell index

Remarks:

Returns location and dimensions of the subdivision box identified by its 3D index.


HRESULT FindBox(DIPoint* point, KCN3* index)

Parameters

point - [in] Input point to find a box for.

index - [out] The returned 3D index of the subdivision box where the point belongs

Remarks:

For a 3D point calculates index of the box there the point belongs.


HRESULT GetCover(VARIANT_BOOL intern, VARIANT_BOOL shell, VARIANT_BOOL external, IList** cover, KCN3* count)

Parameters

intern - [in] Indicates whether boxes fully inside the internal area of the object should be added to the cover list.

shell - [in] Indicates whether boxes covering external surface of the object should be added to the cover list.

external - [in] Indicates whether boxes fully outside of the object should be added to the cover list.

count - [out] Returned count of internal (element 0), shell (element 1) and external (element 2) boxes in the cover list.

Remarks:

All subdivision boxes in the grid are divided in three categories: internal, external and ones which have non-empty intersection with the geometric surface of the object. The method lists all boxes of the requested categories in the cover list. Elements of the list have type of KCN3*, and are 3D indices of the boxes. Use GetBox method above to obtain location of the boxes.