@bitbybit-dev/jscad 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.
@@ -96,7 +96,7 @@ export declare namespace JSCAD {
96
96
  /**
97
97
  * Whether the last point joins back to the first; the JSCAD methods decide closure on their own
98
98
  * and ignore this flag
99
- * @optional true
99
+ * @default false
100
100
  */
101
101
  isClosed?: boolean | undefined;
102
102
  /**
@@ -182,24 +182,24 @@ export declare namespace JSCAD {
182
182
  * @maximum 1
183
183
  * @step 0.1
184
184
  */
185
- opacity: number;
185
+ opacity?: number | undefined;
186
186
  /**
187
187
  * Hex color of the faces; a list uses its first entry. An entity colored with `colors.colorize`
188
188
  * keeps its own color instead
189
189
  * @default #444444
190
190
  */
191
- colours: string | string[];
191
+ colours?: string | string[] | undefined;
192
192
  /**
193
193
  * When true, the drawn mesh can be refreshed in place on later draws by passing it back as
194
194
  * `jscadMesh`
195
195
  * @default false
196
196
  */
197
- updatable: boolean;
197
+ updatable?: boolean | undefined;
198
198
  /**
199
199
  * When true, the mesh is created but not shown until it is made visible
200
200
  * @default false
201
201
  */
202
- hidden: boolean;
202
+ hidden?: boolean | undefined;
203
203
  /**
204
204
  * A mesh from an earlier draw to refresh instead of creating a new one; used only when
205
205
  * `updatable` is true
@@ -213,13 +213,13 @@ export declare namespace JSCAD {
213
213
  * face orientation
214
214
  * @default true
215
215
  */
216
- drawTwoSided: boolean;
216
+ drawTwoSided?: boolean | undefined;
217
217
  /**
218
218
  * Hex color of the back faces, the side the face normal points away from; used only when
219
219
  * `drawTwoSided` is true
220
220
  * @default #0000ff
221
221
  */
222
- backFaceColour: string;
222
+ backFaceColour?: string | undefined;
223
223
  /**
224
224
  * How opaque the back faces are, from 0 to 1; used only when `drawTwoSided` is true
225
225
  * @default 1
@@ -227,7 +227,7 @@ export declare namespace JSCAD {
227
227
  * @maximum 1
228
228
  * @step 0.1
229
229
  */
230
- backFaceOpacity: number;
230
+ backFaceOpacity?: number | undefined;
231
231
  }
232
232
  /**
233
233
  * The options `draw.drawAnyAsync` passes on when the entity is a list of JSCAD solids or 2D shapes:
@@ -251,24 +251,24 @@ export declare namespace JSCAD {
251
251
  * @maximum 1
252
252
  * @step 0.1
253
253
  */
254
- opacity: number;
254
+ opacity?: number | undefined;
255
255
  /**
256
256
  * Hex color of the faces; a list with one entry per entity colors each in turn, any other list
257
257
  * uses its first entry. Colorized entities keep their own color
258
258
  * @default #444444
259
259
  */
260
- colours: string | string[];
260
+ colours?: string | string[] | undefined;
261
261
  /**
262
262
  * When true, the drawn meshes can be refreshed in place on later draws by passing the parent
263
263
  * back as `jscadMesh`
264
264
  * @default false
265
265
  */
266
- updatable: boolean;
266
+ updatable?: boolean | undefined;
267
267
  /**
268
268
  * When true, the meshes are created but not shown until they are made visible
269
269
  * @default false
270
270
  */
271
- hidden: boolean;
271
+ hidden?: boolean | undefined;
272
272
  /**
273
273
  * The parent mesh from an earlier draw to refresh instead of creating a new one; used only when
274
274
  * `updatable` is true
@@ -282,13 +282,13 @@ export declare namespace JSCAD {
282
282
  * face orientation
283
283
  * @default true
284
284
  */
285
- drawTwoSided: boolean;
285
+ drawTwoSided?: boolean | undefined;
286
286
  /**
287
287
  * Hex color of the back faces, the side the face normal points away from; used only when
288
288
  * `drawTwoSided` is true
289
289
  * @default #0000ff
290
290
  */
291
- backFaceColour: string;
291
+ backFaceColour?: string | undefined;
292
292
  /**
293
293
  * How opaque the back faces are, from 0 to 1; used only when `drawTwoSided` is true
294
294
  * @default 1
@@ -296,7 +296,7 @@ export declare namespace JSCAD {
296
296
  * @maximum 1
297
297
  * @step 0.1
298
298
  */
299
- backFaceOpacity: number;
299
+ backFaceOpacity?: number | undefined;
300
300
  }
301
301
  /**
302
302
  * The options `draw.drawAnyAsync` passes on when the entity is a JSCAD 2D path, drawn as a line
@@ -316,7 +316,7 @@ export declare namespace JSCAD {
316
316
  * Hex color of the line; a path colored with `colors.colorize` keeps its own color instead
317
317
  * @default #444444
318
318
  */
319
- colour: string;
319
+ colour?: string | undefined;
320
320
  /**
321
321
  * How opaque the line is, from 0 for invisible to 1 for solid
322
322
  * @default 1
@@ -324,7 +324,7 @@ export declare namespace JSCAD {
324
324
  * @maximum 1
325
325
  * @step 0.1
326
326
  */
327
- opacity: number;
327
+ opacity?: number | undefined;
328
328
  /**
329
329
  * Thickness of the drawn line
330
330
  * @default 10
@@ -332,13 +332,13 @@ export declare namespace JSCAD {
332
332
  * @maximum Infinity
333
333
  * @step 1
334
334
  */
335
- width: number;
335
+ width?: number | undefined;
336
336
  /**
337
337
  * When true, the drawn line can be refreshed in place on later draws by passing it back as
338
338
  * `pathMesh`
339
339
  * @default false
340
340
  */
341
- updatable: boolean;
341
+ updatable?: boolean | undefined;
342
342
  /**
343
343
  * A line from an earlier draw to refresh instead of creating a new one; used only when
344
344
  * `updatable` is true
@@ -417,7 +417,7 @@ export declare namespace JSCAD {
417
417
  * Name of the downloaded file without the extension, which is added
418
418
  * @default jscad-geometry
419
419
  */
420
- fileName: string;
420
+ fileName?: string | undefined;
421
421
  /**
422
422
  * Options handed to the DXF or 3MF writer as they are; leave it out for the defaults
423
423
  * @default undefined
@@ -458,7 +458,7 @@ export declare namespace JSCAD {
458
458
  * Hex color string the geometry is always drawn in, ahead of the drawing options
459
459
  * @default #0000ff
460
460
  */
461
- color: string;
461
+ color?: string | undefined;
462
462
  }
463
463
  /**
464
464
  * Feeds `booleans.union`, `booleans.intersect` and `booleans.subtract` with any number of inputs;
@@ -522,32 +522,30 @@ export declare namespace JSCAD {
522
522
  meshes: JSCADEntity[];
523
523
  }
524
524
  /**
525
- * Feeds `expansions.expand` and `expansions.offset`: the geometry, the signed distance to move its
526
- * boundary by and how the corners are shaped on the way.
525
+ * Feeds `expansions.offset`: the 2D shape or path, the signed distance to build its outline at and
526
+ * how the corners are shaped, kept sharp unless `corners` says otherwise.
527
527
  */
528
528
  class ExpansionDto {
529
529
  constructor(geometry?: JSCADEntity, delta?: number, corners?: solidCornerTypeEnum, segments?: number);
530
530
  /**
531
- * The 2D shape, path or solid to grow; `offset` takes 2D shapes and paths only. It stays as it
532
- * is and a new entity comes back
531
+ * The 2D shape or path to outline; it stays as it is and a new entity comes back
533
532
  * @default undefined
534
533
  */
535
534
  geometry: JSCADEntity;
536
535
  /**
537
536
  * How far the boundary moves, in model units: positive grows the geometry, negative shrinks it
538
- * (a solid accepts positive only)
539
537
  * @default 0.1
540
538
  * @minimum -Infinity
541
539
  * @maximum Infinity
542
540
  * @step 0.1
543
541
  */
544
- delta: number;
542
+ delta?: number | undefined;
545
543
  /**
546
544
  * How a convex corner is shaped: `edge` keeps it sharp, `chamfer` cuts it flat, `round` curves
547
- * it; a solid accepts `round` only
545
+ * it with `segments` pieces
548
546
  * @default edge
549
547
  */
550
- corners: solidCornerTypeEnum;
548
+ corners?: solidCornerTypeEnum | undefined;
551
549
  /**
552
550
  * Number of straight pieces a `round` corner is made of over a full circle; more makes it
553
551
  * smoother
@@ -556,7 +554,43 @@ export declare namespace JSCAD {
556
554
  * @maximum Infinity
557
555
  * @step 1
558
556
  */
559
- segments: number;
557
+ segments?: number | undefined;
558
+ }
559
+ /**
560
+ * Feeds `expansions.expand`: the geometry, the signed distance to move its boundary by and how the
561
+ * corners are shaped, rounded unless `corners` says otherwise.
562
+ */
563
+ class ExpandDto {
564
+ constructor(geometry?: JSCADEntity, delta?: number, corners?: solidCornerTypeEnum, segments?: number);
565
+ /**
566
+ * The 2D shape, path or solid to grow; it stays as it is and a new entity comes back
567
+ * @default undefined
568
+ */
569
+ geometry: JSCADEntity;
570
+ /**
571
+ * How far the boundary moves, in model units: positive grows the geometry, negative shrinks it;
572
+ * a solid or a path accepts a positive value only
573
+ * @default 0.1
574
+ * @minimum -Infinity
575
+ * @maximum Infinity
576
+ * @step 0.1
577
+ */
578
+ delta?: number | undefined;
579
+ /**
580
+ * How a convex corner is shaped: `round` curves it with `segments` pieces, `chamfer` cuts it
581
+ * flat, `edge` keeps it sharp; a solid accepts `round` only
582
+ * @default round
583
+ */
584
+ corners?: solidCornerTypeEnum | undefined;
585
+ /**
586
+ * Number of straight pieces a `round` corner is made of over a full circle; more makes it
587
+ * smoother, and a solid needs at least 4
588
+ * @default 24
589
+ * @minimum 0
590
+ * @maximum Infinity
591
+ * @step 1
592
+ */
593
+ segments?: number | undefined;
560
594
  }
