@faicad/faijs 0.17.0 → 0.18.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/dist/api/api-namespace.js +2 -2
  2. package/dist/api/api-namespace.js.map +1 -1
  3. package/dist/api/boolean.d.ts.map +1 -1
  4. package/dist/api/boolean.js +64 -26
  5. package/dist/api/boolean.js.map +1 -1
  6. package/dist/api/brep-mirror/booleanFns.d.ts.map +1 -1
  7. package/dist/api/brep-mirror/booleanFns.js +11 -6
  8. package/dist/api/brep-mirror/booleanFns.js.map +1 -1
  9. package/dist/api/brep-mirror/topologyFns.d.ts.map +1 -1
  10. package/dist/api/brep-mirror/topologyFns.js +4 -1
  11. package/dist/api/brep-mirror/topologyFns.js.map +1 -1
  12. package/dist/api/chamfer.d.ts +12 -8
  13. package/dist/api/chamfer.d.ts.map +1 -1
  14. package/dist/api/chamfer.js +52 -23
  15. package/dist/api/chamfer.js.map +1 -1
  16. package/dist/api/extrude.d.ts.map +1 -1
  17. package/dist/api/extrude.js +69 -15
  18. package/dist/api/extrude.js.map +1 -1
  19. package/dist/api/generated/operations.js +5 -5
  20. package/dist/api/generated/operations.js.map +1 -1
  21. package/dist/api/generated/script-face-manifest.js +12 -12
  22. package/dist/api/generated/script-face-manifest.js.map +1 -1
  23. package/dist/api/generated/sketching.js +1 -1
  24. package/dist/api/generated/sketching.js.map +1 -1
  25. package/dist/api/generated/topology.js +7 -7
  26. package/dist/api/generated/topology.js.map +1 -1
  27. package/dist/api/index.d.ts +2 -1
  28. package/dist/api/index.d.ts.map +1 -1
  29. package/dist/api/index.js +1 -1
  30. package/dist/api/index.js.map +1 -1
  31. package/dist/api/internal/profile-wire.d.ts +3 -3
  32. package/dist/api/internal/profile-wire.js +3 -3
  33. package/dist/api/internal/profile-wire.js.map +1 -1
  34. package/dist/api/loft.d.ts +3 -3
  35. package/dist/api/loft.js +3 -3
  36. package/dist/api/loft.js.map +1 -1
  37. package/dist/api/profile.d.ts +93 -0
  38. package/dist/api/profile.d.ts.map +1 -0
  39. package/dist/api/profile.js +276 -0
  40. package/dist/api/profile.js.map +1 -0
  41. package/dist/api/replicate.d.ts.map +1 -1
  42. package/dist/api/replicate.js +15 -14
  43. package/dist/api/replicate.js.map +1 -1
  44. package/dist/api/surface/arg-spec.d.ts.map +1 -1
  45. package/dist/api/surface/arg-spec.js +20 -15
  46. package/dist/api/surface/arg-spec.js.map +1 -1
  47. package/dist/api/sweep.d.ts +2 -2
  48. package/dist/api/sweep.js +2 -2
  49. package/dist/api/sweep.js.map +1 -1
  50. package/dist/api/thicken.d.ts +3 -3
  51. package/dist/api/thicken.js +3 -3
  52. package/dist/api/thicken.js.map +1 -1
  53. package/dist/api/transform.d.ts +12 -8
  54. package/dist/api/transform.d.ts.map +1 -1
  55. package/dist/api/transform.js +62 -32
  56. package/dist/api/transform.js.map +1 -1
  57. package/dist/brep/engine/adapters/brepkit.d.ts.map +1 -1
  58. package/dist/brep/engine/adapters/brepkit.js +28 -1
  59. package/dist/brep/engine/adapters/brepkit.js.map +1 -1
  60. package/dist/brep/engine/adapters/occt.d.ts.map +1 -1
  61. package/dist/brep/engine/adapters/occt.js +12 -0
  62. package/dist/brep/engine/adapters/occt.js.map +1 -1
  63. package/dist/brep/engine/types.d.ts +1 -1
  64. package/dist/brep/engine/types.d.ts.map +1 -1
  65. package/dist/brep/engine/types.js.map +1 -1
  66. package/dist/brepkit-kernel/brepkitKernel.d.ts.map +1 -1
  67. package/dist/brepkit-kernel/brepkitKernel.js +463 -91
  68. package/dist/brepkit-kernel/brepkitKernel.js.map +1 -1
  69. package/dist/brepkit-kernel/brepkitWasm.d.ts +2 -1
  70. package/dist/brepkit-kernel/brepkitWasm.d.ts.map +1 -1
  71. package/dist/brepkit-kernel/brepkitWasm.js +48 -12
  72. package/dist/brepkit-kernel/brepkitWasm.js.map +1 -1
  73. package/dist/brepkit-kernel/multi-version-test.d.ts +40 -0
  74. package/dist/brepkit-kernel/multi-version-test.d.ts.map +1 -0
  75. package/dist/brepkit-kernel/multi-version-test.js +89 -0
  76. package/dist/brepkit-kernel/multi-version-test.js.map +1 -0
  77. package/dist/lang/symbol-table.generated.d.ts +1 -1
  78. package/dist/lang/symbol-table.generated.js +1 -1
  79. package/dist/lang/symbol-table.generated.js.map +1 -1
  80. package/dist/occt-kernel/occtKernel.d.ts +3 -1
  81. package/dist/occt-kernel/occtKernel.d.ts.map +1 -1
  82. package/dist/occt-kernel/occtKernel.js +73 -29
  83. package/dist/occt-kernel/occtKernel.js.map +1 -1
  84. package/package.json +2 -3
