@faicad/sheetmetal 0.16.0 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/dist/allowanceFns.d.ts +1 -1
  2. package/dist/allowanceFns.d.ts.map +1 -1
  3. package/dist/allowanceFns.js +1 -1
  4. package/dist/allowanceFns.js.map +1 -1
  5. package/dist/api.d.ts +21 -20
  6. package/dist/api.d.ts.map +1 -1
  7. package/dist/api.js +20 -20
  8. package/dist/api.js.map +1 -1
  9. package/dist/authorFns.d.ts +2 -2
  10. package/dist/authorFns.d.ts.map +1 -1
  11. package/dist/authorFns.js +61 -51
  12. package/dist/authorFns.js.map +1 -1
  13. package/dist/bendTableFns.d.ts +1 -1
  14. package/dist/bendTableFns.d.ts.map +1 -1
  15. package/dist/bendTableFns.js +1 -1
  16. package/dist/bendTableFns.js.map +1 -1
  17. package/dist/contourFlangeFns.d.ts +5 -4
  18. package/dist/contourFlangeFns.d.ts.map +1 -1
  19. package/dist/contourFlangeFns.js +59 -44
  20. package/dist/contourFlangeFns.js.map +1 -1
  21. package/dist/cutoutFns.d.ts +5 -5
  22. package/dist/cutoutFns.d.ts.map +1 -1
  23. package/dist/cutoutFns.js +22 -14
  24. package/dist/cutoutFns.js.map +1 -1
  25. package/dist/dxfFns.d.ts +1 -1
  26. package/dist/dxfFns.d.ts.map +1 -1
  27. package/dist/dxfFns.js +1 -1
  28. package/dist/dxfFns.js.map +1 -1
  29. package/dist/facade.d.ts +43 -42
  30. package/dist/facade.d.ts.map +1 -1
  31. package/dist/facade.js +83 -83
  32. package/dist/facade.js.map +1 -1
  33. package/dist/featureTreeFns.d.ts +1 -1
  34. package/dist/featureTreeFns.d.ts.map +1 -1
  35. package/dist/featureTreeFns.js +1 -1
  36. package/dist/featureTreeFns.js.map +1 -1
  37. package/dist/foldFns.d.ts +3 -3
  38. package/dist/foldFns.d.ts.map +1 -1
  39. package/dist/foldFns.js +12 -12
  40. package/dist/foldFns.js.map +1 -1
  41. package/dist/foreignUnfoldFns.d.ts +2 -1
  42. package/dist/foreignUnfoldFns.d.ts.map +1 -1
  43. package/dist/foreignUnfoldFns.js +21 -10
  44. package/dist/foreignUnfoldFns.js.map +1 -1
  45. package/dist/formFns.d.ts +4 -4
  46. package/dist/formFns.d.ts.map +1 -1
  47. package/dist/formFns.js +91 -76
  48. package/dist/formFns.js.map +1 -1
  49. package/dist/geometryOps.d.ts +32 -0
  50. package/dist/geometryOps.d.ts.map +1 -0
  51. package/dist/geometryOps.js +83 -0
  52. package/dist/geometryOps.js.map +1 -0
  53. package/dist/hemFns.d.ts +2 -2
  54. package/dist/hemFns.d.ts.map +1 -1
  55. package/dist/hemFns.js +4 -4
  56. package/dist/hemFns.js.map +1 -1
  57. package/dist/internal.d.ts +2 -1
  58. package/dist/internal.d.ts.map +1 -1
  59. package/dist/internal.js +1 -1
  60. package/dist/internal.js.map +1 -1
  61. package/dist/jogFns.d.ts +2 -2
  62. package/dist/jogFns.d.ts.map +1 -1
  63. package/dist/jogFns.js +6 -6
  64. package/dist/jogFns.js.map +1 -1
  65. package/dist/loftedFlangeFns.d.ts +2 -2
  66. package/dist/loftedFlangeFns.d.ts.map +1 -1
  67. package/dist/loftedFlangeFns.js +35 -25
  68. package/dist/loftedFlangeFns.js.map +1 -1
  69. package/dist/miterFns.d.ts +3 -3
  70. package/dist/miterFns.d.ts.map +1 -1
  71. package/dist/miterFns.js +30 -19
  72. package/dist/miterFns.js.map +1 -1
  73. package/dist/nestFns.d.ts +1 -1
  74. package/dist/nestFns.d.ts.map +1 -1
  75. package/dist/nestFns.js +1 -1
  76. package/dist/nestFns.js.map +1 -1
  77. package/dist/polygonFns.d.ts +2 -2
  78. package/dist/polygonFns.d.ts.map +1 -1
  79. package/dist/polygonFns.js +1 -1
  80. package/dist/polygonFns.js.map +1 -1
  81. package/dist/reliefFns.d.ts +4 -4
  82. package/dist/reliefFns.d.ts.map +1 -1
  83. package/dist/reliefFns.js +39 -31
  84. package/dist/reliefFns.js.map +1 -1
  85. package/dist/reportFns.d.ts +1 -1
  86. package/dist/reportFns.d.ts.map +1 -1
  87. package/dist/reportFns.js +1 -1
  88. package/dist/reportFns.js.map +1 -1
  89. package/dist/tabFns.d.ts +3 -3
  90. package/dist/tabFns.d.ts.map +1 -1
  91. package/dist/tabFns.js +21 -13
  92. package/dist/tabFns.js.map +1 -1
  93. package/dist/types.d.ts +21 -1
  94. package/dist/types.d.ts.map +1 -1
  95. package/dist/types.js.map +1 -1
  96. package/dist/unfoldFns.d.ts +1 -1
  97. package/dist/unfoldFns.d.ts.map +1 -1
  98. package/dist/unfoldFns.js +2 -2
  99. package/dist/unfoldFns.js.map +1 -1
  100. package/dist/validateFns.d.ts.map +1 -1
  101. package/dist/validateFns.js +4 -6
  102. package/dist/validateFns.js.map +1 -1
  103. package/package.json +2 -2
@@ -1,4 +1,4 @@
1
- import { type Result } from '@faicad/faijs/brepjs-compat';
1
+ import { type Result } from '@faicad/faijs/api';
2
2
  import type { BendRule, SheetMetalWarning } from './types.js';
