@bitbybit-dev/base 1.3.2 → 1.4.0-rc.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.
Files changed (77) hide show
  1. package/README.md +1 -1
  2. package/lib/api/GlobalCDNProvider.js +1 -1
  3. package/lib/api/index.d.ts +2 -0
  4. package/lib/api/index.js +2 -0
  5. package/lib/api/inputs/base-inputs.d.ts +10 -4
  6. package/lib/api/inputs/color-inputs.d.ts +24 -23
  7. package/lib/api/inputs/color-inputs.js +1 -0
  8. package/lib/api/inputs/dates-inputs.d.ts +16 -16
  9. package/lib/api/inputs/frame-inputs.d.ts +515 -0
  10. package/lib/api/inputs/frame-inputs.js +617 -0
  11. package/lib/api/inputs/index.d.ts +1 -0
  12. package/lib/api/inputs/index.js +1 -0
  13. package/lib/api/inputs/io-inputs.d.ts +3 -3
  14. package/lib/api/inputs/io-inputs.js +1 -1
  15. package/lib/api/inputs/lists-inputs.d.ts +23 -23
  16. package/lib/api/inputs/logic-inputs.d.ts +11 -11
  17. package/lib/api/inputs/math-inputs.d.ts +49 -49
  18. package/lib/api/inputs/math-inputs.js +4 -4
  19. package/lib/api/inputs/mesh-inputs.d.ts +3 -3
  20. package/lib/api/inputs/mesh-inputs.js +3 -3
  21. package/lib/api/inputs/point-inputs.d.ts +39 -38
  22. package/lib/api/inputs/point-inputs.js +6 -5
  23. package/lib/api/inputs/polyline-inputs.d.ts +5 -4
  24. package/lib/api/inputs/polyline-inputs.js +3 -3
  25. package/lib/api/inputs/text-inputs.d.ts +34 -33
  26. package/lib/api/inputs/text-inputs.js +15 -12
  27. package/lib/api/inputs/transforms-inputs.d.ts +16 -16
  28. package/lib/api/inputs/vector-inputs.d.ts +26 -25
  29. package/lib/api/inputs/vector-inputs.js +2 -1
  30. package/lib/api/kernel-calls/call-by-path.d.ts +12 -0
  31. package/lib/api/kernel-calls/call-by-path.js +36 -0
  32. package/lib/api/kernel-calls/constraints.d.ts +53 -0
  33. package/lib/api/kernel-calls/constraints.js +21 -0
  34. package/lib/api/kernel-calls/describe-failure.d.ts +32 -0
  35. package/lib/api/kernel-calls/describe-failure.js +164 -0
  36. package/lib/api/kernel-calls/errors.d.ts +55 -0
  37. package/lib/api/kernel-calls/errors.js +42 -0
  38. package/lib/api/kernel-calls/failure-message.d.ts +18 -0
  39. package/lib/api/kernel-calls/failure-message.js +36 -0
  40. package/lib/api/kernel-calls/index.d.ts +10 -0
  41. package/lib/api/kernel-calls/index.js +10 -0
  42. package/lib/api/kernel-calls/input-rules.d.ts +67 -0
  43. package/lib/api/kernel-calls/input-rules.js +135 -0
  44. package/lib/api/kernel-calls/input-validation.d.ts +130 -0
  45. package/lib/api/kernel-calls/input-validation.js +221 -0
  46. package/lib/api/kernel-calls/rehydrate.d.ts +16 -0
  47. package/lib/api/kernel-calls/rehydrate.js +38 -0
  48. package/lib/api/kernel-calls/resolve-dto.d.ts +59 -0
  49. package/lib/api/kernel-calls/resolve-dto.js +61 -0
  50. package/lib/api/kernel-calls/with-defaults.d.ts +16 -0
  51. package/lib/api/kernel-calls/with-defaults.js +53 -0
  52. package/lib/api/resolved-inputs/index.d.ts +304 -0
  53. package/lib/api/resolved-inputs/index.js +1 -0
  54. package/lib/api/services/color.js +43 -26
  55. package/lib/api/services/dates.js +53 -33
  56. package/lib/api/services/frame.d.ts +670 -0
  57. package/lib/api/services/frame.js +1040 -0
  58. package/lib/api/services/helpers/dxf/dxf-generator.d.ts +2 -3
  59. package/lib/api/services/helpers/dxf/dxf-generator.js +27 -37
  60. package/lib/api/services/helpers/dxf/dxf.js +10 -4
  61. package/lib/api/services/helpers/frame-axes.d.ts +36 -0
  62. package/lib/api/services/helpers/frame-axes.js +57 -0
  63. package/lib/api/services/helpers/matrices.d.ts +17 -0
  64. package/lib/api/services/helpers/matrices.js +51 -0
  65. package/lib/api/services/index.d.ts +1 -0
  66. package/lib/api/services/index.js +1 -0
  67. package/lib/api/services/line.js +15 -12
  68. package/lib/api/services/lists.js +174 -136
  69. package/lib/api/services/logic.js +44 -34
  70. package/lib/api/services/math.js +127 -82
  71. package/lib/api/services/mesh.js +20 -13
  72. package/lib/api/services/point.js +62 -46
  73. package/lib/api/services/polyline.js +22 -18
  74. package/lib/api/services/text.js +81 -46
  75. package/lib/api/services/transforms.js +38 -25
  76. package/lib/api/services/vector.js +37 -22
  77. package/package.json +1 -1
