MeshBuilder C++ API 0.0.20261017
Mesh building
Loading...
Searching...
No Matches
MeshBuilder::IMeshBuilder Class Referenceabstract

Mesh Builder Interface. More...

#include <MeshBuilder.h>

Public Member Functions

virtual ~IMeshBuilder ()=default
 Virtual destructor.
virtual int ReserveVertexElements (const int count)=0
virtual int AddVertexElement (const double x, const double y, const double z)=0
virtual int ModifyVertexElement (const int index, const double x, const double y, const double z)=0
virtual int ScaleVertexElements (const double scaleX, const double scaleY, const double scaleZ, const double originX=0.0f, const double originY=0.0f, const double originZ=0.0f, const int vertexElementSet=-1)=0
virtual int ScaleVertexElements (const double scaleX, const double scaleY, const double scaleZ, const double originX, const double originY, const double originZ, const int *vertexIndices, const int count)=0
virtual int TranslateVertexElements (const double translateX, const double translateY, const double translateZ, const int *vertexIndices, const int count)=0
virtual int RotateVertexElements (const double axisPointX, const double axisPointY, const double axisPointZ, const double axisDirX, const double axisDirY, const double axisDirZ, const double angle, const int *vertexIndices, const int count)=0
virtual int MirrorVertexElements (const double planeOriginX, const double planeOriginY, const double planeOriginZ, const double planeNormalX, const double planeNormalY, const double planeNormalZ, const int *vertexIndices, const int count)=0
virtual int MergeCoincidentVertexElements (const double mergeDistance, const int vertexElementSetIndex=-1, int *outOldToNew=nullptr, const int outOldToNewCapacity=0)=0
virtual int GetNumberOfVertexElements () const =0
virtual const double * GetVertexElementsDefinition () const =0
virtual int GetNumberOfVertexElementSets () const =0
virtual int GetNumberOfVertexElementsInSet (const int setIndex) const =0
virtual const int * GetVertexElementSetElements (const int setIndex) const =0
virtual int CreateVertexElementSet (const int *vertexIndices=nullptr, const int count=0)=0
virtual int SetVertexElementSetElements (const int setIndex, const int *vertexIndices, const int count)=0
virtual int CopyVertexElementSet (const int setIndex)=0
virtual int MergeVertexElementSets (const int numVertexSets, const int *vertexSets)=0
virtual int GetNumberOfVertexElementsFromLineElementSet (const int setIndex) const =0
virtual int GetVertexElementsFromLineElementSet (int setIndex, int *outVertexElements, int maxCount) const =0
virtual int GetVertexElementSetsForVertex (const int vertexIndex, const int **outSetIndices, int *outCount) const =0
virtual int GetVertexToSetsMap (const int **outOffsets, const int **outData) const =0
virtual int DeleteVertexElements (const int setIndex=-1)=0
virtual int DeleteVertexElementsByIndex (const int *vertexIndices, const int count)=0
virtual int ReserveLineElements (const int count)=0
virtual int AddLineElement (const int i0, const int i1)=0
virtual int CreateLineElementSetFromVertexExtrusion (const int vertexIndex, const double dir[3], const double length, const int divisions, const DistributionType distribution=DistributionType::Uniform, const double ratio=1.0)=0
virtual int CreateLineElementSetFromVertexSweep (const int vertexIndex, const int numControlPoints, const double *controlPoints, const int numLines, const DistributionType distribution=DistributionType::Uniform, const double ratio=1.0, const int startAxis=-1, const double startValue=0.0, const int endAxis=-1, const double endValue=0.0, const int segmentIndex=0)=0
virtual int CreateLineElementSetBetweenVertices (const int startVertexIndex, const int endVertexIndex, const int divisions, const DistributionType distribution=DistributionType::Uniform, const double ratio=1.0)=0
virtual int CreateLineElementSetFromCircle (const double centerPoint[3], const double radius, const int segments, const double normal[3], const double startDirection[3], const double startAngle=0.0, const double endAngle=0.0, const DistributionType distribution=DistributionType::Uniform, const double ratio=1.0)=0
virtual int CopyLineElementSet (const int setIndex)=0
virtual int MergeLineElementSets (const int numLineSets, const int *lineSets)=0
virtual int GetNumberOfLineElements () const =0
virtual const int * GetLineElementsDefinition () const =0
 Returns const reference to line elements definition (constituting vertex index pairs array).
virtual const int * GetLineElementDefinition (const int elemIndex) const =0
virtual int GetNumberOfLineElementSets () const =0
virtual int GetNumberOfLineElementsInSet (const int setIndex) const =0
virtual const int * GetLineElementSetElements (const int setIndex) const =0
virtual int CreateLineElementSet (const int *lineIndices=nullptr, const int count=0)=0
virtual int SetLineElementSetElements (const int setIndex, const int *lineIndices, const int count)=0
virtual int GetLineElementSetsForLine (const int lineIndex, const int **outSetIndices, int *outCount) const =0
virtual int GetLineToSetsMap (const int **outOffsets, const int **outData) const =0
virtual int DeleteLineElements (const int setIndex=-1)=0
virtual int DeleteLineElementsByIndex (const int *lineIndices, const int count)=0
virtual int ReserveSurfaceElements (const int count)=0
virtual int AddTriaSurfaceElement (const int i0, const int i1, const int i2)=0
virtual int AddQuadSurfaceElement (const int i0, const int i1, const int i2, const int i3)=0
virtual int CreateSurfaceElementSetFromLineExtrusion (const int lineSetIndex, const double dir[3], const double length, const int divisions, const DistributionType distribution=DistributionType::Uniform, const double ratio=1.0f)=0
virtual int CreateSurfaceElementSetFromLoft (const int lineSetA, const int lineSetB, const int rows, const bool flipB=false, const DistributionType distribution=DistributionType::Uniform, const double ratio=1.0)=0
virtual int CreateSurfaceElementSetFromFan (const int sideSetA, const int sideSetB, const int outerSet)=0
virtual int CopySurfaceElementSet (const int setIndex)=0
virtual int MirrorSurfaceElementSet (const int setIndex, const double planeOriginX, const double planeOriginY, const double planeOriginZ, const double planeNormalX, const double planeNormalY, const double planeNormalZ)=0
virtual int MergeSurfaceElementSets (const int numSurfaceSets, const int *surfaceSets)=0
virtual int GetNumberOfSurfaceElements () const =0
virtual SurfaceElementType GetSurfaceElementType (const int elemIndex) const =0
virtual const int * GetSurfaceElementDefinition (const int elemIndex) const =0
virtual int GetNumberOfSurfaceElementSets () const =0
virtual int GetNumberOfSurfaceElementsInSet (const int setIndex) const =0
virtual const int * GetSurfaceElementSetElements (const int setIndex) const =0
virtual int CreateSurfaceElementSet (const int *surfaceIndices=nullptr, const int count=0)=0
virtual int SetSurfaceElementSetElements (const int setIndex, const int *surfaceIndices, const int count)=0
virtual int GetNumberOfVertexElementsInSurfaceElementSet (const int setIndex) const =0
virtual int GetVertexElementsFromSurfaceElementSet (int setIndex, int *outVertexElements, int maxCount) const =0
virtual int DeleteSurfaceElements (const int setIndex=-1)=0
virtual int DeleteSurfaceElementsByIndex (const int *surfaceIndices, const int count)=0
virtual int ReserveVolumeElements (const int count)=0
virtual int AddBrickVolumeElement (const int n0, const int n1, const int n2, const int n3, const int n4, const int n5, const int n6, const int n7)=0
virtual int AddWedgeVolumeElement (const int n0, const int n1, const int n2, const int n3, const int n4, const int n5)=0
virtual int AddTetraVolumeElement (const int n0, const int n1, const int n2, const int n3)=0
virtual int CreateVolumeElementSetFromSurfaceExtrusion (const int surfaceSetIndex, const double dir[3], const double length, const int divisions, const DistributionType distribution=DistributionType::Uniform, const double ratio=1.0)=0
virtual int CopyVolumeElementSet (const int setIndex)=0
virtual int MirrorVolumeElementSet (const int setIndex, const double planeOriginX, const double planeOriginY, const double planeOriginZ, const double planeNormalX, const double planeNormalY, const double planeNormalZ)=0
virtual int MergeVolumeElementSets (const int numVolumeSets, const int *volumeSets)=0
virtual int GetNumberOfVolumeElements () const =0
virtual VolumeElementType GetVolumeElementType (const int elemIndex) const =0
virtual const int * GetVolumeElementDefinition (const int elemIndex) const =0
virtual int GetNumberOfVolumeElementSets () const =0
virtual int GetNumberOfVolumeElementsInSet (const int setIndex) const =0
virtual const int * GetVolumeElementSetElements (const int setIndex) const =0
virtual int CreateVolumeElementSet (const int *volumeIndices=nullptr, const int count=0)=0
virtual int SetVolumeElementSetElements (const int setIndex, const int *volumeIndices, const int count)=0
virtual int GetNumberOfVertexElementsInVolumeElementSet (const int setIndex) const =0
virtual int GetVertexElementsFromVolumeElementSet (int setIndex, int *outVertexElements, int maxCount) const =0
virtual int DeleteVolumeElements (const int setIndex=-1)=0
virtual int DeleteVolumeElementsByIndex (const int *volumeIndices, const int count)=0
virtual int CreateFaceSet ()=0
virtual int GetNumberOfFaceSets () const =0
virtual int GetNumberOfFacesInSet (const int setIndex) const =0
virtual FACE_ITEM_SOURCE GetFaceSetElemSource (const int setIndex, const int faceIndex) const =0
virtual int GetFaceSetElemIndex (const int setIndex, const int faceIndex) const =0
virtual int GetFaceSetFaceIndex (const int setIndex, const int faceIndex) const =0
virtual int AddFaceToSet (const int setIndex, const FACE_ITEM_SOURCE elementSource, const int elementIndex, const int faceIndex)=0
virtual int RemoveFaceFromSet (const int setIndex, const FACE_ITEM_SOURCE elementSource, const int elementIndex, const int faceIndex)=0
virtual int ClearFaceSet (const int setIndex)=0
virtual int RebuildElementSetMaps ()=0
virtual void Clear ()=0
 Clears all mesh elements.