561
595
  /**
562
596
  * Feeds `extrusions.extrudeLinear`: the flat shape, how far it rises along Z and the optional twist
@@ -577,7 +611,7 @@ export declare namespace JSCAD {
577
611
  * @maximum Infinity
578
612
  * @step 0.1
579
613
  */
580
- height: number;
614
+ height?: number | undefined;
581
615
  /**
582
616
  * How far the top is turned relative to the bottom around Z, in degrees; 0 gives a straight
583
617
  * extrusion
@@ -586,16 +620,16 @@ export declare namespace JSCAD {
586
620
  * @maximum Infinity
587
621
  * @step 1
588
622
  */
589
- twistAngle: number;
623
+ twistAngle?: number | undefined;
590
624
  /**
591
625
  * Number of slices the twist is built from, at least 1; more makes a smoother twist and a
592
626
  * heavier mesh
593
627
  * @default 15
594
- * @minimum 0
628
+ * @minimum 1
595
629
  * @maximum Infinity
596
630
  * @step 1
597
631
  */
598
- twistSteps: number;
632
+ twistSteps?: number | undefined;
599
633
  }
600
634
  /**
601
635
  * Feeds `hulls.hull` and `hulls.hullChain` with the entities to wrap, all of one kind: solids, 2D
@@ -622,62 +656,53 @@ export declare namespace JSCAD {
622
656
  mesh: JSCADEntity;
623
657
  }
624
658
  /**
625
- * Feeds `extrusions.extrudeRectangular`: the outline to build a wall along, the wall's height along
626
- * Z and its half thickness.
659
+ * The wall a rectangular extrusion builds, shared by `ExtrudeRectangularDto` and
660
+ * `ExtrudeRectangularPointsDto`: how thick and how tall.
627
661
  */
628
- class ExtrudeRectangularDto {
629
- constructor(geometry?: JSCADEntity, height?: number, size?: number);
630
- /**
631
- * The 2D shape or path whose outline the wall follows; the inside of a shape stays empty
632
- * @default undefined
633
- */
634
- geometry: JSCADEntity;
662
+ abstract class ExtrudeRectangularSharedDto {
635
663
  /**
636
664
  * How tall the wall is along Z, in model units, standing on the XY plane
637
665
  * @default 1
638
666
  * @minimum 0
667
+ * @exclusiveMinimum true
639
668
  * @maximum Infinity
640
669
  * @step 0.1
641
670
  */
642
- height: number;
671
+ height?: number | undefined;
643
672
  /**
644
- * How far the wall reaches to each side of the outline, in model units, so the wall is twice
645
- * this thick
673
+ * How far the wall reaches to each side of the path, in model units, so the wall is twice this
674
+ * thick
646
675
  * @default 1
647
676
  * @minimum 0
677
+ * @exclusiveMinimum true
648
678
  * @maximum Infinity
649
679
  * @step 0.1
650
680
  */
651
- size: number;
681
+ size?: number | undefined;
682
+ }
683
+ /**
684
+ * Feeds `extrusions.extrudeRectangular`: the outline to build a wall along, the wall's height along
685
+ * Z and its half thickness.
686
+ */
687
+ class ExtrudeRectangularDto extends ExtrudeRectangularSharedDto {
688
+ constructor(geometry?: JSCADEntity, height?: number, size?: number);
689
+ /**
690
+ * The 2D shape or path whose outline the wall follows; the inside of a shape stays empty
691
+ * @default undefined
692
+ */
693
+ geometry: JSCADEntity;
652
694
  }
653
695
  /**
654
696
  * Feeds `extrusions.extrudeRectangularPoints`: the points of the line to build a wall along, the
655
697
  * wall's height along Z and its half thickness.
656
698
  */
657
- class ExtrudeRectangularPointsDto {
699
+ class ExtrudeRectangularPointsDto extends ExtrudeRectangularSharedDto {
658
700
  constructor(points?: Base.Point3[], height?: number, size?: number);
659
701
  /**
660
702
  * The corner points of the line the wall follows, in order; only X and Y are used
661
703
  * @default undefined
662
704
  */
663
705
  points: Base.Point3[];
664
- /**
665
- * How tall the wall is along Z, in model units, standing on the XY plane
666
- * @default 1
667
- * @minimum 0
668
- * @maximum Infinity
669
- * @step 0.1
670
- */
671
- height: number;
672
- /**
673
- * How far the wall reaches to each side of the line, in model units, so the wall is twice this
674
- * thick
675
- * @default 1
676
- * @minimum 0
677
- * @maximum Infinity
678
- * @step 0.1
679
- */
680
- size: number;
681
706
  }
682
707
  /**
683
708
  * Feeds `extrusions.extrudeRotate`: the flat profile to spin around the Z axis, how far and from
@@ -698,7 +723,7 @@ export declare namespace JSCAD {
698
723
  * @maximum Infinity
699
724
  * @step 1
700
725
  */
701
- angle: number;
726
+ angle?: number | undefined;
702
727
  /**
703
728
  * Where the revolution starts, in degrees from the X axis
704
729
  * @default 0
@@ -706,16 +731,16 @@ export declare namespace JSCAD {
706
731
  * @maximum Infinity
707
732
  * @step 1
708
733
  */
709
- startAngle: number;
734
+ startAngle?: number | undefined;
710
735
  /**
711
736
  * Number of steps in a full turn; a partial angle uses proportionally fewer. Fewer than 3
712
737
  * throws an error
713
738
  * @default 24
714
- * @minimum 0
739
+ * @minimum 3
715
740
  * @maximum Infinity
716
741
  * @step 1
717
742
  */
718
- segments: number;
743
+ segments?: number | undefined;
719
744
  }
720
745
  /**
721
746
  * Feeds `polygon.createFromPolyline` with the polyline whose points become the outline of a filled
@@ -744,11 +769,11 @@ export declare namespace JSCAD {
744
769
  * around it.
745
770
  */
746
771
  class PointsDto {
747
- constructor(points?: Base.Point3[]);
772
+ constructor(points?: (Base.Point2 | Base.Point3)[]);
748
773
  /**
749
- * The outline points in order, at least three; only X and Y are used
774
+ * The outline points in order, at least three, each 2D or 3D; only X and Y are used
750
775
  */
751
- points: Base.Point3[];
776
+ points: (Base.Point2 | Base.Point3)[];
752
777
  }
753
778
  /**
754
779
  * Feeds `path.close` and `polygon.createFromPath` with the one 2D path to work on; a 2D shape or a
@@ -778,7 +803,7 @@ export declare namespace JSCAD {
778
803
  * When true, the last point joins back to the first and the path accepts no more points
779
804
  * @default false
780
805
  */
781
- closed: boolean;
806
+ closed?: boolean | undefined;
782
807
  }
783
808
  /**
784
809
  * Feeds `path.createPathsFromPoints` with several point lists, one 2D path each; a list ending on
@@ -809,7 +834,7 @@ export declare namespace JSCAD {
809
834
  * When true, the last point joins back to the first and the path accepts no more points
810
835
  * @default false
811
836
  */
812
- closed: boolean;
837
+ closed?: boolean | undefined;
813
838
  }
814
839
  /**
815
840
  * Feeds `path.appendPoints`: an open 2D path and the points to add after its last point.
@@ -861,7 +886,7 @@ export declare namespace JSCAD {
861
886
  * Where the arc ends, as a 2D point in the XY plane
862
887
  * @default [1, 1]
863
888
  */
864
- endPoint: Base.Point2;
889
+ endPoint?: Base.Point2 | undefined;
865
890
  /**
866
891
  * Tilt of the ellipse the arc is cut from, in degrees from the X axis; it changes nothing for a
867
892
  * circle
@@ -870,44 +895,44 @@ export declare namespace JSCAD {
870
895
  * @maximum Infinity
871
896
  * @step 1
872
897
  */
873
- xAxisRotation: number;
898
+ xAxisRotation?: number | undefined;
874
899
  /**
875
900
  * When true, the arc turns clockwise from the start to the end point; false turns
876
901
  * counter-clockwise
877
902
  * @default true
878
903
  */
