@faicad/faijs 0.30.9 → 0.31.1

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 (284) hide show
  1. package/dist/api/align/index.d.ts +64 -0
  2. package/dist/api/align/index.d.ts.map +1 -0
  3. package/dist/api/align/index.js +101 -0
  4. package/dist/api/align/index.js.map +1 -0
  5. package/dist/api/api-namespace.d.ts +5 -4
  6. package/dist/api/api-namespace.d.ts.map +1 -1
  7. package/dist/api/api-namespace.js +36 -4
  8. package/dist/api/api-namespace.js.map +1 -1
  9. package/dist/api/boolean-op/index.d.ts +65 -0
  10. package/dist/api/boolean-op/index.d.ts.map +1 -0
  11. package/dist/api/boolean-op/index.js +113 -0
  12. package/dist/api/boolean-op/index.js.map +1 -0
  13. package/dist/api/boolean.d.ts.map +1 -1
  14. package/dist/api/boolean.js +15 -27
  15. package/dist/api/boolean.js.map +1 -1
  16. package/dist/api/brep-operations/healingFns.d.ts +13 -0
  17. package/dist/api/brep-operations/healingFns.d.ts.map +1 -1
  18. package/dist/api/brep-operations/healingFns.js +28 -1
  19. package/dist/api/brep-operations/healingFns.js.map +1 -1
  20. package/dist/api/brep-operations/topologyFns.d.ts +27 -6
  21. package/dist/api/brep-operations/topologyFns.d.ts.map +1 -1
  22. package/dist/api/brep-operations/topologyFns.js +46 -22
  23. package/dist/api/brep-operations/topologyFns.js.map +1 -1
  24. package/dist/api/chamfer.d.ts +5 -4
  25. package/dist/api/chamfer.d.ts.map +1 -1
  26. package/dist/api/chamfer.js +12 -11
  27. package/dist/api/chamfer.js.map +1 -1
  28. package/dist/api/curve-sketch/index.d.ts.map +1 -1
  29. package/dist/api/curve-sketch/index.js +9 -3
  30. package/dist/api/curve-sketch/index.js.map +1 -1
  31. package/dist/api/draft.d.ts.map +1 -1
  32. package/dist/api/draft.js +1 -3
  33. package/dist/api/draft.js.map +1 -1
  34. package/dist/api/engrave.d.ts.map +1 -1
  35. package/dist/api/engrave.js +3 -13
  36. package/dist/api/engrave.js.map +1 -1
  37. package/dist/api/export-3mf.d.ts +73 -0
  38. package/dist/api/export-3mf.d.ts.map +1 -0
  39. package/dist/api/export-3mf.js +121 -0
  40. package/dist/api/export-3mf.js.map +1 -0
  41. package/dist/api/export-brep.d.ts +6 -0
  42. package/dist/api/export-brep.d.ts.map +1 -1
  43. package/dist/api/export-brep.js +11 -2
  44. package/dist/api/export-brep.js.map +1 -1
  45. package/dist/api/export-step.d.ts +67 -0
  46. package/dist/api/export-step.d.ts.map +1 -0
  47. package/dist/api/export-step.js +98 -0
  48. package/dist/api/export-step.js.map +1 -0
  49. package/dist/api/export-stl.d.ts +8 -0
  50. package/dist/api/export-stl.d.ts.map +1 -1
  51. package/dist/api/export-stl.js +23 -8
  52. package/dist/api/export-stl.js.map +1 -1
  53. package/dist/api/feature-repair.d.ts +1 -1
  54. package/dist/api/feature-repair.d.ts.map +1 -1
  55. package/dist/api/feature-repair.js +1 -7
  56. package/dist/api/feature-repair.js.map +1 -1
  57. package/dist/api/fillet-variable.d.ts.map +1 -1
  58. package/dist/api/fillet-variable.js +0 -1
  59. package/dist/api/fillet-variable.js.map +1 -1
  60. package/dist/api/fillet.d.ts +3 -3
  61. package/dist/api/fillet.d.ts.map +1 -1
  62. package/dist/api/fillet.js +3 -4
  63. package/dist/api/fillet.js.map +1 -1
  64. package/dist/api/generated/operations.js +6 -6
  65. package/dist/api/generated/operations.js.map +1 -1
  66. package/dist/api/generated/script-face-manifest.d.ts +1 -1
  67. package/dist/api/generated/script-face-manifest.js +3 -3
  68. package/dist/api/generated/script-face-manifest.js.map +1 -1
  69. package/dist/api/generated/script-face.d.ts +1 -1
  70. package/dist/api/generated/script-face.js +1 -1
  71. package/dist/api/generated/script-face.js.map +1 -1
  72. package/dist/api/generated/sketching.js +1 -1
  73. package/dist/api/generated/sketching.js.map +1 -1
  74. package/dist/api/generated/topology.js +10 -10
  75. package/dist/api/generated/topology.js.map +1 -1
  76. package/dist/api/helix.d.ts +1 -1
  77. package/dist/api/helix.js +1 -1
  78. package/dist/api/helix.js.map +1 -1
  79. package/dist/api/index.d.ts +4 -1
  80. package/dist/api/index.d.ts.map +1 -1
  81. package/dist/api/index.js +16 -4
  82. package/dist/api/index.js.map +1 -1
  83. package/dist/api/internal/compat-op.d.ts +6 -6
  84. package/dist/api/internal/compat-op.d.ts.map +1 -1
  85. package/dist/api/internal/compat-op.js +7 -9
  86. package/dist/api/internal/compat-op.js.map +1 -1
  87. package/dist/api/internal/export-members.d.ts +80 -0
  88. package/dist/api/internal/export-members.d.ts.map +1 -0
  89. package/dist/api/internal/export-members.js +104 -0
  90. package/dist/api/internal/export-members.js.map +1 -0
  91. package/dist/api/internal/l3-bridge.d.ts +17 -0
  92. package/dist/api/internal/l3-bridge.d.ts.map +1 -1
  93. package/dist/api/internal/l3-bridge.js +23 -1
  94. package/dist/api/internal/l3-bridge.js.map +1 -1
  95. package/dist/api/measure-query/index.d.ts +262 -0
  96. package/dist/api/measure-query/index.d.ts.map +1 -0
  97. package/dist/api/measure-query/index.js +390 -0
  98. package/dist/api/measure-query/index.js.map +1 -0
  99. package/dist/api/pattern.d.ts.map +1 -1
  100. package/dist/api/pattern.js +0 -3
  101. package/dist/api/pattern.js.map +1 -1
  102. package/dist/api/primitives.d.ts +6 -6
  103. package/dist/api/primitives.d.ts.map +1 -1
  104. package/dist/api/primitives.js +12 -11
  105. package/dist/api/primitives.js.map +1 -1
  106. package/dist/api/profile.d.ts.map +1 -1
  107. package/dist/api/profile.js +0 -1
  108. package/dist/api/profile.js.map +1 -1
  109. package/dist/api/punch-hole.d.ts.map +1 -1
  110. package/dist/api/punch-hole.js +0 -1
  111. package/dist/api/punch-hole.js.map +1 -1
  112. package/dist/api/replicate.d.ts +5 -7
  113. package/dist/api/replicate.d.ts.map +1 -1
  114. package/dist/api/replicate.js +18 -56
  115. package/dist/api/replicate.js.map +1 -1
  116. package/dist/api/section-by-plane.d.ts.map +1 -1
  117. package/dist/api/section-by-plane.js +0 -1
  118. package/dist/api/section-by-plane.js.map +1 -1
  119. package/dist/api/shell.d.ts +1 -1
  120. package/dist/api/shell.d.ts.map +1 -1
  121. package/dist/api/shell.js +11 -2
  122. package/dist/api/shell.js.map +1 -1
  123. package/dist/api/sketch-on-face.d.ts +3 -3
  124. package/dist/api/sketch-on-face.d.ts.map +1 -1
  125. package/dist/api/sketch-on-face.js +6 -4
  126. package/dist/api/sketch-on-face.js.map +1 -1
  127. package/dist/api/sketch-on-plane.d.ts.map +1 -1
  128. package/dist/api/sketch-on-plane.js +0 -1
  129. package/dist/api/sketch-on-plane.js.map +1 -1
  130. package/dist/api/split-by-plane.d.ts.map +1 -1
  131. package/dist/api/split-by-plane.js +0 -1
  132. package/dist/api/split-by-plane.js.map +1 -1
  133. package/dist/api/split.d.ts +1 -1
  134. package/dist/api/split.js +1 -1
  135. package/dist/api/split.js.map +1 -1
  136. package/dist/api/surface/arg-spec.d.ts +3 -12
  137. package/dist/api/surface/arg-spec.d.ts.map +1 -1
  138. package/dist/api/surface/arg-spec.js +19 -26
  139. package/dist/api/surface/arg-spec.js.map +1 -1
  140. package/dist/api/sweep.d.ts +15 -3
  141. package/dist/api/sweep.d.ts.map +1 -1
  142. package/dist/api/sweep.js +5 -3
  143. package/dist/api/sweep.js.map +1 -1
  144. package/dist/api/thicken.d.ts.map +1 -1
  145. package/dist/api/thicken.js +11 -2
  146. package/dist/api/thicken.js.map +1 -1
  147. package/dist/api/transform.d.ts +3 -3
  148. package/dist/api/transform.d.ts.map +1 -1
  149. package/dist/api/transform.js +47 -17
  150. package/dist/api/transform.js.map +1 -1
  151. package/dist/boolean/index.d.ts +23 -0
  152. package/dist/boolean/index.d.ts.map +1 -0
  153. package/dist/boolean/index.js +27 -0
  154. package/dist/boolean/index.js.map +1 -0
  155. package/dist/brep/brep-chain.d.ts +1 -19
  156. package/dist/brep/brep-chain.d.ts.map +1 -1
  157. package/dist/brep/brep-chain.js +0 -1
  158. package/dist/brep/brep-chain.js.map +1 -1
  159. package/dist/brep/brep-ops.d.ts +4 -1
  160. package/dist/brep/brep-ops.d.ts.map +1 -1
  161. package/dist/brep/brep-ops.js +9 -5
  162. package/dist/brep/brep-ops.js.map +1 -1
  163. package/dist/brep/engine/adapters/brep-mock.d.ts.map +1 -1
  164. package/dist/brep/engine/adapters/brep-mock.js +0 -3
  165. package/dist/brep/engine/adapters/brep-mock.js.map +1 -1
  166. package/dist/brep/engine/adapters/brepkit.d.ts +4 -3
  167. package/dist/brep/engine/adapters/brepkit.d.ts.map +1 -1
  168. package/dist/brep/engine/adapters/brepkit.js +4 -98
  169. package/dist/brep/engine/adapters/brepkit.js.map +1 -1
  170. package/dist/brep/engine/adapters/occt.d.ts.map +1 -1
  171. package/dist/brep/engine/adapters/occt.js +0 -144
  172. package/dist/brep/engine/adapters/occt.js.map +1 -1
  173. package/dist/brep/engine/native-history.d.ts +27 -0
  174. package/dist/brep/engine/native-history.d.ts.map +1 -0
  175. package/dist/brep/engine/native-history.js +54 -0
  176. package/dist/brep/engine/native-history.js.map +1 -0
  177. package/dist/brep/engine/registry.d.ts +2 -4
  178. package/dist/brep/engine/registry.d.ts.map +1 -1
  179. package/dist/brep/engine/registry.js +1 -1
  180. package/dist/brep/engine/registry.js.map +1 -1
  181. package/dist/brep/engine/types.d.ts +35 -77
  182. package/dist/brep/engine/types.d.ts.map +1 -1
  183. package/dist/brep/engine/types.js.map +1 -1
  184. package/dist/brep/export/export-model.d.ts +21 -0
  185. package/dist/brep/export/export-model.d.ts.map +1 -1
  186. package/dist/brep/export/export-model.js +171 -73
  187. package/dist/brep/export/export-model.js.map +1 -1
  188. package/dist/brep/export/step.d.ts +17 -1
  189. package/dist/brep/export/step.d.ts.map +1 -1
  190. package/dist/brep/export/step.js +133 -0
  191. package/dist/brep/export/step.js.map +1 -1
  192. package/dist/brep/export/stl.d.ts +22 -1
  193. package/dist/brep/export/stl.d.ts.map +1 -1
  194. package/dist/brep/export/stl.js +58 -10
  195. package/dist/brep/export/stl.js.map +1 -1
  196. package/dist/brep/export/transform12.d.ts +47 -0
  197. package/dist/brep/export/transform12.d.ts.map +1 -0
  198. package/dist/brep/export/transform12.js +87 -0
  199. package/dist/brep/export/transform12.js.map +1 -0
  200. package/dist/brep/face-evolution.d.ts +53 -0
  201. package/dist/brep/face-evolution.d.ts.map +1 -1
  202. package/dist/brep/face-evolution.js +65 -0
  203. package/dist/brep/face-evolution.js.map +1 -1
  204. package/dist/browser-host/index.d.ts +4 -1
  205. package/dist/browser-host/index.d.ts.map +1 -1
  206. package/dist/browser-host/index.js +7 -1
  207. package/dist/browser-host/index.js.map +1 -1
  208. package/dist/browser.d.ts +4 -8
  209. package/dist/browser.d.ts.map +1 -1
  210. package/dist/browser.js +4 -26
  211. package/dist/browser.js.map +1 -1
  212. package/dist/cad-runtime/backend-dispatch.d.ts +13 -58
  213. package/dist/cad-runtime/backend-dispatch.d.ts.map +1 -1
  214. package/dist/cad-runtime/backend-dispatch.js +22 -80
  215. package/dist/cad-runtime/backend-dispatch.js.map +1 -1
  216. package/dist/cad-runtime/content-key.d.ts +3 -3
  217. package/dist/cad-runtime/content-key.js +3 -3
  218. package/dist/cad-runtime/content-key.js.map +1 -1
  219. package/dist/cad-runtime/ports.d.ts +28 -0
  220. package/dist/cad-runtime/ports.d.ts.map +1 -1
  221. package/dist/cad-runtime/ports.js.map +1 -1
  222. package/dist/cad-runtime/runtime.d.ts +33 -12
  223. package/dist/cad-runtime/runtime.d.ts.map +1 -1
  224. package/dist/cad-runtime/runtime.js +44 -48
  225. package/dist/cad-runtime/runtime.js.map +1 -1
  226. package/dist/define-op.d.ts +6 -11
  227. package/dist/define-op.d.ts.map +1 -1
  228. package/dist/define-op.js +3 -20
  229. package/dist/define-op.js.map +1 -1
  230. package/dist/env-agnostic.d.ts +2 -2
  231. package/dist/env-agnostic.d.ts.map +1 -1
  232. package/dist/env-agnostic.js +1 -1
  233. package/dist/env-agnostic.js.map +1 -1
  234. package/dist/index.d.ts +13 -64
  235. package/dist/index.d.ts.map +1 -1
  236. package/dist/index.js +17 -75
  237. package/dist/index.js.map +1 -1
  238. package/dist/lang/symbol-table.generated.d.ts +17 -0
  239. package/dist/lang/symbol-table.generated.d.ts.map +1 -1
  240. package/dist/lang/symbol-table.generated.js +17 -0
  241. package/dist/lang/symbol-table.generated.js.map +1 -1
  242. package/dist/mesh/index.d.ts +18 -23
  243. package/dist/mesh/index.d.ts.map +1 -1
  244. package/dist/mesh/index.js +18 -20
  245. package/dist/mesh/index.js.map +1 -1
  246. package/dist/mesh/io.d.ts +42 -14
  247. package/dist/mesh/io.d.ts.map +1 -1
  248. package/dist/mesh/io.js +77 -13
  249. package/dist/mesh/io.js.map +1 -1
  250. package/dist/mesh/threemf-loader.d.ts +38 -4
  251. package/dist/mesh/threemf-loader.d.ts.map +1 -1
  252. package/dist/mesh/threemf-loader.js +115 -34
  253. package/dist/mesh/threemf-loader.js.map +1 -1
  254. package/dist/mesh/types.d.ts +30 -0
  255. package/dist/mesh/types.d.ts.map +1 -1
  256. package/dist/mesh/types.js.map +1 -1
  257. package/dist/node-host/execute-script.d.ts +2 -1
  258. package/dist/node-host/execute-script.d.ts.map +1 -1
  259. package/dist/node-host/execute-script.js +5 -4
  260. package/dist/node-host/execute-script.js.map +1 -1
  261. package/dist/node-host/index.d.ts +1 -0
  262. package/dist/node-host/index.d.ts.map +1 -1
  263. package/dist/node-host/index.js +4 -0
  264. package/dist/node-host/index.js.map +1 -1
  265. package/dist/primitives/index.d.ts +19 -0
  266. package/dist/primitives/index.d.ts.map +1 -0
  267. package/dist/primitives/index.js +21 -0
  268. package/dist/primitives/index.js.map +1 -0
  269. package/dist/runtime-state.d.ts +63 -29
  270. package/dist/runtime-state.d.ts.map +1 -1
  271. package/dist/runtime-state.js +57 -0
  272. package/dist/runtime-state.js.map +1 -1
  273. package/dist/sdf/index.d.ts +12 -0
  274. package/dist/sdf/index.d.ts.map +1 -0
  275. package/dist/sdf/index.js +13 -0
  276. package/dist/sdf/index.js.map +1 -0
  277. package/dist/sdk.d.ts +0 -1
  278. package/dist/sdk.d.ts.map +1 -1
  279. package/dist/sdk.js.map +1 -1
  280. package/dist/weapp.d.ts +2 -2
  281. package/dist/weapp.d.ts.map +1 -1
  282. package/dist/weapp.js +1 -1
  283. package/dist/weapp.js.map +1 -1
  284. package/package.json +276 -35
