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

ISection Interface

GetSectionType
GetName
SetName
GetGeomResolution
SetGeomResolution
GetChildCount
GetChild
GetVisibleFlag
SetVisible
GetParent
GetItemCount
GetItem

ISection interface should be rather called IObject. It is implemented by each object in the model. ISection 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.

See also Patch Tutorial, MiniCAD Sample, Interface List


HRESULT GetSectionType(char* szType)

Parameters

szType - [out] pointer to the string which will contain the object type name. 

 Remarks
Returns type name of the object.

HRESULT GetName(char* szName)

Parameters

szName - [out] pointer to the string which will contain object name.

Remarks
Object name is an optional name assigned to the object to distinguish from another sections during modelling and runtime access.

HRESULT SetName(char* szName)

Parameters

szName - [in] pointer to the string which will contain object name.

Remarks
Object name is an optional name assigned to the object to distinguish from another sections during modelling  and runtime access.

HRESULT GetGeomResolution(int *pnRes)

Parameters

pnRes- [out] pointer to an integer variable, which will contain the resolution

Remarks
See remarks for the SetGeomResolution method below.

HRESULT SetGeomResolution(int nRes)

Parameters

nRes - [in] New resolution.

Remarks
The 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 increases computational load on the machine. Geometrical resolution is set on per object basis and is saved with the model.

HRESULT GetChildCount(int *pnCount)

Parameters

pnCount - [out] pointer to an integer variable which will receive the number of children this object has.

Remarks:

Returns the number of child sections, which are joined to this object. See also Structure of DI Models.


HRESULT GetChild (int index, ISection **ppISection)

Parameters

index - [in] zero-based index of the object.

ppISection - [out] returned pointer to ISection interface. 

Return Values

S_OK in case of success
DISP_E_BADINDEX - if index is negative or greater than or equal to number of objects in the model.
Remarks:
The method returns a reference to ISection Interface of the index-th child object. Call Release() on the obtained interface when finished with it. See also Structure of DI Models.

HRESULT GetVisibleFlag(bool *pbVisible)

Parameters

pbVisible - [out] pointer to a Boolean variable which will be set to true if the object is currently visible.

Remarks:

Call to retrieve the current visibility status.


HRESULT SetVisible(bool bVisible)

Parameters

bVisible - [in] if false the object will not be rendered in the model.

Remarks:

Call to change the current visibility status.


HRESULT GetParent(ISection **ppISection)

Parameters

ppISection - [out] pointer to the variable, which will receive ISection pointer, implemented by the parent, or NULL value. 

Remarks:

If the current section (the section, which implements this ISection) does not have a parent, the ISection* variable pointed to by ppISection will be set to NULL but the method will return S_OK. The method can be used to check if the object has a parent. Otherwise it is a top-level object in the model.


HRESULT GetItemCount(int* count)

Parameters

count - [out] pointer to the variable, which will receive the count

Remarks:

Returns the number of non-section child items of the section


HRESULT GetItem(int index, IItem **iItem)

Parameters

iItem - [out] pointer to the variable, which will receive IItem pointer