@metamesh/modeling 0.0.0-stage → 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.
Files changed (131) hide show
  1. package/CHANGELOG.md +111 -0
  2. package/LICENSE +200 -0
  3. package/README.md +376 -2
  4. package/THIRD_PARTY_NOTICES.md +153 -0
  5. package/dist/api/engine.d.ts +71 -0
  6. package/dist/api/geometry.d.ts +3136 -0
  7. package/dist/api/index.d.ts +2087 -0
  8. package/dist/api/text.d.ts +93 -0
  9. package/dist/engine/construction-operations.js +189 -0
  10. package/dist/engine/execution.js +227 -0
  11. package/dist/engine/export-3mf.js +100 -0
  12. package/dist/engine/extrusion-finishing.js +82 -0
  13. package/dist/engine/finalization.js +214 -0
  14. package/dist/engine/index.js +83 -0
  15. package/dist/engine/inspection-operations.js +52 -0
  16. package/dist/engine/kernel/LICENSE +201 -0
  17. package/dist/engine/kernel/manifold.js +2 -0
  18. package/dist/engine/kernel/manifold.wasm +0 -0
  19. package/dist/engine/loft-operations.js +156 -0
  20. package/dist/engine/mechanical-operations.js +51 -0
  21. package/dist/engine/modeling-context.js +38 -0
  22. package/dist/engine/native/adapter.js +20 -0
  23. package/dist/engine/native/context.js +209 -0
  24. package/dist/engine/native/copied-views.js +46 -0
  25. package/dist/engine/native/index.js +13 -0
  26. package/dist/engine/native/operations.js +115 -0
  27. package/dist/engine/native/ownership.js +98 -0
  28. package/dist/engine/native/regions.js +138 -0
  29. package/dist/engine/native/scoped-primitives.js +127 -0
  30. package/dist/engine/native/scoped-threads.js +34 -0
  31. package/dist/engine/native/threads.js +52 -0
  32. package/dist/engine/native/transforms.js +111 -0
  33. package/dist/engine/operation-environment.js +20 -0
  34. package/dist/engine/pattern-operations.js +36 -0
  35. package/dist/engine/pattern-placements.js +176 -0
  36. package/dist/engine/primitive-anchors.js +70 -0
  37. package/dist/engine/primitive-correspondence.js +74 -0
  38. package/dist/engine/primitive-operations.js +151 -0
  39. package/dist/engine/primitive-profile-types.js +1 -0
  40. package/dist/engine/primitive-profiles.js +250 -0
  41. package/dist/engine/profile-mesh.js +279 -0
  42. package/dist/engine/section-operations.js +93 -0
  43. package/dist/engine/shape-anchors.js +88 -0
  44. package/dist/engine/transform-operations.js +225 -0
  45. package/dist/engine/types.js +1 -0
  46. package/dist/geometry/anchors.js +226 -0
  47. package/dist/geometry/curves/evaluation.js +162 -0
  48. package/dist/geometry/curves/sampling.js +266 -0
  49. package/dist/geometry/curves/types.js +1 -0
  50. package/dist/geometry/cylinder.js +117 -0
  51. package/dist/geometry/edge-finishing.js +160 -0
  52. package/dist/geometry/errors.js +76 -0
  53. package/dist/geometry/extrusion.js +150 -0
  54. package/dist/geometry/heightfield.js +115 -0
  55. package/dist/geometry/index.js +42 -0
  56. package/dist/geometry/loft-correspondence.js +204 -0
  57. package/dist/geometry/loft-geometry.js +184 -0
  58. package/dist/geometry/loft-options.js +56 -0
  59. package/dist/geometry/loft-simple-mesh.js +92 -0
  60. package/dist/geometry/loft-triangulation.js +64 -0
  61. package/dist/geometry/loft.js +95 -0
  62. package/dist/geometry/math/vector3.js +71 -0
  63. package/dist/geometry/mechanical/gear-motion.js +94 -0
  64. package/dist/geometry/mechanical/gears.js +484 -0
  65. package/dist/geometry/mechanical/index.js +13 -0
  66. package/dist/geometry/mechanical/standards.js +67 -0
  67. package/dist/geometry/mechanical/thread-helices.js +44 -0
  68. package/dist/geometry/mechanical/thread-mesh-plan.js +358 -0
  69. package/dist/geometry/mechanical/thread-mesh.js +142 -0
  70. package/dist/geometry/mechanical/thread-profiles.js +373 -0
  71. package/dist/geometry/mechanical/thread-solids.js +230 -0
  72. package/dist/geometry/mechanical/thread-surface.js +433 -0
  73. package/dist/geometry/mechanical/threads.js +138 -0
  74. package/dist/geometry/mesh-edge-table.js +126 -0
  75. package/dist/geometry/mesh-planar.js +408 -0
  76. package/dist/geometry/mesh-quality.js +396 -0
  77. package/dist/geometry/mesh-signature.js +137 -0
  78. package/dist/geometry/mesh.js +283 -0
  79. package/dist/geometry/model-limits.js +50 -0
  80. package/dist/geometry/numeric.js +11 -0
  81. package/dist/geometry/paths/frames.js +118 -0
  82. package/dist/geometry/paths/helix.js +49 -0
  83. package/dist/geometry/paths/path.js +32 -0
  84. package/dist/geometry/paths/planar.js +135 -0
  85. package/dist/geometry/paths/resampling.js +125 -0
  86. package/dist/geometry/polygon-clipping.js +52 -0
  87. package/dist/geometry/primitive-options.js +1 -0
  88. package/dist/geometry/primitive-resolution.js +17 -0
  89. package/dist/geometry/primitive-resolvers.js +235 -0
  90. package/dist/geometry/profiles/matched.js +192 -0
  91. package/dist/geometry/profiles/open-profile.js +137 -0
  92. package/dist/geometry/profiles/profiles.js +91 -0
  93. package/dist/geometry/profiles/rectangle.js +249 -0
  94. package/dist/geometry/profiles/shapes.js +41 -0
  95. package/dist/geometry/profiles/span-sampling.js +28 -0
  96. package/dist/geometry/profiles/types.js +1 -0
  97. package/dist/geometry/profiles/validation.js +20 -0
  98. package/dist/geometry/regions.js +371 -0
  99. package/dist/geometry/resolution.js +236 -0
  100. package/dist/geometry/revolve/revolve-mesh.js +129 -0
  101. package/dist/geometry/sampling-limits.js +29 -0
  102. package/dist/geometry/stroke-path.js +181 -0
  103. package/dist/geometry/svg/errors.js +23 -0
  104. package/dist/geometry/svg/fill.js +172 -0
  105. package/dist/geometry/svg/index.js +1 -0
  106. package/dist/geometry/svg/matrix.js +130 -0
  107. package/dist/geometry/svg/parser.js +536 -0
  108. package/dist/geometry/svg/path.js +349 -0
  109. package/dist/geometry/svg/types.js +1 -0
  110. package/dist/geometry/svg-import.js +662 -0
  111. package/dist/geometry/sweeps/options.js +28 -0
  112. package/dist/geometry/sweeps/orientation.js +106 -0
  113. package/dist/geometry/sweeps/stations.js +161 -0
  114. package/dist/geometry/sweeps/sweep-closed.js +96 -0
  115. package/dist/geometry/sweeps/sweep-mesh.js +30 -0
  116. package/dist/geometry/sweeps/sweep-open.js +76 -0
  117. package/dist/geometry/sweeps/validation.js +116 -0
  118. package/dist/geometry/text-contours.js +32 -0
  119. package/dist/geometry/text-layout.js +1 -0
  120. package/dist/geometry/tolerance.js +53 -0
  121. package/dist/geometry/transform-geometry.js +41 -0
  122. package/dist/geometry/transform3.js +340 -0
  123. package/dist/geometry/types.js +1 -0
  124. package/dist/index.js +1 -0
  125. package/dist/model/execution-binding.js +30 -0
  126. package/dist/model/operations.js +154 -0
  127. package/dist/model/options.js +1 -0
  128. package/dist/model/types.js +1 -0
  129. package/dist/text/index.js +58 -0
  130. package/dist/text/vector-text-layout.js +279 -0
  131. package/package.json +100 -3
