@metamesh/modeling 0.17.0 → 0.19.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 (832) hide show
  1. package/CHANGELOG.md +186 -0
  2. package/README.md +147 -157
  3. package/dist/api/engine.d.ts +106 -83
  4. package/dist/api/export-3mf.d.ts +2 -0
  5. package/dist/api/export-glb.d.ts +2 -0
  6. package/dist/api/export-stl.d.ts +2 -0
  7. package/dist/api/export.d.ts +160 -0
  8. package/dist/api/geometry.d.ts +250 -461
  9. package/dist/api/index.d.ts +470 -445
  10. package/dist/api/mesh.d.ts +489 -0
  11. package/dist/api/text.d.ts +1 -1
  12. package/dist/docs/guides/concepts.md +32 -495
  13. package/dist/docs/guides/fonts.md +14 -13
  14. package/dist/docs/guides/fundamentals.md +30 -29
  15. package/dist/docs/guides/generation.md +84 -64
  16. package/dist/docs/guides/geometry-values.md +193 -0
  17. package/dist/docs/guides/hosting.md +147 -48
  18. package/dist/docs/guides/profiles-and-extrusion.md +252 -0
  19. package/dist/docs/guides/recipes.md +33 -769
  20. package/dist/docs/guides/resolution-and-inspection.md +133 -0
  21. package/dist/docs/guides/solid-joins.md +126 -0
  22. package/dist/docs/guides/standalone-model.md +8 -7
  23. package/dist/docs/guides/svg-and-text.md +215 -0
  24. package/dist/docs/guides/sweeps-and-lofts.md +179 -0
  25. package/dist/docs/guides/transforms-and-placement.md +313 -0
  26. package/dist/docs/manifest.json +3224 -4430
  27. package/dist/docs/reference/engine/GenerationOptions.md +12 -5
  28. package/dist/docs/reference/engine/GeometryResource.md +19 -13
  29. package/dist/docs/reference/engine/ModelDependencies.md +9 -3
  30. package/dist/docs/reference/engine/ModelEngine.md +33 -24
  31. package/dist/docs/reference/engine/ModelEngineOptions.md +13 -2
  32. package/dist/docs/reference/engine/ModelPart.md +114 -0
  33. package/dist/docs/reference/engine/ModelResult.md +181 -0
  34. package/dist/docs/reference/engine/ModelRunArguments.md +34 -0
  35. package/dist/docs/reference/engine/ModelRunOptions.md +110 -0
  36. package/dist/docs/reference/engine/ModelSession.md +22 -16
  37. package/dist/docs/reference/engine/SessionOptions.md +21 -10
  38. package/dist/docs/reference/engine/categories/host-lifecycle.md +20 -15
  39. package/dist/docs/reference/engine/checkModel.md +49 -0
  40. package/dist/docs/reference/engine/createModelEngine.md +11 -13
  41. package/dist/docs/reference/engine/defaultModelingLimits.md +15 -2
  42. package/dist/docs/reference/engine/modelingWasmUrl.md +7 -1
  43. package/dist/docs/reference/engine.md +8 -15
  44. package/dist/docs/reference/export/Export3mfOptions.md +24 -0
  45. package/dist/docs/reference/export/ExportDiagnostic.md +59 -0
  46. package/dist/docs/reference/export/ExportFormat.md +25 -0
  47. package/dist/docs/reference/export/ExportGeometry.md +39 -0
  48. package/dist/docs/reference/export/ExportGlbOptions.md +118 -0
  49. package/dist/docs/reference/export/ExportLimits.md +83 -0
  50. package/dist/docs/reference/export/ExportMaterial.md +47 -0
  51. package/dist/docs/reference/export/ExportOptions.md +94 -0
  52. package/dist/docs/reference/export/ExportPart.md +88 -0
  53. package/dist/docs/reference/export/ExportReport.md +82 -0
  54. package/dist/docs/reference/export/ExportSink.md +39 -0
  55. package/dist/docs/reference/export/ExportStlOptions.md +24 -0
  56. package/dist/docs/reference/export/ExportedFile.md +110 -0
  57. package/dist/docs/reference/export/categories/mesh-serialization.md +47 -0
  58. package/dist/docs/reference/export/defaultExportLimits.md +20 -0
  59. package/dist/docs/reference/export/export3mf.md +64 -0
  60. package/dist/docs/reference/export/exportGlb.md +68 -0
  61. package/dist/docs/reference/export/exportStl.md +64 -0
  62. package/dist/docs/reference/export/write3mf.md +71 -0
  63. package/dist/docs/reference/export/writeGlb.md +75 -0
  64. package/dist/docs/reference/export/writeStl.md +71 -0
  65. package/dist/docs/reference/export.md +21 -0
  66. package/dist/docs/reference/geometry/AcmeThreadProfileSpec.md +16 -2
  67. package/dist/docs/reference/geometry/AlignedCircularSegmentsOptions.md +7 -1
  68. package/dist/docs/reference/geometry/Anchor3-type.md +13 -3
  69. package/dist/docs/reference/geometry/ArcCurve2.md +8 -2
  70. package/dist/docs/reference/geometry/ArcCurve3.md +8 -2
  71. package/dist/docs/reference/geometry/AttachOptions.md +13 -3
  72. package/dist/docs/reference/geometry/AxisAngleRotation3.md +9 -3
  73. package/dist/docs/reference/geometry/Bevel.md +32 -0
  74. package/dist/docs/reference/geometry/BevelSize.md +28 -0
  75. package/dist/docs/reference/geometry/Bounds2-type.md +18 -4
  76. package/dist/docs/reference/geometry/Bounds2Data.md +22 -4
  77. package/dist/docs/reference/geometry/Bounds2Input.md +18 -4
  78. package/dist/docs/reference/geometry/Bounds2Options.md +61 -11
  79. package/dist/docs/reference/geometry/Bounds3-type.md +18 -4
  80. package/dist/docs/reference/geometry/Bounds3Data.md +18 -4
  81. package/dist/docs/reference/geometry/Bounds3Input.md +18 -4
  82. package/dist/docs/reference/geometry/Bounds3Options.md +61 -11
  83. package/dist/docs/reference/geometry/BoundsFit2.md +10 -4
  84. package/dist/docs/reference/geometry/BoundsFit3.md +10 -4
  85. package/dist/docs/reference/geometry/BoundsFitOptions.md +10 -4
  86. package/dist/docs/reference/geometry/BoxAnchorFace.md +9 -3
  87. package/dist/docs/reference/geometry/BoxAnchorOptions.md +12 -6
  88. package/dist/docs/reference/geometry/BoxEdge.md +11 -1
  89. package/dist/docs/reference/geometry/BoxEdgeSelection.md +11 -1
  90. package/dist/docs/reference/geometry/BoxEdgeTreatments.md +11 -1
  91. package/dist/docs/reference/geometry/BoxOptions.md +13 -3
  92. package/dist/docs/reference/geometry/ButtressPressureFlankSide.md +16 -2
  93. package/dist/docs/reference/geometry/ButtressThreadProfileSpec.md +16 -2
  94. package/dist/docs/reference/geometry/ChamferedEdgeTreatment.md +11 -1
  95. package/dist/docs/reference/geometry/CircleContourOptions.md +12 -2
  96. package/dist/docs/reference/geometry/CircularPrimitiveOptions.md +15 -3
  97. package/dist/docs/reference/geometry/CircularResolutionOptions.md +7 -1
  98. package/dist/docs/reference/geometry/CircularSampling.md +7 -1
  99. package/dist/docs/reference/geometry/CircularSamplingOptions.md +7 -1
  100. package/dist/docs/reference/geometry/ClearanceHoleDimensions.md +8 -2
  101. package/dist/docs/reference/geometry/ClearanceHoleFit.md +8 -2
  102. package/dist/docs/reference/geometry/CompensatedThreadDiameters.md +8 -2
  103. package/dist/docs/reference/geometry/Contour.md +12 -2
  104. package/dist/docs/reference/geometry/ContourCurve.md +8 -2
  105. package/dist/docs/reference/geometry/ContourPoint.md +8 -2
  106. package/dist/docs/reference/geometry/ContourSegment.md +8 -2
  107. package/dist/docs/reference/geometry/CorrespondingComponent.md +12 -2
  108. package/dist/docs/reference/geometry/CorrespondingContour.md +12 -2
  109. package/dist/docs/reference/geometry/CorrespondingProfile.md +12 -2
  110. package/dist/docs/reference/geometry/CorrespondingProfileStation.md +12 -2
  111. package/dist/docs/reference/geometry/CubicBezierCurve2.md +8 -2
  112. package/dist/docs/reference/geometry/CubicBezierCurve3.md +8 -2
  113. package/dist/docs/reference/geometry/Curve2.md +8 -2
  114. package/dist/docs/reference/geometry/Curve3.md +8 -2
  115. package/dist/docs/reference/geometry/CurveSamplingOptions.md +16 -2
  116. package/dist/docs/reference/geometry/CustomThreadProfileSpec.md +16 -2
  117. package/dist/docs/reference/geometry/CylinderAnchorFace.md +9 -3
  118. package/dist/docs/reference/geometry/CylinderAnchorOptions.md +11 -5
  119. package/dist/docs/reference/geometry/CylinderOptions.md +11 -1
  120. package/dist/docs/reference/geometry/CylindricalGearDimensions.md +8 -2
  121. package/dist/docs/reference/geometry/CylindricalGearMeshKind.md +8 -2
  122. package/dist/docs/reference/geometry/CylindricalGearOutlineOptions.md +8 -2
  123. package/dist/docs/reference/geometry/CylindricalGearPairDimensions.md +8 -2
  124. package/dist/docs/reference/geometry/CylindricalGearPairMotionOptions.md +8 -2
  125. package/dist/docs/reference/geometry/CylindricalGearPairMotionReport.md +8 -2
  126. package/dist/docs/reference/geometry/CylindricalGearPairSpec.md +8 -2
  127. package/dist/docs/reference/geometry/CylindricalGearSpec.md +8 -2
  128. package/dist/docs/reference/geometry/DEFAULT_GEOMETRY_TOLERANCE.md +7 -1
  129. package/dist/docs/reference/geometry/EdgeTreatment.md +11 -1
  130. package/dist/docs/reference/geometry/EllipseContourOptions.md +14 -4
  131. package/dist/docs/reference/geometry/EndTreatments.md +12 -2
  132. package/dist/docs/reference/{model/ExtrudeOptions.md → geometry/ExtrudeMeshOptions.md} +30 -26
  133. package/dist/docs/reference/geometry/ExtrudeOptions.md +29 -11
  134. package/dist/docs/reference/geometry/ExtrusionSamplingOptions.md +18 -4
  135. package/dist/docs/reference/geometry/FittedTextLayout.md +8 -2
  136. package/dist/docs/reference/geometry/Frame3.md +16 -2
  137. package/dist/docs/reference/geometry/GeometryError.md +11 -1
  138. package/dist/docs/reference/geometry/GeometryErrorCode.md +11 -1
  139. package/dist/docs/reference/geometry/GeometryErrorContext.md +11 -1
  140. package/dist/docs/reference/geometry/GeometryResolution.md +15 -1
  141. package/dist/docs/reference/geometry/GeometrySamplingLimits.md +16 -2
  142. package/dist/docs/reference/geometry/GeometryToleranceOptions.md +15 -1
  143. package/dist/docs/reference/geometry/GridPatternOptions.md +12 -2
  144. package/dist/docs/reference/geometry/HeightfieldMeshLimits.md +12 -2
  145. package/dist/docs/reference/geometry/HeightfieldOptions.md +18 -3
  146. package/dist/docs/reference/geometry/HeightfieldPreflight.md +12 -2
  147. package/dist/docs/reference/geometry/IDENTITY_TRANSFORM3.md +9 -3
  148. package/dist/docs/reference/geometry/ImmutableBuffer-type.md +110 -0
  149. package/dist/docs/reference/geometry/ImmutableTriangleMesh.md +57 -0
  150. package/dist/docs/reference/geometry/InternalThreadCutterOptions.md +63 -84
  151. package/dist/docs/reference/geometry/KnuckleHingeBaseSpec.md +12 -2
  152. package/dist/docs/reference/geometry/KnuckleHingeDimensions.md +8 -2
  153. package/dist/docs/reference/geometry/KnuckleHingeInterval.md +8 -2
  154. package/dist/docs/reference/geometry/KnuckleHingeSamplingOptions.md +12 -2
  155. package/dist/docs/reference/geometry/KnuckleHingeSpec.md +12 -2
  156. package/dist/docs/reference/geometry/LineCurve2.md +8 -2
  157. package/dist/docs/reference/geometry/LineCurve3.md +8 -2
  158. package/dist/docs/reference/geometry/LinearPatternOptions.md +12 -2
  159. package/dist/docs/reference/geometry/LoftCorrespondence.md +16 -2
  160. package/dist/docs/reference/geometry/LoftMeshStation.md +12 -2
  161. package/dist/docs/reference/geometry/LoftOptions.md +18 -4
  162. package/dist/docs/reference/geometry/LoftPlacement.md +16 -2
  163. package/dist/docs/reference/geometry/METRIC_FASTENER_STANDARDS.md +8 -2
  164. package/dist/docs/reference/geometry/MatchProfilesOptions.md +12 -2
  165. package/dist/docs/reference/geometry/MetricFastenerSize.md +8 -2
  166. package/dist/docs/reference/geometry/MetricFastenerStandard.md +8 -2
  167. package/dist/docs/reference/geometry/MetricHexNutDimensions.md +8 -2
  168. package/dist/docs/reference/geometry/MetricSocketCapHeadDimensions.md +8 -2
  169. package/dist/docs/reference/geometry/ModelingLimits.md +19 -1
  170. package/dist/docs/reference/geometry/NumericArray.md +28 -0
  171. package/dist/docs/reference/geometry/PRINTABLE_THREAD_FIT_POLICIES.md +8 -2
  172. package/dist/docs/reference/geometry/Path2-type.md +16 -2
  173. package/dist/docs/reference/geometry/Path2Data.md +16 -2
  174. package/dist/docs/reference/geometry/Path2Input.md +16 -2
  175. package/dist/docs/reference/geometry/Path3-type.md +16 -2
  176. package/dist/docs/reference/geometry/Path3Data.md +16 -2
  177. package/dist/docs/reference/geometry/Path3Input.md +16 -2
  178. package/dist/docs/reference/geometry/PathFrame.md +8 -2
  179. package/dist/docs/reference/geometry/PathLocation.md +16 -2
  180. package/dist/docs/reference/geometry/PathNormalGuide.md +16 -2
  181. package/dist/docs/reference/geometry/PathOptions.md +12 -2
  182. package/dist/docs/reference/geometry/PathPatternOptions.md +12 -2
  183. package/dist/docs/reference/geometry/PathPlacement.md +8 -2
  184. package/dist/docs/reference/geometry/PathResamplingOptions.md +16 -2
  185. package/dist/docs/reference/geometry/Pivot2Options.md +17 -3
  186. package/dist/docs/reference/geometry/Pivot3Options.md +17 -3
  187. package/dist/docs/reference/geometry/PlanarMeshOptimizationFallbackReason.md +12 -2
  188. package/dist/docs/reference/geometry/PlanarMeshOptimizationOptions.md +12 -2
  189. package/dist/docs/reference/geometry/PlanarMeshOptimizationResult.md +12 -2
  190. package/dist/docs/reference/geometry/PlanarPatchQuality.md +12 -2
  191. package/dist/docs/reference/geometry/PolygonData.md +12 -2
  192. package/dist/docs/reference/geometry/PolylineResamplingOptions.md +8 -2
  193. package/dist/docs/reference/geometry/PrimitiveAttachment.md +11 -3
  194. package/dist/docs/reference/geometry/PrimitiveAttachmentOptions.md +11 -1
  195. package/dist/docs/reference/geometry/PrintableThreadFit.md +12 -2
  196. package/dist/docs/reference/geometry/PrintableThreadFitPolicy.md +12 -2
  197. package/dist/docs/reference/geometry/Profile.md +8 -2
  198. package/dist/docs/reference/geometry/ProfileComponent2.md +12 -2
  199. package/dist/docs/reference/geometry/ProfileContour2.md +12 -2
  200. package/dist/docs/reference/geometry/ProfileSpan2.md +12 -2
  201. package/dist/docs/reference/geometry/ProfiledEdgeTreatment.md +11 -1
  202. package/dist/docs/reference/geometry/RackPitchDimensions.md +8 -2
  203. package/dist/docs/reference/geometry/RackPitchSpec.md +8 -2
  204. package/dist/docs/reference/geometry/RadialPatternOptions.md +12 -2
  205. package/dist/docs/reference/geometry/RadialSizing.md +11 -1
  206. package/dist/docs/reference/geometry/RadialSizingOptions.md +11 -1
  207. package/dist/docs/reference/geometry/RectangleContourOptions.md +14 -4
  208. package/dist/docs/reference/geometry/RectangleCornerTreatment.md +12 -2
  209. package/dist/docs/reference/geometry/RectangleCornerTreatments.md +12 -2
  210. package/dist/docs/reference/geometry/RectangleProfileOptions.md +10 -4
  211. package/dist/docs/reference/geometry/RegionData.md +12 -2
  212. package/dist/docs/reference/geometry/RegularPolygonContourOptions.md +8 -2
  213. package/dist/docs/reference/geometry/ResolvedGeometryTolerance.md +7 -1
  214. package/dist/docs/reference/geometry/RevolveOptions.md +17 -3
  215. package/dist/docs/reference/geometry/RoundedEdgeTreatment.md +11 -1
  216. package/dist/docs/reference/geometry/RowLayoutOptions.md +10 -4
  217. package/dist/docs/reference/geometry/SampleContourOptions.md +8 -2
  218. package/dist/docs/reference/geometry/SampleHelixOptions.md +8 -2
  219. package/dist/docs/reference/geometry/SampleSideProfileOptions.md +8 -2
  220. package/dist/docs/reference/geometry/SampledCurve2.md +8 -2
  221. package/dist/docs/reference/geometry/SampledCurve3.md +8 -2
  222. package/dist/docs/reference/geometry/SampledThreadHelices.md +8 -2
  223. package/dist/docs/reference/geometry/SideProfileCurve.md +8 -2
  224. package/dist/docs/reference/geometry/SideProfilePoint.md +8 -2
  225. package/dist/docs/reference/geometry/SideProfileSegment.md +8 -2
  226. package/dist/docs/reference/geometry/SmoothEdgeTreatment.md +11 -1
  227. package/dist/docs/reference/geometry/SolidMeshValidationOptions.md +12 -2
  228. package/dist/docs/reference/geometry/SphereOptions.md +11 -1
  229. package/dist/docs/reference/geometry/SquareThreadProfileSpec.md +16 -2
  230. package/dist/docs/reference/geometry/StarContourOptions.md +84 -0
  231. package/dist/docs/reference/geometry/StrokeCap.md +12 -2
  232. package/dist/docs/reference/geometry/StrokeJoin.md +12 -2
  233. package/dist/docs/reference/geometry/StrokeOptions.md +12 -2
  234. package/dist/docs/reference/geometry/SvgImportOptions.md +8 -2
  235. package/dist/docs/reference/geometry/SvgRegionPreflight.md +8 -2
  236. package/dist/docs/reference/geometry/SvgRegionPreflightGeometryMetrics.md +8 -2
  237. package/dist/docs/reference/geometry/SvgRegionPreflightRepairs.md +8 -2
  238. package/dist/docs/reference/geometry/SvgRegionPreflightSourceMetrics.md +8 -2
  239. package/dist/docs/reference/geometry/SweepOptions.md +16 -2
  240. package/dist/docs/reference/geometry/SweepOrientation.md +16 -2
  241. package/dist/docs/reference/geometry/ThreadBevelOptions.md +18 -31
  242. package/dist/docs/reference/geometry/ThreadCircularSegmentsOptions.md +8 -2
  243. package/dist/docs/reference/geometry/ThreadCompensationOptions.md +8 -2
  244. package/dist/docs/reference/geometry/ThreadEndStyle.md +16 -2
  245. package/dist/docs/reference/geometry/ThreadEndTreatmentOptions.md +16 -2
  246. package/dist/docs/reference/geometry/ThreadHandedness.md +16 -2
  247. package/dist/docs/reference/geometry/ThreadHelixOptions.md +8 -2
  248. package/dist/docs/reference/geometry/ThreadLeadInEnvelope.md +16 -2
  249. package/dist/docs/reference/geometry/ThreadLeadInShape.md +16 -2
  250. package/dist/docs/reference/geometry/ThreadProfile-type.md +17 -3
  251. package/dist/docs/reference/geometry/ThreadProfileBaseSpec.md +16 -2
  252. package/dist/docs/reference/geometry/ThreadProfileSpec.md +16 -2
  253. package/dist/docs/reference/geometry/{HelicalThreadRidgeMeshOptions.md → ThreadRidgeOptions.md} +19 -5
  254. package/dist/docs/reference/geometry/ThreadRole.md +8 -2
  255. package/dist/docs/reference/geometry/{HelicalThreadSolidMeshOptions.md → ThreadSolidOptions.md} +29 -66
  256. package/dist/docs/reference/geometry/{HelicalThreadSolidMeshPreflight.md → ThreadSolidPreflight.md} +17 -3
  257. package/dist/docs/reference/geometry/ThreadedNutOptions.md +86 -87
  258. package/dist/docs/reference/geometry/ThreadedNutPreflight.md +29 -7
  259. package/dist/docs/reference/geometry/ThreadedNutShape.md +12 -2
  260. package/dist/docs/reference/geometry/ThreadedRodOptions.md +63 -84
  261. package/dist/docs/reference/geometry/TorusOptions.md +11 -1
  262. package/dist/docs/reference/geometry/Transform2-type.md +17 -3
  263. package/dist/docs/reference/geometry/Transform2Data.md +17 -3
  264. package/dist/docs/reference/geometry/Transform2Input.md +17 -3
  265. package/dist/docs/reference/geometry/Transform3-type.md +17 -3
  266. package/dist/docs/reference/geometry/Transform3Data.md +17 -3
  267. package/dist/docs/reference/geometry/Transform3Input.md +17 -3
  268. package/dist/docs/reference/geometry/TrapezoidalThreadProfileSpec.md +16 -2
  269. package/dist/docs/reference/geometry/TriangleMesh.md +19 -6
  270. package/dist/docs/reference/geometry/TriangleMeshAnalysis.md +25 -5
  271. package/dist/docs/reference/geometry/TriangleMeshAnalysisOptions.md +13 -3
  272. package/dist/docs/reference/geometry/TriangleMeshInput.md +29 -0
  273. package/dist/docs/reference/geometry/TriangleMeshMeasurements.md +16 -2
  274. package/dist/docs/reference/geometry/TriangleMeshQualityOptions.md +12 -2
  275. package/dist/docs/reference/geometry/TriangleMeshQualityReport.md +12 -2
  276. package/dist/docs/reference/geometry/TriangleMeshSignature.md +14 -4
  277. package/dist/docs/reference/geometry/TriangleMeshSignatureOptions.md +12 -2
  278. package/dist/docs/reference/geometry/TriangleMeshSignatureTolerances.md +12 -2
  279. package/dist/docs/reference/geometry/TriangleMeshTopologyAnalysis.md +145 -0
  280. package/dist/docs/reference/geometry/TriangleMeshValidationOptions.md +12 -2
  281. package/dist/docs/reference/geometry/TriangularThreadProfileSpec.md +16 -2
  282. package/dist/docs/reference/geometry/TubeOptions.md +20 -86
  283. package/dist/docs/reference/geometry/Vector2-type.md +17 -3
  284. package/dist/docs/reference/geometry/Vector2Data.md +21 -3
  285. package/dist/docs/reference/geometry/Vector2Input.md +17 -3
  286. package/dist/docs/reference/geometry/Vector3-type.md +17 -3
  287. package/dist/docs/reference/geometry/Vector3Data.md +17 -3
  288. package/dist/docs/reference/geometry/Vector3Input.md +17 -3
  289. package/dist/docs/reference/geometry/VectorTextArcBaseline.md +12 -2
  290. package/dist/docs/reference/geometry/VectorTextLayout.md +16 -2
  291. package/dist/docs/reference/geometry/VectorTextLayoutOptions.md +14 -4
  292. package/dist/docs/reference/geometry/VectorTextMetrics.md +16 -2
  293. package/dist/docs/reference/geometry/VectorTextOptions.md +12 -2
  294. package/dist/docs/reference/geometry/add2.md +9 -3
  295. package/dist/docs/reference/geometry/add3.md +9 -3
  296. package/dist/docs/reference/geometry/anchor3.md +9 -3
  297. package/dist/docs/reference/geometry/anchorFrame3.md +8 -2
  298. package/dist/docs/reference/geometry/applyTransformDirection3.md +9 -3
  299. package/dist/docs/reference/geometry/applyTransformPoint3.md +9 -3
  300. package/dist/docs/reference/geometry/attachmentTransform3.md +9 -3
  301. package/dist/docs/reference/geometry/bounds2.md +18 -8
  302. package/dist/docs/reference/geometry/bounds3.md +18 -8
  303. package/dist/docs/reference/geometry/boundsCenter.md +10 -4
  304. package/dist/docs/reference/geometry/boundsSize.md +10 -4
  305. package/dist/docs/reference/geometry/boxAnchor3.md +11 -5
  306. package/dist/docs/reference/geometry/categories/bounds-layout.md +6 -6
  307. package/dist/docs/reference/geometry/categories/curves-paths.md +3 -3
  308. package/dist/docs/reference/geometry/categories/mechanical.md +9 -11
  309. package/dist/docs/reference/geometry/categories/meshes.md +20 -33
  310. package/dist/docs/reference/geometry/categories/pattern-placement.md +3 -3
  311. package/dist/docs/reference/geometry/categories/primitive-options.md +4 -4
  312. package/dist/docs/reference/geometry/categories/profiles-regions.md +6 -5
  313. package/dist/docs/reference/geometry/categories/resolution-errors.md +3 -3
  314. package/dist/docs/reference/geometry/categories/transforms-math.md +5 -4
  315. package/dist/docs/reference/geometry/categories/vector-import.md +4 -4
  316. package/dist/docs/reference/geometry/circleContour.md +8 -2
  317. package/dist/docs/reference/geometry/closeToAxis.md +8 -2
  318. package/dist/docs/reference/geometry/compensateThreadDiameters.md +8 -2
  319. package/dist/docs/reference/geometry/compensateThreadProfileAxially.md +8 -2
  320. package/dist/docs/reference/geometry/compensateThreadProfileForFaceting.md +8 -2
  321. package/dist/docs/reference/geometry/composeTransform3.md +9 -3
  322. package/dist/docs/reference/geometry/computeClosedParallelTransportFrames.md +8 -2
  323. package/dist/docs/reference/geometry/computeParallelTransportFrames.md +8 -2
  324. package/dist/docs/reference/geometry/contourContainsPoint.md +8 -2
  325. package/dist/docs/reference/geometry/cross2.md +9 -3
  326. package/dist/docs/reference/geometry/cross3.md +9 -3
  327. package/dist/docs/reference/geometry/cylinderAnchor3.md +10 -4
  328. package/dist/docs/reference/geometry/defaultGeometrySamplingLimits.md +8 -2
  329. package/dist/docs/reference/geometry/distance2.md +9 -3
  330. package/dist/docs/reference/geometry/distance3.md +9 -3
  331. package/dist/docs/reference/geometry/distributeAlongPath.md +8 -2
  332. package/dist/docs/reference/geometry/dot2.md +9 -3
  333. package/dist/docs/reference/geometry/dot3.md +9 -3
  334. package/dist/docs/reference/geometry/ellipseContour.md +8 -2
  335. package/dist/docs/reference/geometry/eulerTransform3.md +9 -3
  336. package/dist/docs/reference/geometry/fitBounds.md +10 -4
  337. package/dist/docs/reference/geometry/fitTextLayout.md +8 -2
  338. package/dist/docs/reference/geometry/frameTransform3.md +9 -3
  339. package/dist/docs/reference/geometry/getMetricClearanceHoleDiameter.md +8 -2
  340. package/dist/docs/reference/geometry/getMetricFastenerStandard.md +8 -2
  341. package/dist/docs/reference/geometry/gridPatternTransforms.md +8 -2
  342. package/dist/docs/reference/{model → geometry}/immutableBuffer.md +13 -2
  343. package/dist/docs/reference/geometry/inverseTransform3.md +9 -3
  344. package/dist/docs/reference/geometry/isGeometryError.md +11 -1
  345. package/dist/docs/reference/geometry/layoutRow.md +10 -4
  346. package/dist/docs/reference/geometry/length2.md +9 -3
  347. package/dist/docs/reference/geometry/length3.md +9 -3
  348. package/dist/docs/reference/geometry/lerp2.md +9 -3
  349. package/dist/docs/reference/geometry/lerp3.md +9 -3
  350. package/dist/docs/reference/geometry/linearPatternTransforms.md +8 -2
  351. package/dist/docs/reference/geometry/matchProfiles.md +8 -2
  352. package/dist/docs/reference/geometry/measureInternalCylindricalGearPairMotion.md +8 -2
  353. package/dist/docs/reference/geometry/minimumCylindricalGearToothCountWithoutUndercut.md +8 -2
  354. package/dist/docs/reference/geometry/normalize2.md +9 -3
  355. package/dist/docs/reference/geometry/normalize3.md +9 -3
  356. package/dist/docs/reference/geometry/normalizeContour.md +8 -2
  357. package/dist/docs/reference/geometry/normalizePolygon.md +8 -2
  358. package/dist/docs/reference/geometry/normalizeRegion.md +8 -2
  359. package/dist/docs/reference/geometry/path2.md +12 -2
  360. package/dist/docs/reference/geometry/path3.md +12 -2
  361. package/dist/docs/reference/geometry/pathPatternTransforms.md +8 -2
  362. package/dist/docs/reference/geometry/preflightInternalThreadCutter.md +25 -26
  363. package/dist/docs/reference/geometry/preflightSvgRegion.md +8 -2
  364. package/dist/docs/reference/geometry/preflightThreadedNut.md +31 -27
  365. package/dist/docs/reference/geometry/preflightThreadedRod.md +25 -26
  366. package/dist/docs/reference/geometry/projectOntoPlane3.md +9 -3
  367. package/dist/docs/reference/geometry/radialPatternTransforms.md +8 -2
  368. package/dist/docs/reference/geometry/rectangleContour.md +17 -6
  369. package/dist/docs/reference/geometry/rectangleProfile.md +9 -3
  370. package/dist/docs/reference/geometry/regionArea.md +8 -2
  371. package/dist/docs/reference/geometry/regionBounds.md +8 -2
  372. package/dist/docs/reference/geometry/regularPolygonContour.md +9 -3
  373. package/dist/docs/reference/geometry/resamplePolyline2.md +8 -2
  374. package/dist/docs/reference/geometry/resamplePolyline3.md +8 -2
  375. package/dist/docs/reference/geometry/resolveAlignedCircularSegments.md +7 -1
  376. package/dist/docs/reference/geometry/resolveArcSegments.md +7 -1
  377. package/dist/docs/reference/geometry/resolveCircularSampling.md +7 -1
  378. package/dist/docs/reference/geometry/resolveCircularSegments.md +7 -1
  379. package/dist/docs/reference/geometry/resolveCylindricalGear.md +8 -2
  380. package/dist/docs/reference/geometry/resolveCylindricalGearPair.md +8 -2
  381. package/dist/docs/reference/geometry/resolveExtrusionDivisions.md +8 -2
  382. package/dist/docs/reference/geometry/resolveGeometrySamplingLimits.md +8 -2
  383. package/dist/docs/reference/geometry/resolveGeometryTolerance.md +7 -1
  384. package/dist/docs/reference/geometry/resolveKnuckleHinge.md +8 -2
  385. package/dist/docs/reference/geometry/resolvePrintableThreadFitPolicy.md +8 -2
  386. package/dist/docs/reference/geometry/resolveRackPitch.md +8 -2
  387. package/dist/docs/reference/geometry/resolveThreadCircularSegments.md +8 -2
  388. package/dist/docs/reference/geometry/rotate2.md +9 -3
  389. package/dist/docs/reference/geometry/rotationTransform3.md +9 -3
  390. package/dist/docs/reference/geometry/roundClosedPolylinePath.md +8 -2
  391. package/dist/docs/reference/geometry/sampleContour.md +8 -2
  392. package/dist/docs/reference/geometry/sampleCurve2.md +8 -2
  393. package/dist/docs/reference/geometry/sampleCurve3.md +8 -2
  394. package/dist/docs/reference/geometry/sampleCylindricalGearOutline.md +8 -2
  395. package/dist/docs/reference/geometry/sampleHelix.md +8 -2
  396. package/dist/docs/reference/geometry/sampleInternalCylindricalGearSpaceOutline.md +8 -2
  397. package/dist/docs/reference/geometry/sampleRackToothPath.md +8 -2
  398. package/dist/docs/reference/geometry/sampleSideProfile.md +8 -2
  399. package/dist/docs/reference/geometry/sampleTextContours.md +8 -2
  400. package/dist/docs/reference/geometry/sampleThreadHelices.md +8 -2
  401. package/dist/docs/reference/geometry/scale2.md +9 -3
  402. package/dist/docs/reference/geometry/scale3.md +9 -3
  403. package/dist/docs/reference/geometry/scaleTransform3.md +9 -3
  404. package/dist/docs/reference/geometry/signedContourArea.md +8 -2
  405. package/dist/docs/reference/geometry/starContour.md +24 -16
  406. package/dist/docs/reference/geometry/strokeRegionData.md +8 -2
  407. package/dist/docs/reference/geometry/subtract2.md +9 -3
  408. package/dist/docs/reference/geometry/subtract3.md +9 -3
  409. package/dist/docs/reference/geometry/threadProfile.md +8 -2
  410. package/dist/docs/reference/geometry/transform2.md +13 -3
  411. package/dist/docs/reference/geometry/transform3.md +13 -3
  412. package/dist/docs/reference/geometry/transformDeterminant3.md +9 -3
  413. package/dist/docs/reference/geometry/transformRegionData.md +8 -2
  414. package/dist/docs/reference/geometry/translationTransform3.md +9 -3
  415. package/dist/docs/reference/geometry/triangulateContour.md +8 -2
  416. package/dist/docs/reference/geometry/validateRigidTransform3.md +41 -0
  417. package/dist/docs/reference/geometry/validateTransform3.md +9 -3
  418. package/dist/docs/reference/geometry/vector2.md +13 -3
  419. package/dist/docs/reference/geometry/vector3.md +13 -3
  420. package/dist/docs/reference/geometry.md +10 -10
  421. package/dist/docs/reference/mesh/MeshRenderOptions.md +28 -0
  422. package/dist/docs/reference/mesh/RenderMesh.md +68 -0
  423. package/dist/docs/reference/mesh/analyze.md +102 -0
  424. package/dist/docs/reference/mesh/analyzeQuality.md +62 -0
  425. package/dist/docs/reference/mesh/bounds.md +45 -0
  426. package/dist/docs/reference/mesh/categories/operations.md +57 -0
  427. package/dist/docs/reference/mesh/centroid.md +45 -0
  428. package/dist/docs/reference/mesh/extrude.md +79 -0
  429. package/dist/docs/reference/mesh/heightfield.md +57 -0
  430. package/dist/docs/reference/mesh/immutable.md +51 -0
  431. package/dist/docs/reference/mesh/join.md +47 -0
  432. package/dist/docs/reference/mesh/loft.md +83 -0
  433. package/dist/docs/reference/mesh/optimizePlanarPatches.md +102 -0
  434. package/dist/docs/reference/mesh/preflightHeightfield.md +48 -0
  435. package/dist/docs/reference/mesh/preflightThreadSolid.md +96 -0
  436. package/dist/docs/reference/mesh/render.md +57 -0
  437. package/dist/docs/reference/mesh/reverse.md +41 -0
  438. package/dist/docs/reference/{geometry/revolveMesh.md → mesh/revolve.md} +23 -17
  439. package/dist/docs/reference/mesh/signature.md +70 -0
  440. package/dist/docs/reference/mesh/sweep.md +92 -0
  441. package/dist/docs/reference/mesh/threadRidge.md +78 -0
  442. package/dist/docs/reference/mesh/threadSolid.md +96 -0
  443. package/dist/docs/reference/mesh/transform.md +53 -0
  444. package/dist/docs/reference/mesh/validate.md +75 -0
  445. package/dist/docs/reference/{geometry/validateSolidMesh.md → mesh/validateSolid.md} +23 -11
  446. package/dist/docs/reference/mesh.md +21 -0
  447. package/dist/docs/reference/model/CircleOptions.md +13 -7
  448. package/dist/docs/reference/model/DiagnosticOptions.md +21 -1
  449. package/dist/docs/reference/model/EllipseOptions.md +13 -7
  450. package/dist/docs/reference/model/GenerateCallback.md +11 -5
  451. package/dist/docs/reference/model/GenerateContext.md +26 -99
  452. package/dist/docs/reference/model/GenerationDiagnostic.md +19 -1
  453. package/dist/docs/reference/model/GenerationError.md +8 -2
  454. package/dist/docs/reference/model/HoleCutterOptions.md +17 -10
  455. package/dist/docs/reference/model/HoleCutterOverrun.md +10 -3
  456. package/dist/docs/reference/model/HoleCutterRecess.md +10 -3
  457. package/dist/docs/reference/model/HullOptions.md +13 -6
  458. package/dist/docs/reference/model/ImmutableValue.md +26 -0
  459. package/dist/docs/reference/model/ImplicitOptions.md +12 -6
  460. package/dist/docs/reference/model/JoinOptions.md +76 -0
  461. package/dist/docs/reference/model/JoinTransition.md +54 -0
  462. package/dist/docs/reference/model/KnuckleHinge-type.md +9 -3
  463. package/dist/docs/reference/model/KnuckleHingeHalfOptions.md +7 -1
  464. package/dist/docs/reference/model/KnuckleHingeOptions.md +10 -4
  465. package/dist/docs/reference/model/KnuckleHingeWeb.md +7 -1
  466. package/dist/docs/reference/model/LoftStation.md +16 -9
  467. package/dist/docs/reference/model/Memo.md +54 -0
  468. package/dist/docs/reference/model/ModelProgram.md +8 -2
  469. package/dist/docs/reference/model/PartDeclaration.md +87 -0
  470. package/dist/docs/reference/model/PartGeometry.md +10 -4
  471. package/dist/docs/reference/model/PartOptions.md +16 -22
  472. package/dist/docs/reference/model/PatternSource.md +10 -4
  473. package/dist/docs/reference/model/PlaneOptions.md +11 -4
  474. package/dist/docs/reference/model/PolygonOptions.md +20 -14
  475. package/dist/docs/reference/model/Profile.md +10 -4
  476. package/dist/docs/reference/model/RectangleOptions.md +28 -22
  477. package/dist/docs/reference/model/RegularPolygonOptions.md +13 -7
  478. package/dist/docs/reference/model/Section.md +196 -77
  479. package/dist/docs/reference/model/SectionHullOptions.md +13 -6
  480. package/dist/docs/reference/model/SectionInspection.md +12 -18
  481. package/dist/docs/reference/model/SectionOffsetJoin.md +10 -4
  482. package/dist/docs/reference/model/SectionOffsetOptions.md +12 -6
  483. package/dist/docs/reference/model/Solid.md +339 -54
  484. package/dist/docs/reference/model/SolidInspection.md +12 -18
  485. package/dist/docs/reference/model/SolidSegmentHit.md +14 -4
  486. package/dist/docs/reference/model/StarOptions.md +53 -25
  487. package/dist/docs/reference/model/SvgOrigin.md +10 -4
  488. package/dist/docs/reference/model/SvgPathSectionOptions.md +14 -8
  489. package/dist/docs/reference/model/SvgSectionOptions.md +16 -10
  490. package/dist/docs/reference/model/TextSectionOptions.md +14 -8
  491. package/dist/docs/reference/model/box.md +18 -11
  492. package/dist/docs/reference/model/categories/boolean-operations.md +13 -11
  493. package/dist/docs/reference/model/categories/bounded-surfaces.md +1 -7
  494. package/dist/docs/reference/model/categories/explicit-profiles.md +1 -14
  495. package/dist/docs/reference/model/categories/extrude-revolve-sweep.md +11 -23
  496. package/dist/docs/reference/model/categories/generation.md +10 -15
  497. package/dist/docs/reference/model/categories/hinges.md +1 -4
  498. package/dist/docs/reference/model/categories/mesh-inspection.md +14 -9
  499. package/dist/docs/reference/model/categories/primitives.md +8 -24
  500. package/dist/docs/reference/model/categories/sections.md +6 -16
  501. package/dist/docs/reference/model/categories/threads.md +3 -30
  502. package/dist/docs/reference/model/categories/transforms-placement.md +5 -35
  503. package/dist/docs/reference/model/circle.md +10 -4
  504. package/dist/docs/reference/model/cylinder.md +13 -6
  505. package/dist/docs/reference/model/ellipse.md +10 -4
  506. package/dist/docs/reference/model/extrude.md +28 -20
  507. package/dist/docs/reference/model/generate.md +10 -4
  508. package/dist/docs/reference/model/gridPattern.md +15 -9
  509. package/dist/docs/reference/model/heightfield.md +10 -4
  510. package/dist/docs/reference/model/holeCutter.md +21 -4
  511. package/dist/docs/reference/model/hull.md +9 -2
  512. package/dist/docs/reference/model/implicit.md +9 -3
  513. package/dist/docs/reference/model/internalThreadCutter.md +31 -33
  514. package/dist/docs/reference/model/intersect.md +11 -4
  515. package/dist/docs/reference/model/join.md +89 -0
  516. package/dist/docs/reference/model/knuckleHinge.md +8 -2
  517. package/dist/docs/reference/model/linearPattern.md +15 -9
  518. package/dist/docs/reference/model/loft.md +36 -28
  519. package/dist/docs/reference/model/matchProfiles.md +14 -8
  520. package/dist/docs/reference/model/minkowskiSum.md +9 -2
  521. package/dist/docs/reference/model/pathPattern.md +25 -19
  522. package/dist/docs/reference/model/polygon.md +13 -7
  523. package/dist/docs/reference/model/preflightInternalThreadCutter.md +33 -35
  524. package/dist/docs/reference/model/preflightThreadedNut.md +43 -40
  525. package/dist/docs/reference/model/preflightThreadedRod.md +33 -35
  526. package/dist/docs/reference/model/radialPattern.md +15 -9
  527. package/dist/docs/reference/model/rectangle.md +14 -8
  528. package/dist/docs/reference/model/regularPolygon.md +10 -4
  529. package/dist/docs/reference/model/revolve.md +25 -17
  530. package/dist/docs/reference/model/solidFromMesh.md +16 -9
  531. package/dist/docs/reference/model/sphere.md +13 -6
  532. package/dist/docs/reference/model/star.md +17 -11
  533. package/dist/docs/reference/model/stroke.md +21 -15
  534. package/dist/docs/reference/model/svgPathSection.md +12 -6
  535. package/dist/docs/reference/model/svgSection.md +13 -7
  536. package/dist/docs/reference/model/sweep.md +29 -21
  537. package/dist/docs/reference/model/textSection.md +15 -9
  538. package/dist/docs/reference/model/threadRidge.md +21 -15
  539. package/dist/docs/reference/model/threadedNut.md +41 -38
  540. package/dist/docs/reference/model/threadedRod.md +31 -33
  541. package/dist/docs/reference/model/torus.md +20 -13
  542. package/dist/docs/reference/model/tube.md +13 -41
  543. package/dist/docs/reference/model/union.md +11 -4
  544. package/dist/docs/reference/model.md +11 -20
  545. package/dist/docs/reference/text/MAX_VECTOR_FONT_BYTES.md +8 -2
  546. package/dist/docs/reference/text/VectorFont.md +39 -33
  547. package/dist/docs/reference/text/VectorFontOptions.md +7 -1
  548. package/dist/docs/reference/text/categories/font-preparation.md +3 -15
  549. package/dist/docs/reference/text/prepareVectorFont.md +7 -1
  550. package/dist/docs/reference/text.md +4 -4
  551. package/dist/engine/execution.js +10 -6
  552. package/dist/engine/finalization.js +2 -74
  553. package/dist/engine/index.js +24 -30
  554. package/dist/engine/model-parts.js +8 -0
  555. package/dist/engine/model-summary.js +5 -5
  556. package/dist/engine/native/construction-mesh.js +41 -0
  557. package/dist/engine/native/index.js +1 -1
  558. package/dist/engine/native/material-components.js +5 -54
  559. package/dist/engine/native/mesh-observation.js +55 -0
  560. package/dist/engine/native/operations.js +0 -7
  561. package/dist/engine/native/regions.js +2 -1
  562. package/dist/engine/native/scoped-primitives.js +5 -4
  563. package/dist/engine/native/threads.js +14 -14
  564. package/dist/engine/{construction-operations.js → operations/construction.js} +25 -23
  565. package/dist/engine/{modeling-context.js → operations/context.js} +12 -10
  566. package/dist/engine/{operation-environment.js → operations/environment.js} +2 -2
  567. package/dist/engine/{extrusion-finishing.js → operations/extrusion-finishing.js} +23 -22
  568. package/dist/engine/{hole-cutter-operation.js → operations/hole-cutter.js} +3 -3
  569. package/dist/engine/{inspection-operations.js → operations/inspection.js} +6 -6
  570. package/dist/engine/operations/join-collar-profile.js +120 -0
  571. package/dist/engine/operations/join.js +508 -0
  572. package/dist/engine/{knuckle-hinge-operation.js → operations/knuckle-hinge.js} +4 -4
  573. package/dist/engine/{loft-operations.js → operations/loft.js} +13 -12
  574. package/dist/engine/{mechanical-operations.js → operations/mechanical.js} +2 -2
  575. package/dist/engine/{pattern-operations.js → operations/patterns.js} +4 -4
  576. package/dist/engine/{primitive-anchors.js → operations/primitives/anchors.js} +9 -4
  577. package/dist/engine/{primitive-operations.js → operations/primitives/construction.js} +18 -19
  578. package/dist/engine/{primitive-correspondence.js → operations/primitives/correspondence.js} +4 -4
  579. package/dist/engine/{profile-mesh.js → operations/primitives/profile-mesh.js} +12 -12
  580. package/dist/engine/{primitive-profiles.js → operations/primitives/profiles.js} +7 -7
  581. package/dist/engine/{section-operations.js → operations/sections.js} +8 -8
  582. package/dist/engine/{transform-operations.js → operations/transforms.js} +8 -8
  583. package/dist/engine/placement.js +3 -4
  584. package/dist/engine/recipe-realization.js +2 -2
  585. package/dist/engine/{deferred-context.js → session/deferred-context.js} +4 -4
  586. package/dist/engine/session/dependencies.js +93 -0
  587. package/dist/engine/session/graph.js +428 -0
  588. package/dist/engine/{session-native.js → session/native-cache.js} +2 -2
  589. package/dist/engine/{session.js → session/session.js} +20 -14
  590. package/dist/engine/{session-snapshot.js → session/snapshot-cache.js} +30 -60
  591. package/dist/export/3mf.js +190 -0
  592. package/dist/export/capture.js +178 -0
  593. package/dist/export/glb.js +209 -0
  594. package/dist/export/index.js +5 -0
  595. package/dist/export/limits.js +18 -0
  596. package/dist/export/stl.js +105 -0
  597. package/dist/export/types.js +1 -0
  598. package/dist/export/writer.js +54 -0
  599. package/dist/geometry/anchors.js +4 -11
  600. package/dist/geometry/bounds-value.js +22 -12
  601. package/dist/geometry/heightfield.js +10 -12
  602. package/dist/{model → geometry}/immutable-buffer.js +31 -12
  603. package/dist/geometry/index.js +16 -22
  604. package/dist/geometry/join-geometry.js +839 -0
  605. package/dist/geometry/loft/loft.js +11 -6
  606. package/dist/geometry/mechanical/index.js +5 -5
  607. package/dist/geometry/mechanical/threads/bevel.js +24 -0
  608. package/dist/geometry/mechanical/{threads.js → threads/fit.js} +4 -4
  609. package/dist/geometry/mechanical/{thread-helices.js → threads/helices.js} +3 -3
  610. package/dist/geometry/mechanical/{thread-mesh-plan.js → threads/mesh-plan.js} +38 -53
  611. package/dist/geometry/mechanical/{thread-mesh.js → threads/mesh.js} +9 -9
  612. package/dist/geometry/mechanical/{thread-profiles.js → threads/profiles.js} +3 -3
  613. package/dist/geometry/mechanical/{thread-solids.js → threads/solids.js} +58 -89
  614. package/dist/geometry/mechanical/{thread-surface.js → threads/surface.js} +7 -8
  615. package/dist/geometry/mesh/mesh-centroid.js +3 -2
  616. package/dist/geometry/mesh/mesh-planar.js +27 -8
  617. package/dist/geometry/mesh/mesh-quality.js +2 -1
  618. package/dist/geometry/mesh/mesh-render.js +205 -0
  619. package/dist/geometry/mesh/mesh-signature.js +7 -6
  620. package/dist/geometry/mesh/mesh-solid-intersections.js +43 -17
  621. package/dist/geometry/mesh/mesh-solid.js +8 -5
  622. package/dist/geometry/mesh/mesh-types.js +1 -0
  623. package/dist/geometry/mesh/mesh.js +13 -22
  624. package/dist/geometry/mesh-api.js +15 -0
  625. package/dist/geometry/primitive-resolvers.js +42 -14
  626. package/dist/geometry/profiles/primitives/circle.js +19 -0
  627. package/dist/geometry/profiles/{shapes.js → primitives/ellipse.js} +6 -10
  628. package/dist/geometry/profiles/{rectangle.js → primitives/rectangle.js} +14 -12
  629. package/dist/geometry/profiles/primitives/regular-polygon.js +33 -0
  630. package/dist/geometry/profiles/primitives/star.js +28 -0
  631. package/dist/geometry/region-offset.js +278 -0
  632. package/dist/geometry/regions.js +11 -1
  633. package/dist/geometry/revolve/revolve-mesh.js +1 -1
  634. package/dist/geometry/{svg-import.js → svg/import.js} +10 -10
  635. package/dist/geometry/sweeps/sweep-mesh.js +1 -1
  636. package/dist/geometry/transform3.js +29 -0
  637. package/dist/index.js +2 -1
  638. package/dist/model/diagnostic-path.js +26 -0
  639. package/dist/model/execution-binding.js +3 -3
  640. package/dist/model/generation.js +9 -3
  641. package/dist/model/geometry-recipes.js +1 -1
  642. package/dist/model/immutable-generation-data.js +45 -14
  643. package/dist/model/join.js +1 -0
  644. package/dist/model/operations.js +34 -144
  645. package/dist/model/recipe-declaration.js +7 -2
  646. package/dist/model/shape-handles.js +31 -7
  647. package/dist/text/index.js +1 -1
  648. package/package.json +38 -11
  649. package/dist/docs/reference/engine/Export3mfOptions.md +0 -29
  650. package/dist/docs/reference/engine/ExportMeshPart.md +0 -65
  651. package/dist/docs/reference/engine/ModelSnapshot.md +0 -184
  652. package/dist/docs/reference/engine/SnapshotPart.md +0 -133
  653. package/dist/docs/reference/engine/validateModel.md +0 -48
  654. package/dist/docs/reference/geometry/ThreadedNutBevel.md +0 -14
  655. package/dist/docs/reference/geometry/analyzeTriangleMesh.md +0 -61
  656. package/dist/docs/reference/geometry/analyzeTriangleMeshQuality.md +0 -56
  657. package/dist/docs/reference/geometry/computeTriangleMeshCentroid.md +0 -39
  658. package/dist/docs/reference/geometry/computeTriangleMeshSignature.md +0 -64
  659. package/dist/docs/reference/geometry/extrudeMesh.md +0 -77
  660. package/dist/docs/reference/geometry/heightfieldMesh.md +0 -52
  661. package/dist/docs/reference/geometry/helicalThreadRidgeMesh.md +0 -72
  662. package/dist/docs/reference/geometry/helicalThreadSolidMesh.md +0 -106
  663. package/dist/docs/reference/geometry/joinTriangleMeshes.md +0 -40
  664. package/dist/docs/reference/geometry/loftMesh.md +0 -77
  665. package/dist/docs/reference/geometry/meshBounds.md +0 -39
  666. package/dist/docs/reference/geometry/optimizePlanarPatches.md +0 -95
  667. package/dist/docs/reference/geometry/preflightHeightfield.md +0 -43
  668. package/dist/docs/reference/geometry/preflightHelicalThreadSolidMesh.md +0 -105
  669. package/dist/docs/reference/geometry/reverseTriangleMesh.md +0 -34
  670. package/dist/docs/reference/geometry/sweepMesh.md +0 -86
  671. package/dist/docs/reference/geometry/transformTriangleMesh.md +0 -46
  672. package/dist/docs/reference/geometry/validateTriangleMesh.md +0 -63
  673. package/dist/docs/reference/model/Anchor3.md +0 -55
  674. package/dist/docs/reference/model/AttachOptions.md +0 -69
  675. package/dist/docs/reference/model/Bounds2-type.md +0 -125
  676. package/dist/docs/reference/model/Bounds2Data.md +0 -44
  677. package/dist/docs/reference/model/Bounds2Input.md +0 -19
  678. package/dist/docs/reference/model/Bounds2Options.md +0 -70
  679. package/dist/docs/reference/model/Bounds3-type.md +0 -125
  680. package/dist/docs/reference/model/Bounds3Data.md +0 -44
  681. package/dist/docs/reference/model/Bounds3Input.md +0 -19
  682. package/dist/docs/reference/model/Bounds3Options.md +0 -70
  683. package/dist/docs/reference/model/BoxEdge.md +0 -15
  684. package/dist/docs/reference/model/BoxEdgeSelection.md +0 -19
  685. package/dist/docs/reference/model/BoxEdgeTreatments.md +0 -20
  686. package/dist/docs/reference/model/BoxOptions.md +0 -92
  687. package/dist/docs/reference/model/ChamferedEdgeTreatment.md +0 -35
  688. package/dist/docs/reference/model/CircleContourOptions.md +0 -21
  689. package/dist/docs/reference/model/CircularPrimitiveOptions.md +0 -64
  690. package/dist/docs/reference/model/Computed.md +0 -40
  691. package/dist/docs/reference/model/ComputedValue.md +0 -24
  692. package/dist/docs/reference/model/Contour.md +0 -24
  693. package/dist/docs/reference/model/CorrespondingComponent.md +0 -46
  694. package/dist/docs/reference/model/CorrespondingContour.md +0 -46
  695. package/dist/docs/reference/model/CorrespondingProfile.md +0 -22
  696. package/dist/docs/reference/model/CorrespondingProfileStation.md +0 -27
  697. package/dist/docs/reference/model/CylinderOptions.md +0 -58
  698. package/dist/docs/reference/model/EdgeTreatment.md +0 -22
  699. package/dist/docs/reference/model/EllipseContourOptions.md +0 -21
  700. package/dist/docs/reference/model/EndTreatments.md +0 -39
  701. package/dist/docs/reference/model/FinalizedModel.md +0 -131
  702. package/dist/docs/reference/model/FinalizedPart.md +0 -87
  703. package/dist/docs/reference/model/Frame3.md +0 -63
  704. package/dist/docs/reference/model/GeneratedPart.md +0 -97
  705. package/dist/docs/reference/model/GeometryResolution.md +0 -70
  706. package/dist/docs/reference/model/GeometrySamplingLimits.md +0 -62
  707. package/dist/docs/reference/model/GeometryToleranceOptions.md +0 -46
  708. package/dist/docs/reference/model/GridPatternOptions.md +0 -50
  709. package/dist/docs/reference/model/HeightfieldOptions.md +0 -67
  710. package/dist/docs/reference/model/HelicalThreadRidgeMeshOptions.md +0 -141
  711. package/dist/docs/reference/model/HelicalThreadSolidMeshPreflight.md +0 -59
  712. package/dist/docs/reference/model/ImmutableBuffer-type.md +0 -84
  713. package/dist/docs/reference/model/ImmutableTriangleMesh.md +0 -38
  714. package/dist/docs/reference/model/InternalThreadCutterOptions.md +0 -246
  715. package/dist/docs/reference/model/KnuckleHingeBaseSpec.md +0 -77
  716. package/dist/docs/reference/model/KnuckleHingeSamplingOptions.md +0 -47
  717. package/dist/docs/reference/model/KnuckleHingeSpec.md +0 -18
  718. package/dist/docs/reference/model/LinearPatternOptions.md +0 -39
  719. package/dist/docs/reference/model/LoftCorrespondence.md +0 -27
  720. package/dist/docs/reference/model/LoftOptions.md +0 -91
  721. package/dist/docs/reference/model/LoftPlacement.md +0 -73
  722. package/dist/docs/reference/model/MatchProfilesOptions.md +0 -35
  723. package/dist/docs/reference/model/ModelingLimits.md +0 -126
  724. package/dist/docs/reference/model/NumericArray.md +0 -14
  725. package/dist/docs/reference/model/Path2-type.md +0 -196
  726. package/dist/docs/reference/model/Path2Data.md +0 -50
  727. package/dist/docs/reference/model/Path2Input.md +0 -20
  728. package/dist/docs/reference/model/Path3-type.md +0 -196
  729. package/dist/docs/reference/model/Path3Data.md +0 -50
  730. package/dist/docs/reference/model/Path3Input.md +0 -20
  731. package/dist/docs/reference/model/PathLocation.md +0 -69
  732. package/dist/docs/reference/model/PathNormalGuide.md +0 -46
  733. package/dist/docs/reference/model/PathOptions.md +0 -38
  734. package/dist/docs/reference/model/PathPatternOptions.md +0 -48
  735. package/dist/docs/reference/model/PathResamplingOptions.md +0 -83
  736. package/dist/docs/reference/model/Pivot2Options.md +0 -28
  737. package/dist/docs/reference/model/Pivot3Options.md +0 -28
  738. package/dist/docs/reference/model/PolygonData.md +0 -44
  739. package/dist/docs/reference/model/PrimitiveAttachment.md +0 -41
  740. package/dist/docs/reference/model/PrimitiveAttachmentOptions.md +0 -110
  741. package/dist/docs/reference/model/PrintableThreadFit.md +0 -15
  742. package/dist/docs/reference/model/PrintableThreadFitPolicy.md +0 -51
  743. package/dist/docs/reference/model/ProfileComponent2.md +0 -46
  744. package/dist/docs/reference/model/ProfileContour2.md +0 -36
  745. package/dist/docs/reference/model/ProfileSpan2.md +0 -47
  746. package/dist/docs/reference/model/ProfiledEdgeTreatment.md +0 -41
  747. package/dist/docs/reference/model/RadialPatternOptions.md +0 -59
  748. package/dist/docs/reference/model/RadialSizing.md +0 -15
  749. package/dist/docs/reference/model/RadialSizingOptions.md +0 -40
  750. package/dist/docs/reference/model/RectangleContourOptions.md +0 -72
  751. package/dist/docs/reference/model/RectangleCornerTreatment.md +0 -40
  752. package/dist/docs/reference/model/RectangleCornerTreatments.md +0 -20
  753. package/dist/docs/reference/model/RegionData.md +0 -19
  754. package/dist/docs/reference/model/RevolveOptions.md +0 -94
  755. package/dist/docs/reference/model/RoundedEdgeTreatment.md +0 -96
  756. package/dist/docs/reference/model/SmoothEdgeTreatment.md +0 -76
  757. package/dist/docs/reference/model/SphereOptions.md +0 -20
  758. package/dist/docs/reference/model/StrokeCap.md +0 -16
  759. package/dist/docs/reference/model/StrokeJoin.md +0 -16
  760. package/dist/docs/reference/model/StrokeOptions.md +0 -91
  761. package/dist/docs/reference/model/SweepOptions.md +0 -116
  762. package/dist/docs/reference/model/SweepOrientation.md +0 -116
  763. package/dist/docs/reference/model/ThreadEndStyle.md +0 -15
  764. package/dist/docs/reference/model/ThreadEndTreatmentOptions.md +0 -118
  765. package/dist/docs/reference/model/ThreadHandedness.md +0 -15
  766. package/dist/docs/reference/model/ThreadLeadInEnvelope.md +0 -15
  767. package/dist/docs/reference/model/ThreadLeadInShape.md +0 -15
  768. package/dist/docs/reference/model/ThreadProfile.md +0 -87
  769. package/dist/docs/reference/model/ThreadRidgeOptions.md +0 -19
  770. package/dist/docs/reference/model/ThreadedNutBevel.md +0 -15
  771. package/dist/docs/reference/model/ThreadedNutOptions.md +0 -274
  772. package/dist/docs/reference/model/ThreadedNutPreflight.md +0 -99
  773. package/dist/docs/reference/model/ThreadedNutShape.md +0 -15
  774. package/dist/docs/reference/model/ThreadedRodOptions.md +0 -246
  775. package/dist/docs/reference/model/TorusOptions.md +0 -110
  776. package/dist/docs/reference/model/Transform2-type.md +0 -257
  777. package/dist/docs/reference/model/Transform2Data.md +0 -16
  778. package/dist/docs/reference/model/Transform2Input.md +0 -21
  779. package/dist/docs/reference/model/Transform3-type.md +0 -297
  780. package/dist/docs/reference/model/Transform3Data.md +0 -19
  781. package/dist/docs/reference/model/Transform3Input.md +0 -21
  782. package/dist/docs/reference/model/TriangleMesh.md +0 -42
  783. package/dist/docs/reference/model/TriangleMeshAnalysis.md +0 -123
  784. package/dist/docs/reference/model/TriangleMeshMeasurements.md +0 -79
  785. package/dist/docs/reference/model/TubeOptions.md +0 -143
  786. package/dist/docs/reference/model/Vector2-type.md +0 -271
  787. package/dist/docs/reference/model/Vector2Data.md +0 -15
  788. package/dist/docs/reference/model/Vector2Input.md +0 -21
  789. package/dist/docs/reference/model/Vector3-type.md +0 -283
  790. package/dist/docs/reference/model/Vector3Data.md +0 -15
  791. package/dist/docs/reference/model/Vector3Input.md +0 -21
  792. package/dist/docs/reference/model/VectorTextLayout.md +0 -40
  793. package/dist/docs/reference/model/VectorTextMetrics.md +0 -100
  794. package/dist/docs/reference/model/anchor.md +0 -47
  795. package/dist/docs/reference/model/bounds2.md +0 -37
  796. package/dist/docs/reference/model/bounds3.md +0 -37
  797. package/dist/docs/reference/model/castSegment.md +0 -40
  798. package/dist/docs/reference/model/categories/bounds.md +0 -38
  799. package/dist/docs/reference/model/categories/contracts.md +0 -18
  800. package/dist/docs/reference/model/categories/core-values-errors.md +0 -30
  801. package/dist/docs/reference/model/categories/inspection.md +0 -29
  802. package/dist/docs/reference/model/categories/paths.md +0 -41
  803. package/dist/docs/reference/model/categories/resolution.md +0 -20
  804. package/dist/docs/reference/model/components.md +0 -71
  805. package/dist/docs/reference/model/compose.md +0 -31
  806. package/dist/docs/reference/model/distance.md +0 -45
  807. package/dist/docs/reference/model/immutableMesh.md +0 -44
  808. package/dist/docs/reference/model/inspectSection.md +0 -38
  809. package/dist/docs/reference/model/inspectSolid.md +0 -38
  810. package/dist/docs/reference/model/isEmpty.md +0 -39
  811. package/dist/docs/reference/model/path2.md +0 -54
  812. package/dist/docs/reference/model/path3.md +0 -49
  813. package/dist/docs/reference/model/split.md +0 -54
  814. package/dist/docs/reference/model/splitByPlane.md +0 -66
  815. package/dist/docs/reference/model/transform2.md +0 -46
  816. package/dist/docs/reference/model/transform3.md +0 -48
  817. package/dist/docs/reference/model/vector2.md +0 -40
  818. package/dist/docs/reference/model/vector3.md +0 -47
  819. package/dist/docs/reference/text/Bounds2Data.md +0 -34
  820. package/dist/docs/reference/text/Vector2Data.md +0 -7
  821. package/dist/docs/reference/text/VectorTextArcBaseline.md +0 -53
  822. package/dist/docs/reference/text/VectorTextLayout.md +0 -34
  823. package/dist/docs/reference/text/VectorTextLayoutOptions.md +0 -111
  824. package/dist/docs/reference/text/VectorTextMetrics.md +0 -94
  825. package/dist/docs/reference/text/VectorTextOptions.md +0 -50
  826. package/dist/engine/export-3mf.js +0 -116
  827. package/dist/engine/model-dependencies.js +0 -46
  828. package/dist/engine/session-graph.js +0 -449
  829. package/dist/geometry/profiles/profiles.js +0 -71
  830. /package/dist/engine/{primitive-profile-types.js → operations/primitives/profile-types.js} +0 -0
  831. /package/dist/{engine → geometry/mesh}/mesh-view-cache.js +0 -0
  832. /package/dist/geometry/profiles/{matched.js → match-profiles.js} +0 -0
