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 Models > Mathematical Objects > Oriented Boxes
Geometric Boxes

Oriented Boxes

Oriented Boxes pure geometric objects represent a 3D box defined by its ranges in three axes. By default the box is axis-aligned with the global axes. Some of boxes can be moved freely in 3D. Such boxes have a local frame assigned to it, in which case location and orientation of the object can be manipulated by moving its local frame. Methods in this case take local (related to the attached frame) coordinates.

Boxes can be manipulated via IBox interface.

Boxes can be created with IDIObjGenerator.Create* methods with eType parameter set to eObjTypeBox member of EObjectType enumeration. There are also some other ways to create boxes related to specific types objects

Query IFrame from IBox to access the local frame. If the query fails the object does not have the local frame and is normally considered as aligned with the global axes.

If the object implements IFrame normally it also implements IFrame2 and IMetrics.

IBox can also be obtained from ISection via query: ISection > IPropertyArray > GetProperty("BoundingBox", ...) > IBox. IBox obtained this way is called Bounding Box of the KernelCAD section (the minimal box containing it) aligned with the local axes of the section. The frame attached to the box is a copy of local frame of the section. This box allows approximation of location of the object and its dimensions. For example, if IMetrix.GetPointLocation(pt) () returns code indication that the point is outside the box than pt can not belong to surface or internal area of the object.

IMetrics Interface

Location codes returned by IMetrics.GetPointLocation for boxes are

  • 0  - Invalid location (error code)
  • 1  - Inside internal area of the box but not on its surface
  • 2  - At one of eight corners of the box
  • 3  - On one of twelve edges
  • 4  - Internal to one of six faces, but not at an edge nor in a corner
  • 5  - At unknown location on the external surface of the box (one of 2, 3, or 4)
  • 6  - Inside the closed box ( one of 1 through to 5)
  • 7 - outside of the box