@metamesh/modeling 0.6.0 → 0.7.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.
@@ -11,7 +11,13 @@ export declare interface AcmeThreadProfileSpec extends ThreadProfileBaseSpec {
11
11
  readonly depth?: number;
12
12
  }
13
13
 
14
- /** Adds two finite XYZ vectors component-wise. @example `add3([1, 2, 3], [4, 5, 6])` */
14
+ /**
15
+ * Adds two finite XYZ vectors component-wise.
16
+ * @example
17
+ * ```ts
18
+ * add3([1, 2, 3], [4, 5, 6]); // [5, 7, 9]
19
+ * ```
20
+ */
15
21
  export declare const add3: (a: Vec3, b: Vec3) => Vec3;
16
22
 
17
23
  /** Controls full-circle sampling that must satisfy one or more topology alignments. */
@@ -168,7 +174,9 @@ export declare interface ArcCurve3 {
168
174
  readonly tolerance?: GeometryToleranceOptions;
169
175
  }
170
176
 
171
- /** One explicitly unit-labelled right-handed axis-angle rotation. */
177
+ /**
178
+ * One explicitly unit-labelled right-handed axis-angle rotation.
179
+ */
172
180
  export declare type AxisAngleRotation3 = {
173
181
  /** Finite right-handed angle in degrees. */
174
182
  readonly degrees: number;
@@ -227,7 +235,9 @@ export declare interface ArcCurve3 {
227
235
  /** Independent treatments for disjoint named edge selections; overlapping selections fail. */
228
236
  export declare type BoxEdgeTreatments = Readonly<Partial<Record<BoxEdgeSelection, EdgeTreatment>>>;
229
237
 
230
- /** Dimensions, placement, and uniform or independently selected finishing for an axis-aligned box. */
238
+ /**
239
+ * Dimensions, placement, and uniform or independently selected finishing for an axis-aligned box.
240
+ */
231
241
  export declare interface BoxOptions extends PrimitivePlacement {
232
242
  /** Explicit sampling ceilings for edge treatments, bounded by the host policy. */
233
243
  readonly limits?: Partial<GeometrySamplingLimits>;
@@ -280,7 +290,9 @@ export declare interface ArcCurve3 {
280
290
  readonly pressureFlankSide?: ButtressPressureFlankSide;
281
291
  }
282
292
 
283
- /** A planar edge or corner chamfer with equal or independent surface setbacks. */
293
+ /**
294
+ * A planar edge or corner chamfer with equal or independent surface setbacks.
295
+ */
284
296
  export declare interface ChamferedEdgeTreatment {
285
297
  /** Selects a straight bevel between adjoining surfaces. */
286
298
  readonly kind: "chamfer";
@@ -288,10 +300,19 @@ export declare interface ArcCurve3 {
288
300
  readonly distance: number | readonly [first: number, second: number];
289
301
  }
290
302
 
291
- /** Creates an immutable centered CCW circle with +X seam and vertex or face radial sizing. */
303
+ /**
304
+ * Creates an immutable centered CCW circle with +X seam and vertex or face radial sizing.
305
+ *
306
+ * @example Explicit circular point data
307
+ * ```ts
308
+ * circleLoop({ diameter: 20, segments: 32 });
309
+ * ```
310
+ */
292
311
  export declare const circleLoop: (options: CircleLoopOptions) => Loop2;
293
312
 
294
- /** Circular profile dimensions with exactly one radius or diameter and explicit sampling. */
313
+ /**
314
+ * Circular profile dimensions with exactly one radius or diameter and explicit sampling.
315
+ */
295
316
  export declare type CircleLoopOptions = CircularPrimitiveOptions & RadialSizingOptions & ({
296
317
  /** Positive nominal radius in millimetres; mutually exclusive with diameter. */
297
318
  readonly radius: number;
@@ -304,7 +325,9 @@ export declare interface ArcCurve3 {
304
325
  readonly radius?: never;
305
326
  });
306
327
 
307
- /** Tessellation controls shared by circular primitives across Geometry entry points. */
328
+ /**
329
+ * Tessellation controls shared by circular primitives across Geometry entry points.
330
+ */
308
331
  export declare interface CircularPrimitiveOptions {
309
332
  /** Explicit sampling ceilings; bound modeling operations may only lower the host policy. */
310
333
  readonly limits?: Partial<GeometrySamplingLimits>;
@@ -455,6 +478,11 @@ export declare interface ArcCurve3 {
455
478
  * The open path spans one pitch. Radial zero is the major envelope; negative
456
479
  * values point toward the shaft. Custom paths must be finite, axially
457
480
  * non-decreasing, periodic at their endpoints, and reach radial zero.
481
+ *
482
+ * @example Printable triangular thread profile
483
+ * ```ts
484
+ * createThreadProfile({ kind: "triangular", pitch: 1.75 });
485
+ * ```
458
486
  */
459
487
  export declare function createThreadProfile(spec: ThreadProfileSpec): ThreadProfile;
460
488
 
@@ -472,7 +500,13 @@ export declare interface ArcCurve3 {
472
500
  */
473
501
  export declare function createTriangleMeshSignature(mesh: TriangleMesh, options?: TriangleMeshSignatureOptions): TriangleMeshSignature;
474
502
 
475
- /** Returns the right-handed cross product. @example `cross3([1, 0, 0], [0, 1, 0])` */
503
+ /**
504
+ * Returns the right-handed cross product.
505
+ * @example
506
+ * ```ts
507
+ * cross3([1, 0, 0], [0, 1, 0]); // [0, 0, 1]
508
+ * ```
509
+ */
476
510
  export declare const cross3: (a: Vec3, b: Vec3) => Vec3;
477
511
 
478
512
  /** Planar cubic Bézier with explicit endpoint and control coordinates. */
@@ -489,7 +523,9 @@ export declare interface ArcCurve3 {
489
523
  readonly end: Vec2;
490
524
  }
491
525
 
492
- /** Spatial cubic Bézier with explicit endpoint and control coordinates. */
526
+ /**
527
+ * Spatial cubic Bézier with explicit endpoint and control coordinates.
528
+ */
493
529
  export declare interface CubicBezierCurve3 {
494
530
  /** Selects a cubic Bézier through two endpoints and two controls. */
495
531
  readonly kind: "cubic";
@@ -509,10 +545,14 @@ export declare interface ArcCurve3 {
509
545
  /** Reusable planar curve definition. */
510
546
  export declare type Curve2 = LineCurve2 | ArcCurve2 | CubicBezierCurve2;
511
547
 
512
- /** Reusable spatial curve definition. */
548
+ /**
549
+ * Reusable spatial curve definition.
550
+ */
513
551
  export declare type Curve3 = LineCurve3 | ArcCurve3 | CubicBezierCurve3;
514
552
 
515
- /** Explicit physical sampling and allocation policy for reusable curves. */
553
+ /**
554
+ * Explicit physical sampling and allocation policy for reusable curves.
555
+ */
516
556
  export declare interface CurveSamplingOptions {
517
557
  /** Exact segment count overrides physical criteria; curve parameters are spaced uniformly. */
518
558
  readonly segments?: number;
@@ -560,7 +600,9 @@ export declare interface ArcCurve3 {
560
600
  readonly origin?: Vec3;
561
601
  }
562
602
 
563
- /** Dimensions, placement, independent end finishing, and tessellation for a Z-axis cylinder or frustum. */
603
+ /**
604
+ * Dimensions, placement, independent end finishing, and tessellation for a Z-axis cylinder or frustum.
605
+ */
564
606
  export declare type CylinderOptions = CircularPrimitiveOptions & RadialSizingOptions & PrimitivePlacement & {
565
607
  /**
566
608
  * Centers the solid on the Z origin when `true`; otherwise its bottom is at `Z = 0`.
@@ -583,7 +625,9 @@ export declare interface ArcCurve3 {
583
625
  readonly radius?: never;
584
626
  });
585
627
 
586
- /** Resolved transverse pitch-plane dimensions for one cylindrical gear. */
628
+ /**
629
+ * Resolved transverse pitch-plane dimensions for one cylindrical gear.
630
+ */
587
631
  export declare interface CylindricalGearDimensions {
588
632
  /** Addendum above the pitch circle, in millimetres. */
589
633
  readonly addendum: number;
@@ -621,7 +665,9 @@ export declare interface ArcCurve3 {
621
665
  readonly virtualToothCount: number;
622
666
  }
623
667
 
624
- /** Whether two cylindrical gears mesh on their outside teeth or as a pinion inside a ring. */
668
+ /**
669
+ * Whether two cylindrical gears mesh on their outside teeth or as a pinion inside a ring.
670
+ */
625
671
  export declare type CylindricalGearMeshKind = "external" | "internal";
626
672
 
627
673
  /** Sampling controls for a complete non-duplicated gear outline. */
@@ -638,7 +684,9 @@ export declare interface ArcCurve3 {
638
684
  readonly tipArcSamples?: number;
639
685
  }
640
686
 
641
- /** Pitch solution for a coordinated cylindrical gear pair. */
687
+ /**
688
+ * Pitch solution for a coordinated cylindrical gear pair.
689
+ */
642
690
  export declare interface CylindricalGearPairDimensions {
643
691
  /** Nominal distance between the two +Z gear axes, in millimetres. */
644
692
  readonly centerDistance: number;
@@ -672,7 +720,9 @@ export declare interface ArcCurve3 {
672
720
  readonly samples: number;
673
721
  }
674
722
 
675
- /** Inputs for resolving a coordinated cylindrical gear pair. */
723
+ /**
724
+ * Inputs for resolving a coordinated cylindrical gear pair.
725
+ */
676
726
  export declare interface CylindricalGearPairSpec {
677
727
  /** Driving gear or pinion. */
678
728
  readonly driver: CylindricalGearSpec;
@@ -728,16 +778,33 @@ export declare interface ArcCurve3 {
728
778
  */
729
779
  export declare const distributeAlongPath: (path: readonly Vec3[], count: number, closed: boolean, limits?: Partial<GeometrySamplingLimits>) => readonly PathPlacement[];
730
780
 
731
- /** Returns the scalar dot product. @example `dot3([1, 0, 0], [0, 1, 0])` */
781
+ /**
782
+ * Returns the scalar dot product.
783
+ * @example
784
+ * ```ts
785
+ * dot3([1, 0, 0], [0, 1, 0]); // 0
786
+ * ```
787
+ */
732
788
  export declare const dot3: (a: Vec3, b: Vec3) => number;
733
789
 
734
- /** Uniform finishing vocabulary shared by applicable solid edges and profile corners. */
790
+ /**
791
+ * Uniform finishing vocabulary shared by applicable solid edges and profile corners.
792
+ */
735
793
  export declare type EdgeTreatment = ChamferedEdgeTreatment | RoundedEdgeTreatment | SmoothEdgeTreatment | ProfiledEdgeTreatment;
736
794
 
737
- /** Creates an immutable centered CCW ellipse with +X seam within the selected sampling ceiling. */
795
+ /**
796
+ * Creates an immutable centered CCW ellipse with +X seam within the selected sampling ceiling.
797
+ *
798
+ * @example Ellipse by full dimensions
799
+ * ```ts
800
+ * ellipseLoop({ size: [30, 20] });
801
+ * ```
802
+ */
738
803
  export declare function ellipseLoop(options: EllipseLoopOptions): Loop2;
739
804
 
740
- /** Ellipse dimensions with exactly one XY radii or full-size tuple and explicit sampling. */
805
+ /**
806
+ * Ellipse dimensions with exactly one XY radii or full-size tuple and explicit sampling.
807
+ */
741
808
  export declare type EllipseLoopOptions = CircularPrimitiveOptions & ({
742
809
  /** Positive XY radii in millimetres; mutually exclusive with size. */
743
810
  readonly radius: Vec2;
@@ -750,7 +817,9 @@ export declare interface ArcCurve3 {
750
817
  readonly radius?: never;
751
818
  });
752
819
 
753
- /** Independent inward finishing on primitive or straight convex extrusion ends. */
820
+ /**
821
+ * Independent inward finishing on primitive or straight convex extrusion ends.
822
+ */
754
823
  export declare interface EndTreatments {
755
824
  /** Bottom cap and adjoining side; omitted leaves the end untreated. */
756
825
  readonly bottom?: EdgeTreatment;
@@ -770,10 +839,20 @@ export declare interface ArcCurve3 {
770
839
  */
771
840
  export declare function eulerTransform3(rotationDegrees: Vec3): Transform3;
772
841
 
773
- /** Linearly extrudes one simple profile along +Z with robust ear-clipped caps. */
842
+ /**
843
+ * Linearly extrudes one simple profile along +Z with robust ear-clipped caps.
844
+ *
845
+ * @example Extrude point data without an engine
846
+ * ```ts
847
+ * const outline = rectangleLoop({ size: [30, 20], treatment: { kind: "round", radius: 3 } });
848
+ * extrudeMesh(outline, { height: 8 });
849
+ * ```
850
+ */
774
851
  export declare function extrudeMesh(profile: Loop2, options: ExtrudeOptions): TriangleMesh;
775
852
 
776
- /** Dimensions and sampling shared by native and pure +Z extrusion. */
853
+ /**
854
+ * Dimensions and sampling shared by native and pure +Z extrusion.
855
+ */
777
856
  export declare interface ExtrudeOptions extends ExtrusionSamplingOptions {
778
857
  /** Positive extrusion height in millimetres. */
779
858
  readonly height: number;
@@ -859,7 +938,9 @@ export declare interface ArcCurve3 {
859
938
  readonly operation: string;
860
939
  }
861
940
 
862
- /** Tessellation policy for sampled geometry measured in millimetres. */
941
+ /**
942
+ * Tessellation policy for sampled geometry measured in millimetres.
943
+ */
863
944
  export declare interface GeometryResolution {
864
945
  /** Optional exact full-circle segment count, of at least three, bounded by the selected circular ceiling. */
865
946
  readonly circularSegments?: number;
@@ -905,6 +986,14 @@ export declare interface ArcCurve3 {
905
986
  * Builds a closed indexed solid from a regularly sampled top, matched boundary walls, and flat base.
906
987
  * Heights are evaluated once per grid point after allocation preflight. Physical XY sizes and all
907
988
  * output coordinates must fit Float32 storage. Shared wall vertices prevent cracks at the base.
989
+ *
990
+ * @example Sample a closed wavy mesh
991
+ * ```ts
992
+ * heightfieldMesh({
993
+ * size: [30, 20], segments: [24, 16],
994
+ * height: ([x, y]) => 3 + Math.cos(x / 5) * Math.cos(y / 5),
995
+ * });
996
+ * ```
908
997
  */
909
998
  export declare function heightfieldMesh(options: HeightfieldOptions, limits?: HeightfieldMeshLimits): TriangleMesh;
910
999
 
@@ -1068,6 +1157,13 @@ export declare interface ArcCurve3 {
1068
1157
  * Both ends use ear-clipped caps, supporting concave profiles without center fans.
1069
1158
  * Intermediate slices interpolate placed world vertices, never frame axes.
1070
1159
  * Transformed coordinates must fit finite Float32 mesh storage.
1160
+ *
1161
+ * @example Loft with explicit point correspondence
1162
+ * ```ts
1163
+ * const bottom = rectangleLoop({ size: [20, 12] });
1164
+ * const top = rectangleLoop({ size: [30, 20], treatment: { kind: "round", radius: 3 } });
1165
+ * loftMesh([{ profile: bottom, z: 0 }, { profile: top, z: 30 }], { correspondence: "reindex" });
1166
+ * ```
1071
1167
  */
1072
1168
  export declare function loftMesh(stations: readonly LoftMeshStation[], options: LoftOptions): TriangleMesh;
1073
1169
 
@@ -1077,7 +1173,9 @@ export declare interface ArcCurve3 {
1077
1173
  readonly profile: Loop2;
1078
1174
  };
1079
1175
 
1080
- /** Shared controls for native and pure lofts. Point data and arbitrary Sections require explicit correspondence. */
1176
+ /**
1177
+ * Shared controls for native and pure lofts. Point data and arbitrary Sections require explicit correspondence.
1178
+ */
1081
1179
  export declare interface LoftOptions {
1082
1180
  /** One method or one per consecutive station gap. Omitted preserves known landmarks, including circle/ellipse-to-rectangle corners, or maps other unlike primitive seams directly. */
1083
1181
  readonly correspondence?: LoftCorrespondence | readonly LoftCorrespondence[];
@@ -1093,7 +1191,9 @@ export declare interface ArcCurve3 {
1093
1191
  readonly limits?: Partial<ModelingLimits>;
1094
1192
  }
1095
1193
 
1096
- /** A horizontal XY station height, or an explicit right-handed spatial frame, never both. */
1194
+ /**
1195
+ * A horizontal XY station height, or an explicit right-handed spatial frame, never both.
1196
+ */
1097
1197
  export declare type LoftPlacement = {
1098
1198
  /** Horizontal XY station height in millimetres. */
1099
1199
  readonly z: number;
@@ -1123,6 +1223,14 @@ export declare interface ArcCurve3 {
1123
1223
  * Cubics share a checked uniform parameter grid, including grids selected by exact paired requests.
1124
1224
  * Input order and winding are preserved. Collapsed spans retain repeated logical slots, which
1125
1225
  * the engine maps to shared physical vertices while omitting degenerate faces.
1226
+ *
1227
+ * @example Match named rectangle landmarks
1228
+ * ```ts
1229
+ * matchProfiles([
1230
+ * rectangleProfile({ size: [20, 12] }),
1231
+ * rectangleProfile({ size: [30, 20], treatment: { kind: "round", radius: 3 } }),
1232
+ * ]);
1233
+ * ```
1126
1234
  */
1127
1235
  export declare function matchProfiles(profiles: readonly Profile[], options?: MatchProfilesOptions): readonly CorrespondingProfile[];
1128
1236
 
@@ -1156,7 +1264,9 @@ export declare interface ArcCurve3 {
1156
1264
  */
1157
1265
  export declare function measureTriangleMesh(mesh: TriangleMesh, options?: TriangleMeshValidationOptions): TriangleMeshMeasurements;
1158
1266
 
1159
- /** Axis-aligned bounds of a non-empty triangle mesh. */
1267
+ /**
1268
+ * Axis-aligned bounds of a non-empty triangle mesh.
1269
+ */
1160
1270
  export declare interface MeshBounds {
1161
1271
  /** Inclusive minimum XYZ coordinates. */
1162
1272
  readonly min: Vec3;
@@ -1336,7 +1446,9 @@ export declare interface ArcCurve3 {
1336
1446
  /** An ordered, open sequence of two-dimensional points. */
1337
1447
  export declare type Path2 = readonly Vec2[];
1338
1448
 
1339
- /** An ordered, open sequence of three-dimensional points. */
1449
+ /**
1450
+ * An ordered, open sequence of three-dimensional points.
1451
+ */
1340
1452
  export declare type Path3 = readonly Vec3[];
1341
1453
 
1342
1454
  /** Orthonormal right-handed frame sampled along a path. */
@@ -1349,7 +1461,9 @@ export declare interface ArcCurve3 {
1349
1461
  readonly binormal: Vec3;
1350
1462
  }
1351
1463
 
1352
- /** Returns total sampled 3D path length, or zero for an empty path. */
1464
+ /**
1465
+ * Returns total sampled 3D path length, or zero for an empty path.
1466
+ */
1353
1467
  export declare const pathLength: (path: readonly Vec3[], limits?: Partial<GeometrySamplingLimits>) => number;
1354
1468
 
1355
1469
  /**
@@ -1467,7 +1581,9 @@ export declare interface ArcCurve3 {
1467
1581
  readonly outer: Loop2;
1468
1582
  }
1469
1583
 
1470
- /** Equal arc-length sampling of an open path or an implicitly closed loop. */
1584
+ /**
1585
+ * Equal arc-length sampling of an open path or an implicitly closed loop.
1586
+ */
1471
1587
  export declare interface PolylineResamplingOptions extends CurveSamplingOptions {
1472
1588
  /** Exact equal arc-length intervals; closed paths require at least three. */
1473
1589
  readonly segments?: number;
@@ -1542,7 +1658,9 @@ export declare interface ArcCurve3 {
1542
1658
  loose: PrintableThreadFitPolicy;
1543
1659
  }>;
1544
1660
 
1545
- /** Named baseline fit policies for calibrated FDM-style printed threads. */
1661
+ /**
1662
+ * Named baseline fit policies for calibrated FDM-style printed threads.
1663
+ */
1546
1664
  export declare type PrintableThreadFit = "tight" | "normal" | "loose";
1547
1665
 
1548
1666
  /**
@@ -1677,10 +1795,14 @@ export declare interface ArcCurve3 {
1677
1795
  readonly toothCount: number;
1678
1796
  }
1679
1797
 
1680
- /** Radial dimensions refer to polygon vertices or compensate faceting to meet polygon faces. */
1798
+ /**
1799
+ * Radial dimensions refer to polygon vertices or compensate faceting to meet polygon faces.
1800
+ */
1681
1801
  export declare type RadialSizing = "vertex" | "face";
1682
1802
 
1683
- /** Nominal radial sizing shared by circular and regular polygon construction. */
1803
+ /**
1804
+ * Nominal radial sizing shared by circular and regular polygon construction.
1805
+ */
1684
1806
  export declare interface RadialSizingOptions {
1685
1807
  /** Explicit sampling ceilings; bound modeling operations may only lower the host policy. */
1686
1808
  readonly limits?: Partial<GeometrySamplingLimits>;
@@ -1702,10 +1824,19 @@ export declare interface ArcCurve3 {
1702
1824
  bottomRight: RectangleCornerTreatment
1703
1825
  ];
1704
1826
 
1705
- /** Creates an immutable CCW rectangle loop. Round radius zero is square; tangent saturated endpoints occur once. */
1827
+ /**
1828
+ * Creates an immutable CCW rectangle loop. Round radius zero is square; tangent saturated endpoints occur once.
1829
+ *
1830
+ * @example Rounded rectangle outline
1831
+ * ```ts
1832
+ * rectangleLoop({ size: [30, 20], treatment: { kind: "round", radius: 3 } });
1833
+ * ```
1834
+ */
1706
1835
  export declare function rectangleLoop(options: RectangleLoopOptions): Loop2;
1707
1836
 
1708
- /** Shared rectangle dimensions, origin and uniform or per-corner treatment. */
1837
+ /**
1838
+ * Shared rectangle dimensions, origin and uniform or per-corner treatment.
1839
+ */
1709
1840
  export declare interface RectangleLoopOptions {
1710
1841
  /** Positive uniform size or explicit XY extents in millimetres. */
1711
1842
  readonly size: number | Vec2;
@@ -1717,7 +1848,14 @@ export declare interface ArcCurve3 {
1717
1848
  readonly limits?: Partial<GeometrySamplingLimits>;
1718
1849
  }
1719
1850
 
1720
- /** Creates an identified rectangle whose edge/corner spans survive zero and saturated round radii. Outer winding is CCW. */
1851
+ /**
1852
+ * Creates an identified rectangle whose edge/corner spans survive zero and saturated round radii. Outer winding is CCW.
1853
+ *
1854
+ * @example Retain rectangle landmarks
1855
+ * ```ts
1856
+ * rectangleProfile({ size: [30, 20], treatment: { kind: "round", radius: 3 } });
1857
+ * ```
1858
+ */
1721
1859
  export declare function rectangleProfile(options: RectangleProfileOptions): Profile;
1722
1860
 
1723
1861
  /** Shared rectangle options with an identified component for explicit profile families. */
@@ -1744,7 +1882,14 @@ export declare interface ArcCurve3 {
1744
1882
  /** Returns finite axis-aligned bounds for a non-empty region. */
1745
1883
  export declare function regionBounds(region: Region2): Bounds2;
1746
1884
 
1747
- /** Creates a centered CCW point loop with vertex or face radial sizing and an implicit seam. */
1885
+ /**
1886
+ * Creates a centered CCW point loop with vertex or face radial sizing and an implicit seam.
1887
+ *
1888
+ * @example Hexagon sized to its faces
1889
+ * ```ts
1890
+ * regularPolygonLoop({ radius: 10, sides: 6, sizing: "face" });
1891
+ * ```
1892
+ */
1748
1893
  export declare const regularPolygonLoop: (options: RegularPolygonLoopOptions) => readonly Vec2[];
1749
1894
 
1750
1895
  /** Exact regular polygon dimensions and counterclockwise degree rotation. */
@@ -1766,7 +1911,8 @@ export declare interface ArcCurve3 {
1766
1911
  */
1767
1912
  export declare function resamplePolyline2(path: readonly Vec2[], options?: PolylineResamplingOptions): SampledCurve2;
1768
1913
 
1769
- /** Resamples a spatial polyline at equal arc lengths with directed outgoing tangents.
1914
+ /**
1915
+ * Resamples a spatial polyline at equal arc lengths with directed outgoing tangents.
1770
1916
  * @remarks Open paths retain both endpoints; closed paths include the closing edge and omit the
1771
1917
  * repeated seam. Repeated adjacent inputs and explicit closing duplicates are removed. Physical
1772
1918
  * maxSegmentLength bounds arc-length intervals; exact counts override that policy. Output edges
@@ -1944,10 +2090,18 @@ export declare interface ArcCurve3 {
1944
2090
  * @param profile - Closed CCW `[radius, z]` profile without a duplicated seam point.
1945
2091
  * @param options - Optional physical or exact circumferential sampling controls. Defaults to `{}`.
1946
2092
  * @returns A closed indexed triangle mesh revolved counter-clockwise around +Z.
2093
+ *
2094
+ * @example Partial revolution with end caps
2095
+ * ```ts
2096
+ * // Each point is [radius, Z]; the profile seam is implicit.
2097
+ * revolveMesh([[0, 0], [12, 0], [8, 20], [0, 20]], { revolveDegrees: 270 });
2098
+ * ```
1947
2099
  */
1948
2100
  export declare const revolveMesh: (profile: readonly Vec2[], options?: RevolveOptions) => TriangleMesh;
1949
2101
 
1950
- /** Circumferential sampling and degree sweep shared by pure and filled revolution. */
2102
+ /**
2103
+ * Circumferential sampling and degree sweep shared by pure and filled revolution.
2104
+ */
1951
2105
  export declare interface RevolveOptions extends CircularPrimitiveOptions {
1952
2106
  /**
1953
2107
  * Positive angular sweep no greater than 360 degrees; partial revolutions have end caps.
@@ -1984,7 +2138,9 @@ export declare interface ArcCurve3 {
1984
2138
  */
1985
2139
  export declare const roundClosedPolylinePath: (points: readonly Vec3[], radius: number, segmentsPerCorner: number, limits?: Partial<GeometrySamplingLimits>) => readonly Vec3[];
1986
2140
 
1987
- /** A circular edge or corner roundover with explicit physical sampling. */
2141
+ /**
2142
+ * A circular edge or corner roundover with explicit physical sampling.
2143
+ */
1988
2144
  export declare interface RoundedEdgeTreatment extends CircularPrimitiveOptions {
1989
2145
  /** Selects circular corners or spherical all-edge roundovers. */
1990
2146
  readonly kind: "round";
@@ -2002,7 +2158,8 @@ export declare interface ArcCurve3 {
2002
2158
  */
2003
2159
  export declare function sampleCurve2(curve: Curve2, options?: CurveSamplingOptions): SampledCurve2;
2004
2160
 
2005
- /** Samples a spatial curve, preserving endpoints and directed unit tangents.
2161
+ /**
2162
+ * Samples a spatial curve, preserving endpoints and directed unit tangents.
2006
2163
  * @remarks Exact counts use uniform curve parameters, not equal physical distances. Adaptive cubics
2007
2164
  * bound the full control hull. Full-circle arcs repeat their endpoint; closed polylines do not.
2008
2165
  * @example
@@ -2029,7 +2186,9 @@ export declare interface ArcCurve3 {
2029
2186
  readonly tangents: readonly Vec2[];
2030
2187
  }
2031
2188
 
2032
- /** Immutable spatial points and corresponding directed unit tangents. */
2189
+ /**
2190
+ * Immutable spatial points and corresponding directed unit tangents.
2191
+ */
2033
2192
  export declare interface SampledCurve3 {
2034
2193
  /** Curves retain both endpoints, including full-circle seams; closed resampling omits its seam. */
2035
2194
  readonly points: readonly Vec3[];
@@ -2149,7 +2308,13 @@ export declare interface ArcCurve3 {
2149
2308
  */
2150
2309
  export declare function sampleThreadHelices(options: ThreadHelixOptions): SampledThreadHelices;
2151
2310
 
2152
- /** Multiplies a vector by a dimensionless scalar. @example `scale3([1, 2, 3], 2)` */
2311
+ /**
2312
+ * Multiplies a vector by a dimensionless scalar.
2313
+ * @example
2314
+ * ```ts
2315
+ * scale3([1, 2, 3], 2); // [2, 4, 6]
2316
+ * ```
2317
+ */
2153
2318
  export declare const scale3: (vector: Vec3, scale: number) => Vec3;
2154
2319
 
2155
2320
  /**
@@ -2180,7 +2345,9 @@ export declare interface ArcCurve3 {
2180
2345
  readonly limits?: Partial<GeometrySamplingLimits>;
2181
2346
  }
2182
2347
 
2183
- /** Exactly one radius or diameter, placement, and tessellation for an origin-centered sphere. */
2348
+ /**
2349
+ * Exactly one radius or diameter, placement, and tessellation for an origin-centered sphere.
2350
+ */
2184
2351
  export declare type SphereOptions = CircularPrimitiveOptions & PrimitivePlacement & ({
2185
2352
  /** Positive radius in millimetres; mutually exclusive with diameter. */
2186
2353
  readonly radius: number;
@@ -2204,7 +2371,14 @@ export declare interface ArcCurve3 {
2204
2371
  readonly depth?: number;
2205
2372
  }
2206
2373
 
2207
- /** Creates a centered CCW alternating-radius star within the selected profile sampling ceiling. */
2374
+ /**
2375
+ * Creates a centered CCW alternating-radius star within the selected profile sampling ceiling.
2376
+ *
2377
+ * @example Five-point outline
2378
+ * ```ts
2379
+ * starLoop(12, 5, 6);
2380
+ * ```
2381
+ */
2208
2382
  export declare const starLoop: (outerRadius: number, points: number, innerRadius?: number, limits?: Partial<GeometrySamplingLimits>) => readonly Vec2[];
2209
2383
 
2210
2384
  /** End-cap treatment for an open stroked path. */
@@ -2239,7 +2413,13 @@ export declare interface ArcCurve3 {
2239
2413
  readonly width: number;
2240
2414
  }
2241
2415
 
2242
- /** Subtracts `b` from `a`. @example `subtract3([4, 5, 6], [1, 2, 3])` */
2416
+ /**
2417
+ * Subtracts `b` from `a`.
2418
+ * @example
2419
+ * ```ts
2420
+ * subtract3([4, 5, 6], [1, 2, 3]); // [3, 3, 3]
2421
+ * ```
2422
+ */
2243
2423
  export declare const subtract3: (a: Vec3, b: Vec3) => Vec3;
2244
2424
 
2245
2425
  /** Sampling controls for deterministic SVG-to-region conversion. */
@@ -2317,10 +2497,22 @@ export declare interface ArcCurve3 {
2317
2497
  readonly parsedVertices: number;
2318
2498
  }
2319
2499
 
2320
- /** Sweeps one explicitly ordered point loop, with caps or a geometrically matching closed seam. */
2500
+ /**
2501
+ * Sweeps one explicitly ordered point loop, with caps or a geometrically matching closed seam.
2502
+ *
2503
+ * @example Sweep point data along a bent path
2504
+ * ```ts
2505
+ * const profile = rectangleLoop({ size: [6, 3] });
2506
+ * sweepMesh(profile, [[0, 0, 0], [0, 0, 15], [10, 0, 25]], {
2507
+ * orientation: { kind: "transport", initialNormal: [0, 1, 0] },
2508
+ * });
2509
+ * ```
2510
+ */
2321
2511
  export declare function sweepMesh(profile: Loop2, path: readonly Vec3[], options?: SweepOptions): TriangleMesh;
2322
2512
 
2323
- /** Controls shared by pure mesh construction and filled modeling sweeps. */
2513
+ /**
2514
+ * Controls shared by pure mesh construction and filled modeling sweeps.
2515
+ */
2324
2516
  export declare interface SweepOptions {
2325
2517
  /** Join the path's last station to its first. Open paths retain watertight end caps. */
2326
2518
  readonly closed?: boolean;
@@ -2340,7 +2532,9 @@ export declare interface ArcCurve3 {
2340
2532
  readonly seamProfileOffset?: number;
2341
2533
  }
2342
2534
 
2343
- /** Explicit profile-X frame policy; all normals are directed, and selected singular policies reject. */
2535
+ /**
2536
+ * Explicit profile-X frame policy; all normals are directed, and selected singular policies reject.
2537
+ */
2344
2538
  export declare type SweepOrientation = {
2345
2539
  /** Minimizes frame rotation by parallel transport. */
2346
2540
  readonly kind: "transport";
@@ -2413,7 +2607,9 @@ export declare interface ArcCurve3 {
2413
2607
  /** Nut-edge bevel selection. */
2414
2608
  export declare type ThreadedNutBevel = "automatic" | "both" | "inside" | "none" | "outside";
2415
2609
 
2416
- /** Options for a compensated nut with an internal thread. */
2610
+ /**
2611
+ * Options for a compensated nut with an internal thread.
2612
+ */
2417
2613
  export declare interface ThreadedNutOptions extends Omit<InternalThreadCutterOptions, "bevelBottom" | "bevelSize" | "bevelTop" | "length"> {
2418
2614
  /** Nut body bevel selection. Default: `automatic`. */
2419
2615
  readonly bevel?: ThreadedNutBevel;
@@ -2449,10 +2645,14 @@ export declare interface ArcCurve3 {
2449
2645
  readonly threadCircularSegments: number;
2450
2646
  }
2451
2647
 
2452
- /** Supported printable nut body shapes. */
2648
+ /**
2649
+ * Supported printable nut body shapes.
2650
+ */
2453
2651
  export declare type ThreadedNutShape = "hex" | "round" | "square";
2454
2652
 
2455
- /** Options for a compensated external threaded rod along +Z. */
2653
+ /**
2654
+ * Options for a compensated external threaded rod along +Z.
2655
+ */
2456
2656
  export declare interface ThreadedRodOptions extends Omit<HelicalThreadRidgeMeshOptions, "majorDiameter">, ThreadBevelOptions {
2457
2657
  /** Printable fit or caller-calibrated allowances. Default: `normal`. */
2458
2658
  readonly fit?: PrintableThreadFit | PrintableThreadFitPolicy;
@@ -2500,7 +2700,9 @@ export declare interface ArcCurve3 {
2500
2700
  readonly top?: ThreadEndStyle;
2501
2701
  }
2502
2702
 
2503
- /** Direction in which a conventional helical thread advances around +Z. */
2703
+ /**
2704
+ * Direction in which a conventional helical thread advances around +Z.
2705
+ */
2504
2706
  export declare type ThreadHandedness = "left" | "right";
2505
2707
 
2506
2708
  /** Conventional helix options: `pitch` is adjacent spacing and lead is `pitch * starts`. */
@@ -2531,7 +2733,9 @@ export declare interface ArcCurve3 {
2531
2733
  /** BOSL2-compatible cross-section scaling curve for a blunt thread lead-in. */
2532
2734
  export declare type ThreadLeadInShape = "cut" | "linear" | "smooth" | "sqrt";
2533
2735
 
2534
- /** A validated immutable periodic thread profile in `[axial, radial]` millimetres. */
2736
+ /**
2737
+ * A validated immutable periodic thread profile in `[axial, radial]` millimetres.
2738
+ */
2535
2739
  export declare interface ThreadProfile {
2536
2740
  /** Axial width of the flat at the major envelope. */
2537
2741
  readonly crestFlatWidth: number;
@@ -2555,13 +2759,17 @@ export declare interface ArcCurve3 {
2555
2759
  readonly tolerance?: GeometryToleranceOptions;
2556
2760
  }
2557
2761
 
2558
- /** Supported built-in and caller-defined thread profiles. */
2762
+ /**
2763
+ * Supported built-in and caller-defined thread profiles.
2764
+ */
2559
2765
  export declare type ThreadProfileSpec = AcmeThreadProfileSpec | ButtressThreadProfileSpec | CustomThreadProfileSpec | SquareThreadProfileSpec | TrapezoidalThreadProfileSpec | TriangularThreadProfileSpec;
2560
2766
 
2561
2767
  /** Whether compensation is being applied to an external or internal thread. */
2562
2768
  export declare type ThreadRole = "male" | "female";
2563
2769
 
2564
- /** Dimensions and independent ring/profile tessellation for a torus around the Z axis. */
2770
+ /**
2771
+ * Dimensions and independent ring/profile tessellation for a torus around the Z axis.
2772
+ */
2565
2773
  export declare interface TorusOptions extends PrimitivePlacement {
2566
2774
  /** Explicit sampling ceilings, bounded by the host policy. */
2567
2775
  readonly limits?: Partial<GeometrySamplingLimits>;
@@ -2664,7 +2872,9 @@ export declare interface ArcCurve3 {
2664
2872
  readonly threadAngle?: number;
2665
2873
  }
2666
2874
 
2667
- /** A topology-preserving indexed triangle mesh with XYZ vertex positions. */
2875
+ /**
2876
+ * A topology-preserving indexed triangle mesh with XYZ vertex positions.
2877
+ */
2668
2878
  export declare interface TriangleMesh {
2669
2879
  /** Three unsigned vertex indices per triangle. */
2670
2880
  readonly indices: Uint32Array;
@@ -2672,7 +2882,9 @@ export declare interface ArcCurve3 {
2672
2882
  readonly positions: Float32Array;
2673
2883
  }
2674
2884
 
2675
- /** Measurements and optional edge-connected topology from one validated mesh traversal. */
2885
+ /**
2886
+ * Measurements and optional edge-connected topology from one validated mesh traversal.
2887
+ */
2676
2888
  export declare interface TriangleMeshAnalysis extends TriangleMeshMeasurements {
2677
2889
  /** Number of referenced edge-connected components when `includeTopology` is requested. */
2678
2890
  readonly connectedComponentCount?: number;
@@ -2680,13 +2892,17 @@ export declare interface ArcCurve3 {
2680
2892
  readonly edgeCount?: number;
2681
2893
  }
2682
2894
 
2683
- /** Validation and optional connectivity controls for a shared mesh analysis. */
2895
+ /**
2896
+ * Validation and optional connectivity controls for a shared mesh analysis.
2897
+ */
2684
2898
  export declare interface TriangleMeshAnalysisOptions extends TriangleMeshValidationOptions {
2685
2899
  /** Compute indexed edge/component counts and reject unreferenced vertices; defaults to false. */
2686
2900
  readonly includeTopology?: boolean;
2687
2901
  }
2688
2902
 
2689
- /** Geometric measurements derived from a validated, non-empty triangle mesh. */
2903
+ /**
2904
+ * Geometric measurements derived from a validated, non-empty triangle mesh.
2905
+ */
2690
2906
  export declare interface TriangleMeshMeasurements {
2691
2907
  /** Axis-aligned bounds. */
2692
2908
  readonly bounds: MeshBounds;
@@ -2790,7 +3006,9 @@ export declare interface ArcCurve3 {
2790
3006
  readonly tolerance?: GeometryToleranceOptions;
2791
3007
  }
2792
3008
 
2793
- /** ISO/UTS-like 60-degree truncated triangular profile. */
3009
+ /**
3010
+ * ISO/UTS-like 60-degree truncated triangular profile.
3011
+ */
2794
3012
  export declare interface TriangularThreadProfileSpec extends ThreadProfileBaseSpec {
2795
3013
  /** Selects the 60-degree triangular profile family. */
2796
3014
  readonly kind: "triangular";
@@ -2809,7 +3027,9 @@ export declare interface ArcCurve3 {
2809
3027
  /** Ear-clips one normalized simple CCW loop into stable local vertex indices. */
2810
3028
  export declare function triangulateLoop2(loop: Loop2): Uint32Array;
2811
3029
 
2812
- /** Dimensions, placement, and tessellation for a hollow Z-axis tube. */
3030
+ /**
3031
+ * Dimensions, placement, and tessellation for a hollow Z-axis tube.
3032
+ */
2813
3033
  export declare interface TubeOptions extends CircularPrimitiveOptions, PrimitivePlacement {
2814
3034
  /**
2815
3035
  * Centers the tube on the Z origin when `true`; otherwise its bottom is at `Z = 0`.
@@ -2863,7 +3083,9 @@ export declare interface ArcCurve3 {
2863
3083
  readonly max: readonly [number, number];
2864
3084
  }
2865
3085
 
2866
- /** Immutable vector layout with no browser, font parser, or kernel ownership. */
3086
+ /**
3087
+ * Immutable vector layout with no browser, font parser, or kernel ownership.
3088
+ */
2867
3089
  export declare interface VectorTextLayout {
2868
3090
  /** Nonzero-filled path data in millimetres, positive Y upward; empty for text with no ink. */
2869
3091
  readonly paths: readonly string[];
@@ -2871,7 +3093,9 @@ export declare interface ArcCurve3 {
2871
3093
  readonly metrics: VectorTextMetrics;
2872
3094
  }
2873
3095
 
2874
- /** Horizontal multiline text, bounded to 512 UTF-16 units and 16 lines without wrapping. */
3096
+ /**
3097
+ * Horizontal multiline text, bounded to 512 UTF-16 units and 16 lines without wrapping.
3098
+ */
2875
3099
  export declare interface VectorTextLayoutOptions extends VectorTextOptions {
2876
3100
  /** Place each line's advance at the origin; defaults to left. Ink overhang is preserved. */
2877
3101
  readonly align?: "left" | "center" | "right";