@bitbybit-dev/jscad 0.19.0-alpha.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 (41) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +63 -0
  3. package/babel.config.cjs +14 -0
  4. package/babel.config.d.cts +5 -0
  5. package/index.d.ts +1 -0
  6. package/index.js +4 -0
  7. package/jscad-generated.d.ts +1 -0
  8. package/jscad-generated.js +27486 -0
  9. package/lib/api/inputs/base-inputs.d.ts +38 -0
  10. package/lib/api/inputs/base-inputs.js +1 -0
  11. package/lib/api/inputs/index.d.ts +2 -0
  12. package/lib/api/inputs/index.js +2 -0
  13. package/lib/api/inputs/inputs.d.ts +2 -0
  14. package/lib/api/inputs/inputs.js +2 -0
  15. package/lib/api/inputs/jscad-inputs.d.ts +1646 -0
  16. package/lib/api/inputs/jscad-inputs.js +2137 -0
  17. package/lib/api/jscad-service.d.ts +51 -0
  18. package/lib/api/jscad-service.js +139 -0
  19. package/lib/api/services/index.d.ts +8 -0
  20. package/lib/api/services/index.js +8 -0
  21. package/lib/api/services/jscad-booleans.d.ts +17 -0
  22. package/lib/api/services/jscad-booleans.js +34 -0
  23. package/lib/api/services/jscad-colors.d.ts +11 -0
  24. package/lib/api/services/jscad-colors.js +14 -0
  25. package/lib/api/services/jscad-expansions.d.ts +12 -0
  26. package/lib/api/services/jscad-expansions.js +34 -0
  27. package/lib/api/services/jscad-extrusions.d.ts +18 -0
  28. package/lib/api/services/jscad-extrusions.js +44 -0
  29. package/lib/api/services/jscad-hulls.d.ts +12 -0
  30. package/lib/api/services/jscad-hulls.js +15 -0
  31. package/lib/api/services/jscad-path.d.ts +23 -0
  32. package/lib/api/services/jscad-path.js +64 -0
  33. package/lib/api/services/jscad-polygon.d.ts +25 -0
  34. package/lib/api/services/jscad-polygon.js +69 -0
  35. package/lib/api/services/jscad-shapes.d.ts +32 -0
  36. package/lib/api/services/jscad-shapes.js +182 -0
  37. package/lib/api/services/jscad-text.d.ts +14 -0
  38. package/lib/api/services/jscad-text.js +68 -0
  39. package/lib/index.d.ts +2 -0
  40. package/lib/index.js +2 -0
  41. package/package.json +99 -0
