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

IDiffSurface_KC Interface

GetNormalAt
GetProximity
GetLocalParametrization

IDiffSurface_KC interface returns normal vector to surface of the object the interface was queried from. The interface can be queried from ISection. Not all types of sections implement this interface. Mesh sections do implement it.

See also: Interface List


HRESULT GetNormalAt(DIPoint* pointAt, DIPoint* normal, int *count)

Parameters

pointAt - [in] Point where the normal to be calculated

normal - [out] Calculated normal to the surface at point pointAt

count - [out, retval] Count of normals at the point. Value of 0 means an error.

Remarks:

The method calculates normal at point on surface of the object this interface was queried from. When pointAt is not located exactly on the surface a nearest point is calculated and normal at the point is returned. See also comments for the next method.

The method is  a simplified version of the GetProximity method below for a case when it is known that the surface is smooth at the point and has a single normal. It is recommended to verify this assumption by checking the returned count value.

The returned count number indicates how many normals the surface has at the point. When point belong to a smooth surface patch the count is 1. When the point is located on a smooth edge the count is 2. When the point is located at a corner count will be equal to number of smooth patches joined at the corner. Value of 0 means an error.

The normal contains only the first normal.at the point.


HRESULT GetProximity(DIPoint* pointAt, IVertex** vertex)

Parameters

pointAt - [in] Point where the normal to be calculated

vertex - [out, retval] The returned vertex, which contains array of all normals at the point

Remarks:

See also remark for the previous method. This method contains full information about normals at the point. Use methods of IVertex to access array of normals.

In case when pointAt is not located exactly on the surface coordinates returned by IVertex.GetVertexCoord are coordinates of the nearest point on the surface. This can be used to verify that pointAt is close to the surface.


HRESULT GetLocalParametrization(DIPoint* pointAt, IKO_Geom_BSplineSurface** patch)

Parameters

pointAt - [in] Center of approximation

patch - [out, retval] The returned BSpline patch which approximates the surface

Remarks:

Returns a BSpline patch which approximates the surface around pointAt. If this interface was queried from a section, which is part of a model, a new section geometry of which is the returned patch will be added to the model as the last top-level object. This object can be deleted if no representation in the scene is required. The patch in this case is still a valid usable object.