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 > Mesh interfaces > ISimplex
ISimplex Interface

ISimplex(64) Interface

GetVertexCount
GetVertexPosition
GetFacetNormal
GetNormal
GetNormalIndex
SetNormalIndex

This interface manipulates properties of a single simplex in a mesh.

Two ISimplex instances may have different pointer (or hash etc in higher level languages) but still represent the same vertex. Use IObject_KC interface queried from each to compare the identity of the undelying object with a call to IObject_KC.IsEqual

Quering this interface for each simplex in a mesh should be avoided whenever possible to avoid excessive memory consumption. Consider using IMeshMods and/or other mesh interfaces instead

See also IMesh, IMesh, IVertex, IInterface List


HRESULT GetVertexCount(int* count )

Parameters

count  - [out] - Returned number of vertices in the simplex. In this product it is always 3.

Returns

S_OK in case of success.
Remarks:

This method returns number of vertices in the simplex. In this product (may change in future) all simplexes are triangles, so the return is always 3. 


HRESULT GetVertexPosition( int index, int* vertex )

Parameters

index  - [in] Index of a corner of the triangle. Must be 0, 1, or 2.

vertex - [out, retval] Returned position of the vertex in the vertex list of the mesh.

Return Values

S_OK in case of success.
Remarks:

This method returns position of the index-th corner in the vertex list of the mesh.


HRESULT GetFacetNormal( double* vx, double* vy, double* vz )

Parameters

vx, vy, vz - [out] - Calculated coordinates of normal to face of the simplex

Return Values

S_OK in case of success.
Remarks:

Returns coordinates of normal to face of the simplex. Note this normal may be different from normal returned by IMesh.GetNormal() or IVetrex.GetNormal() The later normals are applied at vertices of the mesh, which quite often does not coincide with normal of the face even for regular vertices.  The method is provided for convenience in performing different mesh related calculations. 


HRESULT GetNormal(int index, double* vx, double* vy, double* vz )

Parameters

index  - [in] Index of a corner of the triangle. Must be 0, 1, or 2.

vx, vy, vz - [out] - Returned coordinates of normal at the corner vertex.

Return Values

S_OK in case of success.
Remarks:

This method returns coordinates of normal at the index-th corner of the simplex. When the corner a singular vertex (has several normals) the correct normal, assigned via SetNormalIndex below or in some other way, is returned.


HRESULT GetNormalIndex(int index, int* normal)

Parameters

index  - [in] Index of a corner of the triangle. Must be 0, 1, or 2.

normal - [out, retval] - Returned index of the normal correspondent to this simplex in normal array of the vertex.

Return Values

S_OK in case of success.
Remarks:

Returns index of the normal correspondent to this simplex in normal array of the vertex  


HRESULT SetNormalIndex(int index, int normal)

Parameters

index  - [in] Index of a corner of the triangle. Must be 0, 1, or 2.

normal - [in] - 0-based index of the normal correspondent to this simplex in normals array of the vertex. Must be less than value returned by IVertex.GetNormalCount for the correspondent vertex.

Return Values

S_OK in case of success.
Remarks:

This methods assigns normal-th normal of normals array of the vertex as normal related to this simplex.