brepjs 18.119.2 → 18.119.4
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/blueprints/blueprints.d.ts +3 -0
- package/dist/2d/blueprints/compoundBlueprint.d.ts +3 -0
- package/dist/2d/blueprints/lib.d.ts +6 -0
- 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-DJJo8WkI.js → blueprint-DEMSX-hc.js} +37 -10
- package/dist/{blueprint-DTNT4qYJ.cjs → blueprint-DUnNPwQL.cjs} +43 -10
- package/dist/{blueprintFns-CcpboZ80.js → blueprintFns-DSj4RTjU.js} +9 -4
- package/dist/{blueprintFns-2XDZfCxX.cjs → blueprintFns-Dg8V99O9.cjs} +9 -4
- package/dist/{blueprintSketcher-DDPyypmC.js → blueprintSketcher-gMuUUPb-.js} +185 -54
- package/dist/{blueprintSketcher-C0EXFVb2.cjs → blueprintSketcher-gXVPrPlj.cjs} +192 -61
- package/dist/{boolean2D-Ddfo_dd0.cjs → boolean2D-BpmxQ1AH.cjs} +5 -5
- package/dist/{boolean2D-C_PVz8xT.js → boolean2D-DKT0BgZs.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-CI6CpqO8.cjs} +35 -16
- package/dist/{drawFns-B9HbtAoc.js → drawFns-CrfBz_wj.js} +35 -16
- 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-DqxAZFb-.js} +3 -3
- package/dist/{importFns-DS4J1xLv.cjs → importFns-pr-r5qiV.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/drawing.d.ts +9 -1
- 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-BY0FEg59.cjs} +138 -51
- package/dist/{textBlueprints-igbNvKcd.js → textBlueprints-ZzYg3XTS.js} +116 -11
- package/dist/{textMetrics-CJvtpbc3.js → textMetrics-Diakbtem.js} +2 -2
- package/dist/{textMetrics-08fF0QNf.cjs → textMetrics-f5yXR4OG.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,773 @@
|
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-CkcIL7zv.cjs");
|
|
2
|
+
const require_errors = require("./errors-RHkKO5bZ.cjs");
|
|
3
|
+
const require_validityTypes = require("./validityTypes-ZGMVlv7b.cjs");
|
|
4
|
+
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
5
|
+
const require_solidBuilders = require("./solidBuilders-IiIzjKAr.cjs");
|
|
6
|
+
const require_surfaceBuilders = require("./surfaceBuilders-Biqx51el.cjs");
|
|
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 = require_solidBuilders.collectInputFaceHashes([shape]);
|
|
15
|
+
const { shape: resultShape, evolution } = require_shapeTypes.getKernel().translateWithHistory(shape.wrapped, v[0], v[1], v[2], inputFaceHashes, require_constants.HASH_CODE_MAX);
|
|
16
|
+
const result = require_shapeTypes.castResultShape(resultShape);
|
|
17
|
+
require_solidBuilders.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 = require_solidBuilders.collectInputFaceHashes([shape]);
|
|
31
|
+
const { shape: resultShape, evolution } = require_shapeTypes.getKernel().rotateWithHistory(shape.wrapped, angle * require_constants.DEG2RAD, inputFaceHashes, require_constants.HASH_CODE_MAX, direction, position);
|
|
32
|
+
const result = require_shapeTypes.castResultShape(resultShape);
|
|
33
|
+
require_solidBuilders.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 = require_solidBuilders.collectInputFaceHashes([shape]);
|
|
47
|
+
const { shape: resultShape, evolution } = require_shapeTypes.getKernel().mirrorWithHistory(shape.wrapped, planeOrigin, planeNormal, inputFaceHashes, require_constants.HASH_CODE_MAX);
|
|
48
|
+
const result = require_shapeTypes.castResultShape(resultShape);
|
|
49
|
+
require_solidBuilders.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 = require_solidBuilders.collectInputFaceHashes([shape]);
|
|
59
|
+
const { shape: resultShape, evolution } = require_shapeTypes.getKernel().scaleWithHistory(shape.wrapped, center, factor, inputFaceHashes, require_constants.HASH_CODE_MAX);
|
|
60
|
+
const result = require_shapeTypes.castResultShape(resultShape);
|
|
61
|
+
require_solidBuilders.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 = require_shapeTypes.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 require_errors.err(require_errors.validationError(require_errors.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 require_errors.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 require_errors.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 require_errors.err(require_errors.validationError(require_errors.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 require_errors.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 require_errors.err(require_errors.validationError(require_errors.BrepErrorCode.VALIDATION_FAILED, "applyMatrix: singular matrix (determinant ≈ 0). Cannot apply a non-invertible transform."));
|
|
159
|
+
if (isOrthogonalMatrix(linear)) {
|
|
160
|
+
const inputFaceHashes = require_solidBuilders.collectInputFaceHashes([shape]);
|
|
161
|
+
const { shape: resultShape, evolution } = require_shapeTypes.getKernel().generalTransformWithHistory(shape.wrapped, linear, translation, true, inputFaceHashes, require_constants.HASH_CODE_MAX);
|
|
162
|
+
const result = require_shapeTypes.castResultShape(resultShape);
|
|
163
|
+
require_solidBuilders.propagateAllMetadata(evolution, [shape], result);
|
|
164
|
+
return require_errors.ok(result);
|
|
165
|
+
}
|
|
166
|
+
const result = require_shapeTypes.castResultShape(require_shapeTypes.getKernel().generalTransformNonOrthogonal(shape.wrapped, linear, translation));
|
|
167
|
+
require_solidBuilders.propagateMetadataByHash([shape], result);
|
|
168
|
+
return require_errors.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 } = require_shapeTypes.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 = require_shapeTypes.castResultShape(require_shapeTypes.getKernel().locate(shape.wrapped, trsf));
|
|
216
|
+
} finally {
|
|
217
|
+
cleanup();
|
|
218
|
+
}
|
|
219
|
+
if (require_solidBuilders.hasAnyMetadata(shape)) require_solidBuilders.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 = require_solidBuilders.collectInputFaceHashes([shape]);
|
|
228
|
+
const { shape: resultShape, evolution } = require_shapeTypes.getKernel().applyComposedTransformWithHistory(shape.wrapped, composed.trsf, inputFaceHashes, require_constants.HASH_CODE_MAX);
|
|
229
|
+
const result = require_shapeTypes.castResultShape(resultShape);
|
|
230
|
+
require_solidBuilders.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 = require_shapeTypes.createSolid(require_shapeTypes.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 = require_shapeTypes._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 = require_solidBuilders.makeCylinder(radius, height, at, axis);
|
|
278
|
+
if (options?.centered) try {
|
|
279
|
+
var _usingCtx3 = require_shapeTypes._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 = require_solidBuilders.makeSphere(radius);
|
|
298
|
+
if (options?.at) try {
|
|
299
|
+
var _usingCtx4 = require_shapeTypes._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 = require_solidBuilders.makeCone(bottomRadius, topRadius, height, at, axis);
|
|
327
|
+
if (options?.centered) try {
|
|
328
|
+
var _usingCtx5 = require_shapeTypes._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 require_solidBuilders.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 = require_solidBuilders.makeEllipsoid(rx, ry, rz);
|
|
365
|
+
if (options?.at) try {
|
|
366
|
+
var _usingCtx6 = require_shapeTypes._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 require_surfaceBuilders.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 require_surfaceBuilders.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 require_surfaceBuilders.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 require_surfaceBuilders.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 require_surfaceBuilders.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 require_surfaceBuilders.makeEllipseArc(majorRadius, minorRadius, startAngle * require_constants.DEG2RAD, endAngle * require_constants.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 require_surfaceBuilders.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 require_surfaceBuilders.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 require_surfaceBuilders.makeTangentArc(startPoint, startTgt, endPoint);
|
|
472
|
+
}
|
|
473
|
+
/**
|
|
474
|
+
* Assemble edges and/or wires into a single connected wire.
|
|
475
|
+
*/
|
|
476
|
+
function wire(listOfEdges) {
|
|
477
|
+
return require_surfaceBuilders.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 require_errors.andThen(require_surfaceBuilders.assembleWire(listOfEdges), (w) => {
|
|
493
|
+
if (require_validityTypes.isClosedWire(w)) return require_errors.ok(w);
|
|
494
|
+
return require_errors.err(require_errors.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 require_surfaceBuilders.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 require_surfaceBuilders.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 require_surfaceBuilders.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 require_surfaceBuilders.makePolygon(points);
|
|
524
|
+
}
|
|
525
|
+
/** Create a vertex at a 3D point. */
|
|
526
|
+
function vertex(point) {
|
|
527
|
+
return require_solidBuilders.makeVertex(point);
|
|
528
|
+
}
|
|
529
|
+
/**
|
|
530
|
+
* Build a compound from multiple shapes.
|
|
531
|
+
*/
|
|
532
|
+
function compound(shapeArray) {
|
|
533
|
+
return require_solidBuilders.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 require_solidBuilders.makeSolid(facesOrShells);
|
|
541
|
+
}
|
|
542
|
+
/**
|
|
543
|
+
* Create an offset shape from a face.
|
|
544
|
+
*/
|
|
545
|
+
function offsetFace(f, distance, tolerance) {
|
|
546
|
+
return require_solidBuilders.makeOffset(f, distance, tolerance);
|
|
547
|
+
}
|
|
548
|
+
/**
|
|
549
|
+
* Weld faces and shells into a single shell.
|
|
550
|
+
*/
|
|
551
|
+
function sewShells(facesOrShells, ignoreType) {
|
|
552
|
+
return require_solidBuilders.weldShellsAndFaces(facesOrShells, ignoreType);
|
|
553
|
+
}
|
|
554
|
+
function addHoles(f, holes) {
|
|
555
|
+
return require_surfaceBuilders.addHolesInFace(f, holes);
|
|
556
|
+
}
|
|
557
|
+
//#endregion
|
|
558
|
+
Object.defineProperty(exports, "addHoles", {
|
|
559
|
+
enumerable: true,
|
|
560
|
+
get: function() {
|
|
561
|
+
return addHoles;
|
|
562
|
+
}
|
|
563
|
+
});
|
|
564
|
+
Object.defineProperty(exports, "applyMatrix", {
|
|
565
|
+
enumerable: true,
|
|
566
|
+
get: function() {
|
|
567
|
+
return applyMatrix;
|
|
568
|
+
}
|
|
569
|
+
});
|
|
570
|
+
Object.defineProperty(exports, "bezier", {
|
|
571
|
+
enumerable: true,
|
|
572
|
+
get: function() {
|
|
573
|
+
return bezier;
|
|
574
|
+
}
|
|
575
|
+
});
|
|
576
|
+
Object.defineProperty(exports, "box", {
|
|
577
|
+
enumerable: true,
|
|
578
|
+
get: function() {
|
|
579
|
+
return box;
|
|
580
|
+
}
|
|
581
|
+
});
|
|
582
|
+
Object.defineProperty(exports, "bsplineApprox", {
|
|
583
|
+
enumerable: true,
|
|
584
|
+
get: function() {
|
|
585
|
+
return bsplineApprox;
|
|
586
|
+
}
|
|
587
|
+
});
|
|
588
|
+
Object.defineProperty(exports, "circle", {
|
|
589
|
+
enumerable: true,
|
|
590
|
+
get: function() {
|
|
591
|
+
return circle;
|
|
592
|
+
}
|
|
593
|
+
});
|
|
594
|
+
Object.defineProperty(exports, "composeTransforms", {
|
|
595
|
+
enumerable: true,
|
|
596
|
+
get: function() {
|
|
597
|
+
return composeTransforms;
|
|
598
|
+
}
|
|
599
|
+
});
|
|
600
|
+
Object.defineProperty(exports, "compound", {
|
|
601
|
+
enumerable: true,
|
|
602
|
+
get: function() {
|
|
603
|
+
return compound;
|
|
604
|
+
}
|
|
605
|
+
});
|
|
606
|
+
Object.defineProperty(exports, "cone", {
|
|
607
|
+
enumerable: true,
|
|
608
|
+
get: function() {
|
|
609
|
+
return cone;
|
|
610
|
+
}
|
|
611
|
+
});
|
|
612
|
+
Object.defineProperty(exports, "cylinder", {
|
|
613
|
+
enumerable: true,
|
|
614
|
+
get: function() {
|
|
615
|
+
return cylinder;
|
|
616
|
+
}
|
|
617
|
+
});
|
|
618
|
+
Object.defineProperty(exports, "ellipse", {
|
|
619
|
+
enumerable: true,
|
|
620
|
+
get: function() {
|
|
621
|
+
return ellipse;
|
|
622
|
+
}
|
|
623
|
+
});
|
|
624
|
+
Object.defineProperty(exports, "ellipseArc", {
|
|
625
|
+
enumerable: true,
|
|
626
|
+
get: function() {
|
|
627
|
+
return ellipseArc;
|
|
628
|
+
}
|
|
629
|
+
});
|
|
630
|
+
Object.defineProperty(exports, "ellipsoid", {
|
|
631
|
+
enumerable: true,
|
|
632
|
+
get: function() {
|
|
633
|
+
return ellipsoid;
|
|
634
|
+
}
|
|
635
|
+
});
|
|
636
|
+
Object.defineProperty(exports, "face", {
|
|
637
|
+
enumerable: true,
|
|
638
|
+
get: function() {
|
|
639
|
+
return face;
|
|
640
|
+
}
|
|
641
|
+
});
|
|
642
|
+
Object.defineProperty(exports, "filledFace", {
|
|
643
|
+
enumerable: true,
|
|
644
|
+
get: function() {
|
|
645
|
+
return filledFace;
|
|
646
|
+
}
|
|
647
|
+
});
|
|
648
|
+
Object.defineProperty(exports, "helix", {
|
|
649
|
+
enumerable: true,
|
|
650
|
+
get: function() {
|
|
651
|
+
return helix;
|
|
652
|
+
}
|
|
653
|
+
});
|
|
654
|
+
Object.defineProperty(exports, "line", {
|
|
655
|
+
enumerable: true,
|
|
656
|
+
get: function() {
|
|
657
|
+
return line;
|
|
658
|
+
}
|
|
659
|
+
});
|
|
660
|
+
Object.defineProperty(exports, "locate", {
|
|
661
|
+
enumerable: true,
|
|
662
|
+
get: function() {
|
|
663
|
+
return locate;
|
|
664
|
+
}
|
|
665
|
+
});
|
|
666
|
+
Object.defineProperty(exports, "mirror", {
|
|
667
|
+
enumerable: true,
|
|
668
|
+
get: function() {
|
|
669
|
+
return mirror;
|
|
670
|
+
}
|
|
671
|
+
});
|
|
672
|
+
Object.defineProperty(exports, "offsetFace", {
|
|
673
|
+
enumerable: true,
|
|
674
|
+
get: function() {
|
|
675
|
+
return offsetFace;
|
|
676
|
+
}
|
|
677
|
+
});
|
|
678
|
+
Object.defineProperty(exports, "polygon", {
|
|
679
|
+
enumerable: true,
|
|
680
|
+
get: function() {
|
|
681
|
+
return polygon;
|
|
682
|
+
}
|
|
683
|
+
});
|
|
684
|
+
Object.defineProperty(exports, "resize", {
|
|
685
|
+
enumerable: true,
|
|
686
|
+
get: function() {
|
|
687
|
+
return resize;
|
|
688
|
+
}
|
|
689
|
+
});
|
|
690
|
+
Object.defineProperty(exports, "rotate", {
|
|
691
|
+
enumerable: true,
|
|
692
|
+
get: function() {
|
|
693
|
+
return rotate;
|
|
694
|
+
}
|
|
695
|
+
});
|
|
696
|
+
Object.defineProperty(exports, "scale", {
|
|
697
|
+
enumerable: true,
|
|
698
|
+
get: function() {
|
|
699
|
+
return scale;
|
|
700
|
+
}
|
|
701
|
+
});
|
|
702
|
+
Object.defineProperty(exports, "sewShells", {
|
|
703
|
+
enumerable: true,
|
|
704
|
+
get: function() {
|
|
705
|
+
return sewShells;
|
|
706
|
+
}
|
|
707
|
+
});
|
|
708
|
+
Object.defineProperty(exports, "solid", {
|
|
709
|
+
enumerable: true,
|
|
710
|
+
get: function() {
|
|
711
|
+
return solid;
|
|
712
|
+
}
|
|
713
|
+
});
|
|
714
|
+
Object.defineProperty(exports, "sphere", {
|
|
715
|
+
enumerable: true,
|
|
716
|
+
get: function() {
|
|
717
|
+
return sphere;
|
|
718
|
+
}
|
|
719
|
+
});
|
|
720
|
+
Object.defineProperty(exports, "subFace", {
|
|
721
|
+
enumerable: true,
|
|
722
|
+
get: function() {
|
|
723
|
+
return subFace;
|
|
724
|
+
}
|
|
725
|
+
});
|
|
726
|
+
Object.defineProperty(exports, "tangentArc", {
|
|
727
|
+
enumerable: true,
|
|
728
|
+
get: function() {
|
|
729
|
+
return tangentArc;
|
|
730
|
+
}
|
|
731
|
+
});
|
|
732
|
+
Object.defineProperty(exports, "threePointArc", {
|
|
733
|
+
enumerable: true,
|
|
734
|
+
get: function() {
|
|
735
|
+
return threePointArc;
|
|
736
|
+
}
|
|
737
|
+
});
|
|
738
|
+
Object.defineProperty(exports, "torus", {
|
|
739
|
+
enumerable: true,
|
|
740
|
+
get: function() {
|
|
741
|
+
return torus;
|
|
742
|
+
}
|
|
743
|
+
});
|
|
744
|
+
Object.defineProperty(exports, "transformCopy", {
|
|
745
|
+
enumerable: true,
|
|
746
|
+
get: function() {
|
|
747
|
+
return transformCopy;
|
|
748
|
+
}
|
|
749
|
+
});
|
|
750
|
+
Object.defineProperty(exports, "translate", {
|
|
751
|
+
enumerable: true,
|
|
752
|
+
get: function() {
|
|
753
|
+
return translate;
|
|
754
|
+
}
|
|
755
|
+
});
|
|
756
|
+
Object.defineProperty(exports, "vertex", {
|
|
757
|
+
enumerable: true,
|
|
758
|
+
get: function() {
|
|
759
|
+
return vertex;
|
|
760
|
+
}
|
|
761
|
+
});
|
|
762
|
+
Object.defineProperty(exports, "wire", {
|
|
763
|
+
enumerable: true,
|
|
764
|
+
get: function() {
|
|
765
|
+
return wire;
|
|
766
|
+
}
|
|
767
|
+
});
|
|
768
|
+
Object.defineProperty(exports, "wireLoop", {
|
|
769
|
+
enumerable: true,
|
|
770
|
+
get: function() {
|
|
771
|
+
return wireLoop;
|
|
772
|
+
}
|
|
773
|
+
});
|