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 > Advanced functionality > Programming commands
Programming topological commands

Programming topological commands

This topic explains how to perform programmatically commands available in 3D Debugger. See also StripTopol Sample 

Break Command 

The Break Command divides a surface element in two. Break() method of IStripTopol interface performs this operation programmatically. Normally path to IStripTopol is: KernelCAD->IModel->IStrip->IStripTopol.

Close Loop Command 

The Close Loop command adds a new straight segment which joins ends of the current strip to make it closed. Close Loop command does not have any effect for strips which consist of a single segment. This command is executed only if the resulting loop will have a valid orientation (see Segment Strips) . CloseLoop method of IStripTopol interface performs this operation programmatically.

Delete Command 

The Delete Command deletes the currently selected segment from the strip. Note that strip in a 2D editor is assumed to be connected at all times, meaning that any two points are linked with a segment strip. Because of that, deleting a middle segment from a non-closed strip will delete the rest of the strip. This will not happen if you are deleting an end segment from a non-closed strip. 

Delete method of IStripTopol interface performs this operation programmatically.

New knot Command 

This command will add a new knot at the current cross-section position if the cross-section position does not coincide with one of existing knots. In the latter case the command does not have any effect. This command is a shortcut for Base > New Knot menu option.

Programmatic: Use path IModel-> ISection->IAxiBase->IArray to retrieve IArray of axial knots. A new knot can be added than by using InsertAt method. 

Add Command 

The Add command will create a new joint in the current strip (strip of patches in case of 3DO or strip of revolved 2D lines in case of SOR) by extending one if its ends. 

Add method of IStripTopol interface performs this operation programmatically.

Join Command 

The Join command attaches the Current Object to another object. Joined sections will move together as a solid object when moved with mouse or by using the Current Object Page. The Join command allows to create complex objects from simpler ones. To join object A to object B obtain ISection implemented by A. Obtain IArray from B. Use Add or InsertAt methods of IArray to add ISection to the children array of B.

Detach Command

The Detach Command detaches an object from the object it is joined to (the parent object) and makes it a top level object in the model. Obtain ISection from the object. It is important to do it first. Delete the object from its parent (See Delete Object Command below). Obtain IArray from IModel. Use Add or InsertAt methods of IArray to add ISection to the array of objects in the model.

Delete Object Command

Obtain IArray from IModel if the object is a top level one or from ISection of its parent. Use RemoveAt method of IArray to remove the object from the array. To get position of the object in the array obtain ISection from the object to be deleted and use Find method of IArray to find the index.