@@ -0,0 +1,2087 @@
1
+ /** Imported modeling operations and opaque host-owned contracts. @packageDocumentation */
2
+
3
+ /** ACME 29-degree included-angle profile. */
4
+ declare interface AcmeThreadProfileSpec extends ThreadProfileBaseSpec {
5
+ /** Selects the 29-degree ACME profile family. */
6
+ readonly kind: "acme";
7
+ /**
8
+ * Radial depth in millimetres.
9
+ * @defaultValue `pitch / 2`
10
+ */
11
+ readonly depth?: number;
12
+ }
13
+
14
+ /** Reads one immutable named anchor from a shape in the active build. */
15
+ export declare const anchor: ModelingContext["anchor"];
16
+
17
+ /**
18
+ * An attachment pose on a solid or assembly.
19
+ *
20
+ * `direction` is the outward attachment normal. `up` controls roll and must not
21
+ * be parallel to `direction`; anchor construction projects and normalizes it.
22
+ */
23
+ export declare interface Anchor3 {
24
+ /** Unit outward normal used as the anchor's local +Z direction. */
25
+ readonly direction: Vec3;
26
+ /** World-space attachment position. */
27
+ readonly position: Vec3;
28
+ /** Roll guide projected into the plane perpendicular to `direction`. */
29
+ readonly up: Vec3;
30
+ }
31
+
32
+ /** Host-bound attach operation. Valid only during a synchronous build. */
33
+ export declare const attach: ModelingContext["attach"];
34
+
35
+ /**
36
+ * Degree-based anchor attachment controls for a scoped solid.
37
+ */
38
+ export declare interface AttachOptions {
39
+ /** Align outward directions face-to-face (`opposed`) or in parallel (`same`). */
40
+ readonly alignment?: "opposed" | "same";
41
+ /** Separation along the target anchor's outward direction in millimetres. */
42
+ readonly gap?: number;
43
+ /** Additional right-handed roll about the attached direction, in degrees. */
44
+ readonly spinDegrees?: number;
45
+ /** Optional numeric comparison overrides. */
46
+ readonly tolerance?: GeometryToleranceOptions;
47
+ }
48
+
49
+ /** Host-bound box operation. Valid only during a synchronous build. */
50
+ export declare const box: ModelingContext["box"];
51
+
52
+ /** Box edges use +Z top, +Y front and +X right; vertical names list front/back first. */
53
+ export declare type BoxEdge = "top-front" | "top-back" | "top-left" | "top-right" | "bottom-front" | "bottom-back" | "bottom-left" | "bottom-right" | "front-left" | "front-right" | "back-left" | "back-right";
54
+
55
+ /** Named individual edges or top/bottom rims and all four vertical edges. */
56
+ export declare type BoxEdgeSelection = BoxEdge | "top" | "bottom" | "vertical";
57
+
58
+ /** Independent treatments for disjoint named edge selections; overlapping selections fail. */
59
+ export declare type BoxEdgeTreatments = Readonly<Partial<Record<BoxEdgeSelection, EdgeTreatment>>>;
60
+
61
+ /**
62
+ * Dimensions, placement, and uniform or independently selected finishing for an axis-aligned box.
63
+ */
64
+ export declare interface BoxOptions extends PrimitivePlacement {
65
+ /** Explicit sampling ceilings for edge treatments, bounded by the host policy. */
66
+ readonly limits?: Partial<GeometrySamplingLimits>;
67
+ /**
68
+ * Centers the box on the XYZ origin when `true`; otherwise its minimum corner is at the origin.
69
+ * @defaultValue `true`
70
+ */
71
+ readonly center?: boolean;
72
+ /** Positive uniform size or explicit `[X, Y, Z]` extents in millimetres. */
73
+ readonly size: number | Vec3;
74
+ /** Uniform treatment or independent disjoint nominal edge/group treatments. */
75
+ readonly treatment?: EdgeTreatment | BoxEdgeTreatments;
76
+ }
77
+
78
+ /** A bare solid receives the semantic part ID `model`. Explicit parts preserve their IDs. */
79
+ export declare type BuildOutput = Solid | readonly ModelPart[];
80
+
81
+ /** Axial side carrying the near-normal pressure flank of a buttress thread. */
82
+ declare type ButtressPressureFlankSide = "negative" | "positive";
83
+
84
+ /** Asymmetric printable buttress profile with 7/45-degree flanks. */
85
+ declare interface ButtressThreadProfileSpec extends ThreadProfileBaseSpec {
86
+ /** Selects the asymmetric printable buttress profile family. */
87
+ readonly kind: "buttress";
88
+ /**
89
+ * Radial depth in millimetres.
90
+ * @defaultValue `0.66271 * pitch`
91
+ */
92
+ readonly depth?: number;
93
+ /**
94
+ * Axial side of each tooth carrying the 7-degree pressure flank. The opposite side uses the
95
+ * 45-degree clearance flank.
96
+ * @defaultValue `"positive"`
97
+ */
98
+ readonly pressureFlankSide?: ButtressPressureFlankSide;
99
+ }
100
+
101
+ /**
102
+ * A planar edge or corner chamfer with equal or independent surface setbacks.
103
+ */
104
+ export declare interface ChamferedEdgeTreatment {
105
+ /** Selects a straight bevel between adjoining surfaces. */
106
+ readonly kind: "chamfer";
107
+ /** Positive tangent setbacks in millimetres, equal or [first surface, second surface]; selected treatments must fit without overlap. */
108
+ readonly distance: number | readonly [first: number, second: number];
109
+ }
110
+
111
+ /** Host-bound circle operation. Valid only during a synchronous build. */
112
+ export declare const circle: ModelingContext["circle"];
113
+
114
+ /**
115
+ * Circular profile dimensions with exactly one radius or diameter and explicit sampling.
116
+ */
117
+ export declare type CircleLoopOptions = CircularPrimitiveOptions & RadialSizingOptions & ({
118
+ /** Positive nominal radius in millimetres; mutually exclusive with diameter. */
119
+ readonly radius: number;
120
+ /** Full diameter is unavailable when radius is supplied. */
121
+ readonly diameter?: never;
122
+ } | {
123
+ /** Positive full diameter in millimetres; mutually exclusive with radius. */
124
+ readonly diameter: number;
125
+ /** Radius is unavailable when diameter is supplied. */
126
+ readonly radius?: never;
127
+ });
128
+
129
+ /**
130
+ * Circular dimensions with exactly one nominal radius or diameter.
131
+ */
132
+ export declare type CircleOptions = CircleLoopOptions & PrimitivePlacement;
133
+
134
+ /**
135
+ * Tessellation controls shared by circular primitives across Geometry entry points.
136
+ */
137
+ export declare interface CircularPrimitiveOptions {
138
+ /** Explicit sampling ceilings; bound modeling operations may only lower the host policy. */
139
+ readonly limits?: Partial<GeometrySamplingLimits>;
140
+ /**
141
+ * Exact circumferential segment count from three through the configured safety limit.
142
+ *
143
+ * This local topology override takes precedence over {@link CircularPrimitiveOptions.resolution}
144
+ * and any active model-wide resolution policy.
145
+ */
146
+ readonly segments?: number;
147
+ /** Operation-level physical tessellation policy over the active model-wide policy. */
148
+ readonly resolution?: GeometryResolution;
149
+ }
150
+
151
+ /** Host-bound components operation. Valid only during a synchronous build. */
152
+ export declare const components: ModelingContext["components"];
153
+
154
+ /** Host-bound compose operation. Valid only during a synchronous build. */
155
+ export declare const compose: ModelingContext["compose"];
156
+
157
+ /** One sampled component retaining contour identities and logical point correspondence. */
158
+ export declare interface CorrespondingComponent {
159
+ /** Stable canonical lowercase identity; unique within the containing topology or output. */
160
+ readonly id: string;
161
+ /** Counterclockwise outer contour. */
162
+ readonly outer: CorrespondingContour;
163
+ /** Clockwise hole contours belonging to this component. */
164
+ readonly holes: readonly CorrespondingContour[];
165
+ }
166
+
167
+ /** A sampled contour retaining logical slots, including intentionally collapsed spans. */
168
+ export declare interface CorrespondingContour {
169
+ /** Stable canonical lowercase identity; unique within the containing topology or output. */
170
+ readonly id: string;
171
+ /** Ordered sampled points in millimetres; closing vertices are implicit. */
172
+ readonly points: Loop2;
173
+ /** One span identity per point; indices correspond between every matched family member. */
174
+ readonly spans: readonly string[];
175
+ }
176
+
177
+ /** Shared logical contour sampling suitable for a loft or hollow sweep. */
178
+ export declare interface CorrespondingProfile {
179
+ /** Ordered components with explicit contour identities. */
180
+ readonly components: readonly CorrespondingComponent[];
181
+ }
182
+
183
+ /** One already matched profile at an explicit height or right-handed spatial frame. */
184
+ export declare type CorrespondingProfileStation = LoftPlacement & {
185
+ /** Already corresponding filled contours with authoritative landmark slots. */
186
+ readonly profile: CorrespondingProfile;
187
+ };
188
+
189
+ /** Caller-defined periodic axial/radial profile in millimetres. */
190
+ declare interface CustomThreadProfileSpec extends ThreadProfileBaseSpec {
191
+ /** Selects a caller-defined periodic profile. */
192
+ readonly kind: "custom";
193
+ /**
194
+ * Open path spanning exactly `[-pitch/2, pitch/2]`, with both endpoints on the minor envelope,
195
+ * one connected ridge, one contiguous crest, and radial zero at the major envelope.
196
+ */
197
+ readonly points: readonly Vec2[];
198
+ }
199
+
200
+ /** Host-bound cylinder operation. Valid only during a synchronous build. */
201
+ export declare const cylinder: ModelingContext["cylinder"];
202
+
203
+ /**
204
+ * Dimensions, placement, independent end finishing, and tessellation for a Z-axis cylinder or frustum.
205
+ */
206
+ export declare type CylinderOptions = CircularPrimitiveOptions & RadialSizingOptions & PrimitivePlacement & {
207
+ /**
208
+ * Centers the solid on the Z origin when `true`; otherwise its bottom is at `Z = 0`.
209
+ * @defaultValue `true`
210
+ */
211
+ readonly center?: boolean;
212
+ /** Independent end treatments; first setback is cap inset and second follows the sloped side. */
213
+ readonly ends?: EndTreatments;
214
+ /** Total height along +Z in millimetres. */
215
+ readonly height: number;
216
+ } & ({
217
+ /** Positive uniform radius or nonnegative `[bottom, top]` radii in millimetres; one must be positive. */
218
+ readonly radius: number | readonly [bottom: number, top: number];
219
+ /** Full diameter is unavailable when radius is supplied. */
220
+ readonly diameter?: never;
221
+ } | {
222
+ /** Positive uniform diameter or nonnegative `[bottom, top]` diameters in millimetres; one must be positive. */
223
+ readonly diameter: number | readonly [bottom: number, top: number];
224
+ /** Radius is unavailable when diameter is supplied. */
225
+ readonly radius?: never;
226
+ });
227
+
228
+ /**
229
+ * Uniform finishing vocabulary shared by applicable solid edges and profile corners.
230
+ */
231
+ export declare type EdgeTreatment = ChamferedEdgeTreatment | RoundedEdgeTreatment | SmoothEdgeTreatment | ProfiledEdgeTreatment;
232
+
233
+ /** Host-bound ellipse operation. Valid only during a synchronous build. */
234
+ export declare const ellipse: ModelingContext["ellipse"];
235
+
236
+ /**
237
+ * Ellipse dimensions with exactly one XY radii or full-size tuple and explicit sampling.
238
+ */
239
+ export declare type EllipseLoopOptions = CircularPrimitiveOptions & ({
240
+ /** Positive XY radii in millimetres; mutually exclusive with size. */
241
+ readonly radius: Vec2;
242
+ /** Full XY extents are unavailable when radius is supplied. */
243
+ readonly size?: never;
244
+ } | {
245
+ /** Positive full XY extents in millimetres; mutually exclusive with radius. */
246
+ readonly size: Vec2;
247
+ /** XY radii are unavailable when size is supplied. */
248
+ readonly radius?: never;
249
+ });
250
+
251
+ /**
252
+ * Ellipse dimensions in local XY, with exactly one radii or full-size tuple.
253
+ */
254
+ export declare type EllipseOptions = EllipseLoopOptions & PrimitivePlacement;
255
+
256
+ /**
257
+ * Independent inward finishing on primitive or straight convex extrusion ends.
258
+ */
259
+ export declare interface EndTreatments {
260
+ /** Bottom cap and adjoining side; omitted leaves the end untreated. */
261
+ readonly bottom?: EdgeTreatment;
262
+ /** Top cap and adjoining side; omitted leaves the end untreated. */
263
+ readonly top?: EdgeTreatment;
264
+ }
265
+
266
+ /** Host-bound extrude operation. Valid only during a synchronous build. */
267
+ export declare const extrude: ModelingContext["extrude"];
268
+
269
+ /**
270
+ * Dimensions and sampling shared by native and pure +Z extrusion.
271
+ */
272
+ export declare interface ExtrudeOptions extends ExtrusionSamplingOptions {
273
+ /** Positive extrusion height in millimetres. */
274
+ readonly height: number;
275
+ /** Center the extrusion on Z; otherwise its bottom is at zero. Defaults to false. */
276
+ readonly center?: boolean;
277
+ /** Independent inward end treatments on straight convex single-contour extrusions. */
278
+ readonly ends?: EndTreatments;
279
+ }
280
+
281
+ /** Shared sampling controls for a twisted or scaled linear extrusion. */
282
+ declare interface ExtrusionSamplingOptions {
283
+ /** Exact number of intermediate profiles, nonnegative; overrides physical sampling. */
284
+ readonly divisions?: number;
285
+ /** Explicit output and sampling allocation ceilings. */
286
+ readonly limits?: Partial<ModelingLimits>;
287
+ /** Operation-level physical policy over the nearest model scope. */
288
+ readonly resolution?: GeometryResolution;
289
+ /** Finite uniform or XY scale of the top profile; defaults to one. */
290
+ readonly scaleTop?: number | Vec2;
291
+ /** Finite rotation of the top profile about +Z, in degrees; defaults to zero. */
292
+ readonly twistDegrees?: number;
293
+ }
294
+
295
+ /** Finalized manufacturing snapshot. Its arrays are independent of all native values. */
296
+ export declare interface FinalizedModel {
297
+ /** Ordered finalized manufacturing parts with copied transferable arrays. */
298
+ readonly parts: readonly FinalizedPart[];
299
+ /** Axis-aligned XYZ bounds in millimetres. */
300
+ readonly bounds: MeshBounds;
301
+ /** Aggregate counts, unique backing storage, volume, and execution timings. */
302
+ readonly stats: {
303
+ /** Aggregate position-buffer vertex count. */
304
+ readonly vertices: number;
305
+ /** Aggregate indexed triangle count. */
306
+ readonly triangles: number;
307
+ /** Signed enclosed volume of all selected parts in cubic millimetres. */
308
+ readonly volumeMm3: number;
309
+ /** Unique transferable backing-buffer bytes, counted once across all parts. */
310
+ readonly bytes: number;
311
+ /** Synchronous callback duration in milliseconds. */
312
+ readonly buildMs: number;
313
+ /** Manufacturing validation and buffer finalization duration in milliseconds. */
314
+ readonly finalizationMs: number;
315
+ /** Total callback and finalization duration in milliseconds. */
316
+ readonly generationMs: number;
317
+ };
318
+ }
319
+
320
+ /** Copied manufacturing part with facts computed from the finalized mesh. */
321
+ export declare interface FinalizedPart extends TriangleMesh {
322
+ /** Stable canonical lowercase identity; unique within the containing topology or output. */
323
+ readonly id: string;
324
+ /** Optional six-digit hex RGB display color. */
325
+ readonly color?: string;
326
+ /** Fresh validated facts for these exact finalized buffers. */
327
+ readonly measurements: TriangleMeshAnalysis;
328
+ }
329
+
330
+ /** A right-handed orthonormal coordinate frame expressed in world coordinates. */
331
+ export declare interface Frame3 {
332
+ /** World-space origin of the local frame. */
333
+ readonly origin: Vec3;
334
+ /** Unit vector defining the local +X axis. */
335
+ readonly xAxis: Vec3;
336
+ /** Unit vector defining the local +Y axis. */
337
+ readonly yAxis: Vec3;
338
+ /** Unit vector defining the local +Z axis. */
339
+ readonly zAxis: Vec3;
340
+ }
341
+
342
+ /** Host-bound fromRegion operation. Valid only during a synchronous build. */
343
+ export declare const fromRegion: ModelingContext["fromRegion"];
344
+
345
+ /**
346
+ * Tessellation policy for sampled geometry measured in millimetres.
347
+ */
348
+ export declare interface GeometryResolution {
349
+ /** Optional exact full-circle segment count, of at least three, bounded by the selected circular ceiling. */
350
+ readonly circularSegments?: number;
351
+ /** Maximum radial chord error in millimetres; defaults to 0.05. */
352
+ readonly maxChordError?: number;
353
+ /** Optional maximum sampled edge length in millimetres. */
354
+ readonly maxSegmentLength?: number;
355
+ /** Upper safety bound for a full circle; defaults to the selected maxCircularSegments (512 by default). */
356
+ readonly maximumSegments?: number;
357
+ /** Lower full-circle segment count; defaults to 16 or a lower selected circular ceiling. */
358
+ readonly minimumSegments?: number;
359
+ }
360
+
361
+ /** Explicit allocation ceilings for pure sampling and host-owned modeling operations. */
362
+ export declare interface GeometrySamplingLimits {
363
+ /** Maximum points in one sampled path or placement/frame result. */
364
+ readonly maxPathPoints: number;
365
+ /** Maximum aggregate points in one sampled profile or Section. */
366
+ readonly maxProfilePoints: number;
367
+ /** Maximum points in one profile swept along a path. */
368
+ readonly maxSweepProfilePoints: number;
369
+ /** Maximum segments around one complete circle. */
370
+ readonly maxCircularSegments: number;
371
+ }
372
+
373
+ /** Optional overrides for MetaMesh's geometry comparison policy. */
374
+ export declare interface GeometryToleranceOptions {
375
+ /** Absolute distance floor in model units. Must be finite and greater than zero. */
376
+ readonly absolute?: number;
377
+ /** Angular comparison threshold in radians. Must be finite and greater than zero. */
378
+ readonly angular?: number;
379
+ /** Dimensionless scale multiplier. Must be finite and non-negative. */
380
+ readonly relative?: number;
381
+ }
382
+
383
+ /** Host-bound gridPattern operation. Valid only during a synchronous build. */
384
+ export declare const gridPattern: ModelingContext["gridPattern"];
385
+
386
+ /**
387
+ * XY or XYZ grid with X varying fastest. The first item starts at the local origin.
388
+ */
389
+ export declare type GridPatternOptions = {
390
+ /** Center the complete distribution around its local origin; defaults to false. */
391
+ readonly center?: boolean;
392
+ /** Optional right-handed local axes and origin for the grid. */
393
+ readonly frame?: Frame3;
394
+ } & ({
395
+ /** Positive integer counts on X and Y. */
396
+ readonly count: Vec2;
397
+ /** Signed millimetres between adjacent copies on X and Y. */
398
+ readonly spacing: Vec2;
399
+ } | {
400
+ /** Positive integer counts on X, Y and Z. */
401
+ readonly count: Vec3;
402
+ /** Signed millimetres between adjacent copies on X, Y and Z. */
403
+ readonly spacing: Vec3;
404
+ });
405
+
406
+ /** Constructs a closed regularly sampled heightfield during the active synchronous build. */
407
+ export declare const heightfield: ModelingContext["heightfield"];
408
+
409
+ /** A regularly sampled, closed heightfield above a flat base, in millimetres. */
410
+ export declare interface HeightfieldOptions {
411
+ /** Positive XY footprint. */
412
+ readonly size: Vec2;
413
+ /** Exact positive integer X/Y interval counts. */
414
+ readonly segments: readonly [x: number, y: number];
415
+ /** Absolute top Z at the supplied XY point. Every sample must be above baseZ. */
416
+ readonly height: (point: Vec2) => number;
417
+ /** Flat bottom Z. Defaults to zero. */
418
+ readonly baseZ?: number;
419
+ /** Lower-left footprint XY. Omitted centers the footprint on XY. */
420
+ readonly origin?: Vec2;
421
+ }
422
+
423
+ /** Runtime-neutral options for the dedicated helical ridge mesher. */
424
+ export declare interface HelicalThreadRidgeMeshOptions {
425
+ /**
426
+ * Optional bottom/top ridge-end treatments. Standalone ridges honor the requested boundaries;
427
+ * BOSL2-style non-cut lead-in scaling is available on complete thread solids.
428
+ */
429
+ readonly ends?: ThreadEndTreatmentOptions;
430
+ /** Helix direction. Default: `right`. */
431
+ readonly handedness?: ThreadHandedness;
432
+ /** Total threaded axial length in millimetres. */
433
+ readonly length: number;
434
+ /** Explicit output and circular allocation ceilings. */
435
+ readonly limits?: Partial<ModelingLimits>;
436
+ /** Nominal major diameter before any caller-owned fit compensation. */
437
+ readonly majorDiameter: number;
438
+ /** Angular offset of the first start in degrees. Default: `0`. */
439
+ readonly phaseDegrees?: number;
440
+ /** Validated periodic profile repeated around the shaft. */
441
+ readonly profile: ThreadProfile;
442
+ /** Optional circular-resolution policy. */
443
+ readonly resolution?: GeometryResolution;
444
+ /** Number of evenly phased starts. Default: `1`. */
445
+ readonly starts?: number;
446
+ /** Optional numerical tolerance overrides. */
447
+ readonly tolerance?: GeometryToleranceOptions;
448
+ }
449
+
450
+ /** Conservative allocation facts resolved before constructing a direct thread solid mesh. */
451
+ export declare interface HelicalThreadSolidMeshPreflight {
452
+ /** Uniform axial intervals required only by a requested physical segment-length limit. */
453
+ readonly axialIntervals: number;
454
+ /** Start-aligned full-circle segment count used by the surface mesh. */
455
+ readonly circularSegments: number;
456
+ /** Conservative surface-row count across profile breaks, ends, and bevel stations. */
457
+ readonly estimatedRows: number;
458
+ /** Conservative triangle count used by the selected output allocation policy. */
459
+ readonly estimatedTriangles: number;
460
+ }
461
+
462
+ /** Host-bound hull operation. Valid only during a synchronous build. */
463
+ export declare const hull: ModelingContext["hull"];
464
+
465
+ /** Hull inputs are either finite points or same-build solids. */
466
+ export declare type HullOptions = {
467
+ /** Finite millimetre XYZ points to include in the convex hull. */
468
+ readonly points: readonly Vec3[];
469
+ /** Point input excludes solid input. */
470
+ readonly solids?: never;
471
+ } | {
472
+ /** Same-build solids to include in the convex hull. */
473
+ readonly solids: readonly Solid[];
474
+ /** Solid input excludes point input. */
475
+ readonly points?: never;
476
+ };
477
+
478
+ /** Host-bound implicit operation. Valid only during a synchronous build. */
479
+ export declare const implicit: ModelingContext["implicit"];
480
+
481
+ /** Positive-inside sampling, bounded to 4M native BCC grid slots and 8M field calls. */
482
+ export declare interface ImplicitOptions {
483
+ /** Positive-inside scalar field evaluated at finite XYZ points. */
484
+ readonly field: (point: Vec3) => number;
485
+ /** Axis-aligned XYZ bounds in millimetres. */
486
+ readonly bounds: MeshBounds;
487
+ /** Positive sampling edge length in millimetres. */
488
+ readonly edgeLength: number;
489
+ /** Field isosurface value; defaults to zero. */
490
+ readonly level?: number;
491
+ /** Explicit nonnegative native geometric tolerance in millimetres. */
492
+ readonly tolerance?: number;
493
+ }
494
+
495
+ /** Host-bound inspectSection operation. Valid only during a synchronous build. */
496
+ export declare const inspectSection: ModelingContext["inspectSection"];
497
+
498
+ /** Host-bound inspectSolid operation. Valid only during a synchronous build. */
499
+ export declare const inspectSolid: ModelingContext["inspectSolid"];
500
+
501
+ /** Host-bound internalThreadCutter operation. Valid only during a synchronous build. */
502
+ export declare const internalThreadCutter: ModelingContext["internalThreadCutter"];
503
+
504
+ /** Options for a compensated internal-thread subtraction tool along +Z. */
505
+ export declare interface InternalThreadCutterOptions extends Omit<HelicalThreadRidgeMeshOptions, "majorDiameter">, ThreadBevelOptions {
506
+ /** Printable fit or caller-calibrated allowances. Default: `normal`. */
507
+ readonly fit?: PrintableThreadFit | PrintableThreadFitPolicy;
508
+ /** Nominal major diameter before female compensation and faceting correction. */
509
+ readonly nominalMajorDiameter: number;
510
+ }
511
+
512
+ /** Host-bound intersect operation. Valid only during a synchronous build. */
513
+ export declare const intersect: ModelingContext["intersect"];
514
+
515
+ /** Host-bound linearPattern operation. Valid only during a synchronous build. */
516
+ export declare const linearPattern: ModelingContext["linearPattern"];
517
+
518
+ /**
519
+ * Equal linear intervals determined by exactly two of count, spacing and total length.
520
+ */
521
+ export declare type LinearPatternOptions = {
522
+ /** Direction of repetition; magnitude is ignored. Defaults to +X. */
523
+ readonly direction?: Vec3;
524
+ } & ({
525
+ /** Positive copy count, including the original. */
526
+ readonly count: number;
527
+ /** Signed nonzero millimetres between adjacent copies. */
528
+ readonly spacing: number;
529
+ /** Determined by count and spacing. */
530
+ readonly length?: never;
531
+ } | {
532
+ /** Positive copy count, including the original. */
533
+ readonly count: number;
534
+ /** Signed millimetres from first to last copy; zero only for one copy. */
535
+ readonly length: number;
536
+ /** Determined by count and length. */
537
+ readonly spacing?: never;
538
+ } | {
539
+ /** Signed nonzero millimetres between adjacent copies. */
540
+ readonly spacing: number;
541
+ /** Signed first-to-last millimetres; a nonnegative whole multiple of spacing. */
542
+ readonly length: number;
543
+ /** Determined by spacing and length. */
544
+ readonly count?: never;
545
+ });
546
+
547
+ /** Host-bound loft operation. Valid only during a synchronous build. */
548
+ export declare const loft: ModelingContext["loft"];
549
+
550
+ /** Deterministic ordered edge subdivision or bounded geometric vertex association. */
551
+ export declare type LoftCorrespondence = "direct" | "reindex" | "fast-distance" | "distance";
552
+
553
+ /**
554
+ * Shared controls for native and pure lofts. Point data and arbitrary Sections require explicit correspondence.
555
+ */
556
+ export declare interface LoftOptions {
557
+ /** 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. */
558
+ readonly correspondence?: LoftCorrespondence | readonly LoftCorrespondence[];
559
+ /** Extra points follow edge length or distribute equally across existing segments. Defaults to perimeter for direct/reindex, or segments when any distance method is selected; distance methods require segments. */
560
+ readonly distribution?: "perimeter" | "segments";
561
+ /** Positive integer point-density multiplier, uniformly or per input profile. Original vertices are retained. Defaults to one. */
562
+ readonly refine?: number | readonly number[];
563
+ /** Nonnegative count of world-linearly interpolated profiles, uniformly or per gap. Defaults to zero. */
564
+ readonly slices?: number | readonly number[];
565
+ /** Physical curve policy for retained primitives, and maximum edge length for point data. Exact primitive curve counts take precedence. */
566
+ readonly resolution?: GeometryResolution;
567
+ /** Explicit output and sampling budgets; native operations may only lower host ceilings. */
568
+ readonly limits?: Partial<ModelingLimits>;
569
+ }
570
+
571
+ /**
572
+ * A horizontal XY station height, or an explicit right-handed spatial frame, never both.
573
+ */
574
+ export declare type LoftPlacement = {
575
+ /** Horizontal XY station height in millimetres. */
576
+ readonly z: number;
577
+ /** Excluded when a horizontal height is supplied. */
578
+ readonly frame?: never;
579
+ } | {
580
+ /** Right-handed orthonormal station frame in world coordinates. */
581
+ readonly frame: Frame3;
582
+ /** Excluded when an explicit spatial frame is supplied. */
583
+ readonly z?: never;
584
+ };
585
+
586
+ /**
587
+ * A Section or point loop at an explicit height or frame.
588
+ */
589
+ export declare type LoftStation = LoftPlacement & {
590
+ /** Same-build filled Section or ordered XY boundary point data. */
591
+ readonly profile: Section | Loop2;
592
+ };
593
+
594
+ /**
595
+ * A closed two-dimensional boundary whose first point is not repeated at the end.
596
+ *
597
+ * Polygon exteriors are counter-clockwise and holes are clockwise. Algorithms
598
+ * may reject duplicate adjacent points or fewer than three effective vertices.
599
+ */
600
+ export declare type Loop2 = readonly Vec2[];
601
+
602
+ /** Matches an explicit profile family using the current build's physical resolution. */
603
+ export declare const matchProfiles: ModelingContext["matchProfiles"];
604
+
605
+ /** Explicit family sampling settings; omitted values use physical package defaults. */
606
+ export declare interface MatchProfilesOptions {
607
+ /** Local physical sampling policy; exact interval counts take precedence. */
608
+ readonly resolution?: GeometryResolution;
609
+ /** Explicit per-profile and circular ceilings; the family also has a one-million-slot work bound. */
610
+ readonly limits?: Partial<GeometrySamplingLimits>;
611
+ }
612
+
613
+ /**
614
+ * Axis-aligned bounds of a non-empty triangle mesh.
615
+ */
616
+ export declare interface MeshBounds {
617
+ /** Inclusive minimum XYZ coordinates. */
618
+ readonly min: Vec3;
619
+ /** Inclusive maximum XYZ coordinates. */
620
+ readonly max: Vec3;
621
+ }
622
+
623
+ /** Named direct mesh part. Input is copied, validated, and bounded by the host. */
624
+ export declare interface MeshPart {
625
+ /** Stable canonical lowercase identity; unique within the containing topology or output. */
626
+ readonly id: string;
627
+ /** Optional six-digit hex RGB display color. */
628
+ readonly color?: string;
629
+ /** Direct manufacturing mesh; mutually exclusive with a solid handle. */
630
+ readonly mesh: TriangleMesh;
631
+ /** Same-build solid handle; mutually exclusive with a direct mesh. */
632
+ readonly solid?: never;
633
+ }
634
+
635
+ /** Host-bound minkowskiSum operation. Valid only during a synchronous build. */
636
+ export declare const minkowskiSum: ModelingContext["minkowskiSum"];
637
+
638
+ /** Host-bound mirror operation. Valid only during a synchronous build. */
639
+ export declare const mirror: ModelingContext["mirror"];
640
+
641
+ /** The sole modeling facade used by compiled and authored generators.
642
+ * Methods are bound to the host execution and can be destructured safely. Angles are degrees;
643
+ * lengths are millimetres. Handles cannot outlive this build or cross into a different build.
644
+ */
645
+ export declare interface ModelingContext {
646
+ /** Derives a context with explicit physical sampling defaults in the same execution. */
647
+ withResolution(this: void, resolution: GeometryResolution): ModelingContext;
648
+ /**
649
+ * Axis-aligned box with uniform or disjoint named edge/group treatments.
650
+ *
651
+ * @example Rounded box
652
+ * ```ts
653
+ * box({ size: [30, 20, 8], treatment: { kind: "round", radius: 2 } });
654
+ * ```
655
+ */
656
+ box(this: void, options: BoxOptions): Solid;
657
+ /**
658
+ * +Z cylinder or frustum. Face sizing compensates polygon faceting.
659
+ *
660
+ * @example Cylinder
661
+ * ```ts
662
+ * cylinder({ height: 20, radius: 10 });
663
+ * ```
664
+ *
665
+ * @example Cone
666
+ * ```ts
667
+ * cylinder({ height: 20, radius: [10, 0] });
668
+ * ```
669
+ */
670
+ cylinder(this: void, options: CylinderOptions): Solid;
671
+ /**
672
+ * Hollow +Z tube.
673
+ *
674
+ * @example Tube
675
+ * ```ts
676
+ * tube({ height: 20, outerRadius: 10, innerRadius: 6 });
677
+ * ```
678
+ */
679
+ tube(this: void, options: TubeOptions): Solid;
680
+ /**
681
+ * Origin-centered sphere.
682
+ *
683
+ * @example Sphere
684
+ * ```ts
685
+ * sphere({ diameter: 20 });
686
+ * ```
687
+ */
688
+ sphere(this: void, options: SphereOptions): Solid;
689
+ /**
690
+ * Torus around +Z.
691
+ *
692
+ * @example Torus
693
+ * ```ts
694
+ * torus({ majorRadius: 12, minorRadius: 3 });
695
+ * ```
696
+ */
697
+ torus(this: void, options: TorusOptions): Solid;
698
+ /**
699
+ * Robust union.
700
+ *
701
+ * @example Union
702
+ * ```ts
703
+ * const block = box({ size: 20 });
704
+ * const cap = translate(sphere({ radius: 10 }), [0, 0, 10]);
705
+ * union([block, cap]);
706
+ * ```
707
+ */
708
+ union(this: void, solids: readonly Solid[]): Solid;
709
+ /** Native filled section union; dimensions cannot be mixed. */
710
+ union(this: void, sections: readonly Section[]): Section;
711
+ /**
712
+ * Robust difference; an empty cutter array preserves the source.
713
+ *
714
+ * @example Subtract
715
+ * ```ts
716
+ * const plate = box({ size: [30, 20, 6] });
717
+ * // Extend the cutter beyond both faces.
718
+ * const bore = cylinder({ height: 8, radius: 3, sizing: "face" });
719
+ * subtract(plate, [bore]);
720
+ * ```
721
+ */
722
+ subtract(this: void, solid: Solid, cutters: readonly Solid[]): Solid;
723
+ /** Native section difference; an empty cutter array preserves the source. */
724
+ subtract(this: void, section: Section, cutters: readonly Section[]): Section;
725
+ /**
726
+ * Robust intersection.
727
+ *
728
+ * @example Intersect
729
+ * ```ts
730
+ * intersect([box({ size: 20 }), sphere({ radius: 12 })]);
731
+ * ```
732
+ */
733
+ intersect(this: void, solids: readonly Solid[]): Solid;
734
+ /** Native filled section intersection; dimensions cannot be mixed. */
735
+ intersect(this: void, sections: readonly Section[]): Section;
736
+ /** Combines disjoint components without resolving overlap. */
737
+ compose(this: void, solids: readonly Solid[]): Solid;
738
+ /**
739
+ * Convex hull of points or solids.
740
+ *
741
+ * @example Hull
742
+ * ```ts
743
+ * const left = translate(sphere({ radius: 5 }), [-10, 0, 0]);
744
+ * const right = translate(sphere({ radius: 5 }), [10, 0, 0]);
745
+ * hull({ solids: [left, right] });
746
+ * ```
747
+ */
748
+ hull(this: void, options: HullOptions): Solid;
749
+ /** Three-dimensional Minkowski sum. */
750
+ minkowskiSum(this: void, a: Solid, b: Solid): Solid;
751
+ /**
752
+ * Imports a bounded closed indexed mesh.
753
+ *
754
+ * @example Mesh import
755
+ * ```ts
756
+ * import { solidFromMesh } from "@metamesh/modeling";
757
+ * import { extrudeMesh, rectangleLoop } from "@metamesh/modeling/geometry";
758
+ *
759
+ * const mesh = extrudeMesh(rectangleLoop({ size: [20, 12] }), { height: 6 });
760
+ * solidFromMesh(mesh);
761
+ * ```
762
+ */
763
+ solidFromMesh(this: void, mesh: TriangleMesh): Solid;
764
+ /** Copies a handle to manufacturing mesh buffers. */
765
+ toTriangleMesh(this: void, solid: Solid): TriangleMesh;
766
+ /** Translation preserving dimensionality. */
767
+ translate(this: void, section: Section, offset: Vec2): Section;
768
+ /**
769
+ * Translation preserving dimensionality.
770
+ *
771
+ * @example Translate
772
+ * ```ts
773
+ * translate(box({ size: [12, 8, 4] }), [15, 0, 0]);
774
+ * ```
775
+ */
776
+ translate(this: void, solid: Solid, offset: Vec3): Solid;
777
+ /** Degree rotation; scalar XY rotation or XYZ solid Euler angles. */
778
+ rotate(this: void, section: Section, degrees: number): Section;
779
+ /**
780
+ * Degree rotation; scalar XY rotation or XYZ solid Euler angles.
781
+ *
782
+ * @example Rotate
783
+ * ```ts
784
+ * rotate(box({ size: [20, 10, 6] }), [0, 0, 30]);
785
+ * ```
786
+ */
787
+ rotate(this: void, solid: Solid, degrees: Vec3): Solid;
788
+ /**
789
+ * Nonsingular scaling about the origin.
790
+ */
791
+ scale(this: void, section: Section, factors: number | Vec2): Section;
792
+ /**
793
+ * Nonsingular scaling about the origin.
794
+ *
795
+ * @example Scale
796
+ * ```ts
797
+ * scale(sphere({ radius: 8 }), [2, 1, 1]);
798
+ * ```
799
+ */
800
+ scale(this: void, solid: Solid, factors: number | Vec3): Solid;
801
+ /** Reflection across an origin line/plane. */
802
+ mirror(this: void, section: Section, normal: Vec2): Section;
803
+ /**
804
+ * Reflection across an origin line/plane.
805
+ *
806
+ * @example Mirror
807
+ * ```ts
808
+ * const block = translate(box({ size: [12, 8, 4] }), [10, 0, 0]);
809
+ * mirror(block, [1, 0, 0]);
810
+ * ```
811
+ */
812
+ mirror(this: void, solid: Solid, normal: Vec3): Solid;
813
+ /** Row-major affine transform preserving dimensionality. */
814
+ transform(this: void, section: Section, matrix: Transform2): Section;
815
+ /** Row-major affine transform preserving dimensionality. */
816
+ transform(this: void, solid: Solid, matrix: Transform3): Solid;
817
+ /**
818
+ * Reads a copied, immutable named anchor from this exact active build.
819
+ *
820
+ * @example Read the top datum
821
+ * ```ts
822
+ * const plate = box({ size: [30, 20, 6] });
823
+ * anchor(plate, "top"); // position [0, 0, 3], direction [0, 0, 1]
824
+ * ```
825
+ */
826
+ anchor(this: void, shape: Solid | Section, name: string): Anchor3;
827
+ /**
828
+ * Returns a new same-build handle with copied named anchors; existing names may be replaced.
829
+ */
830
+ withAnchors<T extends Solid | Section>(this: void, shape: T, anchors: Readonly<Record<string, Anchor3>>): T;
831
+ /**
832
+ * Places an explicit or named source anchor against an explicit target anchor.
833
+ *
834
+ * @example Anchor attachment
835
+ * ```ts
836
+ * const plate = box({ size: [30, 20, 6] });
837
+ * const pin = cylinder({ height: 12, radius: 3 });
838
+ * attach(pin, "bottom", anchor(plate, "top"), { gap: 1 });
839
+ * ```
840
+ */
841
+ attach(this: void, solid: Solid, source: Anchor3 | string, target: Anchor3, options?: AttachOptions): Solid;
842
+ /**
843
+ * Creates a native filled section without an intermediate Region2 conversion.
844
+ */
845
+ sectionFromContours(this: void, contours: readonly Loop2[], options?: SectionFromContoursOptions): Section;
846
+ /** Imports explicit region topology once. */
847
+ fromRegion(this: void, region: Region2): Section;
848
+ /** Explicit copied topology inspection; not needed for section operations. */
849
+ toRegion(this: void, section: Section): Region2;
850
+ /**
851
+ * Filled rectangular section with uniform or independently treated corners.
852
+ *
853
+ * @example Round the corners
854
+ * ```ts
855
+ * rectangle({ size: [30, 20], treatment: { kind: "round", radius: 3 } });
856
+ * ```
857
+ */
858
+ rectangle(this: void, options: RectangleOptions): Section;
859
+ /**
860
+ * Centered circular section.
861
+ *
862
+ * @example Size to polygon faces
863
+ * ```ts
864
+ * circle({ diameter: 12, sizing: "face" });
865
+ * ```
866
+ */
867
+ circle(this: void, options: CircleOptions): Section;
868
+ /**
869
+ * Centered elliptical section.
870
+ *
871
+ * @example Ellipse by full dimensions
872
+ * ```ts
873
+ * ellipse({ size: [30, 20] });
874
+ * ```
875
+ */
876
+ ellipse(this: void, options: EllipseOptions): Section;
877
+ /**
878
+ * Regular polygon with a vertex on +X.
879
+ *
880
+ * @example Hexagonal section
881
+ * ```ts
882
+ * regularPolygon({ radius: 10, sides: 6, sizing: "face" });
883
+ * ```
884
+ */
885
+ regularPolygon(this: void, options: RegularPolygonOptions): Section;
886
+ /**
887
+ * Alternating outer/inner star vertices.
888
+ *
889
+ * @example Five-point section
890
+ * ```ts
891
+ * star({ outerRadius: 12, innerRadius: 6, points: 5 });
892
+ * ```
893
+ */
894
+ star(this: void, options: StarOptions): Section;
895
+ /**
896
+ * Native millimetre offset preserving holes.
897
+ *
898
+ * @example Add a 2 mm margin
899
+ * ```ts
900
+ * const outline = rectangle({ size: [20, 12] });
901
+ * offset(outline, 2, { join: "round" });
902
+ * ```
903
+ */
904
+ offset(this: void, section: Section, distance: number, options?: RegionOffsetOptions): Section;
905
+ /**
906
+ * Extrudes along +Z with degree twist and top scaling.
907
+ *
908
+ * @example Extrude
909
+ * ```ts
910
+ * const outline = rectangle({ size: [30, 20], treatment: { kind: "round", radius: 3 } });
911
+ * extrude(outline, { height: 8 });
912
+ * ```
913
+ */
914
+ extrude(this: void, shape: ModelingShape, options: ExtrudeOptions): Solid;
915
+ /**
916
+ * Revolves a filled radial/Z shape around +Z, with caps for partial sweeps.
917
+ *
918
+ * @example Revolve
919
+ * ```ts
920
+ * // Contour coordinates are [radius, Z].
921
+ * const profile = sectionFromContours([[[8, 0], [12, 0], [12, 16], [8, 16]]]);
922
+ * revolve(profile, { revolveDegrees: 270 });
923
+ * ```
924
+ */
925
+ revolve(this: void, shape: ModelingShape, options?: RevolveOptions): Solid;
926
+ /** Filled XY projection. */
927
+ projectSection(this: void, solid: Solid): Section;
928
+ /** Horizontal filled slice. */
929
+ sliceSection(this: void, solid: Solid, z: number): Section;
930
+ /**
931
+ * Lofts primitive Sections at z heights or frames; arbitrary Sections and loops require an explicit correspondence method.
932
+ *
933
+ * @example Loft
934
+ * ```ts
935
+ * loft([
936
+ * { profile: circle({ diameter: 16 }), z: 0 },
937
+ * { profile: rectangle({ size: [30, 20], treatment: { kind: "round", radius: 3 } }), z: 30 },
938
+ * ]);
939
+ * ```
940
+ */
941
+ loft(this: void, stations: readonly LoftStation[], options?: LoftOptions): Solid;
942
+ /** Lofts explicit corresponding contours, including holes and collapsed logical slots. */
943
+ loft(this: void, stations: readonly CorrespondingProfileStation[], options?: LoftOptions): Solid;
944
+ /** Explicit family matching on a shared physical span grid using context resolution. */
945
+ matchProfiles(this: void, profiles: readonly Profile[], options?: MatchProfilesOptions): readonly CorrespondingProfile[];
946
+ /**
947
+ * Sweeps filled or explicitly corresponding contours using the selected frame policy.
948
+ *
949
+ * @example Sweep
950
+ * ```ts
951
+ * const profile = rectangle({ size: [6, 3], treatment: { kind: "round", radius: 1 } });
952
+ * sweep(profile, [[0, 0, 0], [0, 0, 15], [10, 0, 25]], {
953
+ * orientation: { kind: "transport", initialNormal: [0, 1, 0] },
954
+ * });
955
+ * ```
956
+ */
957
+ sweep(this: void, shape: ModelingShape, path: readonly Vec3[], options?: SweepOptions): Solid;
958
+ /**
959
+ * Copies lightweight section measurements.
960
+ *
961
+ * @example Check filled area
962
+ * ```ts
963
+ * const facts = inspectSection(rectangle({ size: [20, 10] }));
964
+ * facts.area; // 200 mm²
965
+ * ```
966
+ */
967
+ inspectSection(this: void, section: Section): SectionInspection;
968
+ /**
969
+ * Copies solid bounds and volume; temporary components are owned by the build.
970
+ *
971
+ * @example Check dimensions and volume
972
+ * ```ts
973
+ * const facts = inspectSolid(box({ size: [30, 20, 6] }));
974
+ * facts.volume; // 3600 mm³
975
+ * ```
976
+ */
977
+ inspectSolid(this: void, solid: Solid): SolidInspection;
978
+ /** Copies intersections along the finite directed origin-to-endpoint segment. */
979
+ rayCast(this: void, solid: Solid, origin: Vec3, endpoint: Vec3): readonly SolidRayHit[];
980
+ /** Returns same-build disconnected solid handles. */
981
+ components(this: void, solid: Solid): readonly Solid[];
982
+ /** Removes features within the explicit millimetre tolerance. */
983
+ simplify(this: void, solid: Solid, tolerance: number): Solid;
984
+ /** Bounded positive-inside implicit field constructor. */
985
+ implicit(this: void, options: ImplicitOptions): Solid;
986
+ /** Replaces native tolerance on an immutable copy; zero selects the kernel minimum. */
987
+ setTolerance(this: void, solid: Solid, tolerance: number): Solid;
988
+ /**
989
+ * Closed regular-grid top above a flat base; every height is sampled once.
990
+ *
991
+ * @example Heightfield
992
+ * ```ts
993
+ * heightfield({
994
+ * size: [30, 20], segments: [24, 16],
995
+ * height: ([x, y]) => 3 + Math.cos(x / 5) * Math.cos(y / 5),
996
+ * });
997
+ * ```
998
+ */
999
+ heightfield(this: void, options: HeightfieldOptions): Solid;
1000
+ /**
1001
+ * Repeats one solid along a normalized direction.
1002
+ *
1003
+ * @example Three copies along X
1004
+ * ```ts
1005
+ * linearPattern(box({ size: 4 }), { count: 3, spacing: 10 });
1006
+ * ```
1007
+ */
1008
+ linearPattern(this: void, source: PatternSource, options: LinearPatternOptions): readonly Solid[];
1009
+ /**
1010
+ * Repeats one solid about an axis.
1011
+ *
1012
+ * @example Six copies around Z
1013
+ * ```ts
1014
+ * const pin = translate(cylinder({ height: 6, radius: 2 }), [12, 0, 0]);
1015
+ * radialPattern(pin, { count: 6, axis: [0, 0, 1], angleDegrees: 60 });
1016
+ * ```
1017
+ */
1018
+ radialPattern(this: void, source: PatternSource, options: RadialPatternOptions): readonly Solid[];
1019
+ /**
1020
+ * XY or XYZ copies, optionally centered or placed in an explicit frame.
1021
+ *
1022
+ * @example Centered XY grid
1023
+ * ```ts
1024
+ * gridPattern(box({ size: 4 }), { count: [3, 2], spacing: [10, 10], center: true });
1025
+ * ```
1026
+ */
1027
+ gridPattern(this: void, source: PatternSource, options: GridPatternOptions): readonly Solid[];
1028
+ /**
1029
+ * Physical arc-length copies along a sampled path, with optional tangent orientation.
1030
+ *
1031
+ * @example Copies along a bent path
1032
+ * ```ts
1033
+ * pathPattern(box({ size: 4 }), [[0, 0, 0], [20, 0, 0], [20, 20, 0]], { count: 5 });
1034
+ * ```
1035
+ */
1036
+ pathPattern(this: void, source: PatternSource, path: readonly Vec3[], options: PathPatternOptions): readonly Solid[];
1037
+ /** Helical ridge mesh construction. */
1038
+ threadRidge(this: void, options: ThreadRidgeOptions): Solid;
1039
+ /**
1040
+ * Compensated external threaded rod.
1041
+ *
1042
+ * @example Threaded rod
1043
+ * ```ts
1044
+ * import { threadedRod } from "@metamesh/modeling";
1045
+ * import { createThreadProfile } from "@metamesh/modeling/geometry";
1046
+ *
1047
+ * const profile = createThreadProfile({ kind: "triangular", pitch: 1.75 });
1048
+ * threadedRod({ nominalMajorDiameter: 12, length: 24, profile, fit: "normal" });
1049
+ * ```
1050
+ */
1051
+ threadedRod(this: void, options: ThreadedRodOptions): Solid;
1052
+ /**
1053
+ * Compensated internal threaded cutter.
1054
+ *
1055
+ * @example Internal thread
1056
+ * ```ts
1057
+ * import { cylinder, internalThreadCutter, subtract } from "@metamesh/modeling";
1058
+ * import { createThreadProfile } from "@metamesh/modeling/geometry";
1059
+ *
1060
+ * const profile = createThreadProfile({ kind: "triangular", pitch: 1.75 });
1061
+ * const body = cylinder({ diameter: 20, height: 12, center: false });
1062
+ * const cutter = internalThreadCutter({ nominalMajorDiameter: 12, length: 12, profile });
1063
+ * subtract(body, [cutter]);
1064
+ * ```
1065
+ */
1066
+ internalThreadCutter(this: void, options: InternalThreadCutterOptions): Solid;
1067
+ /**
1068
+ * Compensated threaded nut.
1069
+ *
1070
+ * @example Threaded nut
1071
+ * ```ts
1072
+ * import { threadedNut } from "@metamesh/modeling";
1073
+ * import { createThreadProfile } from "@metamesh/modeling/geometry";
1074
+ *
1075
+ * const profile = createThreadProfile({ kind: "triangular", pitch: 1.75 });
1076
+ * threadedNut({ nominalMajorDiameter: 12, thickness: 8, width: 20, shape: "hex", profile, fit: "normal" });
1077
+ * ```
1078
+ */
1079
+ threadedNut(this: void, options: ThreadedNutOptions): Solid;
1080
+ /** Allocation-free external-thread facts. */
1081
+ preflightThreadedRod(this: void, options: ThreadedRodOptions): HelicalThreadSolidMeshPreflight;
1082
+ /** Allocation-free internal-thread facts. */
1083
+ preflightInternalThreadCutter(this: void, options: InternalThreadCutterOptions): HelicalThreadSolidMeshPreflight;
1084
+ /** Allocation-free nut/cutter facts. */
1085
+ preflightThreadedNut(this: void, options: ThreadedNutOptions): ThreadedNutPreflight;
1086
+ /**
1087
+ * Consumes a previously prepared layout; never shapes or fetches a font.
1088
+ *
1089
+ * @example Use a prepared text layout
1090
+ * ```ts
1091
+ * // Prepare the exact font and layout before entering build.
1092
+ * function labelSection(layout: VectorTextLayout) {
1093
+ * return textSection(layout);
1094
+ * }
1095
+ * ```
1096
+ */
1097
+ textSection(this: void, layout: VectorTextLayout, options?: TextSectionOptions): Section;
1098
+ /**
1099
+ * Imports bounded painted SVG document geometry.
1100
+ *
1101
+ * @example Import a physical SVG rectangle
1102
+ * ```ts
1103
+ * svgSection(
1104
+ * '<svg xmlns="http://www.w3.org/2000/svg" width="30mm" height="20mm" viewBox="0 0 30 20"><rect width="30" height="20"/></svg>',
1105
+ * { origin: "center" },
1106
+ * );
1107
+ * ```
1108
+ */
1109
+ svgSection(this: void, svg: string, options?: SvgSectionOptions): Section;
1110
+ /**
1111
+ * Imports bounded filled SVG path data.
1112
+ *
1113
+ * @example Fill an SVG path in millimetres
1114
+ * ```ts
1115
+ * svgPathSection("M0 0H20V12H0Z", { origin: "center", scale: 1 });
1116
+ * ```
1117
+ */
1118
+ svgPathSection(this: void, path: string, options?: SvgPathSectionOptions): Section;
1119
+ }
1120
+
1121
+ /**
1122
+ * Returns bound local operations, optionally with derived resolution, without changing imported operations.
1123
+ */
1124
+ export declare function modelingFunctions(resolution?: GeometryResolution): ModelingContext;
1125
+
1126
+ /** Aggregate manufacturing output ceilings selected by a trusted host. */
1127
+ export declare interface ModelingLimits extends GeometrySamplingLimits {
1128
+ /** Maximum number of named finalized parts. */
1129
+ readonly maxParts: number;
1130
+ /** Maximum aggregate output vertex count. */
1131
+ readonly maxVertices: number;
1132
+ /** Maximum aggregate output triangle count. */
1133
+ readonly maxTriangles: number;
1134
+ /** Maximum unique transferable output backing-buffer bytes. */
1135
+ readonly maxBytes: number;
1136
+ }
1137
+
1138
+ /** A native filled shape or sampled profile with explicit contour identities. */
1139
+ export declare type ModelingShape = Section | CorrespondingProfile;
1140
+
1141
+ /** Named manufacturing output containing exactly one solid or direct mesh. */
1142
+ export declare type ModelPart = SolidPart | MeshPart;
1143
+
1144
+ /** Host-bound offset operation. Valid only during a synchronous build. */
1145
+ export declare const offset: ModelingContext["offset"];
1146
+
1147
+ /**
1148
+ * Supplies a profile-X orientation guide for each original normalized sweep station.
1149
+ *
1150
+ * @param point - Current XYZ path point in model units.
1151
+ * @param index - Zero-based index of `point` in the normalized authored sweep path.
1152
+ * @returns A finite guide vector that is not parallel to the local path tangent.
1153
+ */
1154
+ export declare type PathNormalGuide = (point: Vec3, index: number) => Vec3;
1155
+
1156
+ /** Host-bound pathPattern operation. Valid only during a synchronous build. */
1157
+ export declare const pathPattern: ModelingContext["pathPattern"];
1158
+
1159
+ /** Equal physical arc-length placements along an open or implicitly closed sampled path. */
1160
+ export declare interface PathPatternOptions {
1161
+ /** Positive number of copies; open paths include both endpoints when greater than one. */
1162
+ readonly count: number;
1163
+ /** Include the closing edge without duplicating the seam; defaults to false. */
1164
+ readonly closed?: boolean;
1165
+ /** Preserve the source orientation, or align its +Z to the path tangent; defaults to fixed. */
1166
+ readonly orientation?: "fixed" | "tangent";
1167
+ }
1168
+
1169
+ /**
1170
+ * One same-build shape, or a synchronous factory called once per copy in index order.
1171
+ */
1172
+ export declare type PatternSource = Solid | ((index: number) => Solid);
1173
+
1174
+ /**
1175
+ * One bounded two-dimensional polygon.
1176
+ *
1177
+ * `outer` is counter-clockwise and each hole is clockwise. Boundary arrays omit
1178
+ * their duplicated closing point. Holes must lie inside `outer` and must not
1179
+ * intersect each other or the exterior.
1180
+ */
1181
+ export declare interface Polygon2 {
1182
+ /** Clockwise interior boundaries, each omitting its duplicated closing point. */
1183
+ readonly holes: readonly Loop2[];
1184
+ /** Counter-clockwise exterior boundary, omitting its duplicated closing point. */
1185
+ readonly outer: Loop2;
1186
+ }
1187
+
1188
+ /** Host-bound preflightInternalThreadCutter operation. Valid only during a synchronous build. */
1189
+ export declare const preflightInternalThreadCutter: ModelingContext["preflightInternalThreadCutter"];
1190
+
1191
+ /** Host-bound preflightThreadedNut operation. Valid only during a synchronous build. */
1192
+ export declare const preflightThreadedNut: ModelingContext["preflightThreadedNut"];
1193
+
1194
+ /** Host-bound preflightThreadedRod operation. Valid only during a synchronous build. */
1195
+ export declare const preflightThreadedRod: ModelingContext["preflightThreadedRod"];
1196
+
1197
+ /** Placement shared by solid and filled-section factories. */
1198
+ export declare interface PrimitivePlacement {
1199
+ /** Applied after local construction; Section placement must preserve the XY plane. */
1200
+ readonly placement?: PrimitivePlacementOptions;
1201
+ }
1202
+
1203
+ /** Maps an explicit or named shape-local attachment anchor onto a world-space anchor. */
1204
+ export declare interface PrimitivePlacementOptions {
1205
+ /** Shape-local source frame or a named primitive anchor such as bottom. */
1206
+ readonly source: Anchor3 | string;
1207
+ /** World-space target frame in millimetres. */
1208
+ readonly target: Anchor3;
1209
+ /** Align outward directions face-to-face or in parallel. Defaults to opposed. */
1210
+ readonly alignment?: "opposed" | "same";
1211
+ /** Finite separation along the target direction in millimetres. Defaults to zero. */
1212
+ readonly gap?: number;
1213
+ /** Finite additional roll around the attached direction in degrees. Defaults to zero. */
1214
+ readonly spinDegrees?: number;
1215
+ /** Explicit numeric comparison overrides for anchor normalization. */
1216
+ readonly tolerance?: GeometryToleranceOptions;
1217
+ }
1218
+
1219
+ /**
1220
+ * Named baseline fit policies for calibrated FDM-style printed threads.
1221
+ */
1222
+ export declare type PrintableThreadFit = "tight" | "normal" | "loose";
1223
+
1224
+ /**
1225
+ * Explicit radial and axial allowances for a mating printed thread pair.
1226
+ *
1227
+ * Male and female radial values are applied independently, so their sum is the
1228
+ * assembled radial clearance. Values are millimetres and intentionally do not
1229
+ * encode printer, material, or process calibration.
1230
+ */
1231
+ export declare interface PrintableThreadFitPolicy {
1232
+ /** Nominal axial backlash available between opposing flanks. */
1233
+ readonly axialBacklash: number;
1234
+ /** Radial increase applied to an internal thread envelope. */
1235
+ readonly femaleRadialOutset: number;
1236
+ /** Radial reduction applied to an external thread envelope. */
1237
+ readonly maleRadialInset: number;
1238
+ }
1239
+
1240
+ /** An explicit component/contour/span topology, before shared family sampling. */
1241
+ export declare interface Profile {
1242
+ /** Ordered components with explicit contour identities. */
1243
+ readonly components: readonly ProfileComponent2[];
1244
+ }
1245
+
1246
+ /** One component and its explicitly identified holes. */
1247
+ export declare interface ProfileComponent2 {
1248
+ /** Stable canonical lowercase identity; unique within the containing topology or output. */
1249
+ readonly id: string;
1250
+ /** Counterclockwise outer contour. */
1251
+ readonly outer: ProfileContour2;
1252
+ /** Clockwise hole contours belonging to this component. */
1253
+ readonly holes: readonly ProfileContour2[];
1254
+ }
1255
+
1256
+ /** Ordered, closed spans. Outer winding is CCW and hole winding is CW. */
1257
+ export declare interface ProfileContour2 {
1258
+ /** Stable canonical lowercase identity; unique within the containing topology or output. */
1259
+ readonly id: string;
1260
+ /** Ordered identified spans; the last endpoint meets the first start. */
1261
+ readonly spans: readonly ProfileSpan2[];
1262
+ }
1263
+
1264
+ /** A deliberately sampled, inward-only corner profile with exact polyline geometry. */
1265
+ export declare interface ProfiledEdgeTreatment {
1266
+ /** Selects an explicit corner profile; no analytic curve is inferred from its samples. */
1267
+ readonly kind: "profile";
1268
+ /**
1269
+ * Millimetre setbacks on adjoining surfaces, from [positive, 0] to [0, positive].
1270
+ * First coordinates decrease and second coordinates increase. Cylinder/extrusion ends use
1271
+ * cap inset first, side setback second; planar corners use incoming then outgoing edges.
1272
+ */
1273
+ readonly profile: readonly Vec2[];
1274
+ }
1275
+
1276
+ /** An identified line, circular arc, or cubic Bézier between corresponding landmarks. */
1277
+ export declare type ProfileSpan2 = {
1278
+ /** Stable canonical lowercase identity; unique within the containing topology or output. */
1279
+ readonly id: string;
1280
+ /** Optional exact span interval count; the family uses the largest requested count. */
1281
+ readonly segments?: number;
1282
+ /** Optional span-local physical sampling over the family's resolution; exact intervals take precedence. */
1283
+ readonly resolution?: GeometryResolution;
1284
+ } & ({
1285
+ /** Selects a straight span. */
1286
+ readonly kind: "line";
1287
+ /** Start point in millimetres. */
1288
+ readonly start: Vec2;
1289
+ /** End point in millimetres. */
1290
+ readonly end: Vec2;
1291
+ } | {
1292
+ /** Selects the geometric curve or span family. */
1293
+ readonly kind: "arc";
1294
+ /** Center point in millimetres. */
1295
+ readonly center: Vec2;
1296
+ /** Circular radius in millimetres. */
1297
+ readonly radius: number;
1298
+ /** Initial counterclockwise angle in degrees. */
1299
+ readonly startDegrees: number;
1300
+ /** Signed counterclockwise angular sweep in degrees. */
1301
+ readonly sweepDegrees: number;
1302
+ } | {
1303
+ /** Selects a cubic Bézier span with the same coordinates as CubicBezierCurve2. */
1304
+ readonly kind: "cubic";
1305
+ /** Start point in millimetres. */
1306
+ readonly start: Vec2;
1307
+ /** First control point in millimetres. */
1308
+ readonly control1: Vec2;
1309
+ /** Second control point in millimetres. */
1310
+ readonly control2: Vec2;
1311
+ /** End point in millimetres. */
1312
+ readonly end: Vec2;
1313
+ });
1314
+
1315
+ /** Host-bound projectSection operation. Valid only during a synchronous build. */
1316
+ export declare const projectSection: ModelingContext["projectSection"];
1317
+
1318
+ /** Host-bound radialPattern operation. Valid only during a synchronous build. */
1319
+ export declare const radialPattern: ModelingContext["radialPattern"];
1320
+
1321
+ /**
1322
+ * Options for repeating one solid around an axis through a center point.
1323
+ */
1324
+ export declare interface RadialPatternOptions {
1325
+ /** Number of solids to return, including the original. */
1326
+ readonly count: number;
1327
+ /** Axis of the right-handed rotation. Its magnitude is ignored. */
1328
+ readonly axis: Vec3;
1329
+ /** Signed rotation from one copy to the next, in degrees. */
1330
+ readonly angleDegrees: number;
1331
+ /** Rotation center in world coordinates. Defaults to the origin. */
1332
+ readonly center?: Vec3;
1333
+ }
1334
+
1335
+ /**
1336
+ * Radial dimensions refer to polygon vertices or compensate faceting to meet polygon faces.
1337
+ */
1338
+ export declare type RadialSizing = "vertex" | "face";
1339
+
1340
+ /**
1341
+ * Nominal radial sizing shared by circular and regular polygon construction.
1342
+ */
1343
+ export declare interface RadialSizingOptions {
1344
+ /** Explicit sampling ceilings; bound modeling operations may only lower the host policy. */
1345
+ readonly limits?: Partial<GeometrySamplingLimits>;
1346
+ /** Vertex sizing is inscribed; face sizing circumscribes the nominal radius. Defaults to vertex. */
1347
+ readonly sizing?: RadialSizing;
1348
+ }
1349
+
1350
+ /** Copies intersections along a finite directed ray segment during the active build. */
1351
+ export declare const rayCast: ModelingContext["rayCast"];
1352
+
1353
+ /** Host-bound rectangle operation. Valid only during a synchronous build. */
1354
+ export declare const rectangle: ModelingContext["rectangle"];
1355
+
1356
+ /** A rectangle corner, including an explicitly untreated corner in a treatment tuple. */
1357
+ export declare type RectangleCornerTreatment = EdgeTreatment | {
1358
+ /** Leaves this corner untreated. */
1359
+ readonly kind: "square";
1360
+ };
1361
+
1362
+ /** Corner treatments ordered top-right, top-left, bottom-left, bottom-right. */
1363
+ export declare type RectangleCornerTreatments = readonly [
1364
+ topRight: RectangleCornerTreatment,
1365
+ topLeft: RectangleCornerTreatment,
1366
+ bottomLeft: RectangleCornerTreatment,
1367
+ bottomRight: RectangleCornerTreatment
1368
+ ];
1369
+
1370
+ /**
1371
+ * Shared rectangle dimensions, origin and uniform or per-corner treatment.
1372
+ */
1373
+ export declare interface RectangleLoopOptions {
1374
+ /** Positive uniform size or explicit XY extents in millimetres. */
1375
+ readonly size: number | Vec2;
1376
+ /** Center on XY; otherwise the minimum corner is the origin. Defaults to true. */
1377
+ readonly center?: boolean;
1378
+ /** Uniform treatment or four corner treatments. Exact round segments describe a complete circle and must divide by four. */
1379
+ readonly treatment?: EdgeTreatment | RectangleCornerTreatments;
1380
+ /** Explicit sampling ceiling for the complete output profile. */
1381
+ readonly limits?: Partial<GeometrySamplingLimits>;
1382
+ }
1383
+
1384
+ /**
1385
+ * Rectangle dimensions, placement and uniform or per-corner treatment.
1386
+ */
1387
+ export declare interface RectangleOptions extends RectangleLoopOptions, PrimitivePlacement {
1388
+ }
1389
+
1390
+ /** A two-dimensional region represented by disjoint filled polygons. */
1391
+ export declare type Region2 = readonly Polygon2[];
1392
+
1393
+ /** Clipper2 join styles accepted by robust region offsets. */
1394
+ export declare type RegionOffsetJoin = "miter" | "round" | "square";
1395
+
1396
+ /** Options controlling robust Clipper2 region offsets. */
1397
+ export declare interface RegionOffsetOptions {
1398
+ /** Number of segments per full circle for round joins. */
1399
+ readonly circularSegments?: number;
1400
+ /** Corner treatment; defaults to `round`. */
1401
+ readonly join?: RegionOffsetJoin;
1402
+ /** Maximum miter extension in offset-distance multiples; at least two. */
1403
+ readonly miterLimit?: number;
1404
+ /** Operation-level physical tessellation policy over the active model-wide policy. */
1405
+ readonly resolution?: GeometryResolution;
1406
+ }
1407
+
1408
+ /** Host-bound regularPolygon operation. Valid only during a synchronous build. */
1409
+ export declare const regularPolygon: ModelingContext["regularPolygon"];
1410
+
1411
+ /**
1412
+ * Regular polygon dimensions, radial convention and degree rotation.
1413
+ */
1414
+ export declare type RegularPolygonOptions = RadialSizingOptions & PrimitivePlacement & {
1415
+ /** Positive nominal radius in millimetres, interpreted according to sizing. */
1416
+ readonly radius: number;
1417
+ /** Exact integer side count from three through 100000. */
1418
+ readonly sides: number;
1419
+ /** Counterclockwise rotation in degrees; defaults to zero with a vertex on +X. */
1420
+ readonly rotationDegrees?: number;
1421
+ };
1422
+
1423
+ /** Host-bound revolve operation. Valid only during a synchronous build. */
1424
+ export declare const revolve: ModelingContext["revolve"];
1425
+
1426
+ /**
1427
+ * Circumferential sampling and degree sweep shared by pure and filled revolution.
1428
+ */
1429
+ export declare interface RevolveOptions extends CircularPrimitiveOptions {
1430
+ /**
1431
+ * Positive angular sweep no greater than 360 degrees; partial revolutions have end caps.
1432
+ * Segment counts describe a complete circle and scale to this angular span. Native filled
1433
+ * revolutions require at least three sweep intervals: adaptive sampling refines to that floor,
1434
+ * while exact counts that imply fewer intervals reject. Pure revolveMesh supports one interval.
1435
+ */
1436
+ readonly revolveDegrees?: number;
1437
+ /** Explicit output and sampling allocation ceilings. */
1438
+ readonly limits?: Partial<ModelingLimits>;
1439
+ }
1440
+
1441
+ /** Host-bound rotate operation. Valid only during a synchronous build. */
1442
+ export declare const rotate: ModelingContext["rotate"];
1443
+
1444
+ /**
1445
+ * A circular edge or corner roundover with explicit physical sampling.
1446
+ */
1447
+ export declare interface RoundedEdgeTreatment extends CircularPrimitiveOptions {
1448
+ /** Selects circular corners or spherical all-edge roundovers. */
1449
+ readonly kind: "round";
1450
+ /** Radius in millimetres. Rectangles permit zero through half their smallest dimension; boxes require a positive smaller radius. */
1451
+ readonly radius: number;
1452
+ }
1453
+
1454
+ /** Host-bound scale operation. Valid only during a synchronous build. */
1455
+ export declare const scale: ModelingContext["scale"];
1456
+
1457
+ /** Immutable native filled XY section belonging to exactly one synchronous engine build. */
1458
+ export declare interface Section {
1459
+ /** Compile-time ownership brand for a same-build section. */
1460
+ readonly [sectionBrand]: "Section";
1461
+ }
1462
+
1463
+ declare const sectionBrand: unique symbol;
1464
+
1465
+ /** Host-bound sectionFromContours operation. Valid only during a synchronous build. */
1466
+ export declare const sectionFromContours: ModelingContext["sectionFromContours"];
1467
+
1468
+ /**
1469
+ * Filled-contour resolution. Closing vertices are implicit.
1470
+ */
1471
+ export declare interface SectionFromContoursOptions {
1472
+ /** Nonzero or even-odd filled-contour rule; defaults to nonzero. */
1473
+ readonly fillRule?: "nonzero" | "evenodd";
1474
+ }
1475
+
1476
+ /**
1477
+ * Copied native filled section facts in millimetres and square millimetres.
1478
+ */
1479
+ export declare interface SectionInspection {
1480
+ /** Filled section area in square millimetres. */
1481
+ readonly area: number;
1482
+ /** Number of extracted outer and hole contours. */
1483
+ readonly contours: number;
1484
+ /** Inclusive maximum coordinates in millimetres. */
1485
+ readonly max: Vec2;
1486
+ /** Inclusive minimum coordinates in millimetres. */
1487
+ readonly min: Vec2;
1488
+ /** Number of disconnected filled section components. */
1489
+ readonly parts: number;
1490
+ /** Number of native section vertices. */
1491
+ readonly vertices: number;
1492
+ }
1493
+
1494
+ /** Returns an immutable copy with the explicit native millimetre tolerance. */
1495
+ export declare const setTolerance: ModelingContext["setTolerance"];
1496
+
1497
+ /** Host-bound simplify operation. Valid only during a synchronous build. */
1498
+ export declare const simplify: ModelingContext["simplify"];
1499
+
1500
+ /** Host-bound sliceSection operation. Valid only during a synchronous build. */
1501
+ export declare const sliceSection: ModelingContext["sliceSection"];
1502
+
1503
+ /** A cubic corner transition with zero curvature at its straight tangent joins. */
1504
+ export declare interface SmoothEdgeTreatment {
1505
+ /** Selects continuous-curvature cubic rounding, rather than a circular radius. */
1506
+ readonly kind: "smooth";
1507
+ /** Positive tangent setbacks, equal or [first, second], in millimetres. */
1508
+ readonly distance: number | readonly [first: number, second: number];
1509
+ /** Exact cubic interval count, positive; overrides physical sampling. */
1510
+ readonly segments?: number;
1511
+ /** Physical chord/edge-length sampling; circularSegments does not describe a cubic. */
1512
+ readonly resolution?: GeometryResolution;
1513
+ /** Explicit sampling ceilings, bounded by the host policy. */
1514
+ readonly limits?: Partial<GeometrySamplingLimits>;
1515
+ }
1516
+
1517
+ /** Immutable solid handle belonging to exactly one synchronous engine build. */
1518
+ export declare interface Solid {
1519
+ /** Compile-time ownership brand for a same-build solid. */
1520
+ readonly [solidBrand]: "Solid";
1521
+ }
1522
+
1523
+ declare const solidBrand: unique symbol;
1524
+
1525
+ /** Host-bound solidFromMesh operation. Valid only during a synchronous build. */
1526
+ export declare const solidFromMesh: ModelingContext["solidFromMesh"];
1527
+
1528
+ /**
1529
+ * Copied solid bounds, connected component count, and cubic millimetre volume.
1530
+ */
1531
+ export declare interface SolidInspection {
1532
+ /** Inclusive maximum coordinates in millimetres. */
1533
+ readonly max: Vec3;
1534
+ /** Inclusive minimum coordinates in millimetres. */
1535
+ readonly min: Vec3;
1536
+ /** Number of connected native solid components. */
1537
+ readonly parts: number;
1538
+ /** Enclosed native solid volume in cubic millimetres. */
1539
+ readonly volume: number;
1540
+ }
1541
+
1542
+ /** Named same-build solid manufacturing part. */
1543
+ export declare interface SolidPart {
1544
+ /** Stable canonical lowercase identity; unique within the containing topology or output. */
1545
+ readonly id: string;
1546
+ /** Optional six-digit hex RGB display color. */
1547
+ readonly color?: string;
1548
+ /** Same-build solid handle; mutually exclusive with a direct mesh. */
1549
+ readonly solid: Solid;
1550
+ /** Direct manufacturing mesh; mutually exclusive with a solid handle. */
1551
+ readonly mesh?: never;
1552
+ }
1553
+
1554
+ /** Copied surface intersection from a finite directed segment. Distance is in millimetres. */
1555
+ export declare interface SolidRayHit {
1556
+ /** Copied numeric native face identity. */
1557
+ readonly faceId: number;
1558
+ /** Distance from the ray origin in millimetres. */
1559
+ readonly distance: number;
1560
+ /** Intersection position in millimetres. */
1561
+ readonly position: Vec3;
1562
+ /** Outward unit surface normal at the intersection. */
1563
+ readonly normal: Vec3;
1564
+ }
1565
+
1566
+ /** Host-bound sphere operation. Valid only during a synchronous build. */
1567
+ export declare const sphere: ModelingContext["sphere"];
1568
+
1569
+ /**
1570
+ * Exactly one radius or diameter, placement, and tessellation for an origin-centered sphere.
1571
+ */
1572
+ export declare type SphereOptions = CircularPrimitiveOptions & PrimitivePlacement & ({
1573
+ /** Positive radius in millimetres; mutually exclusive with diameter. */
1574
+ readonly radius: number;
1575
+ /** Full diameter is unavailable when radius is supplied. */
1576
+ readonly diameter?: never;
1577
+ } | {
1578
+ /** Positive full diameter in millimetres; mutually exclusive with radius. */
1579
+ readonly diameter: number;
1580
+ /** Radius is unavailable when diameter is supplied. */
1581
+ readonly radius?: never;
1582
+ });
1583
+
1584
+ /** Square profile with equal crest and root widths. */
1585
+ declare interface SquareThreadProfileSpec extends ThreadProfileBaseSpec {
1586
+ /** Selects the square profile family. */
1587
+ readonly kind: "square";
1588
+ /**
1589
+ * Radial depth in millimetres.
1590
+ * @defaultValue `pitch / 2`
1591
+ */
1592
+ readonly depth?: number;
1593
+ }
1594
+
1595
+ /** Host-bound star operation. Valid only during a synchronous build. */
1596
+ export declare const star: ModelingContext["star"];
1597
+
1598
+ /**
1599
+ * Alternating outer and inner vertices, centered on the XY origin.
1600
+ */
1601
+ export declare interface StarOptions extends PrimitivePlacement {
1602
+ /** Explicit sampling ceilings, bounded by the host policy. */
1603
+ readonly limits?: Partial<GeometrySamplingLimits>;
1604
+ /** Positive outer vertex radius in millimetres. */
1605
+ readonly outerRadius: number;
1606
+ /** Positive inner vertex radius, smaller than the outer radius. */
1607
+ readonly innerRadius: number;
1608
+ /** Integer outer point count from three through 50000. */
1609
+ readonly points: number;
1610
+ /** Initial counterclockwise rotation in degrees; defaults to zero. */
1611
+ readonly rotationDegrees?: number;
1612
+ }
1613
+
1614
+ /** Host-bound subtract operation. Valid only during a synchronous build. */
1615
+ export declare const subtract: ModelingContext["subtract"];
1616
+
1617
+ /** Placement of painted SVG geometry after SVG Y-axis inversion. */
1618
+ export declare type SvgOrigin = "center" | "document";
1619
+
1620
+ /** Host-bound svgPathSection operation. Valid only during a synchronous build. */
1621
+ export declare const svgPathSection: ModelingContext["svgPathSection"];
1622
+
1623
+ /** Bounded filled SVG path sampling. Path scale converts user units to millimetres. */
1624
+ export declare interface SvgPathSectionOptions {
1625
+ /** Local allocation ceilings may only lower the configured engine policy. */
1626
+ readonly limits?: Partial<GeometrySamplingLimits>;
1627
+ /** Nonzero or even-odd filled-contour rule; defaults to nonzero. */
1628
+ readonly fillRule?: "evenodd" | "nonzero";
1629
+ /** Local physical sampling policy; exact interval counts take precedence. */
1630
+ readonly resolution?: GeometryResolution;
1631
+ /** Center the painted bounds or preserve original path coordinates. */
1632
+ readonly origin?: SvgOrigin;
1633
+ /** Positive uniform factor converting SVG user units to millimetres; defaults to one. */
1634
+ readonly scale?: number;
1635
+ }
1636
+
1637
+ /** Host-bound svgSection operation. Valid only during a synchronous build. */
1638
+ export declare const svgSection: ModelingContext["svgSection"];
1639
+
1640
+ /**
1641
+ * Bounded SVG document sampling. Center origin uses the final painted bounds.
1642
+ */
1643
+ export declare interface SvgSectionOptions {
1644
+ /** Local allocation ceilings may only lower the configured engine policy. */
1645
+ readonly limits?: Partial<GeometrySamplingLimits>;
1646
+ /** Exact circular tessellation count overriding physical sampling. */
1647
+ readonly circularSegments?: number;
1648
+ /** Local physical sampling policy; exact interval counts take precedence. */
1649
+ readonly resolution?: GeometryResolution;
1650
+ /** Place the painted bounds around the origin or preserve document coordinates. */
1651
+ readonly origin?: SvgOrigin;
1652
+ }
1653
+
1654
+ /** Host-bound sweep operation. Valid only during a synchronous build. */
1655
+ export declare const sweep: ModelingContext["sweep"];
1656
+
1657
+ /**
1658
+ * Controls shared by pure mesh construction and filled modeling sweeps.
1659
+ */
1660
+ export declare interface SweepOptions {
1661
+ /** Join the path's last station to its first. Open paths retain watertight end caps. */
1662
+ readonly closed?: boolean;
1663
+ /** Explicit output and sampling allocation ceilings. */
1664
+ readonly limits?: Partial<ModelingLimits>;
1665
+ /** Explicit frame policy; default transport minimizes rotations, initially projecting +X then +Y then +Z. */
1666
+ readonly orientation?: SweepOrientation;
1667
+ /** Physical sampling of nonzero twist; inserted stations retain authored station controls. */
1668
+ readonly resolution?: GeometryResolution;
1669
+ /** Total additional profile rotation in degrees, with progression selected by twistBy. */
1670
+ readonly twistDegrees?: number;
1671
+ /** Twist advances by physical path length (default), or normalized authored station position, including a closed seam gap. */
1672
+ readonly twistBy?: "length" | "stations";
1673
+ /** Positive uniform/XY scale, or one XY pair per path station. Defaults to one. */
1674
+ readonly scale?: number | Vec2 | readonly Vec2[];
1675
+ /** Corresponding point-index advance at a rotationally equivalent closed seam. */
1676
+ readonly seamProfileOffset?: number;
1677
+ }
1678
+
1679
+ /**
1680
+ * Explicit profile-X frame policy; all normals are directed, and selected singular policies reject.
1681
+ */
1682
+ export declare type SweepOrientation = {
1683
+ /** Minimizes frame rotation by parallel transport. */
1684
+ readonly kind: "transport";
1685
+ /** Initial profile +X guide, projected perpendicular to the first tangent. */
1686
+ readonly initialNormal?: Vec3;
1687
+ } | {
1688
+ /** Projects one fixed world-space normal at every path station. */
1689
+ readonly kind: "fixed-normal";
1690
+ /** Directed profile +X guide; must not be parallel to any local tangent. */
1691
+ readonly normal: Vec3;
1692
+ } | {
1693
+ /** Uses an explicitly directed normal callback at each original normalized station. */
1694
+ readonly kind: "guide";
1695
+ /** Finite profile +X guide callback, evaluated once per original path station. */
1696
+ readonly normal: PathNormalGuide;
1697
+ } | {
1698
+ /** Uses sampled curvature normals; zero-curvature stations reject. */
1699
+ readonly kind: "frenet";
1700
+ };
1701
+
1702
+ /** Host-bound textSection operation. Valid only during a synchronous build. */
1703
+ export declare const textSection: ModelingContext["textSection"];
1704
+
1705
+ /**
1706
+ * Physical curve sampling applied to already prepared vector text.
1707
+ */
1708
+ export declare interface TextSectionOptions {
1709
+ /** Local allocation ceilings may only lower the configured engine policy. */
1710
+ readonly limits?: Partial<GeometrySamplingLimits>;
1711
+ /** Local physical sampling policy; exact interval counts take precedence. */
1712
+ readonly resolution?: GeometryResolution;
1713
+ }
1714
+
1715
+ /** End bevel controls shared by threaded rods and cutters. */
1716
+ declare interface ThreadBevelOptions {
1717
+ /** Apply a 45-degree bevel at Z=0. */
1718
+ readonly bevelBottom?: boolean;
1719
+ /**
1720
+ * Axial bevel extent in millimetres. Active blunt ends default to one sixth of the compensated
1721
+ * male minor radius or female major radius; other ends default to the profile depth.
1722
+ */
1723
+ readonly bevelSize?: number;
1724
+ /** Apply a 45-degree bevel at Z=length. */
1725
+ readonly bevelTop?: boolean;
1726
+ }
1727
+
1728
+ /** Host-bound threadedNut operation. Valid only during a synchronous build. */
1729
+ export declare const threadedNut: ModelingContext["threadedNut"];
1730
+
1731
+ /** Nut-edge bevel selection. */
1732
+ export declare type ThreadedNutBevel = "automatic" | "both" | "inside" | "none" | "outside";
1733
+
1734
+ /**
1735
+ * Options for a compensated nut with an internal thread.
1736
+ */
1737
+ export declare interface ThreadedNutOptions extends Omit<InternalThreadCutterOptions, "bevelBottom" | "bevelSize" | "bevelTop" | "length"> {
1738
+ /** Nut body bevel selection. Default: `automatic`. */
1739
+ readonly bevel?: ThreadedNutBevel;
1740
+ /** Optional physical policy for a round body, independent of the thread's matched facet grid. */
1741
+ readonly bodyResolution?: GeometryResolution;
1742
+ /** 45-degree body chamfer extent. Default: `min(profile.depth, thickness/4)`. */
1743
+ readonly chamferSize?: number;
1744
+ /** Leave the bottom outside edge flat for build-plate adhesion. Default: `false`. */
1745
+ readonly flushBuildPlateBottom?: boolean;
1746
+ /** Nut body shape. */
1747
+ readonly shape: ThreadedNutShape;
1748
+ /** Nut thickness along +Z in millimetres. */
1749
+ readonly thickness: number;
1750
+ /** Across-flats width for hex/square or diameter for round, in millimetres. */
1751
+ readonly width: number;
1752
+ }
1753
+
1754
+ /** Allocation-free body, cutter, and end-face facts resolved for a threaded nut. */
1755
+ export declare interface ThreadedNutPreflight {
1756
+ /** Polygon segment count used by the nut body. */
1757
+ readonly bodySegments: number;
1758
+ /** Shared 45-degree chamfer size applied to the selected body and cutter edges. */
1759
+ readonly chamferSize: number;
1760
+ /** Maximum compensated cutter radius at either requested face. */
1761
+ readonly cutterFaceRadius: number;
1762
+ /** Minimum nut-body inradius across the requested top and bottom faces. */
1763
+ readonly minimumBodyFaceInradius: number;
1764
+ /** Smallest radial wall left between the body and cutter at either requested face. */
1765
+ readonly minimumFaceWall: number;
1766
+ /** Conservative allocation facts for the exact extended internal-thread cutter mesh. */
1767
+ readonly thread: HelicalThreadSolidMeshPreflight;
1768
+ /** Start-aligned circular facet count used by the compensated thread cutter. */
1769
+ readonly threadCircularSegments: number;
1770
+ }
1771
+
1772
+ /**
1773
+ * Supported printable nut body shapes.
1774
+ */
1775
+ export declare type ThreadedNutShape = "hex" | "round" | "square";
1776
+
1777
+ /** Host-bound threadedRod operation. Valid only during a synchronous build. */
1778
+ export declare const threadedRod: ModelingContext["threadedRod"];
1779
+
1780
+ /**
1781
+ * Options for a compensated external threaded rod along +Z.
1782
+ */
1783
+ export declare interface ThreadedRodOptions extends Omit<HelicalThreadRidgeMeshOptions, "majorDiameter">, ThreadBevelOptions {
1784
+ /** Printable fit or caller-calibrated allowances. Default: `normal`. */
1785
+ readonly fit?: PrintableThreadFit | PrintableThreadFitPolicy;
1786
+ /** Nominal major diameter before male compensation. */
1787
+ readonly nominalMajorDiameter: number;
1788
+ }
1789
+
1790
+ /** End shape of a generated helical ridge. */
1791
+ export declare type ThreadEndStyle = "blunt" | "standard" | "tapered";
1792
+
1793
+ /** Axial end controls for a generated ridge. */
1794
+ export declare interface ThreadEndTreatmentOptions {
1795
+ /**
1796
+ * Ridge shape at the lower working boundary. `blunt` ends at full profile height, `standard`
1797
+ * clips the periodic profile at the face, and `tapered` ramps out from the minor envelope.
1798
+ * @defaultValue `"blunt"`
1799
+ */
1800
+ readonly bottom?: ThreadEndStyle;
1801
+ /**
1802
+ * Non-negative unthreaded envelope length reserved at each non-standard end, in millimetres.
1803
+ * Active blunt bevels may raise this reservation to the effective bevel size.
1804
+ * @defaultValue `0`
1805
+ */
1806
+ readonly endLength?: number;
1807
+ /**
1808
+ * Radial envelope toward which a blunt lead-in collapses.
1809
+ * @defaultValue `"minor"`
1810
+ */
1811
+ readonly leadInEnvelope?: ThreadLeadInEnvelope;
1812
+ /**
1813
+ * Physical circumferential lead-in length in millimetres.
1814
+ * @defaultValue The profile depth.
1815
+ */
1816
+ readonly leadInLength?: number;
1817
+ /**
1818
+ * Cross-section scaling curve used by blunt ends. `cut` switches abruptly to the full profile.
1819
+ * @defaultValue `"cut"`
1820
+ */
1821
+ readonly leadInShape?: ThreadLeadInShape;
1822
+ /**
1823
+ * Ridge shape at the upper working boundary. `blunt` ends at full profile height, `standard`
1824
+ * clips the periodic profile at the face, and `tapered` ramps into the minor envelope.
1825
+ * @defaultValue `"blunt"`
1826
+ */
1827
+ readonly top?: ThreadEndStyle;
1828
+ }
1829
+
1830
+ /**
1831
+ * Direction in which a conventional helical thread advances around +Z.
1832
+ */
1833
+ export declare type ThreadHandedness = "left" | "right";
1834
+
1835
+ /** Radial envelope toward which a blunt lead-in collapses. */
1836
+ export declare type ThreadLeadInEnvelope = "major" | "minor";
1837
+
1838
+ /** BOSL2-compatible cross-section scaling curve for a blunt thread lead-in. */
1839
+ export declare type ThreadLeadInShape = "cut" | "linear" | "smooth" | "sqrt";
1840
+
1841
+ /**
1842
+ * A validated immutable periodic thread profile in `[axial, radial]` millimetres.
1843
+ */
1844
+ export declare interface ThreadProfile {
1845
+ /** Axial width of the flat at the major envelope. */
1846
+ readonly crestFlatWidth: number;
1847
+ /** Radial distance from the major envelope to the root. */
1848
+ readonly depth: number;
1849
+ /** Profile family that produced this validated profile. */
1850
+ readonly kind: ThreadProfileSpec["kind"];
1851
+ /** Adjacent axial thread spacing in millimetres. */
1852
+ readonly pitch: number;
1853
+ /** Immutable open `[axial, radial]` path spanning one pitch. */
1854
+ readonly points: readonly Vec2[];
1855
+ /** Axial width of the flat at the minor envelope. */
1856
+ readonly rootFlatWidth: number;
1857
+ }
1858
+
1859
+ /** Fields shared by all thread profile specifications. */
1860
+ declare interface ThreadProfileBaseSpec {
1861
+ /** Adjacent axial thread spacing in millimetres. */
1862
+ readonly pitch: number;
1863
+ /** Optional numerical tolerance overrides. */
1864
+ readonly tolerance?: GeometryToleranceOptions;
1865
+ }
1866
+
1867
+ /**
1868
+ * Supported built-in and caller-defined thread profiles.
1869
+ */
1870
+ declare type ThreadProfileSpec = AcmeThreadProfileSpec | ButtressThreadProfileSpec | CustomThreadProfileSpec | SquareThreadProfileSpec | TrapezoidalThreadProfileSpec | TriangularThreadProfileSpec;
1871
+
1872
+ /** Host-bound threadRidge operation. Valid only during a synchronous build. */
1873
+ export declare const threadRidge: ModelingContext["threadRidge"];
1874
+
1875
+ /** Parameters for a helical ridge before solid construction. */
1876
+ export declare type ThreadRidgeOptions = HelicalThreadRidgeMeshOptions;
1877
+
1878
+ /** Host-bound toRegion operation. Valid only during a synchronous build. */
1879
+ export declare const toRegion: ModelingContext["toRegion"];
1880
+
1881
+ /** Host-bound torus operation. Valid only during a synchronous build. */
1882
+ export declare const torus: ModelingContext["torus"];
1883
+
1884
+ /**
1885
+ * Dimensions and independent ring/profile tessellation for a torus around the Z axis.
1886
+ */
1887
+ export declare interface TorusOptions extends PrimitivePlacement {
1888
+ /** Explicit sampling ceilings, bounded by the host policy. */
1889
+ readonly limits?: Partial<GeometrySamplingLimits>;
1890
+ /** Radius from the Z axis to the profile center, in millimetres; greater than `minorRadius`. */
1891
+ readonly majorRadius: number;
1892
+ /** Exact segment count around the Z axis; omitted uses adaptive resolution. */
1893
+ readonly majorSegments?: number;
1894
+ /** Radius of the swept circular profile in millimetres. */
1895
+ readonly minorRadius: number;
1896
+ /** Exact segment count around the swept profile; omitted uses adaptive resolution. */
1897
+ readonly minorSegments?: number;
1898
+ /** Operation-level physical tessellation policy over the active model-wide policy. */
1899
+ readonly resolution?: GeometryResolution;
1900
+ }
1901
+
1902
+ /** Host-bound toTriangleMesh operation. Valid only during a synchronous build. */
1903
+ export declare const toTriangleMesh: ModelingContext["toTriangleMesh"];
1904
+
1905
+ /** Host-bound transform operation. Valid only during a synchronous build. */
1906
+ export declare const transform: ModelingContext["transform"];
1907
+
1908
+ /** Row-major affine XY matrix. Translation occupies m02/m12; final row is [0, 0, 1]. */
1909
+ export declare type Transform2 = readonly [
1910
+ m00: number,
1911
+ m01: number,
1912
+ m02: number,
1913
+ m10: number,
1914
+ m11: number,
1915
+ m12: number,
1916
+ m20: number,
1917
+ m21: number,
1918
+ m22: number
1919
+ ];
1920
+
1921
+ /**
1922
+ * A row-major affine 4x4 matrix applied to column vectors.
1923
+ *
1924
+ * Translation occupies indices 3, 7, and 11. The final row must be
1925
+ * `[0, 0, 0, 1]` within the active geometry tolerance.
1926
+ */
1927
+ export declare type Transform3 = readonly [
1928
+ m00: number,
1929
+ m01: number,
1930
+ m02: number,
1931
+ m03: number,
1932
+ m10: number,
1933
+ m11: number,
1934
+ m12: number,
1935
+ m13: number,
1936
+ m20: number,
1937
+ m21: number,
1938
+ m22: number,
1939
+ m23: number,
1940
+ m30: number,
1941
+ m31: number,
1942
+ m32: number,
1943
+ m33: number
1944
+ ];
1945
+
1946
+ /** Host-bound translate operation. Valid only during a synchronous build. */
1947
+ export declare const translate: ModelingContext["translate"];
1948
+
1949
+ /** Trapezoidal thread profile with a configurable included angle. */
1950
+ declare interface TrapezoidalThreadProfileSpec extends ThreadProfileBaseSpec {
1951
+ /** Selects the trapezoidal profile family. */
1952
+ readonly kind: "trapezoidal";
1953
+ /**
1954
+ * Radial depth in millimetres.
1955
+ * @defaultValue `pitch / 2`
1956
+ */
1957
+ readonly depth?: number;
1958
+ /**
1959
+ * Included flank angle in degrees. Use `90` for printable 45-degree slopes.
1960
+ * @defaultValue `30`
1961
+ */
1962
+ readonly threadAngle?: number;
1963
+ }
1964
+
1965
+ /**
1966
+ * A topology-preserving indexed triangle mesh with XYZ vertex positions.
1967
+ */
1968
+ export declare interface TriangleMesh {
1969
+ /** Three unsigned vertex indices per triangle. */
1970
+ readonly indices: Uint32Array;
1971
+ /** Flat XYZ coordinates, three finite values per vertex. */
1972
+ readonly positions: Float32Array;
1973
+ }
1974
+
1975
+ /**
1976
+ * Measurements and optional edge-connected topology from one validated mesh traversal.
1977
+ */
1978
+ export declare interface TriangleMeshAnalysis extends TriangleMeshMeasurements {
1979
+ /** Number of referenced edge-connected components when `includeTopology` is requested. */
1980
+ readonly connectedComponentCount?: number;
1981
+ /** Number of distinct indexed undirected edges when `includeTopology` is requested. */
1982
+ readonly edgeCount?: number;
1983
+ }
1984
+
1985
+ /**
1986
+ * Geometric measurements derived from a validated, non-empty triangle mesh.
1987
+ */
1988
+ export declare interface TriangleMeshMeasurements {
1989
+ /** Axis-aligned bounds. */
1990
+ readonly bounds: MeshBounds;
1991
+ /** Signed enclosed volume; positive values correspond to outward winding. */
1992
+ readonly signedVolume: number;
1993
+ /** Sum of all triangle areas in squared model units. */
1994
+ readonly surfaceArea: number;
1995
+ /** Number of indexed triangles. */
1996
+ readonly triangleCount: number;
1997
+ /** Number of distinct entries in the position buffer. */
1998
+ readonly vertexCount: number;
1999
+ }
2000
+
2001
+ /**
2002
+ * ISO/UTS-like 60-degree truncated triangular profile.
2003
+ */
2004
+ declare interface TriangularThreadProfileSpec extends ThreadProfileBaseSpec {
2005
+ /** Selects the 60-degree triangular profile family. */
2006
+ readonly kind: "triangular";
2007
+ /**
2008
+ * Crest width divided by pitch.
2009
+ * @defaultValue `1 / 8`
2010
+ */
2011
+ readonly crestFlatRatio?: number;
2012
+ /**
2013
+ * Root width divided by pitch.
2014
+ * @defaultValue `1 / 4`
2015
+ */
2016
+ readonly rootFlatRatio?: number;
2017
+ }
2018
+
2019
+ /** Host-bound tube operation. Valid only during a synchronous build. */
2020
+ export declare const tube: ModelingContext["tube"];
2021
+
2022
+ /**
2023
+ * Dimensions, placement, and tessellation for a hollow Z-axis tube.
2024
+ */
2025
+ export declare interface TubeOptions extends CircularPrimitiveOptions, PrimitivePlacement {
2026
+ /**
2027
+ * Centers the tube on the Z origin when `true`; otherwise its bottom is at `Z = 0`.
2028
+ * @defaultValue `true`
2029
+ */
2030
+ readonly center?: boolean;
2031
+ /** Total height along Z in millimetres. */
2032
+ readonly height: number;
2033
+ /** Positive inner radius in millimetres. */
2034
+ readonly innerRadius: number;
2035
+ /** Outer radius in millimetres; greater than {@link TubeOptions.innerRadius}. */
2036
+ readonly outerRadius: number;
2037
+ }
2038
+
2039
+ /** Host-bound union operation. Valid only during a synchronous build. */
2040
+ export declare const union: ModelingContext["union"];
2041
+
2042
+ /** A two-dimensional Cartesian vector or point. */
2043
+ export declare type Vec2 = readonly [x: number, y: number];
2044
+
2045
+ /** A three-dimensional Cartesian vector or point. */
2046
+ export declare type Vec3 = readonly [x: number, y: number, z: number];
2047
+
2048
+ /** Exact curve bounds in millimetres; positive Y points upward. */
2049
+ export declare interface VectorTextBounds {
2050
+ /** Minimum X and Y of visible outlines, including accents, descenders, and overhangs. */
2051
+ readonly min: readonly [number, number];
2052
+ /** Maximum X and Y of visible outlines. */
2053
+ readonly max: readonly [number, number];
2054
+ }
2055
+
2056
+ /**
2057
+ * Immutable vector layout with no browser, font parser, or kernel ownership.
2058
+ */
2059
+ export declare interface VectorTextLayout {
2060
+ /** Nonzero-filled path data in millimetres, positive Y upward; empty for text with no ink. */
2061
+ readonly paths: readonly string[];
2062
+ /** Exact measurements of these paths and their logical text layout. */
2063
+ readonly metrics: VectorTextMetrics;
2064
+ }
2065
+
2066
+ /** Text measurements from the same immutable layout that supplies geometry and SVG outlines. */
2067
+ export declare interface VectorTextMetrics {
2068
+ /** Visible curve bounds after alignment, or null when the text has no ink. */
2069
+ readonly bounds: VectorTextBounds | null;
2070
+ /** Unaligned pen displacement: final line advance and negative baseline displacement, in mm. */
2071
+ readonly advance: readonly [number, number];
2072
+ /** Maximum line advance in millimetres, including spaces; distinct from visible ink width. */
2073
+ readonly logicalWidth: number;
2074
+ /** Selected font's ascender distance above a baseline in millimetres, independent of the text. */
2075
+ readonly ascent: number;
2076
+ /** Selected font's descender distance below a baseline in millimetres, a non-negative value. */
2077
+ readonly descent: number;
2078
+ /** Actual distance between baselines in millimetres. */
2079
+ readonly lineHeight: number;
2080
+ /** Number of lines, including empty and trailing lines; empty text occupies one line. */
2081
+ readonly lineCount: number;
2082
+ }
2083
+
2084
+ /** Returns a new same-build shape handle with explicit copied named anchors. */
2085
+ export declare const withAnchors: ModelingContext["withAnchors"];
2086
+
2087
+ export { }