@faicad/sheetmetal 0.16.1 → 0.18.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.
- package/dist/allowanceFns.d.ts +1 -1
- package/dist/allowanceFns.d.ts.map +1 -1
- package/dist/allowanceFns.js +1 -1
- package/dist/allowanceFns.js.map +1 -1
- package/dist/api.d.ts +21 -20
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +20 -20
- package/dist/api.js.map +1 -1
- package/dist/authorFns.d.ts +2 -2
- package/dist/authorFns.d.ts.map +1 -1
- package/dist/authorFns.js +61 -51
- package/dist/authorFns.js.map +1 -1
- package/dist/bendTableFns.d.ts +1 -1
- package/dist/bendTableFns.d.ts.map +1 -1
- package/dist/bendTableFns.js +1 -1
- package/dist/bendTableFns.js.map +1 -1
- package/dist/contourFlangeFns.d.ts +5 -4
- package/dist/contourFlangeFns.d.ts.map +1 -1
- package/dist/contourFlangeFns.js +59 -44
- package/dist/contourFlangeFns.js.map +1 -1
- package/dist/cutoutFns.d.ts +5 -5
- package/dist/cutoutFns.d.ts.map +1 -1
- package/dist/cutoutFns.js +22 -14
- package/dist/cutoutFns.js.map +1 -1
- package/dist/dxfFns.d.ts +1 -1
- package/dist/dxfFns.d.ts.map +1 -1
- package/dist/dxfFns.js +1 -1
- package/dist/dxfFns.js.map +1 -1
- package/dist/facade.d.ts +43 -42
- package/dist/facade.d.ts.map +1 -1
- package/dist/facade.js +83 -83
- package/dist/facade.js.map +1 -1
- package/dist/featureTreeFns.d.ts +1 -1
- package/dist/featureTreeFns.d.ts.map +1 -1
- package/dist/featureTreeFns.js +1 -1
- package/dist/featureTreeFns.js.map +1 -1
- package/dist/foldFns.d.ts +3 -3
- package/dist/foldFns.d.ts.map +1 -1
- package/dist/foldFns.js +12 -12
- package/dist/foldFns.js.map +1 -1
- package/dist/foreignUnfoldFns.d.ts +2 -1
- package/dist/foreignUnfoldFns.d.ts.map +1 -1
- package/dist/foreignUnfoldFns.js +21 -10
- package/dist/foreignUnfoldFns.js.map +1 -1
- package/dist/formFns.d.ts +4 -4
- package/dist/formFns.d.ts.map +1 -1
- package/dist/formFns.js +91 -76
- package/dist/formFns.js.map +1 -1
- package/dist/geometryOps.d.ts +53 -0
- package/dist/geometryOps.d.ts.map +1 -0
- package/dist/geometryOps.js +104 -0
- package/dist/geometryOps.js.map +1 -0
- package/dist/hemFns.d.ts +2 -2
- package/dist/hemFns.d.ts.map +1 -1
- package/dist/hemFns.js +4 -4
- package/dist/hemFns.js.map +1 -1
- package/dist/internal.d.ts +2 -1
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js +1 -1
- package/dist/internal.js.map +1 -1
- package/dist/jogFns.d.ts +2 -2
- package/dist/jogFns.d.ts.map +1 -1
- package/dist/jogFns.js +6 -6
- package/dist/jogFns.js.map +1 -1
- package/dist/loftedFlangeFns.d.ts +2 -2
- package/dist/loftedFlangeFns.d.ts.map +1 -1
- package/dist/loftedFlangeFns.js +35 -25
- package/dist/loftedFlangeFns.js.map +1 -1
- package/dist/miterFns.d.ts +3 -3
- package/dist/miterFns.d.ts.map +1 -1
- package/dist/miterFns.js +30 -19
- package/dist/miterFns.js.map +1 -1
- package/dist/nestFns.d.ts +1 -1
- package/dist/nestFns.d.ts.map +1 -1
- package/dist/nestFns.js +1 -1
- package/dist/nestFns.js.map +1 -1
- package/dist/polygonFns.d.ts +2 -2
- package/dist/polygonFns.d.ts.map +1 -1
- package/dist/polygonFns.js +1 -1
- package/dist/polygonFns.js.map +1 -1
- package/dist/reliefFns.d.ts +4 -4
- package/dist/reliefFns.d.ts.map +1 -1
- package/dist/reliefFns.js +39 -31
- package/dist/reliefFns.js.map +1 -1
- package/dist/reportFns.d.ts +1 -1
- package/dist/reportFns.d.ts.map +1 -1
- package/dist/reportFns.js +1 -1
- package/dist/reportFns.js.map +1 -1
- package/dist/tabFns.d.ts +3 -3
- package/dist/tabFns.d.ts.map +1 -1
- package/dist/tabFns.js +21 -13
- package/dist/tabFns.js.map +1 -1
- package/dist/types.d.ts +21 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/unfoldFns.d.ts +1 -1
- package/dist/unfoldFns.d.ts.map +1 -1
- package/dist/unfoldFns.js +2 -2
- package/dist/unfoldFns.js.map +1 -1
- package/dist/validateFns.d.ts.map +1 -1
- package/dist/validateFns.js +4 -6
- package/dist/validateFns.js.map +1 -1
- package/package.json +2 -2
package/dist/facade.d.ts
CHANGED
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
* chain stays terminal-free. Use the `Result`-returning functions in `./api.js`
|
|
10
10
|
* directly when explicit error handling is preferred over throwing.
|
|
11
11
|
*/
|
|
12
|
-
import type {
|
|
12
|
+
import type { Solid } from './types.js';
|
|
13
|
+
import type { BrepError } from '@faicad/faijs/api';
|
|
13
14
|
import type { AuthorSpec, BaseFlatSpec, FlangeSpec, SeamSpec } from './authorFns.js';
|
|
14
15
|
import type { MiterPlane, DxfOptions, SlotPlacement } from './api.js';
|
|
15
16
|
import type { SheetMetalPart, FlatPattern, FlatInput, BendReport, MaterialSpec, ReliefSpec, CutoutSpec, TabSpec, ContourFlangeSpec, LoftedFlangeSpec, HemSpec, JogSpec, SheetMetalWarning, UnfoldResult } from './types.js';
|
|
@@ -30,7 +31,7 @@ declare class SheetMetalPartHandle {
|
|
|
30
31
|
* @param plane - the oriented cutting plane; material on the plane's `+normal` side is removed.
|
|
31
32
|
* @returns a new `SheetMetalPartHandle` carrying the mitered part.
|
|
32
33
|
*/
|
|
33
|
-
miter(plane: MiterPlane): SheetMetalPartHandle
|
|
34
|
+
miter(plane: MiterPlane): Promise<SheetMetalPartHandle>;
|
|
34
35
|
/**
|
|
35
36
|
* Auto-miter the shared corner of two flanges with an optional gap.
|
|
36
37
|
* @param flangeIdA - id of the first flange meeting at the corner.
|
|
@@ -38,20 +39,20 @@ declare class SheetMetalPartHandle {
|
|
|
38
39
|
* @param gap - optional gap (in millimetres) left between the two mitered edges; defaults to 0.
|
|
39
40
|
* @returns a new `SheetMetalPartHandle` carrying the part with the corner mitered.
|
|
40
41
|
*/
|
|
41
|
-
miterCorner(flangeIdA: string, flangeIdB: string, gap?: number): SheetMetalPartHandle
|
|
42
|
+
miterCorner(flangeIdA: string, flangeIdB: string, gap?: number): Promise<SheetMetalPartHandle>;
|
|
42
43
|
/**
|
|
43
44
|
* Add a bend relief at each mid-edge end of a partial flange's bend line.
|
|
44
45
|
* @param flangeId - id of the partial flange whose bend-line ends get the relief.
|
|
45
46
|
* @param spec - optional relief specification overriding the defaults.
|
|
46
47
|
* @returns a new `SheetMetalPartHandle` carrying the part with the relief added.
|
|
47
48
|
*/
|
|
48
|
-
bendRelief(flangeId: string, spec?: ReliefSpec): SheetMetalPartHandle
|
|
49
|
+
bendRelief(flangeId: string, spec?: ReliefSpec): Promise<SheetMetalPartHandle>;
|
|
49
50
|
/**
|
|
50
51
|
* Add a bend relief to every partial-span bend in the part.
|
|
51
52
|
* @param spec - optional relief specification applied to every partial bend.
|
|
52
53
|
* @returns a new `SheetMetalPartHandle` carrying the part with all reliefs added.
|
|
53
54
|
*/
|
|
54
|
-
autoReliefs(spec?: ReliefSpec): SheetMetalPartHandle
|
|
55
|
+
autoReliefs(spec?: ReliefSpec): Promise<SheetMetalPartHandle>;
|
|
55
56
|
/**
|
|
56
57
|
* Cut a corner relief notch at the shared corner of two adjacent flanges.
|
|
57
58
|
* @param flangeIdA - id of the first flange forming the corner.
|
|
@@ -59,13 +60,13 @@ declare class SheetMetalPartHandle {
|
|
|
59
60
|
* @param spec - optional relief specification overriding the defaults.
|
|
60
61
|
* @returns a new `SheetMetalPartHandle` carrying the part with the corner relief added.
|
|
61
62
|
*/
|
|
62
|
-
cornerRelief(flangeIdA: string, flangeIdB: string, spec?: ReliefSpec): SheetMetalPartHandle
|
|
63
|
+
cornerRelief(flangeIdA: string, flangeIdB: string, spec?: ReliefSpec): Promise<SheetMetalPartHandle>;
|
|
63
64
|
/**
|
|
64
65
|
* Punch a cutout (hole / slot / polygon) through a named flat region.
|
|
65
66
|
* @param spec - the cutout definition (kind, geometry, and target region).
|
|
66
67
|
* @returns a new `SheetMetalPartHandle` carrying the part with the cutout punched.
|
|
67
68
|
*/
|
|
68
|
-
cutout(spec: CutoutSpec): SheetMetalPartHandle
|
|
69
|
+
cutout(spec: CutoutSpec): Promise<SheetMetalPartHandle>;
|
|
69
70
|
/**
|
|
70
71
|
* Punch a circular hole of `diameter` centred at region-local `(x, y)`.
|
|
71
72
|
* @param region - name of the flat region the hole is punched through.
|
|
@@ -74,7 +75,7 @@ declare class SheetMetalPartHandle {
|
|
|
74
75
|
* @param diameter - hole diameter.
|
|
75
76
|
* @returns a new `SheetMetalPartHandle` carrying the part with the hole punched.
|
|
76
77
|
*/
|
|
77
|
-
hole(region: string, x: number, y: number, diameter: number): SheetMetalPartHandle
|
|
78
|
+
hole(region: string, x: number, y: number, diameter: number): Promise<SheetMetalPartHandle>;
|
|
78
79
|
/**
|
|
79
80
|
* Punch a slot (rectangular or obround) centred at region-local `(x, y)`.
|
|
80
81
|
* @param region - name of the flat region the slot is punched through.
|
|
@@ -88,27 +89,27 @@ declare class SheetMetalPartHandle {
|
|
|
88
89
|
width: number;
|
|
89
90
|
angleDeg?: number;
|
|
90
91
|
round?: boolean;
|
|
91
|
-
}): SheetMetalPartHandle
|
|
92
|
+
}): Promise<SheetMetalPartHandle>;
|
|
92
93
|
/**
|
|
93
94
|
* Punch an arbitrary polygon cutout from its region-local `points`.
|
|
94
95
|
* @param region - name of the flat region the polygon is punched through.
|
|
95
96
|
* @param points - region-local polygon vertices as `[x, y]` pairs.
|
|
96
97
|
* @returns a new `SheetMetalPartHandle` carrying the part with the polygon cutout.
|
|
97
98
|
*/
|
|
98
|
-
polygonCutout(region: string, points: [number, number][]): SheetMetalPartHandle
|
|
99
|
+
polygonCutout(region: string, points: [number, number][]): Promise<SheetMetalPartHandle>;
|
|
99
100
|
/**
|
|
100
101
|
* Fuse a rectangular tab (additive protrusion) onto a region's edge.
|
|
101
102
|
* @param spec - tab definition: edge, width, and length.
|
|
102
103
|
* @returns a new `SheetMetalPartHandle` carrying the part with the tab added.
|
|
103
104
|
*/
|
|
104
|
-
tab(spec: TabSpec): SheetMetalPartHandle
|
|
105
|
+
tab(spec: TabSpec): Promise<SheetMetalPartHandle>;
|
|
105
106
|
/**
|
|
106
107
|
* Self-fixturing tab-and-slot joint: a tab on one region + a matching slot on another.
|
|
107
108
|
* @param tab - the tab to add to the first region.
|
|
108
109
|
* @param slot - placement of the matching slot on the second region.
|
|
109
110
|
* @returns a new `SheetMetalPartHandle` carrying the part with the joint added.
|
|
110
111
|
*/
|
|
111
|
-
tabAndSlot(tab: TabSpec, slot: SlotPlacement): SheetMetalPartHandle
|
|
112
|
+
tabAndSlot(tab: TabSpec, slot: SlotPlacement): Promise<SheetMetalPartHandle>;
|
|
112
113
|
/**
|
|
113
114
|
* Form a louver (vent flap) on a region.
|
|
114
115
|
* @param opts - louver geometry: target `region`, centre `(x, y)`, `length`, `width`, `height`, and optional `direction`.
|
|
@@ -122,7 +123,7 @@ declare class SheetMetalPartHandle {
|
|
|
122
123
|
width: number;
|
|
123
124
|
height: number;
|
|
124
125
|
direction?: 'up' | 'down';
|
|
125
|
-
}): SheetMetalPartHandle
|
|
126
|
+
}): Promise<SheetMetalPartHandle>;
|
|
126
127
|
/**
|
|
127
128
|
* Form a round emboss (raised) or dimple (recessed) on a region.
|
|
128
129
|
* @param opts - emboss geometry: target `region`, centre `(x, y)`, `diameter`, `height`, and `kind` (`dimple` or `emboss`).
|
|
@@ -135,31 +136,31 @@ declare class SheetMetalPartHandle {
|
|
|
135
136
|
diameter: number;
|
|
136
137
|
height: number;
|
|
137
138
|
kind: 'dimple' | 'emboss';
|
|
138
|
-
}): SheetMetalPartHandle
|
|
139
|
+
}): Promise<SheetMetalPartHandle>;
|
|
139
140
|
/**
|
|
140
141
|
* Author a contour flange (open line/arc profile swept along a base edge).
|
|
141
142
|
* @param spec - contour flange definition: profile, base edge, and bend parameters.
|
|
142
143
|
* @returns a new `SheetMetalPartHandle` carrying the part with the contour flange added.
|
|
143
144
|
*/
|
|
144
|
-
contourFlange(spec: ContourFlangeSpec): SheetMetalPartHandle
|
|
145
|
+
contourFlange(spec: ContourFlangeSpec): Promise<SheetMetalPartHandle>;
|
|
145
146
|
/**
|
|
146
147
|
* Author a lofted / ruled transition flange between two parallel open profiles.
|
|
147
148
|
* @param spec - lofted flange definition: the two open profiles and their alignment.
|
|
148
149
|
* @returns a new `SheetMetalPartHandle` carrying the part with the lofted flange added.
|
|
149
150
|
*/
|
|
150
|
-
loftedFlange(spec: LoftedFlangeSpec): SheetMetalPartHandle
|
|
151
|
+
loftedFlange(spec: LoftedFlangeSpec): Promise<SheetMetalPartHandle>;
|
|
151
152
|
/**
|
|
152
153
|
* Fold a region edge back ~180°+ onto its parent as a hem (closed/open/teardrop/rolled).
|
|
153
154
|
* @param spec - hem definition: edge, curl radius, and return leg length.
|
|
154
155
|
* @returns a new `SheetMetalPartHandle` carrying the part with the hem added.
|
|
155
156
|
*/
|
|
156
|
-
hem(spec: HemSpec): SheetMetalPartHandle
|
|
157
|
+
hem(spec: HemSpec): Promise<SheetMetalPartHandle>;
|
|
157
158
|
/**
|
|
158
159
|
* Step a region's flat by `offsetHeight` with two opposite bends (a jog/joggle).
|
|
159
160
|
* @param spec - jog definition: bend line, offset height, and radii.
|
|
160
161
|
* @returns a new `SheetMetalPartHandle` carrying the part with the jog added.
|
|
161
162
|
*/
|
|
162
|
-
jog(spec: JogSpec): SheetMetalPartHandle
|
|
163
|
+
jog(spec: JogSpec): Promise<SheetMetalPartHandle>;
|
|
163
164
|
/**
|
|
164
165
|
* Flatten into a developed flat pattern + bend report + warnings.
|
|
165
166
|
* @returns the `UnfoldResult` with the flat pattern, bend report, and any warnings.
|
|
@@ -254,13 +255,13 @@ declare class SheetMetalBuilder {
|
|
|
254
255
|
* `report()`) authors the solid only once.
|
|
255
256
|
* @returns a `SheetMetalPartHandle` for the folded part, memoized across calls.
|
|
256
257
|
*/
|
|
257
|
-
build(): SheetMetalPartHandle
|
|
258
|
+
build(): Promise<SheetMetalPartHandle>;
|
|
258
259
|
/**
|
|
259
260
|
* Build the part and cut it by an oriented plane, removing material on the `+normal` side.
|
|
260
261
|
* @param plane - the oriented cutting plane; material on the plane's `+normal` side is removed.
|
|
261
262
|
* @returns a `SheetMetalPartHandle` carrying the mitered part.
|
|
262
263
|
*/
|
|
263
|
-
miter(plane: MiterPlane): SheetMetalPartHandle
|
|
264
|
+
miter(plane: MiterPlane): Promise<SheetMetalPartHandle>;
|
|
264
265
|
/**
|
|
265
266
|
* Build the part and auto-miter the shared corner of two flanges with an optional gap.
|
|
266
267
|
* @param flangeIdA - id of the first flange meeting at the corner.
|
|
@@ -268,20 +269,20 @@ declare class SheetMetalBuilder {
|
|
|
268
269
|
* @param gap - optional gap (in millimetres) left between the two mitered edges; defaults to 0.
|
|
269
270
|
* @returns a `SheetMetalPartHandle` carrying the part with the corner mitered.
|
|
270
271
|
*/
|
|
271
|
-
miterCorner(flangeIdA: string, flangeIdB: string, gap?: number): SheetMetalPartHandle
|
|
272
|
+
miterCorner(flangeIdA: string, flangeIdB: string, gap?: number): Promise<SheetMetalPartHandle>;
|
|
272
273
|
/**
|
|
273
274
|
* Build the part and add a bend relief at each mid-edge end of a partial flange's bend line.
|
|
274
275
|
* @param flangeId - id of the partial flange whose bend-line ends get the relief.
|
|
275
276
|
* @param spec - optional relief specification overriding the defaults.
|
|
276
277
|
* @returns a `SheetMetalPartHandle` carrying the part with the relief added.
|
|
277
278
|
*/
|
|
278
|
-
bendRelief(flangeId: string, spec?: ReliefSpec): SheetMetalPartHandle
|
|
279
|
+
bendRelief(flangeId: string, spec?: ReliefSpec): Promise<SheetMetalPartHandle>;
|
|
279
280
|
/**
|
|
280
281
|
* Build the part and add a bend relief to every partial-span bend.
|
|
281
282
|
* @param spec - optional relief specification applied to every partial bend.
|
|
282
283
|
* @returns a `SheetMetalPartHandle` carrying the part with all reliefs added.
|
|
283
284
|
*/
|
|
284
|
-
autoReliefs(spec?: ReliefSpec): SheetMetalPartHandle
|
|
285
|
+
autoReliefs(spec?: ReliefSpec): Promise<SheetMetalPartHandle>;
|
|
285
286
|
/**
|
|
286
287
|
* Build the part and cut a corner relief notch at the shared corner of two adjacent flanges.
|
|
287
288
|
* @param flangeIdA - id of the first flange forming the corner.
|
|
@@ -289,13 +290,13 @@ declare class SheetMetalBuilder {
|
|
|
289
290
|
* @param spec - optional relief specification overriding the defaults.
|
|
290
291
|
* @returns a `SheetMetalPartHandle` carrying the part with the corner relief added.
|
|
291
292
|
*/
|
|
292
|
-
cornerRelief(flangeIdA: string, flangeIdB: string, spec?: ReliefSpec): SheetMetalPartHandle
|
|
293
|
+
cornerRelief(flangeIdA: string, flangeIdB: string, spec?: ReliefSpec): Promise<SheetMetalPartHandle>;
|
|
293
294
|
/**
|
|
294
295
|
* Build the part and punch a cutout (hole / slot / polygon) through a named flat region.
|
|
295
296
|
* @param spec - the cutout definition (kind, geometry, and target region).
|
|
296
297
|
* @returns a `SheetMetalPartHandle` carrying the part with the cutout punched.
|
|
297
298
|
*/
|
|
298
|
-
cutout(spec: CutoutSpec): SheetMetalPartHandle
|
|
299
|
+
cutout(spec: CutoutSpec): Promise<SheetMetalPartHandle>;
|
|
299
300
|
/**
|
|
300
301
|
* Build the part and punch a circular hole of `diameter` centred at region-local `(x, y)`.
|
|
301
302
|
* @param region - name of the flat region the hole is punched through.
|
|
@@ -304,7 +305,7 @@ declare class SheetMetalBuilder {
|
|
|
304
305
|
* @param diameter - hole diameter.
|
|
305
306
|
* @returns a `SheetMetalPartHandle` carrying the part with the hole punched.
|
|
306
307
|
*/
|
|
307
|
-
hole(region: string, x: number, y: number, diameter: number): SheetMetalPartHandle
|
|
308
|
+
hole(region: string, x: number, y: number, diameter: number): Promise<SheetMetalPartHandle>;
|
|
308
309
|
/**
|
|
309
310
|
* Build the part and punch a slot (rectangular or obround) centred at region-local `(x, y)`.
|
|
310
311
|
* @param region - name of the flat region the slot is punched through.
|
|
@@ -318,27 +319,27 @@ declare class SheetMetalBuilder {
|
|
|
318
319
|
width: number;
|
|
319
320
|
angleDeg?: number;
|
|
320
321
|
round?: boolean;
|
|
321
|
-
}): SheetMetalPartHandle
|
|
322
|
+
}): Promise<SheetMetalPartHandle>;
|
|
322
323
|
/**
|
|
323
324
|
* Build the part and punch an arbitrary polygon cutout from its region-local `points`.
|
|
324
325
|
* @param region - name of the flat region the polygon is punched through.
|
|
325
326
|
* @param points - region-local polygon vertices as `[x, y]` pairs.
|
|
326
327
|
* @returns a `SheetMetalPartHandle` carrying the part with the polygon cutout.
|
|
327
328
|
*/
|
|
328
|
-
polygonCutout(region: string, points: [number, number][]): SheetMetalPartHandle
|
|
329
|
+
polygonCutout(region: string, points: [number, number][]): Promise<SheetMetalPartHandle>;
|
|
329
330
|
/**
|
|
330
331
|
* Build the part and fuse a rectangular tab (additive protrusion) onto a region's edge.
|
|
331
332
|
* @param spec - tab definition: edge, width, and length.
|
|
332
333
|
* @returns a `SheetMetalPartHandle` carrying the part with the tab added.
|
|
333
334
|
*/
|
|
334
|
-
tab(spec: TabSpec): SheetMetalPartHandle
|
|
335
|
+
tab(spec: TabSpec): Promise<SheetMetalPartHandle>;
|
|
335
336
|
/**
|
|
336
337
|
* Build the part and add a self-fixturing tab-and-slot joint across two regions.
|
|
337
338
|
* @param tab - the tab to add to the first region.
|
|
338
339
|
* @param slot - placement of the matching slot on the second region.
|
|
339
340
|
* @returns a `SheetMetalPartHandle` carrying the part with the joint added.
|
|
340
341
|
*/
|
|
341
|
-
tabAndSlot(tab: TabSpec, slot: SlotPlacement): SheetMetalPartHandle
|
|
342
|
+
tabAndSlot(tab: TabSpec, slot: SlotPlacement): Promise<SheetMetalPartHandle>;
|
|
342
343
|
/**
|
|
343
344
|
* Build the part and form a louver (vent flap) on a region.
|
|
344
345
|
* @param opts - louver geometry: target `region`, centre `(x, y)`, `length`, `width`, `height`, and optional `direction`.
|
|
@@ -352,7 +353,7 @@ declare class SheetMetalBuilder {
|
|
|
352
353
|
width: number;
|
|
353
354
|
height: number;
|
|
354
355
|
direction?: 'up' | 'down';
|
|
355
|
-
}): SheetMetalPartHandle
|
|
356
|
+
}): Promise<SheetMetalPartHandle>;
|
|
356
357
|
/**
|
|
357
358
|
* Build the part and form a round emboss (raised) or dimple (recessed) on a region.
|
|
358
359
|
* @param opts - emboss geometry: target `region`, centre `(x, y)`, `diameter`, `height`, and `kind` (`dimple` or `emboss`).
|
|
@@ -365,57 +366,57 @@ declare class SheetMetalBuilder {
|
|
|
365
366
|
diameter: number;
|
|
366
367
|
height: number;
|
|
367
368
|
kind: 'dimple' | 'emboss';
|
|
368
|
-
}): SheetMetalPartHandle
|
|
369
|
+
}): Promise<SheetMetalPartHandle>;
|
|
369
370
|
/**
|
|
370
371
|
* Build the part and author a contour flange (open line/arc profile swept along a base edge).
|
|
371
372
|
* @param spec - contour flange definition: profile, base edge, and bend parameters.
|
|
372
373
|
* @returns a `SheetMetalPartHandle` carrying the part with the contour flange added.
|
|
373
374
|
*/
|
|
374
|
-
contourFlange(spec: ContourFlangeSpec): SheetMetalPartHandle
|
|
375
|
+
contourFlange(spec: ContourFlangeSpec): Promise<SheetMetalPartHandle>;
|
|
375
376
|
/**
|
|
376
377
|
* Build the part and author a lofted / ruled transition flange between two parallel open profiles.
|
|
377
378
|
* @param spec - lofted flange definition: the two open profiles and their alignment.
|
|
378
379
|
* @returns a `SheetMetalPartHandle` carrying the part with the lofted flange added.
|
|
379
380
|
*/
|
|
380
|
-
loftedFlange(spec: LoftedFlangeSpec): SheetMetalPartHandle
|
|
381
|
+
loftedFlange(spec: LoftedFlangeSpec): Promise<SheetMetalPartHandle>;
|
|
381
382
|
/**
|
|
382
383
|
* Build the part and fold a region edge back ~180°+ onto its parent as a hem.
|
|
383
384
|
* @param spec - hem definition: edge, curl radius, and return leg length.
|
|
384
385
|
* @returns a `SheetMetalPartHandle` carrying the part with the hem added.
|
|
385
386
|
*/
|
|
386
|
-
hem(spec: HemSpec): SheetMetalPartHandle
|
|
387
|
+
hem(spec: HemSpec): Promise<SheetMetalPartHandle>;
|
|
387
388
|
/**
|
|
388
389
|
* Build the part and step a region's flat by `offsetHeight` with two opposite bends (a jog/joggle).
|
|
389
390
|
* @param spec - jog definition: bend line, offset height, and radii.
|
|
390
391
|
* @returns a `SheetMetalPartHandle` carrying the part with the jog added.
|
|
391
392
|
*/
|
|
392
|
-
jog(spec: JogSpec): SheetMetalPartHandle
|
|
393
|
+
jog(spec: JogSpec): Promise<SheetMetalPartHandle>;
|
|
393
394
|
/**
|
|
394
395
|
* Build the part and flatten it into a developed flat pattern + bend report + warnings.
|
|
395
396
|
* @returns the `UnfoldResult` with the flat pattern, bend report, and any warnings.
|
|
396
397
|
*/
|
|
397
|
-
unfold(): UnfoldResult
|
|
398
|
+
unfold(): Promise<UnfoldResult>;
|
|
398
399
|
/**
|
|
399
400
|
* Build the part and produce the bend report from its feature tree.
|
|
400
401
|
* @returns the `BendReport` describing every bend in the part.
|
|
401
402
|
*/
|
|
402
|
-
report(): BendReport
|
|
403
|
+
report(): Promise<BendReport>;
|
|
403
404
|
/**
|
|
404
405
|
* Build the part and emit an annotated multi-layer DXF of its developed flat pattern.
|
|
405
406
|
* @param options - optional DXF output options (layers, precision, units).
|
|
406
407
|
* @returns the DXF text of the developed flat pattern.
|
|
407
408
|
*/
|
|
408
|
-
dxf(options?: DxfOptions): string
|
|
409
|
+
dxf(options?: DxfOptions): Promise<string>;
|
|
409
410
|
/**
|
|
410
411
|
* Build the part and run manufacturability checks (advisory, never throws).
|
|
411
412
|
* @returns the list of `SheetMetalWarning`s (empty when the part is manufacturable).
|
|
412
413
|
*/
|
|
413
|
-
validate(): SheetMetalWarning[]
|
|
414
|
+
validate(): Promise<SheetMetalWarning[]>;
|
|
414
415
|
/**
|
|
415
416
|
* Build the part and return it (escape hatch back to the functional API).
|
|
416
417
|
* @returns the underlying `SheetMetalPart`.
|
|
417
418
|
*/
|
|
418
|
-
get(): SheetMetalPart
|
|
419
|
+
get(): Promise<SheetMetalPart>;
|
|
419
420
|
}
|
|
420
421
|
/**
|
|
421
422
|
* Start a fluent sheet-metal chain from a base flat (`length × width`).
|
|
@@ -435,7 +436,7 @@ export declare function fromPart(part: SheetMetalPart): SheetMetalPartHandle;
|
|
|
435
436
|
* @param input - the flat pattern (region tree) to fold up.
|
|
436
437
|
* @returns a `SheetMetalPartHandle` carrying the folded part.
|
|
437
438
|
*/
|
|
438
|
-
export declare function foldFlat(input: FlatInput): SheetMetalPartHandle
|
|
439
|
+
export declare function foldFlat(input: FlatInput): Promise<SheetMetalPartHandle>;
|
|
439
440
|
/**
|
|
440
441
|
* Detect and unfold an imported foreign sheet-metal solid (no feature tree).
|
|
441
442
|
* @param solid - the imported solid (B-rep) to unfold.
|
package/dist/facade.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"facade.d.ts","sourceRoot":"","sources":["../src/facade.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"facade.d.ts","sourceRoot":"","sources":["../src/facade.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,KAAK,EAAC,SAAS,EAAS,MAAM,mBAAmB,CAAC;AAEzD,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACrF,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AA2BtE,OAAO,KAAK,EACV,cAAc,EACd,WAAW,EACX,SAAS,EACT,UAAU,EACV,YAAY,EACZ,UAAU,EACV,UAAU,EACV,OAAO,EACP,iBAAiB,EACjB,gBAAgB,EAChB,OAAO,EACP,OAAO,EACP,iBAAi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