virtual int ExportToOBJ (const char *filename) const =0
virtual const char * GetErrorMessage () const =0
virtual IMeshBuilder * Clone () const =0

Detailed Description

Mesh Builder Interface.

Constructor & Destructor Documentation

◆ ~IMeshBuilder()

virtual MeshBuilder::IMeshBuilder::~IMeshBuilder ( )
virtualdefault

Virtual destructor.

Member Function Documentation

◆ ReserveVertexElements()

virtual int MeshBuilder::IMeshBuilder::ReserveVertexElements ( const int count)
pure virtual

Reserves memory for given number of vertex elements (this will speed-up any subsequent vertex element adding)

Parameters
count- Number of vertex elements to reserve memory for
Returns
0 on success, negative value on error

◆ AddVertexElement()

virtual int MeshBuilder::IMeshBuilder::AddVertexElement ( const double x,
const double y,
const double z )
pure virtual

Adds new vertex element. Newly created vertex element is the last element in the vertex element array.

Parameters
x- X coordinate
y- Y coordinate
z- Z coordinate
Returns
0 on success, negative value on error

◆ ModifyVertexElement()

virtual int MeshBuilder::IMeshBuilder::ModifyVertexElement ( const int index,
const double x,
const double y,
const double z )
pure virtual

Modifies existing vertex element at given index

Parameters
index- Index of the vertex element to modify
x- New X coordinate
y- New Y coordinate
z- New Z coordinate
Returns
0 on success, negative value on error

◆ ScaleVertexElements() [1/2]

virtual int MeshBuilder::IMeshBuilder::ScaleVertexElements ( const double scaleX,
const double scaleY,
const double scaleZ,
const double originX = 0.0f,
const double originY = 0.0f,
const double originZ = 0.0f,
const int vertexElementSet = -1 )
pure virtual

Scales vertex elements (all or just given set) about given origin

Parameters
scaleX- Scaling factor along X axis
scaleY- Scaling factor along Y axis
scaleZ- Scaling factor along Z axis
originX- X coordinate of the scaling origin
originY- Y coordinate of the scaling origin
originZ- Z coordinate of the scaling origin
vertexElementSet- Optional vertex element set index of set to scale; if not given or -1, all vertices are scaled
Returns
0 on success, negative value on error

◆ ScaleVertexElements() [2/2]

virtual int MeshBuilder::IMeshBuilder::ScaleVertexElements ( const double scaleX,
const double scaleY,
const double scaleZ,
const double originX,
const double originY,
const double originZ,
const int * vertexIndices,
const int count )
pure virtual

Scales the given vertex elements about given origin, in place (elements referencing them follow). A vertex listed more than once is scaled once.

Parameters
scaleX- Scaling factor along X axis
scaleY- Scaling factor along Y axis
scaleZ- Scaling factor along Z axis
originX- X coordinate of the scaling origin
originY- Y coordinate of the scaling origin
originZ- Z coordinate of the scaling origin
vertexIndices- Indices of the vertex elements to scale
count- Number of indices
Returns
0 on success, negative value on error

◆ TranslateVertexElements()

virtual int MeshBuilder::IMeshBuilder::TranslateVertexElements ( const double translateX,
const double translateY,
const double translateZ,
const int * vertexIndices,
const int count )
pure virtual

Translates the given vertex elements, in place (elements referencing them follow). A vertex listed more than once is translated once.

Parameters
translateX- Translation distance in X direction
translateY- Translation distance in Y direction
translateZ- Translation distance in Z direction
vertexIndices- Indices of the vertex elements to translate
count- Number of indices
Returns
0 on success, negative value on error

◆ RotateVertexElements()

virtual int MeshBuilder::IMeshBuilder::RotateVertexElements ( const double axisPointX,
const double axisPointY,
const double axisPointZ,
const double axisDirX,
const double axisDirY,
const double axisDirZ,
const double angle,
const int * vertexIndices,
const int count )
pure virtual

Rotates the given vertex elements about an axis, in place (elements referencing them follow). A vertex listed more than once is rotated once. Positive angles rotate counter-clockwise looking against the axis direction (right-hand rule).

Parameters
axisPointX- X coordinate of a point on the rotation axis
axisPointY- Y coordinate of a point on the rotation axis
axisPointZ- Z coordinate of a point on the rotation axis
axisDirX- X component of the rotation axis direction
axisDirY- Y component of the rotation axis direction
axisDirZ- Z component of the rotation axis direction
angle- Rotation angle in degrees
vertexIndices- Indices of the vertex elements to rotate
count- Number of indices
Returns
0 on success, negative value on error

