geospec 0.0.0 → 0.1.0-beta.2

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 (95) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +244 -0
  3. package/agent/doctrine.md +47 -0
  4. package/agent/geospec-authoring/SKILL.md +496 -0
  5. package/agent/geospec-authoring/api-classes.md +13 -0
  6. package/agent/geospec-authoring/api-constants.md +6 -0
  7. package/agent/geospec-authoring/api-functions.md +49 -0
  8. package/agent/geospec-authoring/api-index.md +362 -0
  9. package/agent/geospec-authoring/api-types.md +1700 -0
  10. package/agent/geospec-authoring/public-api-classes.md +22 -0
  11. package/agent/geospec-authoring/public-api-constants.md +19 -0
  12. package/agent/geospec-authoring/public-api-functions.md +196 -0
  13. package/agent/geospec-authoring/public-api-index.md +856 -0
  14. package/agent/geospec-authoring/public-api-types-2.md +1513 -0
  15. package/agent/geospec-authoring/public-api-types.md +2048 -0
  16. package/agent/resources.d.ts +19 -0
  17. package/agent/resources.js +26 -0
  18. package/agent/skills.d.cts +13 -0
  19. package/agent/skills.json +27 -0
  20. package/dist/assertion-client/client.d.mts +124 -0
  21. package/dist/assertion-client/client.mjs +2 -0
  22. package/dist/assertion-client/index.d.mts +5 -0
  23. package/dist/assertion-client/index.mjs +1 -0
  24. package/dist/config/index.d.mts +3 -0
  25. package/dist/config/index.mjs +1 -0
  26. package/dist/config/node/index.d.mts +3 -0
  27. package/dist/config/node/index.mjs +1 -0
  28. package/dist/config/node/load.d.mts +19 -0
  29. package/dist/config/node/load.mjs +1 -0
  30. package/dist/config/tau-project-artifact.d.mts +54 -0
  31. package/dist/config/tau-project-artifact.mjs +3 -0
  32. package/dist/config/types.d.mts +57 -0
  33. package/dist/config/validate.mjs +1 -0
  34. package/dist/create-geospec.d.mts +49 -0
  35. package/dist/create-geospec.mjs +1 -0
  36. package/dist/engine/client.d.mts +93 -0
  37. package/dist/engine/client.mjs +1 -0
  38. package/dist/engine/index.d.mts +3 -0
  39. package/dist/engine/index.mjs +1 -0
  40. package/dist/engine/matchers.d.mts +70 -0
  41. package/dist/engine/matchers.mjs +1 -0
  42. package/dist/engine/pmi.types.d.mts +78 -0
  43. package/dist/engine/protocol.d.mts +20 -0
  44. package/dist/engine/protocol.mjs +1 -0
  45. package/dist/geometry-unit.d.mts +12 -0
  46. package/dist/index.d.mts +6 -0
  47. package/dist/index.mjs +1 -0
  48. package/dist/mesh/index.d.mts +4 -0
  49. package/dist/mesh/index.mjs +1 -0
  50. package/dist/mesh/types.d.mts +575 -0
  51. package/dist/model/errors.d.mts +20 -0
  52. package/dist/model/errors.mjs +2 -0
  53. package/dist/model/export-intent.d.mts +63 -0
  54. package/dist/model/export-intent.mjs +1 -0
  55. package/dist/model/index.d.mts +6 -0
  56. package/dist/model/index.mjs +1 -0
  57. package/dist/model/load-model.d.mts +25 -0
  58. package/dist/model/load-model.mjs +1 -0
  59. package/dist/model/native-model-loader.d.mts +119 -0
  60. package/dist/model/native-model-loader.mjs +1 -0
  61. package/dist/model/subject-assertions.mjs +1 -0
  62. package/dist/model/subject.d.mts +11 -0
  63. package/dist/model/subject.mjs +1 -0
  64. package/dist/model/types.d.mts +207 -0
  65. package/dist/runner/collector.d.mts +62 -0
  66. package/dist/runner/collector.mjs +2 -0
  67. package/dist/runner/discovery.d.mts +93 -0
  68. package/dist/runner/discovery.mjs +1 -0
  69. package/dist/runner/filter.d.mts +50 -0
  70. package/dist/runner/filter.mjs +1 -0
  71. package/dist/runner/index.d.mts +6 -0
  72. package/dist/runner/index.mjs +1 -0
  73. package/dist/runner/native/index.d.mts +4 -0
  74. package/dist/runner/native/index.mjs +1 -0
  75. package/dist/runner/native/native-pool-grants.d.mts +21 -0
  76. package/dist/runner/native/native-pool-grants.mjs +1 -0
  77. package/dist/runner/native/native-serial-runner.d.mts +29 -0
  78. package/dist/runner/native/native-serial-runner.mjs +1 -0
  79. package/dist/runner/pool/pool-messages.d.mts +94 -0
  80. package/dist/runner/run-geospec-module.d.mts +13 -0
  81. package/dist/runner/run-geospec-module.mjs +47 -0
  82. package/dist/runner/types.d.mts +743 -0
  83. package/dist/runner/worker/index.d.mts +4 -0
  84. package/dist/runner/worker/index.mjs +1 -0
  85. package/dist/runner/worker/no-matching-tests-issue.d.mts +12 -0
  86. package/dist/runner/worker/no-matching-tests-issue.mjs +1 -0
  87. package/dist/runner/worker/runner-types.d.mts +146 -0
  88. package/dist/runner/worker/serial-runner.mjs +1 -0
  89. package/dist/selector/types.d.mts +271 -0
  90. package/dist/step/types.d.mts +134 -0
  91. package/dist/vitest/adapter.d.mts +56 -0
  92. package/dist/vitest/adapter.mjs +3 -0
  93. package/dist/vitest/index.d.mts +4 -0
  94. package/dist/vitest/index.mjs +1 -0
  95. package/package.json +114 -5