@@ -1 +1 @@
1
- {"version":3,"file":"topology.js","sourceRoot":"","sources":["../../../src/api/generated/topology.ts"],"names":[],"mappings":"AAAA;;;;GAIG;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,6BAA6B,CAAA;AAC1E,OAAO,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,2BAA2B,CAAA;AACtE,OAAO,EAAE,aAAa,IAAI,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AAClF,OAAO,EAAE,UAAU,IAAI,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAC3E,OAAO,EAAE,UAAU,IAAI,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAC3E,OAAO,EAAE,SAAS,IAAI,eAAe,EAAE,MAAM,4BAA4B,CAAA;AACzE,OAAO,EAAE,eAAe,IAAI,qBAAqB,EAAE,MAAM,4BAA4B,CAAA;AACrF,OAAO,EAAE,UAAU,IAAI,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAC3E,OAAO,EAAE,WAAW,IAAI,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAC5E,OAAO,EAAE,SAAS,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AU,EAAC,EAAC,KAAK,EAAC,aAAa,EAAC,EAAC,EAAE,OAAO,EAAE,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,OAAO,CAAC;CACpH,CAAC,CAAA;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,OAAO,EAAE,CAAC,MAAM,CAAC;CACjG,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 */\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-mirror/primitiveFns'\nimport { fuseBrep as __own_fuseBrep } from '../brep-mirror/booleanFns'\nimport { ellipsoidBrep as __own_ellipsoidBrep } from '../brep-mirror/primitiveFns'\nimport { rotateBrep as __own_rotateBrep } from '../brep-mirror/topologyFns'\nimport { mirrorBrep as __own_mirrorBrep } from '../brep-mirror/topologyFns'\nimport { cloneBrep as __own_cloneBrep } from '../brep-mirror/topologyFns'\nimport { applyMatrixBrep as __own_applyMatrixBrep } from '../brep-mirror/topologyFns'\nimport { locateBrep as __own_locateBrep } from '../brep-mirror/topologyFns'\nimport { sectionBrep as __own_sectionBrep } from '../brep-mirror/booleanFns'\nimport { splitBrep as __own_splitBrep } from '../brep-mirror/booleanFns'\nimport { shellBrep as __own_shellBrep } from '../brep-mirror/topologyFns'\nimport { offsetBrep as __own_offsetBrep } from '../brep-mirror/topologyFns'\nimport { healBrep as __own_healBrep } from '../brep-mirror/healingFns'\nimport { simplifyBrep as __own_simplifyBrep } from '../brep-mirror/healingFns'\nimport { autoHealBrep as __own_autoHealBrep } from '../brep-mirror/healingFns'\nimport { fixShapeBrep as __own_fixShapeBrep } from '../brep-mirror/healingFns'\nimport { healSolidBrep as __own_healSolidBrep } from '../brep-mirror/healingFns'\nimport { fixSelfIntersectionBrep as __own_fixSelfIntersectionBrep } from '../brep-mirror/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 selfhost),\n * D11 归一在自有实现内部完成(api/brep-mirror/)。\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 selfhost),\n * D11 归一在自有实现内部完成(api/brep-mirror/)。\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 selfhost,生成文件,勿手改;来源 api/surface/arg-spec.ts)。\n * (shape: Shape) -> BrepBoundingBox(core selfhost)\n * 桥接:getBrepApi().* 直连 occt 引擎(§5.5 第 2 条)——无 vendored 借入/调用。\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 selfhost),\n * D11 归一在自有实现内部完成(api/brep-mirror/)。\n */\nexport const ellipsoid = defineOp({\n brep: __own_ellipsoidBrep,\n name: 'ellipsoid', naming: {\"kind\":\"unmodeled\",\"reason\":\"construct vocabulary pending Phase 3\"}, engines: [\"occt\"],\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 selfhost),\n * D11 归一在自有实现内部完成(api/brep-mirror/)。\n */\nexport const rotate = defineOp({\n brep: __own_rotateBrep,\n name: 'rotate', naming: {\"kind\":\"kernel\",\"newFaces\":{\"via\":\"byAdjacency\"}}, engines: [\"occt\"],\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 selfhost),\n * D11 归一在自有实现内部完成(api/brep-mirror/)。\n */\nexport const mirror = defineOp({\n brep: __own_mirrorBrep,\n name: 'mirror', naming: {\"kind\":\"kernel\",\"newFaces\":{\"via\":\"byAdjacency\"}}, engines: [\"occt\"],\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 selfhost),\n * D11 归一在自有实现内部完成(api/brep-mirror/)。\n */\nexport const clone = defineOp({\n brep: __own_cloneBrep,\n name: 'clone', naming: {\"kind\":\"identity\"}, engines: [\"occt\"],\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 selfhost),\n * D11 归一在自有实现内部完成(api/brep-mirror/)。\n */\nexport const applyMatrix = defineOp({\n brep: __own_applyMatrixBrep,\n name: 'applyMatrix', naming: {\"kind\":\"identity\"}, engines: [\"occt\"],\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 selfhost),\n * D11 归一在自有实现内部完成(api/brep-mirror/)。\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 selfhost),\n * D11 归一在自有实现内部完成(api/brep-mirror/)。\n */\nexport const section = defineOp({\n brep: __own_sectionBrep,\n name: 'section', naming: {\"kind\":\"kernel\",\"newFaces\":{\"via\":\"byAdjacency\"}}, engines: [\"occt\"],\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 selfhost),\n * D11 归一在自有实现内部完成(api/brep-mirror/)。\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 selfhost),\n * D11 归一在自有实现内部完成(api/brep-mirror/)。\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 selfhost),\n * D11 归一在自有实现内部完成(api/brep-mirror/)。\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 selfhost),\n * D11 归一在自有实现内部完成(api/brep-mirror/)。\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 selfhost),\n * D11 归一在自有实现内部完成(api/brep-mirror/)。\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 selfhost,生成文件,勿手改;来源 api/surface/arg-spec.ts)。\n * isValid(shape: Shape): boolean(core selfhost)\n * 桥接:getBrepApi().* 直连 occt 引擎(§5.5 第 2 条)——无 vendored 借入/调用。\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 selfhost,生成文件,勿手改;来源 api/surface/arg-spec.ts)。\n * isSameShape(a: Shape, b: Shape): boolean(core selfhost)\n * 桥接:getBrepApi().* 直连 occt 引擎(§5.5 第 2 条)——无 vendored 借入/调用。\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 selfhost),\n * D11 归一在自有实现内部完成(api/brep-mirror/)。\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 selfhost),\n * D11 归一在自有实现内部完成(api/brep-mirror/)。\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 selfhost),\n * D11 归一在自有实现内部完成(api/brep-mirror/)。\n */\nexport const healSolid = defineOp({\n brep: __own_healSolidBrep,\n name: 'healSolid', naming: {\"kind\":\"kernel\",\"newFaces\":{\"via\":\"byAdjacency\"}}, engines: [\"occt\"],\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 selfhost),\n * D11 归一在自有实现内部完成(api/brep-mirror/)。\n */\nexport const fixSelfIntersection = defineOp({\n brep: __own_fixSelfIntersectionBrep,\n name: 'fixSelfIntersection', naming: {\"kind\":\"kernel\",\"newFaces\":{\"via\":\"byAdjacency\"}}, engines: [\"occt\"],\n})\n"]}
1
+ {"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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 */\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-mirror/primitiveFns'\nimport { fuseBrep as __own_fuseBrep } from '../brep-mirror/booleanFns'\nimport { ellipsoidBrep as __own_ellipsoidBrep } from '../brep-mirror/primitiveFns'\nimport { rotateBrep as __own_rotateBrep } from '../brep-mirror/topologyFns'\nimport { mirrorBrep as __own_mirrorBrep } from '../brep-mirror/topologyFns'\nimport { cloneBrep as __own_cloneBrep } from '../brep-mirror/topologyFns'\nimport { applyMatrixBrep as __own_applyMatrixBrep } from '../brep-mirror/topologyFns'\nimport { locateBrep as __own_locateBrep } from '../brep-mirror/topologyFns'\nimport { sectionBrep as __own_sectionBrep } from '../brep-mirror/booleanFns'\nimport { splitBrep as __own_splitBrep } from '../brep-mirror/booleanFns'\nimport { shellBrep as __own_shellBrep } from '../brep-mirror/topologyFns'\nimport { offsetBrep as __own_offsetBrep } from '../brep-mirror/topologyFns'\nimport { healBrep as __own_healBrep } from '../brep-mirror/healingFns'\nimport { simplifyBrep as __own_simplifyBrep } from '../brep-mirror/healingFns'\nimport { autoHealBrep as __own_autoHealBrep } from '../brep-mirror/healingFns'\nimport { fixShapeBrep as __own_fixShapeBrep } from '../brep-mirror/healingFns'\nimport { healSolidBrep as __own_healSolidBrep } from '../brep-mirror/healingFns'\nimport { fixSelfIntersectionBrep as __own_fixSelfIntersectionBrep } from '../brep-mirror/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 selfhost),\n * D11 归一在自有实现内部完成(api/brep-mirror/)。\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 selfhost),\n * D11 归一在自有实现内部完成(api/brep-mirror/)。\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 selfhost,生成文件,勿手改;来源 api/surface/arg-spec.ts)。\n * (shape: Shape) -> BrepBoundingBox(core selfhost)\n * 桥接:getBrepApi().* 直连 occt 引擎(§5.5 第 2 条)——无 vendored 借入/调用。\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 selfhost),\n * D11 归一在自有实现内部完成(api/brep-mirror/)。\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 selfhost),\n * D11 归一在自有实现内部完成(api/brep-mirror/)。\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 selfhost),\n * D11 归一在自有实现内部完成(api/brep-mirror/)。\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 selfhost),\n * D11 归一在自有实现内部完成(api/brep-mirror/)。\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 selfhost),\n * D11 归一在自有实现内部完成(api/brep-mirror/)。\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 selfhost),\n * D11 归一在自有实现内部完成(api/brep-mirror/)。\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 selfhost),\n * D11 归一在自有实现内部完成(api/brep-mirror/)。\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 selfhost),\n * D11 归一在自有实现内部完成(api/brep-mirror/)。\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 selfhost),\n * D11 归一在自有实现内部完成(api/brep-mirror/)。\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 selfhost),\n * D11 归一在自有实现内部完成(api/brep-mirror/)。\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 selfhost),\n * D11 归一在自有实现内部完成(api/brep-mirror/)。\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 selfhost),\n * D11 归一在自有实现内部完成(api/brep-mirror/)。\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 selfhost,生成文件,勿手改;来源 api/surface/arg-spec.ts)。\n * isValid(shape: Shape): boolean(core selfhost)\n * 桥接:getBrepApi().* 直连 occt 引擎(§5.5 第 2 条)——无 vendored 借入/调用。\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 selfhost,生成文件,勿手改;来源 api/surface/arg-spec.ts)。\n * isSameShape(a: Shape, b: Shape): boolean(core selfhost)\n * 桥接:getBrepApi().* 直连 occt 引擎(§5.5 第 2 条)——无 vendored 借入/调用。\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 selfhost),\n * D11 归一在自有实现内部完成(api/brep-mirror/)。\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 selfhost),\n * D11 归一在自有实现内部完成(api/brep-mirror/)。\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 selfhost),\n * D11 归一在自有实现内部完成(api/brep-mirror/)。\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 selfhost),\n * D11 归一在自有实现内部完成(api/brep-mirror/)。\n */\nexport const fixSelfIntersection = defineOp({\n brep: __own_fixSelfIntersectionBrep,\n name: 'fixSelfIntersection', naming: {\"kind\":\"kernel\",\"newFaces\":{\"via\":\"byAdjacency\"}}, engines: [\"occt\"],\n})\n"]}
@@ -23,7 +23,8 @@ export { filletVariable } from './fillet-variable.js';
23
23
  export { splitByPlane, type SplitByPlaneParams } from './split-by-plane.js';