879
- clockwise: boolean;
904
+ clockwise?: boolean | undefined;
880
905
  /**
881
906
  * When true, the longer of the two arcs between the points is taken, more than half the ellipse
882
907
  * @default false
883
908
  */
884
- large: boolean;
909
+ large?: boolean | undefined;
885
910
  /**
886
911
  * Number of straight pieces for a full ellipse; the arc gets its proportional share
887
912
  * @default 24
888
- * @minimum 0
913
+ * @minimum 4
889
914
  * @maximum Infinity
890
915
  * @step 1
891
916
  */
892
- segments: number;
917
+ segments?: number | undefined;
893
918
  /**
894
919
  * Half width of the ellipse along its own X axis, in model units; scaled up when too small to
895
920
  * reach the end point
896
921
  * @default 1
897
- * @minimum -Infinity
922
+ * @minimum 0
898
923
  * @maximum Infinity
899
924
  * @step 0.1
900
925
  */
901
- radiusX: number;
926
+ radiusX?: number | undefined;
902
927
  /**
903
928
  * Half height of the ellipse along its own Y axis, in model units; equal to `radiusX` for a
904
929
  * circular arc
905
930
  * @default 1
906
- * @minimum -Infinity
931
+ * @minimum 0
907
932
  * @maximum Infinity
908
933
  * @step 0.1
909
934
  */
910
- radiusY: number;
935
+ radiusY?: number | undefined;
911
936
  }
912
937
  /**
913
938
  * Feeds `polygon.circle`: a filled circle in the XY plane, given by its 2D center, radius and the
@@ -919,23 +944,23 @@ export declare namespace JSCAD {
919
944
  * The 2D center point, as X and Y in the plane
920
945
  * @default [0, 0]
921
946
  */
922
- center: Base.Point2;
947
+ center?: Base.Point2 | undefined;
923
948
  /**
924
949
  * Distance from the center to the rim, in model units
925
950
  * @default 1
926
- * @minimum -Infinity
951
+ * @minimum 0
927
952
  * @maximum Infinity
928
953
  * @step 0.1
929
954
  */
930
- radius: number;
955
+ radius?: number | undefined;
931
956
  /**
932
957
  * Number of straight sides around the circle; more makes it rounder
933
958
  * @default 24
934
- * @minimum 0
959
+ * @minimum 3
935
960
  * @maximum Infinity
936
961
  * @step 1
937
962
  */
938
- segments: number;
963
+ segments?: number | undefined;
939
964
  }
940
965
  /**
941
966
  * Feeds `polygon.ellipse`: a filled ellipse in the XY plane, given by its 2D center, its two
@@ -947,20 +972,20 @@ export declare namespace JSCAD {
947
972
  * The 2D center point, as X and Y in the plane
948
973
  * @default [0, 0]
949
974
  */
950
- center: Base.Point2;
975
+ center?: Base.Point2 | undefined;
951
976
  /**
952
977
  * The half width along X and the half height along Y, in model units, as `[x, y]`
953
978
  * @default [1, 2]
954
979
  */
955
- radius: Base.Point2;
980
+ radius?: Base.Point2 | undefined;
956
981
  /**
957
982
  * Number of straight sides around the ellipse; more makes it rounder
958
983
  * @default 24
959
- * @minimum 0
984
+ * @minimum 3
960
985
  * @maximum Infinity
961
986
  * @step 1
962
987
  */
963
- segments: number;
988
+ segments?: number | undefined;
964
989
  }
965
990
  /**
966
991
  * Feeds `polygon.square`: a filled square in the XY plane with sides parallel to the axes, given by
@@ -972,15 +997,15 @@ export declare namespace JSCAD {
972
997
  * The 2D center point, as X and Y in the plane
973
998
  * @default [0, 0]
974
999
  */
975
- center: Base.Point2;
1000
+ center?: Base.Point2 | undefined;
976
1001
  /**
977
1002
  * Length of each side, in model units
978
1003
  * @default 1
979
- * @minimum -Infinity
1004
+ * @minimum 0
980
1005
  * @maximum Infinity
981
1006
  * @step 0.1
982
1007
  */
983
- size: number;
1008
+ size?: number | undefined;
984
1009
  }
985
1010
  /**
986
1011
  * Feeds `polygon.rectangle`: a filled rectangle in the XY plane with sides parallel to the axes,
@@ -992,23 +1017,23 @@ export declare namespace JSCAD {
992
1017
  * The 2D center point, as X and Y in the plane
993
1018
  * @default [0, 0]
994
1019
  */
995
- center: Base.Point2;
1020
+ center?: Base.Point2 | undefined;
996
1021
  /**
997
1022
  * Full size along X, in model units
998
1023
  * @default 1
999
- * @minimum -Infinity
1024
+ * @minimum 0
1000
1025
  * @maximum Infinity
1001
1026
  * @step 0.1
1002
1027
  */
1003
- width: number;
1028
+ width?: number | undefined;
1004
1029
  /**
1005
1030
  * Full size along Y, in model units
1006
1031
  * @default 1
1007
- * @minimum -Infinity
1032
+ * @minimum 0
1008
1033
  * @maximum Infinity
1009
1034
  * @step 0.1
1010
1035
  */
1011
- length: number;
1036
+ length?: number | undefined;
1012
1037
  }
1013
1038
  /**
1014
1039
  * Feeds `polygon.roundedRectangle`: a filled rectangle in the XY plane whose four corners are
@@ -1021,41 +1046,41 @@ export declare namespace JSCAD {
1021
1046
  * The 2D center point, as X and Y in the plane
1022
1047
  * @default [0, 0]
1023
1048
  */
1024
- center: Base.Point2;
1049
+ center?: Base.Point2 | undefined;
1025
1050
  /**
1026
1051
  * Radius of each rounded corner, in model units; it must be less than half of the smaller side
1027
1052
  * or an error is thrown
1028
1053
  * @default 0.2
1029
- * @minimum -Infinity
1054
+ * @minimum 0
1030
1055
  * @maximum Infinity
1031
1056
  * @step 0.1
1032
1057
  */
1033
- roundRadius: number;
1058
+ roundRadius?: number | undefined;
1034
1059
  /**
1035
1060
  * Number of straight pieces a full circle of rounding is made of, so each corner gets a
1036
1061
  * quarter; more makes it smoother
1037
1062
  * @default 24
1038
- * @minimum 0
1063
+ * @minimum 4
1039
1064
  * @maximum Infinity
1040
1065
  * @step 1
1041
1066
  */
1042
- segments: number;
1067
+ segments?: number | undefined;
1043
1068
  /**
1044
1069
  * Full size along X, in model units
1045
1070
  * @default 1
1046
- * @minimum -Infinity
1071
+ * @minimum 0
1047
1072
  * @maximum Infinity
1048
1073
  * @step 0.1
1049
1074
  */
1050
- width: number;
1075
+ width?: number | undefined;
1051
1076
  /**
1052
1077
  * Full size along Y, in model units
1053
1078
  * @default 1
1054
- * @minimum -Infinity
1079
+ * @minimum 0
1055
1080
  * @maximum Infinity
1056
1081
  * @step 0.1
1057
1082
  */
1058
- length: number;
1083
+ length?: number | undefined;
1059
1084
  }
1060
1085
  /**
1061
1086
  * Feeds `polygon.star`: a filled star in the XY plane, given by its 2D center, how many tips it
@@ -1067,15 +1092,15 @@ export declare namespace JSCAD {
1067
1092
  * The 2D center point, as X and Y in the plane
1068
1093
  * @default [0, 0]
1069
1094
  */
1070
- center: Base.Point2;
1095
+ center?: Base.Point2 | undefined;
1071
1096
  /**
1072
1097
  * Number of tips; the star has as many notches between them
1073
1098
  * @default 10
1074
- * @minimum 0
1099
+ * @minimum 2
1075
1100
  * @maximum Infinity
1076
1101
  * @step 1
1077
1102
  */
1078
- vertices: number;
1103
+ vertices?: number | undefined;
1079
1104
  /**
1080
1105
  * Read only when `innerRadius` is 0: how many tips apart the edges connect, 2 for a pentagram,
1081
1106
  * from which the notch radius is derived
@@ -1084,15 +1109,16 @@ export declare namespace JSCAD {
1084
1109
  * @maximum Infinity
1085
1110
  * @step 0.1
1086
1111
  */
1087
- density: number;
1112
+ density?: number | undefined;
1088
1113
  /**
1089
1114
  * Distance from the center to each tip, in model units
1090
1115
  * @default 2
1091
1116
  * @minimum 0
1117
+ * @exclusiveMinimum true
1092
1118
  * @maximum Infinity
1093
1119
  * @step 0.1
1094
1120
  */
1095
- outerRadius: number;
1121
+ outerRadius?: number | undefined;
1096
1122
  /**
1097
1123
  * Distance from the center to each notch, in model units; 0 lets `density` decide it
1098
1124
  * @default 1
@@ -1100,15 +1126,15 @@ export declare namespace JSCAD {
1100
1126
  * @maximum Infinity
1101
1127
  * @step 0.1
1102
1128
  */