@@ -1,7 +1,17 @@
1
+ import type {
2
+ ImmutableBuffer,
3
+ ImmutableTriangleMesh,
4
+ NumericArray,
5
+ } from "@metamesh/modeling/geometry";
6
+ export type {
7
+ ImmutableBuffer,
8
+ ImmutableTriangleMesh,
9
+ NumericArray,
10
+ } from "@metamesh/modeling/geometry";
1
11
  /** Immutable modeling recipes and math values; the host owns geometry evaluation. @packageDocumentation */
2
12
 
3
13
  /** ACME 29-degree included-angle profile. */
4
- declare interface AcmeThreadProfileSpec extends ThreadProfileBaseSpec {
14
+ export declare interface AcmeThreadProfileSpec extends ThreadProfileBaseSpec {
5
15
  /** Selects the 29-degree ACME profile family. */
6
16
  readonly kind: "acme";
7
17
  /**
@@ -11,17 +21,6 @@ declare interface AcmeThreadProfileSpec extends ThreadProfileBaseSpec {
11
21
  readonly depth?: number;
12
22
  }
13
23
 
14
- /**
15
- * Reads a copied, immutable named anchor from this exact active generation.
16
- *
17
- * @example Read the top datum
18
- * ```ts
19
- * const plate = box({ size: [30, 20, 6] });
20
- * anchor(plate, "top"); // position [0, 0, 3], direction [0, 0, 1]
21
- * ```
22
- */
23
- export declare function anchor(shape: Solid | Section, name: string): Anchor3;
24
-
25
24
  /**
26
25
  * An attachment pose on a solid or assembly.
27
26
  *
@@ -49,6 +48,13 @@ export declare interface AttachOptions {
49
48
  readonly tolerance?: GeometryToleranceOptions;
50
49
  }
51
50
 
51
+ /** One size for both ends, or independent sizes in bottom/top order. Zero disables an end. */
52
+ export declare type Bevel =
53
+ BevelSize | readonly [bottom: BevelSize, top: BevelSize];
54
+
55
+ /** Nonnegative 45-degree axial/radial bevel size in millimetres, or factory automatic sizing. */
56
+ export declare type BevelSize = number | "auto";
57
+
52
58
  /** Immutable finite XY bounds in millimetres, with tuple coordinates for data interoperability. */
53
59
  export declare interface Bounds2 extends Bounds2Data {
54
60
  /** Returns nonnegative X/Y dimensions in millimetres, including zero extents. */
@@ -67,10 +73,10 @@ export declare interface Bounds2 extends Bounds2Data {
67
73
  * Zero extents are valid. Invalid dimensions, nonfinite coordinates, reversed bounds and
68
74
  * overflowing extents throw `INVALID_ARGUMENT` GeometryError. Use `toData()` for plain records.
69
75
  * Size construction centers on the origin unless `center` is false. Size and extrema are exclusive.
70
- * Compiled Generator packages passing these values to host recipes or computed data require
71
- * runtime 9.0.0 or newer in major 9.
76
+ * Compiled Generator packages passing these values to host recipes or memo data require
77
+ * the current Modeling runtime.
72
78
  */
73
- export declare function bounds2(input: Bounds2Options): Bounds2;
79
+ export declare function bounds2(input: Bounds2Options | Bounds2): Bounds2;
74
80
 
75
81
  /** Plain axis-aligned XY bounds for interchange; use bounds2 for immutable measurement methods. */
76
82
  export declare interface Bounds2Data {
@@ -85,15 +91,19 @@ export declare type Bounds2Input = Bounds2 | Bounds2Data;
85
91
 
86
92
  /** XY bounds construction from existing extrema or nonnegative dimensions, never both. */
87
93
  export declare type Bounds2Options =
88
- | (Bounds2Input & {
89
- /** Preserves the size query when snapshotting an existing fluent value. */
90
- readonly size?: Bounds2["size"];
91
- /** Preserves the center query when snapshotting an existing fluent value. */
92
- readonly center?: Bounds2["center"];
93
- })
94
+ | {
95
+ /** Inclusive minimum XY coordinates in millimetres. */
96
+ readonly min: Vector2Input;
97
+ /** Inclusive maximum XY coordinates in millimetres. */
98
+ readonly max: Vector2Input;
99
+ /** Size construction cannot be combined with extrema. */
100
+ readonly size?: never;
101
+ /** Center applies only to size construction. */
102
+ readonly center?: never;
103
+ }
94
104
  | {
95
105
  /** Nonnegative XY dimensions in millimetres. */
96
- readonly size: Vector2Data;
106
+ readonly size: Vector2Input;
97
107
  /** Center on the origin; false starts at the origin. Defaults to true. */
98
108
  readonly center?: boolean;
99
109
  /** Minimum coordinates are unavailable when size is supplied. */
@@ -120,10 +130,10 @@ export declare interface Bounds3 extends Bounds3Data {
120
130
  * Zero extents are valid. Invalid dimensions, nonfinite coordinates, reversed bounds and
121
131
  * overflowing extents throw `INVALID_ARGUMENT` GeometryError. Use `toData()` for plain records.
122
132
  * Size construction centers on the origin unless `center` is false. Size and extrema are exclusive.
123
- * Compiled Generator packages passing these values to host recipes or computed data require
124
- * runtime 9.0.0 or newer in major 9.
133
+ * Compiled Generator packages passing these values to host recipes or memo data require
134
+ * the current Modeling runtime.
125
135
  */
126
- export declare function bounds3(input: Bounds3Options): Bounds3;
136
+ export declare function bounds3(input: Bounds3Options | Bounds3): Bounds3;
127
137
 
128
138
  /** Plain axis-aligned XYZ bounds for interchange; use bounds3 for immutable measurement methods. */
129
139
  export declare interface Bounds3Data {
@@ -138,15 +148,19 @@ export declare type Bounds3Input = Bounds3 | Bounds3Data;
138
148
 
139
149
  /** XYZ bounds construction from existing extrema or nonnegative dimensions, never both. */
140
150
  export declare type Bounds3Options =
141
- | (Bounds3Input & {
142
- /** Preserves the size query when snapshotting an existing fluent value. */
143
- readonly size?: Bounds3["size"];
144
- /** Preserves the center query when snapshotting an existing fluent value. */
145
- readonly center?: Bounds3["center"];
146
- })
151
+ | {
152
+ /** Inclusive minimum XYZ coordinates in millimetres. */
153
+ readonly min: Vector3Input;
154
+ /** Inclusive maximum XYZ coordinates in millimetres. */
155
+ readonly max: Vector3Input;
156
+ /** Size construction cannot be combined with extrema. */
157
+ readonly size?: never;
158
+ /** Center applies only to size construction. */
159
+ readonly center?: never;
160
+ }
147
161
  | {
148
162
  /** Nonnegative XYZ dimensions in millimetres. */
149
- readonly size: Vector3Data;
163
+ readonly size: Vector3Input;
150
164
  /** Center on the origin; false starts at the origin. Defaults to true. */
151
165
  readonly center?: boolean;
152
166
  /** Minimum coordinates are unavailable when size is supplied. */
@@ -200,16 +214,16 @@ export declare interface BoxOptions extends PrimitiveAttachment {
200
214
  */
201
215
  readonly center?: boolean;
202
216
  /** Positive uniform size or explicit `[X, Y, Z]` extents in millimetres. */
203
- readonly size: number | Vector3Data;
217
+ readonly size: number | Vector3Input;
204
218
  /** Uniform treatment or independent disjoint nominal edge/group treatments. */
205
219
  readonly treatment?: EdgeTreatment | BoxEdgeTreatments;
206
220
  }
207
221
 
208
222
  /** Axial side carrying the near-normal pressure flank of a buttress thread. */
209
- declare type ButtressPressureFlankSide = "negative" | "positive";
223
+ export declare type ButtressPressureFlankSide = "negative" | "positive";
210
224
 
211
225
  /** Asymmetric printable buttress profile with 7/45-degree flanks. */
212
- declare interface ButtressThreadProfileSpec extends ThreadProfileBaseSpec {
226
+ export declare interface ButtressThreadProfileSpec extends ThreadProfileBaseSpec {
213
227
  /** Selects the asymmetric printable buttress profile family. */
214
228
  readonly kind: "buttress";
215
229
  /**
@@ -225,13 +239,6 @@ declare interface ButtressThreadProfileSpec extends ThreadProfileBaseSpec {
225
239
  readonly pressureFlankSide?: ButtressPressureFlankSide;
226
240
  }
227
241
 
228
- /** Copies intersections along the finite directed origin-to-endpoint segment. */
229
- export declare function castSegment(
230
- solid: Solid,
231
- origin: Vector3Input,
232
- endpoint: Vector3Input,
233
- ): readonly SolidSegmentHit[];
234
-
235
242
  /**
236
243
  * A planar edge or corner chamfer with equal or independent surface setbacks.
237
244
  */
@@ -292,47 +299,6 @@ export declare interface CircularPrimitiveOptions {
292
299
  readonly resolution?: GeometryResolution;
293
300
  }
294
301
 
295
- /**
296
- * Observes disconnected material pieces as session-restricted solid selections.
297
- *
298
- * Each piece retains its enclosed cavities. A sealed hollow box is one component; adding a loose
299
- * ball inside its cavity produces two. Recombining the pieces preserves the original material.
300
- * This does not cut connected geometry. Containment is bounded to 2,000,000 comparisons.
301
- * Selection order and cardinality depend on evaluated topology. Results and recipes using them
302
- * can only be evaluated in this session; composition itself requires no engine.
303
- *
304
- * @example Move disconnected pieces independently
305
- * ```ts
306
- * const islands = union([box({ size: 8 }), box({ size: 8 }).translate([12, 0, 0])]);
307
- * const pieces = components(islands);
308
- * // Component order is unspecified; the index only sets a display height here.
309
- * union(pieces.map((piece, index) => piece.translate([0, 0, index * 6])));
310
- * ```
311
- */
312
- export declare function components(solid: Solid): readonly Solid[];
313
-
314
- /**
315
- * Observes filled 2D islands, retaining each island's holes; empty gives [].
316
- * Selections and recipes using them can only be evaluated in this session.
317
- */
318
- export declare function components(section: Section): readonly Section[];
319
-
320
- /** Combines disjoint components without resolving overlap. */
321
- export declare function compose(solids: readonly Solid[]): Solid;
322
-
323
- /** A lazy session-owned reader. Calling it tracks its output in the current computation. */
324
- export declare interface Computed<T> {
325
- /** Compile-time ownership brand; readers are created by the engine's context helper. */
326
- readonly [computedBrand]: "Computed";
327
- /** Reads immutable data or a deferred recipe; evaluation is synchronous and cached. */
328
- (): T;
329
- }
330
-
331
- declare const computedBrand: unique symbol;
332
-
333
- /** A value supplied immediately or by a lazy computed reader. */
334
- export declare type ComputedValue<T> = T | Computed<T>;
335
-
336
302
  /**
337
303
  * A sampled closed two-dimensional boundary whose first point is not repeated at the end.
338
304
  *
@@ -380,7 +346,7 @@ export declare type CorrespondingProfileStation = LoftPlacement & {
380
346
  /**
381
347
  * Explicit physical sampling and allocation policy for reusable curves.
382
348
  */
383
- declare interface CurveSamplingOptions {
349
+ export declare interface CurveSamplingOptions {
384
350
  /** Exact segment count overrides physical criteria; curve parameters are spaced uniformly. */
385
351
  readonly segments?: number;
386
352
  /** Millimetre sampling policy; circularSegments applies only to arcs. */
@@ -392,7 +358,7 @@ declare interface CurveSamplingOptions {
392
358
  }
393
359
 
394
360
  /** Caller-defined periodic axial/radial profile in millimetres. */
395
- declare interface CustomThreadProfileSpec extends ThreadProfileBaseSpec {
361
+ export declare interface CustomThreadProfileSpec extends ThreadProfileBaseSpec {
396
362
  /** Selects a caller-defined periodic profile. */
397
363
  readonly kind: "custom";
398
364
  /**
@@ -451,25 +417,13 @@ export declare type CylinderOptions = CircularPrimitiveOptions &
451
417
  export declare interface DiagnosticOptions<P> {
452
418
  /** Existing top-level parameter key. */
453
419
  readonly parameterId?: Extract<keyof P, string> | undefined;
420
+ /** Relative field path, at most 32 nonnegative safe indices or 1–120 character field names.
421
+ * Starts within parameterId's value, or the whole input map when no parameterId is supplied.
422
+ * Omitted or empty addresses the whole value; paths do not validate field existence.
423
+ */
424
+ readonly path?: readonly (string | number)[] | undefined;
454
425
  }
455
426
 
456
- /**
457
- * Measures the minimum separation between two nonempty solids in millimetres.
458
- *
459
- * Uses actual geometry, not bounding-box separation or distance between object origins.
460
- * Contact or overlapping material returns zero, including one solid inside another.
461
- * The kernel's search range is managed internally; the result is not capped at a caller limit.
462
- * Empty geometry and component selections from another session reject. Results follow native numeric precision.
463
- *
464
- * @example Measure the gap between two blocks
465
- * ```ts
466
- * const left = box({ size: 10 });
467
- * const right = box({ size: 10 }).translate([13, 0, 0]);
468
- * const gap = distance(left, right); // 3 mm
469
- * ```
470
- */
471
- export declare function distance(solid: Solid, other: Solid): number;
472
-
473
427
  /**
474
428
  * Uniform finishing vocabulary shared by applicable solid edges and profile corners.
475
429
  */
@@ -496,13 +450,13 @@ export declare type EllipseContourOptions = CircularPrimitiveOptions &
496
450
  (
497
451
  | {
498
452
  /** Positive XY radii in millimetres; mutually exclusive with size. */
499
- readonly radius: Vector2Data;
453
+ readonly radius: Vector2Input;
500
454
  /** Full XY extents are unavailable when radius is supplied. */
501
455
  readonly size?: never;
502
456
  }
503
457
  | {
504
458
  /** Positive full XY extents in millimetres; mutually exclusive with radius. */
505
- readonly size: Vector2Data;
459
+ readonly size: Vector2Input;
506
460
  /** XY radii are unavailable when size is supplied. */
507
461
  readonly radius?: never;
508
462
  }
@@ -515,7 +469,7 @@ export declare type EllipseOptions = EllipseContourOptions &
515
469
  PrimitiveAttachment;
516
470
 
517
471
  /**
518
- * Independent inward finishing on primitive or straight convex extrusion ends.
472
+ * Independent inward finishing on primitive or source-corresponding straight extrusion ends.
519
473
  * Zero amounts leave the end untreated, including when all ends are disabled.
520
474
  */
521
475
  export declare interface EndTreatments {
@@ -526,8 +480,8 @@ export declare interface EndTreatments {
526
480
  }
527
481
 
528
482
  /**
529
- * Extrudes explicit corresponding contours along +Z with degree twist and top scaling.
530
- * Filled Sections use `section.extrude(options)`.
483
+ * Extrudes a filled Section or explicit corresponding contours along +Z with degree twist and top scaling.
484
+ * Use `section.extrude(options)` in fluent sequences, or this function for generic profile inputs.
531
485
  *
532
486
  * @example Extrude
533
487
  * ```ts
@@ -539,24 +493,28 @@ export declare interface EndTreatments {
539
493
  * ```
540
494
  */
541
495
  export declare function extrude(
542
- shape: CorrespondingProfile,
496
+ shape: Section | CorrespondingProfile,
543
497
  options: ExtrudeOptions,
544
498
  ): Solid;
545
499
 
546
500
  /**
547
- * Dimensions and sampling shared by native and pure +Z extrusion.
501
+ * Dimensions and sampling for pure +Z mesh extrusion, without end treatments.
548
502
  */
549
- export declare interface ExtrudeOptions extends ExtrusionSamplingOptions {
503
+ export declare interface ExtrudeMeshOptions extends ExtrusionSamplingOptions {
550
504
  /** Positive extrusion height in millimetres. */
551
505
  readonly height: number;
552
506
  /** Center the extrusion on Z; otherwise its bottom is at zero. Defaults to false. */
553
507
  readonly center?: boolean;
554
- /** Independent inward end treatments on straight convex single-contour extrusions. */
508
+ }
509
+
510
+ /** Native +Z extrusion with optional inward end treatments. */
511
+ export declare interface ExtrudeOptions extends ExtrudeMeshOptions {
512
+ /** Independent inward treatments on every material rim of a straight, topology-preserving extrusion. */
555
513
  readonly ends?: EndTreatments;
556
514
  }
557
515
 
558
516
  /** Shared sampling controls for a twisted or scaled linear extrusion. */
559
- declare interface ExtrusionSamplingOptions {
517
+ export declare interface ExtrusionSamplingOptions {
560
518
  /** Exact number of intermediate profiles, nonnegative; overrides physical sampling. */
561
519
  readonly divisions?: number;
562
520
  /** Explicit output and sampling allocation ceilings. */
@@ -569,43 +527,6 @@ declare interface ExtrusionSamplingOptions {
569
527
  readonly twist?: number;
570
528
  }
571
529
 
572
- /** Finalized manufacturing snapshot. Its arrays are independent of all native values. */
573
- export declare interface FinalizedModel {
574
- /** Ordered finalized manufacturing parts with copied transferable arrays. */
575
- readonly parts: readonly FinalizedPart[];
576
- /** Axis-aligned XYZ bounds in millimetres. */
577
- readonly bounds: Bounds3Data;
578
- /** Aggregate counts, unique backing storage, volume, and execution timings. */
579
- readonly stats: {
580
- /** Number of declared output parts, including repeated geometry instances. */
581
- readonly partCount: number;
582
- /** Aggregate position-buffer vertex count. */
583
- readonly vertexCount: number;
584
- /** Aggregate indexed triangle count. */
585
- readonly triangleCount: number;
586
- /** Signed enclosed volume of all selected parts in cubic millimetres. */
587
- readonly volumeMm3: number;
588
- /** Unique transferable backing-buffer bytes, counted once across all parts. */
589
- readonly byteCount: number;
590
- /** Synchronous callback duration in milliseconds. */
591
- readonly buildMs: number;
592
- /** Manufacturing validation and buffer finalization duration in milliseconds. */
593
- readonly finalizationMs: number;
594
- /** Total generation duration, including cache retention and native cleanup, in milliseconds. */
595
- readonly generationMs: number;
596
- };
597
- }
598
-
599
- /** Copied manufacturing part with facts computed from the finalized mesh. */
600
- export declare interface FinalizedPart extends TriangleMesh {
601
- /** Stable canonical lowercase identity; unique within the containing topology or output. */
602
- readonly id: string;
603
- /** Optional six-digit hex RGB display color. */
604
- readonly color?: string;
605
- /** Fresh validated facts for these exact finalized buffers. */
606
- readonly measurements: TriangleMeshAnalysis;
607
- }
608
-
609
530
  /** A right-handed orthonormal coordinate frame expressed in world coordinates. */
610
531
  export declare interface Frame3 {
611
532
  /** World-space origin of the local frame. */
@@ -619,7 +540,9 @@ export declare interface Frame3 {
619
540
  }
620
541
 
621
542
  /**
622
- * Defines a typed model without executing it. Use `computed` only for work worth reusing.
543
+ * Defines a typed model without executing it. Parameters are an object map of capturable data;
544
+ * runtime capture rejects arrays at the root, ordinary class instances, mutable buffers, and functions.
545
+ * Supply live capabilities through services. Use `memo` only for work worth reusing.
623
546
  *
624
547
  * @example A simple model
625
548
  * ```ts
@@ -629,37 +552,37 @@ export declare interface Frame3 {
629
552
  * });
630
553
  * ```
631
554
  */
632
- export declare function generate<P, S = Record<never, never>>(
555
+ export declare function generate<P extends object, S = Record<never, never>>(
633
556
  callback: GenerateCallback<P, S>,
634
557
  ): ModelProgram<P, S>;
635
558
 
636
559
  /** Pure synchronous callback returning one declared part or an array; caches are optional. */
637
- export declare type GenerateCallback<P, S = Record<never, never>> = (
560
+ export declare type GenerateCallback<
561
+ P extends object,
562
+ S = Record<never, never>,
563
+ > = (
638
564
  context: GenerateContext<P, S>,
639
- ) => GeneratedPart | readonly GeneratedPart[];
565
+ ) => PartDeclaration | readonly PartDeclaration[];
640
566
 
641
567
  /** The sole synchronous authoring context, supplied independently of Studio. */
642
- export declare interface GenerateContext<P, S = Record<never, never>> {
568
+ export declare interface GenerateContext<
569
+ P extends object,
570
+ S = Record<never, never>,
571
+ > {
643
572
  /** Frozen ordinary parameter values; synchronous top-level reads are tracked. */
644
- readonly params: Readonly<P>;
573
+ readonly params: ImmutableValue<P>;
645
574
  /** Host-prepared readonly synchronous capabilities, fixed for the session. */
646
575
  readonly services: Readonly<S>;
647
- /**
648
- * Registers a lazy pure calculation and automatically tracks parameter and computed-reader reads.
649
- * Optional dependencies add changing outer captures; entries compare with Object.is. Objects and
650
- * arrays must be deeply immutable. An empty list still tracks reads inside the callback.
651
- */
652
- readonly computed: <T>(
653
- id: string,
654
- callback: () => T,
655
- dependencies?: readonly unknown[],
656
- ) => Computed<T>;
576
+ /** Reuses a pure synchronous function; pass changing inputs as arguments and keep helpers stable. */
577
+ readonly memo: Memo;
657
578
  /** Declares a semantic part with identity placement, or explicit placement and appearance. */
658
- readonly part: {
659
- (id: string, geometry: ComputedValue<PartGeometry>): GeneratedPart;
660
- (id: string, options: PartOptions): GeneratedPart;
661
- };
662
- /** Immediately aborts on false; geometry observations in the condition run first. */
579
+ readonly part: (
580
+ id: string,
581
+ input: PartGeometry | PartOptions,
582
+ ) => PartDeclaration;
583
+ /** Immediately aborts on false; geometry observations in the condition run first.
584
+ * This diagnostic helper does not narrow TypeScript types; use an explicit conditional guard when needed.
585
+ */
663
586
  readonly assert: {
664
587
  (condition: false, message: string, options?: DiagnosticOptions<P>): never;
665
588
  (condition: boolean, message: string, options?: DiagnosticOptions<P>): void;
@@ -668,12 +591,6 @@ export declare interface GenerateContext<P, S = Record<never, never>> {
668
591
  readonly warn: (message: string, options?: DiagnosticOptions<P>) => void;
669
592
  }
670
593
 
671
- /** One declared output part. Construct with the context's `part` helper. */
672
- export declare interface GeneratedPart extends PartOptions {
673
- /** Unique canonical lowercase hyphen-separated identity, at most 64 characters. */
674
- readonly id: string;
675
- }
676
-
677
594
  /** Structured user-facing issue associated with the attempted revision. */
678
595
  export declare interface GenerationDiagnostic {
679
596
  /** An error aborts generation; a warning allows generation to continue. */
@@ -682,9 +599,11 @@ export declare interface GenerationDiagnostic {
682
599
  readonly message: string;
683
600
  /** Optional control identity, validated against the supplied parameters. */
684
601
  readonly parameterId?: string | undefined;
602
+ /** Relative field location within the parameter, or input map when parameterId is omitted. */
603
+ readonly path?: readonly (string | number)[] | undefined;
685
604
  }
686
605
 
687
- /** A user-correctable assertion failure. Successful computation caches never retain failures. */
606
+ /** A user-correctable assertion failure. Successful memo caches never retain failures. */
688
607
  export declare class GenerationError extends Error {
689
608
  /** Issues reached in normal JavaScript order, ending with the first failed assertion. */
690
609
  readonly diagnostics: readonly GenerationDiagnostic[];
@@ -692,6 +611,60 @@ export declare class GenerationError extends Error {
692
611
  constructor(diagnostics: readonly GenerationDiagnostic[]);
693
612
  }
694
613
 
614
+ /**
615
+ * Error raised when a geometry precondition or invariant is not satisfied.
616
+ *
617
+ * Callers may use `code` for coarse recovery decisions. Human-facing details
618
+ * remain in `message`; messages are descriptive but are not a stable API.
619
+ *
620
+ * @example
621
+ * ```ts
622
+ * const error = new GeometryError("INVALID_ARGUMENT", "Radius must be positive.", {
623
+ * operation: "example",
624
+ * details: { radius: 0 },
625
+ * });
626
+ * ```
627
+ */
628
+ export declare class GeometryError extends Error {
629
+ /** Machine-readable failure category. */
630
+ readonly code: GeometryErrorCode;
631
+ /** Operation and scalar facts associated with the failure. */
632
+ readonly context: GeometryErrorContext;
633
+ /**
634
+ * Creates a geometry error with a stable category, operation, and descriptive message.
635
+ *
636
+ * @param code - Machine-readable failure category.
637
+ * @param message - Human-readable diagnostic message.
638
+ * @param context - Operation and optional scalar facts. Defaults to `{ operation: "geometry" }`.
639
+ */
640
+ constructor(
641
+ code: GeometryErrorCode,
642
+ message: string,
643
+ context?: GeometryErrorContext,
644
+ );
645
+ }
646
+
647
+ /** Stable categories for invalid inputs, topology, allocation, and runtime failures. */
648
+ export declare type GeometryErrorCode =
649
+ | "COMPLEXITY_LIMIT"
650
+ | "DEGENERATE_GEOMETRY"
651
+ | "INVALID_ARGUMENT"
652
+ | "INVALID_MESH"
653
+ | "INVALID_TOPOLOGY"
654
+ | "INVALID_TOLERANCE"
655
+ | "NON_FINITE_VALUE"
656
+ | "SELF_INTERSECTION"
657
+ | "SINGULAR_TRANSFORM"
658
+ | "UNSUPPORTED_RUNTIME";
659
+
660
+ /** Serializable context attached to a geometry failure. */
661
+ export declare interface GeometryErrorContext {
662
+ /** Optional scalar facts useful for diagnostics without parsing the message. */
663
+ readonly details?: Readonly<Record<string, boolean | number | string>>;
664
+ /** Stable operation name, such as `normalizeContour` or `extrude`. */
665
+ readonly operation: string;
666
+ }
667
+
695
668
  /**
696
669
  * Tessellation policy for sampled geometry measured in millimetres.
697
670
  */
@@ -815,11 +788,11 @@ export declare type HeightfieldOptions = {
815
788
  } & (
816
789
  | {
817
790
  /** Positive XY footprint for uniform sampling. */
818
- readonly size: Vector2Data;
791
+ readonly size: Vector2Input;
819
792
  /** Exact positive integer X/Y interval counts. */
820
793
  readonly segments: readonly [x: number, y: number];
821
794
  /** Lower-left footprint XY. Omitted centers the footprint on XY. */
822
- readonly origin?: Vector2Data;
795
+ readonly origin?: Vector2Input;
823
796
  /** Explicit coordinates cannot be combined with uniform sampling. */
824
797
  readonly coordinates?: never;
825
798
  }
@@ -843,54 +816,17 @@ export declare type HeightfieldOptions = {
843
816
  }
844
817
  );
845
818
 
846
- /** Runtime-neutral options for the dedicated helical ridge mesher. */
847
- export declare interface HelicalThreadRidgeMeshOptions {
848
- /**
849
- * Optional bottom/top ridge-end treatments. Standalone ridges honor the requested boundaries;
850
- * BOSL2-style non-cut lead-in scaling is available on complete thread solids.
851
- */
852
- readonly ends?: ThreadEndTreatmentOptions;
853
- /** Helix direction. Default: `right`. */
854
- readonly handedness?: ThreadHandedness;
855
- /** Total threaded axial length in millimetres. */
856
- readonly length: number;
857
- /** Explicit output and circular allocation ceilings. */
858
- readonly limits?: Partial<ModelingLimits>;
859
- /** Nominal major diameter before any caller-owned fit compensation. */
860
- readonly majorDiameter: number;
861
- /** Angular offset of the first start in degrees. Default: `0`. */
862
- readonly phase?: number;
863
- /** Validated periodic profile repeated around the shaft. */
864
- readonly profile: ThreadProfile;
865
- /** Optional circular-resolution policy. */
866
- readonly resolution?: GeometryResolution;
867
- /** Number of evenly phased starts. Default: `1`. */
868
- readonly starts?: number;
869
- /** Optional numerical tolerance overrides. */
870
- readonly tolerance?: GeometryToleranceOptions;
871
- }
872
-
873
- /** Selected sampling counts and conservative allocation estimates, before thread mesh construction. */
874
- export declare interface HelicalThreadSolidMeshPreflight {
875
- /** Uniform axial intervals required only by a requested physical segment-length limit. */
876
- readonly axialIntervals: number;
877
- /** Start-aligned full-circle segment count used by the surface mesh. */
878
- readonly circularSegments: number;
879
- /** Conservative surface-row count across profile breaks, ends, and bevel stations. */
880
- readonly estimatedRows: number;
881
- /** Conservative triangle count used by the selected output allocation policy. */
882
- readonly estimatedTriangles: number;
883
- }
884
-
885
819
  /**
886
820
  * Declares a +Z hole or blind-pocket cutter with explicit end overrun in millimetres.
821
+ *
822
+ * @remarks
887
823
  * Choose exactly one circular diameter or existing Section. A 45-degree entry chamfer
888
824
  * supports one strictly convex contour without holes; plain profiles may have any topology.
889
825
  * Circular entries retain nominal frustum radii; profile entries offset the supplied polygon edges.
890
826
  * Circular head recesses are mutually exclusive with entryChamfer. Both overrun ends default
891
827
  * to zero, so the nominal bottom remains at Z=0 and blind pocket floors are preserved.
892
828
  * Existing Section samples are authoritative; limits and unspecified circular sampling belong
893
- * to the evaluating host. Compiled packages require runtime major 9.
829
+ * to the evaluating host.
894
830
  *
895
831
  * @example A blind hex pocket with an open top
896
832
  * ```ts
@@ -1013,18 +949,6 @@ export declare type HullOptions =
1013
949
  readonly points?: never;
1014
950
  };
1015
951
 
1016
- /** Owned immutable numeric data. Use copy() to obtain mutable storage for numerical work. */
1017
- export declare interface ImmutableBuffer<T extends NumericArray> {
1018
- /** Opaque element-storage brand; construct buffers with immutableBuffer(). */
1019
- readonly [immutableBufferBrand]: T;
1020
- /** Number of numeric elements, independent of their byte width. */
1021
- readonly length: number;
1022
- /** Reads an integer offset; negative offsets count from the end. Invalid offsets return undefined. */
1023
- at(this: void, index: number): number | undefined;
1024
- /** Returns a fresh mutable array of the original numeric type; never exposes cached storage. */
1025
- copy(this: void): T;
1026
- }
1027
-
1028
952
  /**
1029
953
  * Copies numeric data once into private storage. This pure helper needs no active generation.
1030
954
  * @example
@@ -1033,6 +957,7 @@ export declare interface ImmutableBuffer<T extends NumericArray> {
1033
957
  * const heights = immutableBuffer(new Float32Array([2, 4, 6]));
1034
958
  * const count = heights.length;
1035
959
  * const first = heights.at(0);
960
+ * const doubled = Array.from(heights, (height) => height * 2);
1036
961
  * const editable = heights.copy();
1037
962
  * editable[0] = 8; // heights still contains 2, 4, 6.
1038
963
  * ```
@@ -1041,33 +966,18 @@ export declare function immutableBuffer<T extends NumericArray>(
1041
966
  source: T,
1042
967
  ): ImmutableBuffer<T>;
1043
968
 
1044
- declare const immutableBufferBrand: unique symbol;
1045
-
1046
969
  /**
1047
- * Copies mesh buffers into immutable data; geometric validation still occurs when modeling or finalizing.
1048
- * @example
1049
- * ```ts
1050
- * import { generate, immutableMesh } from "@metamesh/modeling";
1051
- * import { heightfieldMesh } from "@metamesh/modeling/geometry";
1052
- * const model = generate(({ computed, part }) => {
1053
- * const surface = computed("surface", () => immutableMesh(heightfieldMesh({
1054
- * size: [10, 10], segments: [8, 8], height: () => 2,
1055
- * })));
1056
- * return [part("surface", surface)];
1057
- * });
1058
- * ```
970
+ * Deeply readonly view of captured generation data, including nested arrays and tuples.
971
+ * Modeling value methods keep their signatures, including explicit mutable copies.
972
+ * This type does not make unsupported runtime values valid generation data.
1059
973
  */
1060
- export declare function immutableMesh(
1061
- mesh: TriangleMesh,
1062
- ): ImmutableTriangleMesh;
1063
-
1064
- /** Immutable local XYZ positions and triangle indices, suitable for a computed value or part. */
1065
- export declare interface ImmutableTriangleMesh {
1066
- /** Packed XYZ coordinates in millimetres. */
1067
- readonly positions: ImmutableBuffer<Float32Array>;
1068
- /** Zero-based vertex indices, three per triangle. */
1069
- readonly indices: ImmutableBuffer<Uint32Array>;
1070
- }
974
+ export declare type ImmutableValue<T> = T extends (...args: never[]) => unknown
975
+ ? T
976
+ : T extends object
977
+ ? {
978
+ readonly [Key in keyof T]: ImmutableValue<T[Key]>;
979
+ }
980
+ : T;
1071
981
 
1072
982
  /**
1073
983
  * Bounded positive-inside implicit field constructor.
@@ -1089,28 +999,6 @@ export declare interface ImplicitOptions {
1089
999
  readonly tolerance?: number;
1090
1000
  }
1091
1001
 
1092
- /**
1093
- * Copies lightweight section measurements.
1094
- *
1095
- * @example Check filled area
1096
- * ```ts
1097
- * const facts = inspectSection(rectangle({ size: [20, 10] }));
1098
- * facts.area; // 200 mm²
1099
- * ```
1100
- */
1101
- export declare function inspectSection(section: Section): SectionInspection;
1102
-
1103
- /**
1104
- * Reads immutable native facts once per solid; temporary components are owned by the build.
1105
- *
1106
- * @example Check dimensions and volume
1107
- * ```ts
1108
- * const facts = inspectSolid(box({ size: [30, 20, 6] }));
1109
- * facts.volume; // 3600 mm³
1110
- * ```
1111
- */
1112
- export declare function inspectSolid(solid: Solid): SolidInspection;
1113
-
1114
1002
  /**
1115
1003
  * Compensated internal threaded cutter.
1116
1004
  *
@@ -1130,9 +1018,7 @@ export declare function internalThreadCutter(
1130
1018
 
1131
1019
  /** Options for a compensated internal-thread subtraction tool along +Z. */
1132
1020
  export declare interface InternalThreadCutterOptions
1133
- extends
1134
- Omit<HelicalThreadRidgeMeshOptions, "majorDiameter">,
1135
- ThreadBevelOptions {
1021
+ extends Omit<ThreadRidgeOptions, "majorDiameter">, ThreadBevelOptions {
1136
1022
  /** Printable fit or caller-calibrated allowances. Default: `normal`. */
1137
1023
  readonly fit?: PrintableThreadFit | PrintableThreadFitPolicy;
1138
1024
  /** Nominal major diameter before female compensation and faceting correction. */
@@ -1140,7 +1026,7 @@ export declare interface InternalThreadCutterOptions
1140
1026
  }
1141
1027
 
1142
1028
  /**
1143
- * Robust intersection.
1029
+ * Robust intersection of one or more shapes; empty input rejects during declaration.
1144
1030
  *
1145
1031
  * @example Intersect
1146
1032
  * ```ts
@@ -1153,20 +1039,62 @@ export declare function intersect(solids: readonly Solid[]): Solid;
1153
1039
  export declare function intersect(sections: readonly Section[]): Section;
1154
1040
 
1155
1041
  /**
1156
- * Checks whether a solid or filled section contains no geometry during host execution.
1042
+ * Recognizes structured geometry errors from separately bundled Modeling copies in the same realm.
1157
1043
  *
1158
- * Accepts a 3D Solid or 2D Section handle, not a finalized model or raw triangle mesh.
1159
- * Useful after a Boolean operation whose inputs may not overlap; no mesh is extracted.
1044
+ * Ordinary errors and unmarked code-shaped objects are rejected. The marker is execution-local and
1045
+ * does not survive structured cloning; worker protocols carry their own serialized error envelope.
1046
+ */
1047
+ export declare function isGeometryError(value: unknown): value is GeometryError;
1048
+
1049
+ /**
1050
+ * Fuses two positioned solids with a dimensioned transition at the feature's source datum.
1051
+ *
1052
+ * Requires a local straight feature collar and a continuous support patch single-valued along
1053
+ * that collar's axis. Angled and curved sampled supports are admitted when those proofs hold.
1054
+ * Width is a parallel-edge offset; height is axial rise above local contact, both in millimetres.
1055
+ * The default smooth profile matches tangents; kind "straight" gives a linear bevel profile.
1056
+ * Neither operand moves, loses material, or changes sampling. The result has no inherited anchors.
1057
+ * This operation promises neither a circular radius, a constant bevel angle, nor global curvature continuity.
1160
1058
  *
1161
- * @example Check a missed intersection
1059
+ * @example Join a mounting boss
1162
1060
  * ```ts
1163
- * const body = box({ size: 10 });
1164
- * const distant = box({ size: 10 }).translate([30, 0, 0]);
1165
- * const empty = intersect([body, distant]);
1166
- * const missed = isEmpty(empty); // true
1061
+ * const base = box({ size: [50, 40, 6] });
1062
+ * const feature = cylinder({ diameter: 12, height: 14, center: false }).translate([0, 0, 2]);
1063
+ * base.join(feature, { source: "bottom", transition: { width: 2, height: 3 } });
1167
1064
  * ```
1168
1065
  */
1169
- export declare function isEmpty(shape: Solid | Section): boolean;
1066
+ export declare function join(
1067
+ base: Solid,
1068
+ feature: Solid,
1069
+ options: JoinOptions,
1070
+ ): Solid;
1071
+
1072
+ /** Options for joining two positioned solids through a validated local straight feature collar. */
1073
+ export declare interface JoinOptions {
1074
+ /**
1075
+ * Outward feature-root datum, pointing toward the base. Names resolve lazily on the feature;
1076
+ * explicit anchors use the operands' shared modeling coordinates. The collar grows opposite
1077
+ * this direction, with its roll fixed by the anchor's up vector. Every collar section cut
1078
+ * by the source plane participates, including disconnected roots.
1079
+ */
1080
+ readonly source: string | Anchor3;
1081
+ /** Both dimensions must be positive, or both zero to validate contact and fuse without a blend. */
1082
+ readonly transition: JoinTransition;
1083
+ /** Physical connection sampling. Input solids retain their own captured sampling. */
1084
+ readonly resolution?: GeometryResolution;
1085
+ /** Local allocation ceilings may only lower the evaluating host's limits. */
1086
+ readonly limits?: Partial<ModelingLimits>;
1087
+ }
1088
+
1089
+ /** Connection profile and setbacks, independent of feature construction. */
1090
+ export declare interface JoinTransition {
1091
+ /** Tangent-matching cubic or linear profile. Defaults to "smooth"; neither specifies a radius. */
1092
+ readonly kind?: "smooth" | "straight";
1093
+ /** Nonnegative parallel-edge normal offset in millimetres perpendicular to the feature collar axis. */
1094
+ readonly width: number;
1095
+ /** Nonnegative axial rise in millimetres above the local support contact. */
1096
+ readonly height: number;
1097
+ }
1170
1098
 
1171
1099
  /** Portable local geometry; consumers own plates, holes, part declarations, and final placement. */
1172
1100
  export declare interface KnuckleHinge {
@@ -1188,7 +1116,7 @@ export declare interface KnuckleHinge {
1188
1116
  * Each half's `chamfer` bevels its barrel outer rims and all web edges. Consumers own plates, screw holes,
1189
1117
  * pin retention, fit policy, and part placement. Added mounting material must preserve the bores.
1190
1118
  * No opening range or collision freedom is implied for arbitrary caller attachments.
1191
- * Compiled Generator packages using this operation require runtime 9.0.0 or newer in major 9.
1119
+ * Compiled Generator packages using this operation require runtime 10.0.0 or newer in major 10.
1192
1120
  *
1193
1121
  * @example Integral-pin hinge with two mounting webs
1194
1122
  * ```ts
@@ -1344,7 +1272,8 @@ export declare type LinearPatternOptions<Dimension extends 2 | 3 = 3> = {
1344
1272
  );
1345
1273
 
1346
1274
  /**
1347
- * Lofts primitive Sections at z heights or frames; arbitrary Sections and loops require an explicit correspondence method.
1275
+ * Lofts Sections and point loops at z heights or frames. Known primitive landmarks are retained;
1276
+ * other profiles default to direct correspondence, preserving their supplied seams.
1348
1277
  *
1349
1278
  * @example Loft
1350
1279
  * ```ts
@@ -1382,10 +1311,10 @@ export declare type LoftCorrespondence =
1382
1311
  "direct" | "reindex" | "fast-distance" | "distance";
1383
1312
 
1384
1313
  /**
1385
- * Shared controls for native and pure lofts. Point data and arbitrary Sections require explicit correspondence.
1314
+ * Shared controls for native and pure lofts. Point data and arbitrary Sections default to direct correspondence.
1386
1315
  */
1387
1316
  export declare interface LoftOptions {
1388
- /** 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. */
1317
+ /** One method or one per consecutive station gap. Omitted preserves known primitive landmarks, including circle/ellipse-to-rectangle corners, and otherwise uses direct correspondence with the supplied seams. */
1389
1318
  readonly correspondence?: LoftCorrespondence | readonly LoftCorrespondence[];
1390
1319
  /** 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. */
1391
1320
  readonly distribution?: "perimeter" | "segments";
@@ -1441,6 +1370,20 @@ export declare interface MatchProfilesOptions {
1441
1370
  readonly limits?: Partial<GeometrySamplingLimits>;
1442
1371
  }
1443
1372
 
1373
+ /** Eagerly reuses pure synchronous functions by function identity and immutable arguments. */
1374
+ export declare interface Memo {
1375
+ /**
1376
+ * Invokes fn(...args) and returns captured immutable data. Stable helpers reuse work across runs.
1377
+ * Arguments compare with Object.is and must be deeply immutable; the exact current params or
1378
+ * generation context instead tracks parameter fields read by the function. Functions must be
1379
+ * pure: supply changing inputs explicitly, and do not read changing globals or ambient state.
1380
+ */
1381
+ <Args extends readonly unknown[], Result>(
1382
+ fn: (...args: Args) => Result,
1383
+ ...args: Args
1384
+ ): ImmutableValue<Result>;
1385
+ }
1386
+
1444
1387
  /** Three-dimensional Minkowski sum. */
1445
1388
  export declare function minkowskiSum(a: Solid, b: Solid): Solid;
1446
1389
 
@@ -1457,28 +1400,33 @@ export declare interface ModelingLimits extends GeometrySamplingLimits {
1457
1400
  }
1458
1401
 
1459
1402
  /** Stateless portable program descriptor. Execution and caches belong to an engine session. */
1460
- export declare interface ModelProgram<P, S = Record<never, never>> {
1403
+ export declare interface ModelProgram<
1404
+ P extends object,
1405
+ S = Record<never, never>,
1406
+ > {
1461
1407
  /** Exact generation protocol discriminator. */
1462
1408
  readonly kind: "metamesh-model";
1463
1409
  /** Typed synchronous declaration callback. */
1464
1410
  readonly generate: GenerateCallback<P, S>;
1465
1411
  }
1466
1412
 
1467
- /** Numeric storage supported by immutable generation buffers. */
1468
- export declare type NumericArray =
1469
- Float32Array | Float64Array | Uint32Array | Uint8Array | Int32Array;
1413
+ /** One declared output part. Construct with the context's `part` helper. */
1414
+ export declare interface PartDeclaration extends PartOptions {
1415
+ /** Unique canonical lowercase hyphen-separated identity, at most 64 characters. */
1416
+ readonly id: string;
1417
+ }
1470
1418
 
1471
1419
  /** Manufacturing geometry; filled sections are intermediate construction values. */
1472
1420
  export declare type PartGeometry = Solid | TriangleMesh | ImmutableTriangleMesh;
1473
1421
 
1474
1422
  /** Appearance and rigid placement of a finished local manufacturing part. */
1475
1423
  export declare interface PartOptions {
1476
- /** Local geometry or a lazy reader; native objects never cross a revision. */
1477
- readonly geometry: ComputedValue<PartGeometry>;
1478
- /** XYZ vector or tuple translation in millimetres, applied after rotation; defaults to zero. */
1479
- readonly position?: ComputedValue<Vector3Input>;
1480
- /** XYZ vector or tuple of fixed global X, Y, Z rotations in degrees; defaults to zero. */
1481
- readonly rotation?: ComputedValue<Vector3Input>;
1424
+ /** Local manufacturing geometry; native objects never cross a revision. */
1425
+ readonly geometry: PartGeometry;
1426
+ /** Rigid local-to-world transform; translation uses millimetres. Defaults to identity.
1427
+ * Accepts a fluent transform or row-major 4x4 matrix. Scale, shear, and reflection are invalid.
1428
+ */
1429
+ readonly transform?: Transform3Input;
1482
1430
  /** Optional six-digit hexadecimal semantic part color. */
1483
1431
  readonly color?: string;
1484
1432
  }
@@ -1754,7 +1702,7 @@ export declare type PolygonOptions =
1754
1702
  */
1755
1703
  export declare function preflightInternalThreadCutter(
1756
1704
  options: InternalThreadCutterOptions,
1757
- ): HelicalThreadSolidMeshPreflight;
1705
+ ): ThreadSolidPreflight;
1758
1706
 
1759
1707
  /**
1760
1708
  * Checks nut dimensions, chamfers, end-face wall, and the extended compensated cutter's allocation plan.
@@ -1780,7 +1728,7 @@ export declare function preflightThreadedNut(
1780
1728
  */
1781
1729
  export declare function preflightThreadedRod(
1782
1730
  options: ThreadedRodOptions,
1783
- ): HelicalThreadSolidMeshPreflight;
1731
+ ): ThreadSolidPreflight;
1784
1732
 
1785
1733
  /** Anchor attachment shared by solid and filled-section factories. */
1786
1734
  export declare interface PrimitiveAttachment {
@@ -1979,7 +1927,7 @@ export declare function rectangle(options: RectangleOptions): Section;
1979
1927
  */
1980
1928
  export declare interface RectangleContourOptions {
1981
1929
  /** Positive uniform size or explicit XY extents in millimetres. */
1982
- readonly size: number | Vector2Data;
1930
+ readonly size: number | Vector2Input;
1983
1931
  /** Center on XY; otherwise the minimum corner is the origin. Defaults to true. */
1984
1932
  readonly center?: boolean;
1985
1933
  /** Uniform treatment or four corner treatments. Exact round segments describe a complete circle and must divide by four. */
@@ -2042,8 +1990,8 @@ export declare type RegularPolygonOptions = RadialSizingOptions &
2042
1990
  };
2043
1991
 
2044
1992
  /**
2045
- * Revolves explicit corresponding radial/Z contours around +Z, with caps for partial sweeps.
2046
- * Filled Sections use `section.revolve(options)`.
1993
+ * Revolves a filled Section or explicit corresponding radial/Z contours around +Z, with caps for partial sweeps.
1994
+ * Use `section.revolve(options)` in fluent sequences, or this function for generic profile inputs.
2047
1995
  *
2048
1996
  * @example Revolve
2049
1997
  * ```ts
@@ -2056,7 +2004,7 @@ export declare type RegularPolygonOptions = RadialSizingOptions &
2056
2004
  * ```
2057
2005
  */
2058
2006
  export declare function revolve(
2059
- shape: CorrespondingProfile,
2007
+ shape: Section | CorrespondingProfile,
2060
2008
  options?: RevolveOptions,
2061
2009
  ): Solid;
2062
2010
 
@@ -2069,7 +2017,7 @@ export declare interface RevolveOptions extends CircularPrimitiveOptions {
2069
2017
  * smaller sweeps form partial revolutions with end caps.
2070
2018
  * Segment counts describe a complete circle and scale to this angular span. Native filled
2071
2019
  * revolutions require at least three sweep intervals: adaptive sampling refines to that floor,
2072
- * while exact counts that imply fewer intervals reject. Pure revolveMesh supports one interval.
2020
+ * while exact counts that imply fewer intervals reject. Pure mesh.revolve supports one interval.
2073
2021
  * @defaultValue `360`
2074
2022
  */
2075
2023
  readonly degrees?: number;
@@ -2100,7 +2048,7 @@ export declare interface RoundedEdgeTreatment extends CircularPrimitiveOptions {
2100
2048
  * @example Extrude an outline with a border
2101
2049
  * ```ts
2102
2050
  * const body = rectangle({ size: [20, 12] })
2103
- * .subtract([rectangle({ size: [16, 8] })])
2051
+ * .subtract(rectangle({ size: [16, 8] }))
2104
2052
  * .offset(0.5)
2105
2053
  * .extrude({ height: 4 });
2106
2054
  * ```
@@ -2130,8 +2078,14 @@ export declare interface Section {
2130
2078
  transform(this: Section, placement: Transform2Input): Section;
2131
2079
  /** Copies canonical filled polygons for interchange; requires an active model execution. */
2132
2080
  toRegionData(this: Section): RegionData;
2133
- /** Native section difference; an empty cutter array preserves the source. */
2134
- subtract(this: Section, cutters: readonly Section[]): Section;
2081
+ /** Filled union with one or more sections; an empty operand array preserves this section. */
2082
+ union(this: Section, operands: Section | readonly Section[]): Section;
2083
+ /** Filled intersection with every supplied section; an empty operand array preserves this section. */
2084
+ intersect(this: Section, operands: Section | readonly Section[]): Section;
2085
+ /** Filled difference removing one cutter or the union of all supplied cutters.
2086
+ * An empty cutter array preserves this section.
2087
+ */
2088
+ subtract(this: Section, cutters: Section | readonly Section[]): Section;
2135
2089
  /**
2136
2090
  * Simplifies filled 2D contours using an explicit positive millimetre tolerance.
2137
2091
  *
@@ -2166,6 +2120,19 @@ export declare interface Section {
2166
2120
  * Sweeps this filled section using the selected frame policy and degree twist.
2167
2121
  */
2168
2122
  sweep(this: Section, path: Path3Input, options?: SweepOptions): Solid;
2123
+ /** Reads immutable bounds, filled area in mm², and component/contour/vertex counts.
2124
+ * Requires active synchronous model execution; repeated reads share scoped native results.
2125
+ */
2126
+ inspect(this: Section): SectionInspection;
2127
+ /** Checks whether this section contains no filled geometry during active synchronous model execution. */
2128
+ isEmpty(this: Section): boolean;
2129
+ /** Observes filled XY islands, retaining each island's holes; empty geometry gives [].
2130
+ * Requires active synchronous model execution. Selection order is unspecified.
2131
+ * Selections and recipes using them can only be evaluated in this session.
2132
+ */
2133
+ components(this: Section): readonly Section[];
2134
+ /** Reads a copied immutable named anchor during active synchronous model execution. */
2135
+ anchor(this: Section, name: string): Anchor3;
2169
2136
  }
2170
2137
 
2171
2138
  declare const sectionBrand: unique symbol;
@@ -2196,10 +2163,8 @@ export declare interface SectionInspection {
2196
2163
  readonly area: number;
2197
2164
  /** Number of extracted outer and hole contours. */
2198
2165
  readonly contourCount: number;
2199
- /** Inclusive maximum coordinates in millimetres. */
2200
- readonly max: Vector2Data;
2201
- /** Inclusive minimum coordinates in millimetres. */
2202
- readonly min: Vector2Data;
2166
+ /** Immutable axis-aligned XY bounds in millimetres. */
2167
+ readonly bounds: Bounds2Data;
2203
2168
  /** Number of disconnected filled section components. */
2204
2169
  readonly componentCount: number;
2205
2170
  /** Number of native section vertices. */
@@ -2248,7 +2213,7 @@ export declare interface SmoothEdgeTreatment {
2248
2213
  * @example Shape a body with a through bore
2249
2214
  * ```ts
2250
2215
  * const body = box({ size: [30, 20, 6] })
2251
- * .subtract([cylinder({ height: 8, radius: 3 })])
2216
+ * .subtract(cylinder({ height: 8, radius: 3 }))
2252
2217
  * .rotate([0, 0, 45]);
2253
2218
  * ```
2254
2219
  */
@@ -2279,12 +2244,26 @@ export declare interface Solid {
2279
2244
  mirror(this: Solid, normal: Vector3Input): Solid;
2280
2245
  /** Applies a reusable XYZ placement or canonical row-major matrix. */
2281
2246
  transform(this: Solid, placement: Transform3Input): Solid;
2282
- /** Copies manufacturing mesh buffers for interchange; requires an active model execution. */
2283
- toTriangleMesh(this: Solid): TriangleMesh;
2247
+ /** Copies indexed Float32 XYZ and Uint32 triangle buffers in millimetres for interchange.
2248
+ * Requires an active synchronous model execution; the returned TriangleMesh is caller-owned.
2249
+ */
2250
+ toMesh(this: Solid): TriangleMesh;
2251
+ /** Robust union with one or more solids; an empty operand array preserves this solid. */
2252
+ union(this: Solid, operands: Solid | readonly Solid[]): Solid;
2284
2253
  /**
2285
- * Robust difference; an empty cutter array preserves the source.
2254
+ * Fuses an already positioned feature with a smooth (default) or straight width/height transition.
2255
+ * The source datum belongs to the feature; neither input moves or loses material.
2256
+ * Requires a verified local straight collar and continuous sampled support patch.
2257
+ * The result has no inherited anchors. This is not a rolling-ball fillet.
2286
2258
  */
2287
- subtract(this: Solid, cutters: readonly Solid[]): Solid;
2259
+ join(this: Solid, feature: Solid, options: JoinOptions): Solid;
2260
+ /** Robust intersection with every supplied solid; an empty operand array preserves this solid. */
2261
+ intersect(this: Solid, operands: Solid | readonly Solid[]): Solid;
2262
+ /**
2263
+ * Robust difference removing one cutter or the union of all supplied cutters.
2264
+ * An empty cutter array preserves this solid.
2265
+ */
2266
+ subtract(this: Solid, cutters: Solid | readonly Solid[]): Solid;
2288
2267
  /**
2289
2268
  * Simplifies a solid using an explicit positive millimetre tolerance.
2290
2269
  *
@@ -2311,6 +2290,42 @@ export declare interface Solid {
2311
2290
  projectSection(this: Solid): Section;
2312
2291
  /** Takes a filled horizontal slice at Z millimetres. */
2313
2292
  sliceSection(this: Solid, z: number): Section;
2293
+ /** Reads immutable bounds, volume in mm³, surface area in mm², and material-component count.
2294
+ * Requires active synchronous model execution; repeated reads share scoped native results.
2295
+ */
2296
+ inspect(this: Solid): SolidInspection;
2297
+ /** Checks whether this solid contains no geometry during active synchronous model execution. */
2298
+ isEmpty(this: Solid): boolean;
2299
+ /** Observes disconnected material pieces, retaining each piece's enclosed cavities.
2300
+ * Requires active synchronous model execution. Empty geometry gives []; order is unspecified.
2301
+ * Selections and recipes using them can only be evaluated in this session.
2302
+ * Containment is bounded to 2,000,000 comparisons; this does not cut connected geometry.
2303
+ */
2304
+ components(this: Solid): readonly Solid[];
2305
+ /** Reads a copied immutable named anchor during active synchronous model execution. */
2306
+ anchor(this: Solid, name: string): Anchor3;
2307
+ /** Measures actual minimum separation in millimetres during active synchronous model execution.
2308
+ * Contact or overlapping material gives zero; empty geometry and cross-session selections reject.
2309
+ * The kernel manages its search range; results follow native numeric precision.
2310
+ */
2311
+ distance(this: Solid, other: Solid): number;
2312
+ /** Copies intersections along the finite directed origin-to-endpoint segment in millimetres.
2313
+ * Requires active synchronous model execution.
2314
+ */
2315
+ castSegment(
2316
+ this: Solid,
2317
+ origin: Vector3Input,
2318
+ endpoint: Vector3Input,
2319
+ ): readonly SolidSegmentHit[];
2320
+ /** Splits into [inside the cutter, outside the cutter]; the cutter itself is not returned.
2321
+ * Either result may be empty or contain multiple disconnected components.
2322
+ */
2323
+ split(this: Solid, cutter: Solid): readonly [Solid, Solid];
2324
+ /** Splits into [positive-normal side, negative side] with closed cut faces.
2325
+ * The nonzero normal is normalized; offset is its signed distance from the origin in millimetres.
2326
+ * Offset defaults to zero. Either result may be empty.
2327
+ */
2328
+ splitByPlane(this: Solid, plane: PlaneOptions): readonly [Solid, Solid];
2314
2329
  }
2315
2330
 
2316
2331
  declare const solidBrand: unique symbol;
@@ -2321,10 +2336,11 @@ declare const solidBrand: unique symbol;
2321
2336
  * @example Mesh import
2322
2337
  * ```ts
2323
2338
  * import { solidFromMesh } from "@metamesh/modeling";
2324
- * import { extrudeMesh, rectangleContour } from "@metamesh/modeling/geometry";
2339
+ * import * as mesh from "@metamesh/modeling/geometry/mesh";
2340
+ * import { rectangleContour } from "@metamesh/modeling/geometry";
2325
2341
  *
2326
- * const mesh = extrudeMesh(rectangleContour({ size: [20, 12] }), { height: 6 });
2327
- * solidFromMesh(mesh);
2342
+ * const plate = mesh.extrude(rectangleContour({ size: [20, 12] }), { height: 6 });
2343
+ * solidFromMesh(plate);
2328
2344
  * ```
2329
2345
  */
2330
2346
  export declare function solidFromMesh(
@@ -2338,10 +2354,8 @@ export declare function solidFromMesh(
2338
2354
  export declare interface SolidInspection {
2339
2355
  /** Whether this native solid contains no material. */
2340
2356
  readonly isEmpty: boolean;
2341
- /** Inclusive maximum coordinates in millimetres. */
2342
- readonly max: Vector3Data;
2343
- /** Inclusive minimum coordinates in millimetres. */
2344
- readonly min: Vector3Data;
2357
+ /** Immutable axis-aligned XYZ bounds in millimetres. */
2358
+ readonly bounds: Bounds3Data;
2345
2359
  /** Number of disconnected material components, each retaining enclosed cavities. */
2346
2360
  readonly componentCount: number;
2347
2361
  /** Enclosed native solid volume in cubic millimetres. */
@@ -2394,54 +2408,8 @@ export declare type SphereOptions = CircularPrimitiveOptions &
2394
2408
  }
2395
2409
  );
2396
2410
 
2397
- /**
2398
- * Splits a solid into [inside the cutter, outside the cutter].
2399
- *
2400
- * The first result is the intersection; the second is the subtraction. The cutter itself
2401
- * is not returned. Either result may be empty or contain multiple disconnected components.
2402
- *
2403
- * @example Keep the plug and the surrounding body
2404
- * ```ts
2405
- * const body = box({ size: [30, 20, 8] });
2406
- * const cutter = cylinder({ height: 10, diameter: 8 });
2407
- * const [plug, remainder] = split(body, cutter);
2408
- * // Move the plug beside the body to show both results.
2409
- * union([plug.translate([0, -20, 0]), remainder]);
2410
- * ```
2411
- */
2412
- export declare function split(
2413
- solid: Solid,
2414
- cutter: Solid,
2415
- ): readonly [Solid, Solid];
2416
-
2417
- /**
2418
- * Splits a solid into [positive-normal side, negative side] at a world-space plane.
2419
- *
2420
- * The nonzero normal is normalized; offset is the signed distance from the origin in
2421
- * millimetres, defaulting to zero. Both cut faces are closed. Select either tuple result
2422
- * to retain one side; either result may be empty.
2423
- *
2424
- * @example Separate two halves at X = 0
2425
- * ```ts
2426
- * const body = box({ size: [30, 20, 8] });
2427
- * const [right, left] = splitByPlane(body, { normal: [1, 0, 0] });
2428
- * // The gap is only for display; the cut itself removes no material.
2429
- * union([right.translate([4, 0, 0]), left.translate([-4, 0, 0])]);
2430
- * ```
2431
- *
2432
- * @example Keep only the positive half
2433
- * ```ts
2434
- * const [right] = splitByPlane(box({ size: [30, 20, 8] }), { normal: [1, 0, 0] });
2435
- * right;
2436
- * ```
2437
- */
2438
- export declare function splitByPlane(
2439
- solid: Solid,
2440
- plane: PlaneOptions,
2441
- ): readonly [Solid, Solid];
2442
-
2443
2411
  /** Square profile with equal crest and root widths. */
2444
- declare interface SquareThreadProfileSpec extends ThreadProfileBaseSpec {
2412
+ export declare interface SquareThreadProfileSpec extends ThreadProfileBaseSpec {
2445
2413
  /** Selects the square profile family. */
2446
2414
  readonly kind: "square";
2447
2415
  /**
@@ -2461,22 +2429,26 @@ declare interface SquareThreadProfileSpec extends ThreadProfileBaseSpec {
2461
2429
  */
2462
2430
  export declare function star(options: StarOptions): Section;
2463
2431
 
2464
- /**
2465
- * Alternating outer and inner vertices, centered on the XY origin.
2466
- */
2467
- export declare interface StarOptions extends PrimitiveAttachment {
2468
- /** Explicit sampling ceilings, bounded by the host policy. */
2469
- readonly limits?: Partial<GeometrySamplingLimits>;
2432
+ /** Alternating vertex radii and exact point count for a centered XY star. */
2433
+ export declare interface StarContourOptions {
2470
2434
  /** Positive outer vertex radius in millimetres. */
2471
2435
  readonly outerRadius: number;
2472
- /** Positive inner vertex radius, smaller than the outer radius. */
2436
+ /** Positive inner vertex radius in millimetres, smaller than the outer radius. */
2473
2437
  readonly innerRadius: number;
2474
- /** Integer outer point count from three through 50000. */
2438
+ /** Integer outer point count, at least three; output contains twice as many vertices. */
2475
2439
  readonly points: number;
2476
- /** Initial counterclockwise rotation in degrees; defaults to zero. */
2440
+ /** Counterclockwise rotation in degrees; defaults to zero with an outer vertex on +X. */
2477
2441
  readonly rotation?: number;
2442
+ /** Explicit sampling ceilings, bounded by the host policy during modeling. */
2443
+ readonly limits?: Partial<GeometrySamplingLimits>;
2478
2444
  }
2479
2445
 
2446
+ /**
2447
+ * Alternating outer and inner vertices, centered on the XY origin.
2448
+ */
2449
+ export declare interface StarOptions
2450
+ extends StarContourOptions, PrimitiveAttachment {}
2451
+
2480
2452
  /**
2481
2453
  * Creates a centered-width native Section along a sampled XY path.
2482
2454
  *
@@ -2579,8 +2551,8 @@ export declare interface SvgSectionOptions {
2579
2551
  }
2580
2552
 
2581
2553
  /**
2582
- * Sweeps explicit corresponding contours using the selected frame policy.
2583
- * Filled Sections use `section.sweep(path, options)`.
2554
+ * Sweeps a filled Section or explicit corresponding contours using the selected frame policy.
2555
+ * Use `section.sweep(path, options)` in fluent sequences, or this function for generic profile inputs.
2584
2556
  *
2585
2557
  * @example Sweep
2586
2558
  * ```ts
@@ -2594,7 +2566,7 @@ export declare interface SvgSectionOptions {
2594
2566
  * ```
2595
2567
  */
2596
2568
  export declare function sweep(
2597
- shape: CorrespondingProfile,
2569
+ shape: Section | CorrespondingProfile,
2598
2570
  path: Path3Input,
2599
2571
  options?: SweepOptions,
2600
2572
  ): Solid;
@@ -2674,17 +2646,11 @@ export declare interface TextSectionOptions {
2674
2646
  readonly resolution?: GeometryResolution;
2675
2647
  }
2676
2648
 
2677
- /** End bevel controls shared by threaded rods and cutters. */
2678
- declare interface ThreadBevelOptions {
2679
- /** Apply a 45-degree bevel at Z=0. */
2680
- readonly bevelBottom?: boolean;
2681
- /**
2682
- * Axial bevel extent in millimetres. Active blunt ends default to one sixth of the compensated
2683
- * male minor radius or female major radius; other ends default to the profile depth.
2684
- */
2685
- readonly bevelSize?: number;
2686
- /** Apply a 45-degree bevel at Z=length. */
2687
- readonly bevelTop?: boolean;
2649
+ /** 45-degree end bevels for compensated rods and cutters. */
2650
+ export declare interface ThreadBevelOptions {
2651
+ /** Bottom/top sizes in millimetres. Omitted disables both. Auto uses profile depth for standard/tapered ends,
2652
+ * or one sixth of the compensated male minor/female major radius for blunt ends. */
2653
+ readonly bevel?: Bevel;
2688
2654
  }
2689
2655
 
2690
2656
  /**
@@ -2701,25 +2667,20 @@ declare interface ThreadBevelOptions {
2701
2667
  */
2702
2668
  export declare function threadedNut(options: ThreadedNutOptions): Solid;
2703
2669
 
2704
- /** Nut-edge bevel selection. */
2705
- export declare type ThreadedNutBevel =
2706
- "automatic" | "both" | "inside" | "none" | "outside";
2707
-
2708
2670
  /**
2709
2671
  * Options for a compensated nut with an internal thread.
2710
2672
  */
2711
2673
  export declare interface ThreadedNutOptions extends Omit<
2712
2674
  InternalThreadCutterOptions,
2713
- "bevelBottom" | "bevelSize" | "bevelTop" | "length"
2675
+ "bevel" | "length"
2714
2676
  > {
2715
- /** Nut body bevel selection. Default: `automatic`. */
2716
- readonly bevel?: ThreadedNutBevel;
2677
+ /** Opening bevels in [bottom, top] order. Omitted or auto uses min(profile.depth, thickness/4); zero disables. */
2678
+ readonly innerBevel?: Bevel;
2679
+ /** Body bevels in [bottom, top] order. Omitted or auto uses min(profile.depth, thickness/4).
2680
+ * Use [0, "auto"] to keep the outside bottom flat without disabling its inner opening bevel. */
2681
+ readonly outerBevel?: Bevel;
2717
2682
  /** Optional physical policy for a round body, independent of the thread's matched facet grid. */
2718
2683
  readonly bodyResolution?: GeometryResolution;
2719
- /** 45-degree body chamfer extent. Default: `min(profile.depth, thickness/4)`. */
2720
- readonly chamferSize?: number;
2721
- /** Leave the bottom outside edge flat for build-plate adhesion. Default: `false`. */
2722
- readonly flushBuildPlateBottom?: boolean;
2723
2684
  /** Nut body shape. */
2724
2685
  readonly shape: ThreadedNutShape;
2725
2686
  /** Nut thickness along +Z in millimetres. */
@@ -2732,8 +2693,10 @@ export declare interface ThreadedNutOptions extends Omit<
2732
2693
  export declare interface ThreadedNutPreflight {
2733
2694
  /** Polygon segment count used by the nut body. */
2734
2695
  readonly bodySegments: number;
2735
- /** Shared 45-degree chamfer size applied to the selected body and cutter edges. */
2736
- readonly chamferSize: number;
2696
+ /** Resolved opening bevel sizes in millimetres, [bottom, top]. */
2697
+ readonly innerBevel: readonly [bottom: number, top: number];
2698
+ /** Resolved body bevel sizes in millimetres, [bottom, top]. */
2699
+ readonly outerBevel: readonly [bottom: number, top: number];
2737
2700
  /** Maximum compensated cutter radius at either requested face. */
2738
2701
  readonly cutterFaceRadius: number;
2739
2702
  /** Minimum nut-body inradius across the requested top and bottom faces. */
@@ -2741,7 +2704,7 @@ export declare interface ThreadedNutPreflight {
2741
2704
  /** Smallest radial wall left between the body and cutter at either requested face. */
2742
2705
  readonly minimumFaceWall: number;
2743
2706
  /** Conservative allocation estimates for the extended cutter; excludes the body and Boolean result. */
2744
- readonly thread: HelicalThreadSolidMeshPreflight;
2707
+ readonly thread: ThreadSolidPreflight;
2745
2708
  /** Start-aligned circular facet count used by the compensated thread cutter. */
2746
2709
  readonly threadCircularSegments: number;
2747
2710
  }
@@ -2769,9 +2732,7 @@ export declare function threadedRod(options: ThreadedRodOptions): Solid;
2769
2732
  * Options for a compensated external threaded rod along +Z.
2770
2733
  */
2771
2734
  export declare interface ThreadedRodOptions
2772
- extends
2773
- Omit<HelicalThreadRidgeMeshOptions, "majorDiameter">,
2774
- ThreadBevelOptions {
2735
+ extends Omit<ThreadRidgeOptions, "majorDiameter">, ThreadBevelOptions {
2775
2736
  /** Printable fit or caller-calibrated allowances. Default: `normal`. */
2776
2737
  readonly fit?: PrintableThreadFit | PrintableThreadFitPolicy;
2777
2738
  /** Nominal major diameter before male compensation. */
@@ -2848,7 +2809,7 @@ export declare interface ThreadProfile {
2848
2809
  }
2849
2810
 
2850
2811
  /** Fields shared by all thread profile specifications. */
2851
- declare interface ThreadProfileBaseSpec {
2812
+ export declare interface ThreadProfileBaseSpec {
2852
2813
  /** Adjacent axial thread spacing in millimetres. */
2853
2814
  readonly pitch: number;
2854
2815
  /** Optional numerical tolerance overrides. */
@@ -2858,7 +2819,7 @@ declare interface ThreadProfileBaseSpec {
2858
2819
  /**
2859
2820
  * Supported built-in and caller-defined thread profiles.
2860
2821
  */
2861
- declare type ThreadProfileSpec =
2822
+ export declare type ThreadProfileSpec =
2862
2823
  | AcmeThreadProfileSpec
2863
2824
  | ButtressThreadProfileSpec
2864
2825
  | CustomThreadProfileSpec
@@ -2869,8 +2830,44 @@ declare type ThreadProfileSpec =
2869
2830
  /** Helical ridge mesh construction. */
2870
2831
  export declare function threadRidge(options: ThreadRidgeOptions): Solid;
2871
2832
 
2872
- /** Parameters for a helical ridge before solid construction. */
2873
- export declare type ThreadRidgeOptions = HelicalThreadRidgeMeshOptions;
2833
+ /** Runtime-neutral options for the dedicated helical ridge mesher. */
2834
+ export declare interface ThreadRidgeOptions {
2835
+ /**
2836
+ * Optional bottom/top ridge-end treatments. Standalone ridges honor the requested boundaries;
2837
+ * BOSL2-style non-cut lead-in scaling is available on complete thread solids.
2838
+ */
2839
+ readonly ends?: ThreadEndTreatmentOptions;
2840
+ /** Helix direction. Default: `right`. */
2841
+ readonly handedness?: ThreadHandedness;
2842
+ /** Total threaded axial length in millimetres. */
2843
+ readonly length: number;
2844
+ /** Explicit output and circular allocation ceilings. */
2845
+ readonly limits?: Partial<ModelingLimits>;
2846
+ /** Nominal major diameter before any caller-owned fit compensation. */
2847
+ readonly majorDiameter: number;
2848
+ /** Angular offset of the first start in degrees. Default: `0`. */
2849
+ readonly phase?: number;
2850
+ /** Validated periodic profile repeated around the shaft. */
2851
+ readonly profile: ThreadProfile;
2852
+ /** Optional circular-resolution policy. */
2853
+ readonly resolution?: GeometryResolution;
2854
+ /** Number of evenly phased starts. Default: `1`. */
2855
+ readonly starts?: number;
2856
+ /** Optional numerical tolerance overrides. */
2857
+ readonly tolerance?: GeometryToleranceOptions;
2858
+ }
2859
+
2860
+ /** Selected sampling counts and conservative allocation estimates, before thread mesh construction. */
2861
+ export declare interface ThreadSolidPreflight {
2862
+ /** Uniform axial intervals required only by a requested physical segment-length limit. */
2863
+ readonly axialIntervals: number;
2864
+ /** Start-aligned full-circle segment count used by the surface mesh. */
2865
+ readonly circularSegments: number;
2866
+ /** Conservative surface-row count across profile breaks, ends, and bevel stations. */
2867
+ readonly estimatedRows: number;
2868
+ /** Conservative triangle count used by the selected output allocation policy. */
2869
+ readonly estimatedTriangles: number;
2870
+ }
2874
2871
 
2875
2872
  /**
2876
2873
  * Torus around +Z.
@@ -3038,7 +3035,7 @@ export declare type Transform3Data = readonly [
3038
3035
  export declare type Transform3Input = Transform3 | Transform3Data;
3039
3036
 
3040
3037
  /** Trapezoidal thread profile with a configurable included angle. */
3041
- declare interface TrapezoidalThreadProfileSpec extends ThreadProfileBaseSpec {
3038
+ export declare interface TrapezoidalThreadProfileSpec extends ThreadProfileBaseSpec {
3042
3039
  /** Selects the trapezoidal profile family. */
3043
3040
  readonly kind: "trapezoidal";
3044
3041
  /**
@@ -3054,13 +3051,11 @@ declare interface TrapezoidalThreadProfileSpec extends ThreadProfileBaseSpec {
3054
3051
  readonly includedAngle?: number;
3055
3052
  }
3056
3053
 
3057
- /**
3058
- * A topology-preserving indexed triangle mesh with XYZ vertex positions.
3059
- */
3054
+ /** A topology-preserving indexed triangle mesh with mutable owned XYZ buffers. */
3060
3055
  export declare interface TriangleMesh {
3061
3056
  /** Three unsigned vertex indices per triangle. */
3062
3057
  readonly indices: Uint32Array;
3063
- /** Flat XYZ coordinates, three finite values per vertex. */
3058
+ /** Flat XYZ coordinates in millimetres. */
3064
3059
  readonly positions: Float32Array;
3065
3060
  }
3066
3061
 
@@ -3068,8 +3063,9 @@ export declare interface TriangleMesh {
3068
3063
  * Measurements and optional edge-connected topology from one validated mesh traversal.
3069
3064
  */
3070
3065
  export declare interface TriangleMeshAnalysis extends TriangleMeshMeasurements {
3071
- /** Number of referenced edge-connected boundary shells when `includeTopology` is requested; cavities count separately. */
3072
- readonly connectedComponentCount?: number;
3066
+ /** Number of surface shells connected by shared indexed edges when includeTopology is requested.
3067
+ * Cavities count separately; shells may be open unless requireClosed is enabled. Coordinates are not welded. */
3068
+ readonly shellCount?: number;
3073
3069
  /** Number of distinct indexed undirected edges when `includeTopology` is requested. */
3074
3070
  readonly edgeCount?: number;
3075
3071
  }
@@ -3090,10 +3086,18 @@ export declare interface TriangleMeshMeasurements {
3090
3086
  readonly vertexCount: number;
3091
3087
  }
3092
3088
 
3089
+ /** Mesh measurements with the indexed surface-shell and edge counts requested by includeTopology. */
3090
+ export declare interface TriangleMeshTopologyAnalysis extends TriangleMeshAnalysis {
3091
+ /** Number of surface shells connected by shared indexed edges; cavities count separately. */
3092
+ readonly shellCount: number;
3093
+ /** Number of distinct indexed undirected edges. */
3094
+ readonly edgeCount: number;
3095
+ }
3096
+
3093
3097
  /**
3094
3098
  * ISO/UTS-like 60-degree truncated triangular profile.
3095
3099
  */
3096
- declare interface TriangularThreadProfileSpec extends ThreadProfileBaseSpec {
3100
+ export declare interface TriangularThreadProfileSpec extends ThreadProfileBaseSpec {
3097
3101
  /** Selects the 60-degree triangular profile family. */
3098
3102
  readonly kind: "triangular";
3099
3103
  /**
@@ -3121,23 +3125,44 @@ export declare function tube(options: TubeOptions): Solid;
3121
3125
  /**
3122
3126
  * Dimensions, placement, and tessellation for a hollow Z-axis tube.
3123
3127
  */
3124
- export declare interface TubeOptions
3125
- extends CircularPrimitiveOptions, PrimitiveAttachment {
3126
- /**
3127
- * Centers the tube on the Z origin when `true`; otherwise its bottom is at `Z = 0`.
3128
- * @defaultValue `true`
3129
- */
3130
- readonly center?: boolean;
3131
- /** Total height along Z in millimetres. */
3132
- readonly height: number;
3133
- /** Positive inner radius in millimetres. */
3134
- readonly innerRadius: number;
3135
- /** Outer radius in millimetres; greater than {@link TubeOptions.innerRadius}. */
3136
- readonly outerRadius: number;
3137
- }
3128
+ export declare type TubeOptions = CircularPrimitiveOptions &
3129
+ PrimitiveAttachment & {
3130
+ /**
3131
+ * Centers the tube on the Z origin when `true`; otherwise its bottom is at `Z = 0`.
3132
+ * @defaultValue `true`
3133
+ */
3134
+ readonly center?: boolean;
3135
+ /** Total height along Z in millimetres. */
3136
+ readonly height: number;
3137
+ /** Inner nominal dimension meets polygon vertices or faces; defaults to vertex. */
3138
+ readonly innerSizing?: RadialSizing;
3139
+ /** Outer nominal dimension meets polygon vertices or faces; defaults to vertex. */
3140
+ readonly outerSizing?: RadialSizing;
3141
+ } & (
3142
+ | {
3143
+ /** Positive nominal inner radius in millimetres. */
3144
+ readonly innerRadius: number;
3145
+ /** Nominal outer radius in millimetres, greater than innerRadius. */
3146
+ readonly outerRadius: number;
3147
+ /** Diameter dimensions cannot be combined with radius dimensions. */
3148
+ readonly innerDiameter?: never;
3149
+ /** Diameter dimensions cannot be combined with radius dimensions. */
3150
+ readonly outerDiameter?: never;
3151
+ }
3152
+ | {
3153
+ /** Positive nominal inner diameter in millimetres. */
3154
+ readonly innerDiameter: number;
3155
+ /** Nominal outer diameter in millimetres, greater than innerDiameter. */
3156
+ readonly outerDiameter: number;
3157
+ /** Radius dimensions cannot be combined with diameter dimensions. */
3158
+ readonly innerRadius?: never;
3159
+ /** Radius dimensions cannot be combined with diameter dimensions. */
3160
+ readonly outerRadius?: never;
3161
+ }
3162
+ );
3138
3163
 
3139
3164
  /**
3140
- * Robust union.
3165
+ * Robust union of one or more shapes; empty input rejects during declaration.
3141
3166
  *
3142
3167
  * @example Union
3143
3168
  * ```ts