@@ -0,0 +1,1700 @@
1
+ # geospec — Types
2
+
3
+ 67 top-level symbols. Signatures are verbatim typescript.
4
+
5
+ // A model admitted by one live GeoSpec host scope
6
+ GeoSpecSubject: {
7
+ readonly [subjectBrand]: true;
8
+ }
9
+
10
+ readonly [subjectBrand]: true
11
+
12
+ // Geometry units accepted at GeoSpec evidence-loading boundaries
13
+ // Remarks: Loaded subjects normalize coordinates into canonical millimetres; this type describes source and provenance units, not a project-wide configuration.
14
+ GeoSpecUnit: 'mm' | 'cm' | 'm' | 'in' | 'ft' | (string & {})
15
+
16
+ // Geometry assertion collected from a GeoSpec test module
17
+ GeoSpecAssertion: {
18
+ /** Assertion kind. */
19
+ kind: 'boundingBox' | 'connectedComponents' | 'watertight' | 'componentInterference' | 'assemblyOccurrences' | 'spatialRelationships' | 'meshIntegrity' | 'noDiagnostics' | 'surfaceArea' | 'volume' | 'mass' | 'centerOfMass' | 'validBrep' | 'topologyCounts' | 'stepUnits' | 'productStructure' | 'planarFace' | 'cylindricalFace' | 'circularHole' | 'circularHolePattern' | 'chamferFeature' | 'filletFeature' | 'minimumWallThickness' | 'voidContinuity' | 'toSatisfyRationalPlate' | 'toSatisfyParallelPlaneDistance';
20
+ /** User-authored value passed to expectGeo(). */
21
+ subject: unknown;
22
+ /** Expected geometry condition. */
23
+ expected: unknown;
24
+ /** True when the assertion evaluated successfully. */
25
+ passed?: boolean;
26
+ /** Structured diagnostics from matcher evaluation. */
27
+ diagnostics?: GeometryDiagnostic[];
28
+ /** Exact compiled assertion report, including core-owned bytes and polarity. */
29
+ report?: GeoSpecCanonicalClaimReport;
30
+ /** The host load which admitted this assertion's subject; independent of equal geometry hashes. */
31
+ loadId?: string;
32
+ /** Wall-clock cost of matcher evaluation in milliseconds (R1: budgeted matchers only). */
33
+ durationMs?: number;
34
+ }
35
+
36
+ // Assertion kind
37
+ kind: 'boundingBox' | 'connectedComponents' | 'watertight' | 'componentInterference' | 'assemblyOccurrences' | 'spatialRelationships' | 'meshIntegrity' | 'noDiagnostics' | 'surfaceArea' | 'volume' | 'mass' | 'centerOfMass' | 'validBrep' | 'topologyCounts' | 'stepUnits' | 'productStructure' | 'planarFace' | 'cylindricalFace' | 'circularHole' | 'circularHolePattern' | 'chamferFeature' | 'filletFeature' | 'minimumWallThickness' | 'voidContinuity' | 'toSatisfyRationalPlate' | 'toSatisfyParallelPlaneDistance'
38
+
39
+ // User-authored value passed to expectGeo()
40
+ subject: unknown
41
+
42
+ // Expected geometry condition
43
+ expected: unknown
44
+
45
+ // True when the assertion evaluated successfully
46
+ passed?: boolean
47
+
48
+ // Structured diagnostics from matcher evaluation
49
+ diagnostics?: GeometryDiagnostic[]
50
+
51
+ // Exact compiled assertion report, including core-owned bytes and polarity
52
+ report?: GeoSpecCanonicalClaimReport
53
+
54
+ // The host load which admitted this assertion's subject
55
+ loadId?: string
56
+
57
+ // Wall-clock cost of matcher evaluation in milliseconds (R1
58
+ durationMs?: number
59
+
60
+ // Assembly occurrence rule accepted by `expectGeo(...).toHaveAssemblyOccurrences(...)`
61
+ GeoSpecAssemblyOccurrenceExpectation: {
62
+ name: GeoSpecComponentSelector;
63
+ count?: GeoSpecNumericExpectation;
64
+ bounds?: {
65
+ within?: GeoSpecComponentSelector;
66
+ min?: Vec3 | GeoSpecAxisExpectation;
67
+ max?: Vec3 | GeoSpecAxisExpectation;
68
+ center?: GeoSpecPointExpectation;
69
+ tolerance?: number;
70
+ };
71
+ }
72
+
73
+ name: GeoSpecComponentSelector
74
+
75
+ count?: GeoSpecNumericExpectation
76
+
77
+ bounds?: {
78
+ within?: GeoSpecComponentSelector;
79
+ min?: Vec3 | GeoSpecAxisExpectation;
80
+ max?: Vec3 | GeoSpecAxisExpectation;
81
+ center?: GeoSpecPointExpectation;
82
+ tolerance?: number;
83
+ }
84
+
85
+ // Assembly occurrence expectation accepted by `expectGeo(...).toHaveAssemblyOccurrences(...)`
86
+ GeoSpecAssemblyOccurrencesExpectation: {
87
+ occurrences: GeoSpecAssemblyOccurrenceExpectation[];
88
+ uniqueNames?: boolean;
89
+ }
90
+
91
+ occurrences: GeoSpecAssemblyOccurrenceExpectation[]
92
+
93
+ uniqueNames?: boolean
94
+
95
+ // Axis-keyed numeric expectation used by high-level geometry matchers
96
+ GeoSpecAxisExpectation: {
97
+ x?: number;
98
+ y?: number;
99
+ z?: number;
100
+ }
101
+
102
+ x?: number
103
+
104
+ y?: number
105
+
106
+ z?: number
107
+
108
+ // Bounding-box expectation accepted by `expectGeo(...).toHaveBoundingBox(...)`
109
+ GeoSpecBoundingBoxExpectation: {
110
+ min?: Vec3 | Partial<Record<keyof GeoSpecAxisExpectation, GeoSpecNumericExpectation>>;
111
+ max?: Vec3 | Partial<Record<keyof GeoSpecAxisExpectation, GeoSpecNumericExpectation>>;
112
+ size?: Vec3 | Partial<Record<keyof GeoSpecAxisExpectation, GeoSpecNumericExpectation>>;
113
+ center?: Vec3 | Partial<Record<keyof GeoSpecAxisExpectation, GeoSpecNumericExpectation>>;
114
+ tolerance?: number;
115
+ }
116
+
117
+ min?: Vec3 | Partial<Record<keyof GeoSpecAxisExpectation, GeoSpecNumericExpectation>>
118
+
119
+ max?: Vec3 | Partial<Record<keyof GeoSpecAxisExpectation, GeoSpecNumericExpectation>>
120
+
121
+ size?: Vec3 | Partial<Record<keyof GeoSpecAxisExpectation, GeoSpecNumericExpectation>>
122
+
123
+ center?: Vec3 | Partial<Record<keyof GeoSpecAxisExpectation, GeoSpecNumericExpectation>>
124
+
125
+ tolerance?: number
126
+
127
+ // Center-of-mass expectation accepted by `expectGeo(...).toHaveCenterOfMass(...)`
128
+ GeoSpecCenterOfMassExpectation: {
129
+ point: GeoSpecPointExpectation;
130
+ tolerance?: number;
131
+ }
132
+
133
+ point: GeoSpecPointExpectation
134
+
135
+ tolerance?: number
136
+
137
+ // Chamfer-feature expectation accepted by `expectGeo(...).toHaveChamferFeature(...)`
138
+ GeoSpecChamferFeatureExpectation: {
139
+ distance: number;
140
+ selection?: string;
141
+ tolerance?: number;
142
+ }
143
+
144
+ distance: number
145
+
146
+ selection?: string
147
+
148
+ tolerance?: number
149
+
150
+ // Circular-hole expectation accepted by `expectGeo(...).toHaveCircularHole(...)`
151
+ GeoSpecCircularHoleExpectation: {
152
+ diameter: number;
153
+ through?: boolean;
154
+ axis?: 'x' | 'y' | 'z';
155
+ center?: GeoSpecPointExpectation;
156
+ tolerance?: number;
157
+ }
158
+
159
+ diameter: number
160
+
161
+ through?: boolean
162
+
163
+ axis?: 'x' | 'y' | 'z'
164
+
165
+ center?: GeoSpecPointExpectation
166
+
167
+ tolerance?: number
168
+
169
+ // Cylindrical-face expectation accepted by `expectGeo(...).toHaveCylindricalFace(...)`
170
+ GeoSpecCylindricalFaceExpectation: {
171
+ radius: number;
172
+ axis: 'x' | 'y' | 'z';
173
+ tolerance?: number;
174
+ }
175
+
176
+ radius: number
177
+
178
+ axis: 'x' | 'y' | 'z'
179
+
180
+ tolerance?: number
181
+
182
+ // Intentional component interference allowance accepted by `expectGeo(...).toHaveNoComponentInterference(...)`
183
+ GeoSpecComponentInterferenceAllowance: {
184
+ kind?: 'intentionalInterference';
185
+ left: GeoSpecComponentSelector;
186
+ right: GeoSpecComponentSelector;
187
+ maxVolume?: number;
188
+ reason: string;
189
+ }
190
+
191
+ kind?: 'intentionalInterference'
192
+
193
+ left: GeoSpecComponentSelector
194
+
195
+ right: GeoSpecComponentSelector
196
+
197
+ maxVolume?: number
198
+
199
+ reason: string
200
+
201
+ // Component-interference expectation accepted by `expectGeo(...).toHaveNoComponentInterference(...)`
202
+ // Remarks: GeoSpec checks for positive solid intersection volume between assembly components. Tangent contact and correctly meshed gears are allowed. `pairs` narrows the check to specific component-label pairs while preserving exact positive-volume evidence for every selected pair. `allowances` documents explicitly intentional positive-volume interference such as gasket compression, press fits, or simplified thread engagement.
203
+ GeoSpecComponentInterferenceExpectation: {
204
+ tolerance?: number;
205
+ pairs?: GeoSpecComponentInterferencePairExpectation[];
206
+ allowances?: GeoSpecComponentInterferenceAllowance[];
207
+ }
208
+
209
+ tolerance?: number
210
+
211
+ pairs?: GeoSpecComponentInterferencePairExpectation[]
212
+
213
+ allowances?: GeoSpecComponentInterferenceAllowance[]
214
+
215
+ // A pair-specific component-interference check accepted by `expectGeo(...).toHaveNoComponentInterference(...)`
216
+ GeoSpecComponentInterferencePairExpectation: {
217
+ left: GeoSpecComponentSelector;
218
+ right: GeoSpecComponentSelector;
219
+ }
220
+
221
+ left: GeoSpecComponentSelector
222
+
223
+ right: GeoSpecComponentSelector
224
+
225
+ // Connected-components expectation accepted by `expectGeo(...).toHaveConnectedComponents(...)`
226
+ GeoSpecConnectedComponentsExpectation: {
227
+ count: number;
228
+ tolerance?: number;
229
+ toleranceMm?: number;
230
+ }
231
+
232
+ count: number
233
+
234
+ tolerance?: number
235
+
236
+ toleranceMm?: number
237
+
238
+ // Geometry selector used by inspection and spatial relationship matchers
239
+ GeoSpecGeometrySelector: GeoSpecComponentSelector | {
240
+ kind: 'occurrence';
241
+ /** Product or instance name to match (also matches the PRODUCT name shared by instanced parts). */
242
+ name?: GeoSpecComponentSelector;
243
+ /** Exact occurrence path — the per-instance identity when instances share one product. */
244
+ path?: GeoSpecComponentSelector;
245
+ } | {
246
+ kind: 'axis';
247
+ name?: GeoSpecComponentSelector;
248
+ axis?: 'x' | 'y' | 'z';
249
+ center?: Vec3;
250
+ direction?: Vec3;
251
+ radius?: number;
252
+ tolerance?: number;
253
+ } | {
254
+ kind: 'plane';
255
+ name?: GeoSpecComponentSelector;
256
+ normal?: Vec3;
257
+ offset?: number;
258
+ tolerance?: number;
259
+ }
260
+ /**
261
+ * SB3 V1 selector catalog kinds (body/face/datum/interface/group plus the
262
+ * string shorthand), resolved by the native engine. SB4 routes
263
+ * relationship endpoints through that engine: the legacy explicit
264
+ * axis/plane members above resolve as `stability: 'explicit'` fixtures
265
+ * (rejected by the production evidence policy), while named legacy forms
266
+ * become engine queries. The catalog's occurrence/axis/plane query forms
267
+ * stay out of this union because their `kind` discriminants collide with
268
+ * the legacy explicit members.
269
+ */
270
+ | Exclude<GeometrySelector, string | {
271
+ kind: 'occurrence' | 'axis' | 'plane';
272
+ }>
273
+
274
+ // Assertion chain returned by `expectGeo(subject)`
275
+ GeoSpecMatcher: {
276
+ /** Core-owned negation; missing or refused evidence still fails. */
277
+ readonly not: Omit<GeoSpecMatcher, 'not'>;
278
+ /** Assert the fixed rational plate contract. */
279
+ toSatisfyRationalPlate(): GeoSpecAssertion;
280
+ /** Assert the fixed parallel-plane distance contract. */
281
+ toSatisfyParallelPlaneDistance(): GeoSpecAssertion;
282
+ /**
283
+ * Assert axis-aligned bounds, size, or center for a loaded geometry subject.
284
+ */
285
+ toHaveBoundingBox(first: Vec3 | GeoSpecBoundingBoxExpectation, second?: Vec3): GeoSpecAssertion;
286
+ /**
287
+ * Assert how many spatially disjoint chunks the mesh contains.
288
+ */
289
+ toHaveConnectedComponents(expected: GeoSpecConnectedComponentsExpectation): GeoSpecAssertion;
290
+ /**
291
+ * Assert closed mesh edge incidence; this does not prove vertex-manifold
292
+ * validity, embeddedness, a Boolean fuse, or material connectivity.
293
+ */
294
+ toBeWatertight(): GeoSpecAssertion;
295
+ /**
296
+ * Assert that separate assembly components do not occupy the same solid volume.
297
+ */
298
+ toHaveNoComponentInterference(expected?: GeoSpecComponentInterferenceExpectation): GeoSpecAssertion;
299
+ /**
300
+ * Assert that named assembly occurrences exist with expected counts and bounds.
301
+ */
302
+ toHaveAssemblyOccurrences(expected: GeoSpecAssemblyOccurrencesExpectation): GeoSpecAssertion;
303
+ /**
304
+ * Assert that selected entities satisfy declared spatial relationships.
305
+ */
306
+ toHaveSpatialRelationships(expected: GeoSpecSpatialRelationshipsExpectation): GeoSpecAssertion;
307
+ /**
308
+ * Assert rendered mesh evidence is internally trustworthy for downstream checks.
309
+ */
310
+ toHaveMeshIntegrity(expected: GeoSpecMeshIntegrityExpectation): GeoSpecAssertion;
311
+ /**
312
+ * Assert that the subject carries no diagnostics at the rejected severities.
313
+ */
314
+ toHaveNoDiagnostics(expected?: GeoSpecNoDiagnosticsExpectation): GeoSpecAssertion;
315
+ /**
316
+ * Assert total surface area, preferring exact BRep mass properties when available.
317
+ */
318
+ toHaveSurfaceArea(expected: GeoSpecSurfaceAreaExpectation): GeoSpecAssertion;
319
+ /**
320
+ * Assert enclosed volume, preferring exact BRep mass properties when available.
321
+ */
322
+ toHaveVolume(expected: GeoSpecVolumeExpectation): GeoSpecAssertion;
323
+ /**
324
+ * Assert mass derived from exact mass properties or volume times density.
325
+ */
326
+ toHaveMass(expected: GeoSpecMassExpectation): GeoSpecAssertion;
327
+ /**
328
+ * Assert the center of mass or mesh-derived centroid for a closed subject.
329
+ */
330
+ toHaveCenterOfMass(expected: GeoSpecCenterOfMassExpectation): GeoSpecAssertion;
331
+ /**
332
+ * Assert that exact BRep evidence reports a valid shape.
333
+ */
334
+ toBeValidBrep(expected?: GeoSpecValidBrepExpectation): GeoSpecAssertion;
335
+ /**
336
+ * Assert exact BRep topology counts.
337
+ */
338
+ toHaveTopologyCounts(expected: GeoSpecTopologyCountsExpectation): GeoSpecAssertion;
339
+ /**
340
+ * Assert the STEP unit evidence.
341
+ */
342
+ toHaveStepUnits(expected: GeoSpecStepUnitsExpectation): GeoSpecAssertion;
343
+ /**
344
+ * Assert STEP product-structure evidence.
345
+ */
346
+ toHaveProductStructure(expected: GeoSpecProductStructureExpectation): GeoSpecAssertion;
347
+ /**
348
+ * Assert that BRep evidence contains a planar face matching the requested constraints.
349
+ */
350
+ toHavePlanarFace(expected: GeoSpecPlanarFaceExpectation): GeoSpecAssertion;
351
+ /**
352
+ * Assert that BRep evidence contains a cylindrical face with the requested radius and axis.
353
+ */
354
+ toHaveCylindricalFace(expected: GeoSpecCylindricalFaceExpectation): GeoSpecAssertion;
355
+ /**
356
+ * Assert that BRep evidence contains a circular hole matching diameter, center, and axis.
357
+ */
358
+ toHaveCircularHole(expected: GeoSpecCircularHoleExpectation): GeoSpecAssertion;
359
+ /**
360
+ * Assert that BRep evidence contains a repeated circular-hole pattern.
361
+ */
362
+ toHaveCircularHolePattern(expected: GeoSpecCircularHolePatternExpectation): GeoSpecAssertion;
363
+ /**
364
+ * Assert that BRep evidence contains a chamfer feature with the requested distance.
365
+ */
366
+ toHaveChamferFeature(expected: GeoSpecChamferFeatureExpectation): GeoSpecAssertion;
367
+ /**
368
+ * Assert that BRep evidence contains a fillet feature with the requested radius.
369
+ */
370
+ toHaveFilletFeature(expected: GeoSpecFilletFeatureExpectation): GeoSpecAssertion;
371
+ /**
372
+ * Assert that BRep evidence reports a minimum wall thickness satisfying the expectation.
373
+ */
374
+ toHaveMinimumWallThickness(expected: GeoSpecMinimumWallThicknessExpectation): GeoSpecAssertion;
375
+ /**
376
+ * Assert that the declared waypoints share one connected void, stay isolated
377
+ * from the declared spaces, and hold the minimum cross-section.
378
+ */
379
+ toHaveVoidContinuity(expected: GeoSpecVoidContinuityExpectation): GeoSpecAssertion;
380
+ }
381
+
382
+ // Core-owned negation
383
+ readonly not: Omit<GeoSpecMatcher, 'not'>
384
+
385
+ // Assert the fixed rational plate contract
386
+ // GeoSpecMatcher.toSatisfyRationalPlate (method)
387
+ toSatisfyRationalPlate(): GeoSpecAssertion;
388
+
389
+ // Assert the fixed parallel-plane distance contract
390
+ // GeoSpecMatcher.toSatisfyParallelPlaneDistance (method)
391
+ toSatisfyParallelPlaneDistance(): GeoSpecAssertion;
392
+
393
+ // Assert axis-aligned bounds, size, or center for a loaded geometry subject
394
+ // GeoSpecMatcher.toHaveBoundingBox (method)
395
+ toHaveBoundingBox(first: Vec3 | GeoSpecBoundingBoxExpectation, second?: Vec3): GeoSpecAssertion;
396
+
397
+ // Assert how many spatially disjoint chunks the mesh contains
398
+ // GeoSpecMatcher.toHaveConnectedComponents (method)
399
+ toHaveConnectedComponents(expected: GeoSpecConnectedComponentsExpectation): GeoSpecAssertion;
400
+
401
+ // Assert closed mesh edge incidence
402
+ // GeoSpecMatcher.toBeWatertight (method)
403
+ toBeWatertight(): GeoSpecAssertion;
404
+
405
+ // Assert that separate assembly components do not occupy the same solid volume
406
+ // GeoSpecMatcher.toHaveNoComponentInterference (method)
407
+ toHaveNoComponentInterference(expected?: GeoSpecComponentInterferenceExpectation): GeoSpecAssertion;
408
+
409
+ // Assert that named assembly occurrences exist with expected counts and bounds
410
+ // GeoSpecMatcher.toHaveAssemblyOccurrences (method)
411
+ toHaveAssemblyOccurrences(expected: GeoSpecAssemblyOccurrencesExpectation): GeoSpecAssertion;
412
+
413
+ // Assert that selected entities satisfy declared spatial relationships
414
+ // GeoSpecMatcher.toHaveSpatialRelationships (method)
415
+ toHaveSpatialRelationships(expected: GeoSpecSpatialRelationshipsExpectation): GeoSpecAssertion;
416
+
417
+ // Assert rendered mesh evidence is internally trustworthy for downstream checks
418
+ // GeoSpecMatcher.toHaveMeshIntegrity (method)
419
+ toHaveMeshIntegrity(expected: GeoSpecMeshIntegrityExpectation): GeoSpecAssertion;
420
+
421
+ // Assert that the subject carries no diagnostics at the rejected severities
422
+ // GeoSpecMatcher.toHaveNoDiagnostics (method)
423
+ toHaveNoDiagnostics(expected?: GeoSpecNoDiagnosticsExpectation): GeoSpecAssertion;
424
+
425
+ // Assert total surface area, preferring exact BRep mass properties when available
426
+ // GeoSpecMatcher.toHaveSurfaceArea (method)
427
+ toHaveSurfaceArea(expected: GeoSpecSurfaceAreaExpectation): GeoSpecAssertion;
428
+
429
+ // Assert enclosed volume, preferring exact BRep mass properties when available
430
+ // GeoSpecMatcher.toHaveVolume (method)
431
+ toHaveVolume(expected: GeoSpecVolumeExpectation): GeoSpecAssertion;
432
+
433
+ // Assert mass derived from exact mass properties or volume times density
434
+ // GeoSpecMatcher.toHaveMass (method)
435
+ toHaveMass(expected: GeoSpecMassExpectation): GeoSpecAssertion;
436
+
437
+ // Assert the center of mass or mesh-derived centroid for a closed subject
438
+ // GeoSpecMatcher.toHaveCenterOfMass (method)
439
+ toHaveCenterOfMass(expected: GeoSpecCenterOfMassExpectation): GeoSpecAssertion;
440
+
441
+ // Assert that exact BRep evidence reports a valid shape
442
+ // GeoSpecMatcher.toBeValidBrep (method)
443
+ toBeValidBrep(expected?: GeoSpecValidBrepExpectation): GeoSpecAssertion;
444
+
445
+ // Assert exact BRep topology counts
446
+ // GeoSpecMatcher.toHaveTopologyCounts (method)
447
+ toHaveTopologyCounts(expected: GeoSpecTopologyCountsExpectation): GeoSpecAssertion;
448
+
449
+ // Assert the STEP unit evidence
450
+ // GeoSpecMatcher.toHaveStepUnits (method)
451
+ toHaveStepUnits(expected: GeoSpecStepUnitsExpectation): GeoSpecAssertion;
452
+
453
+ // Assert STEP product-structure evidence
454
+ // GeoSpecMatcher.toHaveProductStructure (method)
455
+ toHaveProductStructure(expected: GeoSpecProductStructureExpectation): GeoSpecAssertion;
456
+
457
+ // Assert that BRep evidence contains a planar face matching the requested constraints
458
+ // GeoSpecMatcher.toHavePlanarFace (method)
459
+ toHavePlanarFace(expected: GeoSpecPlanarFaceExpectation): GeoSpecAssertion;
460
+
461
+ // Assert that BRep evidence contains a cylindrical face with the requested radius and axis
462
+ // GeoSpecMatcher.toHaveCylindricalFace (method)
463
+ toHaveCylindricalFace(expected: GeoSpecCylindricalFaceExpectation): GeoSpecAssertion;
464
+
465
+ // Assert that BRep evidence contains a circular hole matching diameter, center, and axis
466
+ // GeoSpecMatcher.toHaveCircularHole (method)
467
+ toHaveCircularHole(expected: GeoSpecCircularHoleExpectation): GeoSpecAssertion;
468
+
469
+ // Assert that BRep evidence contains a repeated circular-hole pattern
470
+ // GeoSpecMatcher.toHaveCircularHolePattern (method)
471
+ toHaveCircularHolePattern(expected: GeoSpecCircularHolePatternExpectation): GeoSpecAssertion;
472
+
473
+ // Assert that BRep evidence contains a chamfer feature with the requested distance
474
+ // GeoSpecMatcher.toHaveChamferFeature (method)
475
+ toHaveChamferFeature(expected: GeoSpecChamferFeatureExpectation): GeoSpecAssertion;
476
+
477
+ // Assert that BRep evidence contains a fillet feature with the requested radius
478
+ // GeoSpecMatcher.toHaveFilletFeature (method)
479
+ toHaveFilletFeature(expected: GeoSpecFilletFeatureExpectation): GeoSpecAssertion;
480
+
481
+ // Assert that BRep evidence reports a minimum wall thickness satisfying the expectation
482
+ // GeoSpecMatcher.toHaveMinimumWallThickness (method)
483
+ toHaveMinimumWallThickness(expected: GeoSpecMinimumWallThicknessExpectation): GeoSpecAssertion;
484
+
485
+ // Assert that the declared waypoints share one connected void, stay isolated from the declared spaces, and hold the minimum cross-section
486
+ // GeoSpecMatcher.toHaveVoidContinuity (method)
487
+ toHaveVoidContinuity(expected: GeoSpecVoidContinuityExpectation): GeoSpecAssertion;
488
+
489
+ // Mass expectation accepted by `expectGeo(...).toHaveMass(...)`
490
+ GeoSpecMassExpectation: {
491
+ value: number | GeoSpecNumericExpectation;
492
+ density?: number;
493
+ tolerance?: number;
494
+ }
495
+
496
+ value: number | GeoSpecNumericExpectation
497
+
498
+ density?: number
499
+
500
+ tolerance?: number
501
+
502
+ // Mesh integrity expectation accepted by `expectGeo(...).toHaveMeshIntegrity(...)`
503
+ GeoSpecMeshIntegrityExpectation: {
504
+ finitePositions?: boolean;
505
+ degenerateTriangles?: {
506
+ count?: number;
507
+ maxCount?: number;
508
+ areaTolerance?: number;
509
+ };
510
+ duplicateFaces?: {
511
+ count?: number;
512
+ maxCount?: number;
513
+ };
514
+ watertight?: boolean;
515
+ triangleCount?: GeoSpecNumericExpectation;
516
+ }
517
+
518
+ finitePositions?: boolean
519
+
520
+ degenerateTriangles?: {
521
+ count?: number;
522
+ maxCount?: number;
523
+ areaTolerance?: number;
524
+ }
525
+
526
+ duplicateFaces?: {
527
+ count?: number;
528
+ maxCount?: number;
529
+ }
530
+
531
+ watertight?: boolean
532
+
533
+ triangleCount?: GeoSpecNumericExpectation
534
+
535
+ // Diagnostic severities rejected by `expectGeo(...).toHaveNoDiagnostics(...)`
536
+ // Remarks: Defaults to `error` and `warning` when omitted.
537
+ GeoSpecNoDiagnosticsExpectation: {
538
+ severities?: Array<GeometryDiagnostic['severity']>;
539
+ }
540
+
541
+ severities?: Array<GeometryDiagnostic['severity']>
542
+
543
+ // Minimum-wall-thickness expectation accepted by `expectGeo(...).toHaveMinimumWallThickness(...)`
544
+ GeoSpecMinimumWallThicknessExpectation: {
545
+ value: GeoSpecNumericExpectation;
546
+ tolerance?: number;
547
+ }
548
+
549
+ value: GeoSpecNumericExpectation
550
+
551
+ tolerance?: number
552
+
553
+ // Circular-hole-pattern expectation accepted by `expectGeo(...).toHaveCircularHolePattern(...)`
554
+ GeoSpecCircularHolePatternExpectation: {
555
+ count: number;
556
+ holeDiameter: number;
557
+ boltCircleDiameter?: number;
558
+ axis?: 'x' | 'y' | 'z';
559
+ center?: GeoSpecPointExpectation;
560
+ tolerance?: number;
561
+ }
562
+
563
+ count: number
564
+
565
+ holeDiameter: number
566
+
567
+ boltCircleDiameter?: number
568
+
569
+ axis?: 'x' | 'y' | 'z'
570
+
571
+ center?: GeoSpecPointExpectation
572
+
573
+ tolerance?: number
574
+
575
+ // Fillet-feature expectation accepted by `expectGeo(...).toHaveFilletFeature(...)`
576
+ GeoSpecFilletFeatureExpectation: {
577
+ radius: number;
578
+ selection?: string;
579
+ tolerance?: number;
580
+ }
581
+
582
+ radius: number
583
+
584
+ selection?: string
585
+
586
+ tolerance?: number
587
+
588
+ // Shared scalar expectation used by geometry measurements
589
+ GeoSpecNumericExpectation: number | {
590
+ value?: number;
591
+ greaterThan?: number;
592
+ greaterThanOrEqual?: number;
593
+ lessThan?: number;
594
+ lessThanOrEqual?: number;
595
+ }
596
+
597
+ // Planar-face expectation accepted by `expectGeo(...).toHavePlanarFace(...)`
598
+ GeoSpecPlanarFaceExpectation: {
599
+ normal: GeoSpecPointExpectation;
600
+ offset: number;
601
+ area?: GeoSpecNumericExpectation;
602
+ tolerance?: number;
603
+ }
604
+
605
+ normal: GeoSpecPointExpectation
606
+
607
+ offset: number
608
+
609
+ area?: GeoSpecNumericExpectation
610
+
611
+ tolerance?: number
612
+
613
+ // Point expectation accepted by center and feature matchers
614
+ GeoSpecPointExpectation: Vec3 | GeoSpecAxisExpectation
615
+
616
+ // Product-structure expectation accepted by `expectGeo(...).toHaveProductStructure(...)`
617
+ GeoSpecProductStructureExpectation: {
618
+ names?: string[];
619
+ count?: GeoSpecNumericExpectation;
620
+ }
621
+
622
+ names?: string[]
623
+
624
+ count?: GeoSpecNumericExpectation
625
+
626
+ // One spatial relationship accepted by `expectGeo(...).toHaveSpatialRelationships(...)`
627
+ // Remarks: Verdicts are decided by exact BRep evidence only (D3): extrema for `contact`/`clearance`, analytic fact comparison for `coaxial`/`concentric`/`coplanar`/`parallel`/`perpendicular`/`angle`, exact solid classification for `containment`/`insertion`, and exact boolean common volume for `interference` (positive volume outside the `minVolume`/`maxVolume` allowance band fails).
628
+ GeoSpecSpatialRelationshipExpectation: {
629
+ id?: string;
630
+ kind: 'contact' | 'clearance' | 'coaxial' | 'concentric' | 'coplanar' | 'parallel' | 'perpendicular' | 'angle' | 'containment' | 'insertion' | 'interference';
631
+ subject: GeoSpecGeometrySelector;
632
+ target: GeoSpecGeometrySelector;
633
+ tolerance?: number;
634
+ angularToleranceDegrees?: number;
635
+ /** Expected angle in degrees for `kind: 'angle'` (orientation-insensitive). */
636
+ angleDegrees?: number;
637
+ /** Declared insertion axis (subject-frame direction) for `kind: 'insertion'`. */
638
+ axis?: Vec3;
639
+ min?: number;
640
+ max?: number;
641
+ minVolume?: number;
642
+ maxVolume?: number;
643
+ reason?: string;
644
+ }
645
+
646
+ id?: string
647
+
648
+ kind: 'contact' | 'clearance' | 'coaxial' | 'concentric' | 'coplanar' | 'parallel' | 'perpendicular' | 'angle' | 'containment' | 'insertion' | 'interference'
649
+
650
+ subject: GeoSpecGeometrySelector
651
+
652
+ target: GeoSpecGeometrySelector
653
+
654
+ tolerance?: number
655
+
656
+ angularToleranceDegrees?: number
657
+
658
+ // Expected angle in degrees for `kind
659
+ angleDegrees?: number
660
+
661
+ // Declared insertion axis (subject-frame direction) for `kind
662
+ axis?: Vec3
663
+
664
+ min?: number
665
+
666
+ max?: number
667
+
668
+ minVolume?: number
669
+
670
+ maxVolume?: number
671
+
672
+ reason?: string
673
+
674
+ // Spatial relationship expectation accepted by `expectGeo(...).toHaveSpatialRelationships(...)`
675
+ GeoSpecSpatialRelationshipsExpectation: {
676
+ relationships: GeoSpecSpatialRelationshipExpectation[];
677
+ }
678
+
679
+ relationships: GeoSpecSpatialRelationshipExpectation[]
680
+
681
+ // STEP unit expectation accepted by `expectGeo(...).toHaveStepUnits(...)`
682
+ GeoSpecStepUnitsExpectation: {
683
+ unit: string;
684
+ }
685
+
686
+ unit: string
687
+
688
+ // Surface-area expectation accepted by `expectGeo(...).toHaveSurfaceArea(...)`
689
+ GeoSpecSurfaceAreaExpectation: {
690
+ value: number | GeoSpecNumericExpectation;
691
+ tolerance?: number;
692
+ }
693
+
694
+ value: number | GeoSpecNumericExpectation
695
+
696
+ tolerance?: number
697
+
698
+ // Topology-count expectation accepted by `expectGeo(...).toHaveTopologyCounts(...)`
699
+ GeoSpecTopologyCountsExpectation: {
700
+ vertices?: GeoSpecNumericExpectation;
701
+ edges?: GeoSpecNumericExpectation;
702
+ wires?: GeoSpecNumericExpectation;
703
+ faces?: GeoSpecNumericExpectation;
704
+ shells?: GeoSpecNumericExpectation;
705
+ solids?: GeoSpecNumericExpectation;
706
+ compounds?: GeoSpecNumericExpectation;
707
+ tolerance?: number;
708
+ }
709
+
710
+ vertices?: GeoSpecNumericExpectation
711
+
712
+ edges?: GeoSpecNumericExpectation
713
+
714
+ wires?: GeoSpecNumericExpectation
715
+
716
+ faces?: GeoSpecNumericExpectation
717
+
718
+ shells?: GeoSpecNumericExpectation
719
+
720
+ solids?: GeoSpecNumericExpectation
721
+
722
+ compounds?: GeoSpecNumericExpectation
723
+
724
+ tolerance?: number
725
+
726
+ // Exact BRep validity expectation accepted by `expectGeo(...).toBeValidBrep(...)`
727
+ GeoSpecValidBrepExpectation: {
728
+ maxTolerance?: number;
729
+ freeBounds?: {
730
+ count?: GeoSpecNumericExpectation;
731
+ };
732
+ minEdgeLength?: number;
733
+ sameParameter?: boolean;
734
+ closedShells?: boolean;
735
+ closedWires?: boolean;
736
+ }
737
+
738
+ maxTolerance?: number
739
+
740
+ freeBounds?: {
741
+ count?: GeoSpecNumericExpectation;
742
+ }
743
+
744
+ minEdgeLength?: number
745
+
746
+ sameParameter?: boolean
747
+
748
+ closedShells?: boolean
749
+
750
+ closedWires?: boolean
751
+
752
+ // Void-continuity expectation accepted by `expectGeo(...).toHaveVoidContinuity(...)`
753
+ // Remarks: A whole-assembly negative-space claim: the ordered `path` waypoints must all lie in ONE connected open-void component (void = outside every `material` solid), that component must not reach any `isolatedFrom` point, and its tightest sampled cross-section must meet `minCrossSection`. Connectivity and isolation are proven from Boolean shell topology, generalized winding-number body identity, and deterministic cross-sections.
754
+ GeoSpecVoidContinuityExpectation: {
755
+ /** Ordered waypoints (>= 1) known to lie in the void being proven. */
756
+ path: GeoSpecVoidWaypoint[];
757
+ /**
758
+ * Occurrence names whose solids bound the void. Defaults to every occurrence
759
+ * in the subject (the whole-assembly negative space).
760
+ */
761
+ material?: string[];
762
+ /** Minimum required bottleneck cross-section (mm²), sampled. */
763
+ minCrossSection?: number;
764
+ /** Points that must NOT be reachable from the path void (isolation claim). */
765
+ isolatedFrom?: Vec3[];
766
+ /**
767
+ * Region bounded for the proof (subject frame). Defaults to the union
768
+ * of the `material` occurrence bounds, which encloses every interior void.
769
+ */
770
+ bounds?: {
771
+ min: Vec3;
772
+ max: Vec3;
773
+ };
774
+ }
775
+
776
+ // Ordered waypoints (>= 1) known to lie in the void being proven
777
+ path: GeoSpecVoidWaypoint[]
778
+
779
+ // Occurrence names whose solids bound the void
780
+ material?: string[]
781
+
782
+ // Minimum required bottleneck cross-section (mm²), sampled
783
+ minCrossSection?: number
784
+
785
+ // Points that must NOT be reachable from the path void (isolation claim)
786
+ isolatedFrom?: Vec3[]
787
+
788
+ // Region bounded for the proof (subject frame)
789
+ bounds?: {
790
+ min: Vec3;
791
+ max: Vec3;
792
+ }
793
+
794
+ // One void-continuity waypoint
795
+ GeoSpecVoidWaypoint: Vec3 | {
796
+ occurrence: string;
797
+ }
798
+
799
+ // Volume expectation accepted by `expectGeo(...).toHaveVolume(...)`
800
+ GeoSpecVolumeExpectation: {
801
+ value: number | GeoSpecNumericExpectation;
802
+ tolerance?: number;
803
+ }
804
+
805
+ value: number | GeoSpecNumericExpectation
806
+
807
+ tolerance?: number
808
+
809
+ // Basic exact or topology-derived BRep evidence consumed by early feature matchers
810
+ BrepEvidence: {
811
+ validity?: {
812
+ valid: boolean;
813
+ checks?: Array<{
814
+ shape: string;
815
+ status: string;
816
+ }>;
817
+ maxTolerance?: number;
818
+ freeBounds?: {
819
+ count: number;
820
+ };
821
+ smallEdges?: Array<{
822
+ length: number;
823
+ shape?: string;
824
+ location?: Vec3;
825
+ }>;
826
+ sameParameter?: boolean;
827
+ closedShells?: boolean;
828
+ closedSolids?: boolean;
829
+ solidCount?: number;
830
+ invalidSolidCount?: number;
831
+ openEdgeCount?: number;
832
+ reason?: string;
833
+ closedWires?: boolean;
834
+ };
835
+ topologyCounts?: {
836
+ vertices?: number;
837
+ edges?: number;
838
+ wires?: number;
839
+ faces?: number;
840
+ shells?: number;
841
+ solids?: number;
842
+ compounds?: number;
843
+ };
844
+ boundingBox?: {
845
+ min: Vec3;
846
+ max: Vec3;
847
+ size: Vec3;
848
+ center: Vec3;
849
+ };
850
+ massProperties?: {
851
+ surfaceArea?: number;
852
+ volume?: number;
853
+ centerOfMass?: Vec3;
854
+ mass?: number;
855
+ };
856
+ planarFaces?: Array<{
857
+ normal: Vec3;
858
+ offset: number;
859
+ area?: number;
860
+ center?: Vec3;
861
+ }>;
862
+ cylindricalFaces?: Array<{
863
+ radius: number;
864
+ axis: 'x' | 'y' | 'z';
865
+ center?: Vec3;
866
+ axisRange?: {
867
+ min: number;
868
+ max: number;
869
+ };
870
+ }>;
871
+ circularHoles?: Array<{
872
+ diameter: number;
873
+ through: boolean;
874
+ axis: 'x' | 'y' | 'z';
875
+ center?: Vec3;
876
+ axisRange?: {
877
+ min: number;
878
+ max: number;
879
+ };
880
+ }>;
881
+ circularHolePatterns?: Array<{
882
+ count: number;
883
+ holeDiameter: number;
884
+ boltCircleDiameter: number;
885
+ axis: 'x' | 'y' | 'z';
886
+ center?: Vec3;
887
+ }>;
888
+ chamferFeatures?: Array<{
889
+ distance: number;
890
+ selection?: string;
891
+ }>;
892
+ filletFeatures?: Array<{
893
+ radius: number;
894
+ selection?: string;
895
+ }>;
896
+ minimumWallThickness?: {
897
+ value: number;
898
+ location?: Vec3;
899
+ pointA?: Vec3;
900
+ pointB?: Vec3;
901
+ solidIndex?: number;
902
+ tieCount?: number;
903
+ algorithm?: string;
904
+ tolerance?: number;
905
+ supportA?: {
906
+ faceIndex?: number;
907
+ surfaceType?: string;
908
+ supportType?: string;
909
+ };
910
+ supportB?: {
911
+ faceIndex?: number;
912
+ surfaceType?: string;
913
+ supportType?: string;
914
+ };
915
+ rejections?: Record<string, number>;
916
+ };
917
+ }
918
+
919
+ validity?: {
920
+ valid: boolean;
921
+ checks?: Array<{
922
+ shape: string;
923
+ status: string;
924
+ }>;
925
+ maxTolerance?: number;
926
+ freeBounds?: {
927
+ count: number;
928
+ };
929
+ smallEdges?: Array<{
930
+ length: number;
931
+ shape?: string;
932
+ location?: Vec3;
933
+ }>;
934
+ sameParameter?: boolean;
935
+ closedShells?: boolean;
936
+ closedSolids?: boolean;
937
+ solidCount?: number;
938
+ invalidSolidCount?: number;
939
+ openEdgeCount?: number;
940
+ reason?: string;
941
+ closedWires?: boolean;
942
+ }
943
+
944
+ topologyCounts?: {
945
+ vertices?: number;
946
+ edges?: number;
947
+ wires?: number;
948
+ faces?: number;
949
+ shells?: number;
950
+ solids?: number;
951
+ compounds?: number;
952
+ }
953
+
954
+ boundingBox?: {
955
+ min: Vec3;
956
+ max: Vec3;
957
+ size: Vec3;
958
+ center: Vec3;
959
+ }
960
+
961
+ massProperties?: {
962
+ surfaceArea?: number;
963
+ volume?: number;
964
+ centerOfMass?: Vec3;
965
+ mass?: number;
966
+ }
967
+
968
+ planarFaces?: Array<{
969
+ normal: Vec3;
970
+ offset: number;
971
+ area?: number;
972
+ center?: Vec3;
973
+ }>
974
+
975
+ cylindricalFaces?: Array<{
976
+ radius: number;
977
+ axis: 'x' | 'y' | 'z';
978
+ center?: Vec3;
979
+ axisRange?: {
980
+ min: number;
981
+ max: number;
982
+ };
983
+ }>
984
+
985
+ circularHoles?: Array<{
986
+ diameter: number;
987
+ through: boolean;
988
+ axis: 'x' | 'y' | 'z';
989
+ center?: Vec3;
990
+ axisRange?: {
991
+ min: number;
992
+ max: number;
993
+ };
994
+ }>
995
+
996
+ circularHolePatterns?: Array<{
997
+ count: number;
998
+ holeDiameter: number;
999
+ boltCircleDiameter: number;
1000
+ axis: 'x' | 'y' | 'z';
1001
+ center?: Vec3;
1002
+ }>
1003
+
1004
+ chamferFeatures?: Array<{
1005
+ distance: number;
1006
+ selection?: string;
1007
+ }>
1008
+
1009
+ filletFeatures?: Array<{
1010
+ radius: number;
1011
+ selection?: string;
1012
+ }>
1013
+
1014
+ minimumWallThickness?: {
1015
+ value: number;
1016
+ location?: Vec3;
1017
+ pointA?: Vec3;
1018
+ pointB?: Vec3;
1019
+ solidIndex?: number;
1020
+ tieCount?: number;
1021
+ algorithm?: string;
1022
+ tolerance?: number;
1023
+ supportA?: {
1024
+ faceIndex?: number;
1025
+ surfaceType?: string;
1026
+ supportType?: string;
1027
+ };
1028
+ supportB?: {
1029
+ faceIndex?: number;
1030
+ surfaceType?: string;
1031
+ supportType?: string;
1032
+ };
1033
+ rejections?: Record<string, number>;
1034
+ }
1035
+
1036
+ // Geometry file formats understood by GeoSpec provenance
1037
+ GeometryFileFormat: MeshFileFormat | 'step' | 'stp'
1038
+
1039
+ // Capability exposed by a loaded subject
1040
+ GeometryCapability: {
1041
+ kind: 'mesh';
1042
+ feature: 'triangles' | 'bounding-box' | 'connected-components' | 'watertightness' | 'surface-area' | 'volume' | 'center-of-mass' | 'distance' | 'component-overlap';
1043
+ } | {
1044
+ kind: 'brep';
1045
+ feature: 'validity' | 'topology-counts' | 'bounding-box' | 'mass-properties' | 'planar-faces' | 'cylindrical-faces' | 'circular-holes' | 'circular-hole-patterns' | 'chamfer-features' | 'fillet-features' | 'wall-thickness';
1046
+ } | {
1047
+ kind: 'step';
1048
+ feature: 'schema' | 'units' | 'product-structure' | 'reader-provenance';
1049
+ } | {
1050
+ kind: 'unsupported';
1051
+ feature: string;
1052
+ reason: string;
1053
+ }
1054
+
1055
+ kind: 'mesh'
1056
+
1057
+ feature: 'triangles' | 'bounding-box' | 'connected-components' | 'watertightness' | 'surface-area' | 'volume' | 'center-of-mass' | 'distance' | 'component-overlap'
1058
+
1059
+ // Diagnostic emitted by GeoSpec loaders, analyzers, and matchers
1060
+ GeometryDiagnostic: {
1061
+ code: KernelIssueCode | (string & {});
1062
+ severity: 'error' | 'warning' | 'info';
1063
+ message: string;
1064
+ suggestion?: string;
1065
+ spatial?: {
1066
+ min?: Vec3;
1067
+ max?: Vec3;
1068
+ center?: Vec3;
1069
+ };
1070
+ details?: unknown;
1071
+ }
1072
+
1073
+ code: KernelIssueCode | (string & {})
1074
+
1075
+ severity: 'error' | 'warning' | 'info'
1076
+
1077
+ message: string
1078
+
1079
+ suggestion?: string
1080
+
1081
+ spatial?: {
1082
+ min?: Vec3;
1083
+ max?: Vec3;
1084
+ center?: Vec3;
1085
+ }
1086
+
1087
+ details?: unknown
1088
+
1089
+ // Provenance recorded by GeoSpec loaders
1090
+ GeometryProvenance: {
1091
+ source: GeometrySource;
1092
+ unit: GeoSpecUnit;
1093
+ loader: 'gltf-transform' | 'in-memory' | 'opencascade-step';
1094
+ contentHash?: string;
1095
+ parameters?: Record<string, JSONValue>;
1096
+ exportIntent?: GeometryExportIntent;
1097
+ }
1098
+
1099
+ source: GeometrySource
1100
+
1101
+ unit: GeoSpecUnit
1102
+
1103
+ loader: 'gltf-transform' | 'in-memory' | 'opencascade-step'
1104
+
1105
+ contentHash?: string
1106
+
1107
+ parameters?: Record<string, JSONValue>
1108
+
1109
+ exportIntent?: GeometryExportIntent
1110
+
1111
+ // Source metadata for a loaded geometry subject
1112
+ GeometrySource: {
1113
+ kind: 'bytes' | 'array-buffer' | 'blob' | 'file' | 'path' | 'url' | 'mesh-buffer' | 'readable-stream' | 'async-iterable';
1114
+ format: GeometryFileFormat;
1115
+ path?: string;
1116
+ name?: string;
1117
+ byteLength?: number;
1118
+ }
1119
+
1120
+ kind: 'bytes' | 'array-buffer' | 'blob' | 'file' | 'path' | 'url' | 'mesh-buffer' | 'readable-stream' | 'async-iterable'
1121
+
1122
+ format: GeometryFileFormat
1123
+
1124
+ path?: string
1125
+
1126
+ name?: string
1127
+
1128
+ byteLength?: number
1129
+
1130
+ // Canonical P0 object under test for GeoSpec
1131
+ // Remarks: This is intentionally a GeoSpec-loaded subject rather than a Tau runtime contract. Runtime integrations pass GLB/glTF bytes or files into loaders.
1132
+ GeometrySubject: {
1133
+ kind: 'geometry-subject';
1134
+ /** Opaque engine-owned identifier used by every protocol claim. */
1135
+ subjectId: string;
1136
+ mesh: GeometrySubjectMeshEvidence;
1137
+ brep?: BrepEvidence;
1138
+ step?: StepEvidence;
1139
+ provenance: GeometryProvenance;
1140
+ capabilities: GeometryCapability[];
1141
+ diagnostics: GeometryEvidenceDiagnostic[];
1142
+ }
1143
+
1144
+ kind: 'geometry-subject'
1145
+
1146
+ // Opaque engine-owned identifier used by every protocol claim
1147
+ subjectId: string
1148
+
1149
+ mesh: GeometrySubjectMeshEvidence
1150
+
1151
+ brep?: BrepEvidence
1152
+
1153
+ step?: StepEvidence
1154
+
1155
+ provenance: GeometryProvenance
1156
+
1157
+ capabilities: GeometryCapability[]
1158
+
1159
+ diagnostics: GeometryEvidenceDiagnostic[]
1160
+
1161
+ // Wire-safe mesh summary carried by an opaque geometry subject
1162
+ GeometrySubjectMeshEvidence: {
1163
+ format: MeshFileFormat;
1164
+ stats: Pick<GeometryStats, 'vertexCount' | 'meshCount' | 'triangleCount'>;
1165
+ }
1166
+
1167
+ format: MeshFileFormat
1168
+
1169
+ stats: Pick<GeometryStats, 'vertexCount' | 'meshCount' | 'triangleCount'>
1170
+
1171
+ // Mesh evidence loaded from geometry bytes or buffers
1172
+ MeshEvidence: {
1173
+ format: MeshFileFormat;
1174
+ stats: GeometryStats;
1175
+ }
1176
+
1177
+ format: MeshFileFormat
1178
+
1179
+ stats: GeometryStats
1180
+
1181
+ // Geometry file formats supported by the P0 mesh loader
1182
+ MeshFileFormat: 'glb' | 'gltf' | 'mesh-buffer'
1183
+
1184
+ // Triangle quality and scalar mesh metrics used by P0 GeoSpec matchers
1185
+ // Remarks: Values are reported in the glTF document coordinate units.
1186
+ MeshQualityStats: {
1187
+ triangleCount: number;
1188
+ nonFiniteVertices: Array<{
1189
+ primitive: string;
1190
+ vertexIndex: number;
1191
+ position: [number, number, number];
1192
+ }>;
1193
+ degenerateTriangles: Array<{
1194
+ primitive: string;
1195
+ triangleIndex: number;
1196
+ area: number;
1197
+ center: [number, number, number];
1198
+ }>;
1199
+ duplicateFaces: Array<{
1200
+ primitive: string;
1201
+ triangleIndex: number;
1202
+ firstTriangleIndex: number;
1203
+ }>;
1204
+ triangles: MeshTriangle[];
1205
+ surfaceArea: number;
1206
+ signedVolume: number;
1207
+ centerOfMass?: Vec3;
1208
+ }
1209
+
1210
+ triangleCount: number
1211
+
1212
+ nonFiniteVertices: Array<{
1213
+ primitive: string;
1214
+ vertexIndex: number;
1215
+ position: [number, number, number];
1216
+ }>
1217
+
1218
+ degenerateTriangles: Array<{
1219
+ primitive: string;
1220
+ triangleIndex: number;
1221
+ area: number;
1222
+ center: [number, number, number];
1223
+ }>
1224
+
1225
+ duplicateFaces: Array<{
1226
+ primitive: string;
1227
+ triangleIndex: number;
1228
+ firstTriangleIndex: number;
1229
+ }>
1230
+
1231
+ triangles: MeshTriangle[]
1232
+
1233
+ surfaceArea: number
1234
+
1235
+ signedVolume: number
1236
+
1237
+ centerOfMass?: Vec3
1238
+
1239
+ // One triangle from mesh evidence, in geometry document coordinates
1240
+ MeshTriangle: {
1241
+ primitive: string;
1242
+ triangleIndex: number;
1243
+ a: [number, number, number];
1244
+ b: [number, number, number];
1245
+ c: [number, number, number];
1246
+ center: [number, number, number];
1247
+ area: number;
1248
+ }
1249
+
1250
+ primitive: string
1251
+
1252
+ triangleIndex: number
1253
+
1254
+ a: [number, number, number]
1255
+
1256
+ b: [number, number, number]
1257
+
1258
+ c: [number, number, number]
1259
+
1260
+ center: [number, number, number]
1261
+
1262
+ area: number
1263
+
1264
+ // STEP/XDE evidence extracted while loading a STEP subject
1265
+ StepEvidence: {
1266
+ schema?: string;
1267
+ unit?: GeoSpecUnit;
1268
+ productStructure?: Array<{
1269
+ name: string;
1270
+ path: string;
1271
+ transform?: number[];
1272
+ }>;
1273
+ readStrategy: {
1274
+ strategy: 'native-stream' | 'filesystem';
1275
+ inputKind: GeometrySource['kind'];
1276
+ bytesRead: number;
1277
+ nativeReadStream: boolean;
1278
+ copiedToEmscriptenFs: boolean;
1279
+ };
1280
+ capabilities: Array<{
1281
+ feature: string;
1282
+ supported: boolean;
1283
+ reason?: string;
1284
+ }>;
1285
+ /** Structured AP242 XDE read result (occurrences, subshape names, datum placements). */
1286
+ xde?: XdeReadResult;
1287
+ }
1288
+
1289
+ schema?: string
1290
+
1291
+ unit?: GeoSpecUnit
1292
+
1293
+ productStructure?: Array<{
1294
+ name: string;
1295
+ path: string;
1296
+ transform?: number[];
1297
+ }>
1298
+
1299
+ readStrategy: {
1300
+ strategy: 'native-stream' | 'filesystem';
1301
+ inputKind: GeometrySource['kind'];
1302
+ bytesRead: number;
1303
+ nativeReadStream: boolean;
1304
+ copiedToEmscriptenFs: boolean;
1305
+ }
1306
+
1307
+ capabilities: Array<{
1308
+ feature: string;
1309
+ supported: boolean;
1310
+ reason?: string;
1311
+ }>
1312
+
1313
+ // Structured AP242 XDE read result (occurrences, subshape names, datum placements)
1314
+ xde?: XdeReadResult
1315
+
1316
+ // Numeric 3D vector
1317
+ Vec3: readonly [number, number, number]
1318
+
1319
+ // Numeric 3D vector
1320
+ GeoSpecVec3: readonly [number, number, number]
1321
+
1322
+ // Runtime route metadata used to decide whether a runtime export can honor GeoSpec evidence requirements
1323
+ GeoSpecExportRoute: Partial<ExportRoute> & {
1324
+ kernelId?: string;
1325
+ sourceFormat?: string;
1326
+ targetFormat?: string;
1327
+ transcoderId?: string;
1328
+ fidelity?: string;
1329
+ exportOptions?: {
1330
+ schema?: {
1331
+ properties?: Record<string, unknown>;
1332
+ };
1333
+ defaults?: Record<string, unknown>;
1334
+ };
1335
+ }
1336
+
1337
+ RuntimeBackedModelFormat: Exclude<GeoSpecModelFormat, 'mesh-buffer'>
1338
+
1339
+ // Runtime client shape for route-aware Tau runtimes
1340
+ RuntimeClientWithRoutes: GeoSpecRuntimeClient & {
1341
+ bestRouteFor(format: string, options?: {
1342
+ readonly kernelId?: string;
1343
+ }): GeoSpecExportRoute | undefined;
1344
+ }
1345
+
1346
+ open: (input: Pick<Parameters<RuntimeClient['open']>[0], 'source' | 'parameters' | 'stage' | 'watch' | 'signal'>) => Pick<ReturnType<RuntimeClient['open']>, 'export' | 'close'>
1347
+
1348
+ // RuntimeClientWithRoutes.on (method)
1349
+ on?(event: 'telemetry', handler: (batch: {
1350
+ readonly entries: ReadonlyArray<{
1351
+ name: string;
1352
+ duration: number;
1353
+ startTime: number;
1354
+ workerTimeOrigin: number;
1355
+ }>;
1356
+ }) => void): () => void;
1357
+
1358
+ // RuntimeClientWithRoutes.bestRouteFor (method)
1359
+ bestRouteFor(format: string, options?: {
1360
+ readonly kernelId?: string;
1361
+ }): GeoSpecExportRoute | undefined;
1362
+
1363
+ // Resolved runtime export request and provenance for a GeoSpec model load
1364
+ RuntimeExportIntent: {
1365
+ options: Record<string, unknown>;
1366
+ provenance: GeometryExportIntent;
1367
+ sourceUnit: GeoSpecUnit;
1368
+ }
1369
+
1370
+ options: Record<string, unknown>
1371
+
1372
+ provenance: GeometryExportIntent
1373
+
1374
+ sourceUnit: GeoSpecUnit
1375
+
1376
+ // Structured failure returned when a runtime cannot provide the requested GeoSpec evidence
1377
+ RuntimeExportIntentFailure: {
1378
+ success: false;
1379
+ diagnostics: GeometryDiagnostic[];
1380
+ }
1381
+
1382
+ success: false
1383
+
1384
+ diagnostics: GeometryDiagnostic[]
1385
+
1386
+ // Defaults accepted by {@link import ('./load-model.js').createModelLoader}
1387
+ CreateModelLoaderOptions: {
1388
+ /** Initialized compiled engine supplied by the host, never selected by an authored spec. */
1389
+ engine: GeoSpecNativeModelEngine;
1390
+ /** Rooted host reader for direct filesystem or URL sources. */
1391
+ readSource?: GeoSpecNativeSourceReader;
1392
+ /** Geometry format to export when an individual call does not specify one. */
1393
+ format?: GeoSpecModelFormat;
1394
+ /** Runtime client or lazy runtime factory. */
1395
+ runtime?: GeoSpecRuntimeClient | GeoSpecRuntimeClientFactory;
1396
+ /** Source-specific runtime adapters, e.g. host-provided GPL-isolated kernels. */
1397
+ sourceAdapters?: readonly GeoSpecRuntimeSourceAdapter[];
1398
+ /** Project root used by runtime integrations. */
1399
+ projectPath?: string;
1400
+ /** STEP reader strategy used for STEP sources or exports. */
1401
+ stepStreaming?: StepStreamingMode;
1402
+ /** Whether STEP loading should also produce mesh evidence. Defaults to true. */
1403
+ mesh?: boolean;
1404
+ /** Linear tolerance used while meshing exact BRep evidence. */
1405
+ meshLinearTolerance?: number;
1406
+ /** Angular tolerance in degrees used while meshing exact BRep evidence. */
1407
+ meshAngularToleranceDegrees?: number;
1408
+ }
1409
+
1410
+ // Initialized compiled engine supplied by the host, never selected by an authored spec
1411
+ engine: GeoSpecNativeModelEngine
1412
+
1413
+ // Rooted host reader for direct filesystem or URL sources
1414
+ readSource?: GeoSpecNativeSourceReader
1415
+
1416
+ // Geometry format to export when an individual call does not specify one
1417
+ format?: GeoSpecModelFormat
1418
+
1419
+ // Runtime client or lazy runtime factory
1420
+ runtime?: GeoSpecRuntimeClient | GeoSpecRuntimeClientFactory
1421
+
1422
+ // Source-specific runtime adapters, e.g
1423
+ sourceAdapters?: readonly GeoSpecRuntimeSourceAdapter[]
1424
+
1425
+ // Project root used by runtime integrations
1426
+ projectPath?: string
1427
+
1428
+ // STEP reader strategy used for STEP sources or exports
1429
+ stepStreaming?: StepStreamingMode
1430
+
1431
+ // Whether STEP loading should also produce mesh evidence
1432
+ mesh?: boolean
1433
+
1434
+ // Linear tolerance used while meshing exact BRep evidence
1435
+ meshLinearTolerance?: number
1436
+
1437
+ // Angular tolerance in degrees used while meshing exact BRep evidence
1438
+ meshAngularToleranceDegrees?: number
1439
+
1440
+ // Geometry formats accepted by {@link import ('./load-model.js').loadModel}
1441
+ GeoSpecModelFormat: MeshFileFormat | 'step' | 'stp'
1442
+
1443
+ // Function shape used by GeoSpec runners to provide model loading inside VM executed test files
1444
+ GeoSpecModelLoader: <Code extends Record<string, string> = Record<string, string>>(options: LoadModelOptions<Code>) => Promise<GeoSpecSubject>
1445
+
1446
+ // A configured loader whose shared runtime can be released with its owner
1447
+ ManagedGeoSpecModelLoader: GeoSpecModelLoader & {
1448
+ dispose(): Promise<void>;
1449
+ }
1450
+
1451
+ // ManagedGeoSpecModelLoader.dispose (method)
1452
+ dispose(): Promise<void>;
1453
+
1454
+ // Runtime client surface consumed by `geospec/model`
1455
+ // Remarks: GeoSpec accepts concrete Tau runtime clients from multiple call sites but only needs connection lifecycle and request-scoped documents. Keep this shape small so typed runtime clients do not have to widen their full generic method surface to GeoSpec's testing DSL. A client with `shutdown` is awaited through it when GeoSpec releases an owned runtime, so its host resources are closed before the caller (for example a worker thread) exits.
1456
+ GeoSpecRuntimeClient: Pick<RuntimeClient, 'connect' | 'terminate'> & Partial<Pick<RuntimeClient, 'shutdown'>> & {
1457
+ open: (input: Pick<Parameters<RuntimeClient['open']>[0], 'source' | 'parameters' | 'stage' | 'watch' | 'signal'>) => Pick<ReturnType<RuntimeClient['open']>, 'export' | 'close'>;
1458
+ on?(event: 'telemetry', handler: (batch: {
1459
+ readonly entries: ReadonlyArray<{
1460
+ name: string;
1461
+ duration: number;
1462
+ startTime: number;
1463
+ workerTimeOrigin: number;
1464
+ }>;
1465
+ }) => void): () => void;
1466
+ }
1467
+
1468
+ open: (input: Pick<Parameters<RuntimeClient['open']>[0], 'source' | 'parameters' | 'stage' | 'watch' | 'signal'>) => Pick<ReturnType<RuntimeClient['open']>, 'export' | 'close'>
1469
+
1470
+ // GeoSpecRuntimeClient.on (method)
1471
+ on?(event: 'telemetry', handler: (batch: {
1472
+ readonly entries: ReadonlyArray<{
1473
+ name: string;
1474
+ duration: number;
1475
+ startTime: number;
1476
+ workerTimeOrigin: number;
1477
+ }>;
1478
+ }) => void): () => void;
1479
+
1480
+ // Lazy runtime factory consumed by `geospec/model`
1481
+ GeoSpecRuntimeClientFactory: () => Promise<GeoSpecRuntimeClient>
1482
+
1483
+ // Explicit source adapter for formats whose runtime setup is not part of the generic Tau runtime preset
1484
+ GeoSpecRuntimeSourceAdapter: {
1485
+ id: string;
1486
+ extensions: readonly string[];
1487
+ createRuntime(options: {
1488
+ projectPath?: string;
1489
+ file?: string;
1490
+ }): Promise<GeoSpecRuntimeClient>;
1491
+ }
1492
+
1493
+ id: string
1494
+
1495
+ extensions: readonly string[]
1496
+
1497
+ // GeoSpecRuntimeSourceAdapter.createRuntime (method)
1498
+ createRuntime(options: {
1499
+ projectPath?: string;
1500
+ file?: string;
1501
+ }): Promise<GeoSpecRuntimeClient>;
1502
+
1503
+ // Inline code-CAD model load options
1504
+ LoadModelCodeOptions: {
1505
+ /** Source files keyed by project-relative path. */
1506
+ code: Code;
1507
+ /** Entry path to render from {@link code}. */
1508
+ file: keyof Code & string;
1509
+ /** Geometry format to export. Defaults to `glb`. */
1510
+ format?: GeoSpecModelFormat;
1511
+ /** Explicit parameters passed to the runtime. */
1512
+ parameters?: Record<string, unknown>;
1513
+ /** Runtime client or lazy runtime factory. */
1514
+ runtime?: GeoSpecRuntimeClient | GeoSpecRuntimeClientFactory;
1515
+ /** Source-specific runtime adapters, e.g. host-provided GPL-isolated kernels. */
1516
+ sourceAdapters?: readonly GeoSpecRuntimeSourceAdapter[];
1517
+ /** Project root used by runtime integrations. */
1518
+ projectPath?: string;
1519
+ /** STEP reader strategy used for STEP exports. */
1520
+ stepStreaming?: StepStreamingMode;
1521
+ /** Whether STEP loading should also produce mesh evidence. Defaults to true. */
1522
+ mesh?: boolean;
1523
+ /** Linear tolerance used while meshing exact BRep evidence. */
1524
+ meshLinearTolerance?: number;
1525
+ /** Angular tolerance in degrees used while meshing exact BRep evidence. */
1526
+ meshAngularToleranceDegrees?: number;
1527
+ }
1528
+
1529
+ // Source files keyed by project-relative path
1530
+ code: Code
1531
+
1532
+ // Entry path to render from {@link code }
1533
+ file: keyof Code & string
1534
+
1535
+ // Geometry format to export
1536
+ format?: GeoSpecModelFormat
1537
+
1538
+ // Explicit parameters passed to the runtime
1539
+ parameters?: Record<string, unknown>
1540
+
1541
+ // Runtime client or lazy runtime factory
1542
+ runtime?: GeoSpecRuntimeClient | GeoSpecRuntimeClientFactory
1543
+
1544
+ // Source-specific runtime adapters, e.g
1545
+ sourceAdapters?: readonly GeoSpecRuntimeSourceAdapter[]
1546
+
1547
+ // Project root used by runtime integrations
1548
+ projectPath?: string
1549
+
1550
+ // STEP reader strategy used for STEP exports
1551
+ stepStreaming?: StepStreamingMode
1552
+
1553
+ // Whether STEP loading should also produce mesh evidence
1554
+ mesh?: boolean
1555
+
1556
+ // Linear tolerance used while meshing exact BRep evidence
1557
+ meshLinearTolerance?: number
1558
+
1559
+ // Angular tolerance in degrees used while meshing exact BRep evidence
1560
+ meshAngularToleranceDegrees?: number
1561
+
1562
+ // Filesystem-backed model load options
1563
+ LoadModelFileOptions: {
1564
+ /** Project-relative model file to render. */
1565
+ file: string;
1566
+ /** Project root used by runtime integrations. */
1567
+ projectPath?: string;
1568
+ /** Geometry format to export. Defaults to `glb`. */
1569
+ format?: GeoSpecModelFormat;
1570
+ /** Explicit parameters passed to the runtime. */
1571
+ parameters?: Record<string, unknown>;
1572
+ /** Runtime client or lazy runtime factory. */
1573
+ runtime?: GeoSpecRuntimeClient | GeoSpecRuntimeClientFactory;
1574
+ /** Source-specific runtime adapters, e.g. host-provided GPL-isolated kernels. */
1575
+ sourceAdapters?: readonly GeoSpecRuntimeSourceAdapter[];
1576
+ /** STEP reader strategy used for STEP exports. */
1577
+ stepStreaming?: StepStreamingMode;
1578
+ /** Whether STEP loading should also produce mesh evidence. Defaults to true. */
1579
+ mesh?: boolean;
1580
+ /** Linear tolerance used while meshing exact BRep evidence. */
1581
+ meshLinearTolerance?: number;
1582
+ /** Angular tolerance in degrees used while meshing exact BRep evidence. */
1583
+ meshAngularToleranceDegrees?: number;
1584
+ }
1585
+
1586
+ // Project-relative model file to render
1587
+ file: string
1588
+
1589
+ // Project root used by runtime integrations
1590
+ projectPath?: string
1591
+
1592
+ // Geometry format to export
1593
+ format?: GeoSpecModelFormat
1594
+
1595
+ // Explicit parameters passed to the runtime
1596
+ parameters?: Record<string, unknown>
1597
+
1598
+ // Runtime client or lazy runtime factory
1599
+ runtime?: GeoSpecRuntimeClient | GeoSpecRuntimeClientFactory
1600
+
1601
+ // Source-specific runtime adapters, e.g
1602
+ sourceAdapters?: readonly GeoSpecRuntimeSourceAdapter[]
1603
+
1604
+ // STEP reader strategy used for STEP exports
1605
+ stepStreaming?: StepStreamingMode
1606
+
1607
+ // Whether STEP loading should also produce mesh evidence
1608
+ mesh?: boolean
1609
+
1610
+ // Linear tolerance used while meshing exact BRep evidence
1611
+ meshLinearTolerance?: number
1612
+
1613
+ // Angular tolerance in degrees used while meshing exact BRep evidence
1614
+ meshAngularToleranceDegrees?: number
1615
+
1616
+ // Options accepted by {@link import ('./load-model.js').loadModel}
1617
+ LoadModelOptions: LoadModelSourceOptions | LoadModelCodeOptions<Code> | LoadModelFileOptions
1618
+
1619
+ // Geometry format to export
1620
+ format?: GeoSpecModelFormat
1621
+
1622
+ // Explicit parameters passed to the runtime
1623
+ parameters?: Record<string, unknown>
1624
+
1625
+ // STEP reader strategy used for STEP exports
1626
+ stepStreaming?: StepStreamingMode
1627
+
1628
+ // Whether STEP loading should also produce mesh evidence
1629
+ mesh?: boolean
1630
+
1631
+ // Linear tolerance used while meshing exact BRep evidence
1632
+ meshLinearTolerance?: number
1633
+
1634
+ // Angular tolerance in degrees used while meshing exact BRep evidence
1635
+ meshAngularToleranceDegrees?: number
1636
+
1637
+ // Direct geometry-source model load options
1638
+ LoadModelSourceOptions: {
1639
+ /** Geometry bytes, path, browser file/blob, or in-memory mesh buffer. */
1640
+ source: MeshSource | StepSource;
1641
+ /** Named external resources consumed alongside the direct geometry bytes. */
1642
+ resources?: ReadonlyArray<{
1643
+ readonly name: string;
1644
+ readonly source: MeshSource | StepSource;
1645
+ }>;
1646
+ /** Source geometry format. Defaults to `glb`. */
1647
+ format?: GeoSpecModelFormat;
1648
+ /** Source path recorded in provenance. */
1649
+ path?: string;
1650
+ /** Human-readable source name recorded in provenance. */
1651
+ name?: string;
1652
+ /** Coordinate unit of raw GLB/glTF or mesh-buffer data before canonical millimetre normalization. */
1653
+ sourceUnit?: GeoSpecUnit;
1654
+ /** Explicit parameters recorded in provenance. */
1655
+ parameters?: Record<string, unknown>;
1656
+ /** STEP reader strategy used for STEP sources. */
1657
+ stepStreaming?: StepStreamingMode;
1658
+ /** Whether STEP loading should also produce mesh evidence. Defaults to true. */
1659
+ mesh?: boolean;
1660
+ /** Linear tolerance used while meshing exact BRep evidence. */
1661
+ meshLinearTolerance?: number;
1662
+ /** Angular tolerance in degrees used while meshing exact BRep evidence. */
1663
+ meshAngularToleranceDegrees?: number;
1664
+ }
1665
+
1666
+ // Geometry bytes, path, browser file/blob, or in-memory mesh buffer
1667
+ source: MeshSource | StepSource
1668
+
1669
+ // Named external resources consumed alongside the direct geometry bytes
1670
+ resources?: ReadonlyArray<{
1671
+ readonly name: string;
1672
+ readonly source: MeshSource | StepSource;
1673
+ }>
1674
+
1675
+ // Source geometry format
1676
+ format?: GeoSpecModelFormat
1677
+
1678
+ // Source path recorded in provenance
1679
+ path?: string
1680
+
1681
+ // Human-readable source name recorded in provenance
1682
+ name?: string
1683
+
1684
+ // Coordinate unit of raw GLB/glTF or mesh-buffer data before canonical millimetre normalization
1685
+ sourceUnit?: GeoSpecUnit
1686
+
1687
+ // Explicit parameters recorded in provenance
1688
+ parameters?: Record<string, unknown>
1689
+
1690
+ // STEP reader strategy used for STEP sources
1691
+ stepStreaming?: StepStreamingMode
1692
+
1693
+ // Whether STEP loading should also produce mesh evidence
1694
+ mesh?: boolean
1695
+
1696
+ // Linear tolerance used while meshing exact BRep evidence
1697
+ meshLinearTolerance?: number
1698
+
1699
+ // Angular tolerance in degrees used while meshing exact BRep evidence
1700
+ meshAngularToleranceDegrees?: number