@@ -0,0 +1,617 @@
1
+ /**
2
+ * Parameters for frames: the origin, normal and direction a frame is built from, the frames, points
3
+ * and vectors converted between a frame and the world, and the counts and spacings of frame
4
+ * patterns. A frame is a point with three axes at right angles, and it places things.
5
+ */
6
+ export var Frame;
7
+ (function (Frame) {
8
+ /**
9
+ * One of a frame's own axes: `x` runs along its `direction`, `z` along its `normal` and `y`
10
+ * across both. Used by `frame.rotate`.
11
+ */
12
+ let frameAxisEnum;
13
+ (function (frameAxisEnum) {
14
+ frameAxisEnum["x"] = "x";
15
+ frameAxisEnum["y"] = "y";
16
+ frameAxisEnum["z"] = "z";
17
+ })(frameAxisEnum = Frame.frameAxisEnum || (Frame.frameAxisEnum = {}));
18
+ /**
19
+ * Where `frame.create` puts a frame, where its Z axis points and roughly where its X axis
20
+ * points; the X axis is turned square to the normal.
21
+ */
22
+ class CreateFrameDto {
23
+ constructor(origin, normal, direction) {
24
+ /**
25
+ * Where the frame sits.
26
+ * @default [0, 0, 0]
27
+ */
28
+ this.origin = [0, 0, 0];
29
+ /**
30
+ * Where the Z axis points; any length but zero.
31
+ * @default [0, 0, 1]
32
+ */
33
+ this.normal = [0, 0, 1];
34
+ /**
35
+ * Roughly where the X axis points. It is turned square to `normal`, so it only must not run
36
+ * along it.
37
+ * @default [1, 0, 0]
38
+ */
39
+ this.direction = [1, 0, 0];
40
+ if (origin !== undefined) {
41
+ this.origin = origin;
42
+ }
43
+ if (normal !== undefined) {
44
+ this.normal = normal;
45
+ }
46
+ if (direction !== undefined) {
47
+ this.direction = direction;
48
+ }
49
+ }
50
+ }
51
+ Frame.CreateFrameDto = CreateFrameDto;
52
+ /**
53
+ * Where `frame.xy`, `frame.yz` and `frame.zx` put the frame they build; each of them fixes
54
+ * the axes itself.
55
+ */
56
+ class OriginDto {
57
+ constructor(origin) {
58
+ /**
59
+ * Where the frame sits.
60
+ * @default [0, 0, 0]
61
+ */
62
+ this.origin = [0, 0, 0];
63
+ if (origin !== undefined) {
64
+ this.origin = origin;
65
+ }
66
+ }
67
+ }
68
+ Frame.OriginDto = OriginDto;
69
+ /**
70
+ * The three points `frame.fromThreePoints` builds a frame from: its origin, a point its X axis
71
+ * runs toward and a point on the side its Y axis points to.
72
+ */
73
+ class ThreePointsDto {
74
+ constructor(origin, xPoint, planePoint) {
75
+ /**
76
+ * Where the frame sits.
77
+ * @default [0, 0, 0]
78
+ */
79
+ this.origin = [0, 0, 0];
80
+ /**
81
+ * A point the X axis runs toward from `origin`.
82
+ * @default [1, 0, 0]
83
+ */
84
+ this.xPoint = [1, 0, 0];
85
+ /**
86
+ * A third point in the plane, on the side the Y axis points to; it must not lie on the line
87
+ * through the other two.
88
+ * @default [0, 1, 0]
89
+ */
90
+ this.planePoint = [0, 1, 0];
91
+ if (origin !== undefined) {
92
+ this.origin = origin;
93
+ }
94
+ if (xPoint !== undefined) {
95
+ this.xPoint = xPoint;
96
+ }
97
+ if (planePoint !== undefined) {
98
+ this.planePoint = planePoint;
99
+ }
100
+ }
101
+ }
102
+ Frame.ThreePointsDto = ThreePointsDto;
103
+ /**
104
+ * A point and a normal for `frame.fromPointAndNormal`, which picks the X axis by a fixed rule,
105
+ * so the same normal always gives the same frame.
106
+ */
107
+ class PointAndNormalDto {
108
+ constructor(origin, normal) {
109
+ /**
110
+ * Where the frame sits.
111
+ * @default [0, 0, 0]
112
+ */
113
+ this.origin = [0, 0, 0];
114
+ /**
115
+ * Where the Z axis points; any length but zero.
116
+ * @default [0, 0, 1]
117
+ */
118
+ this.normal = [0, 0, 1];
119
+ if (origin !== undefined) {
120
+ this.origin = origin;
121
+ }
122
+ if (normal !== undefined) {
123
+ this.normal = normal;
124
+ }
125
+ }
126
+ }
127
+ Frame.PointAndNormalDto = PointAndNormalDto;
128
+ /**
129
+ * The points `frame.bestFit` fits a plane through: at least three, not all on one line.
130
+ */
131
+ class BestFitDto {
132
+ constructor(points) {
133
+ if (points !== undefined) {
134
+ this.points = points;
135
+ }
136
+ }
137
+ }
138
+ Frame.BestFitDto = BestFitDto;
139
+ /**
140
+ * One frame, for the methods that read a frame or turn it over: `frame.origin`, `frame.normal`,
141
+ * `frame.direction`, `frame.yDirection`, `frame.flip` and `frame.toMatrix`.
142
+ */
143
+ class FrameDto {
144
+ constructor(frame) {
145
+ if (frame !== undefined) {
146
+ this.frame = frame;
147
+ }
148
+ }
149
+ }
150
+ Frame.FrameDto = FrameDto;
151
+ /**
152
+ * A list of frames for `frame.flipFrames`, which turns every one of them over.
153
+ */
154
+ class FramesDto {
155
+ constructor(frames) {
156
+ if (frames !== undefined) {
157
+ this.frames = frames;
158
+ }
159
+ }
160
+ }
161
+ Frame.FramesDto = FramesDto;
162
+ /**
163
+ * The vector `frame.translate` and `frame.translateFrames` move frames by; their axes keep
164
+ * their directions.
165
+ */
166
+ class TranslateSharedDto {
167
+ constructor() {
168
+ /**
169
+ * How far to move each origin, in world coordinates and model units.
170
+ * @default [0, 0, 0]
171
+ */
172
+ this.translation = [0, 0, 0];
173
+ }
174
+ }
175
+ Frame.TranslateSharedDto = TranslateSharedDto;
176
+ /**
177
+ * A frame and the vector `frame.translate` moves it by; its axes keep their directions.
178
+ */
179
+ class TranslateDto extends TranslateSharedDto {
180
+ constructor(frame, translation) {
181
+ super();
182
+ if (frame !== undefined) {
183
+ this.frame = frame;
184
+ }
185
+ if (translation !== undefined) {
186
+ this.translation = translation;
187
+ }
188
+ }
189
+ }
190
+ Frame.TranslateDto = TranslateDto;
191
+ /**
192
+ * Frames and the one vector `frame.translateFrames` moves them all by; their axes keep their
193
+ * directions.
194
+ */
195
+ class TranslateFramesDto extends TranslateSharedDto {
196
+ constructor(frames, translation) {
197
+ super();
198
+ if (frames !== undefined) {
199
+ this.frames = frames;
200
+ }
201
+ if (translation !== undefined) {
202
+ this.translation = translation;
203
+ }
204
+ }
205
+ }
206
+ Frame.TranslateFramesDto = TranslateFramesDto;
207
+ /**
208
+ * The distance `frame.offset` and `frame.offsetFrames` move frames along their own normals;
209
+ * their axes keep their directions.
210
+ */
211
+ class OffsetSharedDto {
212
+ constructor() {
213
+ /**
214
+ * How far to move each frame along its normal, in model units; a negative distance moves
215
+ * against it.
216
+ * @default 1
217
+ * @minimum -Infinity
218
+ * @maximum Infinity
219
+ * @step 0.1
220
+ */
221
+ this.distance = 1;
222
+ }
223
+ }
224
+ Frame.OffsetSharedDto = OffsetSharedDto;
225
+ /**
226
+ * A frame and the distance `frame.offset` moves it along its own normal; its axes keep their
227
+ * directions.
228
+ */
229
+ class OffsetDto extends OffsetSharedDto {
230
+ constructor(frame, distance) {
231
+ super();
232
+ if (frame !== undefined) {
233
+ this.frame = frame;
234
+ }
235
+ if (distance !== undefined) {
236
+ this.distance = distance;
237
+ }
238
+ }
239
+ }
240
+ Frame.OffsetDto = OffsetDto;
241
+ /**
242
+ * Frames and the distance `frame.offsetFrames` moves each along its own normal; their axes keep
243
+ * their directions.
244
+ */
245
+ class OffsetFramesDto extends OffsetSharedDto {
246
+ constructor(frames, distance) {
247
+ super();
248
+ if (frames !== undefined) {
249
+ this.frames = frames;
250
+ }
251
+ if (distance !== undefined) {
252
+ this.distance = distance;
253
+ }
254
+ }
255
+ }
256
+ Frame.OffsetFramesDto = OffsetFramesDto;
257
+ /**
258
+ * One of a frame's own axes and the angle `frame.rotate` and `frame.rotateFrames` turn frames
259
+ * by about it, through each frame's origin.
260
+ */
261
+ class RotateSharedDto {
262
+ constructor() {
263
+ /**
264
+ * Which of each frame's own axes to turn about.
265
+ * @default z
266
+ */
267
+ this.axis = frameAxisEnum.z;
268
+ /**
269
+ * How far to turn, in degrees; positive is counter-clockwise when the axis points toward
270
+ * you.
271
+ * @default 90
272
+ * @minimum -Infinity
273
+ * @maximum Infinity
274
+ * @step 1
275
+ */
276
+ this.angle = 90;
277
+ }
278
+ }
279
+ Frame.RotateSharedDto = RotateSharedDto;
280
+ /**
281
+ * A frame, one of its own axes and the angle `frame.rotate` turns it by about that axis,
282
+ * through its origin.
283
+ */
284
+ class RotateDto extends RotateSharedDto {
285
+ constructor(frame, axis, angle) {
286
+ super();
287
+ if (frame !== undefined) {
288
+ this.frame = frame;
289
+ }
290
+ if (axis !== undefined) {
291
+ this.axis = axis;
292
+ }
293
+ if (angle !== undefined) {
294
+ this.angle = angle;
295
+ }
296
+ }
297
+ }
298
+ Frame.RotateDto = RotateDto;
299
+ /**
300
+ * Frames, one of their own axes and the angle `frame.rotateFrames` turns each by about that
301
+ * axis, through its own origin.
302
+ */
303
+ class RotateFramesDto extends RotateSharedDto {
304
+ constructor(frames, axis, angle) {
305
+ super();
306
+ if (frames !== undefined) {
307
+ this.frames = frames;
308
+ }
309
+ if (axis !== undefined) {
310
+ this.axis = axis;
311
+ }
312
+ if (angle !== undefined) {
313
+ this.angle = angle;
314
+ }
315
+ }
316
+ }
317
+ Frame.RotateFramesDto = RotateFramesDto;
318
+ /**
319
+ * The parent frame whose coordinates `frame.frameToWorld`, `frame.frameToLocal`,
320
+ * `frame.framesToWorld` and `frame.framesToLocal` read frames in.
321
+ */
322
+ class ChildFrameSharedDto {
323
+ }
324
+ Frame.ChildFrameSharedDto = ChildFrameSharedDto;
325
+ /**
326
+ * Two frames for `frame.frameToWorld` and `frame.frameToLocal`: the `child` to convert, and the
327
+ * `parent` whose coordinates are used.
328
+ */
329
+ class ChildFrameDto extends ChildFrameSharedDto {
330
+ constructor(child, parent) {
331
+ super();
332
+ if (child !== undefined) {
333
+ this.child = child;
334
+ }
335
+ if (parent !== undefined) {
336
+ this.parent = parent;
337
+ }
338
+ }
339
+ }
340
+ Frame.ChildFrameDto = ChildFrameDto;
341
+ /**
342
+ * Frames and one parent frame for `frame.framesToWorld` and `frame.framesToLocal`, which convert
343
+ * every frame between the parent's coordinates and world coordinates.
344
+ */
345
+ class ChildFramesDto extends ChildFrameSharedDto {
346
+ constructor(children, parent) {
347
+ super();
348
+ if (children !== undefined) {
349
+ this.children = children;
350
+ }
351
+ if (parent !== undefined) {
352
+ this.parent = parent;
353
+ }
354
+ }
355
+ }
356
+ Frame.ChildFramesDto = ChildFramesDto;
357
+ /**
358
+ * A frame and one point for `frame.pointToWorld` and `frame.pointToLocal`, which convert the
359
+ * point between the frame's coordinates and world coordinates.
360
+ */
361
+ class FramePointDto {
362
+ constructor(frame, point) {
363
+ if (frame !== undefined) {
364
+ this.frame = frame;
365
+ }
366
+ if (point !== undefined) {
367
+ this.point = point;
368
+ }
369
+ }
370
+ }
371
+ Frame.FramePointDto = FramePointDto;
372
+ /**
373
+ * A frame and a list of points for `frame.pointsToWorld` and `frame.pointsToLocal`, which
374
+ * convert every point between the frame's coordinates and world coordinates.
375
+ */
376
+ class FramePointsDto {
377
+ constructor(frame, points) {
378
+ if (frame !== undefined) {
379
+ this.frame = frame;
380
+ }
381
+ if (points !== undefined) {
382
+ this.points = points;
383
+ }
384
+ }
385
+ }
386
+ Frame.FramePointsDto = FramePointsDto;
387
+ /**
388
+ * A frame and a vector for `frame.vectorToWorld` and `frame.vectorToLocal`, which turn the
389
+ * vector between the frame's axes and the world axes without moving it.
390
+ */
391
+ class FrameVectorDto {
392
+ constructor(frame, vector) {
393
+ if (frame !== undefined) {
394
+ this.frame = frame;
395
+ }
396
+ if (vector !== undefined) {
397
+ this.vector = vector;
398
+ }
399
+ }
400
+ }
401
+ Frame.FrameVectorDto = FrameVectorDto;
402
+ /**
403
+ * The transformation `frame.fromMatrix` reads a frame from: where it moves the world origin and
404
+ * where it turns the world X and Z axes.
405
+ */
406
+ class TransformationDto {
407
+ constructor(transformation) {
408
+ if (transformation !== undefined) {
409
+ this.transformation = transformation;
410
+ }
411
+ }
412
+ }
413
+ Frame.TransformationDto = TransformationDto;
414
+ /**
415
+ * Two frames for `frame.matrixFromTo`, whose transformation carries anything placed on `from`
416
+ * onto `to`, turning it the same way.
417
+ */
418
+ class FromToDto {
419
+ constructor(to, from) {
420
+ if (to !== undefined) {
421
+ this.to = to;
422
+ }
423
+ if (from !== undefined) {
424
+ this.from = from;
425
+ }
426
+ }
427
+ }
428
+ Frame.FromToDto = FromToDto;
429
+ /**
430
+ * The counts and spacings of the grid of frames `frame.grid` lays out in the plane of `frame`,
431
+ * each turned the same way as `frame`.
432
+ */
433
+ class GridDto {
434
+ constructor(frame, countX, countY, spacingX, spacingY, centered) {
435
+ /**
436
+ * How many frames along the X axis.
437
+ * @default 3
438
+ * @minimum 1
439
+ * @maximum Infinity
440
+ * @step 1
441
+ */
442
+ this.countX = 3;
443
+ /**
444
+ * How many frames along the Y axis.
445
+ * @default 3
446
+ * @minimum 1
447
+ * @maximum Infinity
448
+ * @step 1
449
+ */
450
+ this.countY = 3;
451
+ /**
452
+ * The distance between neighbours along the X axis, in model units.
453
+ * @default 2
454
+ * @minimum -Infinity
455
+ * @maximum Infinity
456
+ * @step 0.1
457
+ */
458
+ this.spacingX = 2;
459
+ /**
460
+ * The distance between neighbours along the Y axis, in model units.
461
+ * @default 2
462
+ * @minimum -Infinity
463
+ * @maximum Infinity
464
+ * @step 0.1
465
+ */
466
+ this.spacingY = 2;
467
+ /**
468
+ * When true the grid is centered on the frame's origin; otherwise it starts there and runs
469
+ * along the X and Y axes.
470
+ * @default false
471
+ */
472
+ this.centered = false;
473
+ if (frame !== undefined) {
474
+ this.frame = frame;
475
+ }
476
+ if (countX !== undefined) {
477
+ this.countX = countX;
478
+ }
479
+ if (countY !== undefined) {
480
+ this.countY = countY;
481
+ }
482
+ if (spacingX !== undefined) {
483
+ this.spacingX = spacingX;
484
+ }
485
+ if (spacingY !== undefined) {
486
+ this.spacingY = spacingY;
487
+ }
488
+ if (centered !== undefined) {
489
+ this.centered = centered;
490
+ }
491
+ }
492
+ }
493
+ Frame.GridDto = GridDto;
494
+ /**
495
+ * The count, radius and sweep of the ring of frames `frame.polar` lays out around the normal of
496
+ * `frame`, in its plane.
497
+ */
498
+ class PolarDto {
499
+ constructor(frame, count, radius, angle, startAngle, rotate) {
500
+ /**
501
+ * How many frames in the ring.
502
+ * @default 6
503
+ * @minimum 1
504
+ * @maximum Infinity
505
+ * @step 1
506
+ */
507
+ this.count = 6;
508
+ /**
509
+ * The distance from the center to each frame, in model units; at 0 the frames only turn
510
+ * in place.
511
+ * @default 3
512
+ * @minimum 0
513
+ * @maximum Infinity
514
+ * @step 0.1
515
+ */
516
+ this.radius = 3;
517
+ /**
518
+ * The angle the ring covers, in degrees, from -360 to 360. A full turn spaces the frames
519
+ * evenly without repeating the first; a smaller angle puts one at each end.
520
+ * @default 360
521
+ * @minimum -360
522
+ * @maximum 360
523
+ * @step 1
524
+ */
525
+ this.angle = 360;
526
+ /**
527
+ * The angle of the first frame, in degrees from the X axis toward the Y axis.
528
+ * @default 0
529
+ * @minimum -Infinity
530
+ * @maximum Infinity
531
+ * @step 1
532
+ */
533
+ this.startAngle = 0;
534
+ /**
535
+ * When true the frames rotate with the ring, as copies around a hub do; otherwise every frame
536
+ * keeps the axes of `frame`.
537
+ * @default true
538
+ */
539
+ this.rotate = true;
540
+ if (frame !== undefined) {
541
+ this.frame = frame;
542
+ }
543
+ if (count !== undefined) {
544
+ this.count = count;
545
+ }
546
+ if (radius !== undefined) {
547
+ this.radius = radius;
548
+ }
549
+ if (angle !== undefined) {
550
+ this.angle = angle;
551
+ }
552
+ if (startAngle !== undefined) {
553
+ this.startAngle = startAngle;
554
+ }
555
+ if (rotate !== undefined) {
556
+ this.rotate = rotate;
557
+ }
558
+ }
559
+ }
560
+ Frame.PolarDto = PolarDto;
561
+ /**
562
+ * The counts and hexagon size of the honeycomb `frame.hexGrid` lays out in the plane of
563
+ * `frame`: one frame at the center of each hexagon, turned the same way as `frame`.
564
+ */
565
+ class HexGridDto {
566
+ constructor(frame, countX, countY, radius, centered) {
567
+ /**
568
+ * How many hexagons in each row, along the X axis.
569
+ * @default 3
570
+ * @minimum 1
571
+ * @maximum Infinity
572
+ * @step 1
573
+ */
574
+ this.countX = 3;
575
+ /**
576
+ * How many rows, along the Y axis; every second row is shifted by half a hexagon.
577
+ * @default 3
578
+ * @minimum 1
579
+ * @maximum Infinity
580
+ * @step 1
581
+ */
582
+ this.countY = 3;
583
+ /**
584
+ * The distance from a hexagon's center to one of its corners, in model units; two corners
585
+ * lie on the frame's Y axis.
586
+ * @default 1
587
+ * @minimum 0
588
+ * @exclusiveMinimum true
589
+ * @maximum Infinity
590
+ * @step 0.1
591
+ */
592
+ this.radius = 1;
593
+ /**
594
+ * When true the honeycomb is centered on the frame's origin; otherwise its first hexagon
595
+ * sits there.
596
+ * @default false
597
+ */
598
+ this.centered = false;
599
+ if (frame !== undefined) {
600
+ this.frame = frame;
601
+ }
602
+ if (countX !== undefined) {
603
+ this.countX = countX;
604
+ }
605
+ if (countY !== undefined) {
606
+ this.countY = countY;
607
+ }
608
+ if (radius !== undefined) {
609
+ this.radius = radius;
610
+ }
611
+ if (centered !== undefined) {
612
+ this.centered = centered;
613
+ }
614
+ }
615
+ }
616
+ Frame.HexGridDto = HexGridDto;
617
+ })(Frame || (Frame = {}));
@@ -12,3 +12,4 @@ export * from "./line-inputs";
12
12
  export * from "./polyline-inputs";
13
13
  export * from "./mesh-inputs";
14
14
  export * from "./io-inputs";
15
+ export * from "./frame-inputs";
@@ -12,3 +12,4 @@ export * from "./line-inputs";
12
12
  export * from "./polyline-inputs";
13
13
  export * from "./mesh-inputs";
14
14
  export * from "./io-inputs";
15
+ export * from "./frame-inputs";
@@ -130,12 +130,12 @@ export declare namespace IO {
130
130
  * Layer name for all paths in this part
131
131
  * @default Default
132
132
  */
133
- layer: string;
133
+ layer?: string | undefined;
134
134
  /**
135
- * Color for all paths in this part
135
+ * Color for all paths in this part, as a hex string such as `#000000`
136
136
  * @default #000000
137
137
  */
138
- color: Base.Color;
138
+ color?: Base.Color | undefined;
139
139
  /**
140
140
  * Array of paths, each containing multiple segments
141
141
  * @default undefined
@@ -126,7 +126,7 @@ export var IO;
126
126
  */
127
127
  this.layer = "Default";
128
128
  /**
129
- * Color for all paths in this part
129
+ * Color for all paths in this part, as a hex string such as `#000000`
130
130
  * @default #000000
131
131
  */
132
132
  this.color = "#000000";