1103
- innerRadius: number;
1129
+ innerRadius?: number | undefined;
1104
1130
  /**
1105
1131
  * Direction of the first tip, in degrees counter-clockwise from the X axis
1106
1132
  * @default 0
1107
- * @minimum -Infinity
1133
+ * @minimum 0
1108
1134
  * @maximum Infinity
1109
1135
  * @step 1
1110
1136
  */
1111
- startAngle: number;
1137
+ startAngle?: number | undefined;
1112
1138
  }
1113
1139
  /**
1114
1140
  * Feeds `shapes.cube`: a cube with faces parallel to the axes, given by its center point and edge
@@ -1120,15 +1146,15 @@ export declare namespace JSCAD {
1120
1146
  * The point the cube is centered on, so half the edge length lies on each side of it
1121
1147
  * @default [0, 0, 0]
1122
1148
  */
1123
- center: Base.Point3;
1149
+ center?: Base.Point3 | undefined;
1124
1150
  /**
1125
1151
  * Length of every edge, in model units
1126
1152
  * @default 1
1127
- * @minimum -Infinity
1153
+ * @minimum 0
1128
1154
  * @maximum Infinity
1129
1155
  * @step 0.1
1130
1156
  */
1131
- size: number;
1157
+ size?: number | undefined;
1132
1158
  }
1133
1159
  /**
1134
1160
  * Feeds `shapes.cubesOnCenterPoints`: one cube of the same edge length on every center point,
@@ -1148,19 +1174,12 @@ export declare namespace JSCAD {
1148
1174
  * @maximum Infinity
1149
1175
  * @step 0.1
1150
1176
  */
1151
- size: number;
1177
+ size?: number | undefined;
1152
1178
  }
1153
1179
  /**
1154
- * Feeds `shapes.cuboid`: a box with faces parallel to the axes, given by its center point and its
1155
- * sizes along X, Y and Z.
1180
+ * The size of a box, shared by `CuboidDto` and `CuboidCentersDto`.
1156
1181
  */