@@ -0,0 +1,2137 @@
1
+ // tslint:disable-next-line: no-namespace
2
+ export var JSCAD;
3
+ (function (JSCAD) {
4
+ class PolylinePropertiesDto {
5
+ /**
6
+ * Provide options without default values
7
+ */
8
+ constructor(points, isClosed) {
9
+ /**
10
+ * Can contain is closed information
11
+ */
12
+ this.isClosed = false;
13
+ if (points !== undefined) {
14
+ this.points = points;
15
+ }
16
+ if (isClosed !== undefined) {
17
+ this.isClosed = isClosed;
18
+ }
19
+ }
20
+ }
21
+ JSCAD.PolylinePropertiesDto = PolylinePropertiesDto;
22
+ let solidCornerTypeEnum;
23
+ (function (solidCornerTypeEnum) {
24
+ /**
25
+ * Edges will meet at a corner
26
+ */
27
+ solidCornerTypeEnum["edge"] = "edge";
28
+ /**
29
+ * Edges will be rounded on the corner
30
+ */
31
+ solidCornerTypeEnum["round"] = "round";
32
+ /**
33
+ * Edges will be chamfered on the corner
34
+ */
35
+ solidCornerTypeEnum["chamfer"] = "chamfer";
36
+ })(solidCornerTypeEnum = JSCAD.solidCornerTypeEnum || (JSCAD.solidCornerTypeEnum = {}));
37
+ let jscadTextAlignEnum;
38
+ (function (jscadTextAlignEnum) {
39
+ /**
40
+ * Aligns text to the left
41
+ */
42
+ jscadTextAlignEnum["left"] = "left";
43
+ /**
44
+ * Aligns text to the center
45
+ */
46
+ jscadTextAlignEnum["center"] = "center";
47
+ /**
48
+ * Aligns text to the right
49
+ */
50
+ jscadTextAlignEnum["right"] = "right";
51
+ })(jscadTextAlignEnum = JSCAD.jscadTextAlignEnum || (JSCAD.jscadTextAlignEnum = {}));
52
+ class DrawSolidMeshDto {
53
+ /**
54
+ * Provide options without default values
55
+ */
56
+ constructor(mesh, opacity, colours, updatable, hidden, jscadMesh) {
57
+ /**
58
+ * Value between 0 and 1
59
+ * @default 1
60
+ * @minimum 0
61
+ * @maximum 1
62
+ * @step 0.1
63
+ */
64
+ this.opacity = 1;
65
+ /**
66
+ * Hex colour string
67
+ * @default #444444
68
+ */
69
+ this.colours = "#444444";
70
+ /**
71
+ * Indicates wether this solid will be transformed in time
72
+ * @default false
73
+ */
74
+ this.updatable = false;
75
+ /**
76
+ * Hidden
77
+ * @default false
78
+ */
79
+ this.hidden = false;
80
+ if (mesh !== undefined) {
81
+ this.mesh = mesh;
82
+ }
83
+ if (opacity !== undefined) {
84
+ this.opacity = opacity;
85
+ }
86
+ if (colours !== undefined) {
87
+ this.colours = colours;
88
+ }
89
+ if (updatable !== undefined) {
90
+ this.updatable = updatable;
91
+ }
92
+ if (hidden !== undefined) {
93
+ this.hidden = hidden;
94
+ }
95
+ if (jscadMesh !== undefined) {
96
+ this.jscadMesh = jscadMesh;
97
+ }
98
+ }
99
+ }
100
+ JSCAD.DrawSolidMeshDto = DrawSolidMeshDto;
101
+ class DrawSolidMeshesDto {
102
+ /**
103
+ * Provide options without default values
104
+ */
105
+ constructor(meshes, opacity, colours, updatable, hidden, jscadMesh) {
106
+ /**
107
+ * Value between 0 and 1
108
+ * @default 1
109
+ * @minimum 0
110
+ * @maximum 1
111
+ * @step 0.1
112
+ */
113
+ this.opacity = 1;
114
+ /**
115
+ * Hex colour string
116
+ * @default #444444
117
+ */
118
+ this.colours = "#444444";
119
+ /**
120
+ * Indicates wether this solid will be transformed in time
121
+ * @default false
122
+ */
123
+ this.updatable = false;
124
+ /**
125
+ * Should be hidden
126
+ * @default false
127
+ */
128
+ this.hidden = false;
129
+ if (meshes !== undefined) {
130
+ this.meshes = meshes;
131
+ }
132
+ if (opacity !== undefined) {
133
+ this.opacity = opacity;
134
+ }
135
+ if (colours !== undefined) {
136
+ this.colours = colours;
137
+ }
138
+ if (updatable !== undefined) {
139
+ this.updatable = updatable;
140
+ }
141
+ if (hidden !== undefined) {
142
+ this.hidden = hidden;
143
+ }
144
+ if (jscadMesh !== undefined) {
145
+ this.jscadMesh = jscadMesh;
146
+ }
147
+ }
148
+ }
149
+ JSCAD.DrawSolidMeshesDto = DrawSolidMeshesDto;
150
+ class DrawPathDto {
151
+ /**
152
+ * Provide options without default values
153
+ */
154
+ constructor(path, colour, opacity, width, updatable, pathMesh) {
155
+ /**
156
+ * Colour of the path
157
+ * @default #444444
158
+ */
159
+ this.colour = "#444444";
160
+ /**
161
+ * Opacity of the path
162
+ * @default 1
163
+ * @minimum 0
164
+ * @maximum 1
165
+ * @step 0.1
166
+ */
167
+ this.opacity = 1;
168
+ /**
169
+ * Width of the path
170
+ * @default 10
171
+ * @minimum 0
172
+ * @maximum Infinity
173
+ * @step 1
174
+ */
175
+ this.width = 10;
176
+ /**
177
+ * Indicates wether the path will change in time
178
+ * @default false
179
+ */
180
+ this.updatable = false;
181
+ if (path !== undefined) {
182
+ this.path = path;
183
+ }
184
+ if (colour !== undefined) {
185
+ this.colour = colour;
186
+ }
187
+ if (opacity !== undefined) {
188
+ this.opacity = opacity;
189
+ }
190
+ if (width !== undefined) {
191
+ this.width = width;
192
+ }
193
+ if (updatable !== undefined) {
194
+ this.updatable = updatable;
195
+ }
196
+ if (pathMesh !== undefined) {
197
+ this.pathMesh = pathMesh;
198
+ }
199
+ }
200
+ }
201
+ JSCAD.DrawPathDto = DrawPathDto;
202
+ class TransformSolidsDto {
203
+ constructor(meshes, transformation) {
204
+ if (meshes !== undefined) {
205
+ this.meshes = meshes;
206
+ }
207
+ if (transformation !== undefined) {
208
+ this.transformation = transformation;
209
+ }
210
+ }
211
+ }
212
+ JSCAD.TransformSolidsDto = TransformSolidsDto;
213
+ class TransformSolidDto {
214
+ constructor(mesh, transformation) {
215
+ if (mesh !== undefined) {
216
+ this.mesh = mesh;
217
+ }
218
+ if (transformation !== undefined) {
219
+ this.transformation = transformation;
220
+ }
221
+ }
222
+ }
223
+ JSCAD.TransformSolidDto = TransformSolidDto;
224
+ class DownloadSolidDto {
225
+ constructor(mesh, fileName) {
226
+ if (mesh !== undefined) {
227
+ this.mesh = mesh;
228
+ }
229
+ if (fileName !== undefined) {
230
+ this.fileName = fileName;
231
+ }
232
+ }
233
+ }
234
+ JSCAD.DownloadSolidDto = DownloadSolidDto;
235
+ class DownloadGeometryDto {
236
+ constructor(geometry, fileName, options) {
237
+ /**
238
+ * File name
239
+ * @default jscad-geometry
240
+ */
241
+ this.fileName = "jscad-geometry";
242
+ if (geometry !== undefined) {
243
+ this.geometry = geometry;
244
+ }
245
+ if (fileName !== undefined) {
246
+ this.fileName = fileName;
247
+ }
248
+ if (options !== undefined) {
249
+ this.options = options;
250
+ }
251
+ }
252
+ }
253
+ JSCAD.DownloadGeometryDto = DownloadGeometryDto;
254
+ class DownloadSolidsDto {
255
+ constructor(meshes, fileName) {
256
+ if (meshes !== undefined) {
257
+ this.meshes = meshes;
258
+ }
259
+ if (fileName !== undefined) {
260
+ this.fileName = fileName;
261
+ }
262
+ }
263
+ }
264
+ JSCAD.DownloadSolidsDto = DownloadSolidsDto;
265
+ class ColorizeDto {
266
+ constructor(geometry, color) {
267
+ /**
268
+ * Hex color string
269
+ * @default #0000ff
270
+ */
271
+ this.color = "#0000ff";
272
+ if (geometry !== undefined) {
273
+ this.geometry = geometry;
274
+ }
275
+ if (color !== undefined) {
276
+ this.color = color;
277
+ }
278
+ }
279
+ }
280
+ JSCAD.ColorizeDto = ColorizeDto;
281
+ class BooleanObjectsDto {
282
+ constructor(meshes) {
283
+ if (meshes !== undefined) {
284
+ this.meshes = meshes;
285
+ }
286
+ }
287
+ }
288
+ JSCAD.BooleanObjectsDto = BooleanObjectsDto;
289
+ class BooleanTwoObjectsDto {
290
+ constructor(first, second) {
291
+ if (first !== undefined) {
292
+ this.first = first;
293
+ }
294
+ if (second !== undefined) {
295
+ this.second = second;
296
+ }
297
+ }
298
+ }
299
+ JSCAD.BooleanTwoObjectsDto = BooleanTwoObjectsDto;
300
+ class BooleanObjectsFromDto {
301
+ constructor(from, meshes) {
302
+ if (from !== undefined) {
303
+ this.from = from;
304
+ }
305
+ if (meshes !== undefined) {
306
+ this.meshes = meshes;
307
+ }
308
+ }
309
+ }
310
+ JSCAD.BooleanObjectsFromDto = BooleanObjectsFromDto;
311
+ class ExpansionDto {
312
+ constructor(geometry, delta, corners, segments) {
313
+ /**
314
+ * Delta (+/-) of expansion
315
+ * @default 0.1
316
+ * @minimum -Infinity
317
+ * @maximum Infinity
318
+ * @step 0.1
319
+ */
320
+ this.delta = 0.1;
321
+ /**
322
+ * Type of corner to create during of expansion; edge, chamfer, round
323
+ * @default edge
324
+ */
325
+ this.corners = solidCornerTypeEnum.edge;
326
+ /**
327
+ * Integer number of segments when creating round corners
328
+ * @default 24
329
+ * @minimum 0
330
+ * @maximum Infinity
331
+ * @step 1
332
+ */
333
+ this.segments = 24;
334
+ if (geometry !== undefined) {
335
+ this.geometry = geometry;
336
+ }
337
+ if (delta !== undefined) {
338
+ this.delta = delta;
339
+ }
340
+ if (corners !== undefined) {
341
+ this.corners = corners;
342
+ }
343
+ if (segments !== undefined) {
344
+ this.segments = segments;
345
+ }
346
+ }
347
+ }
348
+ JSCAD.ExpansionDto = ExpansionDto;
349
+ class OffsetDto {
350
+ constructor(geometry, delta, corners, segments) {
351
+ /**
352
+ * Delta (+/-) of offset
353
+ * @default 0.1
354
+ * @minimum -Infinity
355
+ * @maximum Infinity
356
+ * @step 0.1
357
+ */
358
+ this.delta = 0.1;
359
+ /**
360
+ * Type of corner to create during the offset; edge, chamfer, round.
361
+ * @default edge
362
+ */
363
+ this.corners = solidCornerTypeEnum.edge;
364
+ /**
365
+ * Integer number of segments when creating round corners
366
+ * @default 24
367
+ * @minimum 0
368
+ * @maximum Infinity
369
+ * @step 1
370
+ */
371
+ this.segments = 24;
372
+ if (geometry !== undefined) {
373
+ this.geometry = geometry;
374
+ }
375
+ if (delta !== undefined) {
376
+ this.delta = delta;
377
+ }
378
+ if (corners !== undefined) {
379
+ this.corners = corners;
380
+ }
381
+ if (segments !== undefined) {
382
+ this.segments = segments;
383
+ }
384
+ }
385
+ }
386
+ JSCAD.OffsetDto = OffsetDto;
387
+ class ExtrudeLinearDto {
388
+ constructor(geometry, height, twistAngle, twistSteps) {
389
+ /**
390
+ * Height of linear extrude
391
+ * @default 1
392
+ * @minimum -Infinity
393
+ * @maximum Infinity
394
+ * @step 0.1
395
+ */
396
+ this.height = 1;
397
+ /**
398
+ * Twist angle in degrees
399
+ * @default 90
400
+ * @minimum -Infinity
401
+ * @maximum Infinity
402
+ * @step 1
403
+ */
404
+ this.twistAngle = 90;
405
+ /**
406
+ * Number of twist steps
407
+ * @default 15
408
+ * @minimum 0
409
+ * @maximum Infinity
410
+ * @step 1
411
+ */
412
+ this.twistSteps = 15;
413
+ if (geometry !== undefined) {
414
+ this.geometry = geometry;
415
+ }
416
+ if (height !== undefined) {
417
+ this.height = height;
418
+ }
419
+ if (twistAngle !== undefined) {
420
+ this.twistAngle = twistAngle;
421
+ }
422
+ if (twistSteps !== undefined) {
423
+ this.twistSteps = twistSteps;
424
+ }
425
+ }
426
+ }
427
+ JSCAD.ExtrudeLinearDto = ExtrudeLinearDto;
428
+ class HullDto {
429
+ constructor(meshes) {
430
+ if (meshes !== undefined) {
431
+ this.meshes = meshes;
432
+ }
433
+ }
434
+ }
435
+ JSCAD.HullDto = HullDto;
436
+ class ExtrudeRectangularDto {
437
+ constructor(geometry, height, size) {
438
+ /**
439
+ * Height of linear extrude
440
+ * @default 1
441
+ * @minimum 0
442
+ * @maximum Infinity
443
+ * @step 0.1
444
+ */
445
+ this.height = 1;
446
+ /**
447
+ * Size of the rectangle
448
+ * @default 1
449
+ * @minimum 0
450
+ * @maximum Infinity
451
+ * @step 0.1
452
+ */
453
+ this.size = 1;
454
+ if (geometry !== undefined) {
455
+ this.geometry = geometry;
456
+ }
457
+ if (height !== undefined) {
458
+ this.height = height;
459
+ }
460
+ if (size !== undefined) {
461
+ this.size = size;
462
+ }
463
+ }
464
+ }
465
+ JSCAD.ExtrudeRectangularDto = ExtrudeRectangularDto;
466
+ class ExtrudeRectangularPointsDto {
467
+ constructor(points, height, size) {
468
+ /**
469
+ * Height of linear extrude
470
+ * @default 1
471
+ * @minimum 0
472
+ * @maximum Infinity
473
+ * @step 0.1
474
+ */
475
+ this.height = 1;
476
+ /**
477
+ * Size of the rectangle
478
+ * @default 1
479
+ * @minimum 0
480
+ * @maximum Infinity
481
+ * @step 0.1
482
+ */
483
+ this.size = 1;
484
+ if (points !== undefined) {
485
+ this.points = points;
486
+ }
487
+ if (height !== undefined) {
488
+ this.height = height;
489
+ }
490
+ if (size !== undefined) {
491
+ this.size = size;
492
+ }
493
+ }
494
+ }
495
+ JSCAD.ExtrudeRectangularPointsDto = ExtrudeRectangularPointsDto;
496
+ class ExtrudeRotateDto {
497
+ constructor(polygon, angle, startAngle, segments) {
498
+ /**
499
+ * Angle in degrees
500
+ * @default 90
501
+ * @minimum -Infinity
502
+ * @maximum Infinity
503
+ * @step 1
504
+ */
505
+ this.angle = 90;
506
+ /**
507
+ * Start angle in degrees
508
+ * @default 0
509
+ * @minimum -Infinity
510
+ * @maximum Infinity
511
+ * @step 1
512
+ */
513
+ this.startAngle = 0;
514
+ /**
515
+ * Number of segments
516
+ * @default 24
517
+ * @minimum 0
518
+ * @maximum Infinity
519
+ * @step 1
520
+ */
521
+ this.segments = 24;
522
+ if (polygon !== undefined) {
523
+ this.polygon = polygon;
524
+ }
525
+ if (angle !== undefined) {
526
+ this.angle = angle;
527
+ }
528
+ if (startAngle !== undefined) {
529
+ this.startAngle = startAngle;
530
+ }
531
+ if (segments !== undefined) {
532
+ this.segments = segments;
533
+ }
534
+ }
535
+ }
536
+ JSCAD.ExtrudeRotateDto = ExtrudeRotateDto;
537
+ class PolylineDto {
538
+ constructor(polyline) {
539
+ if (polyline !== undefined) {
540
+ this.polyline = polyline;
541
+ }
542
+ }
543
+ }
544
+ JSCAD.PolylineDto = PolylineDto;
545
+ class CurveDto {
546
+ constructor(curve) {
547
+ if (curve !== undefined) {
548
+ this.curve = curve;
549
+ }
550
+ }
551
+ }
552
+ JSCAD.CurveDto = CurveDto;
553
+ class PointsDto {
554
+ constructor(points) {
555
+ if (points !== undefined) {
556
+ this.points = points;
557
+ }
558
+ }
559
+ }
560
+ JSCAD.PointsDto = PointsDto;
561
+ class PathDto {
562
+ constructor(path) {
563
+ if (path !== undefined) {
564
+ this.path = path;
565
+ }
566
+ }
567
+ }
568
+ JSCAD.PathDto = PathDto;
569
+ class PathFromPointsDto {
570
+ constructor(points, closed) {
571
+ /**
572
+ * Indicates wether we want to create a closed path
573
+ * @default false
574
+ */
575
+ this.closed = false;
576
+ if (points !== undefined) {
577
+ this.points = points;
578
+ }
579
+ if (closed !== undefined) {
580
+ this.closed = closed;
581
+ }
582
+ }
583
+ }
584
+ JSCAD.PathFromPointsDto = PathFromPointsDto;
585
+ class PathsFromPointsDto {
586
+ constructor(pointsLists) {
587
+ if (pointsLists !== undefined) {
588
+ this.pointsLists = pointsLists;
589
+ }
590
+ }
591
+ }
592
+ JSCAD.PathsFromPointsDto = PathsFromPointsDto;
593
+ class PathFromPolylineDto {
594
+ constructor(polyline, closed) {
595
+ /**
596
+ * Indicates wether we want to create a closed path
597
+ * @default false
598
+ */
599
+ this.closed = false;
600
+ if (polyline !== undefined) {
601
+ this.polyline = polyline;
602
+ }
603
+ if (closed !== undefined) {
604
+ this.closed = closed;
605
+ }
606
+ }
607
+ }
608
+ JSCAD.PathFromPolylineDto = PathFromPolylineDto;
609
+ class PathAppendCurveDto {
610
+ constructor(curve, path) {
611
+ if (curve !== undefined) {
612
+ this.curve = curve;
613
+ }
614
+ if (path !== undefined) {
615
+ this.path = path;
616
+ }
617
+ }
618
+ }
619
+ JSCAD.PathAppendCurveDto = PathAppendCurveDto;
620
+ class PathAppendPointsDto {
621
+ constructor(points, path) {
622
+ if (points !== undefined) {
623
+ this.points = points;
624
+ }
625
+ if (path !== undefined) {
626
+ this.path = path;
627
+ }
628
+ }
629
+ }
630
+ JSCAD.PathAppendPointsDto = PathAppendPointsDto;
631
+ class PathAppendPolylineDto {
632
+ constructor(polyline, path) {
633
+ if (polyline !== undefined) {
634
+ this.polyline = polyline;
635
+ }
636
+ if (path !== undefined) {
637
+ this.path = path;
638
+ }
639
+ }
640
+ }
641
+ JSCAD.PathAppendPolylineDto = PathAppendPolylineDto;
642
+ class PathAppendArcDto {
643
+ constructor(path, endPoint, xAxisRotation, clockwise, large, segments, radiusX, radiusY) {
644
+ /**
645
+ * End point of an arc
646
+ * @default [1, 1]
647
+ */
648
+ this.endPoint = [1, 1];
649
+ /**
650
+ * Rotation (degrees) of the X axis of the arc with respect to the X axis of the coordinate system
651
+ * @default 90
652
+ * @minimum -Infinity
653
+ * @maximum Infinity
654
+ * @step 1
655
+ */
656
+ this.xAxisRotation = 90;
657
+ /**
658
+ * Draw an arc clockwise with respect to the center point
659
+ * @default true
660
+ */
661
+ this.clockwise = true;
662
+ /**
663
+ * Draw an arc longer than PI radians
664
+ * @default false
665
+ */
666
+ this.large = false;
667
+ /**
668
+ * Number of segments for the arc
669
+ * @default 24
670
+ * @minimum 0
671
+ * @maximum Infinity
672
+ * @step 1
673
+ */
674
+ this.segments = 24;
675
+ /**
676
+ * X radius of an arc
677
+ * @default 1
678
+ * @minimum -Infinity
679
+ * @maximum Infinity
680
+ * @step 0.1
681
+ */
682
+ this.radiusX = 1;
683
+ /**
684
+ * Y radius of an arc
685
+ * @default 1
686
+ * @minimum -Infinity
687
+ * @maximum Infinity
688
+ * @step 0.1
689
+ */
690
+ this.radiusY = 1;
691
+ if (path !== undefined) {
692
+ this.path = path;
693
+ }
694
+ if (endPoint !== undefined) {
695
+ this.endPoint = endPoint;
696
+ }
697
+ if (xAxisRotation !== undefined) {
698
+ this.xAxisRotation = xAxisRotation;
699
+ }
700
+ if (clockwise !== undefined) {
701
+ this.clockwise = clockwise;
702
+ }
703
+ if (large !== undefined) {
704
+ this.large = large;
705
+ }
706
+ if (segments !== undefined) {
707
+ this.segments = segments;
708
+ }
709
+ if (radiusX !== undefined) {
710
+ this.radiusX = radiusX;
711
+ }
712
+ if (radiusY !== undefined) {
713
+ this.radiusY = radiusY;
714
+ }
715
+ }
716
+ }
717
+ JSCAD.PathAppendArcDto = PathAppendArcDto;
718
+ class CircleDto {
719
+ constructor(center, radius, segments) {
720
+ /**
721
+ * Center of the circle
722
+ * @default [0, 0]
723
+ */
724
+ this.center = [0, 0];
725
+ /**
726
+ * Radius of the circle
727
+ * @default 1
728
+ * @minimum -Infinity
729
+ * @maximum Infinity
730
+ * @step 0.1
731
+ */
732
+ this.radius = 1;
733
+ /**
734
+ * Segment number
735
+ * @default 24
736
+ * @minimum 0
737
+ * @maximum Infinity
738
+ * @step 1
739
+ */
740
+ this.segments = 24;
741
+ if (center !== undefined) {
742
+ this.center = center;
743
+ }
744
+ if (radius !== undefined) {
745
+ this.radius = radius;
746
+ }
747
+ if (segments !== undefined) {
748
+ this.segments = segments;
749
+ }
750
+ }
751
+ }
752
+ JSCAD.CircleDto = CircleDto;
753
+ class EllipseDto {
754
+ constructor(center, radius, segments) {
755
+ /**
756
+ * Center of the circle
757
+ * @default [0, 0]
758
+ */
759
+ this.center = [0, 0];
760
+ /**
761
+ * Radius of the circle in [x, y] form
762
+ * @default [1, 2]
763
+ */
764
+ this.radius = [1, 2];
765
+ /**
766
+ * Segment number
767
+ * @default 24
768
+ * @minimum 0
769
+ * @maximum Infinity
770
+ * @step 1
771
+ */
772
+ this.segments = 24;
773
+ if (center !== undefined) {
774
+ this.center = center;
775
+ }
776
+ if (radius !== undefined) {
777
+ this.radius = radius;
778
+ }
779
+ if (segments !== undefined) {
780
+ this.segments = segments;
781
+ }
782
+ }
783
+ }
784
+ JSCAD.EllipseDto = EllipseDto;
785
+ class SquareDto {
786
+ constructor(center, size) {
787
+ /**
788
+ * Center of the 2D square
789
+ * @default [0, 0]
790
+ */
791
+ this.center = [0, 0];
792
+ /**
793
+ * Size of the square
794
+ * @default 1
795
+ * @minimum -Infinity
796
+ * @maximum Infinity
797
+ * @step 0.1
798
+ */
799
+ this.size = 1;
800
+ if (center !== undefined) {
801
+ this.center = center;
802
+ }
803
+ if (size !== undefined) {
804
+ this.size = size;
805
+ }
806
+ }
807
+ }
808
+ JSCAD.SquareDto = SquareDto;
809
+ class RectangleDto {
810
+ constructor(center, width, length) {
811
+ /**
812
+ * Center of the 2D rectangle
813
+ * @default [0, 0]
814
+ */
815
+ this.center = [0, 0];
816
+ /**
817
+ * Width of the rectangle
818
+ * @default 1
819
+ * @minimum -Infinity
820
+ * @maximum Infinity
821
+ * @step 0.1
822
+ */
823
+ this.width = 1;
824
+ /**
825
+ * Length of the rectangle
826
+ * @default 1
827
+ * @minimum -Infinity
828
+ * @maximum Infinity
829
+ * @step 0.1
830
+ */
831
+ this.length = 1;
832
+ if (center !== undefined) {
833
+ this.center = center;
834
+ }
835
+ if (width !== undefined) {
836
+ this.width = width;
837
+ }
838
+ if (length !== undefined) {
839
+ this.length = length;
840
+ }
841
+ }
842
+ }
843
+ JSCAD.RectangleDto = RectangleDto;
844
+ class RoundedRectangleDto {
845
+ constructor(center, roundRadius, segments, width, length) {
846
+ /**
847
+ * Center of the 2D rectangle
848
+ * @default [0, 0]
849
+ */
850
+ this.center = [0, 0];
851
+ /**
852
+ * The radius to round the rectangle edge
853
+ * @default 0.2
854
+ * @minimum -Infinity
855
+ * @maximum Infinity
856
+ * @step 0.1
857
+ */
858
+ this.roundRadius = 0.2;
859
+ /**
860
+ * Number of segments for corners
861
+ * @default 24
862
+ * @minimum 0
863
+ * @maximum Infinity
864
+ * @step 1
865
+ */
866
+ this.segments = 24;
867
+ /**
868
+ * Width of the rectangle
869
+ * @default 1
870
+ * @minimum -Infinity
871
+ * @maximum Infinity
872
+ * @step 0.1
873
+ */
874
+ this.width = 1;
875
+ /**
876
+ * Length of the rectangle
877
+ * @default 1
878
+ * @minimum -Infinity
879
+ * @maximum Infinity
880
+ * @step 0.1
881
+ */
882
+ this.length = 1;
883
+ if (center !== undefined) {
884
+ this.center = center;
885
+ }
886
+ if (roundRadius !== undefined) {
887
+ this.roundRadius = roundRadius;
888
+ }
889
+ if (segments !== undefined) {
890
+ this.segments = segments;
891
+ }
892
+ if (width !== undefined) {
893
+ this.width = width;
894
+ }
895
+ if (length !== undefined) {
896
+ this.length = length;
897
+ }
898
+ }
899
+ }
900
+ JSCAD.RoundedRectangleDto = RoundedRectangleDto;
901
+ class StarDto {
902
+ constructor(center, vertices, density, outerRadius, innerRadius, startAngle) {
903
+ /**
904
+ * Center of the 2D star
905
+ * @default [0, 0]
906
+ */
907
+ this.center = [0, 0];
908
+ /**
909
+ * Number of vertices on the star
910
+ * @default 10
911
+ * @minimum 0
912
+ * @maximum Infinity
913
+ * @step 1
914
+ */
915
+ this.vertices = 10;
916
+ /**
917
+ * Density of the star
918
+ * @default 1
919
+ * @minimum 0
920
+ * @maximum Infinity
921
+ * @step 0.1
922
+ */
923
+ this.density = 1;
924
+ /**
925
+ * Outer radius of the star
926
+ * @default 2
927
+ * @minimum 0
928
+ * @maximum Infinity
929
+ * @step 0.1
930
+ */
931
+ this.outerRadius = 2;
932
+ /**
933
+ * Inner radius of the star
934
+ * @default 1
935
+ * @minimum 0
936
+ * @maximum Infinity
937
+ * @step 0.1
938
+ */
939
+ this.innerRadius = 1;
940
+ /**
941
+ * Starting angle for first vertice, in degrees
942
+ * @default 0
943
+ * @minimum -Infinity
944
+ * @maximum Infinity
945
+ * @step 1
946
+ */
947
+ this.startAngle = 0;
948
+ if (center !== undefined) {
949
+ this.center = center;
950
+ }
951
+ if (vertices !== undefined) {
952
+ this.vertices = vertices;
953
+ }
954
+ if (density !== undefined) {
955
+ this.density = density;
956
+ }
957
+ if (outerRadius !== undefined) {
958
+ this.outerRadius = outerRadius;
959
+ }
960
+ if (innerRadius !== undefined) {
961
+ this.innerRadius = innerRadius;
962
+ }
963
+ if (startAngle !== undefined) {
964
+ this.startAngle = startAngle;
965
+ }
966
+ }
967
+ }
968
+ JSCAD.StarDto = StarDto;
969
+ class CubeDto {
970
+ constructor(center, size) {
971
+ /**
972
+ * Center coordinates of the cube
973
+ * @default [0, 0, 0]
974
+ */
975
+ this.center = [0, 0, 0];
976
+ /**
977
+ * Size of the cube
978
+ * @default 1
979
+ * @minimum -Infinity
980
+ * @maximum Infinity
981
+ * @step 0.1
982
+ */
983
+ this.size = 1;
984
+ if (center !== undefined) {
985
+ this.center = center;
986
+ }
987
+ if (size !== undefined) {
988
+ this.size = size;
989
+ }
990
+ }
991
+ }
992
+ JSCAD.CubeDto = CubeDto;
993
+ class CubeCentersDto {
994
+ constructor(centers, size) {
995
+ /**
996
+ * Size of the cube
997
+ * @default 1
998
+ * @minimum 0
999
+ * @maximum Infinity
1000
+ * @step 0.1
1001
+ */
1002
+ this.size = 1;
1003
+ if (centers !== undefined) {
1004
+ this.centers = centers;
1005
+ }
1006
+ if (size !== undefined) {
1007
+ this.size = size;
1008
+ }
1009
+ }
1010
+ }
1011
+ JSCAD.CubeCentersDto = CubeCentersDto;
1012
+ class CuboidDto {
1013
+ constructor(center, width, length, height) {
1014
+ /**
1015
+ * Center coordinates of the cubod
1016
+ * @default [0, 0, 0]
1017
+ */
1018
+ this.center = [0, 0, 0];
1019
+ /**
1020
+ * Width of the cuboid
1021
+ * @default 1
1022
+ * @minimum 0
1023
+ * @maximum Infinity
1024
+ * @step 0.1
1025
+ */
1026
+ this.width = 1;
1027
+ /**
1028
+ * Length of the cuboid
1029
+ * @default 1
1030
+ * @minimum 0
1031
+ * @maximum Infinity
1032
+ * @step 0.1
1033
+ */
1034
+ this.length = 1;
1035
+ /**
1036
+ * Height of the cuboid
1037
+ * @default 1
1038
+ * @minimum 0
1039
+ * @maximum Infinity
1040
+ * @step 0.1
1041
+ */
1042
+ this.height = 1;
1043
+ if (center !== undefined) {
1044
+ this.center = center;
1045
+ }
1046
+ if (width !== undefined) {
1047
+ this.width = width;
1048
+ }
1049
+ if (length !== undefined) {
1050
+ this.length = length;
1051
+ }
1052
+ if (height !== undefined) {
1053
+ this.height = height;
1054
+ }
1055
+ }
1056
+ }
1057
+ JSCAD.CuboidDto = CuboidDto;
1058
+ class CuboidCentersDto {
1059
+ constructor(centers, width, length, height) {
1060
+ /**
1061
+ * Width of the cuboids
1062
+ * @default 1
1063
+ * @minimum 0
1064
+ * @maximum Infinity
1065
+ * @step 0.1
1066
+ */
1067
+ this.width = 1;
1068
+ /**
1069
+ * Length of the cuboids
1070
+ * @default 1
1071
+ * @minimum 0
1072
+ * @maximum Infinity
1073
+ * @step 0.1
1074
+ */
1075
+ this.length = 1;
1076
+ /**
1077
+ * Height of the cuboids
1078
+ * @default 1
1079
+ * @minimum 0
1080
+ * @maximum Infinity
1081
+ * @step 0.1
1082
+ */
1083
+ this.height = 1;
1084
+ if (centers !== undefined) {
1085
+ this.centers = centers;
1086
+ }
1087
+ if (width !== undefined) {
1088
+ this.width = width;
1089
+ }
1090
+ if (length !== undefined) {
1091
+ this.length = length;
1092
+ }
1093
+ if (height !== undefined) {
1094
+ this.height = height;
1095
+ }
1096
+ }
1097
+ }
1098
+ JSCAD.CuboidCentersDto = CuboidCentersDto;
1099
+ class RoundedCuboidDto {
1100
+ constructor(center, roundRadius, width, length, height, segments) {
1101
+ /**
1102
+ * Center coordinates of the cubod
1103
+ * @default [0, 0, 0]
1104
+ */
1105
+ this.center = [0, 0, 0];
1106
+ /**
1107
+ * Radius for rounding edges
1108
+ * @default 0.1
1109
+ * @minimum 0
1110
+ * @maximum Infinity
1111
+ * @step 0.1
1112
+ */
1113
+ this.roundRadius = 1;
1114
+ /**
1115
+ * Width of the cuboid
1116
+ * @default 1
1117
+ * @minimum 0
1118
+ * @maximum Infinity
1119
+ * @step 0.1
1120
+ */
1121
+ this.width = 1;
1122
+ /**
1123
+ * Length of the cuboid
1124
+ * @default 1
1125
+ * @minimum 0
1126
+ * @maximum Infinity
1127
+ * @step 0.1
1128
+ */
1129
+ this.length = 1;
1130
+ /**
1131
+ * Height of the cuboid
1132
+ * @default 1
1133
+ * @minimum 0
1134
+ * @maximum Infinity
1135
+ * @step 0.1
1136
+ */
1137
+ this.height = 1;
1138
+ /**
1139
+ * Segments of rounded edges
1140
+ * @default 24
1141
+ * @minimum 0
1142
+ * @maximum Infinity
1143
+ * @step 1
1144
+ */
1145
+ this.segments = 24;
1146
+ if (center !== undefined) {
1147
+ this.center = center;
1148
+ }
1149
+ if (roundRadius !== undefined) {
1150
+ this.roundRadius = roundRadius;
1151
+ }
1152
+ if (width !== undefined) {
1153
+ this.width = width;
1154
+ }
1155
+ if (length !== undefined) {
1156
+ this.length = length;
1157
+ }
1158
+ if (height !== undefined) {
1159
+ this.height = height;
1160
+ }
1161
+ if (segments !== undefined) {
1162
+ this.segments = segments;
1163
+ }
1164
+ }
1165
+ }
1166
+ JSCAD.RoundedCuboidDto = RoundedCuboidDto;
1167
+ class RoundedCuboidCentersDto {
1168
+ constructor(centers, roundRadius, width, length, height, segments) {
1169
+ /**
1170
+ * Radius for rounding edges
1171
+ * @default 0.1
1172
+ * @minimum 0
1173
+ * @maximum Infinity
1174
+ * @step 0.1
1175
+ */
1176
+ this.roundRadius = 0.1;
1177
+ /**
1178
+ * Width of the cuboids
1179
+ * @default 1
1180
+ * @minimum 0
1181
+ * @maximum Infinity
1182
+ * @step 0.1
1183
+ */
1184
+ this.width = 1;
1185
+ /**
1186
+ * Length of the cuboids
1187
+ * @default 1
1188
+ * @minimum 0
1189
+ * @maximum Infinity
1190
+ * @step 0.1
1191
+ */
1192
+ this.length = 1;
1193
+ /**
1194
+ * Height of the cuboids
1195
+ * @default 1
1196
+ * @minimum 0
1197
+ * @maximum Infinity
1198
+ * @step 0.1
1199
+ */
1200
+ this.height = 1;
1201
+ /**
1202
+ * Segments of rounded edges
1203
+ * @default 24
1204
+ * @minimum 0
1205
+ * @maximum Infinity
1206
+ * @step 1
1207
+ */
1208
+ this.segments = 24;
1209
+ if (centers !== undefined) {
1210
+ this.centers = centers;
1211
+ }
1212
+ if (roundRadius !== undefined) {
1213
+ this.roundRadius = roundRadius;
1214
+ }
1215
+ if (width !== undefined) {
1216
+ this.width = width;
1217
+ }
1218
+ if (length !== undefined) {
1219
+ this.length = length;
1220
+ }
1221
+ if (height !== undefined) {
1222
+ this.height = height;
1223
+ }
1224
+ if (segments !== undefined) {
1225
+ this.segments = segments;
1226
+ }
1227
+ }
1228
+ }
1229
+ JSCAD.RoundedCuboidCentersDto = RoundedCuboidCentersDto;
1230
+ class CylidnerEllipticDto {
1231
+ constructor(center, height, startRadius, endRadius, segments) {
1232
+ /**
1233
+ * Center of the cylinder
1234
+ * @default [0, 0, 0]
1235
+ */
1236
+ this.center = [0, 0, 0];
1237
+ /**
1238
+ * Height of the cylinder
1239
+ * @default 1
1240
+ * @minimum 0
1241
+ * @maximum Infinity
1242
+ * @step 0.1
1243
+ */
1244
+ this.height = 1;
1245
+ /**
1246
+ * Start radius on X and Y directions
1247
+ * @default [1, 2]
1248
+ */
1249
+ this.startRadius = [1, 2];
1250
+ /**
1251
+ * End radius on X and Y directions
1252
+ * @default [2, 3]
1253
+ */
1254
+ this.endRadius = [2, 3];
1255
+ /**
1256
+ * Subdivision segments
1257
+ * @default 24
1258
+ * @minimum 0
1259
+ * @maximum Infinity
1260
+ * @step 1
1261
+ */
1262
+ this.segments = 24;
1263
+ if (center !== undefined) {
1264
+ this.center = center;
1265
+ }
1266
+ if (height !== undefined) {
1267
+ this.height = height;
1268
+ }
1269
+ if (startRadius !== undefined) {
1270
+ this.startRadius = startRadius;
1271
+ }
1272
+ if (endRadius !== undefined) {
1273
+ this.endRadius = endRadius;
1274
+ }
1275
+ if (segments !== undefined) {
1276
+ this.segments = segments;
1277
+ }
1278
+ }
1279
+ }
1280
+ JSCAD.CylidnerEllipticDto = CylidnerEllipticDto;
1281
+ class CylidnerCentersEllipticDto {
1282
+ constructor(centers, height, startRadius, endRadius, segments) {
1283
+ /**
1284
+ * Height of the cylinders
1285
+ * @default 1
1286
+ * @minimum 0
1287
+ * @maximum Infinity
1288
+ * @step 0.1
1289
+ */
1290
+ this.height = 1;
1291
+ /**
1292
+ * Start radius on X and Y directions
1293
+ * @default [1, 2]
1294
+ */
1295
+ this.startRadius = [1, 2];
1296
+ /**
1297
+ * End radius on X and Y directions
1298
+ * @default [2, 3]
1299
+ */
1300
+ this.endRadius = [2, 3];
1301
+ /**
1302
+ * Subdivision segments
1303
+ * @default 24
1304
+ * @minimum 0
1305
+ * @maximum Infinity
1306
+ * @step 1
1307
+ */
1308
+ this.segments = 24;
1309
+ if (centers !== undefined) {
1310
+ this.centers = centers;
1311
+ }
1312
+ if (height !== undefined) {
1313
+ this.height = height;
1314
+ }
1315
+ if (startRadius !== undefined) {
1316
+ this.startRadius = startRadius;
1317
+ }
1318
+ if (endRadius !== undefined) {
1319
+ this.endRadius = endRadius;
1320
+ }
1321
+ if (segments !== undefined) {
1322
+ this.segments = segments;
1323
+ }
1324
+ }
1325
+ }
1326
+ JSCAD.CylidnerCentersEllipticDto = CylidnerCentersEllipticDto;
1327
+ class CylidnerDto {
1328
+ constructor(center, height, radius, segments) {
1329
+ /**
1330
+ * Center of the cylinder
1331
+ * @default [0, 0, 0]
1332
+ */
1333
+ this.center = [0, 0, 0];
1334
+ /**
1335
+ * Height of the cylinder
1336
+ * @default 1
1337
+ * @minimum 0
1338
+ * @maximum Infinity
1339
+ * @step 0.1
1340
+ */
1341
+ this.height = 1;
1342
+ /**
1343
+ * Radius of the cylinder
1344
+ * @default 1
1345
+ * @minimum 0
1346
+ * @maximum Infinity
1347
+ * @step 0.1
1348
+ */
1349
+ this.radius = 1;
1350
+ /**
1351
+ * Subdivision segments
1352
+ * @default 24
1353
+ * @minimum 0
1354
+ * @maximum Infinity
1355
+ * @step 1
1356
+ */
1357
+ this.segments = 24;
1358
+ if (center !== undefined) {
1359
+ this.center = center;
1360
+ }
1361
+ if (height !== undefined) {
1362
+ this.height = height;
1363
+ }
1364
+ if (radius !== undefined) {
1365
+ this.radius = radius;
1366
+ }
1367
+ if (segments !== undefined) {
1368
+ this.segments = segments;
1369
+ }
1370
+ }
1371
+ }
1372
+ JSCAD.CylidnerDto = CylidnerDto;
1373
+ class RoundedCylidnerDto {
1374
+ constructor(center, roundRadius, height, radius, segments) {
1375
+ /**
1376
+ * Center of the cylinder
1377
+ * @default [0, 0, 0]
1378
+ */
1379
+ this.center = [0, 0, 0];
1380
+ /**
1381
+ * Rounding radius
1382
+ * @default 0.1
1383
+ * @minimum 0
1384
+ * @maximum Infinity
1385
+ * @step 0.1
1386
+ */
1387
+ this.roundRadius = 0.1;
1388
+ /**
1389
+ * Height of the cylinder
1390
+ * @default 1
1391
+ * @minimum 0
1392
+ * @maximum Infinity
1393
+ * @step 0.1
1394
+ */
1395
+ this.height = 1;
1396
+ /**
1397
+ * Radius of the cylinder
1398
+ * @default 1
1399
+ * @minimum 0
1400
+ * @maximum Infinity
1401
+ * @step 0.1
1402
+ */
1403
+ this.radius = 1;
1404
+ /**
1405
+ * Segment number
1406
+ * @default 24
1407
+ * @minimum 0
1408
+ * @maximum Infinity
1409
+ * @step 1
1410
+ */
1411
+ this.segments = 24;
1412
+ if (center !== undefined) {
1413
+ this.center = center;
1414
+ }
1415
+ if (roundRadius !== undefined) {
1416
+ this.roundRadius = roundRadius;
1417
+ }
1418
+ if (height !== undefined) {
1419
+ this.height = height;
1420
+ }
1421
+ if (radius !== undefined) {
1422
+ this.radius = radius;
1423
+ }
1424
+ if (segments !== undefined) {
1425
+ this.segments = segments;
1426
+ }
1427
+ }
1428
+ }
1429
+ JSCAD.RoundedCylidnerDto = RoundedCylidnerDto;
1430
+ class EllipsoidDto {
1431
+ constructor(center, radius, segments) {
1432
+ /**
1433
+ * Center coordinates
1434
+ * @default [0, 0, 0]
1435
+ */
1436
+ this.center = [0, 0, 0];
1437
+ /**
1438
+ * Radius of the ellipsoid in [x, y, z] form
1439
+ * @default [1, 2, 3]
1440
+ */
1441
+ this.radius = [1, 2, 3];
1442
+ /**
1443
+ * Segment count for ellipsoid
1444
+ * @default 24
1445
+ * @minimum 0
1446
+ * @maximum Infinity
1447
+ * @step 1
1448
+ */
1449
+ this.segments = 24;
1450
+ if (center !== undefined) {
1451
+ this.center = center;
1452
+ }
1453
+ if (radius !== undefined) {
1454
+ this.radius = radius;
1455
+ }
1456
+ if (segments !== undefined) {
1457
+ this.segments = segments;
1458
+ }
1459
+ }
1460
+ }
1461
+ JSCAD.EllipsoidDto = EllipsoidDto;
1462
+ class EllipsoidCentersDto {
1463
+ constructor(centers, radius, segments) {
1464
+ /**
1465
+ * Radius of the ellipsoid in [x, y, z] form
1466
+ * @default [1, 2, 3]
1467
+ */
1468
+ this.radius = [1, 2, 3];
1469
+ /**
1470
+ * Segment count for ellipsoid
1471
+ * @default 24
1472
+ * @minimum 0
1473
+ * @maximum Infinity
1474
+ * @step 1
1475
+ */
1476
+ this.segments = 24;
1477
+ if (centers !== undefined) {
1478
+ this.centers = centers;
1479
+ }
1480
+ if (radius !== undefined) {
1481
+ this.radius = radius;
1482
+ }
1483
+ if (segments !== undefined) {
1484
+ this.segments = segments;
1485
+ }
1486
+ }
1487
+ }
1488
+ JSCAD.EllipsoidCentersDto = EllipsoidCentersDto;
1489
+ class GeodesicSphereDto {
1490
+ constructor(center, radius, frequency) {
1491
+ /**
1492
+ * Center coordinate of the geodesic sphere
1493
+ * @default [0, 0, 0]
1494
+ */
1495
+ this.center = [0, 0, 0];
1496
+ /**
1497
+ * Radius of the sphere
1498
+ * @default 1
1499
+ * @minimum 0
1500
+ * @maximum Infinity
1501
+ * @step 0.1
1502
+ */
1503
+ this.radius = 1;
1504
+ /**
1505
+ * Subdivision count
1506
+ * @default 12
1507
+ * @minimum 0
1508
+ * @maximum Infinity
1509
+ * @step 1
1510
+ */
1511
+ this.frequency = 12;
1512
+ if (center !== undefined) {
1513
+ this.center = center;
1514
+ }
1515
+ if (radius !== undefined) {
1516
+ this.radius = radius;
1517
+ }
1518
+ if (frequency !== undefined) {
1519
+ this.frequency = frequency;
1520
+ }
1521
+ }
1522
+ }
1523
+ JSCAD.GeodesicSphereDto = GeodesicSphereDto;
1524
+ class GeodesicSphereCentersDto {
1525
+ constructor(centers, radius, frequency) {
1526
+ /**
1527
+ * Radius of the sphere
1528
+ * @default 1
1529
+ * @minimum 0
1530
+ * @maximum Infinity
1531
+ * @step 0.1
1532
+ */
1533
+ this.radius = 1;
1534
+ /**
1535
+ * Subdivision count
1536
+ * @default 12
1537
+ * @minimum 0
1538
+ * @maximum Infinity
1539
+ * @step 0.1
1540
+ */
1541
+ this.frequency = 12;
1542
+ if (centers !== undefined) {
1543
+ this.centers = centers;
1544
+ }
1545
+ if (radius !== undefined) {
1546
+ this.radius = radius;
1547
+ }
1548
+ if (frequency !== undefined) {
1549
+ this.frequency = frequency;
1550
+ }
1551
+ }
1552
+ }
1553
+ JSCAD.GeodesicSphereCentersDto = GeodesicSphereCentersDto;
1554
+ class CylidnerCentersDto {
1555
+ constructor(centers, height, radius, segments) {
1556
+ /**
1557
+ * Height of the cylinders
1558
+ * @default 1
1559
+ * @minimum 0
1560
+ * @maximum Infinity
1561
+ * @step 0.1
1562
+ */
1563
+ this.height = 1;
1564
+ /**
1565
+ * Radius of the cylinders
1566
+ * @default 1
1567
+ * @minimum 0
1568
+ * @maximum Infinity
1569
+ * @step 0.1
1570
+ */
1571
+ this.radius = 1;
1572
+ /**
1573
+ * Subdivision segments
1574
+ * @default 24
1575
+ * @minimum 0
1576
+ * @maximum Infinity
1577
+ * @step 1
1578
+ */
1579
+ this.segments = 24;
1580
+ if (centers !== undefined) {
1581
+ this.centers = centers;
1582
+ }
1583
+ if (height !== undefined) {
1584
+ this.height = height;
1585
+ }
1586
+ if (radius !== undefined) {
1587
+ this.radius = radius;
1588
+ }
1589
+ if (segments !== undefined) {
1590
+ this.segments = segments;
1591
+ }
1592
+ }
1593
+ }
1594
+ JSCAD.CylidnerCentersDto = CylidnerCentersDto;
1595
+ class RoundedCylidnerCentersDto {
1596
+ constructor(centers, roundRadius, height, radius, segments) {
1597
+ /**
1598
+ * Rounding radius
1599
+ * @default 0.1
1600
+ * @minimum 0
1601
+ * @maximum Infinity
1602
+ * @step 0.1
1603
+ */
1604
+ this.roundRadius = 0.1;
1605
+ /**
1606
+ * Height of the cylinders
1607
+ * @default 1
1608
+ * @minimum 0
1609
+ * @maximum Infinity
1610
+ * @step 0.1
1611
+ */
1612
+ this.height = 1;
1613
+ /**
1614
+ * Radius of the cylinders
1615
+ * @default 1
1616
+ * @minimum 0
1617
+ * @maximum Infinity
1618
+ * @step 0.1
1619
+ */
1620
+ this.radius = 1;
1621
+ /**
1622
+ * Segment number
1623
+ * @default 24
1624
+ * @minimum 0
1625
+ * @maximum Infinity
1626
+ * @step 1
1627
+ */
1628
+ this.segments = 24;
1629
+ if (centers !== undefined) {
1630
+ this.centers = centers;
1631
+ }
1632
+ if (roundRadius !== undefined) {
1633
+ this.roundRadius = roundRadius;
1634
+ }
1635
+ if (height !== undefined) {
1636
+ this.height = height;
1637
+ }
1638
+ if (radius !== undefined) {
1639
+ this.radius = radius;
1640
+ }
1641
+ if (segments !== undefined) {
1642
+ this.segments = segments;
1643
+ }
1644
+ }
1645
+ }
1646
+ JSCAD.RoundedCylidnerCentersDto = RoundedCylidnerCentersDto;
1647
+ class SphereDto {
1648
+ constructor(center, radius, segments) {
1649
+ /**
1650
+ * Center point of the sphere
1651
+ * @default [0, 0, 0]
1652
+ */
1653
+ this.center = [0, 0, 0];
1654
+ /**
1655
+ * Radius of the sphere
1656
+ * @default 1
1657
+ * @minimum 0
1658
+ * @maximum Infinity
1659
+ * @step 0.1
1660
+ */
1661
+ this.radius = 1;
1662
+ /**
1663
+ * Segment count
1664
+ * @default 24
1665
+ * @minimum 0
1666
+ * @maximum Infinity
1667
+ * @step 1
1668
+ */
1669
+ this.segments = 24;
1670
+ if (center !== undefined) {
1671
+ this.center = center;
1672
+ }
1673
+ if (radius !== undefined) {
1674
+ this.radius = radius;
1675
+ }
1676
+ if (segments !== undefined) {
1677
+ this.segments = segments;
1678
+ }
1679
+ }
1680
+ }
1681
+ JSCAD.SphereDto = SphereDto;
1682
+ class SphereCentersDto {
1683
+ constructor(centers, radius, segments) {
1684
+ /**
1685
+ * Radius of the spheres
1686
+ * @default 1
1687
+ * @minimum 0
1688
+ * @maximum Infinity
1689
+ * @step 0.1
1690
+ */
1691
+ this.radius = 1;
1692
+ /**
1693
+ * Segment count
1694
+ * @default 24
1695
+ * @minimum 0
1696
+ * @maximum Infinity
1697
+ * @step 1
1698
+ */
1699
+ this.segments = 24;
1700
+ if (centers !== undefined) {
1701
+ this.centers = centers;
1702
+ }
1703
+ if (radius !== undefined) {
1704
+ this.radius = radius;
1705
+ }
1706
+ if (segments !== undefined) {
1707
+ this.segments = segments;
1708
+ }
1709
+ }
1710
+ }
1711
+ JSCAD.SphereCentersDto = SphereCentersDto;
1712
+ class TorusDto {
1713
+ constructor(center, innerRadius, outerRadius, innerSegments, outerSegments, innerRotation, outerRotation, startAngle) {
1714
+ /**
1715
+ * Center coordinate
1716
+ * @default [0, 0, 0]
1717
+ */
1718
+ this.center = [0, 0, 0];
1719
+ /**
1720
+ * Inner radius
1721
+ * @default 1
1722
+ * @minimum 0
1723
+ * @maximum Infinity
1724
+ * @step 0.1
1725
+ */
1726
+ this.innerRadius = 1;
1727
+ /**
1728
+ * Outer radius
1729
+ * @default 2
1730
+ * @minimum 0
1731
+ * @maximum Infinity
1732
+ * @step 0.1
1733
+ */
1734
+ this.outerRadius = 2;
1735
+ /**
1736
+ * Number of inner segments
1737
+ * @default 24
1738
+ * @minimum 0
1739
+ * @maximum Infinity
1740
+ * @step 1
1741
+ */
1742
+ this.innerSegments = 24;
1743
+ /**
1744
+ * Number of outer segments
1745
+ * @default 24
1746
+ * @minimum 0
1747
+ * @maximum Infinity
1748
+ * @step 1
1749
+ */
1750
+ this.outerSegments = 24;
1751
+ /**
1752
+ * Inner rotation in degrees
1753
+ * @default 0
1754
+ * @minimum -Infinity
1755
+ * @maximum Infinity
1756
+ * @step 1
1757
+ */
1758
+ this.innerRotation = 0;
1759
+ /**
1760
+ * Outer rotation in degrees
1761
+ * @default 360
1762
+ * @minimum -Infinity
1763
+ * @maximum Infinity
1764
+ * @step 1
1765
+ */
1766
+ this.outerRotation = 360;
1767
+ /**
1768
+ * Start angle in degrees
1769
+ * @default 0
1770
+ * @minimum -Infinity
1771
+ * @maximum Infinity
1772
+ * @step 1
1773
+ */
1774
+ this.startAngle = 0;
1775
+ if (center !== undefined) {
1776
+ this.center = center;
1777
+ }
1778
+ if (innerRadius !== undefined) {
1779
+ this.innerRadius = innerRadius;
1780
+ }
1781
+ if (outerRadius !== undefined) {
1782
+ this.outerRadius = outerRadius;
1783
+ }
1784
+ if (innerSegments !== undefined) {
1785
+ this.innerSegments = innerSegments;
1786
+ }
1787
+ if (outerSegments !== undefined) {
1788
+ this.outerSegments = outerSegments;
1789
+ }
1790
+ if (innerRotation !== undefined) {
1791
+ this.innerRotation = innerRotation;
1792
+ }
1793
+ if (outerRotation !== undefined) {
1794
+ this.outerRotation = outerRotation;
1795
+ }
1796
+ if (startAngle !== undefined) {
1797
+ this.startAngle = startAngle;
1798
+ }
1799
+ }
1800
+ }
1801
+ JSCAD.TorusDto = TorusDto;
1802
+ class TextDto {
1803
+ constructor(text, segments, xOffset, yOffset, height, lineSpacing, letterSpacing, align, extrudeOffset) {
1804
+ /**
1805
+ * Text to write
1806
+ * @default Hello World
1807
+ */
1808
+ this.text = "Hello World";
1809
+ /**
1810
+ * Number of segments
1811
+ * @default 24
1812
+ * @minimum 0
1813
+ * @maximum Infinity
1814
+ * @step 1
1815
+ */
1816
+ this.segments = 24;
1817
+ /**
1818
+ * X offset of the text
1819
+ * @default 0
1820
+ * @minimum -Infinity
1821
+ * @maximum Infinity
1822
+ * @step 0.1
1823
+ */
1824
+ this.xOffset = 0;
1825
+ /**
1826
+ * Y offset of the text
1827
+ * @default 0
1828
+ * @minimum -Infinity
1829
+ * @maximum Infinity
1830
+ * @step 0.1
1831
+ */
1832
+ this.yOffset = 0;
1833
+ /**
1834
+ * Height of the text
1835
+ * @default 1
1836
+ * @minimum 0
1837
+ * @maximum Infinity
1838
+ * @step 0.1
1839
+ */
1840
+ this.height = 1;
1841
+ /**
1842
+ * Space between lines
1843
+ * @default 1.4
1844
+ * @minimum -Infinity
1845
+ * @maximum Infinity
1846
+ * @step 0.1
1847
+ */
1848
+ this.lineSpacing = 1.4;
1849
+ /**
1850
+ * Space between letters
1851
+ * @default 1
1852
+ * @minimum -Infinity
1853
+ * @maximum Infinity
1854
+ * @step 0.1
1855
+ */
1856
+ this.letterSpacing = 1;
1857
+ /**
1858
+ * Align between left, center, right
1859
+ * @default center
1860
+ */
1861
+ this.align = jscadTextAlignEnum.center;
1862
+ /**
1863
+ * Offset the extrusion
1864
+ * @default 0
1865
+ * @minimum -Infinity
1866
+ * @maximum Infinity
1867
+ * @step 0.1
1868
+ */
1869
+ this.extrudeOffset = 0;
1870
+ if (text !== undefined) {
1871
+ this.text = text;
1872
+ }
1873
+ if (segments !== undefined) {
1874
+ this.segments = segments;
1875
+ }
1876
+ if (xOffset !== undefined) {
1877
+ this.xOffset = xOffset;
1878
+ }
1879
+ if (yOffset !== undefined) {
1880
+ this.yOffset = yOffset;
1881
+ }
1882
+ if (height !== undefined) {
1883
+ this.height = height;
1884
+ }
1885
+ if (lineSpacing !== undefined) {
1886
+ this.lineSpacing = lineSpacing;
1887
+ }
1888
+ if (letterSpacing !== undefined) {
1889
+ this.letterSpacing = letterSpacing;
1890
+ }
1891
+ if (align !== undefined) {
1892
+ this.align = align;
1893
+ }
1894
+ if (extrudeOffset !== undefined) {
1895
+ this.extrudeOffset = extrudeOffset;
1896
+ }
1897
+ }
1898
+ }
1899
+ JSCAD.TextDto = TextDto;
1900
+ class CylinderTextDto {
1901
+ constructor(text, extrusionHeight, extrusionSize, segments, xOffset, yOffset, height, lineSpacing, letterSpacing, align, extrudeOffset) {
1902
+ /**
1903
+ * Text to write
1904
+ * @default Hello World
1905
+ */
1906
+ this.text = "Hello World";
1907
+ /**
1908
+ * Height of the cylinder
1909
+ * @default 0.5
1910
+ * @minimum 0
1911
+ * @maximum Infinity
1912
+ * @step 0.1
1913
+ */
1914
+ this.extrusionHeight = 0.5;
1915
+ /**
1916
+ * Radius of the cylinder
1917
+ * @default 0.1
1918
+ * @minimum 0
1919
+ * @maximum Infinity
1920
+ * @step 0.1
1921
+ */
1922
+ this.extrusionSize = 0.1;
1923
+ /**
1924
+ * Segment subdivision for cylinder
1925
+ * @default 24
1926
+ * @minimum 0
1927
+ * @maximum Infinity
1928
+ * @step 1
1929
+ */
1930
+ this.segments = 24;
1931
+ /**
1932
+ * X offset of the text
1933
+ * @default 0
1934
+ * @minimum -Infinity
1935
+ * @maximum Infinity
1936
+ * @step 0.1
1937
+ */
1938
+ this.xOffset = 0;
1939
+ /**
1940
+ * Y offset of the text
1941
+ * @default 0
1942
+ * @minimum -Infinity
1943
+ * @maximum Infinity
1944
+ * @step 0.1
1945
+ */
1946
+ this.yOffset = 0;
1947
+ /**
1948
+ * Height of the text
1949
+ * @default 1
1950
+ * @minimum 0
1951
+ * @maximum Infinity
1952
+ * @step 0.1
1953
+ */
1954
+ this.height = 1;
1955
+ /**
1956
+ * Space between lines
1957
+ * @default 1.4
1958
+ * @minimum -Infinity
1959
+ * @maximum Infinity
1960
+ * @step 0.1
1961
+ */
1962
+ this.lineSpacing = 1.4;
1963
+ /**
1964
+ * Space between letters
1965
+ * @default 1
1966
+ * @minimum -Infinity
1967
+ * @maximum Infinity
1968
+ * @step 0.1
1969
+ */
1970
+ this.letterSpacing = 1;
1971
+ /**
1972
+ * Align between left, center, right
1973
+ * @default center
1974
+ */
1975
+ this.align = jscadTextAlignEnum.center;
1976
+ /**
1977
+ * Offset the extrusion
1978
+ * @default 0
1979
+ * @minimum -Infinity
1980
+ * @maximum Infinity
1981
+ * @step 0.1
1982
+ */
1983
+ this.extrudeOffset = 0;
1984
+ if (text !== undefined) {
1985
+ this.text = text;
1986
+ }
1987
+ if (extrusionHeight !== undefined) {
1988
+ this.extrusionHeight = extrusionHeight;
1989
+ }
1990
+ if (extrusionSize !== undefined) {
1991
+ this.extrusionSize = extrusionSize;
1992
+ }
1993
+ if (segments !== undefined) {
1994
+ this.segments = segments;
1995
+ }
1996
+ if (xOffset !== undefined) {
1997
+ this.xOffset = xOffset;
1998
+ }
1999
+ if (yOffset !== undefined) {
2000
+ this.yOffset = yOffset;
2001
+ }
2002
+ if (height !== undefined) {
2003
+ this.height = height;
2004
+ }
2005
+ if (lineSpacing !== undefined) {
2006
+ this.lineSpacing = lineSpacing;
2007
+ }
2008
+ if (letterSpacing !== undefined) {
2009
+ this.letterSpacing = letterSpacing;
2010
+ }
2011
+ if (align !== undefined) {
2012
+ this.align = align;
2013
+ }
2014
+ if (extrudeOffset !== undefined) {
2015
+ this.extrudeOffset = extrudeOffset;
2016
+ }
2017
+ }
2018
+ }
2019
+ JSCAD.CylinderTextDto = CylinderTextDto;
2020
+ class SphereTextDto {
2021
+ constructor(text, radius, segments, xOffset, yOffset, height, lineSpacing, letterSpacing, align, extrudeOffset) {
2022
+ /**
2023
+ * Text to write
2024
+ * @default Hello World
2025
+ */
2026
+ this.text = "Hello World";
2027
+ /**
2028
+ * Radius of the spheres
2029
+ * @default 0.1
2030
+ * @minimum 0
2031
+ * @maximum Infinity
2032
+ * @step 0.1
2033
+ */
2034
+ this.radius = 0.1;
2035
+ /**
2036
+ * Segment subdivision for sphere
2037
+ * @default 24
2038
+ * @minimum 0
2039
+ * @maximum Infinity
2040
+ * @step 1
2041
+ */
2042
+ this.segments = 24;
2043
+ /**
2044
+ * X offset of the text
2045
+ * @default 0
2046
+ * @minimum -Infinity
2047
+ * @maximum Infinity
2048
+ * @step 0.1
2049
+ */
2050
+ this.xOffset = 0;
2051
+ /**
2052
+ * Y offset of the text
2053
+ * @default 0
2054
+ * @minimum -Infinity
2055
+ * @maximum Infinity
2056
+ * @step 0.1
2057
+ */
2058
+ this.yOffset = 0;
2059
+ /**
2060
+ * Height of the text
2061
+ * @default 1
2062
+ * @minimum 0
2063
+ * @maximum Infinity
2064
+ * @step 0.1
2065
+ */
2066
+ this.height = 1;
2067
+ /**
2068
+ * Space between lines
2069
+ * @default 1.4
2070
+ * @minimum -Infinity
2071
+ * @maximum Infinity
2072
+ * @step 0.1
2073
+ */
2074
+ this.lineSpacing = 1.4;
2075
+ /**
2076
+ * Space between letters
2077
+ * @default 1
2078
+ * @minimum -Infinity
2079
+ * @maximum Infinity
2080
+ * @step 0.1
2081
+ */
2082
+ this.letterSpacing = 1;
2083
+ /**
2084
+ * Align between left, center, right
2085
+ * @default center
2086
+ */
2087
+ this.align = jscadTextAlignEnum.center;
2088
+ /**
2089
+ * Offset the extrusion
2090
+ * @default 0
2091
+ * @minimum -Infinity
2092
+ * @maximum Infinity
2093
+ * @step 0.1
2094
+ */
2095
+ this.extrudeOffset = 0;
2096
+ if (text !== undefined) {
2097
+ this.text = text;
2098
+ }
2099
+ if (radius !== undefined) {
2100
+ this.radius = radius;
2101
+ }
2102
+ if (segments !== undefined) {
2103
+ this.segments = segments;
2104
+ }
2105
+ if (xOffset !== undefined) {
2106
+ this.xOffset = xOffset;
2107
+ }
2108
+ if (yOffset !== undefined) {
2109
+ this.yOffset = yOffset;
2110
+ }
2111
+ if (height !== undefined) {
2112
+ this.height = height;
2113
+ }
2114
+ if (lineSpacing !== undefined) {
2115
+ this.lineSpacing = lineSpacing;
2116
+ }
2117
+ if (letterSpacing !== undefined) {
2118
+ this.letterSpacing = letterSpacing;
2119
+ }
2120
+ if (align !== undefined) {
2121
+ this.align = align;
2122
+ }
2123
+ if (extrudeOffset !== undefined) {
2124
+ this.extrudeOffset = extrudeOffset;
2125
+ }
2126
+ }
2127
+ }
2128
+ JSCAD.SphereTextDto = SphereTextDto;
2129
+ class FromPolygonPoints {
2130
+ constructor(polygonPoints) {
2131
+ if (polygonPoints !== undefined) {
2132
+ this.polygonPoints = polygonPoints;
2133
+ }
2134
+ }
2135
+ }
2136
+ JSCAD.FromPolygonPoints = FromPolygonPoints;
2137
+ })(JSCAD || (JSCAD = {}));