brepjs 18.119.2 → 18.119.3
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/2d/lib/curve2D.d.ts +6 -1
- package/dist/2d/lib/curve2dFns.d.ts +6 -1
- package/dist/2d.cjs +7 -7
- package/dist/2d.js +7 -7
- package/dist/{adjacencyFns-BdM5p58J.js → adjacencyFns-DLityMyV.js} +2 -2
- package/dist/{adjacencyFns-Brrc7jlS.cjs → adjacencyFns-DSxuQYnb.cjs} +2 -2
- package/dist/{blueprint-DTNT4qYJ.cjs → blueprint-BGcBMy3b.cjs} +39 -9
- package/dist/{blueprint-DJJo8WkI.js → blueprint-CAG6jseD.js} +33 -9
- package/dist/{blueprintFns-CcpboZ80.js → blueprintFns-B4C3zH7N.js} +9 -4
- package/dist/{blueprintFns-2XDZfCxX.cjs → blueprintFns-CnoqynzI.cjs} +9 -4
- package/dist/{blueprintSketcher-C0EXFVb2.cjs → blueprintSketcher-BNz6f36D.cjs} +166 -61
- package/dist/{blueprintSketcher-DDPyypmC.js → blueprintSketcher-CKKxvxB-.js} +159 -54
- package/dist/{boolean2D-Ddfo_dd0.cjs → boolean2D-B-0xobBP.cjs} +5 -5
- package/dist/{boolean2D-C_PVz8xT.js → boolean2D-C_1gMcZ6.js} +5 -5
- package/dist/brepjs.cjs +105 -92
- package/dist/brepjs.js +39 -27
- package/dist/{cameraFns-Czr5vABD.cjs → cameraFns-2-haLzLi.cjs} +4 -4
- package/dist/{cameraFns-D9tdBYLM.js → cameraFns-CG_J66Hl.js} +4 -4
- package/dist/core.cjs +12 -11
- package/dist/core.js +4 -3
- package/dist/{cornerFinder-Cqg-Dz74.js → cornerFinder-CPFM7bA0.js} +1 -1
- package/dist/{cornerFinder-DETRDOMz.cjs → cornerFinder-mfsUMi5g.cjs} +1 -1
- package/dist/{curveFns-RENXKp64.js → curveFns-DX13KRh2.js} +2 -2
- package/dist/{curveFns-D7utcbnf.cjs → curveFns-GmFnqNo3.cjs} +2 -2
- package/dist/{drawFns-D9Rf4foW.cjs → drawFns-B14M5M68.cjs} +14 -14
- package/dist/{drawFns-B9HbtAoc.js → drawFns-BShGVVXW.js} +14 -14
- package/dist/{errors-B3CDG537.js → errors-MHLiNE-C.js} +1 -92
- package/dist/{errors-CJU8CHng.cjs → errors-RHkKO5bZ.cjs} +0 -103
- package/dist/{faceFns-CPswi9Cm.cjs → faceFns-BK4r7Dxk.cjs} +3 -3
- package/dist/{faceFns-CB6uzvOg.js → faceFns-DJj9Nb6T.js} +3 -3
- package/dist/{healingFns-BFTYLiAm.js → healingFns-DxcRyVCG.js} +5 -6
- package/dist/{healingFns-bhMxTTqw.cjs → healingFns-Hx4oTlq8.cjs} +27 -28
- package/dist/{helpers-Cu4ag5bh.cjs → helpers-BfkBvokP.cjs} +8 -24
- package/dist/{helpers-BiN4qQZP.js → helpers-Du_OdHuy.js} +9 -25
- package/dist/{importFns-X8vBhZI2.js → importFns-BHs19muu.js} +3 -3
- package/dist/{importFns-DS4J1xLv.cjs → importFns-GySbuvVv.cjs} +3 -3
- package/dist/io.cjs +2 -2
- package/dist/io.js +2 -2
- package/dist/{loftFns-ChHjzUK-.cjs → loftFns-BdpZ8FMN.cjs} +2 -125
- package/dist/{loftFns-BF5X7ltI.js → loftFns-BeGJ6dxx.js} +4 -109
- package/dist/{measureFns-B5Zzg1qM.cjs → measureFns-CJGrmhHT.cjs} +4 -4
- package/dist/{measureFns-CC7HhAH3.js → measureFns-CMnbcUZC.js} +4 -4
- package/dist/measurement.cjs +1 -1
- package/dist/measurement.js +1 -1
- package/dist/{meshFns-D57Fyqyf.js → meshFns-Cs5EBsf7.js} +4 -4
- package/dist/{meshFns-CaXmWmhe.cjs → meshFns-Dqf5QBhQ.cjs} +5 -5
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/originTrackingFns-DZmdiQ-O.js +203 -0
- package/dist/originTrackingFns-fpEgTIwV.cjs +226 -0
- package/dist/{planeOps-Cp6GQ23-.js → planeOps-CQahLrCx.js} +1 -1
- package/dist/{planeOps-Cr25KWWA.cjs → planeOps-VlFxtvzY.cjs} +1 -1
- package/dist/primitiveFns-B_rflH83.cjs +773 -0
- package/dist/primitiveFns-Cxo3xDKY.js +558 -0
- package/dist/projection.cjs +1 -1
- package/dist/projection.js +1 -1
- package/dist/query.cjs +2 -2
- package/dist/query.js +2 -2
- package/dist/{refResolveFns-3bw9-U-e.js → refResolveFns-BbRLD8LA.js} +6 -6
- package/dist/{refResolveFns-BxmgIhQM.cjs → refResolveFns-CVDLwh12.cjs} +6 -6
- package/dist/result.cjs +1 -1
- package/dist/result.js +1 -1
- package/dist/rolldown-runtime-DakpK96I.cjs +43 -0
- package/dist/shapeFns-BTFx-os7.js +43 -0
- package/dist/shapeFns-D_5TgiUi.cjs +84 -0
- package/dist/shapeRef.cjs +1 -1
- package/dist/shapeRef.js +1 -1
- package/dist/{shapeTypes-Bpsu5KJO.cjs → shapeTypes-CkcIL7zv.cjs} +1 -222
- package/dist/{shapeTypes-CnKFSfDT.js → shapeTypes-t49f64Dx.js} +2 -139
- package/dist/sketching.cjs +3 -3
- package/dist/sketching.js +3 -3
- package/dist/{solidBuilders-I8_V8qqU.js → solidBuilders-DTgqQC3W.js} +310 -8
- package/dist/{solidBuilders-Bp7lQW62.cjs → solidBuilders-IiIzjKAr.cjs} +401 -15
- package/dist/{surfaceBuilders-D8_08oOR.cjs → surfaceBuilders-Biqx51el.cjs} +6 -5
- package/dist/{surfaceBuilders-BNR7yMQO.js → surfaceBuilders-BryY-i0F.js} +4 -3
- package/dist/text.cjs +2 -2
- package/dist/text.js +2 -2
- package/dist/{textBlueprints-B5zcLGvJ.cjs → textBlueprints-8EcWreab.cjs} +138 -51
- package/dist/{textBlueprints-igbNvKcd.js → textBlueprints-rA1HT6j1.js} +116 -11
- package/dist/{textMetrics-CJvtpbc3.js → textMetrics-Bcbso1Ns.js} +2 -2
- package/dist/{textMetrics-08fF0QNf.cjs → textMetrics-GPBu9JKi.cjs} +2 -2
- package/dist/{threadFns-CqSMNyTZ.js → threadFns-BOtXTHZ9.js} +8 -8
- package/dist/{threadFns-Co6vWEWx.cjs → threadFns-DRrk9Qod.cjs} +8 -8
- package/dist/topology.cjs +9 -9
- package/dist/topology.js +9 -9
- package/dist/{topologyQueryFns-C3fhJndG.cjs → topologyQueryFns-Bia7o8l_.cjs} +97 -6
- package/dist/{topologyQueryFns-DNqT88yx.js → topologyQueryFns-BkQ6Q7gN.js} +93 -2
- package/dist/validityTypes-DiTgeCD9.js +129 -0
- package/dist/validityTypes-ZGMVlv7b.cjs +200 -0
- package/dist/vectors.cjs +1 -1
- package/dist/vectors.js +1 -1
- package/package.json +8 -8
- package/dist/primitiveFns-CRy_CUVg.cjs +0 -492
- package/dist/primitiveFns-DCIH-SBm.js +0 -331
- package/dist/shapeFns-BrHFNLMA.js +0 -771
- package/dist/shapeFns-qm9VRo4i.cjs +0 -962
|
@@ -0,0 +1,558 @@
|
|
|
1
|
+
import { K as getKernel, W as _usingCtx, d as createSolid, n as castResultShape } from "./shapeTypes-t49f64Dx.js";
|
|
2
|
+
import { E as ok, d as validationError, g as err, m as andThen, t as BrepErrorCode } from "./errors-MHLiNE-C.js";
|
|
3
|
+
import { n as isClosedWire } from "./validityTypes-DiTgeCD9.js";
|
|
4
|
+
import { n as HASH_CODE_MAX, t as DEG2RAD } from "./constants-ITRzCnCp.js";
|
|
5
|
+
import { C as propagateAllMetadata, S as hasAnyMetadata, T as propagateMetadataThroughRelocation, a as makeOffset, c as makeTorus, i as makeEllipsoid, l as makeVertex, n as makeCone, o as makeSolid, r as makeCylinder, s as makeSphere, t as makeCompound, u as weldShellsAndFaces, w as propagateMetadataByHash, x as collectInputFaceHashes } from "./solidBuilders-DTgqQC3W.js";
|
|
6
|
+
import { _ as makeThreePointArc, a as makeNonPlanarFace, c as makeBSplineApproximation, d as makeCircle, f as makeEllipse, g as makeTangentArc, h as makeLine, i as makeNewFaceWithinFace, m as makeHelix, o as makePolygon, p as makeEllipseArc, r as makeFace, s as assembleWire, t as addHolesInFace, u as makeBezierCurve } from "./surfaceBuilders-BryY-i0F.js";
|
|
7
|
+
//#region src/topology/transformFns.ts
|
|
8
|
+
/**
|
|
9
|
+
* Immutable shape transforms — translate, rotate, scale, mirror, applyMatrix.
|
|
10
|
+
* All functions return new shapes without disposing inputs.
|
|
11
|
+
*/
|
|
12
|
+
/** Translate a shape by a vector. Returns a new shape. */
|
|
13
|
+
function translate(shape, v) {
|
|
14
|
+
const inputFaceHashes = collectInputFaceHashes([shape]);
|
|
15
|
+
const { shape: resultShape, evolution } = getKernel().translateWithHistory(shape.wrapped, v[0], v[1], v[2], inputFaceHashes, HASH_CODE_MAX);
|
|
16
|
+
const result = castResultShape(resultShape);
|
|
17
|
+
propagateAllMetadata(evolution, [shape], result);
|
|
18
|
+
return result;
|
|
19
|
+
}
|
|
20
|
+
/** Rotate a shape around an axis. Angle is in degrees. Returns a new shape. */
|
|
21
|
+
function rotate(shape, angle, position = [
|
|
22
|
+
0,
|
|
23
|
+
0,
|
|
24
|
+
0
|
|
25
|
+
], direction = [
|
|
26
|
+
0,
|
|
27
|
+
0,
|
|
28
|
+
1
|
|
29
|
+
]) {
|
|
30
|
+
const inputFaceHashes = collectInputFaceHashes([shape]);
|
|
31
|
+
const { shape: resultShape, evolution } = getKernel().rotateWithHistory(shape.wrapped, angle * DEG2RAD, inputFaceHashes, HASH_CODE_MAX, direction, position);
|
|
32
|
+
const result = castResultShape(resultShape);
|
|
33
|
+
propagateAllMetadata(evolution, [shape], result);
|
|
34
|
+
return result;
|
|
35
|
+
}
|
|
36
|
+
/** Mirror a shape through a plane defined by origin and normal. Returns a new shape. */
|
|
37
|
+
function mirror(shape, planeNormal = [
|
|
38
|
+
0,
|
|
39
|
+
1,
|
|
40
|
+
0
|
|
41
|
+
], planeOrigin = [
|
|
42
|
+
0,
|
|
43
|
+
0,
|
|
44
|
+
0
|
|
45
|
+
]) {
|
|
46
|
+
const inputFaceHashes = collectInputFaceHashes([shape]);
|
|
47
|
+
const { shape: resultShape, evolution } = getKernel().mirrorWithHistory(shape.wrapped, planeOrigin, planeNormal, inputFaceHashes, HASH_CODE_MAX);
|
|
48
|
+
const result = castResultShape(resultShape);
|
|
49
|
+
propagateAllMetadata(evolution, [shape], result);
|
|
50
|
+
return result;
|
|
51
|
+
}
|
|
52
|
+
/** Scale a shape uniformly. Returns a new shape. */
|
|
53
|
+
function scale(shape, factor, center = [
|
|
54
|
+
0,
|
|
55
|
+
0,
|
|
56
|
+
0
|
|
57
|
+
]) {
|
|
58
|
+
const inputFaceHashes = collectInputFaceHashes([shape]);
|
|
59
|
+
const { shape: resultShape, evolution } = getKernel().scaleWithHistory(shape.wrapped, center, factor, inputFaceHashes, HASH_CODE_MAX);
|
|
60
|
+
const result = castResultShape(resultShape);
|
|
61
|
+
propagateAllMetadata(evolution, [shape], result);
|
|
62
|
+
return result;
|
|
63
|
+
}
|
|
64
|
+
/** Resize a shape to exact target dimensions with optional auto-proportional scaling. */
|
|
65
|
+
function resize(shape, dimensions, options) {
|
|
66
|
+
const bbox = getKernel().boundingBox(shape.wrapped);
|
|
67
|
+
const size = [
|
|
68
|
+
bbox.max[0] - bbox.min[0],
|
|
69
|
+
bbox.max[1] - bbox.min[1],
|
|
70
|
+
bbox.max[2] - bbox.min[2]
|
|
71
|
+
];
|
|
72
|
+
const auto = options?.auto === true;
|
|
73
|
+
function factor(dim, sz, baseFactor) {
|
|
74
|
+
if (dim !== void 0 && sz > 1e-12) return dim / sz;
|
|
75
|
+
if (dim === void 0 && auto) return baseFactor;
|
|
76
|
+
return 1;
|
|
77
|
+
}
|
|
78
|
+
let autoFactor = 1;
|
|
79
|
+
if (auto) {
|
|
80
|
+
if (dimensions[0] !== void 0 && size[0] > 1e-12) autoFactor = dimensions[0] / size[0];
|
|
81
|
+
else if (dimensions[1] !== void 0 && size[1] > 1e-12) autoFactor = dimensions[1] / size[1];
|
|
82
|
+
else if (dimensions[2] !== void 0 && size[2] > 1e-12) autoFactor = dimensions[2] / size[2];
|
|
83
|
+
}
|
|
84
|
+
const factors = [
|
|
85
|
+
factor(dimensions[0], size[0], autoFactor),
|
|
86
|
+
factor(dimensions[1], size[1], autoFactor),
|
|
87
|
+
factor(dimensions[2], size[2], autoFactor)
|
|
88
|
+
];
|
|
89
|
+
if (!(Math.abs(factors[0] - factors[1]) < 1e-6 && Math.abs(factors[1] - factors[2]) < 1e-6)) return err(validationError(BrepErrorCode.VALIDATION_FAILED, "resize: non-uniform scaling is not supported (WASM build lacks BRepBuilderAPI_GTransform).", void 0, void 0, "Use auto: true to scale proportionally, or set all three dimensions to achieve uniform scaling."));
|
|
90
|
+
return ok(scale(shape, factors[0]));
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Parse a MatrixInput into a 3x3 linear part and translation vector.
|
|
94
|
+
* Validates the bottom row of a Matrix4x4.
|
|
95
|
+
*/
|
|
96
|
+
function parseMatrixInput(input) {
|
|
97
|
+
if ("linear" in input) return ok({
|
|
98
|
+
linear: input.linear,
|
|
99
|
+
translation: input.translation
|
|
100
|
+
});
|
|
101
|
+
const [r0, r1, r2, r3] = input;
|
|
102
|
+
const TOL = 1e-10;
|
|
103
|
+
if (Math.abs(r3[0]) > TOL || Math.abs(r3[1]) > TOL || Math.abs(r3[2]) > TOL || Math.abs(r3[3] - 1) > TOL) return err(validationError(BrepErrorCode.VALIDATION_FAILED, `applyMatrix: invalid bottom row [${String(r3[0])}, ${String(r3[1])}, ${String(r3[2])}, ${String(r3[3])}]. Must be [0, 0, 0, 1] for an affine transform.`));
|
|
104
|
+
return ok({
|
|
105
|
+
linear: [
|
|
106
|
+
r0[0],
|
|
107
|
+
r0[1],
|
|
108
|
+
r0[2],
|
|
109
|
+
r1[0],
|
|
110
|
+
r1[1],
|
|
111
|
+
r1[2],
|
|
112
|
+
r2[0],
|
|
113
|
+
r2[1],
|
|
114
|
+
r2[2]
|
|
115
|
+
],
|
|
116
|
+
translation: [
|
|
117
|
+
r0[3],
|
|
118
|
+
r1[3],
|
|
119
|
+
r2[3]
|
|
120
|
+
]
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
/** Determinant of a 3x3 matrix given as 9 row-major values. */
|
|
124
|
+
function det3x3(m) {
|
|
125
|
+
return m[0] * (m[4] * m[8] - m[5] * m[7]) - m[1] * (m[3] * m[8] - m[5] * m[6]) + m[2] * (m[3] * m[7] - m[4] * m[6]);
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Check if a 3x3 matrix is orthogonal (possibly with uniform scale).
|
|
129
|
+
* M is orthogonal-with-scale if M^T * M = s^2 * I for some scalar s.
|
|
130
|
+
*/
|
|
131
|
+
function isOrthogonalMatrix(m) {
|
|
132
|
+
const TOL = 1e-8;
|
|
133
|
+
const d00 = m[0] * m[0] + m[3] * m[3] + m[6] * m[6];
|
|
134
|
+
const d11 = m[1] * m[1] + m[4] * m[4] + m[7] * m[7];
|
|
135
|
+
const d22 = m[2] * m[2] + m[5] * m[5] + m[8] * m[8];
|
|
136
|
+
const d01 = m[0] * m[1] + m[3] * m[4] + m[6] * m[7];
|
|
137
|
+
const d02 = m[0] * m[2] + m[3] * m[5] + m[6] * m[8];
|
|
138
|
+
const d12 = m[1] * m[2] + m[4] * m[5] + m[7] * m[8];
|
|
139
|
+
if (Math.abs(d01) > TOL) return false;
|
|
140
|
+
if (Math.abs(d02) > TOL) return false;
|
|
141
|
+
if (Math.abs(d12) > TOL) return false;
|
|
142
|
+
if (Math.abs(d00 - d11) > TOL) return false;
|
|
143
|
+
if (Math.abs(d00 - d22) > TOL) return false;
|
|
144
|
+
return true;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Apply a 4x4 affine transformation matrix to a shape.
|
|
148
|
+
* Equivalent to OpenSCAD's `multmatrix`.
|
|
149
|
+
*
|
|
150
|
+
* Uses the fast `kernel transform` path for orthogonal matrices (rotation, uniform scale, mirror)
|
|
151
|
+
* and the general `gp_GTrsf` path for non-orthogonal transforms (shear, non-uniform scale).
|
|
152
|
+
*/
|
|
153
|
+
function applyMatrix(shape, matrix) {
|
|
154
|
+
const parsed = parseMatrixInput(matrix);
|
|
155
|
+
if (!parsed.ok) return parsed;
|
|
156
|
+
const { linear, translation } = parsed.value;
|
|
157
|
+
const d = det3x3(linear);
|
|
158
|
+
if (Math.abs(d) < 1e-12) return err(validationError(BrepErrorCode.VALIDATION_FAILED, "applyMatrix: singular matrix (determinant ≈ 0). Cannot apply a non-invertible transform."));
|
|
159
|
+
if (isOrthogonalMatrix(linear)) {
|
|
160
|
+
const inputFaceHashes = collectInputFaceHashes([shape]);
|
|
161
|
+
const { shape: resultShape, evolution } = getKernel().generalTransformWithHistory(shape.wrapped, linear, translation, true, inputFaceHashes, HASH_CODE_MAX);
|
|
162
|
+
const result = castResultShape(resultShape);
|
|
163
|
+
propagateAllMetadata(evolution, [shape], result);
|
|
164
|
+
return ok(result);
|
|
165
|
+
}
|
|
166
|
+
const result = castResultShape(getKernel().generalTransformNonOrthogonal(shape.wrapped, linear, translation));
|
|
167
|
+
propagateMetadataByHash([shape], result);
|
|
168
|
+
return ok(result);
|
|
169
|
+
/* v8 ignore stop */
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Compose multiple translate/rotate operations into a single kernel transform.
|
|
173
|
+
* Operations are applied in order (first element applied first).
|
|
174
|
+
* Call `.cleanup()` on the result when done to free the kernel object.
|
|
175
|
+
*/
|
|
176
|
+
function composeTransforms(ops) {
|
|
177
|
+
const kernelOps = ops.map((op) => {
|
|
178
|
+
if (op.type === "translate") return {
|
|
179
|
+
type: "translate",
|
|
180
|
+
x: op.v[0],
|
|
181
|
+
y: op.v[1],
|
|
182
|
+
z: op.v[2]
|
|
183
|
+
};
|
|
184
|
+
return {
|
|
185
|
+
type: "rotate",
|
|
186
|
+
angle: op.angle,
|
|
187
|
+
axis: op.axis,
|
|
188
|
+
center: op.center
|
|
189
|
+
};
|
|
190
|
+
});
|
|
191
|
+
const { handle, dispose } = getKernel().composeTransform(kernelOps);
|
|
192
|
+
return {
|
|
193
|
+
trsf: handle,
|
|
194
|
+
cleanup: dispose
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Placement-only rigid move (translate / rotate) via the kernel's cheap location
|
|
199
|
+
* re-tag — an O(1) `TopLoc_Location` swap on occt-wasm ≥3.6.0, falling back to a
|
|
200
|
+
* copying transform on kernels without it. Unlike `translate` / `rotate` (which
|
|
201
|
+
* deep-copy through the history-tracking path), `locate` shares the source
|
|
202
|
+
* geometry and only re-tags its placement, then re-keys face metadata
|
|
203
|
+
* (tags/colors) onto the moved faces so it survives — the same metadata
|
|
204
|
+
* guarantee `translate` gives, at location-swap cost. For per-position placement
|
|
205
|
+
* of one cached cell (template instancing), this is the move without the copy.
|
|
206
|
+
*
|
|
207
|
+
* Accepts a single op or an ordered list (applied first-to-last, e.g. rotate
|
|
208
|
+
* then translate). Non-rigid ops (`scale`) aren't a placement and don't belong
|
|
209
|
+
* here — use `applyMatrix` for those.
|
|
210
|
+
*/
|
|
211
|
+
function locate(shape, placement) {
|
|
212
|
+
const { trsf, cleanup } = composeTransforms("type" in placement ? [placement] : placement);
|
|
213
|
+
let moved;
|
|
214
|
+
try {
|
|
215
|
+
moved = castResultShape(getKernel().locate(shape.wrapped, trsf));
|
|
216
|
+
} finally {
|
|
217
|
+
cleanup();
|
|
218
|
+
}
|
|
219
|
+
if (hasAnyMetadata(shape)) propagateMetadataThroughRelocation(shape, moved);
|
|
220
|
+
return moved;
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Clone a shape and apply a pre-composed transform in a single kernel operation.
|
|
224
|
+
* Much faster than separate clone() + translate() + rotate() calls.
|
|
225
|
+
*/
|
|
226
|
+
function transformCopy(shape, composed) {
|
|
227
|
+
const inputFaceHashes = collectInputFaceHashes([shape]);
|
|
228
|
+
const { shape: resultShape, evolution } = getKernel().applyComposedTransformWithHistory(shape.wrapped, composed.trsf, inputFaceHashes, HASH_CODE_MAX);
|
|
229
|
+
const result = castResultShape(resultShape);
|
|
230
|
+
propagateAllMetadata(evolution, [shape], result);
|
|
231
|
+
return result;
|
|
232
|
+
}
|
|
233
|
+
//#endregion
|
|
234
|
+
//#region src/topology/primitiveFns.ts
|
|
235
|
+
/**
|
|
236
|
+
* Create a box with the given dimensions.
|
|
237
|
+
*
|
|
238
|
+
* @param width - Size along X.
|
|
239
|
+
* @param depth - Size along Y.
|
|
240
|
+
* @param height - Size along Z.
|
|
241
|
+
*/
|
|
242
|
+
function box(width, depth, height, options) {
|
|
243
|
+
const solid = createSolid(getKernel().makeBox(width, depth, height));
|
|
244
|
+
const center = options?.at ?? (options?.centered ? [
|
|
245
|
+
0,
|
|
246
|
+
0,
|
|
247
|
+
0
|
|
248
|
+
] : void 0);
|
|
249
|
+
if (center) try {
|
|
250
|
+
var _usingCtx$1 = _usingCtx();
|
|
251
|
+
return translate(_usingCtx$1.u(solid), [
|
|
252
|
+
center[0] - width / 2,
|
|
253
|
+
center[1] - depth / 2,
|
|
254
|
+
center[2] - height / 2
|
|
255
|
+
]);
|
|
256
|
+
} catch (_) {
|
|
257
|
+
_usingCtx$1.e = _;
|
|
258
|
+
} finally {
|
|
259
|
+
_usingCtx$1.d();
|
|
260
|
+
}
|
|
261
|
+
return solid;
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Create a cylinder with the given radius and height.
|
|
265
|
+
*/
|
|
266
|
+
function cylinder(radius, height, options) {
|
|
267
|
+
const at = options?.at ?? [
|
|
268
|
+
0,
|
|
269
|
+
0,
|
|
270
|
+
0
|
|
271
|
+
];
|
|
272
|
+
const axis = options?.axis ?? [
|
|
273
|
+
0,
|
|
274
|
+
0,
|
|
275
|
+
1
|
|
276
|
+
];
|
|
277
|
+
const solid = makeCylinder(radius, height, at, axis);
|
|
278
|
+
if (options?.centered) try {
|
|
279
|
+
var _usingCtx3 = _usingCtx();
|
|
280
|
+
const halfShift = [
|
|
281
|
+
-axis[0] * height * .5,
|
|
282
|
+
-axis[1] * height * .5,
|
|
283
|
+
-axis[2] * height * .5
|
|
284
|
+
];
|
|
285
|
+
return translate(_usingCtx3.u(solid), halfShift);
|
|
286
|
+
} catch (_) {
|
|
287
|
+
_usingCtx3.e = _;
|
|
288
|
+
} finally {
|
|
289
|
+
_usingCtx3.d();
|
|
290
|
+
}
|
|
291
|
+
return solid;
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* Create a sphere with the given radius.
|
|
295
|
+
*/
|
|
296
|
+
function sphere(radius, options) {
|
|
297
|
+
const solid = makeSphere(radius);
|
|
298
|
+
if (options?.at) try {
|
|
299
|
+
var _usingCtx4 = _usingCtx();
|
|
300
|
+
return translate(_usingCtx4.u(solid), options.at);
|
|
301
|
+
} catch (_) {
|
|
302
|
+
_usingCtx4.e = _;
|
|
303
|
+
} finally {
|
|
304
|
+
_usingCtx4.d();
|
|
305
|
+
}
|
|
306
|
+
return solid;
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* Create a cone (or frustum) with the given radii and height.
|
|
310
|
+
*
|
|
311
|
+
* @param bottomRadius - Radius at the base.
|
|
312
|
+
* @param topRadius - Radius at the top (0 for a full cone).
|
|
313
|
+
* @param height - Height of the cone.
|
|
314
|
+
*/
|
|
315
|
+
function cone(bottomRadius, topRadius, height, options) {
|
|
316
|
+
const at = options?.at ?? [
|
|
317
|
+
0,
|
|
318
|
+
0,
|
|
319
|
+
0
|
|
320
|
+
];
|
|
321
|
+
const axis = options?.axis ?? [
|
|
322
|
+
0,
|
|
323
|
+
0,
|
|
324
|
+
1
|
|
325
|
+
];
|
|
326
|
+
const solid = makeCone(bottomRadius, topRadius, height, at, axis);
|
|
327
|
+
if (options?.centered) try {
|
|
328
|
+
var _usingCtx5 = _usingCtx();
|
|
329
|
+
const halfShift = [
|
|
330
|
+
-axis[0] * height * .5,
|
|
331
|
+
-axis[1] * height * .5,
|
|
332
|
+
-axis[2] * height * .5
|
|
333
|
+
];
|
|
334
|
+
return translate(_usingCtx5.u(solid), halfShift);
|
|
335
|
+
} catch (_) {
|
|
336
|
+
_usingCtx5.e = _;
|
|
337
|
+
} finally {
|
|
338
|
+
_usingCtx5.d();
|
|
339
|
+
}
|
|
340
|
+
return solid;
|
|
341
|
+
}
|
|
342
|
+
/**
|
|
343
|
+
* Create a torus with the given major and minor radii.
|
|
344
|
+
*/
|
|
345
|
+
function torus(majorRadius, minorRadius, options) {
|
|
346
|
+
return makeTorus(majorRadius, minorRadius, options?.at ?? [
|
|
347
|
+
0,
|
|
348
|
+
0,
|
|
349
|
+
0
|
|
350
|
+
], options?.axis ?? [
|
|
351
|
+
0,
|
|
352
|
+
0,
|
|
353
|
+
1
|
|
354
|
+
]);
|
|
355
|
+
}
|
|
356
|
+
/**
|
|
357
|
+
* Create an ellipsoid with the given axis half-lengths.
|
|
358
|
+
*
|
|
359
|
+
* @param rx - Half-length along X.
|
|
360
|
+
* @param ry - Half-length along Y.
|
|
361
|
+
* @param rz - Half-length along Z.
|
|
362
|
+
*/
|
|
363
|
+
function ellipsoid(rx, ry, rz, options) {
|
|
364
|
+
const solid = makeEllipsoid(rx, ry, rz);
|
|
365
|
+
if (options?.at) try {
|
|
366
|
+
var _usingCtx6 = _usingCtx();
|
|
367
|
+
return translate(_usingCtx6.u(solid), options.at);
|
|
368
|
+
} catch (_) {
|
|
369
|
+
_usingCtx6.e = _;
|
|
370
|
+
} finally {
|
|
371
|
+
_usingCtx6.d();
|
|
372
|
+
}
|
|
373
|
+
return solid;
|
|
374
|
+
}
|
|
375
|
+
/** Create a straight edge between two 3D points. */
|
|
376
|
+
function line(from, to) {
|
|
377
|
+
return makeLine(from, to);
|
|
378
|
+
}
|
|
379
|
+
/** Create a circular edge with the given radius. */
|
|
380
|
+
function circle(radius, options) {
|
|
381
|
+
const axisDir = options?.axis ?? [
|
|
382
|
+
0,
|
|
383
|
+
0,
|
|
384
|
+
1
|
|
385
|
+
];
|
|
386
|
+
return makeCircle(radius, options?.at ?? [
|
|
387
|
+
0,
|
|
388
|
+
0,
|
|
389
|
+
0
|
|
390
|
+
], axisDir);
|
|
391
|
+
}
|
|
392
|
+
/**
|
|
393
|
+
* Create an elliptical edge.
|
|
394
|
+
*
|
|
395
|
+
* @returns An error if `minorRadius` exceeds `majorRadius`.
|
|
396
|
+
*/
|
|
397
|
+
function ellipse(majorRadius, minorRadius, options) {
|
|
398
|
+
const axisDir = options?.axis ?? [
|
|
399
|
+
0,
|
|
400
|
+
0,
|
|
401
|
+
1
|
|
402
|
+
];
|
|
403
|
+
return makeEllipse(majorRadius, minorRadius, options?.at ?? [
|
|
404
|
+
0,
|
|
405
|
+
0,
|
|
406
|
+
0
|
|
407
|
+
], axisDir, options?.xDir);
|
|
408
|
+
}
|
|
409
|
+
/**
|
|
410
|
+
* Create a helical wire.
|
|
411
|
+
*
|
|
412
|
+
* @param pitch - Vertical distance per full turn.
|
|
413
|
+
* @param height - Total height.
|
|
414
|
+
* @param radius - Helix radius.
|
|
415
|
+
*/
|
|
416
|
+
function helix(pitch, height, radius, options) {
|
|
417
|
+
return makeHelix(pitch, height, radius, options?.at ?? [
|
|
418
|
+
0,
|
|
419
|
+
0,
|
|
420
|
+
0
|
|
421
|
+
], options?.axis ?? [
|
|
422
|
+
0,
|
|
423
|
+
0,
|
|
424
|
+
1
|
|
425
|
+
], options?.lefthand ?? false);
|
|
426
|
+
}
|
|
427
|
+
/** Create a circular arc edge passing through three points. */
|
|
428
|
+
function threePointArc(p1, p2, p3) {
|
|
429
|
+
return makeThreePointArc(p1, p2, p3);
|
|
430
|
+
}
|
|
431
|
+
/**
|
|
432
|
+
* Create an elliptical arc edge between two angles.
|
|
433
|
+
*
|
|
434
|
+
* All angles are in **degrees** (unlike the legacy `makeEllipseArc` which used radians).
|
|
435
|
+
*
|
|
436
|
+
* @param startAngle - Start angle in degrees.
|
|
437
|
+
* @param endAngle - End angle in degrees.
|
|
438
|
+
*/
|
|
439
|
+
function ellipseArc(majorRadius, minorRadius, startAngle, endAngle, options) {
|
|
440
|
+
const axisDir = options?.axis ?? [
|
|
441
|
+
0,
|
|
442
|
+
0,
|
|
443
|
+
1
|
|
444
|
+
];
|
|
445
|
+
return makeEllipseArc(majorRadius, minorRadius, startAngle * DEG2RAD, endAngle * DEG2RAD, options?.at ?? [
|
|
446
|
+
0,
|
|
447
|
+
0,
|
|
448
|
+
0
|
|
449
|
+
], axisDir, options?.xDir);
|
|
450
|
+
}
|
|
451
|
+
/**
|
|
452
|
+
* Create a B-spline edge that approximates a set of 3D points.
|
|
453
|
+
*
|
|
454
|
+
* @returns An error if the approximation algorithm fails.
|
|
455
|
+
*/
|
|
456
|
+
function bsplineApprox(points, config) {
|
|
457
|
+
return makeBSplineApproximation(points, config);
|
|
458
|
+
}
|
|
459
|
+
/**
|
|
460
|
+
* Create a Bezier curve edge from control points.
|
|
461
|
+
*
|
|
462
|
+
* @param points - Two or more control points.
|
|
463
|
+
*/
|
|
464
|
+
function bezier(points) {
|
|
465
|
+
return makeBezierCurve(points);
|
|
466
|
+
}
|
|
467
|
+
/**
|
|
468
|
+
* Create a circular arc edge tangent to a direction at the start point.
|
|
469
|
+
*/
|
|
470
|
+
function tangentArc(startPoint, startTgt, endPoint) {
|
|
471
|
+
return makeTangentArc(startPoint, startTgt, endPoint);
|
|
472
|
+
}
|
|
473
|
+
/**
|
|
474
|
+
* Assemble edges and/or wires into a single connected wire.
|
|
475
|
+
*/
|
|
476
|
+
function wire(listOfEdges) {
|
|
477
|
+
return assembleWire(listOfEdges);
|
|
478
|
+
}
|
|
479
|
+
/**
|
|
480
|
+
* Assemble edges into a wire and verify it forms a closed loop.
|
|
481
|
+
*
|
|
482
|
+
* Combines {@link wire} + the `closedWire` smart constructor in a single step.
|
|
483
|
+
* Returns an error if the edges cannot be assembled or the wire is not closed.
|
|
484
|
+
*
|
|
485
|
+
* @example
|
|
486
|
+
* ```ts
|
|
487
|
+
* const cw = unwrap(wireLoop([e1, e2, e3, e4]));
|
|
488
|
+
* const f = unwrap(face(cw)); // ClosedWire accepted directly
|
|
489
|
+
* ```
|
|
490
|
+
*/
|
|
491
|
+
function wireLoop(listOfEdges) {
|
|
492
|
+
return andThen(assembleWire(listOfEdges), (w) => {
|
|
493
|
+
if (isClosedWire(w)) return ok(w);
|
|
494
|
+
return err(validationError("WIRE_NOT_CLOSED", "Assembled wire is not closed: start and end points do not coincide"));
|
|
495
|
+
});
|
|
496
|
+
}
|
|
497
|
+
/**
|
|
498
|
+
* Create a planar face from a closed wire, optionally with holes.
|
|
499
|
+
* The resulting face is always oriented (consistent normal direction).
|
|
500
|
+
*/
|
|
501
|
+
function face(w, holes) {
|
|
502
|
+
return makeFace(w, holes);
|
|
503
|
+
}
|
|
504
|
+
/**
|
|
505
|
+
* Create a non-planar face from a wire using surface filling.
|
|
506
|
+
* The resulting face is always oriented.
|
|
507
|
+
*/
|
|
508
|
+
function filledFace(w) {
|
|
509
|
+
return makeNonPlanarFace(w);
|
|
510
|
+
}
|
|
511
|
+
/**
|
|
512
|
+
* Create a face bounded by a wire on an existing face's surface.
|
|
513
|
+
* The resulting face inherits orientation from the origin face.
|
|
514
|
+
*/
|
|
515
|
+
function subFace(originFace, w) {
|
|
516
|
+
return makeNewFaceWithinFace(originFace, w);
|
|
517
|
+
}
|
|
518
|
+
/**
|
|
519
|
+
* Create a polygonal face from three or more coplanar points.
|
|
520
|
+
* The resulting face is always oriented.
|
|
521
|
+
*/
|
|
522
|
+
function polygon(points) {
|
|
523
|
+
return makePolygon(points);
|
|
524
|
+
}
|
|
525
|
+
/** Create a vertex at a 3D point. */
|
|
526
|
+
function vertex(point) {
|
|
527
|
+
return makeVertex(point);
|
|
528
|
+
}
|
|
529
|
+
/**
|
|
530
|
+
* Build a compound from multiple shapes.
|
|
531
|
+
*/
|
|
532
|
+
function compound(shapeArray) {
|
|
533
|
+
return makeCompound(shapeArray);
|
|
534
|
+
}
|
|
535
|
+
/**
|
|
536
|
+
* Weld faces and shells into a single solid.
|
|
537
|
+
* The resulting solid is always validated.
|
|
538
|
+
*/
|
|
539
|
+
function solid(facesOrShells) {
|
|
540
|
+
return makeSolid(facesOrShells);
|
|
541
|
+
}
|
|
542
|
+
/**
|
|
543
|
+
* Create an offset shape from a face.
|
|
544
|
+
*/
|
|
545
|
+
function offsetFace(f, distance, tolerance) {
|
|
546
|
+
return makeOffset(f, distance, tolerance);
|
|
547
|
+
}
|
|
548
|
+
/**
|
|
549
|
+
* Weld faces and shells into a single shell.
|
|
550
|
+
*/
|
|
551
|
+
function sewShells(facesOrShells, ignoreType) {
|
|
552
|
+
return weldShellsAndFaces(facesOrShells, ignoreType);
|
|
553
|
+
}
|
|
554
|
+
function addHoles(f, holes) {
|
|
555
|
+
return addHolesInFace(f, holes);
|
|
556
|
+
}
|
|
557
|
+
//#endregion
|
|
558
|
+
export { locate as A, threePointArc as C, wireLoop as D, wire as E, transformCopy as F, translate as I, resize as M, rotate as N, applyMatrix as O, scale as P, tangentArc as S, vertex as T, polygon as _, circle as a, sphere as b, cylinder as c, ellipsoid as d, face as f, offsetFace as g, line as h, bsplineApprox as i, mirror as j, composeTransforms as k, ellipse as l, helix as m, bezier as n, compound as o, filledFace as p, box as r, cone as s, addHoles as t, ellipseArc as u, sewShells as v, torus as w, subFace as x, solid as y };
|
package/dist/projection.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_cameraFns = require("./cameraFns-
|
|
2
|
+
const require_cameraFns = require("./cameraFns-2-haLzLi.cjs");
|
|
3
3
|
exports.PROJECTION_PLANES = require_cameraFns.PROJECTION_PLANES;
|
|
4
4
|
exports.cameraFromPlane = require_cameraFns.cameraFromPlane;
|
|
5
5
|
exports.cameraLookAt = require_cameraFns.cameraLookAt;
|
package/dist/projection.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as makeProjectedEdges, i as projectEdges, n as cameraLookAt, o as PROJECTION_PLANES, r as createCamera, s as isProjectionPlane, t as cameraFromPlane } from "./cameraFns-
|
|
1
|
+
import { a as makeProjectedEdges, i as projectEdges, n as cameraLookAt, o as PROJECTION_PLANES, r as createCamera, s as isProjectionPlane, t as cameraFromPlane } from "./cameraFns-CG_J66Hl.js";
|
|
2
2
|
export { PROJECTION_PLANES, cameraFromPlane, cameraLookAt, createCamera, isProjectionPlane, makeProjectedEdges, projectEdges };
|
package/dist/query.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_helpers = require("./helpers-
|
|
3
|
-
const require_cornerFinder = require("./cornerFinder-
|
|
2
|
+
const require_helpers = require("./helpers-BfkBvokP.cjs");
|
|
3
|
+
const require_cornerFinder = require("./cornerFinder-mfsUMi5g.cjs");
|
|
4
4
|
exports.cornerFinder = require_cornerFinder.cornerFinder;
|
|
5
5
|
exports.edgeFinder = require_helpers.edgeFinder;
|
|
6
6
|
exports.faceFinder = require_helpers.faceFinder;
|
package/dist/query.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-
|
|
2
|
-
import { t as cornerFinder } from "./cornerFinder-
|
|
1
|
+
import { n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-Du_OdHuy.js";
|
|
2
|
+
import { t as cornerFinder } from "./cornerFinder-CPFM7bA0.js";
|
|
3
3
|
export { cornerFinder, edgeFinder, faceFinder, getSingleFace };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { C as vertexPosition, c as getFaces } from "./topologyQueryFns-
|
|
3
|
-
import { i as faceGeomType, l as normalAt, r as faceCenter } from "./faceFns-
|
|
4
|
-
import { n as getHashCode } from "./shapeFns-
|
|
5
|
-
import { n as measureArea, s as measureLength } from "./measureFns-
|
|
6
|
-
import { a as facesOfVertex, c as verticesOfFace, i as facesOfEdge, o as sharedEdges, s as verticesOfEdge, t as adjacentFaceHashes } from "./adjacencyFns-
|
|
1
|
+
import { K as getKernel, g as disposeTransientSubShape, o as castShapeWithKnownType } from "./shapeTypes-t49f64Dx.js";
|
|
2
|
+
import { C as vertexPosition, c as getFaces } from "./topologyQueryFns-BkQ6Q7gN.js";
|
|
3
|
+
import { i as faceGeomType, l as normalAt, r as faceCenter } from "./faceFns-DJj9Nb6T.js";
|
|
4
|
+
import { n as getHashCode } from "./shapeFns-BTFx-os7.js";
|
|
5
|
+
import { n as measureArea, s as measureLength } from "./measureFns-CMnbcUZC.js";
|
|
6
|
+
import { a as facesOfVertex, c as verticesOfFace, i as facesOfEdge, o as sharedEdges, s as verticesOfEdge, t as adjacentFaceHashes } from "./adjacencyFns-DLityMyV.js";
|
|
7
7
|
//#region src/topology/shapeRef/scoring.ts
|
|
8
8
|
/**
|
|
9
9
|
* Default face scorer combining surface type, normal alignment, centroid proximity,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
-
const require_faceFns = require("./faceFns-
|
|
4
|
-
const require_shapeFns = require("./shapeFns-
|
|
5
|
-
const require_measureFns = require("./measureFns-
|
|
6
|
-
const require_adjacencyFns = require("./adjacencyFns-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-CkcIL7zv.cjs");
|
|
2
|
+
const require_topologyQueryFns = require("./topologyQueryFns-Bia7o8l_.cjs");
|
|
3
|
+
const require_faceFns = require("./faceFns-BK4r7Dxk.cjs");
|
|
4
|
+
const require_shapeFns = require("./shapeFns-D_5TgiUi.cjs");
|
|
5
|
+
const require_measureFns = require("./measureFns-CJGrmhHT.cjs");
|
|
6
|
+
const require_adjacencyFns = require("./adjacencyFns-DSxuQYnb.cjs");
|
|
7
7
|
//#region src/topology/shapeRef/scoring.ts
|
|
8
8
|
/**
|
|
9
9
|
* Default face scorer combining surface type, normal alignment, centroid proximity,
|
package/dist/result.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_bug = require("./bug-O02CsAmt.cjs");
|
|
3
|
-
const require_errors = require("./errors-
|
|
3
|
+
const require_errors = require("./errors-RHkKO5bZ.cjs");
|
|
4
4
|
exports.BrepBugError = require_bug.BrepBugError;
|
|
5
5
|
exports.BrepErrorCode = require_errors.BrepErrorCode;
|
|
6
6
|
exports.OK = require_errors.OK;
|
package/dist/result.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { n as bug, t as BrepBugError } from "./bug-BdOHwn_e.js";
|
|
2
|
-
import {
|
|
2
|
+
import { E as ok, F as unwrapErr, I as unwrapOr, L as unwrapOrElse, M as tryCatch, N as tryCatchAsync, P as unwrap, S as map, T as match, _ as flatMap, a as moduleInitError, b as isErr, c as sketcherStateError, d as validationError, f as OK, g as err, h as collect, i as kernelError, k as pipeline, l as typeCastError, m as andThen, n as computationError, o as queryError, r as ioError, t as BrepErrorCode, w as mapErr, x as isOk } from "./errors-MHLiNE-C.js";
|
|
3
3
|
export { BrepBugError, BrepErrorCode, OK, andThen, bug, collect, computationError, err, flatMap, ioError, isErr, isOk, kernelError, map, mapErr, match, moduleInitError, ok, pipeline, queryError, sketcherStateError, tryCatch, tryCatchAsync, typeCastError, unwrap, unwrapErr, unwrapOr, unwrapOrElse, validationError };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __exportAll = (all, no_symbols) => {
|
|
9
|
+
let target = {};
|
|
10
|
+
for (var name in all) __defProp(target, name, {
|
|
11
|
+
get: all[name],
|
|
12
|
+
enumerable: true
|
|
13
|
+
});
|
|
14
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
15
|
+
return target;
|
|
16
|
+
};
|
|
17
|
+
var __copyProps = (to, from, except, desc) => {
|
|
18
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
19
|
+
key = keys[i];
|
|
20
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
21
|
+
get: ((k) => from[k]).bind(null, key),
|
|
22
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
return to;
|
|
26
|
+
};
|
|
27
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
28
|
+
value: mod,
|
|
29
|
+
enumerable: true
|
|
30
|
+
}) : target, mod));
|
|
31
|
+
//#endregion
|
|
32
|
+
Object.defineProperty(exports, "__exportAll", {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function() {
|
|
35
|
+
return __exportAll;
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
Object.defineProperty(exports, "__toESM", {
|
|
39
|
+
enumerable: true,
|
|
40
|
+
get: function() {
|
|
41
|
+
return __toESM;
|
|
42
|
+
}
|
|
43
|
+
});
|