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