DGKC Control Documentation


Skip Navigation Links.
Start page
Quick Start
Search Page
Installation
What is new
Licensing
Expand ModelsModels
Expand DG Kernel ControlDG Kernel Control
Collapse API ReferenceAPI Reference
Interface List
Vector Space
Expand General GeometryGeneral Geometry
Collapse ModelModel
Expand ViewView
Expand General ComputingGeneral Computing
Expand ViewsViews
Expand Samples and TutorialsSamples and Tutorials
Expand GraphicsGraphics
Expand Math ObjectsMath Objects
Expand DeprecatedDeprecated
Redistribution
Model Viewer
Support
Skip Navigation LinksHome Page > API Reference > Model > Entities > Geometry > BSpline BRep Geometry > Mesh Geometry > IMesh_DG Go to ActiveX docs Search Documentation


IMesh_DG Interface

GetVertexList
GetSimplexList
GetVertexPosition
GetVertexPosition1
GetNormal
GetNormal1
GetSimplexVertices
IsValid
SetVertexPosition
SetVertexPosition1
SetNormal
SetNormal1
FixupNormals
Offset
Clear
ClearList
Begin
End
SwapSide
ToLocal
ToGlobal
EnableShading
IsShadingEnabled
GetVertexColor
SetVertexColor
IsShaderInitOK
DeleteShader
GetVertex
GetSimplex
GetVertexListPosition
GetSimplexListPosition
Upgrade
IsUpgraded
Downgrade
IsClosedSurface
Extract
Extract
Merge
SplitLinkedComponents
Refine
SmoothLaplacian
AddVertex
RemoveVertex
AddSimplex
RemoveSimplex

IList_DG GetVertexList()


IList_DG GetSimplexList()


PointDg GetVertexPosition(UInt64 vertex)


void GetVertexPosition1(UInt64 vertex, double x, double y, double z)


VectDg GetNormal(UInt64 vertex)


void GetNormal1(UInt64 vertex, out double vx, out double vy, out double vz)


void GetSimplexVertices(UInt64 simplex, out UInt64 vert0, out UInt64 vert1, out UInt64 vert2)


bool IsValid()

If this method returns false (invalid mesh), IError_DG interface can be used to retrieve the related error messages.


void SetVertexPosition(UInt64 vertex, PointDg pt)


void SetVertexPosition1(UInt64 vertex, double x, double y, double z)


void SetNormal(UInt64 vertex, VectDg normal)


void SetNormal1(UInt64 vertex, double vx, double vy, double vz)


void FixupNormals(double creaseDegrees, double tolerDegrees)

The creaseDegrees is used to decide whether a segment (edge of a simplex) between two adjacent simplices (faces) belongs to a smooth part of the surface being approximated by this mesh, or it is inside an edge of the surface between two smooth patches joined at a non-zero angle.
If angle between normals of two adjacent simplices is smaller than creaseDegrees, then the segment is considered a part of a smooth surface. Depending on the application, creaseDegrees = 45 is a reasonable guess.

If angle between old normal and a newly calculated normal is smaller than tolerDegrees, the normal is not modified. Set tolerDegrees to sero to always update normals.


void Offset(double dist)


void Clear()


void ClearList(MeshElementType_DG dim)


void Begin()


void End(MeshModsAction action)


void SwapSide()


void ToLocal(IFrame_DG frame)


void ToGlobal(IFrame_DG frame)


void EnableShading(bool enable)


bool IsShadingEnabled()


Color GetVertexColor(UInt64 vertex)


void SetVertexColor(UInt64 vertex, Color color)


void IsShaderInitOK(bool ret)


void DeleteShader()


IVertex_DG GetVertex(UInt64 vertex)


ISimplex_DG GetSimplex(UInt64 simplex)


UInt64 GetVertexListPosition(IVertex_DG iVertex)


UInt64 GetSimplexListPosition(ISimplex_DG iSimplex)


void Upgrade()


bool IsUpgraded()


void Downgrade()


bool IsClosedSurface()


IMesh_DG Extract(IObject_DG proximity, int elements, bool move, bool clone)

Returns part of this mesh completely inside the 3D area defined by surface of proximity. See comments for the Merge() method below for meaning of the other parameters.

See also: Mesh Ops sample


IMesh_DG Extract(IFrame_DG frameOfThis, IObject_DG proximity, int elements, bool move, bool clone)

Returns part of this mesh completely inside the 3D area defined by surface of proximity. See comments for the Merge() method below for meaning of the other parameters.

frameOfThis is normally location of the entity, where this mesh belongs (obtained via IEntity_DG.GetLocation()). It defines the frame, elements of this mesh have coordinates relative to.

See also: Mesh Ops sample


void Merge(IMesh_DG mesh, int elements, bool move, bool clone)

elements identifies which lists to merge. Bit 0 - vertices, bit 1 - segments (edges), bit 2 - simplicies. Set elements=4 if only simplicies are to be merged. Add elements += 2 to merge segments as well. Add elements += 1 to merge vertices also.

The safer method is to merge simplices only (elements=4) and call ClearList(MeshElementType_DG.Segment) and ClearList(MeshElementType_DG.Vertex) to make sure the lists remain in synch. The derived vertex and segment lists are updated as necessary when an operation requires it.

If the mesh is part of an entity, a call to IGeometry_DG.SetModified() is required to make sure the entity is notified about the low-level modification. Otherwise the surface may not be updated in the view.

If move is true, the identified lists are cleared in mesh.

If clone is true, elementes in the identified lists of mesh are cloned before being added to this mesh.


IArray_DG SplitLinkedComponents(IMapUint64_DG map)


void Refine(MeshRefineType_DG type)


void SmoothLaplacian(int steps)


UInt64 AddVertex()


void RemoveVertex(UInt64 vertex)


UInt64 AddSimplex(UInt64 vert0, UInt64 vert1, UInt64 vert2, double creaseAngle)


void RemoveSimplex(UInt64 simplex)