1157
- class CuboidDto {
1158
- constructor(center?: Base.Point3, width?: number, length?: number, height?: number);
1159
- /**
1160
- * The point the box is centered on, so half of each size lies on each side of it
1161
- * @default [0, 0, 0]
1162
- */
1163
- center: Base.Point3;
1182
+ abstract class CuboidSharedDto {
1164
1183
  /**
1165
1184
  * Full size along X, in model units
1166
1185
  * @default 1
@@ -1168,7 +1187,7 @@ export declare namespace JSCAD {
1168
1187
  * @maximum Infinity
1169
1188
  * @step 0.1
1170
1189
  */
1171
- width: number;
1190
+ width?: number | undefined;
1172
1191
  /**
1173
1192
  * Full size along Z, in model units
1174
1193
  * @default 1
@@ -1176,7 +1195,7 @@ export declare namespace JSCAD {
1176
1195
  * @maximum Infinity
1177
1196
  * @step 0.1
1178
1197
  */
1179
- length: number;
1198
+ length?: number | undefined;
1180
1199
  /**
1181
1200
  * Full size along Y, in model units
1182
1201
  * @default 1
@@ -1184,55 +1203,37 @@ export declare namespace JSCAD {
1184
1203
  * @maximum Infinity
1185
1204
  * @step 0.1
1186
1205
  */
1187
- height: number;
1206
+ height?: number | undefined;
1207
+ }
1208
+ /**
1209
+ * Feeds `shapes.cuboid`: a box with faces parallel to the axes, given by its center point and its
1210
+ * sizes along X, Y and Z.
1211
+ */
1212
+ class CuboidDto extends CuboidSharedDto {
1213
+ constructor(center?: Base.Point3, width?: number, length?: number, height?: number);
1214
+ /**
1215
+ * The point the box is centered on, so half of each size lies on each side of it
1216
+ * @default [0, 0, 0]
1217
+ */
1218
+ center?: Base.Point3 | undefined;
1188
1219
  }
1189
1220
  /**
1190
1221
  * Feeds `shapes.cuboidsOnCenterPoints`: one box of the same sizes on every center point, coming
1191
1222
  * back in the same order.
1192
1223
  */
1193
- class CuboidCentersDto {
1224
+ class CuboidCentersDto extends CuboidSharedDto {
1194
1225
  constructor(centers?: Base.Point3[], width?: number, length?: number, height?: number);
1195
1226
  /**
1196
1227
  * The points the boxes are centered on, one box each, in the order the results come back
1197
1228
  * @default undefined
1198
1229
  */
1199
1230
  centers: Base.Point3[];
1200
- /**
1201
- * Full size of every box along X, in model units
1202
- * @default 1
1203
- * @minimum 0
1204
- * @maximum Infinity
1205
- * @step 0.1
1206
- */
1207
- width: number;
1208
- /**
1209
- * Full size of every box along Z, in model units
1210
- * @default 1
1211
- * @minimum 0
1212
- * @maximum Infinity
1213
- * @step 0.1
1214
- */
1215
- length: number;
1216
- /**
1217
- * Full size of every box along Y, in model units
1218
- * @default 1
1219
- * @minimum 0
1220
- * @maximum Infinity
1221
- * @step 0.1
1222
- */
1223
- height: number;
1224
1231
  }
1225
1232
  /**
1226
- * Feeds `shapes.roundedCuboid`: a box with every edge and corner rounded, given by its center, its
1227
- * sizes along X, Y and Z, the rounding radius and how finely the rounding is faceted.
1233
+ * The size and rounding of a rounded box, shared by `RoundedCuboidDto` and
1234
+ * `RoundedCuboidCentersDto`.
1228
1235
  */
1229
- class RoundedCuboidDto {
1230
- constructor(center?: Base.Point3, roundRadius?: number, width?: number, length?: number, height?: number, segments?: number);
1231
- /**
1232
- * The point the box is centered on, so half of each size lies on each side of it
1233
- * @default [0, 0, 0]
1234
- */
1235
- center: Base.Point3;
1236
+ abstract class RoundedCuboidSharedDto {
1236
1237
  /**
1237
1238
  * Radius of the rounding on every edge, in model units; it must be less than half of the
1238
1239
  * smallest side or an error is thrown
@@ -1241,7 +1242,7 @@ export declare namespace JSCAD {
1241
1242
  * @maximum Infinity
1242
1243
  * @step 0.1
1243
1244
  */
1244
- roundRadius: number;
1245
+ roundRadius?: number | undefined;
1245
1246
  /**
1246
1247
  * Full size along X, in model units, rounding included
1247
1248
  * @default 1
@@ -1249,7 +1250,7 @@ export declare namespace JSCAD {
1249
1250
  * @maximum Infinity
1250
1251
  * @step 0.1
1251
1252
  */
1252
- width: number;
1253
+ width?: number | undefined;
1253
1254
  /**
1254
1255
  * Full size along Z, in model units, rounding included
1255
1256
  * @default 1
@@ -1257,7 +1258,7 @@ export declare namespace JSCAD {
1257
1258
  * @maximum Infinity
1258
1259
  * @step 0.1
1259
1260
  */
1260
- length: number;
1261
+ length?: number | undefined;
1261
1262
  /**
1262
1263
  * Full size along Y, in model units, rounding included
1263
1264
  * @default 1
@@ -1265,68 +1266,39 @@ export declare namespace JSCAD {
1265
1266
  * @maximum Infinity
1266
1267
  * @step 0.1
1267
1268
  */
1268
- height: number;
1269
+ height?: number | undefined;
1269
1270
  /**
1270
1271
  * Number of straight pieces a full circle of rounding is made of; more makes the edges smoother
1271
1272
  * @default 24
1272
- * @minimum 0
1273
+ * @minimum 4
1273
1274
  * @maximum Infinity
1274
1275
  * @step 1
1275
1276
  */
1276
- segments: number;
1277
+ segments?: number | undefined;
1278
+ }
1279
+ /**
1280
+ * Feeds `shapes.roundedCuboid`: a box with every edge and corner rounded, given by its center, its
1281
+ * sizes along X, Y and Z, the rounding radius and how finely the rounding is faceted.
1282
+ */
1283
+ class RoundedCuboidDto extends RoundedCuboidSharedDto {
1284
+ constructor(center?: Base.Point3, roundRadius?: number, width?: number, length?: number, height?: number, segments?: number);
1285
+ /**
1286
+ * The point the box is centered on, so half of each size lies on each side of it
1287
+ * @default [0, 0, 0]
1288
+ */
1289
+ center?: Base.Point3 | undefined;
1277
1290
  }
1278
1291
  /**
1279
1292
  * Feeds `shapes.roundedCuboidsOnCenterPoints`: one rounded box of the same sizes and rounding on
1280
1293
  * every center point, coming back in the same order.
1281
1294
  */
1282
- class RoundedCuboidCentersDto {
1295
+ class RoundedCuboidCentersDto extends RoundedCuboidSharedDto {
1283
1296
  constructor(centers?: Base.Point3[], roundRadius?: number, width?: number, length?: number, height?: number, segments?: number);
1284
1297
  /**
1285
1298
  * The points the boxes are centered on, one box each, in the order the results come back
1286
1299
  * @default undefined
1287
1300
  */
1288
1301
  centers: Base.Point3[];
1289
- /**
1290
- * Radius of the rounding on every edge, in model units; it must be less than half of the
1291
- * smallest side or an error is thrown
1292
- * @default 0.1
1293
- * @minimum 0
1294
- * @maximum Infinity
1295
- * @step 0.1
1296
- */
1297
- roundRadius: number;
1298
- /**
1299
- * Full size of every box along X, in model units, rounding included
1300
- * @default 1
1301
- * @minimum 0
1302
- * @maximum Infinity
1303
- * @step 0.1
1304
- */
1305
- width: number;
1306
- /**
1307
- * Full size of every box along Z, in model units, rounding included
1308
- * @default 1
1309
- * @minimum 0
1310
- * @maximum Infinity
1311
- * @step 0.1
1312
- */
1313
- length: number;
1314
- /**
1315
- * Full size of every box along Y, in model units, rounding included
1316
- * @default 1
1317
- * @minimum 0
1318
- * @maximum Infinity
1319
- * @step 0.1
1320
- */
1321
- height: number;
1322
- /**
1323
- * Number of straight pieces a full circle of rounding is made of; more makes the edges smoother
1324
- * @default 24
1325
- * @minimum 0
1326
- * @maximum Infinity
1327
- * @step 1
1328
- */
1329
- segments: number;
1330
1302
  }
1331
1303
  /**
1332
1304
  * Feeds `shapes.cylinderElliptic`: a cylinder standing along Z with an elliptical cross-section
@@ -1338,33 +1310,34 @@ export declare namespace JSCAD {
1338
1310
  * The point halfway up the axis; half the height lies above it along Z and half below
1339
1311
  * @default [0, 0, 0]
1340
1312
  */
1341
- center: Base.Point3;
1313
+ center?: Base.Point3 | undefined;
1342
1314
  /**
1343
1315
  * Full length along Z, in model units
1344
1316
  * @default 1
1345
1317
  * @minimum 0
1318
+ * @exclusiveMinimum true
1346
1319
  * @maximum Infinity
1347
1320
  * @step 0.1
1348
1321
  */
1349
- height: number;
1322
+ height?: number | undefined;
1350
1323
  /**
1351
1324
  * The X and Y radii of the bottom end, in model units, as `[x, y]`
1352
1325
  * @default [1, 2]
1353
1326
  */
1354
- startRadius: Base.Vector2;
1327
+ startRadius?: Base.Vector2 | undefined;
1355
1328
  /**
1356
1329
  * The X and Y radii of the top end, in model units, as `[x, y]`; `[0, 0]` closes it to a point
1357
1330
  * @default [2, 3]
1358
1331
  */
1359
- endRadius: Base.Vector2;
1332
+ endRadius?: Base.Vector2 | undefined;
1360
1333
  /**
1361
1334
  * Number of flat sides around the cylinder; more makes it rounder
1362
1335
  * @default 24
1363
- * @minimum 0
1336
+ * @minimum 4
1364
1337
  * @maximum Infinity
1365
1338
  * @step 1
1366
1339
  */
1367
- segments: number;
1340
+ segments?: number | undefined;
1368
1341
  }
1369
1342
  /**
1370
1343
  * Feeds `shapes.cylinderEllipticOnCenterPoints`: one elliptic cylinder of the same size on every
@@ -1381,41 +1354,35 @@ export declare namespace JSCAD {
1381
1354
  * Full length of every cylinder along Z, in model units
1382
1355
  * @default 1
1383
1356
  * @minimum 0
1357
+ * @exclusiveMinimum true
1384
1358
  * @maximum Infinity
1385
1359
  * @step 0.1
1386
1360
  */
1387
- height: number;
1361
+ height?: number | undefined;
1388
1362
  /**
1389
1363
  * The X and Y radii of every bottom end, in model units, as `[x, y]`
1390
1364
  * @default [1, 2]
1391
1365
  */
1392
- startRadius: Base.Point2;
1366
+ startRadius?: Base.Point2 | undefined;
1393
1367
  /**
1394
1368
  * The X and Y radii of every top end, in model units, as `[x, y]`; `[0, 0]` closes them to a
1395
1369
  * point
1396
1370
  * @default [2, 3]
1397
1371
  */
1398
- endRadius: Base.Point2;
1372
+ endRadius?: Base.Point2 | undefined;
1399
1373
  /**
1400
1374
  * Number of flat sides around each cylinder; more makes them rounder
1401
1375
  * @default 24
1402
- * @minimum 0
1376
+ * @minimum 4
1403
1377
  * @maximum Infinity
1404
1378
  * @step 1
1405
1379
  */
1406
- segments: number;
1380
+ segments?: number | undefined;
1407
1381
  }
1408
1382
  /**
1409
- * Feeds `shapes.cylinder`: a round cylinder standing along Z, given by the point halfway up its
1410
- * axis, its height, its radius and how many flat sides approximate it.
1383
+ * The size and smoothness of a cylinder, shared by `CylidnerDto` and `CylidnerCentersDto`.
1411
1384
  */
1412
- class CylidnerDto {
1413
- constructor(center?: Base.Point3, height?: number, radius?: number, segments?: number);
1414
- /**
1415
- * The point halfway up the axis; half the height lies above it along Z and half below
1416
- * @default [0, 0, 0]
1417
- */
1418
- center: Base.Point3;
1385
+ abstract class CylinderSharedDto {
1419
1386
  /**
1420
1387
  * Full length along Z, in model units
1421
1388
  * @default 1
@@ -1423,7 +1390,7 @@ export declare namespace JSCAD {
1423
1390
  * @maximum Infinity
1424
1391
  * @step 0.1
1425
1392
  */
1426
- height: number;
1393
+ height?: number | undefined;
1427
1394
  /**
1428
1395
  * Distance from the axis to the side, in model units
1429
1396
  * @default 1
@@ -1431,28 +1398,33 @@ export declare namespace JSCAD {
1431
1398
  * @maximum Infinity
1432
1399
  * @step 0.1
1433
1400
  */
1434
- radius: number;
1401
+ radius?: number | undefined;
1435
1402
  /**
1436
1403
  * Number of flat sides around the cylinder; more makes it rounder
1437
1404
  * @default 24
1438
- * @minimum 0
1405
+ * @minimum 4
1439
1406
  * @maximum Infinity
1440
1407
  * @step 1
1441
1408
  */
1442
- segments: number;
1409
+ segments?: number | undefined;
1443
1410
  }
1444
1411
  /**
1445
- * Feeds `shapes.roundedCylinder`: a cylinder standing along Z whose two rims are rounded, given by
1446
- * the point halfway up its axis, the rounding radius, its height and radius and how finely it is
1447
- * faceted.
1412
+ * Feeds `shapes.cylinder`: a round cylinder standing along Z, given by the point halfway up its
1413
+ * axis, its height, its radius and how many flat sides approximate it.
1448
1414
  */
1449
- class RoundedCylidnerDto {
1450
- constructor(center?: Base.Point3, roundRadius?: number, height?: number, radius?: number, segments?: number);
1415
+ class CylidnerDto extends CylinderSharedDto {
1416
+ constructor(center?: Base.Point3, height?: number, radius?: number, segments?: number);
1451
1417
  /**
1452
1418
  * The point halfway up the axis; half the height lies above it along Z and half below
1453
1419
  * @default [0, 0, 0]
1454
1420
  */
1455
- center: Base.Point3;
1421
+ center?: Base.Point3 | undefined;
1422
+ }
1423
+ /**
1424
+ * The size, rounding and smoothness of a rounded cylinder, shared by `RoundedCylidnerDto` and
1425
+ * `RoundedCylidnerCentersDto`.
1426
+ */
1427
+ abstract class RoundedCylinderSharedDto {
1456
1428
  /**
1457
1429
  * Radius of the rounding on both rims, in model units; the height must be more than twice it or
1458
1430
  * an error is thrown
@@ -1461,7 +1433,7 @@ export declare namespace JSCAD {
1461
1433
  * @maximum Infinity
1462
1434
  * @step 0.1
1463
1435
  */
1464
- roundRadius: number;
1436
+ roundRadius?: number | undefined;
1465
1437
  /**
1466
1438
  * Full length along Z, in model units, rounding included
1467
1439
  * @default 1
@@ -1469,7 +1441,7 @@ export declare namespace JSCAD {
1469
1441
  * @maximum Infinity
1470
1442
  * @step 0.1
1471
1443
  */
1472
- height: number;
1444
+ height?: number | undefined;
1473
1445
  /**
1474
1446
  * Distance from the axis to the side, in model units
1475
1447
  * @default 1
@@ -1477,77 +1449,76 @@ export declare namespace JSCAD {
1477
1449
  * @maximum Infinity
1478
1450
  * @step 0.1
1479
1451
  */
1480
- radius: number;
1452
+ radius?: number | undefined;
1481
1453
  /**
1482
1454
  * Number of flat sides around the cylinder and pieces in the rounding; more makes it smoother
1483
1455
  * @default 24
1484
- * @minimum 0
1456
+ * @minimum 4
1485
1457
  * @maximum Infinity
1486
1458
  * @step 1
1487
1459
  */
1488
- segments: number;
1460
+ segments?: number | undefined;
1489
1461
  }
1490
1462
  /**
1491
- * Feeds `shapes.ellipsoid`: a sphere stretched separately along X, Y and Z, given by its center,
1492
- * its three radii and how finely it is faceted.
1463
+ * Feeds `shapes.roundedCylinder`: a cylinder standing along Z whose two rims are rounded, given by
1464
+ * the point halfway up its axis, the rounding radius, its height and radius and how finely it is
1465
+ * faceted.
1493
1466
  */
1494
- class EllipsoidDto {
1495
- constructor(center?: Base.Point3, radius?: Base.Point3, segments?: number);
1467
+ class RoundedCylidnerDto extends RoundedCylinderSharedDto {
1468
+ constructor(center?: Base.Point3, roundRadius?: number, height?: number, radius?: number, segments?: number);
1496
1469
  /**
1497
- * The point the ellipsoid is centered on
1470
+ * The point halfway up the axis; half the height lies above it along Z and half below
1498
1471
  * @default [0, 0, 0]
1499
1472
  */
1500
- center: Base.Point3;
1473
+ center?: Base.Point3 | undefined;
1474
+ }
1475
+ /**
1476
+ * The size and smoothness of an ellipsoid, shared by `EllipsoidDto` and `EllipsoidCentersDto`.
1477
+ */
1478
+ abstract class EllipsoidSharedDto {
1501
1479
  /**
1502
1480
  * The half sizes along X, Y and Z, in model units, as `[x, y, z]`; equal values make a sphere
1503
1481
  * @default [1, 2, 3]
1504
1482
  */
1505
- radius: Base.Point3;
1483
+ radius?: Base.Point3 | undefined;
1506
1484
  /**
1507
1485
  * Number of facets around the ellipsoid; more makes it smoother
1508
1486
  * @default 24
1509
- * @minimum 0
1487
+ * @minimum 4
1510
1488
  * @maximum Infinity
1511
1489
  * @step 1
1512
1490
  */
1513
- segments: number;
1491
+ segments?: number | undefined;
1492
+ }
1493
+ /**
1494
+ * Feeds `shapes.ellipsoid`: a sphere stretched separately along X, Y and Z, given by its center,
1495
+ * its three radii and how finely it is faceted.
1496
+ */
1497
+ class EllipsoidDto extends EllipsoidSharedDto {
1498
+ constructor(center?: Base.Point3, radius?: Base.Point3, segments?: number);
1499
+ /**
1500
+ * The point the ellipsoid is centered on
1501
+ * @default [0, 0, 0]
1502
+ */
1503
+ center?: Base.Point3 | undefined;
1514
1504
  }
1515
1505
  /**
1516
1506
  * Feeds `shapes.ellipsoidsOnCenterPoints`: one ellipsoid of the same radii on every center point,
1517
1507
  * coming back in the same order.
1518
1508
  */
1519
- class EllipsoidCentersDto {
1509
+ class EllipsoidCentersDto extends EllipsoidSharedDto {
1520
1510
  constructor(centers?: Base.Point3[], radius?: Base.Point3, segments?: number);
1521
1511
  /**
1522
1512
  * The points the ellipsoids are centered on, one each, in the order the results come back
1523
1513
  * @default undefined
1524
1514
  */
1525
1515
  centers: Base.Point3[];
1526
- /**
1527
- * The half sizes of every ellipsoid along X, Y and Z, in model units, as `[x, y, z]`
1528
- * @default [1, 2, 3]
1529
- */
1530
- radius: Base.Point3;
1531
- /**
1532
- * Number of facets around each ellipsoid; more makes them smoother
1533
- * @default 24
1534
- * @minimum 0
1535
- * @maximum Infinity
1536
- * @step 1
1537
- */
1538
- segments: number;
1539
1516
  }
1540
1517
  /**
1541
- * Feeds `shapes.geodesicSphere`: a sphere made of evenly sized triangles, given by its center, its
1542
- * radius and how finely the twenty starting faces are subdivided.
1518
+ * The size and subdivision of a geodesic sphere, shared by `GeodesicSphereDto` and
1519
+ * `GeodesicSphereCentersDto`.
1543
1520
  */
1544
- class GeodesicSphereDto {
1545
- constructor(center?: Base.Point3, radius?: number, frequency?: number);
1546
- /**
1547
- * The point the sphere is centered on
1548
- * @default [0, 0, 0]
1549
- */
1550
- center: Base.Point3;
1521
+ abstract class GeodesicSphereSharedDto {
1551
1522
  /**
1552
1523
  * Distance from the center to the surface, in model units
1553
1524
  * @default 1
@@ -1555,183 +1526,109 @@ export declare namespace JSCAD {
1555
1526
  * @maximum Infinity
1556
1527
  * @step 0.1
1557
1528
  */
1558
- radius: number;
1529
+ radius?: number | undefined;
1559
1530
  /**
1560
1531
  * How finely each of the twenty starting faces is subdivided; used in whole multiples of 6, at
1561
1532
  * least 6, and higher is rounder
1562
1533
  * @default 12
1563
- * @minimum 0
1534
+ * @minimum 6
1564
1535
  * @maximum Infinity
1565
1536
  * @step 1
1566
1537
  */
1567
- frequency: number;
1538
+ frequency?: number | undefined;
1539
+ }
1540
+ /**
1541
+ * Feeds `shapes.geodesicSphere`: a sphere made of evenly sized triangles, given by its center, its
1542
+ * radius and how finely the twenty starting faces are subdivided.
1543
+ */
1544
+ class GeodesicSphereDto extends GeodesicSphereSharedDto {
1545
+ constructor(center?: Base.Point3, radius?: number, frequency?: number);
1546
+ /**
1547
+ * The point the sphere is centered on
1548
+ * @default [0, 0, 0]
1549
+ */
1550
+ center?: Base.Point3 | undefined;
1568
1551
  }
1569
1552
  /**
1570
1553
  * Feeds `shapes.geodesicSpheresOnCenterPoints`: one geodesic sphere of the same radius on every
1571
1554
  * center point, coming back in the same order.
1572
1555
  */
1573
- class GeodesicSphereCentersDto {
1556
+ class GeodesicSphereCentersDto extends GeodesicSphereSharedDto {
1574
1557
  constructor(centers?: Base.Point3[], radius?: number, frequency?: number);
1575
1558
  /**
1576
1559
  * The points the spheres are centered on, one each, in the order the results come back
1577
1560
  * @default undefined
1578
1561
  */
1579
1562
  centers: Base.Point3[];
1580
- /**
1581
- * Distance from each center to its surface, in model units
1582
- * @default 1
1583
- * @minimum 0
1584
- * @maximum Infinity
1585
- * @step 0.1
1586
- */
1587
- radius: number;
1588
- /**
1589
- * How finely each of the twenty starting faces is subdivided; used in whole multiples of 6, at
1590
- * least 6, and higher is rounder
1591
- * @default 12
1592
- * @minimum 0
1593
- * @maximum Infinity
1594
- * @step 0.1
1595
- */
1596
- frequency: number;
1597
1563
  }
1598
1564
  /**
1599
1565
  * Feeds `shapes.cylindersOnCenterPoints`: one round cylinder of the same size standing along Z on
1600
1566
  * every center point, coming back in the same order.
1601
1567
  */
1602
- class CylidnerCentersDto {
1568
+ class CylidnerCentersDto extends CylinderSharedDto {
1603
1569
  constructor(centers?: Base.Point3[], height?: number, radius?: number, segments?: number);
1604
1570
  /**
1605
1571
  * The points halfway up each axis, one cylinder each, in the order the results come back
1606
1572
  * @default undefined
1607
1573
  */
1608
1574
  centers: Base.Point3[];
1609
- /**
1610
- * Full length of every cylinder along Z, in model units
1611
- * @default 1
1612
- * @minimum 0
1613
- * @maximum Infinity
1614
- * @step 0.1
1615
- */
1616
- height: number;
1617
- /**
1618
- * Distance from the axis to the side of every cylinder, in model units
1619
- * @default 1
1620
- * @minimum 0
1621
- * @maximum Infinity
1622
- * @step 0.1
1623
- */
1624
- radius: number;
1625
- /**
1626
- * Number of flat sides around each cylinder; more makes them rounder
1627
- * @default 24
1628
- * @minimum 0
1629
- * @maximum Infinity
1630
- * @step 1
1631
- */
1632
- segments: number;
1633
1575
  }
1634
1576
  /**
1635
1577
  * Feeds `shapes.roundedCylindersOnCenterPoints`: one rounded cylinder of the same size on every
1636
1578
  * center point, coming back in the same order.
1637
1579
  */
1638
- class RoundedCylidnerCentersDto {
1580
+ class RoundedCylidnerCentersDto extends RoundedCylinderSharedDto {
1639
1581
  constructor(centers?: Base.Point3[], roundRadius?: number, height?: number, radius?: number, segments?: number);
1640
1582
  /**
1641
1583
  * The points halfway up each axis, one cylinder each, in the order the results come back
1642
1584
  * @default undefined
1643
1585
  */
1644
1586
  centers: Base.Point3[];
1587
+ }
1588
+ /**
1589
+ * The size and smoothness of a sphere, shared by `SphereDto` and `SphereCentersDto`.
1590
+ */
1591
+ abstract class SphereSharedDto {
1645
1592
  /**
1646
- * Radius of the rounding on both rims of every cylinder, in model units; the height must be
1647
- * more than twice it or an error is thrown
1648
- * @default 0.1
1649
- * @minimum 0
1650
- * @maximum Infinity
1651
- * @step 0.1
1652
- */
1653
- roundRadius: number;
1654
- /**
1655
- * Full length of every cylinder along Z, in model units, rounding included
1656
- * @default 1
1657
- * @minimum 0
1658
- * @maximum Infinity
1659
- * @step 0.1
1660
- */
1661
- height: number;
1662
- /**
1663
- * Distance from the axis to the side of every cylinder, in model units
1593
+ * Distance from the center to the surface, in model units
1664
1594
  * @default 1
1665
1595
  * @minimum 0
1666
1596
  * @maximum Infinity
1667
1597
  * @step 0.1
1668
1598
  */
1669
- radius: number;
1599
+ radius?: number | undefined;
1670
1600
  /**
1671
- * Number of flat sides around each cylinder and pieces in the rounding; more makes them
1672
- * smoother
1601
+ * Number of facets around the sphere; more makes it rounder
1673
1602
  * @default 24
1674
- * @minimum 0
1603
+ * @minimum 4
1675
1604
  * @maximum Infinity
1676
1605
  * @step 1
1677
1606
  */
1678
- segments: number;
1607
+ segments?: number | undefined;
1679
1608
  }
1680
1609
  /**
1681
1610
  * Feeds `shapes.sphere`: a sphere given by its center point, its radius and how many facets
1682
1611
  * approximate it.
1683
1612
  */
1684
- class SphereDto {
1613
+ class SphereDto extends SphereSharedDto {
1685
1614
  constructor(center?: Base.Point3, radius?: number, segments?: number);
1686
1615
  /**
1687
1616
  * The point the sphere is centered on
1688
1617
  * @default [0, 0, 0]
1689
1618
  */
1690
- center: Base.Point3;
1691
- /**
1692
- * Distance from the center to the surface, in model units
1693
- * @default 1
1694
- * @minimum 0
1695
- * @maximum Infinity
1696
- * @step 0.1
1697
- */
1698
- radius: number;
1699
- /**
1700
- * Number of facets around the sphere; more makes it rounder
1701
- * @default 24
1702
- * @minimum 0
1703
- * @maximum Infinity
1704
- * @step 1
1705
- */
1706
- segments: number;
1619
+ center?: Base.Point3 | undefined;
1707
1620
  }
1708
1621
  /**
1709
1622
  * Feeds `shapes.spheresOnCenterPoints`: one sphere of the same radius on every center point, coming
1710
1623
  * back in the same order.
1711
1624
  */
1712
- class SphereCentersDto {
1625
+ class SphereCentersDto extends SphereSharedDto {
1713
1626
  constructor(centers?: Base.Point3[], radius?: number, segments?: number);
1714
1627
  /**
1715
1628
  * The points the spheres are centered on, one each, in the order the results come back
1716
1629
  * @default undefined
1717
1630
  */
1718
1631
  centers: Base.Point3[];
1719
- /**
1720
- * Distance from each center to its surface, in model units
1721
- * @default 1
1722
- * @minimum 0
1723
- * @maximum Infinity
1724
- * @step 0.1
1725
- */
1726
- radius: number;
1727
- /**
1728
- * Number of facets around each sphere; more makes them rounder
1729
- * @default 24
1730
- * @minimum 0
1731
- * @maximum Infinity
1732
- * @step 1
1733
- */
1734
- segments: number;
1735
1632
  }
1736
1633
  /**
1737
1634
  * Feeds `shapes.torus`: a ring with a round cross-section lying flat in the XY plane around
@@ -1744,40 +1641,42 @@ export declare namespace JSCAD {
1744
1641
  * The point the ring is centered on, in model units
1745
1642
  * @default [0, 0, 0]
1746
1643
  */
1747
- center: Base.Point3;
1644
+ center?: Base.Point3 | undefined;
1748
1645
  /**
1749
1646
  * Radius of the tube itself, in model units; it must be less than `outerRadius`
1750
1647
  * @default 1
1751
1648
  * @minimum 0
1649
+ * @exclusiveMinimum true
1752
1650
  * @maximum Infinity
1753
1651
  * @step 0.1
1754
1652
  */
1755
- innerRadius: number;
1653
+ innerRadius?: number | undefined;
1756
1654
  /**
1757
1655
  * Distance from the ring's center to the middle of the tube, in model units, so the ring spans
1758
1656
  * twice the sum of both radii
1759
1657
  * @default 2
1760
1658
  * @minimum 0
1659
+ * @exclusiveMinimum true
1761
1660
  * @maximum Infinity
1762
1661
  * @step 0.1
1763
1662
  */
1764
- outerRadius: number;
1663
+ outerRadius?: number | undefined;
1765
1664
  /**
1766
1665
  * Number of flat pieces around the tube's cross-section; more makes the tube rounder
1767
1666
  * @default 24
1768
- * @minimum 0
1667
+ * @minimum 3
1769
1668
  * @maximum Infinity
1770
1669
  * @step 1
1771
1670
  */
1772
- innerSegments: number;
1671
+ innerSegments?: number | undefined;
1773
1672
  /**
1774
1673
  * Number of flat pieces around the ring; more makes the ring rounder
1775
1674
  * @default 24
1776
- * @minimum 0
1675
+ * @minimum 3
1777
1676
  * @maximum Infinity
1778
1677
  * @step 1
1779
1678
  */
1780
- outerSegments: number;
1679
+ outerSegments?: number | undefined;
1781
1680
  /**
1782
1681
  * Turn of the tube's cross-section about its own center, in degrees; it shows when
1783
1682
  * `innerSegments` is low enough for the facets to be visible
@@ -1786,24 +1685,25 @@ export declare namespace JSCAD {
1786
1685
  * @maximum Infinity
1787
1686
  * @step 1
1788
1687
  */
1789
- innerRotation: number;
1688
+ innerRotation?: number | undefined;
1790
1689
  /**
1791
1690
  * How far the tube is swept around the ring, in degrees; 360 closes the ring and less leaves it
1792
1691
  * open
1793
1692
  * @default 360
1794
- * @minimum -Infinity
1693
+ * @minimum 0
1694
+ * @exclusiveMinimum true
1795
1695
  * @maximum Infinity
1796
1696
  * @step 1
1797
1697
  */
1798
- outerRotation: number;
1698
+ outerRotation?: number | undefined;
1799
1699
  /**
1800
1700
  * Where the sweep around the ring starts, in degrees from the X axis
1801
1701
  * @default 0
1802
- * @minimum -Infinity
1702
+ * @minimum 0
1803
1703
  * @maximum Infinity
1804
1704
  * @step 1
1805
1705
  */
1806
- startAngle: number;
1706
+ startAngle?: number | undefined;
1807
1707
  }
1808
1708
  /**
1809
1709
  * Feeds `text.createVectorText` with the text and the font options: where the text starts, how tall
@@ -1817,7 +1717,7 @@ export declare namespace JSCAD {
1817
1717
  * becomes a question mark
1818
1718
  * @default Hello World
1819
1719
  */
1820
- text: string;
1720
+ text?: string | undefined;
1821
1721
  /**
1822
1722
  * Number of straight pieces used for curved strokes; more makes letters rounder
1823
1723
  * @default 24
@@ -1825,7 +1725,7 @@ export declare namespace JSCAD {
1825
1725
  * @maximum Infinity
1826
1726
  * @step 1
1827
1727
  */
1828
- segments: number;
1728
+ segments?: number | undefined;
1829
1729
  /**
1830
1730
  * Where the text starts along X, in model units
1831
1731
  * @default 0
@@ -1833,7 +1733,7 @@ export declare namespace JSCAD {
1833
1733
  * @maximum Infinity
1834
1734
  * @step 0.1
1835
1735
  */
1836
- xOffset: number;
1736
+ xOffset?: number | undefined;
1837
1737
  /**
1838
1738
  * Where the baseline of the first line sits along Y, in model units
1839
1739
  * @default 0
@@ -1841,7 +1741,7 @@ export declare namespace JSCAD {
1841
1741
  * @maximum Infinity
1842
1742
  * @step 0.1
1843
1743
  */
1844
- yOffset: number;
1744
+ yOffset?: number | undefined;
1845
1745
  /**
1846
1746
  * Height of a capital letter, in model units; the whole text scales with it
1847
1747
  * @default 1
@@ -1849,7 +1749,7 @@ export declare namespace JSCAD {
1849
1749
  * @maximum Infinity
1850
1750
  * @step 0.1
1851
1751
  */
1852
- height: number;
1752
+ height?: number | undefined;
1853
1753
  /**
1854
1754
  * Step from one line down to the next as a multiple of the letter height; 1.4 leaves a 40
1855
1755
  * percent gap
@@ -1858,7 +1758,7 @@ export declare namespace JSCAD {
1858
1758
  * @maximum Infinity
1859
1759
  * @step 0.1
1860
1760
  */
1861
- lineSpacing: number;
1761
+ lineSpacing?: number | undefined;
1862
1762
  /**
1863
1763
  * Multiplies the step from one letter to the next; 1 is the font's own spacing and 2 spreads
1864
1764
  * letters twice as far apart
@@ -1867,12 +1767,12 @@ export declare namespace JSCAD {
1867
1767
  * @maximum Infinity
1868
1768
  * @step 0.1
1869
1769
  */
1870
- letterSpacing: number;
1770
+ letterSpacing?: number | undefined;
1871
1771
  /**
1872
1772
  * How the lines of a multi-line text line up: to the left, the center or the right
1873
1773
  * @default center
1874
1774
  */
1875
- align: jscadTextAlignEnum;
1775
+ align?: jscadTextAlignEnum | undefined;
1876
1776
  /**
1877
1777
  * Thickness the strokes will get later, in model units; the outlines are pulled in by half of
1878
1778
  * it so letters keep their size once thick
@@ -1881,7 +1781,7 @@ export declare namespace JSCAD {
1881
1781
  * @maximum Infinity
1882
1782
  * @step 0.1
1883
1783
  */
1884
- extrudeOffset: number;
1784
+ extrudeOffset?: number | undefined;
1885
1785
  }
1886
1786
  /**
1887
1787
  * Feeds `text.cylindricalText`: the text and font options of `TextDto` plus the size of the
@@ -1894,7 +1794,7 @@ export declare namespace JSCAD {
1894
1794
  * becomes a question mark
1895
1795
  * @default Hello World
1896
1796
  */
1897
- text: string;
1797
+ text?: string | undefined;
1898
1798
  /**
1899
1799
  * Length of the cylinders along Z, in model units; the strokes sit on the XY plane with half of
1900
1800
  * it on each side
@@ -1903,7 +1803,7 @@ export declare namespace JSCAD {
1903
1803
  * @maximum Infinity
1904
1804
  * @step 0.1
1905
1805
  */
1906
- extrusionHeight: number;
1806
+ extrusionHeight?: number | undefined;
1907
1807
  /**
1908
1808
  * Radius of the cylinders, in model units, which is half the thickness of the strokes
1909
1809
  * @default 0.1
@@ -1911,16 +1811,16 @@ export declare namespace JSCAD {
1911
1811
  * @maximum Infinity
1912
1812
  * @step 0.1
1913
1813
  */
1914
- extrusionSize: number;
1814
+ extrusionSize?: number | undefined;
1915
1815
  /**
1916
1816
  * Number of flat sides around each cylinder and pieces in curved strokes; more makes the
1917
1817
  * letters rounder
1918
1818
  * @default 24
1919
- * @minimum 0
1819
+ * @minimum 4
1920
1820
  * @maximum Infinity
1921
1821
  * @step 1
1922
1822
  */
1923
- segments: number;
1823
+ segments?: number | undefined;
1924
1824
  /**
1925
1825
  * Where the text starts along X before it is centered, in model units
1926
1826
  * @default 0
@@ -1928,7 +1828,7 @@ export declare namespace JSCAD {
1928
1828
  * @maximum Infinity
1929
1829
  * @step 0.1
1930
1830
  */
1931
- xOffset: number;
1831
+ xOffset?: number | undefined;
1932
1832
  /**
1933
1833
  * Where the baseline of the first line sits along Y, in model units
1934
1834
  * @default 0
@@ -1936,7 +1836,7 @@ export declare namespace JSCAD {
1936
1836
  * @maximum Infinity
1937
1837
  * @step 0.1
1938
1838
  */
1939
- yOffset: number;
1839
+ yOffset?: number | undefined;
1940
1840
  /**
1941
1841
  * Height of a capital letter, in model units; the whole text scales with it
1942
1842
  * @default 1
@@ -1944,7 +1844,7 @@ export declare namespace JSCAD {
1944
1844
  * @maximum Infinity
1945
1845
  * @step 0.1
1946
1846
  */
1947
- height: number;
1847
+ height?: number | undefined;
1948
1848
  /**
1949
1849
  * Step from one line down to the next as a multiple of the letter height; 1.4 leaves a 40
1950
1850
  * percent gap
@@ -1953,7 +1853,7 @@ export declare namespace JSCAD {
1953
1853
  * @maximum Infinity
1954
1854
  * @step 0.1
1955
1855
  */
1956
- lineSpacing: number;
1856
+ lineSpacing?: number | undefined;
1957
1857
  /**
1958
1858
  * Multiplies the step from one letter to the next; 1 is the font's own spacing and 2 spreads
1959
1859
  * letters twice as far apart
@@ -1962,12 +1862,12 @@ export declare namespace JSCAD {
1962
1862
  * @maximum Infinity
1963
1863
  * @step 0.1
1964
1864
  */
1965
- letterSpacing: number;
1865
+ letterSpacing?: number | undefined;
1966
1866
  /**
1967
1867
  * How the lines of a multi-line text line up: to the left, the center or the right
1968
1868
  * @default center
1969
1869
  */
1970
- align: jscadTextAlignEnum;
1870
+ align?: jscadTextAlignEnum | undefined;
1971
1871
  /**
1972
1872
  * Pulls the strokes inward by half this amount, in model units, so thick strokes keep the
1973
1873
  * intended letter size
@@ -1976,7 +1876,7 @@ export declare namespace JSCAD {
1976
1876
  * @maximum Infinity
1977
1877
  * @step 0.1
1978
1878
  */
1979
- extrudeOffset: number;
1879
+ extrudeOffset?: number | undefined;
1980
1880
  }
1981
1881
  /**
1982
1882
  * Feeds `text.sphericalText`: the text and font options of `TextDto` plus the size of the spheres
@@ -1989,7 +1889,7 @@ export declare namespace JSCAD {
1989
1889
  * becomes a question mark
1990
1890
  * @default Hello World
1991
1891
  */
1992
- text: string;
1892
+ text?: string | undefined;
1993
1893
  /**
1994
1894
  * Radius of the spheres, in model units, which is half the thickness of the strokes
1995
1895
  * @default 0.1
@@ -1997,16 +1897,16 @@ export declare namespace JSCAD {
1997
1897
  * @maximum Infinity
1998
1898
  * @step 0.1
1999
1899
  */
2000
- radius: number;
1900
+ radius?: number | undefined;
2001
1901
  /**
2002
1902
  * Number of facets around each sphere and pieces in curved strokes; more makes the letters
2003
1903
  * rounder
2004
1904
  * @default 24
2005
- * @minimum 0
1905
+ * @minimum 4
2006
1906
  * @maximum Infinity
2007
1907
  * @step 1
2008
1908
  */
2009
- segments: number;
1909
+ segments?: number | undefined;
2010
1910
  /**
2011
1911
  * Where the text starts along X before it is centered, in model units
2012
1912
  * @default 0
@@ -2014,7 +1914,7 @@ export declare namespace JSCAD {
2014
1914
  * @maximum Infinity
2015
1915
  * @step 0.1
2016
1916
  */
2017
- xOffset: number;
1917
+ xOffset?: number | undefined;
2018
1918
  /**
2019
1919
  * Where the baseline of the first line sits along Y, in model units
2020
1920
  * @default 0
@@ -2022,7 +1922,7 @@ export declare namespace JSCAD {
2022
1922
  * @maximum Infinity
2023
1923
  * @step 0.1
2024
1924
  */
2025
- yOffset: number;
1925
+ yOffset?: number | undefined;
2026
1926
  /**
2027
1927
  * Height of a capital letter, in model units; the whole text scales with it
2028
1928
  * @default 1
@@ -2030,7 +1930,7 @@ export declare namespace JSCAD {
2030
1930
  * @maximum Infinity
2031
1931
  * @step 0.1
2032
1932
  */
2033
- height: number;
1933
+ height?: number | undefined;
2034
1934
  /**
2035
1935
  * Step from one line down to the next as a multiple of the letter height; 1.4 leaves a 40
2036
1936
  * percent gap
@@ -2039,7 +1939,7 @@ export declare namespace JSCAD {
2039
1939
  * @maximum Infinity
2040
1940
  * @step 0.1
2041
1941
  */
2042
- lineSpacing: number;
1942
+ lineSpacing?: number | undefined;
2043
1943
  /**
2044
1944
  * Multiplies the step from one letter to the next; 1 is the font's own spacing and 2 spreads
2045
1945
  * letters twice as far apart
@@ -2048,12 +1948,12 @@ export declare namespace JSCAD {
2048
1948
  * @maximum Infinity
2049
1949
  * @step 0.1
2050
1950
  */
2051
- letterSpacing: number;
1951
+ letterSpacing?: number | undefined;
2052
1952
  /**
2053
1953
  * How the lines of a multi-line text line up: to the left, the center or the right
2054
1954
  * @default center
2055
1955
  */
2056
- align: jscadTextAlignEnum;
1956
+ align?: jscadTextAlignEnum | undefined;
2057
1957
  /**
2058
1958
  * Pulls the strokes inward by half this amount, in model units, so thick strokes keep the
2059
1959
  * intended letter size
@@ -2062,7 +1962,7 @@ export declare namespace JSCAD {
2062
1962
  * @maximum Infinity
2063
1963
  * @step 0.1
2064
1964
  */
2065
- extrudeOffset: number;
1965
+ extrudeOffset?: number | undefined;
2066
1966
  }
2067
1967
  /**
2068
1968
  * Feeds `shapes.fromPolygonPoints` with the faces of a solid, each as the list of points around it,