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 > Sections
Sections

Objects in DInsight models

Programmatically objects (sections) can be accessed via ISection, which controls common properties of an object and gives access to other interfaces related to geometry of the object. ISection of a top-level object of the model can be obtained either via query: KernelCAD>GetModel>IModel>GetSection. ISection of a child object can be obtained from ISection of its parent with a call to GetChild method.

Any object (section) in DInsight model has coordinate axes associated with it, which is called Local Frame of the object. All sections have ShowLocalFrame Boolean property, which controls visibility of the local frame If ShowLocalFrame is true, local axes are rendered in 3D views with triangular pointers. Programmatically ShowLocalFrame can be managed via ISection2 interface.

Available types of objects include:

1. Generic 3D Object (3DO)

2. Surface Of Revolution (SOR)

3. Mesh Section

4. Line Strips

5. Point Sets

6. Pipes and Curved Bars

7. BRep Sections

8. Overlays

9. BSpline BRep Sections

Notice: This list may be incomplete for versions later than 5.0

Types 1 to 8 are called native to KernelCAD mostly because of historical realsons

Objects of 3DS, SOR and Pipe type, have property called Geometrical Resolution. Geometrical resolution is a positive integer which determines how fine is approximation of the surface. Increasing this number leads to a better surface rendering, but also increases computational load on the machine. Common practice is to make modifications of geometry in low resolution which can be selected from few trials. On final stage the surface can be displayed in high resolution. Geometrical resolution is set on per object basis and is saved with the model. Geometrical resolution of the object can be modified through Options dialog, accessible via Menu > Current Object > Options in 3D Debugger. Programmatically it is accessible via ISection interface.

Note that reducing the resolution is a valid modeling technique, which can offer a better rendering of the model. This is the case when modeling soft objects like cushions in furniture or when the object has too many edges which need to be made smooth. Se also Modeling Tips.

Sections keep array of child sections. Query IArray or IArray2 from ISection to manipulate array of children of the section programmatically. A number of methods of IModel2 (Add(), AddNewItem() etc.) provide shortcuts for manipulation of the child section array

Sections are Items which have some geometry (surface, points of other properties which have parameters or coordinates) and local frame.  The above array is separate from Array of Items

To modify color and reflective properties of an object, which has surface, query IMaterial from the relevant ISection.Color of line strips and point sets is set directly via ISection>ISectionPointSet>GetColors()>IMatrixData>Set*(). It can be variable

To obtain dimensions of an objects access Bounding Box property of the section. It represents the smallest axis-aligned box containing the section.

Sequence ISection > IObject_KC > Copy(iObject_KcOfAnotherSection) allows copying local frames and other attributes like material between sections. This operation does not copy geometry (meshed or parametric surface, lines or points) of the section

Parameters of native KernelCAD objects

Geometry of an object is defined by a set of relevant values, like coordinate of a point in cross-section of a line or position of an axial knot. These numbers, which have some geometrical meaning in DInsight models are called Parameters. Programmatically parameter values are represented by numbers of type double. Parameters belonging to different objects ( like different edges of a surface patch ) are considered different. Parameters are those values, which are accessible via edit boxes in 3D Debugger. Programmatically parameters are accessed via IElement interface. Mesh Sections are not considered parametric objects.

See also: KernelCAD Models, IMetrics, IBox