generateElementMeshes Method

Produce encoded Polyfaces from the geometry stream of a GeometricElement. A polyface is produced for each geometric entry in the element's geometry stream, excluding geometry like open curves that can't be converted into polyfaces. The polyfaces can be decoded using readElementMeshes. Symbology, UV parameters, and normal vectors are not included in the result.

generateElementMeshes(requestProps: ElementMeshRequestProps): Promise<Uint8Array>

@returns an encoded list of polyfaces that can be decoded by readElementMeshes.

@throws Error if ElementMeshRequestProps.source does not refer to a GeometricElement.

@note This function is intended to support limited analysis of an element's geometry as a mesh. It is not intended for producing graphics.

@see TileAdmin.requestElementGraphics to obtain meshes appropriate for display.

Parameter Type Description
requestProps ElementMeshRequestProps A description of how to produce the polyfaces and from which element to obtain them.

Returns - Promise<Uint8Array>

an encoded list of polyfaces that can be decoded by readElementMeshes.

Defined in

Last Updated: 20 April, 2024