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 > Topological Interfaces > IStripTopol
IStripTopol Interface

IStripTopol Interface

Break
Delete
SetType
CloseLoop
Add

This interface allows to perform topological operations on the strip, which implements this interface. Normally this interface is obtained from the correspondent IStrip interface

Note that this is a Pro level interface, which is not available in the standard KernelCAD or KernelCAD .NET.

See also StripTopol Sample, Segment strips, Topological commands and Interface List


HRESULT Break(int index)

Parameters

index - [in] 0-based index of the segment, to be divided in two

Return Values

S_OK in case of success.

Remarks

After call to this method segment index of the strip will be evenly divided in two joined segments. Use this method to add new segments to the strip.   


HRESULT Delete(int index, VARIANT_BOOL segment)

Parameters

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

segment - [in] if true index-th segment will be deleted, if false  index-th joint will be deleted.

ppIElem - [out] returned pointer to the interface. 

Return Values

S_OK in case of success.

DISP_E_BADINDEX if index is out of range.

DI_E_INVALIDGEOMETRY - if the segment is true (not zero), the strip is closed and index is not 0 nor n-1, where n is number of segments in the strip. See remarks 

Remarks

If segment is true segment index must be the index of the first or the last segment in the strip otherwise the operation fails and method returns DI_E_INVALIDGEOMETRY.  If the strip was closed segment index will be always removed and the strip will become open. If segment is false joint index of the strip will be deleted. If the joint is not an end of the strip two ad joint segments will be replaced with a new single segment. See Delete Command for more details.


HRESULT SetType(int index, ESegmentType eType)

Parameters

index - [in] zero-based index of a segment.

eType - [in] member of of ESegmentType enumeration. 

Return Values

S_OK in case of success.

Remarks

This method will change type of the segment number index to eType.  In this version of software there only two types of segments, namely eSegmTypeLine and  eSegmTypeArc.


HRESULT CloseLoop()

Return Values

DI_E_INVALIDGEOMETRY if the strip is already closed

S_OK in case of success.

Remarks

Call to this method will connect ends of an open strip thus making it closed.  If the strip is already closed the method has no effect.

 


HRESULT Add(double x, double y, VARIANT_BOOL tail)

Parameters

x, y - Coordinates of the new joint.

tail - if true the strip will be extended by adding new segment at the second end of the strip. Ignored if there is less than two joints.

Return Values

DI_E_INVALIDGEOMETRY if the strip is closed

S_OK in case of success.

Remarks

The method allows adding segments to the strip. If the strip had segments prior to the operation tail parameter determines which end will be extended. If the strip consists of a single joint ( a single 3D line in case of 3DO or circumference generated by a single point in case of SOR ) a new segment connecting the joints will be added. If the strip is empty, as the result of the operation it will consist of a single joint.