@buerli.io/headless 0.10.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,475 +1,519 @@
1
- import { DrawingID, ObjectID } from '@buerli.io/core';
2
- import { BufferGeometry, Scene, Vector3 } from 'three';
3
- /**
4
- * A simple and intuitive javascript based api that incorporates solid operations like
5
- * shapes, booleans (unions, subtracts, intersections), extrusions, revolves, blends,
6
- * chamfers, slices, arrays, patterns, offsets, etc. The api is compatible with THREEJS
7
- * and understands some of its primitives like curves and paths.
8
- *
9
- * ```sh
10
- * npm install @buerli.io/headless
11
- * ```
12
- *
13
- * ```js
14
- * import { solid } from '@buerli.io/headless'
15
- * const cad = new solid(url)
16
- * cad.init(async api => {
17
- * // Your code goes here
18
- * })
19
- * ```
20
- */
21
- export declare type ApiNoHistory = {
22
- /**
23
- * Creates a simple box.
24
- * @param length length of the box (x-axis)
25
- * @param width width of the box (y-axis)
26
- * @param height height of the box (z-axis)
27
- * @example
28
- * // Creates a box with length = 10, width = 25 and height = 15
29
- * const boxId = api.box(10,25,15)
30
- * const geom = await api.createBufferGeometry(boxId)
31
- * const mesh = new THREE.Mesh( geom, new THREE.MeshStandardMaterial({}))
32
- * @image /doc/assets/solid/box.jpg
33
- */
34
- box: (length: number, width: number, height: number) => ID;
35
- /**
36
- * Clears all existing solids in the drawing.
37
- * @example
38
- * // Clears all solids
39
- * const boxId = api.box(10,25,15)
40
- * const coneId = api.cone(50,20,10)
41
- * api.clearSolids()
42
- * @image // tbd
43
- */
44
- clearSolids: () => Promise<void>;
45
- /**
46
- * Clears the target solid in the drawing.
47
- * @param solidId id of the solid to be deleted
48
- * @example
49
- * // Clear a specific solid
50
- * const boxId = api.box(10,25,15)
51
- * const coneId = api.cone(50,20,10)
52
- * api.clearSolid(boxId)
53
- * const geom = await api.createBufferGeometry(coneId)
54
- * const mesh = new THREE.Mesh( geom, new THREE.MeshStandardMaterial({}))
55
- * @image // tbd
56
- */
57
- clearSolid: (solidId: VID) => Promise<void>;
58
- /**
59
- * Creates a simple cone.
60
- * @param height height of the cone (z-axis)
61
- * @param diameter1 diameter at the bottom of the cone
62
- * @param diameter2 diameter at the top of the cone
63
- * @example
64
- * // Creates a cone with height = 50, diameter1 = 20 and diameter2 = 10
65
- * const coneId = api.cone(50,20,10)
66
- * const geom = await api.createBufferGeometry(coneId)
67
- * const mesh = new THREE.Mesh( geom, new THREE.MeshStandardMaterial({}))
68
- * @image /doc/assets/solid/cone.jpg
69
- */
70
- cone: (height: number, diameter1: number, diameter2: number) => ID;
71
- /**
72
- * Creates a copy of the solid.
73
- * @param solidId id of the solid to create a copy from
74
- * @example
75
- * // Creates a copy of a solid
76
- * const coneId = api.cone(50,20,10)
77
- * const copyId = api.copy(coneId)
78
- * api.rotateTo(copyId, [Math.PI / 2, 0, 0])
79
- * const unionId = api.union(coneId, false, copyId)
80
- * const geom = await api.createBufferGeometry(unionId)
81
- * const mesh = new THREE.Mesh( geom, new THREE.MeshStandardMaterial({}))
82
- * @image /doc/assets/solid/copy.jpg
83
- */
84
- copy: (solidId: VID) => ID;
85
- /**
86
- * Creates the buffer geometry of the solid.
87
- * @param solidId id of the solid to create buffer geometry from
88
- * @example
89
- * // Creates the buffer geometry
90
- * const coneId = api.cone(50,20,10)
91
- * const boxId = api.box(10,25,15)
92
- * const unionId = api.union(coneId, false, boxId)
93
- * const geom = await api.createBufferGeometry(coneId)
94
- * const mesh = new THREE.Mesh( geom, new THREE.MeshStandardMaterial({}))
95
- * @image // tbd
96
- */
97
- createBufferGeometry: (solidId: VID) => Promise<BufferGeometry | undefined>;
98
- /**
99
- * Creates ThreeJS scene from the given solids.
100
- * @param solids ids of the solids to create scene from
101
- * @param options optional object to define different settings.
102
- * @param meshPerGeometry boolean flag to define if the solids will have a mesh for each geometry element
103
- * or if the geometries will be combined to one mesh
104
- * @example // tbd
105
- * @image // tbd
106
- */
107
- createScene: (solids: VID[], options?: {
108
- meshPerGeometry?: boolean;
109
- }) => Promise<{
110
- scene: Scene;
111
- part: THREE.Group;
112
- solids: THREE.Group[];
113
- meshes: THREE.Mesh[];
114
- }>;
115
- /**
116
- * Creates a simple cylinder.
117
- * @param height height of the cylinder (z-axis)
118
- * @param diameter diamter of the cylinder
119
- * @example
120
- * // Creates a cylinder with height = 50 and diameter = 10
121
- * const cylinderId = api.cylinder(50,10)
122
- * const geom = await api.createBufferGeometry(cylinderId)
123
- * const mesh = new THREE.Mesh( geom, new THREE.MeshStandardMaterial({}))
124
- * @image /doc/assets/solid/cylinder.jpg
125
- */
126
- cylinder: (height: number, diameter: number) => ID;
127
- /**
128
- * Returns all adjacent edges of a face or vertex
129
- * @param breps face or vertex ids to get the adjacent edges from
130
- * @example
131
- * // Returns all edges from the top surface of box and adds a fillet on them
132
- * const boxId = api.box(10, 25, 15)
133
- * const surface = api.pick(boxId, 'face', [0, 0, 7.5])
134
- * const edges = api.edgeLoops(surface)
135
- * api.fillet(2, edges)
136
- * const geom = await api.createBufferGeometry(boxId)
137
- * const mesh = new THREE.Mesh(geom, new THREE.MeshStandardMaterial({}))
138
- * @image /doc/assets/solid/edgeLoops.jpg
139
- */
140
- edgeLoops: (breps: VIDs) => IDs;
141
- /**
142
- * Writes the current solid or specific solids to a stream in stp data format
143
- * and returns the data.
144
- * @param solidIds [optional] specific solidIds to write to stream
145
- * @example
146
- * // Writes the unified solid to stream
147
- * const coneId = api.cone(50,20,10)
148
- * const boxId = api.box(10,25,15)
149
- * const unionId = api.union(coneId, false, boxId)
150
- * const data = api.export()
151
- * const geom = await api.createBufferGeometry(coneId)
152
- * const mesh = new THREE.Mesh( geom, new THREE.MeshStandardMaterial({}))
153
- * @image // tbd
154
- */
155
- export: (solidIds?: VIDs) => Promise<Uint8Array | null>;
156
- /**
157
- * The solid is extended at the defined plane with a solid created by extruding the section defined by the plane.
158
- * @param solidId id of the solid which will be extended
159
- * @param point position of plane
160
- * @param normal normal vector of plane
161
- * @param distance distance of extension
162
- * @example
163
- * // Extends the sphere in its center
164
- * const sphereId = api.sphere(10)
165
- * api.extendSolidAtPlane(sphereId, [0, 0, 0], [0, 1, 1], 50)
166
- * const geom = await api.createBufferGeometry(sphereId)
167
- * const mesh = new THREE.Mesh(geom, new THREE.MeshStandardMaterial({}))
168
- * @image /doc/assets/solid/extendSolidAtPlane.jpg
169
- */
170
- extendSolidAtPlane: (target: VID, point: Vec, normal: Vec, distance: number) => Promise<void>;
171
- /**
172
- * Creates an extrusion.
173
- * @param height height of extrusion
174
- * @param region region which will be extruded, defined by Polyline or THREE.Shape
175
- * @example
176
- * // Extrudes a heart from THREE shape
177
- * const shape = new THREE.Shape()
178
- * shape.moveTo(25, 25)
179
- * shape.bezierCurveTo(25, 25, 20, 0, 0, 0)
180
- * shape.bezierCurveTo(-30, 0, -30, 35, -30, 35)
181
- * shape.bezierCurveTo(-30, 55, -10, 77, 25, 95)
182
- * shape.bezierCurveTo(60, 77, 80, 55, 80, 35)
183
- * shape.bezierCurveTo(80, 35, 80, 0, 50, 0)
184
- * shape.bezierCurveTo(35, 0, 25, 25, 25, 25)
185
- * const heartId = api.extrude([0, 0, 5], shape)
186
- * api.rotateTo(heartId, [Math.PI, 0, 0])
187
- * const geom = await api.createBufferGeometry(heartId)
188
- * const mesh = new THREE.Mesh(geom, new THREE.MeshStandardMaterial({}))
189
- * @image /doc/assets/solid/extrude.jpg
190
- */
191
- extrude: (height: Vec, region: Polyline | THREE.Shape) => ID;
192
- /**
193
- * Creates a fillet at the given edges
194
- * @param radius radius of the fillet
195
- * @param edges edges to create fillets on
196
- * @example
197
- * // Creates a fillet with radius = 2 at the given edge
198
- * const boxId = api.box(10, 25, 15)
199
- * const edge = api.pick(boxId, 'edge', [5, 0, 7.5])
200
- * api.fillet(2, edge)
201
- * const geom = await api.createBufferGeometry(boxId)
202
- * const mesh = new THREE.Mesh(geom, new THREE.MeshStandardMaterial({}))
203
- * @image /doc/assets/solid/fillet.jpg
204
- */
205
- fillet: (radius: number, edges: VIDs) => ID;
206
- /**
207
- * Loads an arraybuffer in stp file format. All solids existing
208
- * in stp data will be returned in an array. Current drawing will not
209
- * be overwritten, imports will just be added.
210
- * @param data data as arraybuffer in stp format
211
- * @example
212
- * // Imports a stp file
213
- * const importIds = await api.import(arraybuffer)
214
- * const geom = await api.createBufferGeometry(importIds[0])
215
- * const mesh = new THREE.Mesh(geom, new THREE.MeshStandardMaterial({}))
216
- * @image // tbd
217
- */
218
- import: (data: ArrayBuffer) => IDs;
219
- /**
220
- * Creates an intersection between solid and bodies.
221
- * @param solidId id of the solid to intersect
222
- * @param keepSolid if true, the solid will be kept and can be used again
223
- * @param bodies bodies to intersect with the solid
224
- * @example
225
- * // Creates an intersection between a sphere and a cylinder
226
- * const sphereId = api.sphere(20)
227
- * const cylinderId = api.cylinder(50, 30)
228
- * const intersectId = api.intersect(sphereId, false, cylinderId)
229
- * const geom = await api.createBufferGeometry(intersectId)
230
- * const mesh = new THREE.Mesh(geom, new THREE.MeshStandardMaterial({}))
231
- * @image /doc/assets/solid/intersect.jpg
232
- */
233
- intersect: (solidId: VID, keepSolid: boolean, ...bodies: VID[]) => ID;
234
- /**
235
- * Loads an arraybuffer in native file format. Native file format
236
- * is 'ofb', if you want to load 'stp' file formats, use import function.
237
- * Current drawing will be overwritten by loaded data.
238
- * @param data data as arraybuffer in ofb format
239
- * @example // tbd
240
- * @image // tbd
241
- */
242
- load: (data: ArrayBuffer) => IDs;
243
- /**
244
- * Mirrors the solid at the specified plane.
245
- * @param point position of the mirror plane
246
- * @param normal normal vector of the mirror plane
247
- * @example
248
- * // Mirrors the cone at its bottom surface
249
- * const coneId1 = api.cone(50, 20, 0)
250
- * api.mirror(coneId1, [0, 0, -25], [0, 0, 1])
251
- * const coneId2 = api.cone(50, 20, 0)
252
- * const unionId = api.union(coneId1, false, coneId2)
253
- * const geom = await api.createBufferGeometry(unionId)
254
- * const mesh = new THREE.Mesh(geom, new THREE.MeshStandardMaterial({}))
255
- * @image /doc/assets/solid/mirror.jpg
256
- */
257
- mirror: (solidId: VID, point: Vec, normal: Vec) => Promise<void>;
258
- /**
259
- * Moves the solid to the given position.
260
- * @param solidId id of the solid which will be moved
261
- * @param position position to move the solid to
262
- * @example
263
- * // Moves the second box to the first box's corner
264
- * const boxId1 = api.box(20, 20, 20)
265
- * const boxId2 = api.box(20, 20, 20)
266
- * api.moveTo(boxId1, [10, 10, 10])
267
- * const unionId = api.union(boxId1, false, boxId2)
268
- * const geom = await api.createBufferGeometry(unionId)
269
- * const mesh = new THREE.Mesh(geom, new THREE.MeshStandardMaterial({}))
270
- * @image /doc/assets/solid/moveTo.jpg
271
- */
272
- moveTo: (solidId: VID, position: Vec) => Promise<void>;
273
- /**
274
- * Creates an offset of the solid.
275
- * @param solidId solid which becomes an offset
276
- * @param offsetDistance distance of offset
277
- * @example
278
- * // Creates an offset on the box
279
- * const boxId1 = api.box(20, 20, 20)
280
- * api.offset(boxId1, 2)
281
- * const geom = await api.createBufferGeometry(boxId1)
282
- * const mesh = new THREE.Mesh(geom, new THREE.MeshStandardMaterial({}))
283
- * @image /doc/assets/solid/offset.jpg
284
- */
285
- offset: (solidId: VID, offsetDistance: number) => ID;
286
- /**
287
- * Returns all edges or faces depending on type which matches the points.
288
- * @param solidId id of the solid to look for edges and faces
289
- * @param type type of geometry to look for --> 'edge' or 'face'
290
- * @param points points where edges and faces will be expected
291
- * @example
292
- * // Pick does look for an edge at point [5,0,7.5] and adds a fillet on it if found the edge
293
- * const boxId = api.box(10, 25, 15)
294
- * const edge = api.pick(boxId, 'edge', [5, 0, 7.5])
295
- * api.fillet(2, edge)
296
- * const geom = await api.createBufferGeometry(boxId)
297
- * const mesh = new THREE.Mesh(geom, new THREE.MeshStandardMaterial({}))
298
- * @image /doc/assets/solid/pick.jpg
299
- */
300
- pick: (solidId: VID, type: 'vertex' | 'edge' | 'face', ...points: Vec[]) => IDs;
301
- /**
302
- * Revolves the given region.
303
- * @param position position of rotation axis
304
- * @param direction direction of rotation axis
305
- * @param angle angle of rotation in rad
306
- * @param region region which will be revolved, defined by Polyline or THREE.Shape
307
- * @example
308
- * // Creates a closed polyline from three points and revolves it
309
- * const fp0 = { point: new THREE.Vector3(20, 20, 0), radius: 4 }
310
- * const fp1 = { point: new THREE.Vector3(40, 0, 0), radius: 2 }
311
- * const fp2 = { point: new THREE.Vector3(0, 0, 0), radius: 2 }
312
- * const polyline = createPolyline([fp0, fp1, fp2])
313
- * const revolveId = api.revolve([-10, 0, 0], [0, 1, 0], 2 * Math.PI, polyline)
314
- * const geom = await api.createBufferGeometry(revolveId)
315
- * const mesh = new THREE.Mesh(geom, new THREE.MeshStandardMaterial({}))
316
- * @image /doc/assets/solid/revolve.jpg
317
- */
318
- revolve: (position: Vec, direction: Vec, angle: number, region: Polyline | THREE.Shape) => ID;
319
- /**
320
- * Rotates the given solid.
321
- * @param solidId id of the solid to rotate
322
- * @param rotationVec vector of rotation around x-, y- and z-axis
323
- * @example
324
- * // Creates a box and rotates it around its x- and z-axis
325
- * const boxId = api.box(10, 10, 10)
326
- * api.rotateTo(boxId, [Math.PI / 4, 0, Math.PI / 4])
327
- * const geom = await api.createBufferGeometry(boxId)
328
- * const mesh = new THREE.Mesh(geom, new THREE.MeshStandardMaterial({}))
329
- * @image /doc/assets/solid/rotateTo.jpg
330
- */
331
- rotateTo: (solidId: VID, rotationVec: Vec) => Promise<void>;
332
- /**
333
- * Writes the current drawing as native file format to a stream and returns the data.
334
- * Native file is 'ofb', for 'stp' file format use export method.
335
- *
336
- * Important notes about the ofb format:
337
- * - It contains binary geometry blocks.
338
- * - Do not try to convert it to text, the geometry blocks will get damaged!
339
- *
340
- * @example
341
- * // Creates a rotated box and gets the ofb data.
342
- * const boxId = api.box(10, 10, 10)
343
- * api.rotateTo(boxId, [Math.PI / 4, 0, Math.PI / 4])
344
- * const data = api.save()
345
- *
346
- * @image // tbd
347
- */
348
- save: () => Promise<Uint8Array | null>;
349
- /**
350
- * Scales the solid in all or specified axis.
351
- * @param solidId id of the solid to scale
352
- * @param vectorOrFactor if factor is defined, the solid will be scaled in all direction with same scale value. Otherwise in the given x, y and z direction of the vector.
353
- * @example
354
- * // Creates a box and scales it in x-axis
355
- * const boxId = api.box(10, 10, 10)
356
- * api.scale(boxId, [2, 1, 1])
357
- * const geom = await api.createBufferGeometry(boxId)
358
- * const mesh = new THREE.Mesh(geom, new THREE.MeshStandardMaterial({}))
359
- * @image /doc/assets/solid/scale.jpg
360
- */
361
- scale: (solidId: VID, vectorOrFactor: Vec | number) => Promise<void>;
362
- /**
363
- * Sets the faceting parameters of graphic objects. This defines how detailed solids will be displayed.
364
- * @param distanceTol tolerated distance between theoretic and tesselated arc
365
- * @param angleTol tolerated angle between normal vectors of faces which build an arc
366
- * @example
367
- * // Creates a cylinder with low tessellation
368
- * api.setFacetingParams(0.5, 0)
369
- * const cylinderId = api.cylinder(50, 20)
370
- * const geom = await api.createBufferGeometry(cylinderId)
371
- * const mesh = new THREE.Mesh(geom, new THREE.MeshStandardMaterial({}))
372
- * @image /doc/assets/solid/setFacetingParams.jpg
373
- */
374
- setFacetingParams: (distanceTol: number, angleTol: number) => ID;
375
- /**
376
- * Slices the solid at specified plane. Part of solid which is on the positive side of defined plane will be removed.
377
- * @param solidId id of solid to slice
378
- * @param point position of plane
379
- * @param normal normal vector of plane
380
- * @example
381
- * // Creates a sphere and slice it
382
- * const sphereId = api.sphere(20)
383
- * api.slice(sphereId, [10, 10, 0], [1, 1, 0])
384
- * const geom = await api.createBufferGeometry(sphereId)
385
- * const mesh = new THREE.Mesh(geom, new THREE.MeshStandardMaterial({}))
386
- * @image /doc/assets/solid/slice.jpg
387
- */
388
- slice: (solidId: VID, point: Vec, normal: Vec) => Promise<void>;
389
- /**
390
- * Creates a simple sphere.
391
- * @param radius radius of the sphere
392
- * @example
393
- * // Creates a sphere with radius = 10
394
- * const sphereId = api.sphere(10)
395
- * const geom = await api.createBufferGeometry(sphereId)
396
- * const mesh = new THREE.Mesh( geom, new THREE.MeshStandardMaterial({}))
397
- * @image /doc/assets/solid/sphere.jpg
398
- */
399
- sphere: (radius: number) => ID;
400
- /**
401
- * Creates a subtraction between solid and bodies.
402
- * @param solidId id of the solid to subtract
403
- * @param keepSolid if true, the solid will be kept and can be used again
404
- * @param bodies bodies to subtract from the solid
405
- * @example
406
- * // Subtracts a box from sphere after
407
- * const sphereId = api.sphere(20)
408
- * const boxId = api.box(20, 20, 20)
409
- * api.moveTo(boxId, [10, 10, 10])
410
- * const subId = api.subtract(sphereId, false, boxId)
411
- * const geom = await api.createBufferGeometry(subId)
412
- * const mesh = new THREE.Mesh(geom, new THREE.MeshStandardMaterial({}))
413
- * @image /doc/assets/solid/subtract.jpg
414
- */
415
- subtract: (solidId: VID, keepSolid: boolean, ...bodies: VID[]) => ID;
416
- /**
417
- * Creates an union between solid and bodies.
418
- * @param solidId id of the solid to unify
419
- * @param keepSolid if true, the solid will be kept and can be used again
420
- * @param bodies bodies to unify with the solid
421
- * @example
422
- * // Unifies a sphere with a cone
423
- * const sphereId = api.sphere(20)
424
- * const coneId = api.cone(50, 40, 0)
425
- * api.moveTo(coneId, [0, 0, 25])
426
- * const unionId = api.union(sphereId, false, coneId)
427
- * const geom = await api.createBufferGeometry(unionId)
428
- * const mesh = new THREE.Mesh(geom, new THREE.MeshStandardMaterial({}))
429
- * @image /doc/assets/solid/union.jpg
430
- */
431
- union: (solidId: VID, keepSolid: boolean, ...bodies: VID[]) => ID;
432
- };
433
- /**
434
- * Creates a polyline from the given fillet points
435
- * @param fPts points of the polyline with its associated fillet radius
436
- * @example
437
- * // Creates a polyline with three points
438
- * const fp0 = { point: new THREE.Vector3(20, 20, 0), radius: 4 }
439
- * const fp1 = { point: new THREE.Vector3(40, 0, 0), radius: 2 }
440
- * const fp2 = { point: new THREE.Vector3(0, 0, 0), radius: 2 }
441
- * const polyline = createPolyline([fp0, fp1, fp2])
442
- */
443
- export declare function createPolyline(fPts: FilletPoint[]): Polyline;
444
- export default class CAD {
445
- drawingId: DrawingID | null;
446
- queue: Promise<number>;
447
- constructor();
448
- resolve(callback: (...results: any) => Promise<any>, ...args: any[]): Promise<any>;
449
- init(callback: (api: ApiNoHistory) => void): () => Promise<void>;
450
- destroy(): void;
451
- }
452
- declare type VID = ObjectID | Promise<ObjectID>;
453
- declare type VIDs = ObjectID[] | Promise<ObjectID[]>;
454
- declare type ID = Promise<ObjectID>;
455
- declare type IDs = Promise<ObjectID[]>;
456
- declare type Vec = number[] | THREE.Vector3 | THREE.Euler;
457
- /**
458
- * Point definition where the fillet will be added with a specified radius.
459
- */
460
- export declare type FilletPoint = {
461
- /** Point where the corner of the polyline will be. */
462
- point: Vector3;
463
- /** Radius of the fillet at the position of point. */
464
- radius: number;
465
- };
466
- /**
467
- * Polyline of points and bulges. Bulges define the arc between the current and the next point.
468
- */
469
- export declare type Polyline = {
470
- /** Points where the corners of the polyline will be. */
471
- points: Vector3[];
472
- /** Bulges which define the arcs. */
473
- bulges: number[];
474
- };
475
- export {};
1
+ import { BuerliState, DrawingID, DrawingState, ObjectID } from '@buerli.io/core';
2
+ import { BufferGeometry, Scene, Vector3 } from 'three';
3
+ /**
4
+ * A simple and intuitive javascript based api that incorporates solid operations like
5
+ * shapes, booleans (unions, subtracts, intersections), extrusions, revolves, blends,
6
+ * chamfers, slices, arrays, patterns, offsets, etc. The api is compatible with THREEJS
7
+ * and understands some of its primitives like curves and paths.
8
+ *
9
+ * ```sh
10
+ * npm install @buerli.io/headless
11
+ * ```
12
+ *
13
+ * ```js
14
+ * import { Solid } from '@buerli.io/headless'
15
+ * const cad = new Solid(url)
16
+ * cad.init(async api => {
17
+ * // Your code goes here
18
+ * })
19
+ * ```
20
+ */
21
+ export declare type ApiNoHistory = {
22
+ /**
23
+ * Returns the drawing id of the current headless-session
24
+ * @returns DrawingID
25
+ * @example
26
+ * const drawingId = api.getDrawingId()
27
+ */
28
+ getDrawingId: () => DrawingID;
29
+ /**
30
+ * Returns the drawing of the current headless-session
31
+ * @returns DrawingState
32
+ * @example
33
+ * const drawing = api.getDrawing()
34
+ * // Get all graphic containers
35
+ * const containers = Object.values(drawing.graphic.containers)
36
+ * containers.forEach(container => {
37
+ * // Get all surfaces
38
+ * const surfaces = container.meshes.map(mesh => mesh.properties.surface)
39
+ * // Filter non cylindric
40
+ * const cylinders = surfaces.filter(surface => surface.type === 'cylinder')
41
+ * // Check if all cylinders have a radius greater than 4
42
+ * cylinders.forEach(meta => expect(meta.radius).toBeGreaterThanOrEqual(4))
43
+ * })
44
+ */
45
+ getDrawing: () => DrawingState;
46
+ /**
47
+ * Returns the state tree of the current headless-session
48
+ * @returns BuerliState
49
+ * @example
50
+ * const state = api.getState()
51
+ */
52
+ getState: () => BuerliState;
53
+ /**
54
+ * Sets the global faceting parameters that will stick for this drawing.
55
+ * This defines how detailed solids will be displayed and can yield smaller payloads.
56
+ * @param distanceTol distance tolerance
57
+ * @param angleTol angle tolerance
58
+ * @returns void
59
+ * @example
60
+ * api.setFacetingParameters(0.1, 0)
61
+ */
62
+ setFacetingParameters: (distanceTol: number, angleTol: number) => Promise<void>;
63
+ /**
64
+ * Creates a simple box.
65
+ * @param length length of the box (x-axis)
66
+ * @param width width of the box (y-axis)
67
+ * @param height height of the box (z-axis)
68
+ * @example
69
+ * // Creates a box with length = 10, width = 25 and height = 15
70
+ * const boxId = api.box(10,25,15)
71
+ * const geom = await api.createBufferGeometry(boxId)
72
+ * const mesh = new THREE.Mesh( geom, new THREE.MeshStandardMaterial({}))
73
+ * @image /doc/assets/solid/box.jpg
74
+ */
75
+ box: (length: number, width: number, height: number) => ID;
76
+ /**
77
+ * Clears all existing solids in the drawing.
78
+ * @example
79
+ * // Clears all solids
80
+ * const boxId = api.box(10,25,15)
81
+ * const coneId = api.cone(50,20,10)
82
+ * api.clearSolids()
83
+ * @image // tbd
84
+ */
85
+ clearSolids: () => Promise<void>;
86
+ /**
87
+ * Clears the target solid in the drawing.
88
+ * @param solidId id of the solid to be deleted
89
+ * @example
90
+ * // Clear a specific solid
91
+ * const boxId = api.box(10,25,15)
92
+ * const coneId = api.cone(50,20,10)
93
+ * api.clearSolid(boxId)
94
+ * const geom = await api.createBufferGeometry(coneId)
95
+ * const mesh = new THREE.Mesh( geom, new THREE.MeshStandardMaterial({}))
96
+ * @image // tbd
97
+ */
98
+ clearSolid: (solidId: VID) => Promise<void>;
99
+ /**
100
+ * Creates a simple cone.
101
+ * @param height height of the cone (z-axis)
102
+ * @param diameter1 diameter at the bottom of the cone
103
+ * @param diameter2 diameter at the top of the cone
104
+ * @example
105
+ * // Creates a cone with height = 50, diameter1 = 20 and diameter2 = 10
106
+ * const coneId = api.cone(50,20,10)
107
+ * const geom = await api.createBufferGeometry(coneId)
108
+ * const mesh = new THREE.Mesh( geom, new THREE.MeshStandardMaterial({}))
109
+ * @image /doc/assets/solid/cone.jpg
110
+ */
111
+ cone: (height: number, diameter1: number, diameter2: number) => ID;
112
+ /**
113
+ * Creates a copy of the solid.
114
+ * @param solidId id of the solid to create a copy from
115
+ * @example
116
+ * // Creates a copy of a solid
117
+ * const coneId = api.cone(50,20,10)
118
+ * const copyId = api.copy(coneId)
119
+ * api.rotateTo(copyId, [Math.PI / 2, 0, 0])
120
+ * const unionId = api.union(coneId, false, copyId)
121
+ * const geom = await api.createBufferGeometry(unionId)
122
+ * const mesh = new THREE.Mesh( geom, new THREE.MeshStandardMaterial({}))
123
+ * @image /doc/assets/solid/copy.jpg
124
+ */
125
+ copy: (solidId: VID) => ID;
126
+ /**
127
+ * Creates the buffer geometry of the solid.
128
+ * @param solidId id of the solid to create buffer geometry from
129
+ * @example
130
+ * // Creates the buffer geometry
131
+ * const coneId = api.cone(50,20,10)
132
+ * const boxId = api.box(10,25,15)
133
+ * const unionId = api.union(coneId, false, boxId)
134
+ * const geom = await api.createBufferGeometry(coneId)
135
+ * const mesh = new THREE.Mesh( geom, new THREE.MeshStandardMaterial({}))
136
+ * @image // tbd
137
+ */
138
+ createBufferGeometry: (solidId: VID) => Promise<BufferGeometry | undefined>;
139
+ /**
140
+ * Creates ThreeJS scene from the given solids.
141
+ * @param solids ids of the solids to create scene from
142
+ * @param options optional object to define different settings.
143
+ * @param meshPerGeometry boolean flag to define if the solids will have a mesh for each geometry element
144
+ * or if the geometries will be combined to one mesh
145
+ * @example // tbd
146
+ * @image // tbd
147
+ */
148
+ createScene: (solids: VID[], options?: {
149
+ meshPerGeometry?: boolean;
150
+ }) => Promise<{
151
+ scene: Scene;
152
+ part: THREE.Group;
153
+ solids: THREE.Group[];
154
+ meshes: THREE.Mesh[];
155
+ }>;
156
+ /**
157
+ * Creates a simple cylinder.
158
+ * @param height height of the cylinder (z-axis)
159
+ * @param diameter diamter of the cylinder
160
+ * @example
161
+ * // Creates a cylinder with height = 50 and diameter = 10
162
+ * const cylinderId = api.cylinder(50,10)
163
+ * const geom = await api.createBufferGeometry(cylinderId)
164
+ * const mesh = new THREE.Mesh( geom, new THREE.MeshStandardMaterial({}))
165
+ * @image /doc/assets/solid/cylinder.jpg
166
+ */
167
+ cylinder: (height: number, diameter: number) => ID;
168
+ /**
169
+ * Returns all adjacent edges of a face or vertex
170
+ * @param breps face or vertex ids to get the adjacent edges from
171
+ * @example
172
+ * // Returns all edges from the top surface of box and adds a fillet on them
173
+ * const boxId = api.box(10, 25, 15)
174
+ * const surface = api.pick(boxId, 'face', [0, 0, 7.5])
175
+ * const edges = api.edgeLoops(surface)
176
+ * api.fillet(2, edges)
177
+ * const geom = await api.createBufferGeometry(boxId)
178
+ * const mesh = new THREE.Mesh(geom, new THREE.MeshStandardMaterial({}))
179
+ * @image /doc/assets/solid/edgeLoops.jpg
180
+ */
181
+ edgeLoops: (breps: VIDs) => IDs;
182
+ /**
183
+ * Writes the current solid or specific solids to a stream in stp data format
184
+ * and returns the data.
185
+ * @param solidIds [optional] specific solidIds to write to stream
186
+ * @example
187
+ * // Writes the unified solid to stream
188
+ * const coneId = api.cone(50,20,10)
189
+ * const boxId = api.box(10,25,15)
190
+ * const unionId = api.union(coneId, false, boxId)
191
+ * const data = api.export()
192
+ * const geom = await api.createBufferGeometry(coneId)
193
+ * const mesh = new THREE.Mesh( geom, new THREE.MeshStandardMaterial({}))
194
+ * @image // tbd
195
+ */
196
+ export: (solidIds?: VIDs) => Promise<Uint8Array | null>;
197
+ /**
198
+ * The solid is extended at the defined plane with a solid created by extruding the section defined by the plane.
199
+ * @param solidId id of the solid which will be extended
200
+ * @param point position of plane
201
+ * @param normal normal vector of plane
202
+ * @param distance distance of extension
203
+ * @example
204
+ * // Extends the sphere in its center
205
+ * const sphereId = api.sphere(10)
206
+ * api.extendSolidAtPlane(sphereId, [0, 0, 0], [0, 1, 1], 50)
207
+ * const geom = await api.createBufferGeometry(sphereId)
208
+ * const mesh = new THREE.Mesh(geom, new THREE.MeshStandardMaterial({}))
209
+ * @image /doc/assets/solid/extendSolidAtPlane.jpg
210
+ */
211
+ extendSolidAtPlane: (target: VID, point: Vec, normal: Vec, distance: number) => Promise<void>;
212
+ /**
213
+ * Creates an extrusion.
214
+ * @param height height of extrusion
215
+ * @param region region which will be extruded, defined by Polyline or THREE.Shape
216
+ * @example
217
+ * // Extrudes a heart from THREE shape
218
+ * const shape = new THREE.Shape()
219
+ * shape.moveTo(25, 25)
220
+ * shape.bezierCurveTo(25, 25, 20, 0, 0, 0)
221
+ * shape.bezierCurveTo(-30, 0, -30, 35, -30, 35)
222
+ * shape.bezierCurveTo(-30, 55, -10, 77, 25, 95)
223
+ * shape.bezierCurveTo(60, 77, 80, 55, 80, 35)
224
+ * shape.bezierCurveTo(80, 35, 80, 0, 50, 0)
225
+ * shape.bezierCurveTo(35, 0, 25, 25, 25, 25)
226
+ * const heartId = api.extrude([0, 0, 5], shape)
227
+ * api.rotateTo(heartId, [Math.PI, 0, 0])
228
+ * const geom = await api.createBufferGeometry(heartId)
229
+ * const mesh = new THREE.Mesh(geom, new THREE.MeshStandardMaterial({}))
230
+ * @image /doc/assets/solid/extrude.jpg
231
+ */
232
+ extrude: (height: Vec, region: Polyline | THREE.Shape) => ID;
233
+ /**
234
+ * Creates a fillet at the given edges
235
+ * @param radius radius of the fillet
236
+ * @param edges edges to create fillets on
237
+ * @example
238
+ * // Creates a fillet with radius = 2 at the given edge
239
+ * const boxId = api.box(10, 25, 15)
240
+ * const edge = api.pick(boxId, 'edge', [5, 0, 7.5])
241
+ * api.fillet(2, edge)
242
+ * const geom = await api.createBufferGeometry(boxId)
243
+ * const mesh = new THREE.Mesh(geom, new THREE.MeshStandardMaterial({}))
244
+ * @image /doc/assets/solid/fillet.jpg
245
+ */
246
+ fillet: (radius: number, edges: VIDs) => ID;
247
+ /**
248
+ * Loads an arraybuffer in stp file format. All solids existing
249
+ * in stp data will be returned in an array. Current drawing will not
250
+ * be overwritten, imports will just be added.
251
+ * @param data data as arraybuffer in stp format
252
+ * @example
253
+ * // Imports a stp file
254
+ * const importIds = await api.import(arraybuffer)
255
+ * const geom = await api.createBufferGeometry(importIds[0])
256
+ * const mesh = new THREE.Mesh(geom, new THREE.MeshStandardMaterial({}))
257
+ * @image // tbd
258
+ */
259
+ import: (data: ArrayBuffer) => IDs;
260
+ /**
261
+ * Creates an intersection between solid and bodies.
262
+ * @param solidId id of the solid to intersect
263
+ * @param keepSolid if true, the solid will be kept and can be used again
264
+ * @param bodies bodies to intersect with the solid
265
+ * @example
266
+ * // Creates an intersection between a sphere and a cylinder
267
+ * const sphereId = api.sphere(20)
268
+ * const cylinderId = api.cylinder(50, 30)
269
+ * const intersectId = api.intersect(sphereId, false, cylinderId)
270
+ * const geom = await api.createBufferGeometry(intersectId)
271
+ * const mesh = new THREE.Mesh(geom, new THREE.MeshStandardMaterial({}))
272
+ * @image /doc/assets/solid/intersect.jpg
273
+ */
274
+ intersect: (solidId: VID, keepSolid: boolean, ...bodies: VID[]) => ID;
275
+ /**
276
+ * Loads an arraybuffer in native file format. Native file format
277
+ * is 'ofb', if you want to load 'stp' file formats, use import function.
278
+ * Current drawing will be overwritten by loaded data.
279
+ * @param data data as arraybuffer in ofb format
280
+ * @example // tbd
281
+ * @image // tbd
282
+ */
283
+ load: (data: ArrayBuffer) => IDs;
284
+ /**
285
+ * Mirrors the solid at the specified plane.
286
+ * @param point position of the mirror plane
287
+ * @param normal normal vector of the mirror plane
288
+ * @example
289
+ * // Mirrors the cone at its bottom surface
290
+ * const coneId1 = api.cone(50, 20, 0)
291
+ * api.mirror(coneId1, [0, 0, -25], [0, 0, 1])
292
+ * const coneId2 = api.cone(50, 20, 0)
293
+ * const unionId = api.union(coneId1, false, coneId2)
294
+ * const geom = await api.createBufferGeometry(unionId)
295
+ * const mesh = new THREE.Mesh(geom, new THREE.MeshStandardMaterial({}))
296
+ * @image /doc/assets/solid/mirror.jpg
297
+ */
298
+ mirror: (solidId: VID, point: Vec, normal: Vec) => Promise<void>;
299
+ /**
300
+ * Moves the solid to the given position.
301
+ * @param solidId id of the solid which will be moved
302
+ * @param position position to move the solid to
303
+ * @example
304
+ * // Moves the second box to the first box's corner
305
+ * const boxId1 = api.box(20, 20, 20)
306
+ * const boxId2 = api.box(20, 20, 20)
307
+ * api.moveTo(boxId1, [10, 10, 10])
308
+ * const unionId = api.union(boxId1, false, boxId2)
309
+ * const geom = await api.createBufferGeometry(unionId)
310
+ * const mesh = new THREE.Mesh(geom, new THREE.MeshStandardMaterial({}))
311
+ * @image /doc/assets/solid/moveTo.jpg
312
+ */
313
+ moveTo: (solidId: VID, position: Vec) => Promise<void>;
314
+ /**
315
+ * Creates an offset of the solid.
316
+ * @param solidId solid which becomes an offset
317
+ * @param offsetDistance distance of offset
318
+ * @example
319
+ * // Creates an offset on the box
320
+ * const boxId1 = api.box(20, 20, 20)
321
+ * api.offset(boxId1, 2)
322
+ * const geom = await api.createBufferGeometry(boxId1)
323
+ * const mesh = new THREE.Mesh(geom, new THREE.MeshStandardMaterial({}))
324
+ * @image /doc/assets/solid/offset.jpg
325
+ */
326
+ offset: (solidId: VID, offsetDistance: number) => ID;
327
+ /**
328
+ * Returns all edges or faces depending on type which matches the points.
329
+ * @param solidId id of the solid to look for edges and faces
330
+ * @param type type of geometry to look for --> 'edge' or 'face'
331
+ * @param points points where edges and faces will be expected
332
+ * @example
333
+ * // Pick does look for an edge at point [5,0,7.5] and adds a fillet on it if found the edge
334
+ * const boxId = api.box(10, 25, 15)
335
+ * const edge = api.pick(boxId, 'edge', [5, 0, 7.5])
336
+ * api.fillet(2, edge)
337
+ * const geom = await api.createBufferGeometry(boxId)
338
+ * const mesh = new THREE.Mesh(geom, new THREE.MeshStandardMaterial({}))
339
+ * @image /doc/assets/solid/pick.jpg
340
+ */
341
+ pick: (solidId: VID, type: 'vertex' | 'edge' | 'face', ...points: Vec[]) => IDs;
342
+ /**
343
+ * Revolves the given region.
344
+ * @param position position of rotation axis
345
+ * @param direction direction of rotation axis
346
+ * @param angle angle of rotation in rad
347
+ * @param region region which will be revolved, defined by Polyline or THREE.Shape
348
+ * @example
349
+ * // Creates a closed polyline from three points and revolves it
350
+ * const fp0 = { point: new THREE.Vector3(20, 20, 0), radius: 4 }
351
+ * const fp1 = { point: new THREE.Vector3(40, 0, 0), radius: 2 }
352
+ * const fp2 = { point: new THREE.Vector3(0, 0, 0), radius: 2 }
353
+ * const polyline = createPolyline([fp0, fp1, fp2])
354
+ * const revolveId = api.revolve([-10, 0, 0], [0, 1, 0], 2 * Math.PI, polyline)
355
+ * const geom = await api.createBufferGeometry(revolveId)
356
+ * const mesh = new THREE.Mesh(geom, new THREE.MeshStandardMaterial({}))
357
+ * @image /doc/assets/solid/revolve.jpg
358
+ */
359
+ revolve: (position: Vec, direction: Vec, angle: number, region: Polyline | THREE.Shape) => ID;
360
+ /**
361
+ * Rotates the given solid.
362
+ * @param solidId id of the solid to rotate
363
+ * @param rotationVec vector of rotation around x-, y- and z-axis
364
+ * @example
365
+ * // Creates a box and rotates it around its x- and z-axis
366
+ * const boxId = api.box(10, 10, 10)
367
+ * api.rotateTo(boxId, [Math.PI / 4, 0, Math.PI / 4])
368
+ * const geom = await api.createBufferGeometry(boxId)
369
+ * const mesh = new THREE.Mesh(geom, new THREE.MeshStandardMaterial({}))
370
+ * @image /doc/assets/solid/rotateTo.jpg
371
+ */
372
+ rotateTo: (solidId: VID, rotationVec: Vec) => Promise<void>;
373
+ /**
374
+ * Writes the current drawing as native file format to a stream and returns the data.
375
+ * Native file is 'ofb', for 'stp' file format use export method.
376
+ *
377
+ * Important notes about the ofb format:
378
+ * - It contains binary geometry blocks.
379
+ * - Do not try to convert it to text, the geometry blocks will get damaged!
380
+ *
381
+ * @example
382
+ * // Creates a rotated box and gets the ofb data.
383
+ * const boxId = api.box(10, 10, 10)
384
+ * api.rotateTo(boxId, [Math.PI / 4, 0, Math.PI / 4])
385
+ * const data = api.save()
386
+ *
387
+ * @image // tbd
388
+ */
389
+ save: () => Promise<Uint8Array | null>;
390
+ /**
391
+ * Scales the solid in all or specified axis.
392
+ * @param solidId id of the solid to scale
393
+ * @param vectorOrFactor if factor is defined, the solid will be scaled in all direction with same scale value. Otherwise in the given x, y and z direction of the vector.
394
+ * @example
395
+ * // Creates a box and scales it in x-axis
396
+ * const boxId = api.box(10, 10, 10)
397
+ * api.scale(boxId, [2, 1, 1])
398
+ * const geom = await api.createBufferGeometry(boxId)
399
+ * const mesh = new THREE.Mesh(geom, new THREE.MeshStandardMaterial({}))
400
+ * @image /doc/assets/solid/scale.jpg
401
+ */
402
+ scale: (solidId: VID, vectorOrFactor: Vec | number) => Promise<void>;
403
+ /**
404
+ * Sets the faceting parameters of graphic objects. This defines how detailed solids will be displayed.
405
+ * @param distanceTol tolerated distance between theoretic and tesselated arc
406
+ * @param angleTol tolerated angle between normal vectors of faces which build an arc
407
+ * @example
408
+ * // Creates a cylinder with low tessellation
409
+ * api.setFacetingParams(0.5, 0)
410
+ * const cylinderId = api.cylinder(50, 20)
411
+ * const geom = await api.createBufferGeometry(cylinderId)
412
+ * const mesh = new THREE.Mesh(geom, new THREE.MeshStandardMaterial({}))
413
+ * @image /doc/assets/solid/setFacetingParams.jpg
414
+ */
415
+ setFacetingParams: (distanceTol: number, angleTol: number) => ID;
416
+ /**
417
+ * Slices the solid at specified plane. Part of solid which is on the positive side of defined plane will be removed.
418
+ * @param solidId id of solid to slice
419
+ * @param point position of plane
420
+ * @param normal normal vector of plane
421
+ * @example
422
+ * // Creates a sphere and slice it
423
+ * const sphereId = api.sphere(20)
424
+ * api.slice(sphereId, [10, 10, 0], [1, 1, 0])
425
+ * const geom = await api.createBufferGeometry(sphereId)
426
+ * const mesh = new THREE.Mesh(geom, new THREE.MeshStandardMaterial({}))
427
+ * @image /doc/assets/solid/slice.jpg
428
+ */
429
+ slice: (solidId: VID, point: Vec, normal: Vec) => Promise<void>;
430
+ /**
431
+ * Creates a simple sphere.
432
+ * @param radius radius of the sphere
433
+ * @example
434
+ * // Creates a sphere with radius = 10
435
+ * const sphereId = api.sphere(10)
436
+ * const geom = await api.createBufferGeometry(sphereId)
437
+ * const mesh = new THREE.Mesh( geom, new THREE.MeshStandardMaterial({}))
438
+ * @image /doc/assets/solid/sphere.jpg
439
+ */
440
+ sphere: (radius: number) => ID;
441
+ /**
442
+ * Creates a subtraction between solid and bodies.
443
+ * @param solidId id of the solid to subtract
444
+ * @param keepSolid if true, the solid will be kept and can be used again
445
+ * @param bodies bodies to subtract from the solid
446
+ * @example
447
+ * // Subtracts a box from sphere after
448
+ * const sphereId = api.sphere(20)
449
+ * const boxId = api.box(20, 20, 20)
450
+ * api.moveTo(boxId, [10, 10, 10])
451
+ * const subId = api.subtract(sphereId, false, boxId)
452
+ * const geom = await api.createBufferGeometry(subId)
453
+ * const mesh = new THREE.Mesh(geom, new THREE.MeshStandardMaterial({}))
454
+ * @image /doc/assets/solid/subtract.jpg
455
+ */
456
+ subtract: (solidId: VID, keepSolid: boolean, ...bodies: VID[]) => ID;
457
+ /**
458
+ * Creates an union between solid and bodies.
459
+ * @param solidId id of the solid to unify
460
+ * @param keepSolid if true, the solid will be kept and can be used again
461
+ * @param bodies bodies to unify with the solid
462
+ * @example
463
+ * // Unifies a sphere with a cone
464
+ * const sphereId = api.sphere(20)
465
+ * const coneId = api.cone(50, 40, 0)
466
+ * api.moveTo(coneId, [0, 0, 25])
467
+ * const unionId = api.union(sphereId, false, coneId)
468
+ * const geom = await api.createBufferGeometry(unionId)
469
+ * const mesh = new THREE.Mesh(geom, new THREE.MeshStandardMaterial({}))
470
+ * @image /doc/assets/solid/union.jpg
471
+ */
472
+ union: (solidId: VID, keepSolid: boolean, ...bodies: VID[]) => ID;
473
+ };
474
+ /**
475
+ * Creates a polyline from the given fillet points
476
+ * @param fPts points of the polyline with its associated fillet radius
477
+ * @example
478
+ * // Creates a polyline with three points
479
+ * const fp0 = { point: new THREE.Vector3(20, 20, 0), radius: 4 }
480
+ * const fp1 = { point: new THREE.Vector3(40, 0, 0), radius: 2 }
481
+ * const fp2 = { point: new THREE.Vector3(0, 0, 0), radius: 2 }
482
+ * const polyline = createPolyline([fp0, fp1, fp2])
483
+ */
484
+ export declare function createPolyline(fPts: FilletPoint[]): Polyline;
485
+ export declare class Solid {
486
+ drawingId: DrawingID | null;
487
+ queue: Promise<number>;
488
+ constructor();
489
+ resolve(callback: (...results: any) => Promise<any>, ...args: any[]): Promise<any>;
490
+ init(callback: (api: ApiNoHistory) => void): () => Promise<void>;
491
+ destroy(): void;
492
+ }
493
+ export declare class solid extends Solid {
494
+ constructor();
495
+ }
496
+ declare type VID = ObjectID | Promise<ObjectID>;
497
+ declare type VIDs = ObjectID[] | Promise<ObjectID[]>;
498
+ declare type ID = Promise<ObjectID>;
499
+ declare type IDs = Promise<ObjectID[]>;
500
+ declare type Vec = number[] | THREE.Vector3 | THREE.Euler;
501
+ /**
502
+ * Point definition where the fillet will be added with a specified radius.
503
+ */
504
+ export declare type FilletPoint = {
505
+ /** Point where the corner of the polyline will be. */
506
+ point: Vector3;
507
+ /** Radius of the fillet at the position of point. */
508
+ radius: number;
509
+ };
510
+ /**
511
+ * Polyline of points and bulges. Bulges define the arc between the current and the next point.
512
+ */
513
+ export declare type Polyline = {
514
+ /** Points where the corners of the polyline will be. */
515
+ points: Vector3[];
516
+ /** Bulges which define the arcs. */
517
+ bulges: number[];
518
+ };
519
+ export {};