◆ MirrorVertexElements()

virtual int MeshBuilder::IMeshBuilder::MirrorVertexElements ( const double planeOriginX,
const double planeOriginY,
const double planeOriginZ,
const double planeNormalX,
const double planeNormalY,
const double planeNormalZ,
const int * vertexIndices,
const int count )
pure virtual

Mirrors the given vertex elements across a plane, in place. Only vertex positions change: surface and volume elements referencing them end up with reversed orientation, so mirror surface and volume element sets with MirrorSurfaceElementSet / MirrorVolumeElementSet instead. A vertex listed more than once is mirrored once.

Parameters
planeOriginX- X coordinate of a point on the mirror plane
planeOriginY- Y coordinate of a point on the mirror plane
planeOriginZ- Z coordinate of a point on the mirror plane
planeNormalX- X component of the mirror plane normal vector
planeNormalY- Y component of the mirror plane normal vector
planeNormalZ- Z component of the mirror plane normal vector
vertexIndices- Indices of the vertex elements to mirror
count- Number of indices
Returns
0 on success, negative value on error

◆ MergeCoincidentVertexElements()

virtual int MeshBuilder::IMeshBuilder::MergeCoincidentVertexElements ( const double mergeDistance,
const int vertexElementSetIndex = -1,
int * outOldToNew = nullptr,
const int outOldToNewCapacity = 0 )
pure virtual

Merges vertices that are closer than mergeDistance, replacing them with their average position. Updates all referencing line, surface, and volume elements to use the merged vertex indices. Vertices connected by line elements are never merged to preserve topology.

