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 > IVertex
IVertex Interface

IVertex Interface

GetVertexCoord
SetVertexCoord
GetNormalCount
SetNormalCount
GetNormal
SetNormal

This interface manipulates properties of a single Vertex in a mesh. IVertex can be obtained using GetVertex method of IMeshEx interface.

Two IVertex 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 vertex in a mesh should be avoided whenever possible to avoid excessive memory consumption. Consider using IMeshMods instead

See also Morph sample, IMesh, ISimplex, IInterface List


HRESULT GetVertexCoord(double* x, double* y, double* z )

Parameters

x, y, z - [out] - Returned coordinates of the vertex.

Returns

S_OK in case of success.
Remarks:

The method returns coordinates of the vertex.


HRESULT SetVertexCoord(double x, double y, double z )

Parameters

x, y, z - [in] - New coordinates of the vertex.

Return Values

S_OK in case of success.
Remarks:

This method allows direct manipulation of vertices in the mesh. See also remarks for IMesh interface.

This method requires a call to IModel.Update() or KernelCAD.UpdateSurface() for changes to appear in 3D view. If there are series of such changes it is recommended for performance to make the call once in the end of the series


HRESULT GetNormalCount( int* count)

Parameters

count - [out, retval] returned count of normals

Return Values

S_OK in case of success.
Remarks:

Returns count of normals kept by the vertex. It is equal to 1 when the vertex is regular (inside of a smooth piece of surface). When the vertex is located at an edge or a 3D corner the count coincides with the number of adjoined pieces of surfaces.


HRESULT SetNormalCount( int count)

Parameters

count  - [in] New normal count. See remarks for GetNormalCount

Return Values

S_OK in case of success.
Remarks:

This methods changes size of array of normals kept in the vertex. When the size is changed coordinates of all normals are preserved. When the size is increased newly added normals are created with default coordinates (1,0,0).


HRESULT GetNormal( int which, double* x, double* y, double* z )

Parameters

which - [in] 0-based index of the normal in array of normals kept by the vertex. It must be between 0 and less than the number returned by GetNormalCount.

Return Values

S_OK in case of success.
Remarks:

Returns coordinates of the which-th normal from array of normals kept by the vertex.


HRESULT SetNormal( int which, double vx, double vy, double vz )

Parameters

which - [in] 0-based index of the normal in array of normals kept by the vertex. It must be between 0 and less than the number returned by GetNormalCount.

vx, vy, vz- [in] - New coordinates of the normal.

Return Values

S_OK in case of success.
Remarks:

Modifies coordinates of the which-th normal from array of normals kept by the vertex.