3
3
  /**
4
4
  * Bend allowance — the developed (flat) length of material consumed by a bend,
@@ -1 +1 @@
1
- {"version":3,"file":"allowanceFns.d.ts","sourceRoot":"","sources":["../src/allowanceFns.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAA4B,MAAM,6BAA6B,CAAC;AACpF,OAAO,KAAK,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAe9D;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,QAAQ,EACd,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,IAAI,GAC/C,MAAM,CAAC,MAAM,CAAC,CAEhB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,QAAQ,EACd,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,IAAI,GAC/C,MAAM,CAAC,MAAM,CAAC,CAEhB;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,CAO/E"}
1
+ {"version":3,"file":"allowanceFns.d.ts","sourceRoot":"","sources":["../src/allowanceFns.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,MAAM,EAA2B,MAAM,mBAAmB,CAAC;AACxE,OAAO,KAAK,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAe9D;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,QAAQ,EACd,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,IAAI,GAC/C,MAAM,CAAC,MAAM,CAAC,CAEhB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,QAAQ,EACd,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,IAAI,GAC/C,MAAM,CAAC,MAAM,CAAC,CAEhB;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,CAO/E"}
@@ -1,4 +1,4 @@
1
- import { ok, err, validationError } from '@faicad/faijs/brepjs-compat';
1
+ import { ok, err, validationError } from '@faicad/faijs/api';
2
2
  import { resolveBendAllowance } from './bendTableFns.js';
3
3
  function validateRule(rule) {
4
4
  if (!Number.isFinite(rule.innerRadius) || rule.innerRadius < 0) {
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AiB,EAAE,IAAc;IAC7D,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,SAAS,IAAI,CAAC,EAAE,CAAC;QAClD,OAAO,GAAG,CAAC,eAAe,CAAC,mBAAmB,EAAE,oDAAoD,SAAS,EAAE,CAAC,CAAC,CAAC;IACpH,CAAC;IACD,MAAM,SAAS,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IACrC,IAAI,CAAC,SAAS,CAAC,EAAE;QAAE,OAAO,SAAS,CAAC;IACpC,OAAO,EAAE,CAAC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC;AACzD,CAAC","sourcesContent":["import { type Result, ok, err, validationError } from '@faicad/faijs/brepjs-compat';\nimport type { BendRule, SheetMetalWarning } from './types.js';\nimport { resolveBendAllowance } from './bendTableFns.js';\n\nfunction validateRule(rule: BendRule): Result<void> {\n if (!Number.isFinite(rule.innerRadius) || rule.innerRadius < 0) {\n return err(\n validationError('INVALID_RADIUS', `innerRadius must be a finite, non-negative number, got ${rule.innerRadius}`)\n );\n }\n if (!Number.isFinite(rule.kFactor) || rule.kFactor < 0 || rule.kFactor > 1) {\n return err(validationError('INVALID_K_FACTOR', `kFactor must be in [0, 1], got ${rule.kFactor}`));\n }\n return ok(undefined);\n}\n\n/**\n * Bend allowance — the developed (flat) length of material consumed by a bend,\n * measured along the neutral axis. Resolution precedence (see\n * {@link resolveBendAllowance}): a referenced bend table, then an explicit\n * `rule.allowance` override, then the K-factor formula\n * BA = (π/180)·|angle|·(R + K·T). An optional `onWarning` receives the clamp\n * warning when a table query falls outside its tabulated range.\n * @param angleDeg the bend angle in degrees\n * @param thickness the sheet thickness\n * @param rule the bend rule used for the resolution\n * @param onWarning optional callback receiving a clamp warning when a table query\n * falls outside its tabulated range\n * @returns a `Result<number>` — `ok` with the computed bend allowance on success,\n * or `err` with a `validationError` when the inputs are invalid\n */\nexport function bendAllowance(\n angleDeg: number,\n thickness: number,\n rule: BendRule,\n onWarning?: (warning: SheetMetalWarning) => void\n): Result<number> {\n return resolveBendAllowance(rule, angleDeg, thickness, onWarning);\n}\n\n/**\n * Developed length of the bend region when flattened — the neutral-axis arc\n * length that replaces the curved patch in the flat pattern. Identical to the\n * bend allowance (kept distinct in name for the unfold call sites that consume\n * it as a strip width), and routed through the same {@link resolveBendAllowance}\n * resolution (table → explicit allowance → K-factor).\n * @param angleDeg the bend angle in degrees\n * @param thickness the sheet thickness\n * @param rule the bend rule used for the resolution\n * @param onWarning optional callback receiving a clamp warning when a table query\n * falls outside its tabulated range\n * @returns a `Result<number>` — `ok` with the developed length on success,\n * or `err` with a `validationError` when the inputs are invalid\n */\nexport function developedLength(\n angleDeg: number,\n thickness: number,\n rule: BendRule,\n onWarning?: (warning: SheetMetalWarning) => void\n): Result<number> {\n return resolveBendAllowance(rule, angleDeg, thickness, onWarning);\n}\n\n/**\n * Neutral-axis radius R + K·T (the radius the developed arc length is measured at).\n * @param thickness the sheet thickness\n * @param rule the bend rule providing `innerRadius` and `kFactor`\n * @returns a `Result<number>` — `ok` with the neutral-axis radius on success,\n * or `err` with a `validationError` when the inputs are invalid\n */\nexport function neutralRadius(thickness: number, rule: BendRule): Result<number> {\n if (!Number.isFinite(thickness) || thickness <= 0) {\n return err(validationError('INVALID_THICKNESS', `thickness must be a finite, positive number, got ${thickness}`));\n }\n const ruleCheck = validateRule(rule);\n if (!ruleCheck.ok) return ruleCheck;\n return ok(rule.innerRadius + rule.kFactor * thickness);\n}\n"]}
1
+ {"version":3,"file":"allowanceFns.js","sourceRoot":"","sources":["../src/allowanceFns.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,EAAE,EAAE,GAAG,EAAE,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAExE,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAEzD,SAAS,YAAY,CAAC,IAAc;IAClC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,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AE,OAAO,SAAS,CAAC;IACpC,OAAO,EAAE,CAAC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC;AACzD,CAAC","sourcesContent":["import {type Result, ok, err, validationError} from '@faicad/faijs/api';\nimport type { BendRule, SheetMetalWarning } from './types.js';\nimport { resolveBendAllowance } from './bendTableFns.js';\n\nfunction validateRule(rule: BendRule): Result<void> {\n if (!Number.isFinite(rule.innerRadius) || rule.innerRadius < 0) {\n return err(\n validationError('INVALID_RADIUS', `innerRadius must be a finite, non-negative number, got ${rule.innerRadius}`)\n );\n }\n if (!Number.isFinite(rule.kFactor) || rule.kFactor < 0 || rule.kFactor > 1) {\n return err(validationError('INVALID_K_FACTOR', `kFactor must be in [0, 1], got ${rule.kFactor}`));\n }\n return ok(undefined);\n}\n\n/**\n * Bend allowance — the developed (flat) length of material consumed by a bend,\n * measured along the neutral axis. Resolution precedence (see\n * {@link resolveBendAllowance}): a referenced bend table, then an explicit\n * `rule.allowance` override, then the K-factor formula\n * BA = (π/180)·|angle|·(R + K·T). An optional `onWarning` receives the clamp\n * warning when a table query falls outside its tabulated range.\n * @param angleDeg the bend angle in degrees\n * @param thickness the sheet thickness\n * @param rule the bend rule used for the resolution\n * @param onWarning optional callback receiving a clamp warning when a table query\n * falls outside its tabulated range\n * @returns a `Result<number>` — `ok` with the computed bend allowance on success,\n * or `err` with a `validationError` when the inputs are invalid\n */\nexport function bendAllowance(\n angleDeg: number,\n thickness: number,\n rule: BendRule,\n onWarning?: (warning: SheetMetalWarning) => void\n): Result<number> {\n return resolveBendAllowance(rule, angleDeg, thickness, onWarning);\n}\n\n/**\n * Developed length of the bend region when flattened — the neutral-axis arc\n * length that replaces the curved patch in the flat pattern. Identical to the\n * bend allowance (kept distinct in name for the unfold call sites that consume\n * it as a strip width), and routed through the same {@link resolveBendAllowance}\n * resolution (table → explicit allowance → K-factor).\n * @param angleDeg the bend angle in degrees\n * @param thickness the sheet thickness\n * @param rule the bend rule used for the resolution\n * @param onWarning optional callback receiving a clamp warning when a table query\n * falls outside its tabulated range\n * @returns a `Result<number>` — `ok` with the developed length on success,\n * or `err` with a `validationError` when the inputs are invalid\n */\nexport function developedLength(\n angleDeg: number,\n thickness: number,\n rule: BendRule,\n onWarning?: (warning: SheetMetalWarning) => void\n): Result<number> {\n return resolveBendAllowance(rule, angleDeg, thickness, onWarning);\n}\n\n/**\n * Neutral-axis radius R + K·T (the radius the developed arc length is measured at).\n * @param thickness the sheet thickness\n * @param rule the bend rule providing `innerRadius` and `kFactor`\n * @returns a `Result<number>` — `ok` with the neutral-axis radius on success,\n * or `err` with a `validationError` when the inputs are invalid\n */\nexport function neutralRadius(thickness: number, rule: BendRule): Result<number> {\n if (!Number.isFinite(thickness) || thickness <= 0) {\n return err(validationError('INVALID_THICKNESS', `thickness must be a finite, positive number, got ${thickness}`));\n }\n const ruleCheck = validateRule(rule);\n if (!ruleCheck.ok) return ruleCheck;\n return ok(rule.innerRadius + rule.kFactor * thickness);\n}\n"]}
package/dist/api.d.ts CHANGED
@@ -6,7 +6,8 @@
6
6
  * preserve the `Result<T>` / warning-channel contract end to end. The fluent
7
7
  * `sheetMetal()` facade in `./facade.js` is built on top of these.
8
8
  */
9
- import { type Result, type Solid } from '@faicad/faijs/brepjs-compat';
9
+ import type { Solid } from './types.js';
10
+ import { type Result } from '@faicad/faijs/api';
10
11
  import { type AuthorSpec, type FlangeSpec } from './authorFns.js';
11
12
  import { type MiterPlane } from './miterFns.js';
12
13
  import { type SlotPlacement } from './tabFns.js';
@@ -19,7 +20,7 @@ import type { SheetMetalPart, FlatPattern, FlatInput, BendReport, BendRule, Reli
19
20
  * @param spec - the part definition: base flat, material thickness, and the flange list to fold up.
20
21
  * @returns a `Result<SheetMetalPart>` carrying the authored part, or the first error encountered.
21
22
  */
22
- export declare function author(spec: AuthorSpec): Result<SheetMetalPart>;
23
+ export declare function author(spec: AuthorSpec): Promise<Result<SheetMetalPart>>;
23
24
  /**
24
25
  * Extract the lone 3D solid of an authored part as its own `Result` terminal.
25
26
  *
@@ -55,14 +56,14 @@ export declare function unfoldSolid(solid: Solid, opts?: {
55
56
  * @param input - the flat pattern (region tree) to fold up.
56
57
  * @returns a `Result<SheetMetalPart>` carrying the folded 3D part, or the first error.
57
58
  */
58
- export declare function fold(input: FlatInput): Result<SheetMetalPart>;
59
+ export declare function fold(input: FlatInput): Promise<Result<SheetMetalPart>>;
59
60
  /**
60
61
  * Cut a part by an oriented plane, removing material on the `+normal` side.
61
62
  * @param part - the sheet-metal part to cut.
62
63
  * @param plane - the oriented cutting plane; material on the plane's `+normal` side is removed.
63
64
  * @returns a `Result<SheetMetalPart>` carrying the mitered part, or the first error.
64
65
  */
65
- export declare function miter(part: SheetMetalPart, plane: MiterPlane): Result<SheetMetalPart>;
66
+ export declare function miter(part: SheetMetalPart, plane: MiterPlane): Promise<Result<SheetMetalPart>>;
66
67
  /**
67
68
  * Auto-miter the shared corner of two flanges with an optional gap.
68
69
  * @param part - the sheet-metal part whose corner is to be mitered.
@@ -71,7 +72,7 @@ export declare function miter(part: SheetMetalPart, plane: MiterPlane): Result<S
71
72
  * @param gap - optional gap (in millimetres) left between the two mitered edges; defaults to 0.
72
73
  * @returns a `Result<SheetMetalPart>` carrying the mitered part, or the first error.
73
74
  */
74
- export declare function miterCorner(part: SheetMetalPart, flangeIdA: string, flangeIdB: string, gap?: number): Result<SheetMetalPart>;
75
+ export declare function miterCorner(part: SheetMetalPart, flangeIdA: string, flangeIdB: string, gap?: number): Promise<Result<SheetMetalPart>>;
75
76
  /**
76
77
  * Add a bend relief slot at each mid-edge end of a partial flange's bend line.
77
78
  * @param part - the sheet-metal part to modify.
@@ -79,14 +80,14 @@ export declare function miterCorner(part: SheetMetalPart, flangeIdA: string, fla
79
80
  * @param spec - optional relief specification overriding the defaults.
80
81
  * @returns a `Result<SheetMetalPart>` carrying the part with the relief added, or the first error.
81
82
  */
82
- export declare function bendRelief(part: SheetMetalPart, flangeId: string, spec?: ReliefSpec): Result<SheetMetalPart>;
83
+ export declare function bendRelief(part: SheetMetalPart, flangeId: string, spec?: ReliefSpec): Promise<Result<SheetMetalPart>>;
83
84
  /**
84
85
  * Add a bend relief to every partial-span bend in the part.
85
86
  * @param part - the sheet-metal part to modify.
86
87
  * @param spec - optional relief specification applied to every partial bend.
87
88
  * @returns a `Result<SheetMetalPart>` carrying the part with all reliefs added, or the first error.
88
89
  */
89
- export declare function autoReliefs(part: SheetMetalPart, spec?: ReliefSpec): Result<SheetMetalPart>;
90
+ export declare function autoReliefs(part: SheetMetalPart, spec?: ReliefSpec): Promise<Result<SheetMetalPart>>;
90
91
  /**
91
92
  * Cut a corner relief notch at the shared corner of two adjacent flanges.
92
93
  * @param part - the sheet-metal part to modify.
@@ -95,14 +96,14 @@ export declare function autoReliefs(part: SheetMetalPart, spec?: ReliefSpec): Re
95
96
  * @param spec - optional relief specification overriding the defaults.
96
97
  * @returns a `Result<SheetMetalPart>` carrying the part with the corner relief added, or the first error.
97
98
  */
98
- export declare function relieveCorner(part: SheetMetalPart, flangeIdA: string, flangeIdB: string, spec?: ReliefSpec): Result<SheetMetalPart>;
99
+ export declare function relieveCorner(part: SheetMetalPart, flangeIdA: string, flangeIdB: string, spec?: ReliefSpec): Promise<Result<SheetMetalPart>>;
99
100
  /**
100
101
  * Punch a cutout (hole / slot / polygon) through a named flat region's thickness.
101
102
  * @param part - the sheet-metal part to modify.
102
103
  * @param spec - the cutout definition (kind, geometry, and target region).
103
104
  * @returns a `Result<SheetMetalPart>` carrying the part with the cutout punched, or the first error.
104
105
  */
105
- export declare function addCutout(part: SheetMetalPart, spec: CutoutSpec): Result<SheetMetalPart>;
106
+ export declare function addCutout(part: SheetMetalPart, spec: CutoutSpec): Promise<Result<SheetMetalPart>>;
106
107
  /**
107
108
  * Punch a circular hole of `diameter` centred at region-local `(x, y)`.
108
109
  * @param part - the sheet-metal part to modify.
@@ -112,7 +113,7 @@ export declare function addCutout(part: SheetMetalPart, spec: CutoutSpec): Resul
112
113
  * @param diameter - hole diameter.
113
114
  * @returns a `Result<SheetMetalPart>` carrying the part with the hole punched, or the first error.
114
115
  */
115
- export declare function addHole(part: SheetMetalPart, region: string, x: number, y: number, diameter: number): Result<SheetMetalPart>;
116
+ export declare function addHole(part: SheetMetalPart, region: string, x: number, y: number, diameter: number): Promise<Result<SheetMetalPart>>;
116
117
  /**
117
118
  * Punch a slot (rectangular or obround) centred at region-local `(x, y)`.
118
119
  * @param part - the sheet-metal part to modify.
@@ -127,7 +128,7 @@ export declare function addSlot(part: SheetMetalPart, region: string, opts: {
127
128
  width: number;
128
129
  angleDeg?: number;
129
130
  round?: boolean;
130
- }): Result<SheetMetalPart>;
131
+ }): Promise<Result<SheetMetalPart>>;
131
132
  /**
132
133
  * Punch an arbitrary polygon cutout from its region-local `points`.
133
134
  * @param part - the sheet-metal part to modify.
@@ -135,14 +136,14 @@ export declare function addSlot(part: SheetMetalPart, region: string, opts: {
135
136
  * @param points - region-local polygon vertices as `[x, y]` pairs.
136
137
  * @returns a `Result<SheetMetalPart>` carrying the part with the polygon cutout, or the first error.
137
138
  */
138
- export declare function addPolygonCutout(part: SheetMetalPart, region: string, points: [number, number][]): Result<SheetMetalPart>;
139
+ export declare function addPolygonCutout(part: SheetMetalPart, region: string, points: [number, number][]): Promise<Result<SheetMetalPart>>;
139
140
  /**
140
141
  * Fuse a rectangular tab (additive protrusion) onto a region's edge.
141
142
  * @param part - the sheet-metal part to modify.
142
143
  * @param spec - tab definition: edge, width, and length.
143
144
  * @returns a `Result<SheetMetalPart>` carrying the part with the tab added, or the first error.
144
145
  */
145
- export declare function addTab(part: SheetMetalPart, spec: TabSpec): Result<SheetMetalPart>;
146
+ export declare function addTab(part: SheetMetalPart, spec: TabSpec): Promise<Result<SheetMetalPart>>;
146
147
  /**
147
148
  * Self-fixturing tab-and-slot joint: a tab on one region + a matching slot on another.
148
149
  * @param part - the sheet-metal part to modify.
@@ -150,7 +151,7 @@ export declare function addTab(part: SheetMetalPart, spec: TabSpec): Result<Shee
150
151
  * @param slot - placement of the matching slot on the second region.
151
152
  * @returns a `Result<SheetMetalPart>` carrying the part with the joint added, or the first error.
152
153
  */
153
- export declare function tabAndSlot(part: SheetMetalPart, tab: TabSpec, slot: SlotPlacement): Result<SheetMetalPart>;
154
+ export declare function tabAndSlot(part: SheetMetalPart, tab: TabSpec, slot: SlotPlacement): Promise<Result<SheetMetalPart>>;
154
155
  /**
155
156
  * Form a louver (vent flap cut on 3 sides, formed up along the hinge) on a region.
156
157
  * @param part - the sheet-metal part to modify.
@@ -165,7 +166,7 @@ export declare function louver(part: SheetMetalPart, opts: {
165
166
  width: number;
166
167
  height: number;
167
168
  direction?: 'up' | 'down';
168
- }): Result<SheetMetalPart>;
169
+ }): Promise<Result<SheetMetalPart>>;
169
170
  /**
170
171
  * Form a round emboss (raised) or dimple (recessed) on a region.
171
172
  * @param part - the sheet-metal part to modify.
@@ -179,7 +180,7 @@ export declare function emboss(part: SheetMetalPart, opts: {
179
180
  diameter: number;
180
181
  height: number;
181
182
  kind: 'dimple' | 'emboss';
182
- }): Result<SheetMetalPart>;
183
+ }): Promise<Result<SheetMetalPart>>;
183
184
  /**
184
185
  * Author a contour flange: an open line/arc profile swept along a base edge into a
185
186
  * multi-bend cross-section. The development is exact (Σ segment developed lengths).
@@ -187,7 +188,7 @@ export declare function emboss(part: SheetMetalPart, opts: {
187
188
  * @param spec - contour flange definition: profile, base edge, and bend parameters.
188
189
  * @returns a `Result<SheetMetalPart>` carrying the part with the contour flange added, or the first error.
189
190
  */
190
- export declare function contourFlange(part: SheetMetalPart, spec: ContourFlangeSpec): Result<SheetMetalPart>;
191
+ export declare function contourFlange(part: SheetMetalPart, spec: ContourFlangeSpec): Promise<Result<SheetMetalPart>>;
191
192
  /**
192
193
  * Author a lofted / ruled transition flange between two parallel open profiles. The
193
194
  * development is by triangulation — exact for a developable transition, an
@@ -196,7 +197,7 @@ export declare function contourFlange(part: SheetMetalPart, spec: ContourFlangeS
196
197
  * @param spec - lofted flange definition: the two open profiles and their alignment.
197
198
  * @returns a `Result<SheetMetalPart>` carrying the part with the lofted flange added, or the first error.
198
199
  */
199
- export declare function loftedFlange(part: SheetMetalPart, spec: LoftedFlangeSpec): Result<SheetMetalPart>;
200
+ export declare function loftedFlange(part: SheetMetalPart, spec: LoftedFlangeSpec): Promise<Result<SheetMetalPart>>;
200
201
  /**
201
202
  * Author a hem: fold a region edge back ~180°+ onto its parent and run a short
202
203
  * return leg. The development is exact (Σ curl bend allowances + return length).
@@ -204,7 +205,7 @@ export declare function loftedFlange(part: SheetMetalPart, spec: LoftedFlangeSpe
204
205
  * @param spec - hem definition: edge, curl radius, and return leg length.
205
206
  * @returns a `Result<SheetMetalPart>` carrying the part with the hem added, or the first error.
206
207
  */
207
- export declare function hem(part: SheetMetalPart, spec: HemSpec): Result<SheetMetalPart>;
208
+ export declare function hem(part: SheetMetalPart, spec: HemSpec): Promise<Result<SheetMetalPart>>;
208
209
  /**
209
210
  * Author a jog (joggle): two opposite bends stepping the flat by `offsetHeight`
210
211
  * perpendicular to its plane, then continuing parallel. Development is exact.
@@ -212,7 +213,7 @@ export declare function hem(part: SheetMetalPart, spec: HemSpec): Result<SheetMe
212
213
  * @param spec - jog definition: bend line, offset height, and radii.
213
214
  * @returns a `Result<SheetMetalPart>` carrying the part with the jog added, or the first error.
214
215
  */
215
- export declare function jog(part: SheetMetalPart, spec: JogSpec): Result<SheetMetalPart>;
216
+ export declare function jog(part: SheetMetalPart, spec: JogSpec): Promise<Result<SheetMetalPart>>;
216
217
  /**
217
218
  * Emit an annotated multi-layer DXF string for a flat pattern.
218
219
  * @param pattern - the flat pattern to serialize.
package/dist/api.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAA4B,KAAK,MAAM,EAAE,KAAK,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAChG,OAAO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,EAAE,MAAM,mBAAmB,CAAC"}
package/dist/api.js CHANGED
@@ -6,7 +6,7 @@
6
6
  * preserve the `Result<T>` / warning-channel contract end to end. The fluent
7
7
  * `sheetMetal()` facade in `./facade.js` is built on top of these.
8
8
  */
9
- import { ok, err, validationError } from '@faicad/faijs/brepjs-compat';
9
+ import { ok, err, validationError } from '@faicad/faijs/api';
10
10
  import { authorPart as authorPartFn, } from './authorFns.js';
11
11
  import { unfold as unfoldFn } from './unfoldFns.js';
12
12
  import { unfoldForeignSolid as unfoldForeignSolidFn } from './foreignUnfoldFns.js';
@@ -31,7 +31,7 @@ import { registerBendTable as registerBendTableFn, getBendTable as getBendTableF
31
31
  * @param spec - the part definition: base flat, material thickness, and the flange list to fold up.
32
32
  * @returns a `Result<SheetMetalPart>` carrying the authored part, or the first error encountered.
33
33
  */
34
- export function author(spec) {
34
+ export async function author(spec) {
35
35
  return authorPartFn(spec);
36
36
  }
37
37
  /**
@@ -73,7 +73,7 @@ export function unfoldSolid(solid, opts) {
73
73
  * @param input - the flat pattern (region tree) to fold up.
74
74
  * @returns a `Result<SheetMetalPart>` carrying the folded 3D part, or the first error.
75
75
  */
76
- export function fold(input) {
76
+ export async function fold(input) {
77
77
  return foldFn(input);
78
78
  }
79
79
  /**
@@ -82,7 +82,7 @@ export function fold(input) {
82
82
  * @param plane - the oriented cutting plane; material on the plane's `+normal` side is removed.
83
83
  * @returns a `Result<SheetMetalPart>` carrying the mitered part, or the first error.
84
84
  */
85
- export function miter(part, plane) {
85
+ export async function miter(part, plane) {
86
86
  return miterCutFn(part, plane);
87
87
  }
88
88
  /**
@@ -93,7 +93,7 @@ export function miter(part, plane) {
93
93
  * @param gap - optional gap (in millimetres) left between the two mitered edges; defaults to 0.
94
94
  * @returns a `Result<SheetMetalPart>` carrying the mitered part, or the first error.
95
95
  */
96
- export function miterCorner(part, flangeIdA, flangeIdB, gap = 0) {
96
+ export async function miterCorner(part, flangeIdA, flangeIdB, gap = 0) {
97
97
  return autoMiterCornerFn(part, flangeIdA, flangeIdB, gap);
98
98
  }
99
99
  /**
@@ -103,7 +103,7 @@ export function miterCorner(part, flangeIdA, flangeIdB, gap = 0) {
103
103
  * @param spec - optional relief specification overriding the defaults.
104
104
  * @returns a `Result<SheetMetalPart>` carrying the part with the relief added, or the first error.
105
105
  */
106
- export function bendRelief(part, flangeId, spec) {
106
+ export async function bendRelief(part, flangeId, spec) {
107
107
  return addBendReliefFn(part, flangeId, spec);
108
108
  }
109
109
  /**
@@ -112,7 +112,7 @@ export function bendRelief(part, flangeId, spec) {
112
112
  * @param spec - optional relief specification applied to every partial bend.
113
113
  * @returns a `Result<SheetMetalPart>` carrying the part with all reliefs added, or the first error.
114
114
  */
115
- export function autoReliefs(part, spec) {
115
+ export async function autoReliefs(part, spec) {
116
116
  return autoBendReliefsFn(part, spec);
117
117
  }
118
118
  /**
@@ -123,7 +123,7 @@ export function autoReliefs(part, spec) {
123
123
  * @param spec - optional relief specification overriding the defaults.
124
124
  * @returns a `Result<SheetMetalPart>` carrying the part with the corner relief added, or the first error.
125
125
  */
126
- export function relieveCorner(part, flangeIdA, flangeIdB, spec) {
126
+ export async function relieveCorner(part, flangeIdA, flangeIdB, spec) {
127
127
  return cornerReliefFn(part, flangeIdA, flangeIdB, spec);
128
128
  }
129
129
  /**
@@ -132,7 +132,7 @@ export function relieveCorner(part, flangeIdA, flangeIdB, spec) {
132
132
  * @param spec - the cutout definition (kind, geometry, and target region).
133
133
  * @returns a `Result<SheetMetalPart>` carrying the part with the cutout punched, or the first error.
134
134
  */
135
- export function addCutout(part, spec) {
135
+ export async function addCutout(part, spec) {
136
136
  return addCutoutFn(part, spec);
137
137
  }
138
138
  /**
@@ -144,7 +144,7 @@ export function addCutout(part, spec) {
144
144
  * @param diameter - hole diameter.
145
145
  * @returns a `Result<SheetMetalPart>` carrying the part with the hole punched, or the first error.
146
146
  */
147
- export function addHole(part, region, x, y, diameter) {
147
+ export async function addHole(part, region, x, y, diameter) {
148
148
  return addHoleFn(part, region, x, y, diameter);
149
149
  }
150
150
  /**
@@ -154,7 +154,7 @@ export function addHole(part, region, x, y, diameter) {
154
154
  * @param opts - slot geometry: centre `(x, y)`, `length`, `width`, optional `angleDeg` rotation, and `round` ends flag.
155
155
  * @returns a `Result<SheetMetalPart>` carrying the part with the slot punched, or the first error.
156
156
  */
157
- export function addSlot(part, region, opts) {
157
+ export async function addSlot(part, region, opts) {
158
158
  return addSlotFn(part, region, opts);
159
159
  }
160
160
  /**
@@ -164,7 +164,7 @@ export function addSlot(part, region, opts) {
164
164
  * @param points - region-local polygon vertices as `[x, y]` pairs.
165
165
  * @returns a `Result<SheetMetalPart>` carrying the part with the polygon cutout, or the first error.
166
166
  */
167
- export function addPolygonCutout(part, region, points) {
167
+ export async function addPolygonCutout(part, region, points) {
168
168
  return addPolygonCutoutFn(part, region, points);
169
169
  }
170
170
  /**
@@ -173,7 +173,7 @@ export function addPolygonCutout(part, region, points) {
173
173
  * @param spec - tab definition: edge, width, and length.
174
174
  * @returns a `Result<SheetMetalPart>` carrying the part with the tab added, or the first error.
175
175
  */
176
- export function addTab(part, spec) {
176
+ export async function addTab(part, spec) {
177
177
  return addTabFn(part, spec);
178
178
  }
179
179
  /**
@@ -183,7 +183,7 @@ export function addTab(part, spec) {
183
183
  * @param slot - placement of the matching slot on the second region.
184
184
  * @returns a `Result<SheetMetalPart>` carrying the part with the joint added, or the first error.
185
185
  */
186
- export function tabAndSlot(part, tab, slot) {
186
+ export async function tabAndSlot(part, tab, slot) {
187
187
  return tabAndSlotFn(part, tab, slot);
188
188
  }
189
189
  /**
@@ -192,7 +192,7 @@ export function tabAndSlot(part, tab, slot) {
192
192
  * @param opts - louver geometry: target `region`, centre `(x, y)`, `length`, `width`, `height`, and optional `direction`.
193
193
  * @returns a `Result<SheetMetalPart>` carrying the part with the louver formed, or the first error.
194
194
  */
195
- export function louver(part, opts) {
195
+ export async function louver(part, opts) {
196
196
  return louverFn(part, opts);
197
197
  }
198
198
  /**
@@ -201,7 +201,7 @@ export function louver(part, opts) {
201
201
  * @param opts - emboss geometry: target `region`, centre `(x, y)`, `diameter`, `height`, and `kind` (`dimple` or `emboss`).
202
202
  * @returns a `Result<SheetMetalPart>` carrying the part with the form added, or the first error.
203
203
  */
204
- export function emboss(part, opts) {
204
+ export async function emboss(part, opts) {
205
205
  return embossFn(part, opts);
206
206
  }
207
207
  /**
@@ -211,7 +211,7 @@ export function emboss(part, opts) {
211
211
  * @param spec - contour flange definition: profile, base edge, and bend parameters.
212
212
  * @returns a `Result<SheetMetalPart>` carrying the part with the contour flange added, or the first error.
213
213
  */
214
- export function contourFlange(part, spec) {
214
+ export async function contourFlange(part, spec) {
215
215
  return authorContourFlangeFn(part, spec);
216
216
  }
217
217
  /**
@@ -222,7 +222,7 @@ export function contourFlange(part, spec) {
222
222
  * @param spec - lofted flange definition: the two open profiles and their alignment.
223
223
  * @returns a `Result<SheetMetalPart>` carrying the part with the lofted flange added, or the first error.
224
224
  */
225
- export function loftedFlange(part, spec) {
225
+ export async function loftedFlange(part, spec) {
226
226
  return authorLoftedFlangeFn(part, spec);
227
227
  }
228
228
  /**
@@ -232,7 +232,7 @@ export function loftedFlange(part, spec) {
232
232
  * @param spec - hem definition: edge, curl radius, and return leg length.
233
233
  * @returns a `Result<SheetMetalPart>` carrying the part with the hem added, or the first error.
234
234
  */
235
- export function hem(part, spec) {
235
+ export async function hem(part, spec) {
236
236
  return hemFn(part, spec);
237
237
  }
238
238
  /**
@@ -242,7 +242,7 @@ export function hem(part, spec) {
242
242
  * @param spec - jog definition: bend line, offset height, and radii.
243
243
  * @returns a `Result<SheetMetalPart>` carrying the part with the jog added, or the first error.
244
244
  */
245
- export function jog(part, spec) {
245
+ export async function jog(part, spec) {
246
246
  return jogFn(part, spec);
247
247
  }
248
248
  /**
package/dist/api.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"api.js","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO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;AACH,MAAM,UAAU,YAAY,CAAC,KAAgB;IAC3C,OAAO,mBAAmB,CAAC,KAAK,CAAC,CAAC;AACpC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,EAAU;IAClC,OAAO,cAAc,CAAC,EAAE,CAAC,CAAC;AAC5B,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,gBAAgB,CAC9B,IAAc,EACd,QAAgB,EAChB,SAAiB,EACjB,SAAgD;IAEhD,OAAO,sBAAsB,CAAC,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;AACtE,CAAC;AAID,4DAA4D;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC","sourcesContent":["/**\n * Public API — short-named wrappers over the sheet-metal `*Fns` modules.\n *\n * These are the canonical entry points for the domain: they delegate to the\n * underlying functional implementations without re-deriving any geometry, and\n * preserve the `Result<T>` / warning-channel contract end to end. The fluent\n * `sheetMetal()` facade in `./facade.js` is built on top of these.\n */\n\nimport { ok, err, validationError, type Result, type Solid } from '@faicad/faijs/brepjs-compat';\nimport {\n authorPart as authorPartFn,\n type AuthorSpec,\n type FlangeSpec,\n} from './authorFns.js';\nimport { unfold as unfoldFn } from './unfoldFns.js';\nimport { unfoldForeignSolid as unfoldForeignSolidFn } from './foreignUnfoldFns.js';\nimport { fold as foldFn } from './foldFns.js';\nimport {\n miterCut as miterCutFn,\n autoMiterCorner as autoMiterCornerFn,\n type MiterPlane,\n} from './miterFns.js';\nimport {\n addBendRelief as addBendReliefFn,\n autoBendReliefs as autoBendReliefsFn,\n cornerRelief as cornerReliefFn,\n} from './reliefFns.js';\nimport {\n addCutout as addCutoutFn,\n addHole as addHoleFn,\n addSlot as addSlotFn,\n addPolygonCutout as addPolygonCutoutFn,\n} from './cutoutFns.js';\nimport {\n addTab as addTabFn,\n tabAndSlot as tabAndSlotFn,\n type SlotPlacement,\n} from './tabFns.js';\nimport { louver as louverFn, emboss as embossFn } from './formFns.js';\nimport { authorContourFlange as authorContourFlangeFn } from './contourFlangeFns.js';\nimport { authorLoftedFlange as authorLoftedFlangeFn } from './loftedFlangeFns.js';\nimport { hem as hemFn } from './hemFns.js';\nimport { jog as jogFn } from './jogFns.js';\nimport { flatPatternToDXF as flatPatternToDXFFn, type DxfOptions } from './dxfFns.js';\nimport {\n nest as nestFn,\n nestToDXF as nestToDXFFn,\n type NestOptions,\n type NestResult,\n} from './nestFns.js';\nimport {\n buildReport as buildReportFn,\n reportFromUnfold as reportFromUnfoldFn,\n reportToJSON as reportToJSONFn,\n} from './reportFns.js';\nimport { validatePart as validatePartFn } from './validateFns.js';\nimport { bendAllowance as bendAllowanceFn, developedLength as developedLengthFn } from './allowanceFns.js';\nimport {\n registerBendTable as registerBendTableFn,\n getBendTable as getBendTableFn,\n resolveBendAllowance as resolveBendAllowanceFn,\n type BendTable,\n} from './bendTableFns.js';\nimport type {\n SheetMetalPart,\n FlatPattern,\n FlatInput,\n BendReport,\n BendRule,\n ReliefSpec,\n CutoutSpec,\n TabSpec,\n ContourFlangeSpec,\n LoftedFlangeSpec,\n HemSpec,\n JogSpec,\n UnfoldResult,\n SheetMetalWarning,\n} from './types.js';\n\n/**\n * Author a straight-bend part: a base flat plus folded-up flanges.\n * @param spec - the part definition: base flat, material thickness, and the flange list to fold up.\n * @returns a `Result<SheetMetalPart>` carrying the authored part, or the first error encountered.\n */\nexport function author(spec: AuthorSpec): Result<SheetMetalPart> {\n return authorPartFn(spec);\n}\n\n/**\n * Extract the lone 3D solid of an authored part as its own `Result` terminal.\n *\n * `author`/`fold`/`hem` return the data model `SheetMetalPart`; its `.solid`\n * field is the authored BREP solid. `.fai.js` statements cannot read nested\n * member expressions (`p1.solid`), so this explicit terminal is the sanctioned\n * way to pull the geometry out of a part.\n * @param part - the sheet-metal part carrying the authored solid.\n * @returns `Ok` with the part's surface, or `Err` (`NO_SOLID`) when the part\n * has no authored solid yet (e.g. it was only built by `flatPattern`).\n */\nexport function solidOf(part: SheetMetalPart): Result<Solid> {\n return part.solid ? ok(part.solid) : err(validationError('NO_SOLID', 'part has no authored solid'));\n}\n\n/**\n * Flatten an authored part into a developed flat pattern + bend report + warnings.\n * @param part - the authored sheet-metal part to flatten.\n * @returns a `Result<UnfoldResult>` with the flat pattern, bend report, and any warnings.\n */\nexport function unfold(part: SheetMetalPart): Result<UnfoldResult> {\n return unfoldFn(part);\n}\n\n/**\n * Unfold an imported sheet-metal solid that has no feature tree, by detecting its\n * geometry (planar panels + cylindrical bends) numerically. `kFactor` defaults to\n * the mid-surface neutral axis (0.5); supply a known material's K-factor to match\n * its development.\n * @param solid - the imported solid (B-rep) to unfold.\n * @param opts - optional overrides; `opts.kFactor` sets the K-factor used for the bend allowance.\n * @returns a `Result<UnfoldResult>` with the detected flat pattern, report, and any warnings.\n */\nexport function unfoldSolid(solid: Solid, opts?: { kFactor?: number }): Result<UnfoldResult> {\n return unfoldForeignSolidFn(solid, opts);\n}\n\n/**\n * Fold a flat pattern (region-tree) up into a 3D part — the inverse of {@link unfold}.\n * @param input - the flat pattern (region tree) to fold up.\n * @returns a `Result<SheetMetalPart>` carrying the folded 3D part, or the first error.\n */\nexport function fold(input: FlatInput): Result<SheetMetalPart> {\n return foldFn(input);\n}\n\n/**\n * Cut a part by an oriented plane, removing material on the `+normal` side.\n * @param part - the sheet-metal part to cut.\n * @param plane - the oriented cutting plane; material on the plane's `+normal` side is removed.\n * @returns a `Result<SheetMetalPart>` carrying the mitered part, or the first error.\n */\nexport function miter(part: SheetMetalPart, plane: MiterPlane): Result<SheetMetalPart> {\n return miterCutFn(part, plane);\n}\n\n/**\n * Auto-miter the shared corner of two flanges with an optional gap.\n * @param part - the sheet-metal part whose corner is to be mitered.\n * @param flangeIdA - id of the first flange meeting at the corner.\n * @param flangeIdB - id of the second flange meeting at the corner.\n * @param gap - optional gap (in millimetres) left between the two mitered edges; defaults to 0.\n * @returns a `Result<SheetMetalPart>` carrying the mitered part, or the first error.\n */\nexport function miterCorner(\n part: SheetMetalPart,\n flangeIdA: string,\n flangeIdB: string,\n gap = 0\n): Result<SheetMetalPart> {\n return autoMiterCornerFn(part, flangeIdA, flangeIdB, gap);\n}\n\n/**\n * Add a bend relief slot at each mid-edge end of a partial flange's bend line.\n * @param part - the sheet-metal part to modify.\n * @param flangeId - id of the partial flange whose bend-line ends get the relief.\n * @param spec - optional relief specification overriding the defaults.\n * @returns a `Result<SheetMetalPart>` carrying the part with the relief added, or the first error.\n */\nexport function bendRelief(\n part: SheetMetalPart,\n flangeId: string,\n spec?: ReliefSpec\n): Result<SheetMetalPart> {\n return addBendReliefFn(part, flangeId, spec);\n}\n\n/**\n * Add a bend relief to every partial-span bend in the part.\n * @param part - the sheet-metal part to modify.\n * @param spec - optional relief specification applied to every partial bend.\n * @returns a `Result<SheetMetalPart>` carrying the part with all reliefs added, or the first error.\n */\nexport function autoReliefs(part: SheetMetalPart, spec?: ReliefSpec): Result<SheetMetalPart> {\n return autoBendReliefsFn(part, spec);\n}\n\n/**\n * Cut a corner relief notch at the shared corner of two adjacent flanges.\n * @param part - the sheet-metal part to modify.\n * @param flangeIdA - id of the first flange forming the corner.\n * @param flangeIdB - id of the second flange forming the corner.\n * @param spec - optional relief specification overriding the defaults.\n * @returns a `Result<SheetMetalPart>` carrying the part with the corner relief added, or the first error.\n */\nexport function relieveCorner(\n part: SheetMetalPart,\n flangeIdA: string,\n flangeIdB: string,\n spec?: ReliefSpec\n): Result<SheetMetalPart> {\n return cornerReliefFn(part, flangeIdA, flangeIdB, spec);\n}\n\n/**\n * Punch a cutout (hole / slot / polygon) through a named flat region's thickness.\n * @param part - the sheet-metal part to modify.\n * @param spec - the cutout definition (kind, geometry, and target region).\n * @returns a `Result<SheetMetalPart>` carrying the part with the cutout punched, or the first error.\n */\nexport function addCutout(part: SheetMetalPart, spec: CutoutSpec): Result<SheetMetalPart> {\n return addCutoutFn(part, spec);\n}\n\n/**\n * Punch a circular hole of `diameter` centred at region-local `(x, y)`.\n * @param part - the sheet-metal part to modify.\n * @param region - name of the flat region the hole is punched through.\n * @param x - region-local X of the hole centre.\n * @param y - region-local Y of the hole centre.\n * @param diameter - hole diameter.\n * @returns a `Result<SheetMetalPart>` carrying the part with the hole punched, or the first error.\n */\nexport function addHole(\n part: SheetMetalPart,\n region: string,\n x: number,\n y: number,\n diameter: number\n): Result<SheetMetalPart> {\n return addHoleFn(part, region, x, y, diameter);\n}\n\n/**\n * Punch a slot (rectangular or obround) centred at region-local `(x, y)`.\n * @param part - the sheet-metal part to modify.\n * @param region - name of the flat region the slot is punched through.\n * @param opts - slot geometry: centre `(x, y)`, `length`, `width`, optional `angleDeg` rotation, and `round` ends flag.\n * @returns a `Result<SheetMetalPart>` carrying the part with the slot punched, or the first error.\n */\nexport function addSlot(\n part: SheetMetalPart,\n region: string,\n opts: { x: number; y: number; length: number; width: number; angleDeg?: number; round?: boolean }\n): Result<SheetMetalPart> {\n return addSlotFn(part, region, opts);\n}\n\n/**\n * Punch an arbitrary polygon cutout from its region-local `points`.\n * @param part - the sheet-metal part to modify.\n * @param region - name of the flat region the polygon is punched through.\n * @param points - region-local polygon vertices as `[x, y]` pairs.\n * @returns a `Result<SheetMetalPart>` carrying the part with the polygon cutout, or the first error.\n */\nexport function addPolygonCutout(\n part: SheetMetalPart,\n region: string,\n points: [number, number][]\n): Result<SheetMetalPart> {\n return addPolygonCutoutFn(part, region, points);\n}\n\n/**\n * Fuse a rectangular tab (additive protrusion) onto a region's edge.\n * @param part - the sheet-metal part to modify.\n * @param spec - tab definition: edge, width, and length.\n * @returns a `Result<SheetMetalPart>` carrying the part with the tab added, or the first error.\n */\nexport function addTab(part: SheetMetalPart, spec: TabSpec): Result<SheetMetalPart> {\n return addTabFn(part, spec);\n}\n\n/**\n * Self-fixturing tab-and-slot joint: a tab on one region + a matching slot on another.\n * @param part - the sheet-metal part to modify.\n * @param tab - the tab to add to the first region.\n * @param slot - placement of the matching slot on the second region.\n * @returns a `Result<SheetMetalPart>` carrying the part with the joint added, or the first error.\n */\nexport function tabAndSlot(\n part: SheetMetalPart,\n tab: TabSpec,\n slot: SlotPlacement\n): Result<SheetMetalPart> {\n return tabAndSlotFn(part, tab, slot);\n}\n\n/**\n * Form a louver (vent flap cut on 3 sides, formed up along the hinge) on a region.\n * @param part - the sheet-metal part to modify.\n * @param opts - louver geometry: target `region`, centre `(x, y)`, `length`, `width`, `height`, and optional `direction`.\n * @returns a `Result<SheetMetalPart>` carrying the part with the louver formed, or the first error.\n */\nexport function louver(\n part: SheetMetalPart,\n opts: {\n region: string;\n x: number;\n y: number;\n length: number;\n width: number;\n height: number;\n direction?: 'up' | 'down';\n }\n): Result<SheetMetalPart> {\n return louverFn(part, opts);\n}\n\n/**\n * Form a round emboss (raised) or dimple (recessed) on a region.\n * @param part - the sheet-metal part to modify.\n * @param opts - emboss geometry: target `region`, centre `(x, y)`, `diameter`, `height`, and `kind` (`dimple` or `emboss`).\n * @returns a `Result<SheetMetalPart>` carrying the part with the form added, or the first error.\n */\nexport function emboss(\n part: SheetMetalPart,\n opts: { region: string; x: number; y: number; diameter: number; height: number; kind: 'dimple' | 'emboss' }\n): Result<SheetMetalPart> {\n return embossFn(part, opts);\n}\n\n/**\n * Author a contour flange: an open line/arc profile swept along a base edge into a\n * multi-bend cross-section. The development is exact (Σ segment developed lengths).\n * @param part - the sheet-metal part the flange is added to.\n * @param spec - contour flange definition: profile, base edge, and bend parameters.\n * @returns a `Result<SheetMetalPart>` carrying the part with the contour flange added, or the first error.\n */\nexport function contourFlange(part: SheetMetalPart, spec: ContourFlangeSpec): Result<SheetMetalPart> {\n return authorContourFlangeFn(part, spec);\n}\n\n/**\n * Author a lofted / ruled transition flange between two parallel open profiles. The\n * development is by triangulation — exact for a developable transition, an\n * approximation (with a `DEVELOPMENT_APPROXIMATE` unfold warning) otherwise.\n * @param part - the sheet-metal part the flange is added to.\n * @param spec - lofted flange definition: the two open profiles and their alignment.\n * @returns a `Result<SheetMetalPart>` carrying the part with the lofted flange added, or the first error.\n */\nexport function loftedFlange(part: SheetMetalPart, spec: LoftedFlangeSpec): Result<SheetMetalPart> {\n return authorLoftedFlangeFn(part, spec);\n}\n\n/**\n * Author a hem: fold a region edge back ~180°+ onto its parent and run a short\n * return leg. The development is exact (Σ curl bend allowances + return length).\n * @param part - the sheet-metal part the hem is added to.\n * @param spec - hem definition: edge, curl radius, and return leg length.\n * @returns a `Result<SheetMetalPart>` carrying the part with the hem added, or the first error.\n */\nexport function hem(part: SheetMetalPart, spec: HemSpec): Result<SheetMetalPart> {\n return hemFn(part, spec);\n}\n\n/**\n * Author a jog (joggle): two opposite bends stepping the flat by `offsetHeight`\n * perpendicular to its plane, then continuing parallel. Development is exact.\n * @param part - the sheet-metal part the jog is added to.\n * @param spec - jog definition: bend line, offset height, and radii.\n * @returns a `Result<SheetMetalPart>` carrying the part with the jog added, or the first error.\n */\nexport function jog(part: SheetMetalPart, spec: JogSpec): Result<SheetMetalPart> {\n return jogFn(part, spec);\n}\n\n/**\n * Emit an annotated multi-layer DXF string for a flat pattern.\n * @param pattern - the flat pattern to serialize.\n * @param options - optional DXF output options (layers, precision, units).\n * @returns a `Result<string>` carrying the DXF text, or the first error.\n */\nexport function toDXF(pattern: FlatPattern, options?: DxfOptions): Result<string> {\n return flatPatternToDXFFn(pattern, options);\n}\n\n/**\n * Nest developed flat patterns onto stock sheets to reduce waste. The default\n * `strategy: \"bbox\"` packs each part as its outline bounding box (fast, no\n * interlocking). `strategy: \"nfp\"` is true-shape / no-fit-polygon nesting: the actual\n * outline polygons are packed so concave (L-shaped) parts interlock for higher\n * utilization. The NFP packer is a HEURISTIC (bottom-left-fill) — not provably\n * optimal — but never overlaps parts and never drops a part silently.\n * @param patterns - the flat patterns to place onto stock sheets.\n * @param options - nesting configuration: stock sheet size, strategy, and spacing.\n * @returns a `Result<NestResult>` carrying the placed sheets and part transforms, or the first error.\n */\nexport function nest(patterns: FlatPattern[], options: NestOptions): Result<NestResult> {\n return nestFn(patterns, options);\n}\n\n/**\n * Emit one fabrication-ready DXF for a single nested sheet (all parts placed).\n * @param result - the nesting result containing the sheet to render.\n * @param patterns - the original flat patterns referenced by `result`.\n * @param sheetIndex - index of the nested sheet to emit.\n * @param options - optional DXF output options (layers, precision, units).\n * @returns a `Result<string>` carrying the DXF text, or the first error.\n */\nexport function nestToDXF(\n result: NestResult,\n patterns: FlatPattern[],\n sheetIndex: number,\n options?: DxfOptions\n): Result<string> {\n return nestToDXFFn(result, patterns, sheetIndex, options);\n}\n\n/**\n * Build a bend report by walking the part's feature tree.\n * @param part - the sheet-metal part to report on.\n * @returns a `Result<BendReport>` carrying the computed bend report, or the first error.\n */\nexport function report(part: SheetMetalPart): Result<BendReport> {\n return buildReportFn(part);\n}\n\n/**\n * Project the report already computed by {@link unfold} without re-walking the tree.\n * @param result - the unfold result whose bend report is to be projected.\n * @returns a `Result<BendReport>` carrying the projected bend report, or the first error.\n */\nexport function reportFrom(result: UnfoldResult): Result<BendReport> {\n return reportFromUnfoldFn(result);\n}\n\n/**\n * Serialize a bend report to stable pretty-printed JSON.\n * @param report - the bend report to serialize.\n * @returns the stable pretty-printed JSON string.\n */\nexport function reportJSON(report: BendReport): string {\n return reportToJSONFn(report);\n}\n\n/**\n * Manufacturability checks — advisory warnings, never errors.\n * @param part - the sheet-metal part to check.\n * @returns the list of manufacturability warnings (empty when the part is clean).\n */\nexport function validate(part: SheetMetalPart): SheetMetalWarning[] {\n return validatePartFn(part);\n}\n\n/**\n * Bend allowance `BA = (π/180)·|angle|·(R + K·T)` for a single bend.\n * @param angleDeg - the bend angle in degrees.\n * @param thickness - the material thickness, in the same units as the rule radii.\n * @param rule - the bend rule (K-factor, inner radius, or a bend-table reference) to apply.\n * @param onWarning - optional callback invoked for non-fatal warnings during the computation.\n * @returns a `Result<number>` carrying the bend allowance, or the first error.\n */\nexport function allowance(\n angleDeg: number,\n thickness: number,\n rule: BendRule,\n onWarning?: (warning: SheetMetalWarning) => void\n): Result<number> {\n return bendAllowanceFn(angleDeg, thickness, rule, onWarning);\n}\n\n/**\n * Neutral-axis developed length of a bend region (numerically equal to the allowance).\n * @param angleDeg - the bend angle in degrees.\n * @param thickness - the material thickness, in the same units as the rule radii.\n * @param rule - the bend rule (K-factor, inner radius, or a bend-table reference) to apply.\n * @param onWarning - optional callback invoked for non-fatal warnings during the computation.\n * @returns a `Result<number>` carrying the developed length, or the first error.\n */\nexport function developed(\n angleDeg: number,\n thickness: number,\n rule: BendRule,\n onWarning?: (warning: SheetMetalWarning) => void\n): Result<number> {\n return developedLengthFn(angleDeg, thickness, rule, onWarning);\n}\n\n/**\n * Register (or replace) a shop bend table so rules can reference it by id.\n * @param table - the bend table to register.\n * @returns a `Result<BendTable>` carrying the registered table, or the first error.\n */\nexport function addBendTable(table: BendTable): Result<BendTable> {\n return registerBendTableFn(table);\n}\n\n/**\n * Look up a registered bend table by id (starter tables included).\n * @param id - the bend table id to look up.\n * @returns the matching `BendTable`, or `undefined` when no such table is registered.\n */\nexport function bendTable(id: string): BendTable | undefined {\n return getBendTableFn(id);\n}\n\n/**\n * Resolve a bend's developed allowance through the single resolution point:\n * a referenced bend table, then an explicit `rule.allowance`, then the K-factor\n * formula. This is what {@link developed} delegates to.\n * @param rule - the bend rule (bend-table reference, explicit allowance, or K-factor) to resolve.\n * @param angleDeg - the bend angle in degrees.\n * @param thickness - the material thickness, in the same units as the rule radii.\n * @param onWarning - optional callback invoked for non-fatal warnings during the computation.\n * @returns a `Result<number>` carrying the resolved allowance, or the first error.\n */\nexport function resolveAllowance(\n rule: BendRule,\n angleDeg: number,\n thickness: number,\n onWarning?: (warning: SheetMetalWarning) => void\n): Result<number> {\n return resolveBendAllowanceFn(rule, angleDeg, thickness, onWarning);\n}\n\nexport type { AuthorSpec, FlangeSpec, MiterPlane, DxfOptions, SlotPlacement, NestOptions, NestResult };\n\n/** The live bend-table registry (shared resource, §7.3). */\nexport { bendTables } from './bendTableFns.js';\n"]}
1
+ {"version":3,"file":"api.js","sourceRoot":"","sources":["../src/api.ts"],"names":[],"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CAAC,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;AAC/D,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,SAAS,CACvB,QAAgB,EAChB,SAAiB,EACjB,IAAc,EACd,SAAgD;IAEhD,OAAO,iBAAiB,CAAC,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;AACjE,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAAC,KAAgB;IAC3C,OAAO,mBAAmB,CAAC,KAAK,CAAC,CAAC;AACpC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,EAAU;IAClC,OAAO,cAAc,CAAC,EAAE,CAAC,CAAC;AAC5B,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,gBAAgB,CAC9B,IAAc,EACd,QAAgB,EAChB,SAAiB,EACjB,SAAgD;IAEhD,OAAO,sBAAsB,CAAC,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;AACtE,CAAC;AAID,4DAA4D;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC","sourcesContent":["/**\n * Public API — short-named wrappers over the sheet-metal `*Fns` modules.\n *\n * These are the canonical entry points for the domain: they delegate to the\n * underlying functional implementations without re-deriving any geometry, and\n * preserve the `Result<T>` / warning-channel contract end to end. The fluent\n * `sheetMetal()` facade in `./facade.js` is built on top of these.\n */\n\nimport type { Solid } from './types.js';\nimport {ok, err, validationError, type Result} from '@faicad/faijs/api';\nimport {\n authorPart as authorPartFn,\n type AuthorSpec,\n type FlangeSpec,\n} from './authorFns.js';\nimport { unfold as unfoldFn } from './unfoldFns.js';\nimport { unfoldForeignSolid as unfoldForeignSolidFn } from './foreignUnfoldFns.js';\nimport { fold as foldFn } from './foldFns.js';\nimport {\n miterCut as miterCutFn,\n autoMiterCorner as autoMiterCornerFn,\n type MiterPlane,\n} from './miterFns.js';\nimport {\n addBendRelief as addBendReliefFn,\n autoBendReliefs as autoBendReliefsFn,\n cornerRelief as cornerReliefFn,\n} from './reliefFns.js';\nimport {\n addCutout as addCutoutFn,\n addHole as addHoleFn,\n addSlot as addSlotFn,\n addPolygonCutout as addPolygonCutoutFn,\n} from './cutoutFns.js';\nimport {\n addTab as addTabFn,\n tabAndSlot as tabAndSlotFn,\n type SlotPlacement,\n} from './tabFns.js';\nimport { louver as louverFn, emboss as embossFn } from './formFns.js';\nimport { authorContourFlange as authorContourFlangeFn } from './contourFlangeFns.js';\nimport { authorLoftedFlange as authorLoftedFlangeFn } from './loftedFlangeFns.js';\nimport { hem as hemFn } from './hemFns.js';\nimport { jog as jogFn } from './jogFns.js';\nimport { flatPatternToDXF as flatPatternToDXFFn, type DxfOptions } from './dxfFns.js';\nimport {\n nest as nestFn,\n nestToDXF as nestToDXFFn,\n type NestOptions,\n type NestResult,\n} from './nestFns.js';\nimport {\n buildReport as buildReportFn,\n reportFromUnfold as reportFromUnfoldFn,\n reportToJSON as reportToJSONFn,\n} from './reportFns.js';\nimport { validatePart as validatePartFn } from './validateFns.js';\nimport { bendAllowance as bendAllowanceFn, developedLength as developedLengthFn } from './allowanceFns.js';\nimport {\n registerBendTable as registerBendTableFn,\n getBendTable as getBendTableFn,\n resolveBendAllowance as resolveBendAllowanceFn,\n type BendTable,\n} from './bendTableFns.js';\nimport type {\n SheetMetalPart,\n FlatPattern,\n FlatInput,\n BendReport,\n BendRule,\n ReliefSpec,\n CutoutSpec,\n TabSpec,\n ContourFlangeSpec,\n LoftedFlangeSpec,\n HemSpec,\n JogSpec,\n UnfoldResult,\n SheetMetalWarning,\n} from './types.js';\n\n/**\n * Author a straight-bend part: a base flat plus folded-up flanges.\n * @param spec - the part definition: base flat, material thickness, and the flange list to fold up.\n * @returns a `Result<SheetMetalPart>` carrying the authored part, or the first error encountered.\n */\nexport async function author(spec: AuthorSpec): Promise<Result<SheetMetalPart>> {\n return authorPartFn(spec);\n}\n\n/**\n * Extract the lone 3D solid of an authored part as its own `Result` terminal.\n *\n * `author`/`fold`/`hem` return the data model `SheetMetalPart`; its `.solid`\n * field is the authored BREP solid. `.fai.js` statements cannot read nested\n * member expressions (`p1.solid`), so this explicit terminal is the sanctioned\n * way to pull the geometry out of a part.\n * @param part - the sheet-metal part carrying the authored solid.\n * @returns `Ok` with the part's surface, or `Err` (`NO_SOLID`) when the part\n * has no authored solid yet (e.g. it was only built by `flatPattern`).\n */\nexport function solidOf(part: SheetMetalPart): Result<Solid> {\n return part.solid ? ok(part.solid) : err(validationError('NO_SOLID', 'part has no authored solid'));\n}\n\n/**\n * Flatten an authored part into a developed flat pattern + bend report + warnings.\n * @param part - the authored sheet-metal part to flatten.\n * @returns a `Result<UnfoldResult>` with the flat pattern, bend report, and any warnings.\n */\nexport function unfold(part: SheetMetalPart): Result<UnfoldResult> {\n return unfoldFn(part);\n}\n\n/**\n * Unfold an imported sheet-metal solid that has no feature tree, by detecting its\n * geometry (planar panels + cylindrical bends) numerically. `kFactor` defaults to\n * the mid-surface neutral axis (0.5); supply a known material's K-factor to match\n * its development.\n * @param solid - the imported solid (B-rep) to unfold.\n * @param opts - optional overrides; `opts.kFactor` sets the K-factor used for the bend allowance.\n * @returns a `Result<UnfoldResult>` with the detected flat pattern, report, and any warnings.\n */\nexport function unfoldSolid(solid: Solid, opts?: { kFactor?: number }): Result<UnfoldResult> {\n return unfoldForeignSolidFn(solid, opts);\n}\n\n/**\n * Fold a flat pattern (region-tree) up into a 3D part — the inverse of {@link unfold}.\n * @param input - the flat pattern (region tree) to fold up.\n * @returns a `Result<SheetMetalPart>` carrying the folded 3D part, or the first error.\n */\nexport async function fold(input: FlatInput): Promise<Result<SheetMetalPart>> {\n return foldFn(input);\n}\n\n/**\n * Cut a part by an oriented plane, removing material on the `+normal` side.\n * @param part - the sheet-metal part to cut.\n * @param plane - the oriented cutting plane; material on the plane's `+normal` side is removed.\n * @returns a `Result<SheetMetalPart>` carrying the mitered part, or the first error.\n */\nexport async function miter(part: SheetMetalPart, plane: MiterPlane): Promise<Result<SheetMetalPart>> {\n return miterCutFn(part, plane);\n}\n\n/**\n * Auto-miter the shared corner of two flanges with an optional gap.\n * @param part - the sheet-metal part whose corner is to be mitered.\n * @param flangeIdA - id of the first flange meeting at the corner.\n * @param flangeIdB - id of the second flange meeting at the corner.\n * @param gap - optional gap (in millimetres) left between the two mitered edges; defaults to 0.\n * @returns a `Result<SheetMetalPart>` carrying the mitered part, or the first error.\n */\nexport async function miterCorner(\n part: SheetMetalPart,\n flangeIdA: string,\n flangeIdB: string,\n gap = 0\n): Promise<Result<SheetMetalPart>> {\n return autoMiterCornerFn(part, flangeIdA, flangeIdB, gap);\n}\n\n/**\n * Add a bend relief slot at each mid-edge end of a partial flange's bend line.\n * @param part - the sheet-metal part to modify.\n * @param flangeId - id of the partial flange whose bend-line ends get the relief.\n * @param spec - optional relief specification overriding the defaults.\n * @returns a `Result<SheetMetalPart>` carrying the part with the relief added, or the first error.\n */\nexport async function bendRelief(\n part: SheetMetalPart,\n flangeId: string,\n spec?: ReliefSpec\n): Promise<Result<SheetMetalPart>> {\n return addBendReliefFn(part, flangeId, spec);\n}\n\n/**\n * Add a bend relief to every partial-span bend in the part.\n * @param part - the sheet-metal part to modify.\n * @param spec - optional relief specification applied to every partial bend.\n * @returns a `Result<SheetMetalPart>` carrying the part with all reliefs added, or the first error.\n */\nexport async function autoReliefs(part: SheetMetalPart, spec?: ReliefSpec): Promise<Result<SheetMetalPart>> {\n return autoBendReliefsFn(part, spec);\n}\n\n/**\n * Cut a corner relief notch at the shared corner of two adjacent flanges.\n * @param part - the sheet-metal part to modify.\n * @param flangeIdA - id of the first flange forming the corner.\n * @param flangeIdB - id of the second flange forming the corner.\n * @param spec - optional relief specification overriding the defaults.\n * @returns a `Result<SheetMetalPart>` carrying the part with the corner relief added, or the first error.\n */\nexport async function relieveCorner(\n part: SheetMetalPart,\n flangeIdA: string,\n flangeIdB: string,\n spec?: ReliefSpec\n): Promise<Result<SheetMetalPart>> {\n return cornerReliefFn(part, flangeIdA, flangeIdB, spec);\n}\n\n/**\n * Punch a cutout (hole / slot / polygon) through a named flat region's thickness.\n * @param part - the sheet-metal part to modify.\n * @param spec - the cutout definition (kind, geometry, and target region).\n * @returns a `Result<SheetMetalPart>` carrying the part with the cutout punched, or the first error.\n */\nexport async function addCutout(part: SheetMetalPart, spec: CutoutSpec): Promise<Result<SheetMetalPart>> {\n return addCutoutFn(part, spec);\n}\n\n/**\n * Punch a circular hole of `diameter` centred at region-local `(x, y)`.\n * @param part - the sheet-metal part to modify.\n * @param region - name of the flat region the hole is punched through.\n * @param x - region-local X of the hole centre.\n * @param y - region-local Y of the hole centre.\n * @param diameter - hole diameter.\n * @returns a `Result<SheetMetalPart>` carrying the part with the hole punched, or the first error.\n */\nexport async function addHole(\n part: SheetMetalPart,\n region: string,\n x: number,\n y: number,\n diameter: number\n): Promise<Result<SheetMetalPart>> {\n return addHoleFn(part, region, x, y, diameter);\n}\n\n/**\n * Punch a slot (rectangular or obround) centred at region-local `(x, y)`.\n * @param part - the sheet-metal part to modify.\n * @param region - name of the flat region the slot is punched through.\n * @param opts - slot geometry: centre `(x, y)`, `length`, `width`, optional `angleDeg` rotation, and `round` ends flag.\n * @returns a `Result<SheetMetalPart>` carrying the part with the slot punched, or the first error.\n */\nexport async function addSlot(\n part: SheetMetalPart,\n region: string,\n opts: { x: number; y: number; length: number; width: number; angleDeg?: number; round?: boolean }\n): Promise<Result<SheetMetalPart>> {\n return addSlotFn(part, region, opts);\n}\n\n/**\n * Punch an arbitrary polygon cutout from its region-local `points`.\n * @param part - the sheet-metal part to modify.\n * @param region - name of the flat region the polygon is punched through.\n * @param points - region-local polygon vertices as `[x, y]` pairs.\n * @returns a `Result<SheetMetalPart>` carrying the part with the polygon cutout, or the first error.\n */\nexport async function addPolygonCutout(\n part: SheetMetalPart,\n region: string,\n points: [number, number][]\n): Promise<Result<SheetMetalPart>> {\n return addPolygonCutoutFn(part, region, points);\n}\n\n/**\n * Fuse a rectangular tab (additive protrusion) onto a region's edge.\n * @param part - the sheet-metal part to modify.\n * @param spec - tab definition: edge, width, and length.\n * @returns a `Result<SheetMetalPart>` carrying the part with the tab added, or the first error.\n */\nexport async function addTab(part: SheetMetalPart, spec: TabSpec): Promise<Result<SheetMetalPart>> {\n return addTabFn(part, spec);\n}\n\n/**\n * Self-fixturing tab-and-slot joint: a tab on one region + a matching slot on another.\n * @param part - the sheet-metal part to modify.\n * @param tab - the tab to add to the first region.\n * @param slot - placement of the matching slot on the second region.\n * @returns a `Result<SheetMetalPart>` carrying the part with the joint added, or the first error.\n */\nexport async function tabAndSlot(\n part: SheetMetalPart,\n tab: TabSpec,\n slot: SlotPlacement\n): Promise<Result<SheetMetalPart>> {\n return tabAndSlotFn(part, tab, slot);\n}\n\n/**\n * Form a louver (vent flap cut on 3 sides, formed up along the hinge) on a region.\n * @param part - the sheet-metal part to modify.\n * @param opts - louver geometry: target `region`, centre `(x, y)`, `length`, `width`, `height`, and optional `direction`.\n * @returns a `Result<SheetMetalPart>` carrying the part with the louver formed, or the first error.\n */\nexport async function louver(\n part: SheetMetalPart,\n opts: {\n region: string;\n x: number;\n y: number;\n length: number;\n width: number;\n height: number;\n direction?: 'up' | 'down';\n }\n): Promise<Result<SheetMetalPart>> {\n return louverFn(part, opts);\n}\n\n/**\n * Form a round emboss (raised) or dimple (recessed) on a region.\n * @param part - the sheet-metal part to modify.\n * @param opts - emboss geometry: target `region`, centre `(x, y)`, `diameter`, `height`, and `kind` (`dimple` or `emboss`).\n * @returns a `Result<SheetMetalPart>` carrying the part with the form added, or the first error.\n */\nexport async function emboss(\n part: SheetMetalPart,\n opts: { region: string; x: number; y: number; diameter: number; height: number; kind: 'dimple' | 'emboss' }\n): Promise<Result<SheetMetalPart>> {\n return embossFn(part, opts);\n}\n\n/**\n * Author a contour flange: an open line/arc profile swept along a base edge into a\n * multi-bend cross-section. The development is exact (Σ segment developed lengths).\n * @param part - the sheet-metal part the flange is added to.\n * @param spec - contour flange definition: profile, base edge, and bend parameters.\n * @returns a `Result<SheetMetalPart>` carrying the part with the contour flange added, or the first error.\n */\nexport async function contourFlange(part: SheetMetalPart, spec: ContourFlangeSpec): Promise<Result<SheetMetalPart>> {\n return authorContourFlangeFn(part, spec);\n}\n\n/**\n * Author a lofted / ruled transition flange between two parallel open profiles. The\n * development is by triangulation — exact for a developable transition, an\n * approximation (with a `DEVELOPMENT_APPROXIMATE` unfold warning) otherwise.\n * @param part - the sheet-metal part the flange is added to.\n * @param spec - lofted flange definition: the two open profiles and their alignment.\n * @returns a `Result<SheetMetalPart>` carrying the part with the lofted flange added, or the first error.\n */\nexport async function loftedFlange(part: SheetMetalPart, spec: LoftedFlangeSpec): Promise<Result<SheetMetalPart>> {\n return authorLoftedFlangeFn(part, spec);\n}\n\n/**\n * Author a hem: fold a region edge back ~180°+ onto its parent and run a short\n * return leg. The development is exact (Σ curl bend allowances + return length).\n * @param part - the sheet-metal part the hem is added to.\n * @param spec - hem definition: edge, curl radius, and return leg length.\n * @returns a `Result<SheetMetalPart>` carrying the part with the hem added, or the first error.\n */\nexport async function hem(part: SheetMetalPart, spec: HemSpec): Promise<Result<SheetMetalPart>> {\n return hemFn(part, spec);\n}\n\n/**\n * Author a jog (joggle): two opposite bends stepping the flat by `offsetHeight`\n * perpendicular to its plane, then continuing parallel. Development is exact.\n * @param part - the sheet-metal part the jog is added to.\n * @param spec - jog definition: bend line, offset height, and radii.\n * @returns a `Result<SheetMetalPart>` carrying the part with the jog added, or the first error.\n */\nexport async function jog(part: SheetMetalPart, spec: JogSpec): Promise<Result<SheetMetalPart>> {\n return jogFn(part, spec);\n}\n\n/**\n * Emit an annotated multi-layer DXF string for a flat pattern.\n * @param pattern - the flat pattern to serialize.\n * @param options - optional DXF output options (layers, precision, units).\n * @returns a `Result<string>` carrying the DXF text, or the first error.\n */\nexport function toDXF(pattern: FlatPattern, options?: DxfOptions): Result<string> {\n return flatPatternToDXFFn(pattern, options);\n}\n\n/**\n * Nest developed flat patterns onto stock sheets to reduce waste. The default\n * `strategy: \"bbox\"` packs each part as its outline bounding box (fast, no\n * interlocking). `strategy: \"nfp\"` is true-shape / no-fit-polygon nesting: the actual\n * outline polygons are packed so concave (L-shaped) parts interlock for higher\n * utilization. The NFP packer is a HEURISTIC (bottom-left-fill) — not provably\n * optimal — but never overlaps parts and never drops a part silently.\n * @param patterns - the flat patterns to place onto stock sheets.\n * @param options - nesting configuration: stock sheet size, strategy, and spacing.\n * @returns a `Result<NestResult>` carrying the placed sheets and part transforms, or the first error.\n */\nexport function nest(patterns: FlatPattern[], options: NestOptions): Result<NestResult> {\n return nestFn(patterns, options);\n}\n\n/**\n * Emit one fabrication-ready DXF for a single nested sheet (all parts placed).\n * @param result - the nesting result containing the sheet to render.\n * @param patterns - the original flat patterns referenced by `result`.\n * @param sheetIndex - index of the nested sheet to emit.\n * @param options - optional DXF output options (layers, precision, units).\n * @returns a `Result<string>` carrying the DXF text, or the first error.\n */\nexport function nestToDXF(\n result: NestResult,\n patterns: FlatPattern[],\n sheetIndex: number,\n options?: DxfOptions\n): Result<string> {\n return nestToDXFFn(result, patterns, sheetIndex, options);\n}\n\n/**\n * Build a bend report by walking the part's feature tree.\n * @param part - the sheet-metal part to report on.\n * @returns a `Result<BendReport>` carrying the computed bend report, or the first error.\n */\nexport function report(part: SheetMetalPart): Result<BendReport> {\n return buildReportFn(part);\n}\n\n/**\n * Project the report already computed by {@link unfold} without re-walking the tree.\n * @param result - the unfold result whose bend report is to be projected.\n * @returns a `Result<BendReport>` carrying the projected bend report, or the first error.\n */\nexport function reportFrom(result: UnfoldResult): Result<BendReport> {\n return reportFromUnfoldFn(result);\n}\n\n/**\n * Serialize a bend report to stable pretty-printed JSON.\n * @param report - the bend report to serialize.\n * @returns the stable pretty-printed JSON string.\n */\nexport function reportJSON(report: BendReport): string {\n return reportToJSONFn(report);\n}\n\n/**\n * Manufacturability checks — advisory warnings, never errors.\n * @param part - the sheet-metal part to check.\n * @returns the list of manufacturability warnings (empty when the part is clean).\n */\nexport function validate(part: SheetMetalPart): SheetMetalWarning[] {\n return validatePartFn(part);\n}\n\n/**\n * Bend allowance `BA = (π/180)·|angle|·(R + K·T)` for a single bend.\n * @param angleDeg - the bend angle in degrees.\n * @param thickness - the material thickness, in the same units as the rule radii.\n * @param rule - the bend rule (K-factor, inner radius, or a bend-table reference) to apply.\n * @param onWarning - optional callback invoked for non-fatal warnings during the computation.\n * @returns a `Result<number>` carrying the bend allowance, or the first error.\n */\nexport function allowance(\n angleDeg: number,\n thickness: number,\n rule: BendRule,\n onWarning?: (warning: SheetMetalWarning) => void\n): Result<number> {\n return bendAllowanceFn(angleDeg, thickness, rule, onWarning);\n}\n\n/**\n * Neutral-axis developed length of a bend region (numerically equal to the allowance).\n * @param angleDeg - the bend angle in degrees.\n * @param thickness - the material thickness, in the same units as the rule radii.\n * @param rule - the bend rule (K-factor, inner radius, or a bend-table reference) to apply.\n * @param onWarning - optional callback invoked for non-fatal warnings during the computation.\n * @returns a `Result<number>` carrying the developed length, or the first error.\n */\nexport function developed(\n angleDeg: number,\n thickness: number,\n rule: BendRule,\n onWarning?: (warning: SheetMetalWarning) => void\n): Result<number> {\n return developedLengthFn(angleDeg, thickness, rule, onWarning);\n}\n\n/**\n * Register (or replace) a shop bend table so rules can reference it by id.\n * @param table - the bend table to register.\n * @returns a `Result<BendTable>` carrying the registered table, or the first error.\n */\nexport function addBendTable(table: BendTable): Result<BendTable> {\n return registerBendTableFn(table);\n}\n\n/**\n * Look up a registered bend table by id (starter tables included).\n * @param id - the bend table id to look up.\n * @returns the matching `BendTable`, or `undefined` when no such table is registered.\n */\nexport function bendTable(id: string): BendTable | undefined {\n return getBendTableFn(id);\n}\n\n/**\n * Resolve a bend's developed allowance through the single resolution point:\n * a referenced bend table, then an explicit `rule.allowance`, then the K-factor\n * formula. This is what {@link developed} delegates to.\n * @param rule - the bend rule (bend-table reference, explicit allowance, or K-factor) to resolve.\n * @param angleDeg - the bend angle in degrees.\n * @param thickness - the material thickness, in the same units as the rule radii.\n * @param onWarning - optional callback invoked for non-fatal warnings during the computation.\n * @returns a `Result<number>` carrying the resolved allowance, or the first error.\n */\nexport function resolveAllowance(\n rule: BendRule,\n angleDeg: number,\n thickness: number,\n onWarning?: (warning: SheetMetalWarning) => void\n): Result<number> {\n return resolveBendAllowanceFn(rule, angleDeg, thickness, onWarning);\n}\n\nexport type { AuthorSpec, FlangeSpec, MiterPlane, DxfOptions, SlotPlacement, NestOptions, NestResult };\n\n/** The live bend-table registry (shared resource, §7.3). */\nexport { bendTables } from './bendTableFns.js';\n"]}
@@ -1,4 +1,4 @@
1
- import { type Result, type Vec3 } from '@faicad/faijs/brepjs-compat';
1
+ import { type Result, type Vec3 } from '@faicad/faijs/api';
2
2
  import type { BendRule, EdgeRef, FlatSide, MaterialSpec, MiterSpec, SheetMetalPart } from './types.js';
3
3
  import { type FeatureTree } from './featureTreeFns.js';
4
4
  /** Authoring options for the base flat the flanges attach to. */
@@ -98,7 +98,7 @@ export interface FlatFrame {
98
98
  * `err` with a `validationError` for an invalid thickness / base / flange /
99
99
  * seam specification.
100
100
  */
101
- export declare function authorPart(spec: AuthorSpec): Result<SheetMetalPart>;
101
+ export declare function authorPart(spec: AuthorSpec): Promise<Result<SheetMetalPart>>;
102
102
  /**
103
103
  * World {@link FlatFrame} of every flat region of an authored part, keyed by region
104
104
  * id (`'root'` for the base). Reconstructed from the recorded bend/flange feature
@@ -1 +1 @@
1
- {"version":3,"file":"authorFns.d.ts","sourceRoot":"","sources":["../src/authorFns.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,MAAM,EACX,KAAK,IAAI,EAoBV,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAEV,QAAQ,EAER,OAAO,EACP,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,cAAc,EACf,MAAM,YAAY,CAAC;AAEpB,OAAO,EAA6B,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElF,iEAAiE;AACjE,MAA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