24
24
  export { sectionByPlane, type SectionByPlaneParams } from './section-by-plane.js';
25
25
  export { screw } from './screw.js';
26
- export { sketch } from './sketch.js';
26
+ export { profile, buildProfileShape, assertProfileParams } from './profile.js';
27
+ export type { ProfileLineSeg, ProfileArcSeg, ProfileSeg, ProfileLoop, ProfileParams } from './profile.js';
27
28
  export { wire } from './wire.js';
28
29
  export { helix } from './helix.js';
29
30
  export { split } from './split.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;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,EAAE,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AACxE,OAAO,EAAE,cAAc,EAAE,KAAK,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AAC9E,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AA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CAAA"}
package/dist/api/index.js CHANGED
@@ -30,7 +30,7 @@ export { filletVariable } from './fillet-variable.js';
30
30
  export { splitByPlane } from './split-by-plane.js';
31
31
  export { sectionByPlane } from './section-by-plane.js';
32
32
  export { screw } from './screw.js';
33
- export { sketch } from './sketch.js';
33
+ export { profile, buildProfileShape, assertProfileParams } from './profile.js';
34
34
  export { wire } from './wire.js';
35
35
  export { helix } from './helix.js';
36
36
  export { split } from './split.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;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;AACF,2DAA2D;AAC3D,qDAAqD;AACrD,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,EAAoB,MAAM,SAAS,CAAA;AACjD,OAAO,EAAE,KAAK,EAAoB,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,EAAkB,MAAM,kBAAkB,CAAA;AACrI,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,EAAE,YAAY,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AAI,cAAc,EAAE,MAAM,UAAU,CAAA;AAIrD,wCAAwC;AACxC,EAAE;AACF,sEAAsE;AACtE,yEAAyE;AACzE,4CAA4C;AAC5C,cAAc,yBAAyB,CAAA;AACvC,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,kEAAkE;AAClE,mDAAmD;AACnD,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,iBAAiB,CAAA;AAOxB,gEAAgE;AAChE,0DAA0D;AAC1D,gEAAgE;AAChE,kDAAkD;AAClD,wCAAwC;AACxC,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAC9C,oEAAoE;AACpE,oDAAoD;AACpD,yDAAyD;AACzD,sEAAsE;AACtE,yDAAyD;AACzD,cAAc,iBAAiB,CAAA;AAC/B,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA","sourcesContent":["/**\n * L3 API 面(api/)— faijs 库函数命名空间(替代原 packages/stdlib)\n *\n * 设计文档:docs/plans/2026-09-01-layered-api-architecture.md §D1/D2(P6 迁入 core)\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 { sketch } from './sketch'\nexport { wire } from './wire'\nexport { helix } from './helix'\nexport { split } from './split'\nexport { sweep } from './sweep'\nexport { loft } from './loft'\nexport { knurl } from './knurl'\nexport { sdf } from './sdf'\n// 应用变换(mesh 顶点烘焙)下沉到引擎侧 src/mesh/rigid-transform.ts(E-b:\n// 引擎不得 import stdlib/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\n// ── P23:brepjs 兼容面接线(§4.2 / B1 三源一致)──\n//\n// ① 生成脚本面 op(与 api-namespace 的 cad 面同源:api/generated/script-face.ts)。\n// 这批 op 经 `compatOp(projectBrepOp(…))` 包装,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 投影随 vendored\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 './brepjs-compat'\nexport type {\n Result, Ok, Err,\n BrepError,\n Plane, PlaneName, PlaneInput,\n Vec3, PointInput,\n} from './brepjs-compat'\n// ── 2026-09-25 core-decouple:vendored 库建造工厂(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 './brepjs-compat'\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'\nexport { measureVolume, measureArea, measureLength } from './generated/measurement'\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;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;AACF,2DAA2D;AAC3D,qDAAqD;AACrD,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,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E;AACtE,yDAAyD;AACzD,cAAc,iBAAiB,CAAA;AAC/B,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA","sourcesContent":["/**\n * L3 API 面(api/)— faijs 库函数命名空间(替代原 packages/stdlib)\n *\n * 设计文档:docs/plans/2026-09-01-layered-api-architecture.md §D1/D2(P6 迁入 core)\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 { wire } from './wire'\nexport { helix } from './helix'\nexport { split } from './split'\nexport { sweep } from './sweep'\nexport { loft } from './loft'\nexport { knurl } from './knurl'\nexport { sdf } from './sdf'\n// 应用变换(mesh 顶点烘焙)下沉到引擎侧 src/mesh/rigid-transform.ts(E-b:\n// 引擎不得 import stdlib/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\n// ── P23:brepjs 兼容面接线(§4.2 / B1 三源一致)──\n//\n// ① 生成脚本面 op(与 api-namespace 的 cad 面同源:api/generated/script-face.ts)。\n// 这批 op 经 `compatOp(projectBrepOp(…))` 包装,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 投影随 vendored\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 './brepjs-compat'\nexport type {\n Result, Ok, Err,\n BrepError,\n Plane, PlaneName, PlaneInput,\n Vec3, PointInput,\n} from './brepjs-compat'\n// ── 2026-09-25 core-decouple:vendored 库建造工厂(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 './brepjs-compat'\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'\nexport { measureVolume, measureArea, measureLength } from './generated/measurement'\n"]}
@@ -1,13 +1,13 @@
1
1
  /**
2
2
  * profile-wire — 「截面 Shape → 扫掠/放样所需的 wire 视图」的唯一步径(Phase 4→G5)
3
3
  *
4
- * `sweep` / `loft` 共用:脚本面最常见的截面来源是 `cad.sketch(...)`(产出 **face**),
4
+ * `sweep` / `loft` 共用:脚本面最常见的截面来源是 `cad.profile(...)`(产出 **face**),
5
5
  * 而内核的 `sweep` / `loft` 只吃 wire ⇒ 需要「面 → 外环 wire」输入适配。
6
6
  * 两处口径必须逐字一致,故收在此叶子模块(一份实现,不允许第二个判定点)。
7
7
  *
8
8
  * 判定用 faijs 侧判别位(Phase 3 落地的 `kind:'curve'`),不查内核拓扑类型:
9
- * - 1D 截面(`cad.wire` / `cad.helix` / `cad.sketch({as:'wire'})`)→ 借用原句柄;
10
- * - 2D 截面(`cad.sketch` 的面)→ 取**外环**(孔环不参与扫掠/放样)。
9
+ * - 1D 截面(`cad.wire` / `cad.helix` / `cad.profile({as:'wire'})`)→ 借用原句柄;
10
+ * - 2D 截面(`cad.profile` 的面)→ 取**外环**(孔环不参与扫掠/放样)。
11
11
  *
12
12
  * core-decouple G5 后:wire 视图为 `{ wrapped: BrepHandle, borrowed: boolean }`
13
13
  * (brepjs 形态保留,供 brep-mirror 实现直读)。所有权:面→外环的 wire 是
@@ -1,13 +1,13 @@
1
1
  /**
2
2
  * profile-wire — 「截面 Shape → 扫掠/放样所需的 wire 视图」的唯一步径(Phase 4→G5)
3
3
  *
4
- * `sweep` / `loft` 共用:脚本面最常见的截面来源是 `cad.sketch(...)`(产出 **face**),
4
+ * `sweep` / `loft` 共用:脚本面最常见的截面来源是 `cad.profile(...)`(产出 **face**),
5
5
  * 而内核的 `sweep` / `loft` 只吃 wire ⇒ 需要「面 → 外环 wire」输入适配。
6
6
  * 两处口径必须逐字一致,故收在此叶子模块(一份实现,不允许第二个判定点)。
7
7
  *
8
8
  * 判定用 faijs 侧判别位(Phase 3 落地的 `kind:'curve'`),不查内核拓扑类型:
9
- * - 1D 截面(`cad.wire` / `cad.helix` / `cad.sketch({as:'wire'})`)→ 借用原句柄;
10
- * - 2D 截面(`cad.sketch` 的面)→ 取**外环**(孔环不参与扫掠/放样)。
9
+ * - 1D 截面(`cad.wire` / `cad.helix` / `cad.profile({as:'wire'})`)→ 借用原句柄;
10
+ * - 2D 截面(`cad.profile` 的面)→ 取**外环**(孔环不参与扫掠/放样)。
11
11
  *
12
12
  * core-decouple G5 后:wire 视图为 `{ wrapped: BrepHandle, borrowed: boolean }`
13
13
  * (brepjs 形态保留,供 brep-mirror 实现直读)。所有权:面→外环的 wire 是
@@ -1 +1 @@
1
- {"version":3,"file":"profile-wire.js","sourceRoot":"","sources":["../../../src/api/internal/profile-wire.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAUrD;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAAc;IAC9C,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,CAAe,CAAA;IAC5C,IAAI,YAAY,CAAC,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAA;IACrE,MAAM,MAAM,GAAG,UAAU,EAAE,CAAA;IAC3B,MAAM,KAAK,GAAG,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACjD,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAA;IAClE,MAAM,KAAK,GAAG,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAA;IACnD,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAA;IAClE,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAA;AAC/C,CAAC","sourcesContent":["/**\n * profile-wire — 「截面 Shape → 扫掠/放样所需的 wire 视图」的唯一步径(Phase 4→G5)\n *\n * `sweep` / `loft` 共用:脚本面最常见的截面来源是 `cad.sketch(...)`(产出 **face**),\n * 而内核的 `sweep` / `loft` 只吃 wire ⇒ 需要「面 → 外环 wire」输入适配。\n * 两处口径必须逐字一致,故收在此叶子模块(一份实现,不允许第二个判定点)。\n *\n * 判定用 faijs 侧判别位(Phase 3 落地的 `kind:'curve'`),不查内核拓扑类型:\n * - 1D 截面(`cad.wire` / `cad.helix` / `cad.sketch({as:'wire'})`)→ 借用原句柄;\n * - 2D 截面(`cad.sketch` 的面)→ 取**外环**(孔环不参与扫掠/放样)。\n *\n * core-decouple G5 后:wire 视图为 `{ wrapped: BrepHandle, borrowed: boolean }`\n * (brepjs 形态保留,供 brep-mirror 实现直读)。所有权:面→外环的 wire 是\n * arena 新句柄(borrowed=false),由调用方(loft/sweep)消费后 release;\n * 曲线借用(borrowed=true)不 release。\n */\n\nimport type { Shape } from '../../mesh/types'\nimport { brepOf, isCurveShape } from '../../shape'\nimport { getBrepApi } from '../../brep/handle-bridge'\nimport type { BrepHandle } from '../../brep/engine/types'\n\n/** Wire view for sweep/loft sections: the BREP handle plus its ownership flag. */\nexport interface WireView {\n wrapped: BrepHandle\n /** true = 借用原 shape 句柄(勿 release);false = 新建外环 wire(调用方 release)。 */\n borrowed: boolean\n}\n\n/** 截面 Shape → wire 视图(面取其外环)。\n *\n * @param section - Section shape (curve or face) to adapt.\n * @returns The wire view wrapping the handle and its ownership flag.\n */\nexport function toProfileWireView(section: Shape): WireView {\n const handle = brepOf(section) as BrepHandle\n if (isCurveShape(section)) return { wrapped: handle, borrowed: true }\n const kernel = getBrepApi()\n const faces = kernel.getSubShapes(handle, 'face')\n if (faces.length === 0) return { wrapped: handle, borrowed: true }\n const wires = kernel.getSubShapes(faces[0], 'wire')\n if (wires.length === 0) return { wrapped: handle, borrowed: true }\n return { wrapped: wires[0], borrowed: false }\n}\n"]}
1
+ {"version":3,"file":"profile-wire.js","sourceRoot":"","sources":["../../../src/api/internal/profile-wire.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAUrD;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAAc;IAC9C,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,CAAe,CAAA;IAC5C,IAAI,YAAY,CAAC,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAA;IACrE,MAAM,MAAM,GAAG,UAAU,EAAE,CAAA;IAC3B,MAAM,KAAK,GAAG,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACjD,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAA;IAClE,MAAM,KAAK,GAAG,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAA;IACnD,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAA;IAClE,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAA;AAC/C,CAAC","sourcesContent":["/**\n * profile-wire — 「截面 Shape → 扫掠/放样所需的 wire 视图」的唯一步径(Phase 4→G5)\n *\n * `sweep` / `loft` 共用:脚本面最常见的截面来源是 `cad.profile(...)`(产出 **face**),\n * 而内核的 `sweep` / `loft` 只吃 wire ⇒ 需要「面 → 外环 wire」输入适配。\n * 两处口径必须逐字一致,故收在此叶子模块(一份实现,不允许第二个判定点)。\n *\n * 判定用 faijs 侧判别位(Phase 3 落地的 `kind:'curve'`),不查内核拓扑类型:\n * - 1D 截面(`cad.wire` / `cad.helix` / `cad.profile({as:'wire'})`)→ 借用原句柄;\n * - 2D 截面(`cad.profile` 的面)→ 取**外环**(孔环不参与扫掠/放样)。\n *\n * core-decouple G5 后:wire 视图为 `{ wrapped: BrepHandle, borrowed: boolean }`\n * (brepjs 形态保留,供 brep-mirror 实现直读)。所有权:面→外环的 wire 是\n * arena 新句柄(borrowed=false),由调用方(loft/sweep)消费后 release;\n * 曲线借用(borrowed=true)不 release。\n */\n\nimport type { Shape } from '../../mesh/types'\nimport { brepOf, isCurveShape } from '../../shape'\nimport { getBrepApi } from '../../brep/handle-bridge'\nimport type { BrepHandle } from '../../brep/engine/types'\n\n/** Wire view for sweep/loft sections: the BREP handle plus its ownership flag. */\nexport interface WireView {\n wrapped: BrepHandle\n /** true = 借用原 shape 句柄(勿 release);false = 新建外环 wire(调用方 release)。 */\n borrowed: boolean\n}\n\n/** 截面 Shape → wire 视图(面取其外环)。\n *\n * @param section - Section shape (curve or face) to adapt.\n * @returns The wire view wrapping the handle and its ownership flag.\n */\nexport function toProfileWireView(section: Shape): WireView {\n const handle = brepOf(section) as BrepHandle\n if (isCurveShape(section)) return { wrapped: handle, borrowed: true }\n const kernel = getBrepApi()\n const faces = kernel.getSubShapes(handle, 'face')\n if (faces.length === 0) return { wrapped: handle, borrowed: true }\n const wires = kernel.getSubShapes(faces[0], 'wire')\n if (wires.length === 0) return { wrapped: handle, borrowed: true }\n return { wrapped: wires[0], borrowed: false }\n}\n"]}
@@ -6,7 +6,7 @@
6
6
  * defineOp 声明 `engines: ['occt']`(D11)。
7
7
  *
8
8
  * 为什么手写而不走生成投影:与 `api/sweep.ts` 同因——截面最常见来源是
9
- * `cad.sketch(...)`(产出 **face**),内核 `loft(wires, …)` 只吃 wire ⇒
9
+ * `cad.profile(...)`(产出 **face**),内核 `loft(wires, …)` 只吃 wire ⇒
10
10
  * 需要「面 → 外环」输入适配(`internal/profile-wire.ts` 的唯一步径)。
11
11
  *
12
12
  * core-decouple G5:vendored `loft`(brepjs)替换为 occt-wasm 原生直连,
@@ -46,13 +46,13 @@ export interface LoftOptions {
46
46
  * @param sections - 有序截面集合(wire 或面;面取其外环)。type:Shape[] required:true
47
47
  * @param opts - 放样配置(ruled / startPoint / endPoint / tolerance)。type:LoftOptions required:false
48
48
  * @example
49
- * const bottom = cad.sketch({ contours: [{ segments: [
49
+ * const bottom = cad.profile({ contours: [{ segments: [
50
50
  * { kind: 'line', x1: -5, y1: -5, x2: 5, y2: -5 },
51
51
  * { kind: 'line', x1: 5, y1: -5, x2: 5, y2: 5 },
52
52
  * { kind: 'line', x1: 5, y1: 5, x2: -5, y2: 5 },
53
53
  * { kind: 'line', x1: -5, y1: 5, x2: -5, y2: -5 },
54
54
  * ] }] })
55
- * const top = cad.translate(cad.sketch({ contours: [{ segments: [
55
+ * const top = cad.translate(cad.profile({ contours: [{ segments: [
56
56
  * { kind: 'line', x1: -3, y1: -3, x2: 3, y2: -3 },
57
57
  * { kind: 'line', x1: 3, y1: -3, x2: 3, y2: 3 },
58
58
  * { kind: 'line', x1: 3, y1: 3, x2: -3, y2: 3 },
package/dist/api/loft.js CHANGED
@@ -6,7 +6,7 @@
6
6
  * defineOp 声明 `engines: ['occt']`(D11)。
7
7
  *
8
8
  * 为什么手写而不走生成投影:与 `api/sweep.ts` 同因——截面最常见来源是
9
- * `cad.sketch(...)`(产出 **face**),内核 `loft(wires, …)` 只吃 wire ⇒
9
+ * `cad.profile(...)`(产出 **face**),内核 `loft(wires, …)` 只吃 wire ⇒
10
10
  * 需要「面 → 外环」输入适配(`internal/profile-wire.ts` 的唯一步径)。
11
11
  *
12
12
  * core-decouple G5:vendored `loft`(brepjs)替换为 occt-wasm 原生直连,
@@ -86,13 +86,13 @@ function loftBrep(sections, opts) {
86
86
  * @param sections - 有序截面集合(wire 或面;面取其外环)。type:Shape[] required:true
87
87
  * @param opts - 放样配置(ruled / startPoint / endPoint / tolerance)。type:LoftOptions required:false
88
88
  * @example
89
- * const bottom = cad.sketch({ contours: [{ segments: [
89
+ * const bottom = cad.profile({ contours: [{ segments: [
90
90
  * { kind: 'line', x1: -5, y1: -5, x2: 5, y2: -5 },
91
91
  * { kind: 'line', x1: 5, y1: -5, x2: 5, y2: 5 },
92
92
  * { kind: 'line', x1: 5, y1: 5, x2: -5, y2: 5 },
93
93
  * { kind: 'line', x1: -5, y1: 5, x2: -5, y2: -5 },
94
94
  * ] }] })
95
- * const top = cad.translate(cad.sketch({ contours: [{ segments: [
95
+ * const top = cad.translate(cad.profile({ contours: [{ segments: [
96
96
  * { kind: 'line', x1: -3, y1: -3, x2: 3, y2: -3 },
97
97
  * { kind: 'line', x1: 3, y1: -3, x2: 3, y2: 3 },
98
98
  * { kind: 'line', x1: 3, y1: 3, x2: -3, y2: 3 },
@@ -1 +1 @@
1
- {"version":3,"file":"loft.js","sourceRoot":"","sources":["../../src/api/loft.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA;AAEjC,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAe3D,iDAAiD;AACjD,SAAS,MAAM,CAAC,CAA4B;IAC1C,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,IAAI,CAAC;QAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAE,EAAE,CAAC,CAAC,CAAC,CAAE,EAAE,CAAC,CAAC,CAAC,CAAE,CAAC,CAAA;IACnE,MAAM,CAAC,GAAG,CAAwC,CAAA;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IAAkB;QACxC,OAAO,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAA;IACjC,CAAC;IACD,OAAO,EAAE,CAAC,MAAM,CAAC;IACjB,MAAM,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,yCAAyC,EAAgB;CAC/F,CAAC,CAAA","sourcesContent":["/**\n * stdlib loft — 放样:多个截面之间蒙皮生成体(手写平台 op,Phase 4 → G5 core 直连)\n *\n * @platform occt — 实现走 core 直连 `occt-wasm loft` / `loftWithVertices`\n * (BRepOffsetAPI_ThruSections;engine-method-map 里 `loft` 为 occt-only)⇒ 平台 op:\n * defineOp 声明 `engines: ['occt']`(D11)。\n *\n * 为什么手写而不走生成投影:与 `api/sweep.ts` 同因——截面最常见来源是\n * `cad.sketch(...)`(产出 **face**),内核 `loft(wires, …)` 只吃 wire ⇒\n * 需要「面 → 外环」输入适配(`internal/profile-wire.ts` 的唯一步径)。\n *\n * core-decouple G5:vendored `loft`(brepjs)替换为 occt-wasm 原生直连,\n * 产物经 `fromBrep` 收养(替代 l3-bridge adoptEntity)。\n */\n\nimport type { Shape } from '../mesh/types'\nimport { defineOp } from '../sdk'\nimport type { Provenance } from '../topology/naming/lineage'\nimport { getBrepApi } from '../brep/handle-bridge'\nimport { fromBrep } from '../shape'\nimport { solidToShape } from '../brep/brep-ops'\nimport { getOcctKernel } from '../occt-kernel/occtKernel'\nimport { toProfileWireView } from './internal/profile-wire'\nimport type { BrepHandle } from '../brep/engine/types'\n\n/** 放样配置(与 vendored LoftOptions 同形;本文件自持,去 brepjs 依赖)。 */\nexport interface LoftOptions {\n /** 直线插值(ruled)。默认 true。 */\n ruled?: boolean\n /** 起点(退化到点的蒙皮)。 */\n startPoint?: readonly [number, number, number] | { x: number; y: number; z: number }\n /** 终点(退化到点的蒙皮)。 */\n endPoint?: readonly [number, number, number] | { x: number; y: number; z: number }\n /** ThruSections 缝合公差。默认 1e-6。 */\n tolerance?: number\n}\n\n/** PointInput → [x,y,z](vendored toVec3 同口径)。 */\nfunction toVec3(p: LoftOptions['startPoint']): [number, number, number] {\n if (Array.isArray(p) && p.length >= 3) return [p[0]!, p[1]!, p[2]!]\n const o = p as { x: number; y: number; z: number }\n return [o.x, o.y, o.z]\n}\n\n/** BREP 路径:按序蒙皮各截面(wire 视图 → occt-wasm 直连 → fromBrep 收养)。 */\nfunction loftBrep(sections: Shape[], opts?: LoftOptions): Shape {\n if (!Array.isArray(sections) || sections.length === 0) {\n throw new Error('E_LOFT_NO_SECTIONS: loft requires a non-empty array of section shapes')\n }\n // 每截面:wire 直用;面取外环(孔环不参与放样)。\n const wireViews = sections.map((s) => toProfileWireView(s))\n const { ruled = true, startPoint, endPoint } = opts ?? {}\n const kernel = getBrepApi()\n const k = getOcctKernel()\n const wireHandles = wireViews.map((w) => w.wrapped as never)\n\n try {\n let h: unknown\n if (startPoint !== undefined || endPoint !== undefined) {\n const startVertex = startPoint !== undefined ? k.makeVertex(...toVec3(startPoint)) : undefined\n const endVertex = endPoint !== undefined ? k.makeVertex(...toVec3(endPoint)) : undefined\n try {\n h = k.loftWithVertices(wireHandles, true, ruled, startVertex as never, endVertex as never)\n } finally {\n if (startVertex !== undefined) k.release(startVertex)\n if (endVertex !== undefined) k.release(endVertex)\n }\n } else {\n h = k.loft(wireHandles, true, ruled)\n }\n return fromBrep(solidToShape(kernel, h as BrepHandle), { solid: h as BrepHandle })\n } catch (e) {\n const raw = e instanceof Error ? e.message : String(e)\n throw new Error(`E_LOFT_FAILED: loft failed: ${raw}`, { cause: e })\n } finally {\n // 面→外环产出的 wire 是 arena 新句柄(曲线借用不 release)\n for (const w of wireViews) {\n if (!w.borrowed) {\n try { kernel.release(w.wrapped) } catch { /* 已释放 */ }\n }\n }\n }\n}\n\n/**\n * 放样:按给定顺序在截面之间蒙皮生成体。\n * @group 特征\n * @inputs 1\n * @async true\n * @qual ok\n * @name loft\n * @note 平台 op:仅 occt 引擎(BRepOffsetAPI_ThruSections)。截面可为 wire 或面\n * (面取其外环),至少 2 个;`startPoint` / `endPoint` 可做退化到点的蒙皮。\n * 非 occt 引擎执行前报错;brep_mock 不拦截。不做 `loftAll`(数组产物)。\n * @returns Shape 放样体。\n * @param sections - 有序截面集合(wire 或面;面取其外环)。type:Shape[] required:true\n * @param opts - 放样配置(ruled / startPoint / endPoint / tolerance)。type:LoftOptions required:false\n * @example\n * const bottom = cad.sketch({ contours: [{ segments: [\n * { kind: 'line', x1: -5, y1: -5, x2: 5, y2: -5 },\n * { kind: 'line', x1: 5, y1: -5, x2: 5, y2: 5 },\n * { kind: 'line', x1: 5, y1: 5, x2: -5, y2: 5 },\n * { kind: 'line', x1: -5, y1: 5, x2: -5, y2: -5 },\n * ] }] })\n * const top = cad.translate(cad.sketch({ contours: [{ segments: [\n * { kind: 'line', x1: -3, y1: -3, x2: 3, y2: -3 },\n * { kind: 'line', x1: 3, y1: -3, x2: 3, y2: 3 },\n * { kind: 'line', x1: 3, y1: 3, x2: -3, y2: 3 },\n * { kind: 'line', x1: -3, y1: 3, x2: -3, y2: -3 },\n * ] }] }), [0, 0, 20])\n * const body = await cad.loft([bottom, top])\n */\nexport const loft = defineOp({\n name: 'loft',\n brep(sections: Shape[], opts?: LoftOptions) {\n return loftBrep(sections, opts)\n },\n engines: ['occt'],\n naming: { kind: 'unmodeled', reason: 'lofted-body face vocabulary not defined' } as Provenance,\n})\n"]}
1
+ {"version":3,"file":"loft.js","sourceRoot":"","sources":["../../src/api/loft.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA;AAEjC,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AACzD,OAAO,EAAE,iBAAiB,EAAE,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,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAA;gBAAC,CAAC;gBAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC;YACvD,CAAC;QACH,CAAC;IACH,CAAC;AACH,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,QAAQ,CAAC;IAC3B,IAAI,EAAE,MAAM;IACZ,IAAI,CAAC,QAAiB,EAAE,IAAkB;QACxC,OAAO,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAA;IACjC,CAAC;IACD,OAAO,EAAE,CAAC,MAAM,CAAC;IACjB,MAAM,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,yCAAyC,EAAgB;CAC/F,CAAC,CAAA","sourcesContent":["/**\n * stdlib loft — 放样:多个截面之间蒙皮生成体(手写平台 op,Phase 4 → G5 core 直连)\n *\n * @platform occt — 实现走 core 直连 `occt-wasm loft` / `loftWithVertices`\n * (BRepOffsetAPI_ThruSections;engine-method-map 里 `loft` 为 occt-only)⇒ 平台 op:\n * defineOp 声明 `engines: ['occt']`(D11)。\n *\n * 为什么手写而不走生成投影:与 `api/sweep.ts` 同因——截面最常见来源是\n * `cad.profile(...)`(产出 **face**),内核 `loft(wires, …)` 只吃 wire ⇒\n * 需要「面 → 外环」输入适配(`internal/profile-wire.ts` 的唯一步径)。\n *\n * core-decouple G5:vendored `loft`(brepjs)替换为 occt-wasm 原生直连,\n * 产物经 `fromBrep` 收养(替代 l3-bridge adoptEntity)。\n */\n\nimport type { Shape } from '../mesh/types'\nimport { defineOp } from '../sdk'\nimport type { Provenance } from '../topology/naming/lineage'\nimport { getBrepApi } from '../brep/handle-bridge'\nimport { fromBrep } from '../shape'\nimport { solidToShape } from '../brep/brep-ops'\nimport { getOcctKernel } from '../occt-kernel/occtKernel'\nimport { toProfileWireView } from './internal/profile-wire'\nimport type { BrepHandle } from '../brep/engine/types'\n\n/** 放样配置(与 vendored LoftOptions 同形;本文件自持,去 brepjs 依赖)。 */\nexport interface LoftOptions {\n /** 直线插值(ruled)。默认 true。 */\n ruled?: boolean\n /** 起点(退化到点的蒙皮)。 */\n startPoint?: readonly [number, number, number] | { x: number; y: number; z: number }\n /** 终点(退化到点的蒙皮)。 */\n endPoint?: readonly [number, number, number] | { x: number; y: number; z: number }\n /** ThruSections 缝合公差。默认 1e-6。 */\n tolerance?: number\n}\n\n/** PointInput → [x,y,z](vendored toVec3 同口径)。 */\nfunction toVec3(p: LoftOptions['startPoint']): [number, number, number] {\n if (Array.isArray(p) && p.length >= 3) return [p[0]!, p[1]!, p[2]!]\n const o = p as { x: number; y: number; z: number }\n return [o.x, o.y, o.z]\n}\n\n/** BREP 路径:按序蒙皮各截面(wire 视图 → occt-wasm 直连 → fromBrep 收养)。 */\nfunction loftBrep(sections: Shape[], opts?: LoftOptions): Shape {\n if (!Array.isArray(sections) || sections.length === 0) {\n throw new Error('E_LOFT_NO_SECTIONS: loft requires a non-empty array of section shapes')\n }\n // 每截面:wire 直用;面取外环(孔环不参与放样)。\n const wireViews = sections.map((s) => toProfileWireView(s))\n const { ruled = true, startPoint, endPoint } = opts ?? {}\n const kernel = getBrepApi()\n const k = getOcctKernel()\n const wireHandles = wireViews.map((w) => w.wrapped as never)\n\n try {\n let h: unknown\n if (startPoint !== undefined || endPoint !== undefined) {\n const startVertex = startPoint !== undefined ? k.makeVertex(...toVec3(startPoint)) : undefined\n const endVertex = endPoint !== undefined ? k.makeVertex(...toVec3(endPoint)) : undefined\n try {\n h = k.loftWithVertices(wireHandles, true, ruled, startVertex as never, endVertex as never)\n } finally {\n if (startVertex !== undefined) k.release(startVertex)\n if (endVertex !== undefined) k.release(endVertex)\n }\n } else {\n h = k.loft(wireHandles, true, ruled)\n }\n return fromBrep(solidToShape(kernel, h as BrepHandle), { solid: h as BrepHandle })\n } catch (e) {\n const raw = e instanceof Error ? e.message : String(e)\n throw new Error(`E_LOFT_FAILED: loft failed: ${raw}`, { cause: e })\n } finally {\n // 面→外环产出的 wire 是 arena 新句柄(曲线借用不 release)\n for (const w of wireViews) {\n if (!w.borrowed) {\n try { kernel.release(w.wrapped) } catch { /* 已释放 */ }\n }\n }\n }\n}\n\n/**\n * 放样:按给定顺序在截面之间蒙皮生成体。\n * @group 特征\n * @inputs 1\n * @async true\n * @qual ok\n * @name loft\n * @note 平台 op:仅 occt 引擎(BRepOffsetAPI_ThruSections)。截面可为 wire 或面\n * (面取其外环),至少 2 个;`startPoint` / `endPoint` 可做退化到点的蒙皮。\n * 非 occt 引擎执行前报错;brep_mock 不拦截。不做 `loftAll`(数组产物)。\n * @returns Shape 放样体。\n * @param sections - 有序截面集合(wire 或面;面取其外环)。type:Shape[] required:true\n * @param opts - 放样配置(ruled / startPoint / endPoint / tolerance)。type:LoftOptions required:false\n * @example\n * const bottom = cad.profile({ contours: [{ segments: [\n * { kind: 'line', x1: -5, y1: -5, x2: 5, y2: -5 },\n * { kind: 'line', x1: 5, y1: -5, x2: 5, y2: 5 },\n * { kind: 'line', x1: 5, y1: 5, x2: -5, y2: 5 },\n * { kind: 'line', x1: -5, y1: 5, x2: -5, y2: -5 },\n * ] }] })\n * const top = cad.translate(cad.profile({ contours: [{ segments: [\n * { kind: 'line', x1: -3, y1: -3, x2: 3, y2: -3 },\n * { kind: 'line', x1: 3, y1: -3, x2: 3, y2: 3 },\n * { kind: 'line', x1: 3, y1: 3, x2: -3, y2: 3 },\n * { kind: 'line', x1: -3, y1: 3, x2: -3, y2: -3 },\n * ] }] }), [0, 0, 20])\n * const body = await cad.loft([bottom, top])\n */\nexport const loft = defineOp({\n name: 'loft',\n brep(sections: Shape[], opts?: LoftOptions) {\n return loftBrep(sections, opts)\n },\n engines: ['occt'],\n naming: { kind: 'unmodeled', reason: 'lofted-body face vocabulary not defined' } as Provenance,\n})\n"]}
@@ -0,0 +1,93 @@
1
+ /**
2
+ * stdlib profile — 从 2D 轮廓构面(creator 函数,无输入,brep-only)。
3
+ *
4
+ * 用途:faijs 此前没有「从 2D 轮廓构造 planar face」的能力,导致草图轮廓无法喂给
5
+ * extrude/revolve。本 op 接收 2D 轮廓(线段 + 圆弧),在 z=0 平面用 OCCT 构面:
6
+ * makeLineEdge/makeArcEdge → makeWire → makeFace(+ addHolesInFace)。
7
+ *
8
+ * 设计:
9
+ * - 输入:{ contours: ProfileLoop[] },每个 loop = 有序 segments(line / arc,z=0)。
10
+ * - 环语义:嵌套 = 孔,不相交 = 独立岛(多岛 → face 的 compound),见 buildProfileShape。
11
+ * - 圆弧:用起点/中点/终点三点的 makeArcEdge;整圆(sweep≈2π)拆成两段弧。
12
+ * - 输出:Shape(mesh 三角化 + 句柄登记)。brep-only(下游 extrude/revolve 亦 brep-only)。
13
+ *
14
+ * 坐标系:输入 2D 点即 (x, y, 0),法向 +Z;草图在 Body 局部系内的定位由调用方(fcstd 端口)
15
+ * 在轮廓坐标里预先变换,或由下游特征的 Placement 承担。
16
+ */
17
+ import type { Shape } from '../mesh/types.js';
18
+ /** 直线段(2D,z=0;端点为绝对坐标)。 */
19
+ export interface ProfileLineSeg {
20
+ kind: 'line';
21
+ x1: number;
22
+ y1: number;
23
+ x2: number;
24
+ y2: number;
25
+ }
26
+ /** 圆弧段(圆心 + 半径 + 起止角,弧度;z=0)。 */
27
+ export interface ProfileArcSeg {
28
+ kind: 'arc';
29
+ cx: number;
30
+ cy: number;
31
+ radius: number;
32
+ /** 起始角(弧度) */
33
+ startAngle: number;
34
+ /** 终止角(弧度) */
35
+ endAngle: number;
36
+ ccw: boolean;
37
+ x1: number;
38
+ y1: number;
39
+ x2: number;
40
+ y2: number;
41
+ }
42
+ /** 一条有序 2D 轮廓段(直线或圆弧)。 */
43
+ export type ProfileSeg = ProfileLineSeg | ProfileArcSeg;
44
+ /** 单个轮廓环:有序段序列(首尾相接)。 */
45
+ export interface ProfileLoop {
46
+ segments: ProfileSeg[];
47
+ }
48
+ /** `cad.profile` 参数:轮廓环集合。语义见 {@link buildProfileShape}(嵌套=孔,不相交=独立岛)。 */
49
+ export interface ProfileParams {
50
+ contours: ProfileLoop[];
51
+ /**
52
+ * 产物形态:'face'(默认)构面;'wire' 只交出不带面的最大岛外环 wire(1D 曲线),
53
+ * 供扫掠族(sweep/loft/…)直接作 spine。'wire' 形态丢弃孔环(扫掠脊柱为单闭合轮廓)。
54
+ */
55
+ as?: 'face' | 'wire';
56
+ }
57
+ /**
58
+ * Validate profile parameters: `contours` must be a non-empty array of loops,
59
+ * each with at least one segment.
60
+ * @param params the raw profile operation parameters.
61
+ */
62
+ export declare function assertProfileParams(params: Record<string, unknown>): void;
63
+ /**
64
+ * BREP 路径:2D 轮廓集合 → planar face 集合。
65
+ *
66
+ * GOTCHA(2026-09-26,Beds part16/39):环语义是「**嵌套 = 孔,不相交 = 独立岛**」
67
+ * (与 FreeCAD 草图一致),不是「面积最大者当外环、其余全当孔」。旧实现把双岛轮廓的
68
+ * 第二个岛判成「洞外面」→ `addHolesInFace` 收到与外环不相交的 wire → 构面退化
69
+ * (7 面、volume 0)。多岛产物 = compound(每岛一面、各带自己的孔),下游
70
+ * `cad.extrude` 对 compound 输入逐面挤出(kernel MakePrism 收复合形状)。
71
+ *
72
+ * @param params - 轮廓环集合与产物形态。
73
+ * @returns Shape(单岛为 face;多岛为 face 的 compound;`as:'wire'` 为 1D 曲线)。
74
+ */
75
+ export declare function buildProfileShape(params: ProfileParams): Shape;
76
+ /**
77
+ * 从 2D 轮廓构造平面(creator,无输入)。仅 BREP 可用。
78
+ * @group 创建
79
+ * @inputs 0
80
+ * @async false
81
+ * @qual ok
82
+ * @name profile
83
+ * @returns Shape 平面几何(mesh 三角化 + BREP 句柄);`as:'wire'` 时返回 1D 曲线(kind:'curve')。
84
+ * @param params.contours - 有序 2D 轮廓(线段/圆弧;外环 + 孔)。type:ProfileLoop[] required:true
85
+ * @param params.as - 产物形态:'face'(默认)构面;'wire' 只交外环 wire(1D 曲线)。type:'face'|'wire' required:false
86
+ * @example
87
+ * const f = cad.profile({ contours: [{ segments: [{ kind:'line', x1:0,y1:0,x2:10,y2:0 }, ...] }] })
88
+ * const w = cad.profile({ contours: [{ segments: [{ kind:'line', x1:0,y1:0,x2:10,y2:0 }, ...] }], as: 'wire' })
89
+ */
90
+ export declare const profile: ((params: Record<string, unknown>) => Promise<Shape>) & {
91
+ __faijs__dualOp?: import("../define-op.js").DualOpMeta;
92
+ };
93
+ //# sourceMappingURL=profile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../../src/api/profile.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAU1C,2BAA2B;AAC3B,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAA;IACZ,EAAE,EAAE,MAAM,CAAA;IACV,EAAE,EAAE,MAAM,CAAA;IACV,EAAE,EAAE,MAAM,CAAA;IACV,EAAE,EAAE,MAAM,CAAA;CACX;AAED,iCAAiC;AACjC,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,KAAK,CAAA;IACX,EAAE,EAAE,MAAM,CAAA;IACV,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,MAAM,CAAA;IACd,cAAc;IACd,UAAU,EAAE,MAAM,CAAA;IAClB,cAAc;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,GAAG,EAAE,OAAO,CAAA;IACZ,EAAE,EAAE,MAAM,CAAA;IACV,EAAE,EAAE,MAAM,CAAA;IACV,EAAE,EAAE,MAAM,CAAA;IACV,EAAE,EAAE,MAAM,CAAA;CACX;AAED,0BAA0B;AAC1B,MAAM,MAAM,UAAU,GAAG,cAAc,GAAG,aAAa,CAAA;AAEvD,yBAAyB;AACzB,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,UAAU,EAAE,CAAA;CACvB;AAED,0EAA0E;AAC1E,MAAM,WAAW,aAAa;IAC5B,QAAQ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