UNPKG

@itwin/core-common

Version:

iTwin.js components common to frontend and backend

40 lines 1.85 kB
/** @packageDocumentation * @module Geometry */ import { Id64String } from "@itwin/core-bentley"; import { IndexedPolyface } from "@itwin/core-geometry"; /** Options used to control how [Polyface]($core-geometry)s are produced from elements by [IModelConnection.generateElementMeshes]($frontend). * @beta */ export interface ElementMeshOptions { /** Maximum distance from a face to the original geometry. * If not supplied, defaults to zero and [[angleTolerance]] will control the quality of the resulting mesh instead. * @see [StrokeOptions.chordTol]($core-geometry). */ chordTolerance?: number; /** Maximum angle difference in radians for an approximated face. * If not supplied, defaults to PI/12 (15 degrees). * @see [StrokeOptions.angleTol]($core-geometry). */ angleTolerance?: number; /** BRep features with bounding boxes smaller than this size will not generate graphics. * This option can be used to ignore expensive details from [BRepEntity.DataProps]($core-common) * like screws and screw holes. */ minBRepFeatureSize?: number; } /** Describes a request to generate [Polyface]($core-geometry)s from an element. * @see [IModelConnection.generateElementMeshes]($frontend). * @beta */ export interface ElementMeshRequestProps extends ElementMeshOptions { /** The Id of the [GeometricElement]($backend) from which to obtain meshes. */ source: Id64String; } /** Convert the output of [IModelConnection.generateElementMeshes]($frontend) into an array of [Polyface]($core-geometry)s. * @param data Encoded polyfaces obtained from [IModelConnection.generateElementMeshes]($frontend). * @returns a list of decoded polyfaces. * @beta */ export declare function readElementMeshes(data: Uint8Array): IndexedPolyface[]; //# sourceMappingURL=ElementMesh.d.ts.map