@@ -1 +1 @@
1
- {"version":3,"file":"topology.js","sourceRoot":"","sources":["../../../src/api/generated/topology.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAGrD,OAAO,EAAE,SAAS,IAAI,eAAe,EAAE,MAAM,iCAAiC,CAAA;AAC9E,OAAO,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,+BAA+B,CAAA;AAC1E,OAAO,EAAE,aAAa,IAAI,mBAAmB,EAAE,MAAM,iCAAiC,CAAA;AACtF,OAAO,EAAE,UAAU,IAAI,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AAC/E,OAAO,EAAE,UAAU,IAAI,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AAC/E,OAAO,EAAE,SAAS,IAAI,eAAe,EAAE,MAAM,gCAAgC,CAAA;AAC7E,OAAO,EAAE,eAAe,IAAI,qBAAqB,EAAE,MAAM,gCAAgC,CAAA;AACzF,OAAO,EAAE,UAAU,IAAI,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AAC/E,OAAO,EAAE,WAAW,IAAI,iBAAiB,EAAE,MAAM,+BAA+B,CAAA;AAChF,OAAO,EAAE,SAAS,IAAI,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC5E,OAAO,EAAE,SAAS,IAAI,eAAe,EAAE,MAAM,gCAAgC,CAAA;AAC7E,OAAO,EAAE,UAAU,IAAI,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AAC/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;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,QAAQ,CAAC;IAC/B,IAAI,EAAE,kBAAkB;IACxB,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,EAAC,MAAM,EAAC,QAAQ,EAAC,UAAU,EAAC,EAAC,KAAK,EAAC,aAAa,EAAC,EAAC,EAAE,YAAY,EAAE,CAAC,UAAU,CAAC;CACzG,CAAC,CAAA;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,QAAQ,CAAC;IAChC,IAAI,EAAE,mBAAmB;IACzB,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,EAAC,MAAM,EAAC,QAAQ,EAAC,UAAU,EAAC,EAAC,KAAK,EAAC,aAAa,EAAC,EAAC,EAAE,YAAY,EAAE,CAAC,WAAW,CAAC;CAC3G,CAAC,CAAA;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,QAAQ,CAAC;IAC1C,IAAI,EAAE,6BAA6B;IACnC,IAAI,EAAE,qBAAqB,EAAE,MAAM,EAAE,EAAC,MAAM,EAAC,QAAQ,EAAC,UAAU,EAAC,EAAC,KAAK,EAAC,aAAa,EAAC,EAAC,EAAE,OAAO,EAAE,CAAC,MAAM,CAAC;CAC3G,CAAC,CAAA","sourcesContent":["/**\n * generated/topology.ts — 生成文件,勿手改。\n * 由 packages/core/scripts/gen-l3-surface.ts 依据 api/surface/arg-spec.ts 生成(E5/P14 分片)。\n * topology 模块:21 个投影符号;另有 281 个 skip 登记。\n * A6(2026-10-06)口径指认:本文件是 brepjs 投影面的**增量**清单;脚本面全集的\n * 权威来源是 generated/script-face.ts + gen-symbol-table 产物\n * lang/symbol-table.generated.ts(cad 脚本面 95 op)。两个清单回答不同问题,\n * 互不为超集——禁止用本文件的名字反推脚本面能力。\n */\nimport { defineOp } from '../../define-op'\nimport { brepOf } from '../../shape'\nimport { getBrepApi } from '../../brep/handle-bridge'\nimport type { BrepHandle } from '../../brep/engine/types'\nimport type { Shape } from '../../mesh/types'\nimport { torusBrep as __own_torusBrep } from '../brep-operations/primitiveFns'\nimport { fuseBrep as __own_fuseBrep } from '../brep-operations/booleanFns'\nimport { ellipsoidBrep as __own_ellipsoidBrep } from '../brep-operations/primitiveFns'\nimport { rotateBrep as __own_rotateBrep } from '../brep-operations/topologyFns'\nimport { mirrorBrep as __own_mirrorBrep } from '../brep-operations/topologyFns'\nimport { cloneBrep as __own_cloneBrep } from '../brep-operations/topologyFns'\nimport { applyMatrixBrep as __own_applyMatrixBrep } from '../brep-operations/topologyFns'\nimport { locateBrep as __own_locateBrep } from '../brep-operations/topologyFns'\nimport { sectionBrep as __own_sectionBrep } from '../brep-operations/booleanFns'\nimport { splitBrep as __own_splitBrep } from '../brep-operations/booleanFns'\nimport { shellBrep as __own_shellBrep } from '../brep-operations/topologyFns'\nimport { offsetBrep as __own_offsetBrep } from '../brep-operations/topologyFns'\nimport { healBrep as __own_healBrep } from '../brep-operations/healingFns'\nimport { simplifyBrep as __own_simplifyBrep } from '../brep-operations/healingFns'\nimport { autoHealBrep as __own_autoHealBrep } from '../brep-operations/healingFns'\nimport { fixShapeBrep as __own_fixShapeBrep } from '../brep-operations/healingFns'\nimport { healSolidBrep as __own_healSolidBrep } from '../brep-operations/healingFns'\nimport { fixSelfIntersectionBrep as __own_fixSelfIntersectionBrep } from '../brep-operations/healingFns'\n\n/**\n * torus — core 自有实现(生成文件,禁手改;来源 api/surface/arg-spec.ts)。\n * (majorRadius: number, minorRadius: number, options?: TorusOptions)\n * 桥接:defineOp({ brep: __own_torusBrep })——core 直连 occt 引擎(§5.4),\n * D11 归一在自有实现内部完成(api/brep-operations/)。\n */\nexport const torus = defineOp({\n brep: __own_torusBrep,\n name: 'torus', naming: {\"kind\":\"unmodeled\",\"reason\":\"construct vocabulary pending Phase 3\"}, capabilities: [\"dispose\",\"makeTorus\"],\n})\n\n/**\n * fuse — core 自有实现(生成文件,禁手改;来源 api/surface/arg-spec.ts)。\n * (a: Shape3D, b: Shape3D, options?: BooleanOptions) -> Result<Shape3D>\n * 桥接:defineOp({ brep: __own_fuseBrep })——core 直连 occt 引擎(§5.4),\n * D11 归一在自有实现内部完成(api/brep-operations/)。\n */\nexport const fuse = defineOp({\n brep: __own_fuseBrep,\n name: 'fuse', naming: {\"kind\":\"kernel\",\"newFaces\":{\"via\":\"byAdjacency\"}}, engines: [\"occt\"],\n})\n\n/**\n * getBounds — 查询(core,生成文件,勿手改;来源 api/surface/arg-spec.ts)。\n * (shape: Shape) -> BrepBoundingBox(core)\n * 桥接:getBrepApi().* 直连 occt 引擎(§5.5 第 2 条)——无来源实现中转。\n *\n * @param shape - 可形状参数(原样透传)\n * @returns { xmin: number; ymin: number; zmin: number; xmax: number; ymax: number; zmax: number } — 纯数据结果(非 Shape)。\n */\nexport function getBounds(shape: Shape): { xmin: number; ymin: number; zmin: number; xmax: number; ymax: number; zmax: number } {\n const h0 = brepOf(shape as Shape) as BrepHandle\n return getBrepApi().getBoundingBox(h0)\n}\n\n/**\n * ellipsoid — core 自有实现(生成文件,禁手改;来源 api/surface/arg-spec.ts)。\n * ellipsoid(rx: number, ry: number, rz: number, options?: EllipsoidOptions): Shape\n * 桥接:defineOp({ brep: __own_ellipsoidBrep })——core 直连 occt 引擎(§5.4),\n * D11 归一在自有实现内部完成(api/brep-operations/)。\n */\nexport const ellipsoid = defineOp({\n brep: __own_ellipsoidBrep,\n name: 'ellipsoid', naming: {\"kind\":\"unmodeled\",\"reason\":\"construct vocabulary pending Phase 3\"}, capabilities: [\"makeEllipsoid\",\"translate\"],\n})\n\n/**\n * rotate — core 自有实现(生成文件,禁手改;来源 api/surface/arg-spec.ts)。\n * rotate(shape: Shape, angle: number, options?: { at?, axis? }): Shape\n * 桥接:defineOp({ brep: __own_rotateBrep })——core 直连 occt 引擎(§5.4),\n * D11 归一在自有实现内部完成(api/brep-operations/)。\n */\nexport const rotate = defineOp({\n brep: __own_rotateBrep,\n name: 'rotate', naming: {\"kind\":\"kernel\",\"newFaces\":{\"via\":\"byAdjacency\"}}, capabilities: [\"transform\"],\n})\n\n/**\n * mirror — core 自有实现(生成文件,禁手改;来源 api/surface/arg-spec.ts)。\n * mirror(shape: Shape, options?: MirrorOptions): Shape\n * 桥接:defineOp({ brep: __own_mirrorBrep })——core 直连 occt 引擎(§5.4),\n * D11 归一在自有实现内部完成(api/brep-operations/)。\n */\nexport const mirror = defineOp({\n brep: __own_mirrorBrep,\n name: 'mirror', naming: {\"kind\":\"kernel\",\"newFaces\":{\"via\":\"byAdjacency\"}}, capabilities: [\"mirror\"],\n})\n\n/**\n * clone — core 自有实现(生成文件,禁手改;来源 api/surface/arg-spec.ts)。\n * clone(shape: Shape): Shape\n * 桥接:defineOp({ brep: __own_cloneBrep })——core 直连 occt 引擎(§5.4),\n * D11 归一在自有实现内部完成(api/brep-operations/)。\n */\nexport const clone = defineOp({\n brep: __own_cloneBrep,\n name: 'clone', naming: {\"kind\":\"identity\"}, capabilities: [\"copyShape\"],\n})\n\n/**\n * applyMatrix — core 自有实现(生成文件,禁手改;来源 api/surface/arg-spec.ts)。\n * applyMatrix(shape: Shape, matrix: unknown): Shape\n * 桥接:defineOp({ brep: __own_applyMatrixBrep })——core 直连 occt 引擎(§5.4),\n * D11 归一在自有实现内部完成(api/brep-operations/)。\n */\nexport const applyMatrix = defineOp({\n brep: __own_applyMatrixBrep,\n name: 'applyMatrix', naming: {\"kind\":\"identity\"}, capabilities: [\"transform\",\"generalTransform\"],\n})\n\n/**\n * locate — core 自有实现(生成文件,禁手改;来源 api/surface/arg-spec.ts)。\n * locate(shape: Shape, placement: unknown): Shape\n * 桥接:defineOp({ brep: __own_locateBrep })——core 直连 occt 引擎(§5.4),\n * D11 归一在自有实现内部完成(api/brep-operations/)。\n */\nexport const locate = defineOp({\n brep: __own_locateBrep,\n name: 'locate', naming: {\"kind\":\"identity\"}, capabilities: [\"composeTransform\",\"dispose\",\"hashCode\",\"locate\"],\n})\n\n/**\n * section — core 自有实现(生成文件,禁手改;来源 api/surface/arg-spec.ts)。\n * section(shape: Shape, plane: PlaneInput): Shape\n * 桥接:defineOp({ brep: __own_sectionBrep })——core 直连 occt 引擎(§5.4),\n * D11 归一在自有实现内部完成(api/brep-operations/)。\n */\nexport const section = defineOp({\n brep: __own_sectionBrep,\n name: 'section', naming: {\"kind\":\"kernel\",\"newFaces\":{\"via\":\"byAdjacency\"}}, capabilities: [\"sectionByPlane\",\"makeCompound\"],\n})\n\n/**\n * split — core 自有实现(生成文件,禁手改;来源 api/surface/arg-spec.ts)。\n * split(shape: Shape, tools: Shape[]): Shape\n * 桥接:defineOp({ brep: __own_splitBrep })——core 直连 occt 引擎(§5.4),\n * D11 归一在自有实现内部完成(api/brep-operations/)。\n */\nexport const split = defineOp({\n brep: __own_splitBrep,\n name: 'split', naming: {\"kind\":\"subdivide\"}, engines: [\"occt\"],\n})\n\n/**\n * shell — core 自有实现(生成文件,禁手改;来源 api/surface/arg-spec.ts)。\n * shell(shape: Shape, faces?: Shape[], thickness: number): Shape\n * 桥接:defineOp({ brep: __own_shellBrep })——core 直连 occt 引擎(§5.4),\n * D11 归一在自有实现内部完成(api/brep-operations/)。\n */\nexport const shell = defineOp({\n brep: __own_shellBrep,\n name: 'shell', naming: {\"kind\":\"kernel\",\"newFaces\":{\"via\":\"byAdjacency\"}}, engines: [\"occt\"],\n})\n\n/**\n * offset — core 自有实现(生成文件,禁手改;来源 api/surface/arg-spec.ts)。\n * offset(shape: Shape, distance: number): Shape\n * 桥接:defineOp({ brep: __own_offsetBrep })——core 直连 occt 引擎(§5.4),\n * D11 归一在自有实现内部完成(api/brep-operations/)。\n */\nexport const offset = defineOp({\n brep: __own_offsetBrep,\n name: 'offset', naming: {\"kind\":\"kernel\",\"newFaces\":{\"via\":\"byAdjacency\"}}, engines: [\"occt\"],\n})\n\n/**\n * heal — core 自有实现(生成文件,禁手改;来源 api/surface/arg-spec.ts)。\n * heal(shape: Shape): Shape\n * 桥接:defineOp({ brep: __own_healBrep })——core 直连 occt 引擎(§5.4),\n * D11 归一在自有实现内部完成(api/brep-operations/)。\n */\nexport const heal = defineOp({\n brep: __own_healBrep,\n name: 'heal', naming: {\"kind\":\"kernel\",\"newFaces\":{\"via\":\"byAdjacency\"}}, engines: [\"occt\"],\n})\n\n/**\n * simplify — core 自有实现(生成文件,禁手改;来源 api/surface/arg-spec.ts)。\n * simplify(shape: Shape): Shape\n * 桥接:defineOp({ brep: __own_simplifyBrep })——core 直连 occt 引擎(§5.4),\n * D11 归一在自有实现内部完成(api/brep-operations/)。\n */\nexport const simplify = defineOp({\n brep: __own_simplifyBrep,\n name: 'simplify', naming: {\"kind\":\"kernel\",\"newFaces\":{\"via\":\"byAdjacency\"}}, engines: [\"occt\"],\n})\n\n/**\n * isValid — 查询(core,生成文件,勿手改;来源 api/surface/arg-spec.ts)。\n * isValid(shape: Shape): boolean(core)\n * 桥接:getBrepApi().* 直连 occt 引擎(§5.5 第 2 条)——无来源实现中转。\n *\n * @param shape - 可形状参数(原样透传)\n * @returns boolean — 纯数据结果(非 Shape)。\n */\nexport function isValid(shape: Shape): boolean {\n const h0 = brepOf(shape as Shape) as BrepHandle\n return getBrepApi().isValid(h0)\n}\n\n/**\n * isSameShape — 查询(core,生成文件,勿手改;来源 api/surface/arg-spec.ts)。\n * isSameShape(a: Shape, b: Shape): boolean(core)\n * 桥接:getBrepApi().* 直连 occt 引擎(§5.5 第 2 条)——无来源实现中转。\n *\n * @param a - 可形状参数(第一个被比较形状)\n * @param b - 可形状参数(第二个被比较形状)\n * @returns boolean — 纯数据结果(非 Shape)。\n */\nexport function isSameShape(a: Shape, b: Shape): boolean {\n const h0 = brepOf(a as Shape) as BrepHandle\n const h1 = brepOf(b as Shape) as BrepHandle\n return getBrepApi().isSame(h0, h1)\n}\n\n/**\n * autoHeal — core 自有实现(生成文件,禁手改;来源 api/surface/arg-spec.ts)。\n * autoHeal(shape: Shape, options?: AutoHealOptions): { shape: Shape, report }\n * 桥接:defineOp({ brep: __own_autoHealBrep })——core 直连 occt 引擎(§5.4),\n * D11 归一在自有实现内部完成(api/brep-operations/)。\n */\nexport const autoHeal = defineOp({\n brep: __own_autoHealBrep,\n name: 'autoHeal', naming: {\"kind\":\"kernel\",\"newFaces\":{\"via\":\"byAdjacency\"}}, engines: [\"occt\"], outputs: [\"shape\"],\n})\n\n/**\n * fixShape — core 自有实现(生成文件,禁手改;来源 api/surface/arg-spec.ts)。\n * fixShape(shape: Shape): Shape\n * 桥接:defineOp({ brep: __own_fixShapeBrep })——core 直连 occt 引擎(§5.4),\n * D11 归一在自有实现内部完成(api/brep-operations/)。\n */\nexport const fixShape = defineOp({\n brep: __own_fixShapeBrep,\n name: 'fixShape', naming: {\"kind\":\"kernel\",\"newFaces\":{\"via\":\"byAdjacency\"}}, capabilities: [\"fixShape\"],\n})\n\n/**\n * healSolid — core 自有实现(生成文件,禁手改;来源 api/surface/arg-spec.ts)。\n * healSolid(solid: Shape): Shape\n * 桥接:defineOp({ brep: __own_healSolidBrep })——core 直连 occt 引擎(§5.4),\n * D11 归一在自有实现内部完成(api/brep-operations/)。\n */\nexport const healSolid = defineOp({\n brep: __own_healSolidBrep,\n name: 'healSolid', naming: {\"kind\":\"kernel\",\"newFaces\":{\"via\":\"byAdjacency\"}}, capabilities: [\"healSolid\"],\n})\n\n/**\n * fixSelfIntersection — core 自有实现(生成文件,禁手改;来源 api/surface/arg-spec.ts)。\n * fixSelfIntersection(shape: Shape): Shape\n * 桥接:defineOp({ brep: __own_fixSelfIntersectionBrep })——core 直连 occt 引擎(§5.4),\n * D11 归一在自有实现内部完成(api/brep-operations/)。\n */\nexport const fixSelfIntersection = defineOp({\n brep: __own_fixSelfIntersectionBrep,\n name: 'fixSelfIntersection', naming: {\"kind\":\"kernel\",\"newFaces\":{\"via\":\"byAdjacency\"}}, engines: [\"occt\"],\n})\n"]}
1
+ {"version":3,"file":"topology.js","sourceRoot":"","sources":["../../../src/api/generated/topology.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;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AAU,EAAC,EAAC,KAAK,EAAC,aAAa,EAAC,EAAC,EAAE,OAAO,EAAE,CAAC,MAAM,CAAC;CAC3G,CAAC,CAAA","sourcesContent":["/**\n * generated/topology.ts — 生成文件,勿手改。\n * 由 packages/core/scripts/gen-l3-surface.ts 依据 api/surface/arg-spec.ts 生成(E5/P14 分片)。\n * topology 模块:21 个投影符号;另有 281 个 skip 登记。\n * A6(2026-10-06)口径指认:本文件是 brepjs 投影面的**增量**清单;脚本面全集的\n * 权威来源是 generated/script-face.ts + gen-symbol-table 产物\n * lang/symbol-table.generated.ts(cad 脚本面 95 op)。两个清单回答不同问题,\n * 互不为超集——禁止用本文件的名字反推脚本面能力。\n */\nimport { defineOp } from '../../define-op'\nimport { brepOf } from '../../shape'\nimport { getBrepApi } from '../../brep/handle-bridge'\nimport type { BrepHandle } from '../../brep/engine/types'\nimport type { Shape } from '../../mesh/types'\nimport { torusBrep as __own_torusBrep } from '../brep-operations/primitiveFns'\nimport { fuseBrep as __own_fuseBrep } from '../brep-operations/booleanFns'\nimport { ellipsoidBrep as __own_ellipsoidBrep } from '../brep-operations/primitiveFns'\nimport { rotateBrep as __own_rotateBrep } from '../brep-operations/topologyFns'\nimport { mirrorBrep as __own_mirrorBrep } from '../brep-operations/topologyFns'\nimport { cloneBrep as __own_cloneBrep } from '../brep-operations/topologyFns'\nimport { applyMatrixBrep as __own_applyMatrixBrep } from '../brep-operations/topologyFns'\nimport { locateBrep as __own_locateBrep } from '../brep-operations/topologyFns'\nimport { sectionBrep as __own_sectionBrep } from '../brep-operations/booleanFns'\nimport { splitBrep as __own_splitBrep } from '../brep-operations/booleanFns'\nimport { shellBrep as __own_shellBrep } from '../brep-operations/topologyFns'\nimport { offsetBrep as __own_offsetBrep } from '../brep-operations/topologyFns'\nimport { healBrep as __own_healBrep } from '../brep-operations/healingFns'\nimport { simplifyBrep as __own_simplifyBrep } from '../brep-operations/healingFns'\nimport { autoHealBrep as __own_autoHealBrep } from '../brep-operations/healingFns'\nimport { fixShapeBrep as __own_fixShapeBrep } from '../brep-operations/healingFns'\nimport { healSolidBrep as __own_healSolidBrep } from '../brep-operations/healingFns'\nimport { fixSelfIntersectionBrep as __own_fixSelfIntersectionBrep } from '../brep-operations/healingFns'\n\n/**\n * torus — core 自有实现(生成文件,禁手改;来源 api/surface/arg-spec.ts)。\n * (majorRadius: number, minorRadius: number, options?: TorusOptions)\n * 桥接:defineOp({ brep: __own_torusBrep })——core 直连 occt 引擎(§5.4),\n * D11 归一在自有实现内部完成(api/brep-operations/)。\n */\nexport const torus = defineOp({\n brep: __own_torusBrep,\n name: 'torus', naming: {\"kind\":\"unmodeled\",\"reason\":\"construct vocabulary pending Phase 3\"},\n})\n\n/**\n * fuse — core 自有实现(生成文件,禁手改;来源 api/surface/arg-spec.ts)。\n * (a: Shape3D, b: Shape3D, options?: BooleanOptions) -> Result<Shape3D>\n * 桥接:defineOp({ brep: __own_fuseBrep })——core 直连 occt 引擎(§5.4),\n * D11 归一在自有实现内部完成(api/brep-operations/)。\n */\nexport const fuse = defineOp({\n brep: __own_fuseBrep,\n name: 'fuse', naming: {\"kind\":\"kernel\",\"newFaces\":{\"via\":\"byAdjacency\"}}, engines: [\"occt\"],\n})\n\n/**\n * getBounds — 查询(core,生成文件,勿手改;来源 api/surface/arg-spec.ts)。\n * (shape: Shape) -> BrepBoundingBox(core)\n * 桥接:getBrepApi().* 直连 occt 引擎(§5.5 第 2 条)——无来源实现中转。\n *\n * @param shape - 可形状参数(原样透传)\n * @returns { xmin: number; ymin: number; zmin: number; xmax: number; ymax: number; zmax: number } — 纯数据结果(非 Shape)。\n */\nexport function getBounds(shape: Shape): { xmin: number; ymin: number; zmin: number; xmax: number; ymax: number; zmax: number } {\n const h0 = brepOf(shape as Shape) as BrepHandle\n return getBrepApi().getBoundingBox(h0)\n}\n\n/**\n * ellipsoid — core 自有实现(生成文件,禁手改;来源 api/surface/arg-spec.ts)。\n * ellipsoid(rx: number, ry: number, rz: number, options?: EllipsoidOptions): Shape\n * 桥接:defineOp({ brep: __own_ellipsoidBrep })——core 直连 occt 引擎(§5.4),\n * D11 归一在自有实现内部完成(api/brep-operations/)。\n */\nexport const ellipsoid = defineOp({\n brep: __own_ellipsoidBrep,\n name: 'ellipsoid', naming: {\"kind\":\"unmodeled\",\"reason\":\"construct vocabulary pending Phase 3\"},\n})\n\n/**\n * rotate — core 自有实现(生成文件,禁手改;来源 api/surface/arg-spec.ts)。\n * rotate(shape: Shape, angle: number, options?: { at?, axis? }): Shape\n * 桥接:defineOp({ brep: __own_rotateBrep })——core 直连 occt 引擎(§5.4),\n * D11 归一在自有实现内部完成(api/brep-operations/)。\n */\nexport const rotate = defineOp({\n brep: __own_rotateBrep,\n name: 'rotate', naming: {\"kind\":\"kernel\",\"newFaces\":{\"via\":\"byAdjacency\"}},\n})\n\n/**\n * mirror — core 自有实现(生成文件,禁手改;来源 api/surface/arg-spec.ts)。\n * mirror(shape: Shape, options?: MirrorOptions): Shape\n * 桥接:defineOp({ brep: __own_mirrorBrep })——core 直连 occt 引擎(§5.4),\n * D11 归一在自有实现内部完成(api/brep-operations/)。\n */\nexport const mirror = defineOp({\n brep: __own_mirrorBrep,\n name: 'mirror', naming: {\"kind\":\"kernel\",\"newFaces\":{\"via\":\"byAdjacency\"}},\n})\n\n/**\n * clone — core 自有实现(生成文件,禁手改;来源 api/surface/arg-spec.ts)。\n * clone(shape: Shape): Shape\n * 桥接:defineOp({ brep: __own_cloneBrep })——core 直连 occt 引擎(§5.4),\n * D11 归一在自有实现内部完成(api/brep-operations/)。\n */\nexport const clone = defineOp({\n brep: __own_cloneBrep,\n name: 'clone', naming: {\"kind\":\"identity\"},\n})\n\n/**\n * applyMatrix — core 自有实现(生成文件,禁手改;来源 api/surface/arg-spec.ts)。\n * applyMatrix(shape: Shape, matrix: unknown): Shape\n * 桥接:defineOp({ brep: __own_applyMatrixBrep })——core 直连 occt 引擎(§5.4),\n * D11 归一在自有实现内部完成(api/brep-operations/)。\n */\nexport const applyMatrix = defineOp({\n brep: __own_applyMatrixBrep,\n name: 'applyMatrix', naming: {\"kind\":\"identity\"},\n})\n\n/**\n * locate — core 自有实现(生成文件,禁手改;来源 api/surface/arg-spec.ts)。\n * locate(shape: Shape, placement: unknown): Shape\n * 桥接:defineOp({ brep: __own_locateBrep })——core 直连 occt 引擎(§5.4),\n * D11 归一在自有实现内部完成(api/brep-operations/)。\n */\nexport const locate = defineOp({\n brep: __own_locateBrep,\n name: 'locate', naming: {\"kind\":\"identity\"}, engines: [\"occt\"],\n})\n\n/**\n * section — core 自有实现(生成文件,禁手改;来源 api/surface/arg-spec.ts)。\n * section(shape: Shape, plane: PlaneInput): Shape\n * 桥接:defineOp({ brep: __own_sectionBrep })——core 直连 occt 引擎(§5.4),\n * D11 归一在自有实现内部完成(api/brep-operations/)。\n */\nexport const section = defineOp({\n brep: __own_sectionBrep,\n name: 'section', naming: {\"kind\":\"kernel\",\"newFaces\":{\"via\":\"byAdjacency\"}},\n})\n\n/**\n * split — core 自有实现(生成文件,禁手改;来源 api/surface/arg-spec.ts)。\n * split(shape: Shape, tools: Shape[]): Shape\n * 桥接:defineOp({ brep: __own_splitBrep })——core 直连 occt 引擎(§5.4),\n * D11 归一在自有实现内部完成(api/brep-operations/)。\n */\nexport const split = defineOp({\n brep: __own_splitBrep,\n name: 'split', naming: {\"kind\":\"subdivide\"}, engines: [\"occt\"],\n})\n\n/**\n * shell — core 自有实现(生成文件,禁手改;来源 api/surface/arg-spec.ts)。\n * shell(shape: Shape, faces?: Shape[], thickness: number): Shape\n * 桥接:defineOp({ brep: __own_shellBrep })——core 直连 occt 引擎(§5.4),\n * D11 归一在自有实现内部完成(api/brep-operations/)。\n */\nexport const shell = defineOp({\n brep: __own_shellBrep,\n name: 'shell', naming: {\"kind\":\"kernel\",\"newFaces\":{\"via\":\"byAdjacency\"}}, engines: [\"occt\"],\n})\n\n/**\n * offset — core 自有实现(生成文件,禁手改;来源 api/surface/arg-spec.ts)。\n * offset(shape: Shape, distance: number): Shape\n * 桥接:defineOp({ brep: __own_offsetBrep })——core 直连 occt 引擎(§5.4),\n * D11 归一在自有实现内部完成(api/brep-operations/)。\n */\nexport const offset = defineOp({\n brep: __own_offsetBrep,\n name: 'offset', naming: {\"kind\":\"kernel\",\"newFaces\":{\"via\":\"byAdjacency\"}}, engines: [\"occt\"],\n})\n\n/**\n * heal — core 自有实现(生成文件,禁手改;来源 api/surface/arg-spec.ts)。\n * heal(shape: Shape): Shape\n * 桥接:defineOp({ brep: __own_healBrep })——core 直连 occt 引擎(§5.4),\n * D11 归一在自有实现内部完成(api/brep-operations/)。\n */\nexport const heal = defineOp({\n brep: __own_healBrep,\n name: 'heal', naming: {\"kind\":\"kernel\",\"newFaces\":{\"via\":\"byAdjacency\"}}, engines: [\"occt\"],\n})\n\n/**\n * simplify — core 自有实现(生成文件,禁手改;来源 api/surface/arg-spec.ts)。\n * simplify(shape: Shape): Shape\n * 桥接:defineOp({ brep: __own_simplifyBrep })——core 直连 occt 引擎(§5.4),\n * D11 归一在自有实现内部完成(api/brep-operations/)。\n */\nexport const simplify = defineOp({\n brep: __own_simplifyBrep,\n name: 'simplify', naming: {\"kind\":\"kernel\",\"newFaces\":{\"via\":\"byAdjacency\"}}, engines: [\"occt\"],\n})\n\n/**\n * isValid — 查询(core,生成文件,勿手改;来源 api/surface/arg-spec.ts)。\n * isValid(shape: Shape): boolean(core)\n * 桥接:getBrepApi().* 直连 occt 引擎(§5.5 第 2 条)——无来源实现中转。\n *\n * @param shape - 可形状参数(原样透传)\n * @returns boolean — 纯数据结果(非 Shape)。\n */\nexport function isValid(shape: Shape): boolean {\n const h0 = brepOf(shape as Shape) as BrepHandle\n return getBrepApi().isValid(h0)\n}\n\n/**\n * isSameShape — 查询(core,生成文件,勿手改;来源 api/surface/arg-spec.ts)。\n * isSameShape(a: Shape, b: Shape): boolean(core)\n * 桥接:getBrepApi().* 直连 occt 引擎(§5.5 第 2 条)——无来源实现中转。\n *\n * @param a - 可形状参数(第一个被比较形状)\n * @param b - 可形状参数(第二个被比较形状)\n * @returns boolean — 纯数据结果(非 Shape)。\n */\nexport function isSameShape(a: Shape, b: Shape): boolean {\n const h0 = brepOf(a as Shape) as BrepHandle\n const h1 = brepOf(b as Shape) as BrepHandle\n return getBrepApi().isSame(h0, h1)\n}\n\n/**\n * autoHeal — core 自有实现(生成文件,禁手改;来源 api/surface/arg-spec.ts)。\n * autoHeal(shape: Shape, options?: AutoHealOptions): { shape: Shape, report }\n * 桥接:defineOp({ brep: __own_autoHealBrep })——core 直连 occt 引擎(§5.4),\n * D11 归一在自有实现内部完成(api/brep-operations/)。\n */\nexport const autoHeal = defineOp({\n brep: __own_autoHealBrep,\n name: 'autoHeal', naming: {\"kind\":\"kernel\",\"newFaces\":{\"via\":\"byAdjacency\"}}, engines: [\"occt\"], outputs: [\"shape\"],\n})\n\n/**\n * fixShape — core 自有实现(生成文件,禁手改;来源 api/surface/arg-spec.ts)。\n * fixShape(shape: Shape): Shape\n * 桥接:defineOp({ brep: __own_fixShapeBrep })——core 直连 occt 引擎(§5.4),\n * D11 归一在自有实现内部完成(api/brep-operations/)。\n */\nexport const fixShape = defineOp({\n brep: __own_fixShapeBrep,\n name: 'fixShape', naming: {\"kind\":\"kernel\",\"newFaces\":{\"via\":\"byAdjacency\"}},\n})\n\n/**\n * healSolid — core 自有实现(生成文件,禁手改;来源 api/surface/arg-spec.ts)。\n * healSolid(solid: Shape): Shape\n * 桥接:defineOp({ brep: __own_healSolidBrep })——core 直连 occt 引擎(§5.4),\n * D11 归一在自有实现内部完成(api/brep-operations/)。\n */\nexport const healSolid = defineOp({\n brep: __own_healSolidBrep,\n name: 'healSolid', naming: {\"kind\":\"kernel\",\"newFaces\":{\"via\":\"byAdjacency\"}},\n})\n\n/**\n * fixSelfIntersection — core 自有实现(生成文件,禁手改;来源 api/surface/arg-spec.ts)。\n * fixSelfIntersection(shape: Shape): Shape\n * 桥接:defineOp({ brep: __own_fixSelfIntersectionBrep })——core 直连 occt 引擎(§5.4),\n * D11 归一在自有实现内部完成(api/brep-operations/)。\n */\nexport const fixSelfIntersection = defineOp({\n brep: __own_fixSelfIntersectionBrep,\n name: 'fixSelfIntersection', naming: {\"kind\":\"kernel\",\"newFaces\":{\"via\":\"byAdjacency\"}}, engines: [\"occt\"],\n})\n"]}
@@ -9,7 +9,7 @@
9
9
  *
10
10
  * 设计:
11
11
  * - 平台 op:occt 原生 makeHelixWire(occt-wasm 有,L1 无)→ 声明 engines:['occt'](D11)。
12
- * 不声明 capabilities:实现直连平台原生方法,能力由引擎身份本身界定。
12
+ * 实现直连平台原生方法,能力由引擎身份本身界定(无第二个声明轴)。
13
13
  * - 1D 产物:经 fromBrepCurve 登记,kind='curve'。
14
14
  * - 非 occt 引擎(brepkit)→ 执行前 BrepUnsupportedError(D11-4);brep_mock 受 D11-3
15
15
  * 豁免不拦截(且 getOcctKernel 为全局 occt 实例,brep_mock 下仍可真实出线)。
package/dist/api/helix.js CHANGED
@@ -9,7 +9,7 @@
9
9
  *
10
10
  * 设计:
11
11
  * - 平台 op:occt 原生 makeHelixWire(occt-wasm 有,L1 无)→ 声明 engines:['occt'](D11)。
12
- * 不声明 capabilities:实现直连平台原生方法,能力由引擎身份本身界定。
12
+ * 实现直连平台原生方法,能力由引擎身份本身界定(无第二个声明轴)。
13
13
  * - 1D 产物:经 fromBrepCurve 登记,kind='curve'。
14
14
  * - 非 occt 引擎(brepkit)→ 执行前 BrepUnsupportedError(D11-4);brep_mock 受 D11-3
15
15
  * 豁免不拦截(且 getOcctKernel 为全局 occt 实例,brep_mock 下仍可真实出线)。
@@ -1 +1 @@
1
- {"version":3,"file":"helix.js","sourceRoot":"","sources":["../../src/api/helix.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA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IACtD,MAAM,CAAC,GAAG,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAA;IAChD,iDAAiD;IACjD,MAAM,MAAM,GAAG,CACb,MAAM,KAAK,MAAM;QACf,CAAC,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC;QAC7D,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,CAC3B,CAAA;IAC1B,OAAO,aAAa,CAAC,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAA;AACvE,CAAC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC;IAC5B,6DAA6D;IAC7D,iEAAiE;IACjE,oEAAoE;IACpE,mDAAmD;IACnD,IAAI,EAAE,OAAO;IACb,IAAI,CAAC,IAAkB;QACrB,OAAO,SAAS,CAAC,IAAI,CAAC,CAAA;IACxB,CAAC;IACD,OAAO,EAAE,CAAC,MAAM,CAAC;IACjB,MAAM,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,sCAAsC,EAAgB;CAC5F,CAAC,CAAA","sourcesContent":["/**\n * api helix — 螺旋线(1D 曲线,平台 op engines:['occt'])\n *\n * @platform occt — 本文件 import occt-kernel:螺旋线用 `makeHelixWire` 构造\n * (occt-wasm 原生有,L1 无)。守卫 ① 要求平台 import 自证身份;调用方 op 声明\n * `engines: ['occt']` 由守卫 ② 校验。\n *\n * 用途:G-D 门控层的 1D 造线能力(Phase 3)。下游 sweep / loft 等可用螺旋线作 spine。\n *\n * 设计:\n * - 平台 op:occt 原生 makeHelixWire(occt-wasm 有,L1 无)→ 声明 engines:['occt'](D11)。\n * 不声明 capabilities:实现直连平台原生方法,能力由引擎身份本身界定。\n * - 1D 产物:经 fromBrepCurve 登记,kind='curve'。\n * - 非 occt 引擎(brepkit)→ 执行前 BrepUnsupportedError(D11-4);brep_mock 受 D11-3\n * 豁免不拦截(且 getOcctKernel 为全局 occt 实例,brep_mock 下仍可真实出线)。\n */\n\nimport type { Shape } from '../mesh/types'\nimport type { BrepHandle } from '../brep/engine/types'\nimport { solidToShape } from '../brep/brep-ops'\nimport { getBrepApi } from '../brep/handle-bridge'\nimport { fromBrepCurve } from '../shape'\nimport { defineOp } from '../sdk'\nimport type { Provenance } from '../topology/naming/lineage'\nimport { getOcctKernel } from '../occt-kernel/occtKernel'\n\n/** 螺旋手性:`'right'`(右手,逆时针上旋)或 `'left'`(左手,顺时针上旋)。 */\nexport type HelixHanded = 'right' | 'left'\n\n/** `cad.helix` 参数。 */\nexport interface HelixOptions {\n /** 螺旋半径(mm,>0)。 */\n radius: number\n /** 螺距(mm,每圈沿轴的推进量,≠0)。 */\n pitch: number\n /** 圈数(>0)。 */\n turns: number\n /** 螺旋轴方向(单位向量,默认 +Z)。 */\n axis?: [number, number, number]\n /** 起点(默认原点)。 */\n origin?: [number, number, number]\n /**\n * 手性(默认 `'right'`)。同 pitch/height/radius 下左右旋互为镜像。\n * `'right'` 走 `makeHelixWire`,`'left'` 走 `makeHelixWireHanded(..., true)`。\n */\n handed?: HelixHanded\n}\n\n/** BREP 路径:用 occt 原生 makeHelixWire / makeHelixWireHanded 构造螺旋线,登记 1D 句柄。 */\nfunction helixBrep(opts: HelixOptions): Shape {\n const { radius, pitch, turns } = opts\n if (!(radius > 0)) throw new Error('E_HELIX_BAD_RADIUS: radius must be > 0')\n if (!(pitch !== 0)) throw new Error('E_HELIX_BAD_PITCH: pitch must be non-zero')\n if (!(turns > 0)) throw new Error('E_HELIX_BAD_TURNS: turns must be > 0')\n const handed = opts.handed ?? 'right'\n if (handed !== 'right' && handed !== 'left') {\n throw new Error(`E_HELIX_BAD_HANDED: handed must be 'right' or 'left' (got '${String(handed)}')`)\n }\n const axis = opts.axis ?? [0, 0, 1]\n const origin = opts.origin ?? [0, 0, 0]\n const height = pitch * turns\n const kernel = getBrepApi()\n const occt = getOcctKernel()\n const o = { x: origin[0], y: origin[1], z: origin[2] }\n const a = { x: axis[0], y: axis[1], z: axis[2] }\n // 右手默认沿用 makeHelixWire(保持两个原生入口都可达);左手走带手性的显式入口。\n const handle = (\n handed === 'left'\n ? occt.makeHelixWireHanded(o, a, pitch, height, radius, true)\n : occt.makeHelixWire(o, a, pitch, height, radius)\n ) as unknown as BrepHandle\n return fromBrepCurve(solidToShape(kernel, handle), { solid: handle })\n}\n\n/**\n * 构造螺旋线(1D 曲线)。\n * @group 创建\n * @inputs 0\n * @async false\n * @qual ok\n * @name helix\n * @note 平台 op:仅 occt 引擎(原生 makeHelixWire / makeHelixWireHanded)。非 occt 引擎执行前报错;brep_mock 不拦截。\n * @returns Shape 1D 螺旋线(kind:'curve')。\n * @param options.radius - 螺旋半径(mm,>0)。type:number required:true\n * @param options.pitch - 螺距(mm,≠0)。type:number required:true\n * @param options.turns - 圈数(>0)。type:number required:true\n * @param options.axis - 螺旋轴方向(默认 +Z)。type:Vec3 required:false\n * @param options.origin - 起点(默认原点)。type:Vec3 required:false\n * @param options.handed - 手性:'right'(默认)或 'left'。type:HelixHanded required:false\n * @example\n * const h = cad.helix({ radius: 5, pitch: 2, turns: 3 })\n * const lh = cad.helix({ radius: 5, pitch: 2, turns: 3, handed: 'left' })\n */\nexport const helix = defineOp({\n // name 必填:① 引擎门文案携带 op 名(`op 'helix' requires engine occt`,见\n // test/api/sweep-loft.test.ts GOTCHA-3 对该形态的要求);② occt op 覆盖率扫描器\n // 的 op 全集只收 `export const X = defineOp({ name: '…' })`——缺 name 的 op\n // 不可见,其直调的 occt 方法(makeHelixWireHanded)会被误判为「未接入」。\n name: 'helix',\n brep(opts: HelixOptions) {\n return helixBrep(opts)\n },\n engines: ['occt'],\n naming: { kind: 'unmodeled', reason: 'construct vocabulary pending Phase 3' } as Provenance,\n})\n"]}
1
+ {"version":3,"file":"helix.js","sourceRoot":"","sources":["../../src/api/helix.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA;AAEjC,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAwBzD,4EAA4E;AAC5E,SAAS,SAAS,CAAC,IAAkB;IACnC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,IAAI,CAAA;IACrC,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAA;IAC5E,IAAI,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAA;IAChF,IAAI,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAA;IACzE,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,IAAI,OAAO,CAAA;IACrC,IAAI,MAAM,KAAK,OAAO,IAAI,MAAM,KAAK,MAAM,EAAE,CAAC;QAC5C,MAAM,IAAI,KAAK,CAAC,8DAA8D,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;IACnG,CAAC;IACD,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;IACnC,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM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,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,sCAAsC,EAAgB;CAC5F,CAAC,CAAA","sourcesContent":["/**\n * api helix — 螺旋线(1D 曲线,平台 op engines:['occt'])\n *\n * @platform occt — 本文件 import occt-kernel:螺旋线用 `makeHelixWire` 构造\n * (occt-wasm 原生有,L1 无)。守卫 ① 要求平台 import 自证身份;调用方 op 声明\n * `engines: ['occt']` 由守卫 ② 校验。\n *\n * 用途:G-D 门控层的 1D 造线能力(Phase 3)。下游 sweep / loft 等可用螺旋线作 spine。\n *\n * 设计:\n * - 平台 op:occt 原生 makeHelixWire(occt-wasm 有,L1 无)→ 声明 engines:['occt'](D11)。\n * 实现直连平台原生方法,能力由引擎身份本身界定(无第二个声明轴)。\n * - 1D 产物:经 fromBrepCurve 登记,kind='curve'。\n * - 非 occt 引擎(brepkit)→ 执行前 BrepUnsupportedError(D11-4);brep_mock 受 D11-3\n * 豁免不拦截(且 getOcctKernel 为全局 occt 实例,brep_mock 下仍可真实出线)。\n */\n\nimport type { Shape } from '../mesh/types'\nimport type { BrepHandle } from '../brep/engine/types'\nimport { solidToShape } from '../brep/brep-ops'\nimport { getBrepApi } from '../brep/handle-bridge'\nimport { fromBrepCurve } from '../shape'\nimport { defineOp } from '../sdk'\nimport type { Provenance } from '../topology/naming/lineage'\nimport { getOcctKernel } from '../occt-kernel/occtKernel'\n\n/** 螺旋手性:`'right'`(右手,逆时针上旋)或 `'left'`(左手,顺时针上旋)。 */\nexport type HelixHanded = 'right' | 'left'\n\n/** `cad.helix` 参数。 */\nexport interface HelixOptions {\n /** 螺旋半径(mm,>0)。 */\n radius: number\n /** 螺距(mm,每圈沿轴的推进量,≠0)。 */\n pitch: number\n /** 圈数(>0)。 */\n turns: number\n /** 螺旋轴方向(单位向量,默认 +Z)。 */\n axis?: [number, number, number]\n /** 起点(默认原点)。 */\n origin?: [number, number, number]\n /**\n * 手性(默认 `'right'`)。同 pitch/height/radius 下左右旋互为镜像。\n * `'right'` 走 `makeHelixWire`,`'left'` 走 `makeHelixWireHanded(..., true)`。\n */\n handed?: HelixHanded\n}\n\n/** BREP 路径:用 occt 原生 makeHelixWire / makeHelixWireHanded 构造螺旋线,登记 1D 句柄。 */\nfunction helixBrep(opts: HelixOptions): Shape {\n const { radius, pitch, turns } = opts\n if (!(radius > 0)) throw new Error('E_HELIX_BAD_RADIUS: radius must be > 0')\n if (!(pitch !== 0)) throw new Error('E_HELIX_BAD_PITCH: pitch must be non-zero')\n if (!(turns > 0)) throw new Error('E_HELIX_BAD_TURNS: turns must be > 0')\n const handed = opts.handed ?? 'right'\n if (handed !== 'right' && handed !== 'left') {\n throw new Error(`E_HELIX_BAD_HANDED: handed must be 'right' or 'left' (got '${String(handed)}')`)\n }\n const axis = opts.axis ?? [0, 0, 1]\n const origin = opts.origin ?? [0, 0, 0]\n const height = pitch * turns\n const kernel = getBrepApi()\n const occt = getOcctKernel()\n const o = { x: origin[0], y: origin[1], z: origin[2] }\n const a = { x: axis[0], y: axis[1], z: axis[2] }\n // 右手默认沿用 makeHelixWire(保持两个原生入口都可达);左手走带手性的显式入口。\n const handle = (\n handed === 'left'\n ? occt.makeHelixWireHanded(o, a, pitch, height, radius, true)\n : occt.makeHelixWire(o, a, pitch, height, radius)\n ) as unknown as BrepHandle\n return fromBrepCurve(solidToShape(kernel, handle), { solid: handle })\n}\n\n/**\n * 构造螺旋线(1D 曲线)。\n * @group 创建\n * @inputs 0\n * @async false\n * @qual ok\n * @name helix\n * @note 平台 op:仅 occt 引擎(原生 makeHelixWire / makeHelixWireHanded)。非 occt 引擎执行前报错;brep_mock 不拦截。\n * @returns Shape 1D 螺旋线(kind:'curve')。\n * @param options.radius - 螺旋半径(mm,>0)。type:number required:true\n * @param options.pitch - 螺距(mm,≠0)。type:number required:true\n * @param options.turns - 圈数(>0)。type:number required:true\n * @param options.axis - 螺旋轴方向(默认 +Z)。type:Vec3 required:false\n * @param options.origin - 起点(默认原点)。type:Vec3 required:false\n * @param options.handed - 手性:'right'(默认)或 'left'。type:HelixHanded required:false\n * @example\n * const h = cad.helix({ radius: 5, pitch: 2, turns: 3 })\n * const lh = cad.helix({ radius: 5, pitch: 2, turns: 3, handed: 'left' })\n */\nexport const helix = defineOp({\n // name 必填:① 引擎门文案携带 op 名(`op 'helix' requires engine occt`,见\n // test/api/sweep-loft.test.ts GOTCHA-3 对该形态的要求);② occt op 覆盖率扫描器\n // 的 op 全集只收 `export const X = defineOp({ name: '…' })`——缺 name 的 op\n // 不可见,其直调的 occt 方法(makeHelixWireHanded)会被误判为「未接入」。\n name: 'helix',\n brep(opts: HelixOptions) {\n return helixBrep(opts)\n },\n engines: ['occt'],\n naming: { kind: 'unmodeled', reason: 'construct vocabulary pending Phase 3' } as Provenance,\n})\n"]}
@@ -43,6 +43,9 @@ export { toSVG, toMultiviewSVG, toPNG, toMultiviewPNG } from './view-export/inde
43
43
  export { edge, circleArc, ellipseEdge, ellipseArc, tangentArc, approximatePoints, interpolateWithTangents, curveDegreeElevate, curveKnotInsert, curveKnotRemove, curveIsPeriodic, } from './curve-sketch/index.js';
44
44
  export { faceOnSurface, nonPlanarFace, makeSolid, reverseSurfaceU, outerWire } from './surface-face/index.js';
45
45
  export { draftPrism, pipe } from './solid-offset/index.js';
46
+ export { containsPoint, distanceBetween, inertia, linearCenterOfMass, projectPointOnEdge, projectPointOnFace, classifyPointOnFace, uvFromPoint, vertexPosition, subShapeCount, iterShapes, liftCurve2d, commonCells, type SubShapeType, } from './measure-query/index.js';
47
+ export { boolean as booleanOp, type BooleanKind, type BooleanOptions, } from './boolean-op/index.js';
48
+ export { alignTo, type AlignAxis, type AlignAnchor, type AlignOptions } from './align/index.js';
46
49
  export { knurl } from './knurl.js';
47
50
  export { sdf } from './sdf.js';
48
51
  export { applyTransform } from '../mesh/rigid-transform.js';
@@ -63,7 +66,7 @@ export type { PbrAppearance, PbrColor, PbrAlphaMode, MaterialSpec, ShapeAppearan
63
66
  export { mergeAppearance, normalizeColor } from './appearance.js';
64
67
  export type { ShapeMeta, FileMeta, ShapeMetaMethods } from './meta.js';
65
68
  export { mergeMeta } from './meta.js';
66
- export * from './generated/script-face.js';
69
+ export { fuse, isValid, rotate, applyMatrix } from './generated/script-face.js';
67
70
  export { extrude } from './extrude.js';
68
71
  export { revolve } from './generated/operations.js';
69
72
  export { ok, err, isOk, isErr, unwrap, unwrapOr, vecAdd, vecSub, vecScale, vecDot, vecCross, vecLength, vecNormalize, createPlane, createNamedPlane, resolvePlane, kernelError, validationError, DEG2RAD, RAD2DEG, } from './geom-types/index.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AAQjE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AACrE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,WAAW,CAAA;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,KAAK,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAA;AACjD,OAAO,EAAE,KAAK,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAA;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,eAAe,EAAE,GAAG,EAAE,cAAc,EAAE,mBAAmB,EAAE,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACrI,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,EAAE,YAAY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E,YAAY,EAC3C,WAAW,EAAE,eAAe,EAC5B,OAAO,EAAE,OAAO,GACjB,MAAM,cAAc,CAAA;AACrB,YAAY,EACV,MAAM,EAAE,EAAE,EAAE,GAAG,EACf,SAAS,EACT,KAAK,EAAE,SAAS,EAAE,UAAU,EAC5B,IAAI,EAAE,UAAU,GACjB,MAAM,cAAc,CAAA;AAMrB,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAM3C,cAAc,iBAAiB,CAAA;AAG/B,cAAc,sBAAsB,CAAA;AACpC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA"}
package/dist/api/index.js CHANGED
@@ -60,6 +60,15 @@ export { edge, circleArc, ellipseEdge, ellipseArc, tangentArc, approximatePoints
60
60
  export { faceOnSurface, nonPlanarFace, makeSolid, reverseSurfaceU, outerWire } from './surface-face/index.js';
61
61
  // S4(occt-wasm op 接入):实体与偏置族剩余(平台 op engines:['occt'],方案 §3.4.4)。
62
62
  export { draftPrism, pipe } from './solid-offset/index.js';
63
+ // S4(occt-wasm op 接入):测量与查询族(平台 op engines:['occt'],方案 §3.4.6)。
64
+ export { containsPoint, distanceBetween, inertia, linearCenterOfMass, projectPointOnEdge, projectPointOnFace, classifyPointOnFace, uvFromPoint, vertexPosition, subShapeCount, iterShapes, liftCurve2d, commonCells, } from './measure-query/index.js';
65
+ // S4(occt-wasm op 接入):通用布尔族(方案 §3.4.5)。`boolean` 是 cad 面的名字
66
+ // (`api-namespace.ts` 的键);它此前在库里被整批平铺只是因为「导出面 ⊇ cad 面」
67
+ // 门禁——该门禁已删(§2.7 / DEC-7),且库作者侧全仓无人 `import { boolean }`
68
+ // (DEC-6),故库面只留自解释别名 `booleanOp`(指向同一 op)。
69
+ export { boolean as booleanOp, } from './boolean-op/index.js';
70
+ // S4(occt-wasm op 接入):包围盒对齐族(方案 §3.4.9)。
71
+ export { alignTo } from './align/index.js';
63
72
  export { knurl } from './knurl.js';
64
73
  export { sdf } from './sdf.js';
65
74
  // 应用变换(mesh 顶点烘焙)下沉到引擎侧 src/mesh/rigid-transform.ts(E-b:
@@ -83,12 +92,15 @@ export { solid, isShape, isCompound } from '../shape.js';
83
92
  export { compound as structCompound } from '../shape.js';
84
93
  export { mergeAppearance, normalizeColor } from './appearance.js';
85
94
  export { mergeMeta } from './meta.js';
86
- // ── P23:brepjs 兼容面接线(§4.2 / B1 三源一致)──
95
+ // ── P23:脚本面 op 与库面导出面的边界(§2.7 / DEC-5、DEC-6、DEC-7)──
87
96
  //
88
97
  // ① 生成脚本面 op(与 api-namespace 的 cad 面同源:api/generated/script-face.ts)。
89
- // 这批 op 经 `defineOp({ brep: __own_* })` 直连 core 自有实现,faijs 形态(Shape 进 / Shape 出、
90
- // 布尔双形态、brep-only),TS 侧与 `.fai.js` 侧同语义。
91
- export * from './generated/script-face.js';
98
+ // 这批 op **不再**整批平铺进本桶:库面公开什么只看库的作者是否需要(DEC-6),
99
+ // 脚本 op 是 `.fai.js` 的能力,库作者要的图形 / IO 函数走细粒度子路径
100
+ // (docs/api-contract.zh.md:63、:70),「脚本面有」不构成「库面必须有」的理由。
101
+ // 因此这里只按名保留**有库作者消费者**的脚本面 op(经 @faicad/faijs/api 被
102
+ // sheetmetal 等导入者);其余留在 `cad.*` 脚本面与子路径,不经本聚合面。
103
+ export { fuse, isValid, rotate, applyMatrix } from './generated/script-face.js';
92
104
  // P25: compat extrude/revolve (brep-only, face→prism / face→lathe) share one
93
105
  // definition between the TS surface and the cad scripting surface. The fcstd
94
106
  // codegen wires Pad/Pocket/Extrusion/Revolution through these (sketch face →
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AACjE,+DAA+D;AAC/D,8D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oD;AACpD,uDAAuD;AACvD,uBAAuB;AACvB,OAAO,EACL,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EACtC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,YAAY,EACnE,WAAW,EAAE,gBAAgB,EAAE,YAAY,EAC3C,WAAW,EAAE,eAAe,EAC5B,OAAO,EAAE,OAAO,GACjB,MAAM,cAAc,CAAA;AAOrB,wDAAwD;AACxD,0DAA0D;AAC1D,gEAAgE;AAChE,kDAAkD;AAClD,wCAAwC;AACxC,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAC3C,oEAAoE;AACpE,oDAAoD;AACpD,yDAAyD;AACzD,sEAAsE;AACtE,yDAAyD;AACzD,cAAc,iBAAiB,CAAA;AAC/B,+CAA+C;AAC/C,8DAA8D;AAC9D,cAAc,sBAAsB,CAAA;AACpC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA","sourcesContent":["/**\n * L3 API 面(api/)— faijs 库函数命名空间\n *\n * 导出全部官方库函数、Shape 构造器与 schema 表。\n * 库函数签名 = .fai.js 源码里的调用形态(无隐式参数);\n * 后端资源经 getBackends() 获取,保留声明经 keep() 表达。\n * 实现来源按 D11:mesh 侧复用 mesh/ 层,brep 侧复用既有 brep/ 层;\n * 缺失 brep 能力时经 D10 桥接调移植树 L2(见各 op 实现)。\n */\n\nexport { box, sphere, cylinder, cone, wedge } from './primitives'\n// `../3d_editor` 消费面(**不是废弃项**,措辞于 2026-09-22 校正):transform 家族\n// (translate/rotate_euler/scale/scale3d)为编辑器应用提供(拖拽 / 时间线语句),\n// 不属 faijs 平台面,但服务真实负载。**变更其 API 形态必须同步更新 `../3d_editor`**;\n// 各 op 的 JSDoc 已带校正后的 @deprecated。\n//\n// D1(2026-09-23 扩展库拆分,选项 C):四个 transform op **全部留 core**——\n// `translate` 是通用几何变换且是小程序端唯一在用的 transform op,同族不拆散。\nexport { translate, rotate_euler, scale, scale3d } from './transform'\nexport { union, subtract, intersect, cut } from './boolean'\nexport { engrave } from './engrave'\nexport { chamfer } from './chamfer'\nexport { fillet } from './fillet'\nexport { shell, type ShellParams } from './shell'\nexport { draft, type DraftParams } from './draft'\nexport { thicken } from './thicken'\nexport { defeature, reverseShape, unifySameDomain, sew, sewAndSolidify, removeHolesFromFace, type SewParams } from './feature-repair'\nexport { filletVariable } from './fillet-variable'\nexport { splitByPlane, type SplitByPlaneParams } from './split-by-plane'\nexport { sectionByPlane, type SectionByPlaneParams } from './section-by-plane'\nexport { screw } from './screw'\nexport { profile, buildProfileShape, assertProfileParams } from './profile'\nexport type { ProfileLineSeg, ProfileArcSeg, ProfileSeg, ProfileLoop, ProfileParams } from './profile'\nexport { sketchOnPlane, buildSketchOnPlaneWith } from './sketch-on-plane'\nexport { sketchOnFace, buildSketchOnFaceWith } from './sketch-on-face'\nexport { punchHole, buildPunchHole, punchSolidOf } from './punch-hole'\nexport type { SketchOnPlaneParams, PlaneSpec } from './sketch-on-plane'\nexport { wire } from './wire'\nexport { helix } from './helix'\nexport { split } from './split'\nexport { sweep, type SweepOptions, type SweepOrientation, type SweepGuideContact, type SweepLawKind } from './sweep'\nexport { loft } from './loft'\n// S3(occt-wasm op 接入):控制点阵 → B 样条面(平台 op engines:['occt'])。\nexport { surface, type SurfaceOptions } from './surface'\n// S3(occt-wasm op 接入):2D 轮廓偏置 → 1D 轮廓(平台 op engines:['occt'])。\nexport { offset2d, type Offset2DOptions, type Offset2DJoinType } from './offset2d'\n// S3(occt-wasm op 接入):面集一次成型为实体(平台 op engines:['occt'])。\nexport { solidFromFaces, type SolidFromFacesParams } from './solid-from-faces'\n// S3(occt-wasm op 接入):无限半空间实体(平台 op engines:['occt'],作无界布尔工具)。\nexport { halfSpace, type HalfSpaceParams } from './half-space'\n// S3(occt-wasm op 接入):导出族——STL(中立,纯数据序列化)/ BREP 文本(平台 op engines:['occt'])。\nexport { exportStl, type ExportStlOptions } from './export-stl'\nexport { exportBrep } from './export-brep'\n// S4(occt-wasm op 接入):类型判定谓词族(平台 op engines:['occt'],布尔返回)。\n// 仅平铺不与 ../shape 既有 TS 守卫同名者;`isCompound` 与 ../shape#isCompound 同名,\n// 只在 cad 脚本面(api-namespace)暴露,避免本桶重复导出。\nexport { isEdge, isFace, isShell, isVertex, isWire, isCompSolid, isEqual } from './shape-type'\n// S4 视图与导出族(平台 op engines:['occt'],字符串/Uint8Array 返回):平铺到 TS 桶。\nexport { toSVG, toMultiviewSVG, toPNG, toMultiviewPNG } from './view-export'\n// S4(occt-wasm op 接入):曲线与草图构造族(平台 op engines:['occt'],方案 §3.4.1)。\nexport {\n edge, circleArc, ellipseEdge, ellipseArc, tangentArc,\n approximatePoints, interpolateWithTangents,\n curveDegreeElevate, curveKnotInsert, curveKnotRemove, curveIsPeriodic,\n} from './curve-sketch'\n// S4(occt-wasm op 接入):曲面与面构造族(平台 op engines:['occt'],方案 §3.4.2)。\nexport { faceOnSurface, nonPlanarFace, makeSolid, reverseSurfaceU, outerWire } from './surface-face'\n// S4(occt-wasm op 接入):实体与偏置族剩余(平台 op engines:['occt'],方案 §3.4.4)。\nexport { draftPrism, pipe } from './solid-offset'\nexport { knurl } from './knurl'\nexport { sdf } from './sdf'\n// 应用变换(mesh 顶点烘焙)下沉到引擎侧 src/mesh/rigid-transform.ts(E-b:\n// 引擎不得 import api/compound;公共 API 经本 re-export 保持)。\nexport { applyTransform } from '../mesh/rigid-transform'\n// P2-f3:装配子层全量导出(solvePreview/entityFromGeometry 等经此到门面)。\n// A/B 组 op(fai_* / group / assembly / copy / load / text / svgExtrude)已迁出\n// core,见 @faicad/faijs-extra;装配**求解器**(solve/validate/joints/solvers)\n// 仍是平台能力,留在此处。\nexport * from './assembly'\n// ── H11:平台几何 op(方案 §4,替代 FCStd 迁移对编辑器 op 的借用)──\nexport { import_brep } from './import-brep'\nexport { import_step } from './import-step'\nexport { compound } from './compound-geom'\nexport { place } from './place'\nexport { faceNormal, bboxCenter, bboxMin, bboxMax } from './geom'\nexport { edgeRef } from './edge-ref'\nexport { faceRef } from './face-ref'\nexport { asset } from './asset'\nexport { solid, isShape, isCompound } from '../shape'\nexport { compound as structCompound } from '../shape'\nexport type { ShapeSlot, SolidShape, CompoundShape, CurveShape, StdShape, ShapeKind } from '../shape'\nexport type { Shape } from '../mesh/types'\n// PBR 外观规格(设计文档 2026-10-05 v2 §4.1):类型供宿主/第三方消费;\n// 归一化/合并纯函数供编辑器映射(faijsAppearanceToHost)与导出复用。\nexport type { PbrAppearance, PbrColor, PbrAlphaMode, MaterialSpec, ShapeAppearanceMethods } from './appearance'\nexport { mergeAppearance, normalizeColor } from './appearance'\n// 零件/文件级说明性元数据(设计文档 2026-10-05-meta):类型供宿主/第三方消费;\n// 合并纯函数供编辑器映射与导出复用。\nexport type { ShapeMeta, FileMeta, ShapeMetaMethods } from './meta'\nexport { mergeMeta } from './meta'\n\n// ── P23:brepjs 兼容面接线(§4.2 / B1 三源一致)──\n//\n// ① 生成脚本面 op(与 api-namespace 的 cad 面同源:api/generated/script-face.ts)。\n// 这批 op 经 `defineOp({ brep: __own_* })` 直连 core 自有实现,faijs 形态(Shape 进 / Shape 出、\n// 布尔双形态、brep-only),TS 侧与 `.fai.js` 侧同语义。\nexport * from './generated/script-face'\n// P25: compat extrude/revolve (brep-only, face→prism / face→lathe) share one\n// definition between the TS surface and the cad scripting surface. The fcstd\n// codegen wires Pad/Pocket/Extrusion/Revolution through these (sketch face →\n// cad.extrude / cad.revolve).\n// extrude 是平台手写 op(承载 upTo;长度形态委托生成投影)——见 api/extrude.ts;\n// revolve 仍直接取生成投影。\nexport { extrude } from './extrude'\nexport { revolve } from './generated/operations'\n//\n// ② 2026-09-25 core-decouple:brepjsCompat 命名空间与全部 op 投影随旧\n// 子包删除(§5.5 第 3 条,裁决 9)。此处只平铺**无 op 语义**的组合器与纯工具\n// (Result / 向量 / 平面 / 错误 / 常量),它们为 core 内联实现(§5.2),\n// 在两个面之间语义一致且无同名冲突。\nexport {\n ok, err, isOk, isErr, unwrap, unwrapOr,\n vecAdd, vecSub, vecScale, vecDot, vecCross, vecLength, vecNormalize,\n createPlane, createNamedPlane, resolvePlane,\n kernelError, validationError,\n DEG2RAD, RAD2DEG,\n} from './geom-types'\nexport type {\n Result, Ok, Err,\n BrepError,\n Plane, PlaneName, PlaneInput,\n Vec3, PointInput,\n} from './geom-types'\n// ── 2026-09-25 core-decouple:旧库建造工厂(makeExternalGear /\n// makeInternalGear / makePlanetaryGear / thread)与其句柄类型\n// (Vertex/Edge/…/Shape3D/ValidSolid/Bounds3D/Gear*)随裁决 9 删除;\n// Result 组合器 map/andThen 为 core 内联(§5.2),保留平铺;\n// brepjsCompat 命名空间整体删除(§5.5 第 3 条)。\nexport { map, andThen } from './geom-types'\n// ── 2026-09-25 core-decouple wrapup §2.2:sheetmetal 拓扑查询 / 构造 / 测量\n// 出口(faijs 风格,裁决 3 补进公开导出)。isValid 不在此面——cad 脚本面\n// 已有同语义出口(见 brep-topology.ts 头部注释)。同步测量(measureVolume\n// / measureArea / measureLength)为 api/generated/measurement.ts 第一方\n// 同步版,一并平铺(cad 面的 volume/area/length 为 async 脚本面重命名)。\nexport * from './brep-topology'\n// CadQuery 拓扑选择器子系统(独立物理边界,与 topo-resolve 隔离):\n// 等价搬运自 cq-compat,子路径直达 @faicad/faijs/api/cadquery-selectors。\nexport * from './cadquery-selectors'\nexport { measureVolume, measureArea, measureLength } from './generated/measurement'\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AACjE,+DAA+D;AAC/D,8DAA8D;AAC9D,4DAA4D;AAC5D,mCAAmC;AACnC,EAAE;A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AS,EAAE,MAAM,QAAQ,CAAA;AAElC,sDAAsD;AACtD,EAAE;AACF,sEAAsE;AACtE,kDAAkD;AAClD,kDAAkD;AAClD,2DAA2D;AAC3D,uDAAuD;AACvD,mDAAmD;AACnD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAC5E,6EAA6E;AAC7E,6EAA6E;AAC7E,6EAA6E;AAC7E,8BAA8B;AAC9B,0DAA0D;AAC1D,oBAAoB;AACpB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AAChD,EAAE;AACF,0DAA0D;AAC1D,oDAAoD;AACpD,uDAAuD;AACvD,uBAAuB;AACvB,OAAO,EACL,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EACtC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,YAAY,EACnE,WAAW,EAAE,gBAAgB,EAAE,YAAY,EAC3C,WAAW,EAAE,eAAe,EAC5B,OAAO,EAAE,OAAO,GACjB,MAAM,cAAc,CAAA;AAOrB,wDAAwD;AACxD,0DAA0D;AAC1D,gEAAgE;AAChE,kDAAkD;AAClD,wCAAwC;AACxC,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAC3C,oEAAoE;AACpE,oDAAoD;AACpD,yDAAyD;AACzD,sEAAsE;AACtE,yDAAyD;AACzD,cAAc,iBAAiB,CAAA;AAC/B,+CAA+C;AAC/C,8DAA8D;AAC9D,cAAc,sBAAsB,CAAA;AACpC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA","sourcesContent":["/**\n * L3 API 面(api/)— faijs 库函数命名空间\n *\n * 导出全部官方库函数、Shape 构造器与 schema 表。\n * 库函数签名 = .fai.js 源码里的调用形态(无隐式参数);\n * 后端资源经 getBackends() 获取,保留声明经 keep() 表达。\n * 实现来源按 D11:mesh 侧复用 mesh/ 层,brep 侧复用既有 brep/ 层;\n * 缺失 brep 能力时经 D10 桥接调移植树 L2(见各 op 实现)。\n */\n\nexport { box, sphere, cylinder, cone, wedge } from './primitives'\n// `../3d_editor` 消费面(**不是废弃项**,措辞于 2026-09-22 校正):transform 家族\n// (translate/rotate_euler/scale/scale3d)为编辑器应用提供(拖拽 / 时间线语句),\n// 不属 faijs 平台面,但服务真实负载。**变更其 API 形态必须同步更新 `../3d_editor`**;\n// 各 op 的 JSDoc 已带校正后的 @deprecated。\n//\n// D1(2026-09-23 扩展库拆分,选项 C):四个 transform op **全部留 core**——\n// `translate` 是通用几何变换且是小程序端唯一在用的 transform op,同族不拆散。\nexport { translate, rotate_euler, scale, scale3d } from './transform'\nexport { union, subtract, intersect, cut } from './boolean'\nexport { engrave } from './engrave'\nexport { chamfer } from './chamfer'\nexport { fillet } from './fillet'\nexport { shell, type ShellParams } from './shell'\nexport { draft, type DraftParams } from './draft'\nexport { thicken } from './thicken'\nexport { defeature, reverseShape, unifySameDomain, sew, sewAndSolidify, removeHolesFromFace, type SewParams } from './feature-repair'\nexport { filletVariable } from './fillet-variable'\nexport { splitByPlane, type SplitByPlaneParams } from './split-by-plane'\nexport { sectionByPlane, type SectionByPlaneParams } from './section-by-plane'\nexport { screw } from './screw'\nexport { profile, buildProfileShape, assertProfileParams } from './profile'\nexport type { ProfileLineSeg, ProfileArcSeg, ProfileSeg, ProfileLoop, ProfileParams } from './profile'\nexport { sketchOnPlane, buildSketchOnPlaneWith } from './sketch-on-plane'\nexport { sketchOnFace, buildSketchOnFaceWith } from './sketch-on-face'\nexport { punchHole, buildPunchHole, punchSolidOf } from './punch-hole'\nexport type { SketchOnPlaneParams, PlaneSpec } from './sketch-on-plane'\nexport { wire } from './wire'\nexport { helix } from './helix'\nexport { split } from './split'\nexport { sweep, type SweepOptions, type SweepOrientation, type SweepGuideContact, type SweepLawKind } from './sweep'\nexport { loft } from './loft'\n// S3(occt-wasm op 接入):控制点阵 → B 样条面(平台 op engines:['occt'])。\nexport { surface, type SurfaceOptions } from './surface'\n// S3(occt-wasm op 接入):2D 轮廓偏置 → 1D 轮廓(平台 op engines:['occt'])。\nexport { offset2d, type Offset2DOptions, type Offset2DJoinType } from './offset2d'\n// S3(occt-wasm op 接入):面集一次成型为实体(平台 op engines:['occt'])。\nexport { solidFromFaces, type SolidFromFacesParams } from './solid-from-faces'\n// S3(occt-wasm op 接入):无限半空间实体(平台 op engines:['occt'],作无界布尔工具)。\nexport { halfSpace, type HalfSpaceParams } from './half-space'\n// S3(occt-wasm op 接入):导出族——STL(中立,纯数据序列化)/ BREP 文本(平台 op engines:['occt'])。\nexport { exportStl, type ExportStlOptions } from './export-stl'\nexport { exportBrep } from './export-brep'\n// S4(occt-wasm op 接入):类型判定谓词族(平台 op engines:['occt'],布尔返回)。\n// 仅平铺不与 ../shape 既有 TS 守卫同名者;`isCompound` 与 ../shape#isCompound 同名,\n// 只在 cad 脚本面(api-namespace)暴露,避免本桶重复导出。\nexport { isEdge, isFace, isShell, isVertex, isWire, isCompSolid, isEqual } from './shape-type'\n// S4 视图与导出族(平台 op engines:['occt'],字符串/Uint8Array 返回):平铺到 TS 桶。\nexport { toSVG, toMultiviewSVG, toPNG, toMultiviewPNG } from './view-export'\n// S4(occt-wasm op 接入):曲线与草图构造族(平台 op engines:['occt'],方案 §3.4.1)。\nexport {\n edge, circleArc, ellipseEdge, ellipseArc, tangentArc,\n approximatePoints, interpolateWithTangents,\n curveDegreeElevate, curveKnotInsert, curveKnotRemove, curveIsPeriodic,\n} from './curve-sketch'\n// S4(occt-wasm op 接入):曲面与面构造族(平台 op engines:['occt'],方案 §3.4.2)。\nexport { faceOnSurface, nonPlanarFace, makeSolid, reverseSurfaceU, outerWire } from './surface-face'\n// S4(occt-wasm op 接入):实体与偏置族剩余(平台 op engines:['occt'],方案 §3.4.4)。\nexport { draftPrism, pipe } from './solid-offset'\n// S4(occt-wasm op 接入):测量与查询族(平台 op engines:['occt'],方案 §3.4.6)。\nexport {\n containsPoint, distanceBetween, inertia, linearCenterOfMass,\n projectPointOnEdge, projectPointOnFace, classifyPointOnFace,\n uvFromPoint, vertexPosition, subShapeCount, iterShapes,\n liftCurve2d, commonCells,\n type SubShapeType,\n} from './measure-query'\n// S4(occt-wasm op 接入):通用布尔族(方案 §3.4.5)。`boolean` 是 cad 面的名字\n// (`api-namespace.ts` 的键);它此前在库里被整批平铺只是因为「导出面 ⊇ cad 面」\n// 门禁——该门禁已删(§2.7 / DEC-7),且库作者侧全仓无人 `import { boolean }`\n// (DEC-6),故库面只留自解释别名 `booleanOp`(指向同一 op)。\nexport {\n boolean as booleanOp,\n type BooleanKind, type BooleanOptions,\n} from './boolean-op'\n// S4(occt-wasm op 接入):包围盒对齐族(方案 §3.4.9)。\nexport { alignTo, type AlignAxis, type AlignAnchor, type AlignOptions } from './align'\nexport { knurl } from './knurl'\nexport { sdf } from './sdf'\n// 应用变换(mesh 顶点烘焙)下沉到引擎侧 src/mesh/rigid-transform.ts(E-b:\n// 引擎不得 import api/compound;公共 API 经本 re-export 保持)。\nexport { applyTransform } from '../mesh/rigid-transform'\n// P2-f3:装配子层全量导出(solvePreview/entityFromGeometry 等经此到门面)。\n// A/B 组 op(fai_* / group / assembly / copy / load / text / svgExtrude)已迁出\n// core,见 @faicad/faijs-extra;装配**求解器**(solve/validate/joints/solvers)\n// 仍是平台能力,留在此处。\nexport * from './assembly'\n// ── H11:平台几何 op(方案 §4,替代 FCStd 迁移对编辑器 op 的借用)──\nexport { import_brep } from './import-brep'\nexport { import_step } from './import-step'\nexport { compound } from './compound-geom'\nexport { place } from './place'\nexport { faceNormal, bboxCenter, bboxMin, bboxMax } from './geom'\nexport { edgeRef } from './edge-ref'\nexport { faceRef } from './face-ref'\nexport { asset } from './asset'\nexport { solid, isShape, isCompound } from '../shape'\nexport { compound as structCompound } from '../shape'\nexport type { ShapeSlot, SolidShape, CompoundShape, CurveShape, StdShape, ShapeKind } from '../shape'\nexport type { Shape } from '../mesh/types'\n// PBR 外观规格(设计文档 2026-10-05 v2 §4.1):类型供宿主/第三方消费;\n// 归一化/合并纯函数供编辑器映射(faijsAppearanceToHost)与导出复用。\nexport type { PbrAppearance, PbrColor, PbrAlphaMode, MaterialSpec, ShapeAppearanceMethods } from './appearance'\nexport { mergeAppearance, normalizeColor } from './appearance'\n// 零件/文件级说明性元数据(设计文档 2026-10-05-meta):类型供宿主/第三方消费;\n// 合并纯函数供编辑器映射与导出复用。\nexport type { ShapeMeta, FileMeta, ShapeMetaMethods } from './meta'\nexport { mergeMeta } from './meta'\n\n// ── P23:脚本面 op 与库面导出面的边界(§2.7 / DEC-5、DEC-6、DEC-7)──\n//\n// ① 生成脚本面 op(与 api-namespace 的 cad 面同源:api/generated/script-face.ts)。\n// 这批 op **不再**整批平铺进本桶:库面公开什么只看库的作者是否需要(DEC-6),\n// 脚本 op 是 `.fai.js` 的能力,库作者要的图形 / IO 函数走细粒度子路径\n// (docs/api-contract.zh.md:63、:70),「脚本面有」不构成「库面必须有」的理由。\n// 因此这里只按名保留**有库作者消费者**的脚本面 op(经 @faicad/faijs/api 被\n// sheetmetal 等导入者);其余留在 `cad.*` 脚本面与子路径,不经本聚合面。\nexport { fuse, isValid, rotate, applyMatrix } from './generated/script-face'\n// P25: compat extrude/revolve (brep-only, face→prism / face→lathe) share one\n// definition between the TS surface and the cad scripting surface. The fcstd\n// codegen wires Pad/Pocket/Extrusion/Revolution through these (sketch face →\n// cad.extrude / cad.revolve).\n// extrude 是平台手写 op(承载 upTo;长度形态委托生成投影)——见 api/extrude.ts;\n// revolve 仍直接取生成投影。\nexport { extrude } from './extrude'\nexport { revolve } from './generated/operations'\n//\n// ② 2026-09-25 core-decouple:brepjsCompat 命名空间与全部 op 投影随旧\n// 子包删除(§5.5 第 3 条,裁决 9)。此处只平铺**无 op 语义**的组合器与纯工具\n// (Result / 向量 / 平面 / 错误 / 常量),它们为 core 内联实现(§5.2),\n// 在两个面之间语义一致且无同名冲突。\nexport {\n ok, err, isOk, isErr, unwrap, unwrapOr,\n vecAdd, vecSub, vecScale, vecDot, vecCross, vecLength, vecNormalize,\n createPlane, createNamedPlane, resolvePlane,\n kernelError, validationError,\n DEG2RAD, RAD2DEG,\n} from './geom-types'\nexport type {\n Result, Ok, Err,\n BrepError,\n Plane, PlaneName, PlaneInput,\n Vec3, PointInput,\n} from './geom-types'\n// ── 2026-09-25 core-decouple:旧库建造工厂(makeExternalGear /\n// makeInternalGear / makePlanetaryGear / thread)与其句柄类型\n// (Vertex/Edge/…/Shape3D/ValidSolid/Bounds3D/Gear*)随裁决 9 删除;\n// Result 组合器 map/andThen 为 core 内联(§5.2),保留平铺;\n// brepjsCompat 命名空间整体删除(§5.5 第 3 条)。\nexport { map, andThen } from './geom-types'\n// ── 2026-09-25 core-decouple wrapup §2.2:sheetmetal 拓扑查询 / 构造 / 测量\n// 出口(faijs 风格,裁决 3 补进公开导出)。isValid 不在此面——cad 脚本面\n// 已有同语义出口(见 brep-topology.ts 头部注释)。同步测量(measureVolume\n// / measureArea / measureLength)为 api/generated/measurement.ts 第一方\n// 同步版,一并平铺(cad 面的 volume/area/length 为 async 脚本面重命名)。\nexport * from './brep-topology'\n// CadQuery 拓扑选择器子系统(独立物理边界,与 topo-resolve 隔离):\n// 等价搬运自 cq-compat,子路径直达 @faicad/faijs/api/cadquery-selectors。\nexport * from './cadquery-selectors'\nexport { measureVolume, measureArea, measureLength } from './generated/measurement'\n"]}
@@ -3,8 +3,8 @@
3
3
  * op, built **on top of** defineOp (single implementation entry, v1).
4
4
  *
5
5
  * compatOp is NOT a second implementation path parallel to defineOp: every
6
- * shared mechanism is owned by defineOp — dispatch (dispatchPath + capability
7
- * routing), the Result boundary (runImpl + unwrapResult), product wrapping
6
+ * shared mechanism is owned by defineOp — dispatch (dispatchPath), the Result
7
+ * boundary (runImpl + unwrapResult), product wrapping
8
8
  * (wrapBrepOne / wrapByKeys), `DUAL_OP_META` mounting and
9
9
  * `assertLibConforms` validation. compatOp only does two things:
10
10
  * - spec pass-through: `CompatSpec` is a combinatorial inheritance of
@@ -24,7 +24,7 @@
24
24
  * rewrites it — any function running inside a DirectExecutor context can use
25
25
  * function-body declarations (C1), and call-site declarations override them
26
26
  * (`lang/keep.ts` resolveKeep). The decorated product therefore behaves like
27
- * any defineOp product: `keep`-safe, capability-aware, multi-output
27
+ * any defineOp product: `keep`-safe, engine-aware, multi-output
28
28
  * (`DUAL_OP_META.outputs` visible).
29
29
  *
30
30
  * No self-invented fields: `CompatSpec` extends `Omit<DualOpOptions, 'mesh' |
@@ -59,13 +59,13 @@ type MetaCarrier = {
59
59
  * Lift a brepjs-shaped function into a defineOp-decorated op facade (brep-only).
60
60
  *
61
61
  * The decorated product is identical to a defineOp product: same `DUAL_OP_META`
62
- * field set (kind 'dual-op', brep impl, name, capabilities, outputs, schema,
63
- * slotMap), same dispatch semantics, same Result boundary. The adapter carries
62
+ * field set (kind 'dual-op', brep impl, name, outputs, schema, slotMap), same
63
+ * dispatch semantics, same Result boundary. The adapter carries
64
64
  * only the brepjs bridging (input pass-through / call / adopt); every other mechanism
65
65
  * belongs to defineOp.
66
66
  *
67
67
  * @param fn the brepjs-shaped function.
68
- * @param spec the static spec (name required; capabilities/outputs/slotMap/
68
+ * @param spec the static spec (name required; engines/outputs/slotMap/
69
69
  * schema pass through and take effect).
70
70
  * @returns the compat op facade, carrying dual-op metadata.
71
71
  */
@@ -1 +1 @@
1
- {"version":3,"file":"compat-op.d.ts","sourceRoot":"","sources":["../../../src/api/internal/compat-op.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,EAEL,YAAY,EACZ,KAAK,UAAU,EACf,KAAK,aAAa,EAGnB,MAAM,iBAAiB,CAAA;AAIxB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAA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;;;;;;;;;;;;GAaG;AACH,wBAAgB,QAAQ,CACtB,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,EACnC,IAAI,EAAE,UAAU,GACf,CAAC,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC,KAAK,CAAC,CAAC,GAAG,WAAW,CAexD"}
@@ -3,8 +3,8 @@
3
3
  * op, built **on top of** defineOp (single implementation entry, v1).
4
4
  *
5
5
  * compatOp is NOT a second implementation path parallel to defineOp: every
6
- * shared mechanism is owned by defineOp — dispatch (dispatchPath + capability
7
- * routing), the Result boundary (runImpl + unwrapResult), product wrapping
6
+ * shared mechanism is owned by defineOp — dispatch (dispatchPath), the Result
7
+ * boundary (runImpl + unwrapResult), product wrapping
8
8
  * (wrapBrepOne / wrapByKeys), `DUAL_OP_META` mounting and
9
9
  * `assertLibConforms` validation. compatOp only does two things:
10
10
  * - spec pass-through: `CompatSpec` is a combinatorial inheritance of
@@ -24,7 +24,7 @@
24
24
  * rewrites it — any function running inside a DirectExecutor context can use
25
25
  * function-body declarations (C1), and call-site declarations override them
26
26
  * (`lang/keep.ts` resolveKeep). The decorated product therefore behaves like
27
- * any defineOp product: `keep`-safe, capability-aware, multi-output
27
+ * any defineOp product: `keep`-safe, engine-aware, multi-output
28
28
  * (`DUAL_OP_META.outputs` visible).
29
29
  *
30
30
  * No self-invented fields: `CompatSpec` extends `Omit<DualOpOptions, 'mesh' |
@@ -127,27 +127,25 @@ function buildAdapter(fn, spec) {
127
127
  * Lift a brepjs-shaped function into a defineOp-decorated op facade (brep-only).
128
128
  *
129
129
  * The decorated product is identical to a defineOp product: same `DUAL_OP_META`
130
- * field set (kind 'dual-op', brep impl, name, capabilities, outputs, schema,
131
- * slotMap), same dispatch semantics, same Result boundary. The adapter carries
130
+ * field set (kind 'dual-op', brep impl, name, outputs, schema, slotMap), same
131
+ * dispatch semantics, same Result boundary. The adapter carries
132
132
  * only the brepjs bridging (input pass-through / call / adopt); every other mechanism
133
133
  * belongs to defineOp.
134
134
  *
135
135
  * @param fn the brepjs-shaped function.
136
- * @param spec the static spec (name required; capabilities/outputs/slotMap/
136
+ * @param spec the static spec (name required; engines/outputs/slotMap/
137
137
  * schema pass through and take effect).
138
138
  * @returns the compat op facade, carrying dual-op metadata.
139
139
  */
140
140
  export function compatOp(fn, spec) {
141
- const { outputs, capabilities, engines, schema, slotMap, naming } = spec;
141
+ const { outputs, engines, schema, slotMap, naming } = spec;
142
142
  // `outputs` flows through defineOp's own wrapping path: the adapter adopts
143
143
  // per declared field, then defineOp wraps — isShape passthrough, so no
144
144
  // double wrapping (§3.2).
145
145
  return defineOp({
146
146
  brep: buildAdapter(fn, spec),
147
147
  name: spec.name,
148
- capabilities,
149
148
  // D11 透传:平台 op(compat 实现调 occt-only 方法)在生成物里声明 engines。
150
- // engines 与 capabilities 可并存(2026-09-24 撤销 D11-7 互斥),此处两条独立透传。
151
149
  engines,
152
150
  outputs,
153
151
  schema,
@@ -1 +1 @@
1
- {"version":3,"file":"compat-op.js","sourceRoot":"","sources":["../../../src/api/internal/compat-op.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,EACL,QAAQ,EACR,YAAY,GAKb,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AACrC,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAU9C;;;;;;;;;GASG;AACH,MAAM,UAAU,aAAa,CAAC,CAAU,EAAE,IAAY;IACpD,OAAO,YAAY,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;AAC9B,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,SAAS,QAAQ,CAAC,CAAU,EAAE,IAAgB,EAAE,QAAiB;IAC/D,IAAI,OAAO,CAAC,CAAC,CA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I,OAAO,GAAG,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC;gBAAE,OAAO,GAAG,CAAA;QACjE,CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAA;AAClB,CAAC;AAED;;;;;;;;;GASG;AACH,SAAS,YAAY,CAAC,EAAmC,EAAE,IAAgB;IACzE,OAAO,KAAK,EAAE,GAAG,IAAe,EAAwB,EAAE;QACxD,gDAAgD;QAChD,MAAM,SAAS,GAAG,IAAI,CAAA;QACtB,2EAA2E;QAC3E,wEAAwE;QACxE,uEAAuE;QACvE,yEAAyE;QACzE,2CAA2C;QAC3C,MAAM,KAAK,GAAG,aAAa,CAAC,MAAM,UAAU,CAAC,EAAW,EAAE,SAAS,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAA;QAChF,OAAO,QAAQ,CAAC,KAAK,EAAE,IAAI,EAAE,oBAAoB,CAAC,IAAI,CAAC,CAAgB,CAAA;IACzE,CAAC,CAAA;AACH,CAAC;AAKD;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,QAAQ,CACtB,EAAmC,EACnC,IAAgB;IAEhB,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,CAAA;IACxE,2EAA2E;IAC3E,uEAAuE;IACvE,0BAA0B;IAC1B,OAAO,QAAQ,CAAC;QACd,IAAI,EAAE,YAAY,CAAC,EAAE,EAAE,IAAI,CAAC;QAC5B,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,YAAY;QACZ,wDAAwD;QACxD,+DAA+D;QAC/D,OAAO;QACP,OAAO;QACP,MAAM;QACN,OAAO;QACP,MAAM;KACP,CAAsE,CAAA;AACzE,CAAC","sourcesContent":["/**\n * compat-op — lift an arbitrary brepjs-shaped function into a faijs statement\n * op, built **on top of** defineOp (single implementation entry, v1).\n *\n * compatOp is NOT a second implementation path parallel to defineOp: every\n * shared mechanism is owned by defineOp — dispatch (dispatchPath + capability\n * routing), the Result boundary (runImpl + unwrapResult), product wrapping\n * (wrapBrepOne / wrapByKeys), `DUAL_OP_META` mounting and\n * `assertLibConforms` validation. compatOp only does two things:\n * - spec pass-through: `CompatSpec` is a combinatorial inheritance of\n * `DualOpOptions` (single source of truth, fields auto-sync — §3.1);\n * - adapter construction: a brepjs-shaped bridge feeding the brep impl — the\n * two bridging steps that cannot be shared (all reuse shared\n * infrastructure, §3.2):\n * 1. call + unwrap — callBrepjs through the shared unwrapResult\n * (`err` throws an OpError carrying the op name + BrepError code);\n * async library fns are awaited first, so `Promise<Result<…>>` —\n * the shape every kernel-awaiting library returns — unwraps too;\n * 2. adoptOut — outward adoption: top-level handle / `outputs`-declared\n * fields (single handle or handle array) → adoptEntity\n * (unregister finalizer + fromHandle).\n *\n * The keep / keepHidden contract is untouched: compatOp neither blocks nor\n * rewrites it — any function running inside a DirectExecutor context can use\n * function-body declarations (C1), and call-site declarations override them\n * (`lang/keep.ts` resolveKeep). The decorated product therefore behaves like\n * any defineOp product: `keep`-safe, capability-aware, multi-output\n * (`DUAL_OP_META.outputs` visible).\n *\n * No self-invented fields: `CompatSpec` extends `Omit<DualOpOptions, 'mesh' |\n * 'brep'>` and declares nothing else; the only tweak is `name` tightened\n * (inherited field, not a new one).\n *\n * @module\n */\n\nimport {\n defineOp,\n DUAL_OP_META,\n type DualOpMeta,\n type DualOpOptions,\n type BrepImpl,\n type BrepProduct,\n} from '../../define-op'\nimport { isShape } from '../../shape'\nimport { adoptEntity, callBrepjs } from './l3-bridge'\nimport { unwrapResult } from './result-unwrap'\nimport type { Shape } from '../../mesh/types'\n\n/** compatOp's static spec: combinatorial inheritance (single source of truth). */\nexport interface CompatSpec extends Omit<DualOpOptions, 'mesh' | 'brep'> {\n /** Op name (error messages + metadata; required, unlike defineOp's optional name). */\n name: string\n\n}\n\n/**\n * Statement-boundary unwrap — `err` becomes an execution error carrying the op\n * name and the `BrepError` code. Delegates to the shared\n * {@link unwrapResult} so the compat boundary and defineOp's Result boundary\n * share one leaf implementation (no drift).\n *\n * @param r - the Result-like value to unwrap.\n * @param name - the op name used in error messages.\n * @returns the unwrapped ok value.\n */\nexport function unwrapOrThrow(r: unknown, name: string): unknown {\n return unwrapResult(r, name)\n}\n\n/**\n * Bridging step: outward adoption — top-level handle or `outputs`-declared\n * fields → adoptEntity (unregister finalizer + fromHandle). `outputs` may also\n * name an array field of handles; every element is adopted individually.\n * Deduplication of already-adopted handles lives inside adoptEntity. A field\n * already being a faijs Shape passes through untouched (no double adoption).\n *\n * @param v - the library product.\n * @param spec - the compat spec (name + optional `outputs`).\n * @param segments - caller-provided `segments` (裁决 1,§5.2), forwarded so the\n * adopted handles' tessellation honors it.\n * @returns the adopted record / Shape, or the plain data untouched.\n */\nfunction adoptOut(v: unknown, spec: CompatSpec, segments?: number): unknown {\n if (isShape(v)) return v\n if (spec.outputs && typeof v === 'object' && v !== null && !Array.isArray(v)) {\n const rec = v as Record<string, unknown>\n for (const f of spec.outputs) {\n const field = rec[f]\n rec[f] = Array.isArray(field)\n ? field.map((x) => adoptEntity(x, spec.name, segments))\n : adoptEntity(field, spec.name, segments)\n }\n return v\n }\n return adoptEntity(v, spec.name, segments)\n}\n\n/**\n * Read the caller-supplied tessellation density from a compat op's args.\n *\n * 裁决 1:faijs 的 `segments` 显式超集在 brepjs 投影侧也必须可选;这里从调用点\n * 的尾参 options(或任一 plain-object 实参)抓取 `segments`,在产出句柄被收编为\n * faijs Shape 时透传给 `fromHandle` 的三角化(§5.2 机制)。默认不传 = 由\n * handle-bridge 的 64 兜底。\n */\nfunction readSegmentsFromArgs(args: unknown[]): number | undefined {\n for (let i = args.length - 1; i >= 0; i--) {\n const a = args[i]\n if (\n a !== null &&\n typeof a === 'object' &&\n !Array.isArray(a) &&\n Object.getPrototypeOf(a) === Object.prototype\n ) {\n const seg = (a as Record<string, unknown>).segments\n if (typeof seg === 'number' && Number.isFinite(seg)) return seg\n }\n }\n return undefined\n}\n\n/**\n * Build the brep-only adapter: pass inputs through → call the vendor function\n * through the shared unwrap → adopt the product (with the caller's `segments`,\n * 裁决 1/§5.2). The adapter never dispatches and never mounts metadata —\n * those are defineOp's.\n *\n * @param fn the brepjs-shaped function (dual-form normalization inside, D11).\n * @param spec the static op spec (name + options pass-through).\n * @returns a `BrepImpl` compatible with defineOp's brep-only decl.\n */\nfunction buildAdapter(fn: (...args: unknown[]) => unknown, spec: CompatSpec): BrepImpl<unknown[]> {\n return async (...args: unknown[]): Promise<BrepProduct> => {\n // faijs-native 库消费 core Shape:输入原样直传,保留 BREP 槽。\n const effective = args\n // Async library fns are supported: a library that awaits its kernel (every\n // `@faicad/faijs-gears` factory does — `await getGearKernel()`) returns\n // `Promise<Result<…>>`, and the shared unwrap is a sync leaf that only\n // recognizes settled Result records. Awaiting a non-promise product is a\n // no-op, so sync libraries are unaffected.\n const value = unwrapOrThrow(await callBrepjs(fn as never, effective), spec.name)\n return adoptOut(value, spec, readSegmentsFromArgs(args)) as BrepProduct\n }\n}\n\n/** Carrier of the DualOpMeta mounted by defineOp (same shape as defineOp's). */\ntype MetaCarrier = { [DUAL_OP_META]?: DualOpMeta }\n\n/**\n * Lift a brepjs-shaped function into a defineOp-decorated op facade (brep-only).\n *\n * The decorated product is identical to a defineOp product: same `DUAL_OP_META`\n * field set (kind 'dual-op', brep impl, name, capabilities, outputs, schema,\n * slotMap), same dispatch semantics, same Result boundary. The adapter carries\n * only the brepjs bridging (input pass-through / call / adopt); every other mechanism\n * belongs to defineOp.\n *\n * @param fn the brepjs-shaped function.\n * @param spec the static spec (name required; capabilities/outputs/slotMap/\n * schema pass through and take effect).\n * @returns the compat op facade, carrying dual-op metadata.\n */\nexport function compatOp(\n fn: (...args: unknown[]) => unknown,\n spec: CompatSpec,\n): ((...args: unknown[]) => Promise<Shape>) & MetaCarrier {\n const { outputs, capabilities, engines, schema, slotMap, naming } = spec\n // `outputs` flows through defineOp's own wrapping path: the adapter adopts\n // per declared field, then defineOp wraps — isShape passthrough, so no\n // double wrapping (§3.2).\n return defineOp({\n brep: buildAdapter(fn, spec),\n name: spec.name,\n capabilities,\n // D11 透传:平台 op(compat 实现调 occt-only 方法)在生成物里声明 engines。\n // engines 与 capabilities 可并存(2026-09-24 撤销 D11-7 互斥),此处两条独立透传。\n engines,\n outputs,\n schema,\n slotMap,\n naming,\n }) as unknown as ((...args: unknown[]) => Promise<Shape>) & MetaCarrier\n}"]}
1
+ {"version":3,"file":"compat-op.js","sourceRoot":"","sources":["../../../src/api/internal/compat-op.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,EACL,QAAQ,EACR,YAAY,GAKb,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AACrC,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAU9C;;;;;;;;;GASG;AACH,MAAM,UAAU,aAAa,CAAC,CAAU,EAAE,IAAY;IACpD,OAAO,YAAY,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;AAC9B,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,SAAS,QAAQ,CAAC,CAAU,EAAE,IAAgB,EAAE,QAAiB;IAC/D,IAAI,OAAO,CAAC,CAAC,CAAC;QAAE,OAAO,CAAC,CAAA;IACxB,IAAI,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;QAC7E,MAAM,GAAG,GAAG,CAA4B,CAAA;QACxC,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YAC7B,MAAM,KAAK,GAAG,GAAG,CAAC,CAAC,CAAC,CAAA;YACpB,GAAG,CAAC,CAAC,CAAC,GAAG,KA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,yEAAyE;QACzE,2CAA2C;QAC3C,MAAM,KAAK,GAAG,aAAa,CAAC,MAAM,UAAU,CAAC,EAAW,EAAE,SAAS,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAA;QAChF,OAAO,QAAQ,CAAC,KAAK,EAAE,IAAI,EAAE,oBAAoB,CAAC,IAAI,CAAC,CAAgB,CAAA;IACzE,CAAC,CAAA;AACH,CAAC;AAKD;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,QAAQ,CACtB,EAAmC,EACnC,IAAgB;IAEhB,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,CAAA;IAC1D,2EAA2E;IAC3E,uEAAuE;IACvE,0BAA0B;IAC1B,OAAO,QAAQ,CAAC;QACd,IAAI,EAAE,YAAY,CAAC,EAAE,EAAE,IAAI,CAAC;QAC5B,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,wDAAwD;QACxD,OAAO;QACP,OAAO;QACP,MAAM;QACN,OAAO;QACP,MAAM;KACP,CAAsE,CAAA;AACzE,CAAC","sourcesContent":["/**\n * compat-op — lift an arbitrary brepjs-shaped function into a faijs statement\n * op, built **on top of** defineOp (single implementation entry, v1).\n *\n * compatOp is NOT a second implementation path parallel to defineOp: every\n * shared mechanism is owned by defineOp — dispatch (dispatchPath), the Result\n * boundary (runImpl + unwrapResult), product wrapping\n * (wrapBrepOne / wrapByKeys), `DUAL_OP_META` mounting and\n * `assertLibConforms` validation. compatOp only does two things:\n * - spec pass-through: `CompatSpec` is a combinatorial inheritance of\n * `DualOpOptions` (single source of truth, fields auto-sync — §3.1);\n * - adapter construction: a brepjs-shaped bridge feeding the brep impl — the\n * two bridging steps that cannot be shared (all reuse shared\n * infrastructure, §3.2):\n * 1. call + unwrap — callBrepjs through the shared unwrapResult\n * (`err` throws an OpError carrying the op name + BrepError code);\n * async library fns are awaited first, so `Promise<Result<…>>` —\n * the shape every kernel-awaiting library returns — unwraps too;\n * 2. adoptOut — outward adoption: top-level handle / `outputs`-declared\n * fields (single handle or handle array) → adoptEntity\n * (unregister finalizer + fromHandle).\n *\n * The keep / keepHidden contract is untouched: compatOp neither blocks nor\n * rewrites it — any function running inside a DirectExecutor context can use\n * function-body declarations (C1), and call-site declarations override them\n * (`lang/keep.ts` resolveKeep). The decorated product therefore behaves like\n * any defineOp product: `keep`-safe, engine-aware, multi-output\n * (`DUAL_OP_META.outputs` visible).\n *\n * No self-invented fields: `CompatSpec` extends `Omit<DualOpOptions, 'mesh' |\n * 'brep'>` and declares nothing else; the only tweak is `name` tightened\n * (inherited field, not a new one).\n *\n * @module\n */\n\nimport {\n defineOp,\n DUAL_OP_META,\n type DualOpMeta,\n type DualOpOptions,\n type BrepImpl,\n type BrepProduct,\n} from '../../define-op'\nimport { isShape } from '../../shape'\nimport { adoptEntity, callBrepjs } from './l3-bridge'\nimport { unwrapResult } from './result-unwrap'\nimport type { Shape } from '../../mesh/types'\n\n/** compatOp's static spec: combinatorial inheritance (single source of truth). */\nexport interface CompatSpec extends Omit<DualOpOptions, 'mesh' | 'brep'> {\n /** Op name (error messages + metadata; required, unlike defineOp's optional name). */\n name: string\n\n}\n\n/**\n * Statement-boundary unwrap — `err` becomes an execution error carrying the op\n * name and the `BrepError` code. Delegates to the shared\n * {@link unwrapResult} so the compat boundary and defineOp's Result boundary\n * share one leaf implementation (no drift).\n *\n * @param r - the Result-like value to unwrap.\n * @param name - the op name used in error messages.\n * @returns the unwrapped ok value.\n */\nexport function unwrapOrThrow(r: unknown, name: string): unknown {\n return unwrapResult(r, name)\n}\n\n/**\n * Bridging step: outward adoption — top-level handle or `outputs`-declared\n * fields → adoptEntity (unregister finalizer + fromHandle). `outputs` may also\n * name an array field of handles; every element is adopted individually.\n * Deduplication of already-adopted handles lives inside adoptEntity. A field\n * already being a faijs Shape passes through untouched (no double adoption).\n *\n * @param v - the library product.\n * @param spec - the compat spec (name + optional `outputs`).\n * @param segments - caller-provided `segments` (裁决 1,§5.2), forwarded so the\n * adopted handles' tessellation honors it.\n * @returns the adopted record / Shape, or the plain data untouched.\n */\nfunction adoptOut(v: unknown, spec: CompatSpec, segments?: number): unknown {\n if (isShape(v)) return v\n if (spec.outputs && typeof v === 'object' && v !== null && !Array.isArray(v)) {\n const rec = v as Record<string, unknown>\n for (const f of spec.outputs) {\n const field = rec[f]\n rec[f] = Array.isArray(field)\n ? field.map((x) => adoptEntity(x, spec.name, segments))\n : adoptEntity(field, spec.name, segments)\n }\n return v\n }\n return adoptEntity(v, spec.name, segments)\n}\n\n/**\n * Read the caller-supplied tessellation density from a compat op's args.\n *\n * 裁决 1:faijs 的 `segments` 显式超集在 brepjs 投影侧也必须可选;这里从调用点\n * 的尾参 options(或任一 plain-object 实参)抓取 `segments`,在产出句柄被收编为\n * faijs Shape 时透传给 `fromHandle` 的三角化(§5.2 机制)。默认不传 = 由\n * handle-bridge 的 64 兜底。\n */\nfunction readSegmentsFromArgs(args: unknown[]): number | undefined {\n for (let i = args.length - 1; i >= 0; i--) {\n const a = args[i]\n if (\n a !== null &&\n typeof a === 'object' &&\n !Array.isArray(a) &&\n Object.getPrototypeOf(a) === Object.prototype\n ) {\n const seg = (a as Record<string, unknown>).segments\n if (typeof seg === 'number' && Number.isFinite(seg)) return seg\n }\n }\n return undefined\n}\n\n/**\n * Build the brep-only adapter: pass inputs through → call the vendor function\n * through the shared unwrap → adopt the product (with the caller's `segments`,\n * 裁决 1/§5.2). The adapter never dispatches and never mounts metadata —\n * those are defineOp's.\n *\n * @param fn the brepjs-shaped function (dual-form normalization inside, D11).\n * @param spec the static op spec (name + options pass-through).\n * @returns a `BrepImpl` compatible with defineOp's brep-only decl.\n */\nfunction buildAdapter(fn: (...args: unknown[]) => unknown, spec: CompatSpec): BrepImpl<unknown[]> {\n return async (...args: unknown[]): Promise<BrepProduct> => {\n // faijs-native 库消费 core Shape:输入原样直传,保留 BREP 槽。\n const effective = args\n // Async library fns are supported: a library that awaits its kernel (every\n // `@faicad/faijs-gears` factory does — `await getGearKernel()`) returns\n // `Promise<Result<…>>`, and the shared unwrap is a sync leaf that only\n // recognizes settled Result records. Awaiting a non-promise product is a\n // no-op, so sync libraries are unaffected.\n const value = unwrapOrThrow(await callBrepjs(fn as never, effective), spec.name)\n return adoptOut(value, spec, readSegmentsFromArgs(args)) as BrepProduct\n }\n}\n\n/** Carrier of the DualOpMeta mounted by defineOp (same shape as defineOp's). */\ntype MetaCarrier = { [DUAL_OP_META]?: DualOpMeta }\n\n/**\n * Lift a brepjs-shaped function into a defineOp-decorated op facade (brep-only).\n *\n * The decorated product is identical to a defineOp product: same `DUAL_OP_META`\n * field set (kind 'dual-op', brep impl, name, outputs, schema, slotMap), same\n * dispatch semantics, same Result boundary. The adapter carries\n * only the brepjs bridging (input pass-through / call / adopt); every other mechanism\n * belongs to defineOp.\n *\n * @param fn the brepjs-shaped function.\n * @param spec the static spec (name required; engines/outputs/slotMap/\n * schema pass through and take effect).\n * @returns the compat op facade, carrying dual-op metadata.\n */\nexport function compatOp(\n fn: (...args: unknown[]) => unknown,\n spec: CompatSpec,\n): ((...args: unknown[]) => Promise<Shape>) & MetaCarrier {\n const { outputs, engines, schema, slotMap, naming } = spec\n // `outputs` flows through defineOp's own wrapping path: the adapter adopts\n // per declared field, then defineOp wraps — isShape passthrough, so no\n // double wrapping (§3.2).\n return defineOp({\n brep: buildAdapter(fn, spec),\n name: spec.name,\n // D11 透传:平台 op(compat 实现调 occt-only 方法)在生成物里声明 engines。\n engines,\n outputs,\n schema,\n slotMap,\n naming,\n }) as unknown as ((...args: unknown[]) => Promise<Shape>) & MetaCarrier\n}"]}
@@ -0,0 +1,80 @@
1
+ /**
2
+ * export-members — 导出命令的「入参 Shape → 成员表」(方案 §2.6 定式 3 的共用件)
3
+ *
4
+ * `cad.exportStep`(`api/export-step.ts`)与 `cad.export3mf`(`api/export-3mf.ts`)
5
+ * 是同一个库面序列化器(`brep/export/export-model.ts#exportModelSync`)的两个脚本面
6
+ * 薄壳。两者的差别只有「一个成员交给写出器的载荷是 `solid` 还是 `mesh`」;把入参拆
7
+ * 成成员表这一步完全一致,故收在本文件——两份拷贝各自漂移会让脚本面与库面同源
8
+ * (矩阵 B12 / B14)失去保障。
9
+ *
10
+ * 拆解口径对齐现成先例 `node-host/cli.ts#writeAssemblyStep`:
11
+ * - 成员 = `CompoundShape.children`(同序;嵌套 compound 不递归展开,与先例一致);
12
+ * - 成员名 = `behavior.memberNames[i]`(装配 op 写入的短名,`memberColors` 亦以它为
13
+ * 键),无装配 behavior 时回落 `nameOf(child)`;
14
+ * - 成员色 = `behavior.memberColors[成员名]`(sRGB 0–1,STEP 写 XCAF COLOUR_RGB、
15
+ * 3MF 写 basematerials);
16
+ * - 非 compound 入参 = 单成员、不带名与色,与 `cli.ts#writeOutput`(`:744-758`)同
17
+ * 口径——单件导出不写名。
18
+ *
19
+ * 判定用**结构**判定 `isCompoundLike` 而非 SDK 的 `isShape`/`isCompound`:本 op 吃
20
+ * 的是脚本文本传进来的值,可能是跨库产物,不能对它提「必须由本库构造器创建」的要求
21
+ * (同 `keep-syntax §5.3 D5` 的既有取舍)。
22
+ *
23
+ * 成员几何一律由调用方**现场**读(`brepOf(child)`),不取创建期快照:装配变换在语句
24
+ * 之后才烘进 `slot.solid`,快照对已变换成员是陈旧的(`cli.ts#writeAssemblyStep` 的
25
+ * 同款注释)。
26
+ */
27
+ import type { Shape, Vec3 } from '../../mesh/types.js';
28
+ import type { CompoundShape } from '../../shape.js';
29
+ /** 导出成员:一个待导出的几何 + 其身份(名 / 色)。 */
30
+ export interface ExportMember {
31
+ /** 成员几何:compound 的成员,或单件入参本身。 */
32
+ shape: Shape;
33
+ /** 成员名(写 STEP PRODUCT 名 / 3MF `<object name>`);无名时缺省。 */
34
+ name?: string;
35
+ /** sRGB 0–1 成员色(来自装配 behavior 的 `memberColors`)。 */
36
+ color?: readonly [number, number, number];
37
+ }
38
+ /**
39
+ * 把导出命令的入参拆成成员表。
40
+ *
41
+ * @param input - 单件 Shape 或装配 compound(结构判定)。
42
+ * @returns 成员表;空 compound 返回空数组——调用方必须显式报错,不得落空文件。
43
+ */
44
+ export declare function exportMembersOf(input: Shape | CompoundShape): ExportMember[];
45
+ /** 装配节点位姿(与 `Shape.transform` 同形态,见 mesh/types.ts)。 */
46
+ export interface ExportTransform {
47
+ translate?: Vec3;
48
+ rotate?: {
49
+ angle: number;
50
+ axis?: Vec3;
51
+ };
52
+ matrix?: number[];
53
+ }
54
+ /** 导出成员树节点:结构(名 / 色 / 位姿 / 子节点)与几何(shape)分离。 */
55
+ export interface ExportMemberNode {
56
+ /** 成员几何:compound 的成员,或单件入参本身。 */
57
+ shape: Shape;
58
+ /** 成员名(写 3MF `<object name>` / STEP PRODUCT 名);无名时缺省。 */
59
+ name?: string;
60
+ /** sRGB 0–1 成员色(来自装配 behavior 的 `memberColors`)。 */
61
+ color?: readonly [number, number, number];
62
+ /** 本节点相对父的位姿(来自 `shape.transform`)。 */
63
+ transform?: ExportTransform;
64
+ /** 子节点(嵌套装配);非 compound 叶节点缺省。 */
65
+ children?: ExportMemberNode[];
66
+ }
67
+ /**
68
+ * 导出命令入参 → 成员树(方案 §2.1「装配模型 = 节点属性,单一真源」的脚本面投影)。
69
+ * 与 `exportMembersOf`(平铺)不同,本函数**保留嵌套**:compound 的成员若自身是
70
+ * compound 则递归展开为子树(同序),叶节点携带其 `shape.transform` 作为相对父位姿。
71
+ *
72
+ * 名称 / 颜色取自各层 compound 的 behavior(`memberNames` / `memberColors`,装配 op
73
+ * 写入;core 只读不写,不 import extra)。本层只管结构,几何载荷由调用方(各 op)
74
+ * 现场读取——避免创建期快照陈旧(同 `exportMembersOf` 注释)。
75
+ *
76
+ * @param input - 脚本面导出命令的入参形状(叶或 compound 装配)。
77
+ * @returns 保留嵌套结构的成员树;叶节点携带 `shape.transform` 作为相对父位姿。
78
+ */
79
+ export declare function exportTreeOf(input: Shape | CompoundShape): ExportMemberNode[];
80
+ //# sourceMappingURL=export-members.d.ts.map
@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