Parameters
mergeDistance- Maximum distance for vertices to be considered coincident
vertexElementSetIndex- Optional index of vertex set to restrict merging (default: -1 = all vertices)
outOldToNew- Optional output array (size >= GetNumberOfVertexElements() as it was before this call) receiving, for each old vertex index, its new index (never -1 — every vertex either survives standalone or as part of a merged group's single surviving vertex). Lets a caller that keeps its own parallel per-vertex data (e.g. a user-visible ID array) remap it correctly instead of assuming positions never move. Pass nullptr to skip.
outOldToNewCapacity- Number of entries available in outOldToNew (ignored if outOldToNew is nullptr)
Returns
0 on success, negative value on error

◆ GetNumberOfVertexElements()

virtual int MeshBuilder::IMeshBuilder::GetNumberOfVertexElements ( ) const
pure virtual

Returns number of vertex elements

Returns
Number of vertex elements

◆ GetVertexElementsDefinition()

virtual const double * MeshBuilder::IMeshBuilder::GetVertexElementsDefinition ( ) const
pure virtual

Returns const reference to vertex elements definition (coordinates array)

Returns
Const reference to vertex elements definition (coordinates array)

◆ GetNumberOfVertexElementSets()

virtual int MeshBuilder::IMeshBuilder::GetNumberOfVertexElementSets ( ) const
pure virtual

Returns number of vertex element sets

Returns
Number of vertex element sets

◆ GetNumberOfVertexElementsInSet()

virtual int MeshBuilder::IMeshBuilder::GetNumberOfVertexElementsInSet ( const int setIndex) const
pure virtual

Returns number of vertex elements in requested vertex element set

Parameters
setIndex- Index of the vertex element set
Returns
Number of vertex elements in the requested vertex element set

◆ GetVertexElementSetElements()

virtual const int * MeshBuilder::IMeshBuilder::GetVertexElementSetElements ( const int setIndex) const
pure virtual

Returns const reference to a vertex element set elements array

Parameters
setIndex- Index of the vertex element set
Returns
Const reference to the vertex element set elements array or null pointer if setIndex is out of range

◆ CreateVertexElementSet()

virtual int MeshBuilder::IMeshBuilder::CreateVertexElementSet ( const int * vertexIndices = nullptr,
const int count = 0 )
pure virtual

Creates a new vertex element set, optionally populated with initial data.

Parameters
vertexIndices- Optional array of vertex element indices to populate the set (nullptr for empty set)
count- Number of elements in the array (0 for empty set)
Returns
Index of the newly created vertex element set

◆ SetVertexElementSetElements()

virtual int MeshBuilder::IMeshBuilder::SetVertexElementSetElements ( const int setIndex,
const int * vertexIndices,
const int count )
pure virtual

Replaces the contents of an existing vertex element set.

Parameters
setIndex- Index of the vertex element set to modify
vertexIndices- Array of vertex element indices (nullptr to clear)
count- Number of elements in the array (0 to clear)
Returns
0 on success, negative value on error

◆ CopyVertexElementSet()

virtual int MeshBuilder::IMeshBuilder::CopyVertexElementSet ( const int setIndex)
pure virtual

Copies a vertex element set: every vertex of the set is duplicated and the duplicates are stored as a new vertex element set (last in the vertex set array). Use the in-place operations (translate, rotate, scale, mirror) on the copy to place it.

Parameters
setIndex- Index of the vertex element set to copy
Returns
0 on success, negative value on error

◆ MergeVertexElementSets()

virtual int MeshBuilder::IMeshBuilder::MergeVertexElementSets ( const int numVertexSets,
const int * vertexSets )
pure virtual

Merges multiple vertex element sets into one, removing duplicates. The merged set is stored as a new vertex element set (last in the array).

Parameters
numVertexSets- Number of vertex element sets to merge
vertexSets- Array of vertex element set indices to merge
Returns
0 on success, negative value on error

◆ GetNumberOfVertexElementsFromLineElementSet()

virtual int MeshBuilder::IMeshBuilder::GetNumberOfVertexElementsFromLineElementSet ( const int setIndex) const
pure virtual

Returns number of unique vertex indices used by the given line element set

Parameters
setIndex- Index of the line element set
Returns
Number of unique vertex indices used by the given line element set or -1 on error

◆ GetVertexElementsFromLineElementSet()

virtual int MeshBuilder::IMeshBuilder::GetVertexElementsFromLineElementSet ( int setIndex,
int * outVertexElements,
int maxCount ) const
pure virtual

Returns unique vertex indices used by the given line element set. Caller must provide an array of sufficient size (at least as large as the value returned by GetNumberOfVertexElementsFromLineElementSet) to receive the vertex indices.

Parameters
setIndex- Index of the line element set
outVertexElements- Output array to receive unique vertex indices
maxCount- Maximum number of vertex indices to write to output array (should be >= value returned by GetNumberOfVertexElementsFromLineElementSet)
Returns
0 on success, negative value on error (e.g., if setIndex is out of range)

◆ GetVertexElementSetsForVertex()

virtual int MeshBuilder::IMeshBuilder::GetVertexElementSetsForVertex ( const int vertexIndex,
const int ** outSetIndices,
int * outCount ) const
pure virtual

Retrieves the array of set indices that contain the specified vertex element.

Parameters
vertexIndex- Index of the vertex element
outSetIndices- Output pointer to contiguous array of set indices
outCount- Output pointer to receive the count of sets
Returns
0 on success, negative value on error

◆ GetVertexToSetsMap()

virtual int MeshBuilder::IMeshBuilder::GetVertexToSetsMap ( const int ** outOffsets,
const int ** outData ) const
pure virtual

Retrieves the full CSR arrays for vertex-to-set mappings.

Parameters
outOffsets- Output pointer to offset array (size = GetNumberOfVertexElements() + 1)
outData- Output pointer to contiguous set indices buffer
Returns
0 on success, negative value on error

◆ DeleteVertexElements()

virtual int MeshBuilder::IMeshBuilder::DeleteVertexElements ( const int setIndex = -1)
pure virtual

Deletes vertex elements (all, or those in the given set) that are not referenced by any line, surface, or volume element — a vertex still in use is always kept, never deleted, so referencing elements can't be left with a dangling vertex index. Vertex element sets (including the given one) are updated in place; a set's index is never removed or renumbered, even if it ends up empty.

Parameters
setIndex- Index of the vertex element set (if -1, all vertex elements are considered)
Returns
0 on success, negative value on error

◆ DeleteVertexElementsByIndex()

virtual int MeshBuilder::IMeshBuilder::DeleteVertexElementsByIndex ( const int * vertexIndices,
const int count )
pure virtual

Deletes the vertex elements given by their indices, like DeleteVertexElements with a set holding them, but without leaving such a set behind. A vertex still used by a line, surface or volume element is kept, as by DeleteVertexElements.

Parameters
vertexIndices- Indices of the vertex elements to delete
count- Number of indices (0: nothing is deleted)
Returns
0 on success, negative value on error

◆ ReserveLineElements()

virtual int MeshBuilder::IMeshBuilder::ReserveLineElements ( const int count)
pure virtual

Reserves memory for given number of line elements (this will speed-up any subsequent line element adding)

Parameters
count- Number of line elements to reserve memory for
Returns
0 on success, negative value on error

◆ AddLineElement()

virtual int MeshBuilder::IMeshBuilder::AddLineElement ( const int i0,
const int i1 )
pure virtual

Adds new line element. Newly created line element is the last element in the line element array.

Parameters
i0- Index of the first vertex of the line
i1- Index of the second vertex of the line
Returns
0 on success, negative value on error

◆ CreateLineElementSetFromVertexExtrusion()

virtual int MeshBuilder::IMeshBuilder::CreateLineElementSetFromVertexExtrusion ( const int vertexIndex,
const double dir[3],
const double length,
const int divisions,
const DistributionType distribution = DistributionType::Uniform,
const double ratio = 1.0 )
pure virtual

Creates a line element set by extruding a vertex element along a given direction. Created line elements are stored in a new line element set which is last set in the line element set array.

Parameters
vertexIndex- Index of the vertex element to extrude
dir- Direction vector for extrusion
length- Length of extrusion
divisions- Number of divisions (line elements) to create
distribution- Distribution type for extrusion divisions (default: Uniform)
ratio- Distribution ratio parameter (default: 1.0)
Returns
0 on success, negative value on error

◆ CreateLineElementSetFromVertexSweep()

virtual int MeshBuilder::IMeshBuilder::CreateLineElementSetFromVertexSweep ( const int vertexIndex,
const int numControlPoints,
const double * controlPoints,
const int numLines,
const DistributionType distribution = DistributionType::Uniform,
const double ratio = 1.0,
const int startAxis = -1,
const double startValue = 0.0,
const int endAxis = -1,
const double endValue = 0.0,
const int segmentIndex = 0 )
pure virtual

Creates a line element set by sweeping a vertex element along a cubic B-spline curve segment defined by control points. Created line elements are stored in a new line element set which is last set in the line element set array.

Parameters
vertexIndex- Index of the anchor vertex element (sweep point of origin)
numControlPoints- Number of control points (must be >= 2)
controlPoints- Array of control point coordinates (size: numControlPoints * 3, in x,y,z order)
numLines- Number of line elements to create along the segment (>=1)
distribution- Point spacing law along the chosen segment (default: Uniform)
ratio- Distribution ratio parameter (default: 1.0)
startAxis- Axis index (0=X, 1=Y, 2=Z) for start coordinate constraint (default -1 = none)
startValue- Coordinate value at segment start along startAxis (default 0.0)
endAxis- Axis index (0=X, 1=Y, 2=Z) for end coordinate constraint (default -1 = none)
endValue- Coordinate value at segment end along endAxis (default 0.0)
segmentIndex- Index of segment candidate of interest between requested crossing (default 0)
Returns
0 on success, negative value on error

◆ CreateLineElementSetBetweenVertices()

virtual int MeshBuilder::IMeshBuilder::CreateLineElementSetBetweenVertices ( const int startVertexIndex,
const int endVertexIndex,
const int divisions,
const DistributionType distribution = DistributionType::Uniform,
const double ratio = 1.0 )
pure virtual

Creates a line element set between two vertex elements. Created line elements are stored in a new line element set which is last set in the line element set array.

Parameters
startVertexIndex- Index of the starting vertex element
endVertexIndex- Index of the ending vertex element
divisions- Number of divisions (line elements) to create
distribution- Distribution type for extrusion divisions (default: Uniform)
ratio- Distribution ratio parameter (default: 1.0)
Returns
0 on success, negative value on error

◆ CreateLineElementSetFromCircle()

virtual int MeshBuilder::IMeshBuilder::CreateLineElementSetFromCircle ( const double centerPoint[3],
const double radius,
const int segments,
const double normal[3],
const double startDirection[3],
const double startAngle = 0.0,
const double endAngle = 0.0,
const DistributionType distribution = DistributionType::Uniform,
const double ratio = 1.0 )
pure virtual

Creates a line element set forming a circle (or arc) in 3D space defined by a center point, radius, normal vector, and start direction. Created line elements are stored in a new line element set which is last set in the line element set array. The chain is always open: segments + 1 vertices, so a full circle ends in a vertex coincident with (but not merged into) its first vertex; merge them with MergeCoincidentVertexElements if a closed ring is needed.

Parameters
centerPoint- Center point coordinates [x, y, z]
radius- Circle radius (must be > 0)
segments- Number of line segments (min 3 for full circle, min 1 for arc)
normal- Normal vector defining the plane of the circle
startDirection- Direction vector defining the 0-degree reference direction
startAngle- Start angle in radians (default: 0.0)
endAngle- End angle in radians (default: 0.0 for full circle)
distribution- Distribution type for angular spacing
ratio- Distribution ratio parameter
Returns
0 on success, negative value on error

◆ CopyLineElementSet()

virtual int MeshBuilder::IMeshBuilder::CopyLineElementSet ( const int setIndex)
pure virtual

Copies a line element set: its vertices are duplicated (each once) and new line elements reference the duplicates. The new line elements are stored as a new line element set (last in the line set array); no vertex set is created. Use the in-place operations (translate, rotate, scale, mirror) on the copy's vertices to place it.

Parameters
setIndex- Index of the line element set to copy
Returns
0 on success, negative value on error

◆ MergeLineElementSets()

virtual int MeshBuilder::IMeshBuilder::MergeLineElementSets ( const int numLineSets,
const int * lineSets )
pure virtual

Merges multiple line element sets into one, removing duplicates

Parameters
numLineSets- Number of line element sets to merge
lineSets- Array of line element set indices to merge
Returns
0 on success, negative value on error

◆ GetNumberOfLineElements()

virtual int MeshBuilder::IMeshBuilder::GetNumberOfLineElements ( ) const
pure virtual

Returns number of line elements

Returns
Number of line elements

◆ GetLineElementsDefinition()

virtual const int * MeshBuilder::IMeshBuilder::GetLineElementsDefinition ( ) const
pure virtual

Returns const reference to line elements definition (constituting vertex index pairs array).

◆ GetLineElementDefinition()

virtual const int * MeshBuilder::IMeshBuilder::GetLineElementDefinition ( const int elemIndex) const
pure virtual

Returns the vertex indices for a given line element

Parameters
elemIndex- Index of the line element
Returns
Pointer to array of 2 vertex indices, or nullptr on error

◆ GetNumberOfLineElementSets()

virtual int MeshBuilder::IMeshBuilder::GetNumberOfLineElementSets ( ) const
pure virtual

Returns number of line element sets

Returns
Number of line element sets

◆ GetNumberOfLineElementsInSet()

virtual int MeshBuilder::IMeshBuilder::GetNumberOfLineElementsInSet ( const int setIndex) const
pure virtual

Returns number of line elements in requested line element set

Parameters
setIndex- Index of the line element set
Returns
Number of line elements in the requested line element set or -1 if setIndex is out of range

◆ GetLineElementSetElements()

virtual const int * MeshBuilder::IMeshBuilder::GetLineElementSetElements ( const int setIndex) const
pure virtual

Returns const reference to a line element set elements array

Parameters
setIndex- Index of the line element set
Returns
Const reference to the line element set elements array or null pointer if setIndex is out of range

◆ CreateLineElementSet()

virtual int MeshBuilder::IMeshBuilder::CreateLineElementSet ( const int * lineIndices = nullptr,
const int count = 0 )
pure virtual

Creates a new line element set, optionally populated with initial data.

Parameters
lineIndices- Optional array of line element indices (nullptr for empty set)
count- Number of elements in the array (0 for empty set)
Returns
Index of the newly created line element set

◆ SetLineElementSetElements()

virtual int MeshBuilder::IMeshBuilder::SetLineElementSetElements ( const int setIndex,
const int * lineIndices,
const int count )
pure virtual

Replaces the contents of an existing line element set.

Parameters
setIndex- Index of the line element set to modify
lineIndices- Array of line element indices (nullptr to clear)
count- Number of elements in the array (0 to clear)
Returns
0 on success, negative value on error

◆ GetLineElementSetsForLine()

virtual int MeshBuilder::IMeshBuilder::GetLineElementSetsForLine ( const int lineIndex,
const int ** outSetIndices,
int * outCount ) const
pure virtual

Retrieves the array of set indices that contain the specified line element.

Parameters
lineIndex- Index of the line element
outSetIndices- Output pointer to contiguous array of set indices
outCount- Output pointer to receive the count of sets
Returns
0 on success, negative value on error

◆ GetLineToSetsMap()

virtual int MeshBuilder::IMeshBuilder::GetLineToSetsMap ( const int ** outOffsets,
const int ** outData ) const
pure virtual

Retrieves the full CSR arrays for line-to-set mappings.

Parameters
outOffsets- Output pointer to offset array (size = GetNumberOfLineElements() + 1)
outData- Output pointer to contiguous set indices buffer
Returns
0 on success, negative value on error

◆ DeleteLineElements()

virtual int MeshBuilder::IMeshBuilder::DeleteLineElements ( const int setIndex = -1)
pure virtual

Deletes line elements (all, or those in the given set) unconditionally — nothing else references a line element, so there's no "still in use" concern. Line element sets (including the given one) are updated in place; a set's index is never removed or renumbered, even if it ends up empty.

Parameters
setIndex- Index of the line element set (if -1, all line elements are considered)
Returns
0 on success, negative value on error

◆ DeleteLineElementsByIndex()

virtual int MeshBuilder::IMeshBuilder::DeleteLineElementsByIndex ( const int * lineIndices,
const int count )
pure virtual

Deletes the line elements given by their indices, like DeleteLineElements with a set holding them, but without leaving such a set behind.

Parameters
lineIndices- Indices of the line elements to delete
count- Number of indices (0: nothing is deleted)
Returns
0 on success, negative value on error

◆ ReserveSurfaceElements()

virtual int MeshBuilder::IMeshBuilder::ReserveSurfaceElements ( const int count)
pure virtual

Reserves memory for given number of surface elements (this will speed-up any subsequent surface element adding)

Parameters
count- Number of surface elements to reserve memory for
Returns
0 on success, negative value on error

◆ AddTriaSurfaceElement()

virtual int MeshBuilder::IMeshBuilder::AddTriaSurfaceElement ( const int i0,
const int i1,
const int i2 )
pure virtual

Adds new triangle surface element. Newly created triangle surface element is the last element in the surface element array.

Parameters
i0,i1,i2- Indices of the constituting vertex elements (triangle)
Returns
0 on success, negative value on error

◆ AddQuadSurfaceElement()

virtual int MeshBuilder::IMeshBuilder::AddQuadSurfaceElement ( const int i0,
const int i1,
const int i2,
const int i3 )
pure virtual

Adds new quadrangle surface element. Newly created quad surface element is the last element in the surface element array.

Parameters
i0,i1,i2,i3- Indices of the constituting vertex elements (quad)
Returns
0 on success, negative value on error

◆ CreateSurfaceElementSetFromLineExtrusion()

virtual int MeshBuilder::IMeshBuilder::CreateSurfaceElementSetFromLineExtrusion ( const int lineSetIndex,
const double dir[3],
const double length,
const int divisions,
const DistributionType distribution = DistributionType::Uniform,
const double ratio = 1.0f )
pure virtual

Creates a surface element set by extruding a line element set along a direction. Created surface elements are stored in a new surface element set which is last set in the surface element set array. Process will also create additional line element sets, in this order: the edge opposite to the starting line set, then one side edge per free end of the starting line set. A free end is a vertex used by exactly one of its line elements, taken in the order the ends appear in the set: a closed loop has no side edges, an open chain two (start end first for a chain in order), several disconnected chains two each, and branch points none. The number of side edge sets therefore varies; compare the line set count before and after.

Parameters
lineSetIndex- Index of the line element set to extrude
dir- Direction vector for extrusion
length- Length of extrusion
divisions- Number of divisions (layers) to create
distribution- Distribution type for extrusion layers (default: Uniform)
ratio- Distribution ratio parameter (default: 1.0f)
Returns
0 on success, negative value on error

◆ CreateSurfaceElementSetFromLoft()

virtual int MeshBuilder::IMeshBuilder::CreateSurfaceElementSetFromLoft ( const int lineSetA,
const int lineSetB,
const int rows,
const bool flipB = false,
const DistributionType distribution = DistributionType::Uniform,
const double ratio = 1.0 )
pure virtual

Creates a quad surface mesh between two line element sets with optional multiple interpolation rows. The two input line sets may be anywhere in space.

Assumptions:

  • Each line set defines a single continuous chain (no branching/forks)
  • They have the same number of line elements (same vertex count)
  • If vertex counts differ, returns an error (no resampling)
Parameters
lineSetA- Index of first line element set (polyline)
lineSetB- Index of second line element set (polyline)
rows- Number of quad layers between the two polylines (>=1) rows=1: single band of quads directly connecting A to B rows=N: N bands, inserting (rows-1) intermediate vertex rows
flipB- If true, reverses the vertex order of lineSetB to untwist the lofted surface if needed (default: false)
distribution- Spacing law for interpolation parameter t in [0,1]
ratio- Distribution ratio parameter

Vertex handling:

  • Reuses original polyline vertices for first and last layers
  • Creates only interior layer vertices ((rows-1) * vertexCount)
Returns
0 on success, negative value on error

◆ CreateSurfaceElementSetFromFan()

virtual int MeshBuilder::IMeshBuilder::CreateSurfaceElementSetFromFan ( const int sideSetA,
const int sideSetB,
const int outerSet )
pure virtual

Creates a structured fan-shaped surface mesh from an apex vertex radiating outward to an arc. The three input line sets define the radial boundaries and outer arc.

Geometry assumptions:

  • sideSetA and sideSetB are line element sets sharing the same root vertex
  • They have identical counts of line elements (same number of vertices R+1)
  • outerSet is a line element set connecting the far endpoints of both sides

Structured layout:

  • Radial layers: 0..R (layer 0 = apex root, layer R = outer boundary)
  • Angular divisions: M line elements of outer arc (M+1 vertices per ring)
  • Layer 0 has just the apex vertex
  • Triangles between layer 0 and layer 1 (apex fan)
  • Quads between consecutive layers (r, r+1) for r >= 1

Bilinear interpolation:

  • For interior points, uses bilinear blending between side lines and outer arc
  • Preserves side line geometry exactly
  • Matches outer arc at outermost layer
Parameters
sideSetA- Index of first radial side line set
sideSetB- Index of second radial side line set
outerSet- Index of outer boundary arc line set
Returns
0 on success, negative value on error

◆ CopySurfaceElementSet()

virtual int MeshBuilder::IMeshBuilder::CopySurfaceElementSet ( const int setIndex)
pure virtual

Copies a surface element set: its vertices are duplicated (each once) and new surface elements reference the duplicates. The new surface elements are stored as a new surface element set (last in the surface set array); no vertex set is created. Use the in-place operations (translate, rotate, scale, MirrorSurfaceElementSet) on the copy to place it.

Parameters
setIndex- Index of the surface element set to copy
Returns
0 on success, negative value on error

◆ MirrorSurfaceElementSet()

virtual int MeshBuilder::IMeshBuilder::MirrorSurfaceElementSet ( const int setIndex,
const double planeOriginX,
const double planeOriginY,
const double planeOriginZ,
const double planeNormalX,
const double planeNormalY,
const double planeNormalZ )
pure virtual

Mirrors a surface element set across a plane, in place: its vertices are mirrored and the node order of its elements is reversed, so the mirrored elements keep a consistent normal orientation. Elements outside the set that share its vertices are moved along but not reordered.

Parameters
setIndex- Index of the surface element set to mirror
planeOriginX- X coordinate of a point on the mirror plane
planeOriginY- Y coordinate of a point on the mirror plane
planeOriginZ- Z coordinate of a point on the mirror plane
planeNormalX- X component of the mirror plane normal vector
planeNormalY- Y component of the mirror plane normal vector
planeNormalZ- Z component of the mirror plane normal vector
Returns
0 on success, negative value on error

◆ MergeSurfaceElementSets()

virtual int MeshBuilder::IMeshBuilder::MergeSurfaceElementSets ( const int numSurfaceSets,
const int * surfaceSets )
pure virtual

Merges multiple surface element sets into one, removing duplicates

Parameters
numSurfaceSets- Number of surface element sets to merge
surfaceSets- Array of surface element set indices to merge
Returns
0 on success, negative value on error

◆ GetNumberOfSurfaceElements()

virtual int MeshBuilder::IMeshBuilder::GetNumberOfSurfaceElements ( ) const
pure virtual

Returns number of surface elements

Returns
Number of surface elements

◆ GetSurfaceElementType()

virtual SurfaceElementType MeshBuilder::IMeshBuilder::GetSurfaceElementType ( const int elemIndex) const
pure virtual

Returns the type of a given surface element

Parameters
elemIndex- Index of the surface element
Returns
Surface element type (e.g., triangle, quadrilateral) or invalid value on error

◆ GetSurfaceElementDefinition()

virtual const int * MeshBuilder::IMeshBuilder::GetSurfaceElementDefinition ( const int elemIndex) const
pure virtual

Returns the vertex indices for a given surface element

Parameters
elemIndex- Index of the surface element
Returns
Pointer to array of vertex indices (size depends on element type: 3 for triangle, 4 for quad)

◆ GetNumberOfSurfaceElementSets()

virtual int MeshBuilder::IMeshBuilder::GetNumberOfSurfaceElementSets ( ) const
pure virtual

Returns number of surface element sets

Returns
Number of surface element sets

◆ GetNumberOfSurfaceElementsInSet()

virtual int MeshBuilder::IMeshBuilder::GetNumberOfSurfaceElementsInSet ( const int setIndex) const
pure virtual

Returns number of surface elements in requested surface element set

Parameters
setIndex- Index of the surface element set
Returns
Number of surface elements in the requested surface element set or -1 if setIndex is out of range

◆ GetSurfaceElementSetElements()

virtual const int * MeshBuilder::IMeshBuilder::GetSurfaceElementSetElements ( const int setIndex) const
pure virtual

Returns const reference to a surface element set elements array

Parameters
setIndex- Index of the surface element set
Returns
Const reference to the surface element set elements array or null pointer if setIndex is out of range

◆ CreateSurfaceElementSet()

virtual int MeshBuilder::IMeshBuilder::CreateSurfaceElementSet ( const int * surfaceIndices = nullptr,
const int count = 0 )
pure virtual

Creates a new surface element set, optionally populated with initial data.

Parameters
surfaceIndices- Optional array of surface element indices (nullptr for empty set)
count- Number of elements in the array (0 for empty set)
Returns
Index of the newly created surface element set

◆ SetSurfaceElementSetElements()

virtual int MeshBuilder::IMeshBuilder::SetSurfaceElementSetElements ( const int setIndex,
const int * surfaceIndices,
const int count )
pure virtual

Replaces the contents of an existing surface element set.

Parameters
setIndex- Index of the surface element set to modify
surfaceIndices- Array of surface element indices (nullptr to clear)
count- Number of elements in the array (0 to clear)
Returns
0 on success, negative value on error

◆ GetNumberOfVertexElementsInSurfaceElementSet()

virtual int MeshBuilder::IMeshBuilder::GetNumberOfVertexElementsInSurfaceElementSet ( const int setIndex) const
pure virtual

Returns number of unique vertex indices used by the given surface element set

Parameters
setIndex- Index of the surface element set
Returns
Number of unique vertex indices used by the given surface element set or -1 on error

◆ GetVertexElementsFromSurfaceElementSet()

virtual int MeshBuilder::IMeshBuilder::GetVertexElementsFromSurfaceElementSet ( int setIndex,
int * outVertexElements,
int maxCount ) const
pure virtual

Returns unique vertex indices used by the given surface element set. Caller must provide an array of sufficient size (at least as large as the value returned by GetNumberOfVertexElementsInSurfaceElementSet) to receive the vertex indices.

Parameters
setIndex- Index of the surface element set
outVertexElements- Output array to receive unique vertex indices
maxCount- Maximum number of vertex indices to write to output array (should be >= value returned by GetNumberOfVertexElementsInSurfaceElementSet)
Returns
0 on success, negative value on error (e.g., if setIndex is out of range)

◆ DeleteSurfaceElements()

virtual int MeshBuilder::IMeshBuilder::DeleteSurfaceElements ( const int setIndex = -1)
pure virtual

Deletes surface elements (all, or those in the given set) unconditionally — nothing else references a surface element via a set indirection, so there's no "still in use" concern. Surface element sets (including the given one) are updated in place; a set's index is never removed or renumbered, even if it ends up empty. Face sets are fixed up too: entries for a deleted surface element are removed, entries for a surviving one are remapped to its new index.

◆ DeleteSurfaceElementsByIndex()

virtual int MeshBuilder::IMeshBuilder::DeleteSurfaceElementsByIndex ( const int * surfaceIndices,
const int count )
pure virtual

Deletes the surface elements given by their indices, like DeleteSurfaceElements with a set holding them, but without leaving such a set behind.

Parameters
surfaceIndices- Indices of the surface elements to delete
count- Number of indices (0: nothing is deleted)
Returns
0 on success, negative value on error

◆ ReserveVolumeElements()

virtual int MeshBuilder::IMeshBuilder::ReserveVolumeElements ( const int count)
pure virtual

Reserves memory for given number of volume elements (this will speed-up any subsequent volume element adding)

Parameters
count- Number of volume elements to reserve memory for
Returns
0 on success, negative value on error

◆ AddBrickVolumeElement()

virtual int MeshBuilder::IMeshBuilder::AddBrickVolumeElement ( const int n0,
const int n1,
const int n2,
const int n3,
const int n4,
const int n5,
const int n6,
const int n7 )
pure virtual

Adds new brick volume element and returns its index in volume element array

Parameters
n0,n1,n2,n3,n4,n5,n6,n7- Node (vertex) indices defining the brick element Brick node ordering (standard hexahedron): Bottom face (z-): n0, n1, n2, n3 (counter-clockwise) Top face (z+): n4, n5, n6, n7 (counter-clockwise)
Returns
Index of the added brick volume element

◆ AddWedgeVolumeElement()

virtual int MeshBuilder::IMeshBuilder::AddWedgeVolumeElement ( const int n0,
const int n1,
const int n2,
const int n3,
const int n4,
const int n5 )
pure virtual

Adds new wedge volume element and returns its index in volume element array

Parameters
n0,n1,n2,n3,n4,n5- Node (vertex) indices defining the wedge element Wedge node ordering (triangular prism): Bottom face (triangle): n0, n1, n2 (counter-clockwise) Top face (triangle): n3, n4, n5 (counter-clockwise)
Returns
Index of the added wedge volume element

◆ AddTetraVolumeElement()

virtual int MeshBuilder::IMeshBuilder::AddTetraVolumeElement ( const int n0,
const int n1,
const int n2,
const int n3 )
pure virtual

Adds new tetrahedral volume element and returns its index in volume element array

Parameters
n0,n1,n2,n3- Node (vertex) indices defining the tetra element Tetra node ordering (standard tetrahedron): Base face (triangle): n0, n1, n2 (counter-clockwise) Apex: n3
Returns
Index of the added tetra volume element

◆ CreateVolumeElementSetFromSurfaceExtrusion()

virtual int MeshBuilder::IMeshBuilder::CreateVolumeElementSetFromSurfaceExtrusion ( const int surfaceSetIndex,
const double dir[3],
const double length,
const int divisions,
const DistributionType distribution = DistributionType::Uniform,
const double ratio = 1.0 )
pure virtual

Extrudes a surface element set along a direction into a volume element set Created volume elements are stored in a new volume element set which in turn is last set in the volume element set array. Process will also create additional surface element sets; face opposite to starting surface set (last created - 2) and side surface element set.

Parameters
surfaceSetIndex- Index of the surface element set to extrude
dir- Direction vector for extrusion
length- Length of extrusion
divisions- Number of divisions (layers of volume elements) to create
distribution- Distribution type for extrusion
ratio- Distribution ratio parameter
Returns
0 on success, negative value on error (e.g., if setIndex is out of range)

◆ CopyVolumeElementSet()

virtual int MeshBuilder::IMeshBuilder::CopyVolumeElementSet ( const int setIndex)
pure virtual

Copies a volume element set: its vertices are duplicated (each once) and new volume elements reference the duplicates. The new volume elements are stored as a new volume element set (last in the volume set array); no vertex set is created. Use the in-place operations (translate, rotate, scale, MirrorVolumeElementSet) on the copy to place it.

Parameters
setIndex- Index of the volume element set to copy
Returns
0 on success, negative value on error

◆ MirrorVolumeElementSet()

virtual int MeshBuilder::IMeshBuilder::MirrorVolumeElementSet ( const int setIndex,
const double planeOriginX,
const double planeOriginY,
const double planeOriginZ,
const double planeNormalX,
const double planeNormalY,
const double planeNormalZ )
pure virtual

Mirrors a volume element set across a plane, in place: its vertices are mirrored and the node order of its elements is changed (bottom and top faces swapped for bricks and wedges, two nodes swapped for tetras), so the mirrored elements keep a positive volume. Elements outside the set that share its vertices are moved along but not reordered. Face sets referring to faces of the mirrored elements are renumbered so they keep referring to the same (mirrored) faces.

Parameters
setIndex- Index of the volume element set to mirror
planeOriginX- X coordinate of a point on the mirror plane
planeOriginY- Y coordinate of a point on the mirror plane
planeOriginZ- Z coordinate of a point on the mirror plane
planeNormalX- X component of the mirror plane normal vector
planeNormalY- Y component of the mirror plane normal vector
planeNormalZ- Z component of the mirror plane normal vector
Returns
0 on success, negative value on error

◆ MergeVolumeElementSets()

virtual int MeshBuilder::IMeshBuilder::MergeVolumeElementSets ( const int numVolumeSets,
const int * volumeSets )
pure virtual

Merges multiple volume element sets into one, removing duplicates. The merged set is stored as a new volume element set (last in the array).

Parameters
numVolumeSets- Number of volume element sets to merge
volumeSets- Array of volume element set indices to merge
Returns
0 on success, negative value on error

◆ GetNumberOfVolumeElements()

virtual int MeshBuilder::IMeshBuilder::GetNumberOfVolumeElements ( ) const
pure virtual

Returns number of volume elements

Returns
Number of volume elements

◆ GetVolumeElementType()

virtual VolumeElementType MeshBuilder::IMeshBuilder::GetVolumeElementType ( const int elemIndex) const
pure virtual

Returns the type of a given volume element

Parameters
elemIndex- Index of the volume element
Returns
Volume element type (e.g., brick, wedge) or invalid value on error

◆ GetVolumeElementDefinition()

virtual const int * MeshBuilder::IMeshBuilder::GetVolumeElementDefinition ( const int elemIndex) const
pure virtual

Returns the vertex indices for a given volume element

Parameters
elemIndex- Index of the volume element
Returns
Pointer to array of vertex indices (size depends on element type: 8 for brick, 6 for wedge)

◆ GetNumberOfVolumeElementSets()

virtual int MeshBuilder::IMeshBuilder::GetNumberOfVolumeElementSets ( ) const
pure virtual

Returns number of volume element sets

Returns
Number of volume element sets

◆ GetNumberOfVolumeElementsInSet()

virtual int MeshBuilder::IMeshBuilder::GetNumberOfVolumeElementsInSet ( const int setIndex) const
pure virtual

Returns the number of volume elements in a volume element set

Parameters
setIndex- Index of the volume element set
Returns
Number of volume elements in the set, or negative value on error

◆ GetVolumeElementSetElements()

virtual const int * MeshBuilder::IMeshBuilder::GetVolumeElementSetElements ( const int setIndex) const
pure virtual

Returns pointer to array of volume element indices in a volume element set

Parameters
setIndex- Index of the volume element set
Returns
Pointer to array of volume element indices, or nullptr on error

◆ CreateVolumeElementSet()

virtual int MeshBuilder::IMeshBuilder::CreateVolumeElementSet ( const int * volumeIndices = nullptr,
const int count = 0 )
pure virtual

Creates a new volume element set, optionally populated with initial data.

Parameters
volumeIndices- Optional array of volume element indices (nullptr for empty set)
count- Number of elements in the array (0 for empty set)
Returns
Index of the newly created volume element set

◆ SetVolumeElementSetElements()

virtual int MeshBuilder::IMeshBuilder::SetVolumeElementSetElements ( const int setIndex,
const int * volumeIndices,
const int count )
pure virtual

Replaces the contents of an existing volume element set.

Parameters
setIndex- Index of the volume element set to modify
volumeIndices- Array of volume element indices (nullptr to clear)
count- Number of elements in the array (0 to clear)
Returns
0 on success, negative value on error

◆ GetNumberOfVertexElementsInVolumeElementSet()

virtual int MeshBuilder::IMeshBuilder::GetNumberOfVertexElementsInVolumeElementSet ( const int setIndex) const
pure virtual

Returns the number of unique vertex elements in a volume element set

Parameters
setIndex- Index of the volume element set
Returns
Number of unique vertex elements, or negative value on error

◆ GetVertexElementsFromVolumeElementSet()

virtual int MeshBuilder::IMeshBuilder::GetVertexElementsFromVolumeElementSet ( int setIndex,
int * outVertexElements,
int maxCount ) const
pure virtual

Extracts unique vertex elements from a volume element set

Parameters
setIndex- Index of the volume element set
outVertexElements- Output buffer for vertex element indices
maxCount- Maximum number of vertices to write
Returns
Number of vertices written, or negative value on error

◆ DeleteVolumeElements()

virtual int MeshBuilder::IMeshBuilder::DeleteVolumeElements ( const int setIndex = -1)
pure virtual

Deletes volume elements (all, or those in the given set) unconditionally — nothing else references a volume element via a set indirection, so there's no "still in use" concern. Volume element sets (including the given one) are updated in place; a set's index is never removed or renumbered, even if it ends up empty. Face sets are fixed up too: entries for a deleted volume element are removed, entries for a surviving one are remapped to its new index.

◆ DeleteVolumeElementsByIndex()

virtual int MeshBuilder::IMeshBuilder::DeleteVolumeElementsByIndex ( const int * volumeIndices,
const int count )
pure virtual

Deletes the volume elements given by their indices, like DeleteVolumeElements with a set holding them, but without leaving such a set behind.

Parameters
volumeIndices- Indices of the volume elements to delete
count- Number of indices (0: nothing is deleted)
Returns
0 on success, negative value on error

◆ CreateFaceSet()

virtual int MeshBuilder::IMeshBuilder::CreateFaceSet ( )
pure virtual

Creates a new empty face set.

Returns
Index of the newly created face set, or negative value on error

◆ GetNumberOfFaceSets()

virtual int MeshBuilder::IMeshBuilder::GetNumberOfFaceSets ( ) const
pure virtual

Returns number of face sets

Returns
Number of face sets

◆ GetNumberOfFacesInSet()

virtual int MeshBuilder::IMeshBuilder::GetNumberOfFacesInSet ( const int setIndex) const
pure virtual

Returns number of faces in requested face set

Parameters
setIndex- Index of the face set
Returns
Number of faces in the requested face set, or negative value on error

◆ GetFaceSetElemSource()

virtual FACE_ITEM_SOURCE MeshBuilder::IMeshBuilder::GetFaceSetElemSource ( const int setIndex,
const int faceIndex ) const
pure virtual

Returns the element source of a face in a face set

Parameters
setIndex- Index of the face set
faceIndex- Index of the face within the set
Returns
Element source

◆ GetFaceSetElemIndex()

virtual int MeshBuilder::IMeshBuilder::GetFaceSetElemIndex ( const int setIndex,
const int faceIndex ) const
pure virtual

Returns the element index of a face in a face set

Parameters
setIndex- Index of the face set
faceIndex- Index of the face within the set
Returns
Element index, or -1 on error

◆ GetFaceSetFaceIndex()

virtual int MeshBuilder::IMeshBuilder::GetFaceSetFaceIndex ( const int setIndex,
const int faceIndex ) const
pure virtual

Returns the local face number of a face in a face set

Parameters
setIndex- Index of the face set
faceIndex- Index of the face within the set
Returns
Face number (1-based), or -1 on error

◆ AddFaceToSet()

virtual int MeshBuilder::IMeshBuilder::AddFaceToSet ( const int setIndex,
const FACE_ITEM_SOURCE elementSource,
const int elementIndex,
const int faceIndex )
pure virtual

Adds a face to a face set (sorted, no duplicates)

Parameters
setIndex- Index of the face set
elementSource- Element source
elementIndex- Element index
faceIndex- Local face number (1-based)
Returns
0 on success, negative value on error

◆ RemoveFaceFromSet()

virtual int MeshBuilder::IMeshBuilder::RemoveFaceFromSet ( const int setIndex,
const FACE_ITEM_SOURCE elementSource,
const int elementIndex,
const int faceIndex )
pure virtual

Removes a face from a face set

Parameters
setIndex- Index of the face set
elementSource- Element source
elementIndex- Element index
faceIndex- Local face number (1-based)
Returns
0 on success, negative value on error

◆ ClearFaceSet()

virtual int MeshBuilder::IMeshBuilder::ClearFaceSet ( const int setIndex)
pure virtual

Clears all faces from a face set

Parameters
setIndex- Index of the face set
Returns
0 on success, negative value on error

◆ RebuildElementSetMaps()

virtual int MeshBuilder::IMeshBuilder::RebuildElementSetMaps ( )
pure virtual

Rebuilds CSR maps for vertex-to-sets and line-to-sets associations. Should be called after modifying vertex/line set definitions.

Returns
0 on success, negative value on error

◆ Clear()

virtual void MeshBuilder::IMeshBuilder::Clear ( )
pure virtual

Clears all mesh elements.

◆ ExportToOBJ()

virtual int MeshBuilder::IMeshBuilder::ExportToOBJ ( const char * filename) const
pure virtual

Exports mesh to OBJ file format

Exports vertex elements, line elements, and surface elements to Wavefront OBJ format. Volume elements are not supported by OBJ format.

Parameters
filename- Path to the output OBJ file
Returns
0 on success, negative value on error

◆ GetErrorMessage()

virtual const char * MeshBuilder::IMeshBuilder::GetErrorMessage ( ) const
pure virtual

Returns the last error message (if any)

Returns
Pointer to null-terminated error message string

◆ Clone()

virtual IMeshBuilder * MeshBuilder::IMeshBuilder::Clone ( ) const
pure virtual

Clones the builder, generating an exact copy of the underlying structures.

Returns
Replicated builder model

The documentation for this class was generated from the following file:
  • MeshBuilder.h