DG Kernel Documentation


Skip Navigation Links.
Start page
Quick Start
Search Page
Installation
Overview of the software
What is new
Licensing
Expand ModelsModels
Expand DG Kernel ComponentsDG Kernel Components
Collapse API ReferenceAPI Reference
Interface List
Vector Space
Expand General GeometryGeneral Geometry
Collapse ModelModel
Expand ViewView
Expand General ComputingGeneral Computing
Expand Samples and TutorialsSamples and Tutorials
Expand GraphicsGraphics
Expand Math ObjectsMath Objects
Expand DeprecatedDeprecated
Redistribution
Model Viewer
Open Source
Support
Skip Navigation LinksHome Page > API Reference > Model > Entities > Geometry > Mesh Geometry > IMeshAlgor Search Documentation


IMeshAlgor Interface

AddVertex
BuildMesh
GetDefaults

IMeshAlgor implements an algorithm of construction meshed surface from a point cloud

IMeshAlgor can be obtained from IMesh via query: kernelCAD > GetModel() > IModel > GetEntity() > ISection > IMesh > IMeshAlgor


HRESULT AddVertex(double x, double y, double z, int* posnResult)

Parameters

x, y, z-- [in] Coordinates

posnResult - [out,retval] Position of the added vertex in vertex list of the mesh

Remarks:

Adds new vertex with the specified coordinates to the mesh which implements this interface


HRESULT BuildMesh(float Radius, float minDist, float creaseDegrees)

Parameters

Radius - [in] See remarks

minDist - [in] See remarks

creaseDegrees - [in] Crease angle in degrees.

Remarks:

Adds simplexes constructed on the vertices added with AddVertex(). If two points are closer than Radius they will be connected with a simplex. Set to 0 to use an automatically calculated value. This is the paramether the algorithm most sensitive to. It affects significantly geometry of the resulting mesh

If two points are closer than strong>i>mminDist they will be considered identical. It should be a very small number like 1e-3 which is a difference tolerance in the application. minDist less than 1e-10 are treated at zero. If there are no very close points this parameter does not make any difference

If an angle between two adjacent simplexes is greater than creaseDegrees it is assumed that the surface has a sharp edge along the shared edge of the simplexes. 45 degress is often acceptable. This parameter affects appearance of the resulting surface. Reducing the parameter while keeping it positive makes the surface more faceted. Increasing it makes the surface more smooth.

After adding points with AddVertex() it is recommended to obtain initial default parameters with a call to GetDefaults method below and tune them in by slowly changing around the default values.


HRESULT GetDefaults(float* Radius, float* minDist, float* creaseDegrees)

Parameters

Radius- [out] The returned default value for Radius . See BuildMesh method above

minDist- [out] The returned default value for minDist. See BuildMesh  method above

creaseDegrees- [out] The returned default value for creaseDegrees. See BuildMesh  method above

Remarks:

The method returns default values calculated internally when some of the parameters in a BuildMesh call are not provided (not valid). See the BuildMesh  method above. The returned values depend on the point data set added with AddVertex calls.