brepjs 18.82.5 → 18.82.7
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.cjs +6 -6
- package/dist/2d.js +6 -6
- package/dist/{blueprint-DjzevNhB.js → blueprint-DmvnSTKs.js} +7 -7
- package/dist/{blueprint-BBUOweQy.cjs → blueprint-lbpshPPC.cjs} +7 -7
- package/dist/{blueprintFns-CxSMnMfl.js → blueprintFns-Bhmqz0_E.js} +2 -2
- package/dist/{blueprintFns-CRES_5vP.cjs → blueprintFns-Nl1hnrJX.cjs} +2 -2
- package/dist/{blueprintSketcher-CIydRzRr.js → blueprintSketcher-DzCTWt_f.js} +140 -86
- package/dist/{blueprintSketcher-CFa32JZU.cjs → blueprintSketcher-NDZKJGYh.cjs} +140 -86
- package/dist/{boolean2D-BRWPIJhe.js → boolean2D-DGtpfl2g.js} +4 -4
- package/dist/{boolean2D-Z0KE98a4.cjs → boolean2D-Dzs9Vkjv.cjs} +4 -4
- package/dist/brepjs.cjs +25 -25
- package/dist/brepjs.js +25 -25
- package/dist/{cameraFns-B3Wb4Br9.js → cameraFns-B2WR42Tm.js} +2 -2
- package/dist/{cameraFns-Drgka78Q.cjs → cameraFns-p4G3cFuC.cjs} +2 -2
- package/dist/core.cjs +1 -1
- package/dist/core.js +1 -1
- package/dist/{cornerFinder-BuYpqGO8.cjs → cornerFinder-B_SuHSBj.cjs} +1 -1
- package/dist/{cornerFinder-BRYZAgdE.js → cornerFinder-KoakXQze.js} +1 -1
- package/dist/{curveFns-BA5zsoce.cjs → curveFns-CJWxgcHu.cjs} +1 -1
- package/dist/{curveFns-XSz4F9j3.js → curveFns-XRM_FMU4.js} +1 -1
- package/dist/{drawFns-DK3DGHku.cjs → drawFns-7qn35uWm.cjs} +12 -12
- package/dist/{drawFns-C5Mdr0iH.js → drawFns-D7q8qpEI.js} +12 -12
- package/dist/{faceFns-6AarivqH.cjs → faceFns-B3bYfnGX.cjs} +2 -2
- package/dist/{faceFns-BO8IXhhf.js → faceFns-hGTQhRXB.js} +2 -2
- package/dist/{healingFns-D3BkAVML.cjs → healingFns-BpFs-Puf.cjs} +5 -5
- package/dist/{healingFns-C4JZHv8K.js → healingFns-CUn6v5p4.js} +5 -5
- package/dist/{helpers-DN6s-TLC.cjs → helpers-D6yNdVOO.cjs} +6 -6
- package/dist/{helpers-CTc8ZbY8.js → helpers-DOE4GlZ0.js} +6 -6
- package/dist/{importFns-Cb-cmpGG.cjs → importFns-BQTQKGbi.cjs} +2 -2
- package/dist/{importFns-D4Xet5aD.js → importFns-CPZWa8WK.js} +2 -2
- package/dist/io.cjs +2 -2
- package/dist/io.js +2 -2
- package/dist/kernel/brepkit/brepkitWasmTypes.d.ts +35 -6
- package/dist/kernel/occtWasm/kernel2dOps.d.ts +8 -1
- package/dist/kernel/occtWasm/occtWasmAdapter.cjs +1 -1
- package/dist/kernel/occtWasm/occtWasmAdapter.d.ts +1 -1
- package/dist/kernel/occtWasm/occtWasmAdapter.js +1 -1
- package/dist/{loftFns-DxhcdpAu.cjs → loftFns-B8UzGtwS.cjs} +1 -1
- package/dist/{loftFns-BVbzy6gm.js → loftFns-DusJd7Qq.js} +1 -1
- package/dist/{measureFns-7Nz5JklM.js → measureFns-Bka10mrS.js} +3 -3
- package/dist/{measureFns-BNHvjShh.cjs → measureFns-DwHd423H.cjs} +3 -3
- package/dist/measurement.cjs +1 -1
- package/dist/measurement.js +1 -1
- package/dist/{meshFns-YXFipjjx.cjs → meshFns-B2k02WJJ.cjs} +3 -3
- package/dist/{meshFns-CWwOpBlM.js → meshFns-CNfOU3D1.js} +3 -3
- package/dist/{occtWasmAdapter-BMV179Ji.js → occtWasmAdapter-BK6h0nKd.js} +29 -5
- package/dist/{occtWasmAdapter-5hzzhkME.cjs → occtWasmAdapter-Bfz5Zfmk.cjs} +29 -5
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/{primitiveFns-DkuLOFkI.js → primitiveFns-C-kQixz1.js} +4 -4
- package/dist/{primitiveFns-BPfYb_t5.cjs → primitiveFns-D3y2t4FS.cjs} +4 -4
- 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/{shapeFns-sF0x5Zhj.cjs → shapeFns-BPvq4QYa.cjs} +2 -2
- package/dist/{shapeFns-B6UAiYAx.js → shapeFns-kVgikxkG.js} +2 -2
- package/dist/shapeRef.cjs +1 -1
- package/dist/shapeRef.js +1 -1
- package/dist/{shapeRefFns-NdQvPa5J.js → shapeRefFns-CXWVzhbm.js} +4 -4
- package/dist/{shapeRefFns-Bb0aQZWz.cjs → shapeRefFns-CxB7OXOc.cjs} +4 -4
- package/dist/{shapeTypes-D4Evnmz_.js → shapeTypes-Caa9T1VR.js} +61 -6
- package/dist/{shapeTypes-D1eUDuzl.cjs → shapeTypes-DpDcMU0a.cjs} +61 -6
- package/dist/sketching.cjs +3 -3
- package/dist/sketching.js +3 -3
- package/dist/{solidBuilders-QUpJdbiK.js → solidBuilders-BHRL7010.js} +5 -5
- package/dist/{solidBuilders-lDXPwoCz.cjs → solidBuilders-Cve7yf13.cjs} +5 -5
- package/dist/{surfaceBuilders-R4DKNFkI.cjs → surfaceBuilders-5hLC_QeE.cjs} +2 -2
- package/dist/{surfaceBuilders-CLMyFimy.js → surfaceBuilders-BDEc8WSE.js} +2 -2
- package/dist/text.cjs +2 -2
- package/dist/text.js +2 -2
- package/dist/{textBlueprints-f8cgx9vi.js → textBlueprints-Cl5P2MkE.js} +7 -7
- package/dist/{textBlueprints-D4pLmVno.cjs → textBlueprints-bMa5164s.cjs} +7 -7
- package/dist/{textMetrics-DTRuXeXr.cjs → textMetrics-BDr82S48.cjs} +1 -1
- package/dist/{textMetrics-CQtQI4vF.js → textMetrics-DBEv2A2N.js} +1 -1
- package/dist/{threadFns-CvLvKdwB.js → threadFns-74sXf2tN.js} +6 -6
- package/dist/{threadFns-DvSdQiRw.cjs → threadFns-Cw1TzGd2.cjs} +6 -6
- package/dist/topology.cjs +8 -8
- package/dist/topology.js +8 -8
- package/dist/{topologyQueryFns-5EeBz6_7.js → topologyQueryFns-CR7zQvDK.js} +1 -1
- package/dist/{topologyQueryFns-Nnu56Ke2.cjs → topologyQueryFns-imRz9gK2.cjs} +1 -1
- package/package.json +16 -16
|
@@ -1,18 +1,36 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-DpDcMU0a.cjs");
|
|
2
2
|
const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
|
|
3
3
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
4
4
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
5
5
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
6
|
-
const require_helpers = require("./helpers-
|
|
7
|
-
const require_blueprint = require("./blueprint-
|
|
6
|
+
const require_helpers = require("./helpers-D6yNdVOO.cjs");
|
|
7
|
+
const require_blueprint = require("./blueprint-lbpshPPC.cjs");
|
|
8
8
|
//#region node_modules/flatqueue/index.js
|
|
9
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* @typedef {Float64ArrayConstructor | Float32ArrayConstructor |
|
|
11
|
+
* Uint32ArrayConstructor | Int32ArrayConstructor | Uint16ArrayConstructor |
|
|
12
|
+
* Int16ArrayConstructor | Uint8ArrayConstructor | Int8ArrayConstructor} TypedArrayConstructor
|
|
13
|
+
*/
|
|
14
|
+
/** @template [T=number] */
|
|
10
15
|
var FlatQueue = class {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
+
/**
|
|
17
|
+
* Creates an empty queue. If `capacity` is provided, the queue is backed by fixed-size typed
|
|
18
|
+
* arrays for better performance and memory use, but can't grow beyond `capacity`. `values` uses
|
|
19
|
+
* `ValuesArray` (default `Float64Array`) and `ids` uses `IdsArray` (default `Uint32Array`); pass
|
|
20
|
+
* narrower constructors like `Uint16Array` if your values or ids are known to fit them.
|
|
21
|
+
*
|
|
22
|
+
* @param {number} [capacity]
|
|
23
|
+
* @param {TypedArrayConstructor} [ValuesArray]
|
|
24
|
+
* @param {TypedArrayConstructor} [IdsArray]
|
|
25
|
+
*/
|
|
26
|
+
constructor(capacity = Infinity, ValuesArray = Float64Array, IdsArray = Uint32Array) {
|
|
27
|
+
const fixed = capacity !== Infinity;
|
|
28
|
+
/** @type {T[]} */
|
|
29
|
+
this.ids = fixed ? new IdsArray(capacity) : [];
|
|
30
|
+
/** @type {number[]} */
|
|
31
|
+
this.values = fixed ? new ValuesArray(capacity) : [];
|
|
32
|
+
/** Maximum number of items the queue can hold; `Infinity` for regular-array queues, which grow on demand. */
|
|
33
|
+
this.capacity = capacity;
|
|
16
34
|
/** Number of items in the queue. */
|
|
17
35
|
this.length = 0;
|
|
18
36
|
}
|
|
@@ -26,10 +44,13 @@ var FlatQueue = class {
|
|
|
26
44
|
* `priority` must be a number. Items are sorted and returned from low to high priority. Multiple items
|
|
27
45
|
* with the same priority value can be added to the queue, but there is no guaranteed order between these items.
|
|
28
46
|
*
|
|
47
|
+
* For fixed-capacity queues, throws a `RangeError` if the queue is already full.
|
|
48
|
+
*
|
|
29
49
|
* @param {T} item
|
|
30
50
|
* @param {number} priority
|
|
31
51
|
*/
|
|
32
52
|
push(item, priority) {
|
|
53
|
+
if (this.length === this.capacity) throw new RangeError("Queue is at capacity.");
|
|
33
54
|
let pos = this.length++;
|
|
34
55
|
while (pos > 0) {
|
|
35
56
|
const parent = pos - 1 >> 1;
|
|
@@ -80,14 +101,15 @@ var FlatQueue = class {
|
|
|
80
101
|
return this.length > 0 ? this.values[0] : void 0;
|
|
81
102
|
}
|
|
82
103
|
/**
|
|
83
|
-
* Shrinks the internal arrays to `this.length`.
|
|
104
|
+
* Shrinks the internal arrays to `this.length`. No-op for queues with fixed capacity.
|
|
84
105
|
*
|
|
85
106
|
* `pop()` and `clear()` calls don't free memory automatically to avoid unnecessary resize operations.
|
|
86
107
|
* This also means that items that have been added to the queue can't be garbage collected until
|
|
87
108
|
* a new item is pushed in their place, or this method is called.
|
|
88
109
|
*/
|
|
89
110
|
shrink() {
|
|
90
|
-
this.ids
|
|
111
|
+
if (Array.isArray(this.ids)) this.ids.length = this.length;
|
|
112
|
+
if (Array.isArray(this.values)) this.values.length = this.length;
|
|
91
113
|
}
|
|
92
114
|
};
|
|
93
115
|
//#endregion
|
|
@@ -105,6 +127,7 @@ var ARRAY_TYPES = [
|
|
|
105
127
|
];
|
|
106
128
|
var VERSION = 3;
|
|
107
129
|
/** @typedef {Int8ArrayConstructor | Uint8ArrayConstructor | Uint8ClampedArrayConstructor | Int16ArrayConstructor | Uint16ArrayConstructor | Int32ArrayConstructor | Uint32ArrayConstructor | Float32ArrayConstructor | Float64ArrayConstructor} TypedArrayConstructor */
|
|
130
|
+
/** @typedef {Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array} TypedArray */
|
|
108
131
|
var Flatbush = class Flatbush {
|
|
109
132
|
/**
|
|
110
133
|
* Recreate a Flatbush index from raw `ArrayBuffer` or `SharedArrayBuffer` data.
|
|
@@ -114,7 +137,7 @@ var Flatbush = class Flatbush {
|
|
|
114
137
|
*/
|
|
115
138
|
static from(data, byteOffset = 0) {
|
|
116
139
|
if (byteOffset % 8 !== 0) throw new Error("byteOffset must be 8-byte aligned.");
|
|
117
|
-
if (!data || data.byteLength === void 0 || data
|
|
140
|
+
if (!data || data.byteLength === void 0 || "buffer" in data) throw new Error("Data must be an instance of ArrayBuffer or SharedArrayBuffer.");
|
|
118
141
|
const [magic, versionAndType] = new Uint8Array(data, byteOffset + 0, 2);
|
|
119
142
|
if (magic !== 251) throw new Error("Data does not appear to be in a Flatbush format.");
|
|
120
143
|
const version = versionAndType >> 4;
|
|
@@ -153,10 +176,14 @@ var Flatbush = class Flatbush {
|
|
|
153
176
|
const arrayTypeIndex = ARRAY_TYPES.indexOf(ArrayType);
|
|
154
177
|
const nodesByteSize = numNodes * 4 * ArrayType.BYTES_PER_ELEMENT;
|
|
155
178
|
if (arrayTypeIndex < 0) throw new Error(`Unexpected typed array class: ${ArrayType}.`);
|
|
179
|
+
/** @type {new(b: ArrayBufferLike, o: number, l: number) => TypedArray} */
|
|
180
|
+
const BoxCtor = ArrayType;
|
|
181
|
+
/** @type {new(b: ArrayBufferLike, o: number, l: number) => Uint16Array | Uint32Array} */
|
|
182
|
+
const IdxCtor = this.IndexArrayType;
|
|
156
183
|
if (data) {
|
|
157
184
|
this.data = data;
|
|
158
|
-
this._boxes = new
|
|
159
|
-
this._indices = new
|
|
185
|
+
this._boxes = new BoxCtor(data, byteOffset + 8, numNodes * 4);
|
|
186
|
+
this._indices = new IdxCtor(data, byteOffset + 8 + nodesByteSize, numNodes);
|
|
160
187
|
this._pos = numNodes * 4;
|
|
161
188
|
this.minX = this._boxes[this._pos - 4];
|
|
162
189
|
this.minY = this._boxes[this._pos - 3];
|
|
@@ -164,8 +191,8 @@ var Flatbush = class Flatbush {
|
|
|
164
191
|
this.maxY = this._boxes[this._pos - 1];
|
|
165
192
|
} else {
|
|
166
193
|
const data = this.data = new ArrayBufferType(8 + nodesByteSize + numNodes * this.IndexArrayType.BYTES_PER_ELEMENT);
|
|
167
|
-
this._boxes = new
|
|
168
|
-
this._indices = new
|
|
194
|
+
this._boxes = new BoxCtor(data, 8, numNodes * 4);
|
|
195
|
+
this._indices = new IdxCtor(data, 8 + nodesByteSize, numNodes);
|
|
169
196
|
this._pos = 0;
|
|
170
197
|
this.minX = Infinity;
|
|
171
198
|
this.minY = Infinity;
|
|
@@ -213,7 +240,7 @@ var Flatbush = class Flatbush {
|
|
|
213
240
|
}
|
|
214
241
|
const width = this.maxX - this.minX || 1;
|
|
215
242
|
const height = this.maxY - this.minY || 1;
|
|
216
|
-
const hilbertValues = new
|
|
243
|
+
const hilbertValues = new Int32Array(this.numItems);
|
|
217
244
|
const hilbertMax = 65535;
|
|
218
245
|
for (let i = 0, pos = 0; i < this.numItems; i++) {
|
|
219
246
|
const minX = boxes[pos++];
|
|
@@ -256,30 +283,62 @@ var Flatbush = class Flatbush {
|
|
|
256
283
|
*/
|
|
257
284
|
search(minX, minY, maxX, maxY, filterFn) {
|
|
258
285
|
if (this._pos !== this._boxes.length) throw new Error("Data not yet indexed - call index.finish().");
|
|
286
|
+
const { _boxes: boxes, _levelBounds: levelBounds, _indices: indices, nodeSize } = this;
|
|
287
|
+
const numItems4 = this.numItems * 4;
|
|
259
288
|
/** @type number | undefined */
|
|
260
|
-
let nodeIndex =
|
|
261
|
-
|
|
289
|
+
let nodeIndex = boxes.length - 4;
|
|
290
|
+
let level = levelBounds.length - 1;
|
|
291
|
+
const q = [];
|
|
262
292
|
const results = [];
|
|
293
|
+
let contained = false;
|
|
263
294
|
while (nodeIndex !== void 0) {
|
|
264
|
-
const end = Math.min(nodeIndex +
|
|
265
|
-
|
|
266
|
-
|
|
295
|
+
const end = Math.min(nodeIndex + nodeSize * 4, levelBounds[level]);
|
|
296
|
+
const isNode = nodeIndex >= numItems4;
|
|
297
|
+
if (contained) this._collectContained(nodeIndex, end, level, isNode, q, results, filterFn);
|
|
298
|
+
else for (let pos = nodeIndex; pos < end; pos += 4) {
|
|
299
|
+
const x0 = boxes[pos];
|
|
267
300
|
if (maxX < x0) continue;
|
|
268
|
-
const y0 =
|
|
301
|
+
const y0 = boxes[pos + 1];
|
|
269
302
|
if (maxY < y0) continue;
|
|
270
|
-
const x1 =
|
|
303
|
+
const x1 = boxes[pos + 2];
|
|
271
304
|
if (minX > x1) continue;
|
|
272
|
-
const y1 =
|
|
305
|
+
const y1 = boxes[pos + 3];
|
|
273
306
|
if (minY > y1) continue;
|
|
274
|
-
const index =
|
|
275
|
-
if (
|
|
276
|
-
|
|
307
|
+
const index = indices[pos >> 2] | 0;
|
|
308
|
+
if (isNode) {
|
|
309
|
+
const c = +(minX <= x0 && minY <= y0 && maxX >= x1 && maxY >= y1);
|
|
310
|
+
q.push(index | c, level - 1);
|
|
311
|
+
} else if (filterFn === void 0 || filterFn(index, x0, y0, x1, y1)) results.push(index);
|
|
312
|
+
}
|
|
313
|
+
level = q.pop();
|
|
314
|
+
nodeIndex = q.pop();
|
|
315
|
+
if (nodeIndex !== void 0) {
|
|
316
|
+
contained = (nodeIndex & 1) === 1;
|
|
317
|
+
nodeIndex &= -2;
|
|
277
318
|
}
|
|
278
|
-
nodeIndex = queue.pop();
|
|
279
319
|
}
|
|
280
320
|
return results;
|
|
281
321
|
}
|
|
282
322
|
/**
|
|
323
|
+
* Collect children of a node whose bbox is fully inside the query, skipping intersection tests.
|
|
324
|
+
* @param {number} nodeIndex
|
|
325
|
+
* @param {number} end
|
|
326
|
+
* @param {number} level
|
|
327
|
+
* @param {boolean} isNode whether the children are tree nodes (vs leaf items)
|
|
328
|
+
* @param {number[]} q the traversal queue
|
|
329
|
+
* @param {number[]} results
|
|
330
|
+
* @param {((index: number, x0: number, y0: number, x1: number, y1: number) => boolean) | undefined} filterFn
|
|
331
|
+
*/
|
|
332
|
+
_collectContained(nodeIndex, end, level, isNode, q, results, filterFn) {
|
|
333
|
+
const boxes = this._boxes;
|
|
334
|
+
const indices = this._indices;
|
|
335
|
+
if (isNode) for (let pos = nodeIndex; pos < end; pos += 4) q.push(indices[pos >> 2] | 1, level - 1);
|
|
336
|
+
else for (let pos = nodeIndex; pos < end; pos += 4) {
|
|
337
|
+
const index = indices[pos >> 2] | 0;
|
|
338
|
+
if (filterFn === void 0 || filterFn(index, boxes[pos], boxes[pos + 1], boxes[pos + 2], boxes[pos + 3])) results.push(index);
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
283
342
|
* Search items in order of distance from the given point.
|
|
284
343
|
* @param {number} x
|
|
285
344
|
* @param {number} y
|
|
@@ -290,32 +349,39 @@ var Flatbush = class Flatbush {
|
|
|
290
349
|
*/
|
|
291
350
|
neighbors(x, y, maxResults = Infinity, maxDistance = Infinity, filterFn) {
|
|
292
351
|
if (this._pos !== this._boxes.length) throw new Error("Data not yet indexed - call index.finish().");
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
const
|
|
352
|
+
const { _boxes: boxes, _levelBounds: levelBounds, _indices: indices, _queue: q, nodeSize } = this;
|
|
353
|
+
const numItems4 = this.numItems * 4;
|
|
354
|
+
const nodeSize4 = nodeSize * 4;
|
|
296
355
|
const results = [];
|
|
297
356
|
const maxDistSquared = maxDistance * maxDistance;
|
|
298
|
-
|
|
299
|
-
|
|
357
|
+
q.push(boxes.length - 4 << 1, 0);
|
|
358
|
+
while (q.length) {
|
|
359
|
+
const top = q.ids[0];
|
|
360
|
+
if (top & 1) {
|
|
361
|
+
if (q.values[0] > maxDistSquared) break;
|
|
362
|
+
q.pop();
|
|
363
|
+
results.push(top >> 1);
|
|
364
|
+
if (results.length === maxResults) break;
|
|
365
|
+
continue;
|
|
366
|
+
}
|
|
367
|
+
q.pop();
|
|
368
|
+
const nodeIndex = top >> 1;
|
|
369
|
+
const isLeafLevel = nodeIndex < numItems4;
|
|
370
|
+
const end = Math.min(nodeIndex + nodeSize4, upperBound(nodeIndex, levelBounds));
|
|
300
371
|
for (let pos = nodeIndex; pos < end; pos += 4) {
|
|
301
|
-
const
|
|
302
|
-
const minX =
|
|
303
|
-
const minY =
|
|
304
|
-
const maxX =
|
|
305
|
-
const maxY =
|
|
372
|
+
const childIndex = indices[pos >> 2] | 0;
|
|
373
|
+
const minX = boxes[pos];
|
|
374
|
+
const minY = boxes[pos + 1];
|
|
375
|
+
const maxX = boxes[pos + 2];
|
|
376
|
+
const maxY = boxes[pos + 3];
|
|
306
377
|
const dx = x < minX ? minX - x : x > maxX ? x - maxX : 0;
|
|
307
378
|
const dy = y < minY ? minY - y : y > maxY ? y - maxY : 0;
|
|
308
379
|
const dist = dx * dx + dy * dy;
|
|
309
380
|
if (dist > maxDistSquared) continue;
|
|
310
|
-
if (
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
while (q.length && q.peek() & 1) {
|
|
314
|
-
if (q.peekValue() > maxDistSquared) break outer;
|
|
315
|
-
results.push(q.pop() >> 1);
|
|
316
|
-
if (results.length === maxResults) break outer;
|
|
381
|
+
if (isLeafLevel) {
|
|
382
|
+
if (filterFn === void 0 || filterFn(childIndex)) q.push(childIndex << 1 | 1, dist);
|
|
383
|
+
} else q.push(childIndex << 1, dist);
|
|
317
384
|
}
|
|
318
|
-
nodeIndex = q.length ? q.pop() >> 1 : void 0;
|
|
319
385
|
}
|
|
320
386
|
q.clear();
|
|
321
387
|
return results;
|
|
@@ -338,8 +404,8 @@ function upperBound(value, arr) {
|
|
|
338
404
|
}
|
|
339
405
|
/**
|
|
340
406
|
* Custom quicksort that partially sorts bbox data alongside the hilbert values.
|
|
341
|
-
* @param {
|
|
342
|
-
* @param {
|
|
407
|
+
* @param {Int32Array} values
|
|
408
|
+
* @param {TypedArray} boxes
|
|
343
409
|
* @param {Uint16Array | Uint32Array} indices
|
|
344
410
|
* @param {number} left
|
|
345
411
|
* @param {number} right
|
|
@@ -372,8 +438,8 @@ function sort(values, boxes, indices, left, right, nodeSize) {
|
|
|
372
438
|
}
|
|
373
439
|
/**
|
|
374
440
|
* Swap two values and two corresponding boxes.
|
|
375
|
-
* @param {
|
|
376
|
-
* @param {
|
|
441
|
+
* @param {Int32Array} values
|
|
442
|
+
* @param {TypedArray} boxes
|
|
377
443
|
* @param {Uint16Array | Uint32Array} indices
|
|
378
444
|
* @param {number} i
|
|
379
445
|
* @param {number} j
|
|
@@ -413,43 +479,31 @@ function hilbert(x, y) {
|
|
|
413
479
|
let d = x & (y ^ 65535);
|
|
414
480
|
let A = a | b >> 1;
|
|
415
481
|
let B = a >> 1 ^ a;
|
|
416
|
-
let C = c >> 1 ^ b & d >> 1
|
|
417
|
-
let D = a & c >> 1 ^ d >> 1
|
|
418
|
-
a = A;
|
|
419
|
-
b = B;
|
|
420
|
-
c = C;
|
|
421
|
-
d = D;
|
|
422
|
-
A = a & a >> 2 ^ b & b >> 2;
|
|
423
|
-
B = a & b >> 2 ^ b & (a ^ b) >> 2;
|
|
424
|
-
C ^= a & c >> 2 ^ b & d >> 2;
|
|
425
|
-
D ^= b & c >> 2 ^ (a ^ b) & d >> 2;
|
|
426
|
-
a = A;
|
|
427
|
-
b = B;
|
|
428
|
-
c = C;
|
|
429
|
-
d = D;
|
|
482
|
+
let C = c ^ (c >> 1 ^ b & d >> 1);
|
|
483
|
+
let D = d ^ (a & c >> 1 ^ d >> 1);
|
|
484
|
+
a = A & A >> 2 ^ B & B >> 2;
|
|
485
|
+
b = A & B >> 2 ^ B & (A ^ B) >> 2;
|
|
486
|
+
c = C ^ (A & C >> 2 ^ B & D >> 2);
|
|
487
|
+
d = D ^ (B & C >> 2 ^ (A ^ B) & D >> 2);
|
|
430
488
|
A = a & a >> 4 ^ b & b >> 4;
|
|
431
489
|
B = a & b >> 4 ^ b & (a ^ b) >> 4;
|
|
432
|
-
C
|
|
433
|
-
D
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
c
|
|
437
|
-
d
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
a =
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
i1 = (i1 | i1 << 4) & 252645135;
|
|
450
|
-
i1 = (i1 | i1 << 2) & 858993459;
|
|
451
|
-
i1 = (i1 | i1 << 1) & 1431655765;
|
|
452
|
-
return (i1 << 1 | i0) >>> 0;
|
|
490
|
+
C = c ^ (a & c >> 4 ^ b & d >> 4);
|
|
491
|
+
D = d ^ (b & c >> 4 ^ (a ^ b) & d >> 4);
|
|
492
|
+
c = C ^ (A & C >> 8 ^ B & D >> 8);
|
|
493
|
+
d = D ^ (B & C >> 8 ^ (A ^ B) & D >> 8);
|
|
494
|
+
c ^= c >> 1;
|
|
495
|
+
d ^= d >> 1;
|
|
496
|
+
a = x ^ y;
|
|
497
|
+
b = d | 65535 ^ (a | c);
|
|
498
|
+
a = (a | a << 8) & 16711935;
|
|
499
|
+
a = (a | a << 4) & 252645135;
|
|
500
|
+
a = (a | a << 2) & 858993459;
|
|
501
|
+
a = (a | a << 1) & 1431655765;
|
|
502
|
+
b = (b | b << 8) & 16711935;
|
|
503
|
+
b = (b | b << 4) & 252645135;
|
|
504
|
+
b = (b | b << 2) & 858993459;
|
|
505
|
+
b = (b | b << 1) & 1431655765;
|
|
506
|
+
return ((b << 1 | a) >>> 0) - 2147483648;
|
|
453
507
|
}
|
|
454
508
|
//#endregion
|
|
455
509
|
//#region src/2d/lib/intersections.ts
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { n as wasmIndex } from "./vec3-Dpha8d5k.js";
|
|
2
2
|
import { R as unwrap, h as bug, s as safeIndex } from "./errors-DNWJsfVU.js";
|
|
3
3
|
import { r as lastOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
4
|
-
import { v as zip } from "./surfaceBuilders-
|
|
5
|
-
import { a as Blueprints, i as CompoundBlueprint, l as intersectCurves, r as organiseBlueprints, t as BlueprintSketcher, u as Flatbush } from "./blueprintSketcher-
|
|
6
|
-
import { _ as samePoint$1, b as subtract2d, f as crossProduct2d, s as PRECISION_INTERSECTION } from "./helpers-
|
|
7
|
-
import { b as removeDuplicatePoints, f as make2dSegmentCurve, t as Blueprint } from "./blueprint-
|
|
4
|
+
import { v as zip } from "./surfaceBuilders-BDEc8WSE.js";
|
|
5
|
+
import { a as Blueprints, i as CompoundBlueprint, l as intersectCurves, r as organiseBlueprints, t as BlueprintSketcher, u as Flatbush } from "./blueprintSketcher-DzCTWt_f.js";
|
|
6
|
+
import { _ as samePoint$1, b as subtract2d, f as crossProduct2d, s as PRECISION_INTERSECTION } from "./helpers-DOE4GlZ0.js";
|
|
7
|
+
import { b as removeDuplicatePoints, f as make2dSegmentCurve, t as Blueprint } from "./blueprint-DmvnSTKs.js";
|
|
8
8
|
//#region src/2d/blueprints/cannedBlueprints.ts
|
|
9
9
|
/**
|
|
10
10
|
* Create a regular polygon blueprint inscribed in a circle of the given radius.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
3
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
4
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
5
|
-
const require_blueprintSketcher = require("./blueprintSketcher-
|
|
6
|
-
const require_helpers = require("./helpers-
|
|
7
|
-
const require_blueprint = require("./blueprint-
|
|
4
|
+
const require_surfaceBuilders = require("./surfaceBuilders-5hLC_QeE.cjs");
|
|
5
|
+
const require_blueprintSketcher = require("./blueprintSketcher-NDZKJGYh.cjs");
|
|
6
|
+
const require_helpers = require("./helpers-D6yNdVOO.cjs");
|
|
7
|
+
const require_blueprint = require("./blueprint-lbpshPPC.cjs");
|
|
8
8
|
//#region src/2d/blueprints/cannedBlueprints.ts
|
|
9
9
|
/**
|
|
10
10
|
* Create a regular polygon blueprint inscribed in a circle of the given radius.
|
package/dist/brepjs.cjs
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_textBlueprints = require("./textBlueprints-
|
|
3
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
4
|
-
const require_occtWasmAdapter = require("./occtWasmAdapter-
|
|
2
|
+
const require_textBlueprints = require("./textBlueprints-bMa5164s.cjs");
|
|
3
|
+
const require_shapeTypes = require("./shapeTypes-DpDcMU0a.cjs");
|
|
4
|
+
const require_occtWasmAdapter = require("./occtWasmAdapter-Bfz5Zfmk.cjs");
|
|
5
5
|
const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
|
|
6
6
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
7
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
7
|
+
const require_topologyQueryFns = require("./topologyQueryFns-imRz9gK2.cjs");
|
|
8
8
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
9
9
|
const require_types = require("./types-KjA8tY4Y.cjs");
|
|
10
10
|
const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
|
|
11
11
|
const require_planeOps = require("./planeOps-BA4HfgQu.cjs");
|
|
12
|
-
const require_faceFns = require("./faceFns-
|
|
13
|
-
const require_shapeFns = require("./shapeFns-
|
|
14
|
-
const require_curveFns = require("./curveFns-
|
|
15
|
-
const require_meshFns = require("./meshFns-
|
|
12
|
+
const require_faceFns = require("./faceFns-B3bYfnGX.cjs");
|
|
13
|
+
const require_shapeFns = require("./shapeFns-BPvq4QYa.cjs");
|
|
14
|
+
const require_curveFns = require("./curveFns-CJWxgcHu.cjs");
|
|
15
|
+
const require_meshFns = require("./meshFns-B2k02WJJ.cjs");
|
|
16
16
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
17
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
18
|
-
const require_solidBuilders = require("./solidBuilders-
|
|
19
|
-
const require_healingFns = require("./healingFns-
|
|
20
|
-
const require_threadFns = require("./threadFns-
|
|
21
|
-
const require_blueprintSketcher = require("./blueprintSketcher-
|
|
22
|
-
const require_helpers = require("./helpers-
|
|
23
|
-
const require_drawFns = require("./drawFns-
|
|
24
|
-
const require_measureFns = require("./measureFns-
|
|
25
|
-
const require_cornerFinder = require("./cornerFinder-
|
|
26
|
-
const require_boolean2D = require("./boolean2D-
|
|
27
|
-
const require_blueprintFns = require("./blueprintFns-
|
|
28
|
-
const require_importFns = require("./importFns-
|
|
29
|
-
const require_loftFns = require("./loftFns-
|
|
30
|
-
const require_cameraFns = require("./cameraFns-
|
|
31
|
-
const require_textMetrics = require("./textMetrics-
|
|
32
|
-
const require_shapeRefFns = require("./shapeRefFns-
|
|
17
|
+
const require_surfaceBuilders = require("./surfaceBuilders-5hLC_QeE.cjs");
|
|
18
|
+
const require_solidBuilders = require("./solidBuilders-Cve7yf13.cjs");
|
|
19
|
+
const require_healingFns = require("./healingFns-BpFs-Puf.cjs");
|
|
20
|
+
const require_threadFns = require("./threadFns-Cw1TzGd2.cjs");
|
|
21
|
+
const require_blueprintSketcher = require("./blueprintSketcher-NDZKJGYh.cjs");
|
|
22
|
+
const require_helpers = require("./helpers-D6yNdVOO.cjs");
|
|
23
|
+
const require_drawFns = require("./drawFns-7qn35uWm.cjs");
|
|
24
|
+
const require_measureFns = require("./measureFns-DwHd423H.cjs");
|
|
25
|
+
const require_cornerFinder = require("./cornerFinder-B_SuHSBj.cjs");
|
|
26
|
+
const require_boolean2D = require("./boolean2D-Dzs9Vkjv.cjs");
|
|
27
|
+
const require_blueprintFns = require("./blueprintFns-Nl1hnrJX.cjs");
|
|
28
|
+
const require_importFns = require("./importFns-BQTQKGbi.cjs");
|
|
29
|
+
const require_loftFns = require("./loftFns-B8UzGtwS.cjs");
|
|
30
|
+
const require_cameraFns = require("./cameraFns-p4G3cFuC.cjs");
|
|
31
|
+
const require_textMetrics = require("./textMetrics-BDr82S48.cjs");
|
|
32
|
+
const require_shapeRefFns = require("./shapeRefFns-CxB7OXOc.cjs");
|
|
33
33
|
const require_workerHandler = require("./workerHandler-CdlOTwJg.cjs");
|
|
34
|
-
const require_primitiveFns = require("./primitiveFns-
|
|
34
|
+
const require_primitiveFns = require("./primitiveFns-D3y2t4FS.cjs");
|
|
35
35
|
//#region src/topology/shapeBooleans.ts
|
|
36
36
|
var BOPAlgo_GlueShift = 1;
|
|
37
37
|
var BOPAlgo_GlueFull = 2;
|
package/dist/brepjs.js
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { $ as getKernelCapabilities, A as planarWire, B as createKernelHandle, C as isOrientedFace, D as manifoldShell, E as isValidSolid, F as as3D, H as isLive, I as is2D, J as withScopeResultAsync, K as withScope, L as is3D, M as getShapeKind, O as orientedFace, P as as2D, R as DisposalScope, S as isManifoldShell, T as isPlanarWire, V as getDisposalStats, W as resetDisposalStats, X as getActiveKernelId, Y as _usingCtx, Z as getKernel, _ as isSolid, a as createEdge, at as registerKernel, b as closedWire, c as createSolid, ct as withQuality, d as isCompound, dt as supportsProjection, et as getKernelTier, f as isEdge, ft as BrepkitAdapter, g as isShell, h as isShape3D, ht as currentQuality, i as createCompound, it as prewarm, j as validSolid, k as planarFace, l as createVertex, lt as withTier, m as isShape1D, mt as resetPerformanceStats, n as castShape3D, nt as initFromManifold, o as createFace, ot as registerKernelTier, p as isFace, pt as getPerformanceStats, q as withScopeResult, rt as initFromOC, s as createShell, st as withKernel, t as castShape, tt as init, u as createWire, ut as supportsConstraintSketch, v as isVertex, w as isPlanarFace, x as isClosedWire, y as isWire, z as createHandle } from "./shapeTypes-
|
|
2
|
-
import { E as EXACT_BREP_CAPABILITIES, T as DEFAULT_CAPABILITIES, t as OcctWasmAdapter } from "./occtWasmAdapter-
|
|
1
|
+
import { $ as getKernelCapabilities, A as planarWire, B as createKernelHandle, C as isOrientedFace, D as manifoldShell, E as isValidSolid, F as as3D, H as isLive, I as is2D, J as withScopeResultAsync, K as withScope, L as is3D, M as getShapeKind, O as orientedFace, P as as2D, R as DisposalScope, S as isManifoldShell, T as isPlanarWire, V as getDisposalStats, W as resetDisposalStats, X as getActiveKernelId, Y as _usingCtx, Z as getKernel, _ as isSolid, a as createEdge, at as registerKernel, b as closedWire, c as createSolid, ct as withQuality, d as isCompound, dt as supportsProjection, et as getKernelTier, f as isEdge, ft as BrepkitAdapter, g as isShell, h as isShape3D, ht as currentQuality, i as createCompound, it as prewarm, j as validSolid, k as planarFace, l as createVertex, lt as withTier, m as isShape1D, mt as resetPerformanceStats, n as castShape3D, nt as initFromManifold, o as createFace, ot as registerKernelTier, p as isFace, pt as getPerformanceStats, q as withScopeResult, rt as initFromOC, s as createShell, st as withKernel, t as castShape, tt as init, u as createWire, ut as supportsConstraintSketch, v as isVertex, w as isPlanarFace, x as isClosedWire, y as isWire, z as createHandle } from "./shapeTypes-Caa9T1VR.js";
|
|
2
|
+
import { E as EXACT_BREP_CAPABILITIES, T as DEFAULT_CAPABILITIES, t as OcctWasmAdapter } from "./occtWasmAdapter-BK6h0nKd.js";
|
|
3
3
|
import { n as wasmIndex } from "./vec3-Dpha8d5k.js";
|
|
4
4
|
import { A as ok, B as unwrapOr, C as fromNullable, D as mapBoth, E as map, F as tapErr, H as zip, I as tryCatch, L as tryCatchAsync, M as orElse, N as pipeline, O as mapErr, P as tap, R as unwrap, S as flatten, T as isOk, V as unwrapOrElse, _ as all, a as moduleInitError, b as err, c as sketcherStateError, d as validationError, g as OK, h as bug, i as kernelError, j as or, k as match, l as typeCastError, m as BrepBugError, n as computationError, o as queryError, r as ioError, t as BrepErrorCode, u as unsupportedError, v as andThen, w as isErr, x as flatMap, y as collect, z as unwrapErr } from "./errors-DNWJsfVU.js";
|
|
5
|
-
import { C as kernelCall, S as vertexPosition, T as kernelCallScoped, _ as iterFaces, a as getCachedSurfaceType, b as iterVertices, c as getFaces, d as getSolids, f as getVertices, g as iterEdges, h as iterCompSolids, m as invalidateShapeCache, n as getBounds, o as getCompSolids, p as getWires, s as getEdges, t as describe$1, u as getShells, v as iterShells, w as kernelCallRaw, x as iterWires, y as iterSolids } from "./topologyQueryFns-
|
|
5
|
+
import { C as kernelCall, S as vertexPosition, T as kernelCallScoped, _ as iterFaces, a as getCachedSurfaceType, b as iterVertices, c as getFaces, d as getSolids, f as getVertices, g as iterEdges, h as iterCompSolids, m as invalidateShapeCache, n as getBounds, o as getCompSolids, p as getWires, s as getEdges, t as describe$1, u as getShells, v as iterShells, w as kernelCallRaw, x as iterWires, y as iterSolids } from "./topologyQueryFns-CR7zQvDK.js";
|
|
6
6
|
import { n as HASH_CODE_MAX, r as RAD2DEG, t as DEG2RAD } from "./constants-ITRzCnCp.js";
|
|
7
7
|
import { n as toVec2, r as toVec3, t as resolveDirection } from "./types-D24Y27N0.js";
|
|
8
8
|
import { a as vecDot, c as vecLength, d as vecNormalize, f as vecProjectToPlane, g as vecSub, h as vecScale, i as vecDistance, l as vecLengthSq, m as vecRotate, n as vecAngle, o as vecEquals, p as vecRepr, r as vecCross, s as vecIsZero, t as vecAdd, u as vecNegate } from "./vecOps-SKPRvPH-.js";
|
|
9
9
|
import { i as pivotPlane, n as createPlane, o as resolvePlane, r as makePlane, s as translatePlane, t as createNamedPlane } from "./planeOps-DSjjtrjg.js";
|
|
10
|
-
import { S as shapeType, _ as cast, a as faceOrientation, b as isCompSolid, c as innerWires, d as pointOnSurface, f as projectPointOnFace, g as asTopo, h as uvCoordinates, i as faceGeomType, l as normalAt, m as uvBounds, n as faceAxis, o as flipFaceOrientation, p as removeHolesFromFace, r as faceCenter, s as getSurfaceType, t as classifyPointOnFace, u as outerWire, v as downcast, x as iterTopo, y as fromBREP } from "./faceFns-
|
|
11
|
-
import { C as findFacesByTag, D as tagFaces, E as setTagMetadata, O as getFaceOrigins, S as getShapeColor, T as getTagMetadata, a as isSameShape, b as colorShape, c as applyMatrix$1, d as resize, f as rotate$2, h as translate$2, i as isEqualShape, k as setShapeOrigin, l as composeTransforms, m as transformCopy$1, n as getHashCode, o as simplify$1, p as scale$3, r as isEmpty$2, s as toBREP$1, t as clone$1, u as mirror$2, w as getFaceTags, x as getFaceColor, y as colorFaces } from "./shapeFns-
|
|
12
|
-
import { a as curveIsPeriodic, c as curvePointAt, d as flipOrientation, f as getCurveType, h as offsetWire2D, i as curveIsClosed, l as curveStartPoint, m as interpolateCurve, n as curveAxis, o as curveLength, p as getOrientation, r as curveEndPoint, s as curvePeriod, t as approximateCurve, u as curveTangentAt } from "./curveFns-
|
|
13
|
-
import { a as meshEdges$1, c as createMeshCache, i as mesh$1, n as exportSTEP, o as meshMultiLOD, r as exportSTL, s as clearMeshCache, t as exportIGES } from "./meshFns-
|
|
10
|
+
import { S as shapeType, _ as cast, a as faceOrientation, b as isCompSolid, c as innerWires, d as pointOnSurface, f as projectPointOnFace, g as asTopo, h as uvCoordinates, i as faceGeomType, l as normalAt, m as uvBounds, n as faceAxis, o as flipFaceOrientation, p as removeHolesFromFace, r as faceCenter, s as getSurfaceType, t as classifyPointOnFace, u as outerWire, v as downcast, x as iterTopo, y as fromBREP } from "./faceFns-hGTQhRXB.js";
|
|
11
|
+
import { C as findFacesByTag, D as tagFaces, E as setTagMetadata, O as getFaceOrigins, S as getShapeColor, T as getTagMetadata, a as isSameShape, b as colorShape, c as applyMatrix$1, d as resize, f as rotate$2, h as translate$2, i as isEqualShape, k as setShapeOrigin, l as composeTransforms, m as transformCopy$1, n as getHashCode, o as simplify$1, p as scale$3, r as isEmpty$2, s as toBREP$1, t as clone$1, u as mirror$2, w as getFaceTags, x as getFaceColor, y as colorFaces } from "./shapeFns-kVgikxkG.js";
|
|
12
|
+
import { a as curveIsPeriodic, c as curvePointAt, d as flipOrientation, f as getCurveType, h as offsetWire2D, i as curveIsClosed, l as curveStartPoint, m as interpolateCurve, n as curveAxis, o as curveLength, p as getOrientation, r as curveEndPoint, s as curvePeriod, t as approximateCurve, u as curveTangentAt } from "./curveFns-XRM_FMU4.js";
|
|
13
|
+
import { a as meshEdges$1, c as createMeshCache, i as mesh$1, n as exportSTEP, o as meshMultiLOD, r as exportSTL, s as clearMeshCache, t as exportIGES } from "./meshFns-CNfOU3D1.js";
|
|
14
14
|
import { n as getAtOrThrow, r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
15
|
-
import { _ as makeThreePointArc, d as makeCircle, h as makeLine, l as makeBSplineInterpolation, n as fill, r as makeFace, s as assembleWire } from "./surfaceBuilders-
|
|
16
|
-
import { _ as section$1, b as split$1, d as booleanPipeline, f as cut$2, g as intersect$2, h as fuseAll, m as fuse$2, p as cutAll, r as makeCylinder, v as sectionToFace$1, y as slice$1 } from "./solidBuilders-
|
|
17
|
-
import { A as edgesOfFace, C as shellWithEvolution, D as getNurbsCurveData, E as fuseAllBisect, F as chamferDistAngle, I as toBufferGeometryData, L as toGroupedBufferGeometryData, M as sharedEdges, N as verticesOfEdge, O as getNurbsSurfaceData, P as wiresOfFace, R as toLODGeometryData, S as intersectWithEvolution, T as cutAllBisect, _ as positionOnCurve, a as healFace, b as filletWithEvolution, c as isValid$1, d as draft$1, f as fillet$1, g as variableFillet, h as thicken$1, i as heal$1, j as facesOfEdge, k as adjacentFaces, l as solidFromShell, m as shell$1, n as fixSelfIntersection, o as healSolid, p as offset$1, r as fixShape, s as healWire, t as autoHeal, u as chamfer$1, v as chamferWithEvolution, w as checkBoolean, x as fuseWithEvolution, y as cutWithEvolution, z as toLineGeometryData } from "./healingFns-
|
|
18
|
-
import { A as setJointValue, B as findNode, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, F as quatRotate, H as updateNode, I as addChild, J as createAssembly, K as linearPattern, L as collectShapes, M as sphericalJoint, N as quatFromAxisAngle, O as prismaticJoint, P as quatFromTo, R as countNodes, S as addJoint, T as jointTransform, U as walkAssembly, V as removeChild, W as circularPattern, _ as exportURDF, a as deserializeHistory, b as inverseKinematics, c as modifyStep, d as replayFrom, f as replayHistory, g as undoLast, h as stepsFrom, i as createRegistry, j as setJointValues, k as revoluteJoint, l as registerOperation, m as stepCount, n as addStep, o as findStep, p as serializeHistory, q as exportAssemblySTEP, r as createHistory, s as getShape, t as thread, u as registerShape, v as importURDF, w as forwardKinematics, x as jointTrajectory, y as jointsFromDH, z as createAssemblyNode } from "./threadFns-
|
|
19
|
-
import { n as BaseSketcher2d, r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-
|
|
20
|
-
import { a as createTypedFinder, i as wireFinder, n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-
|
|
21
|
-
import { A as sketchEllipse, D as makeBaseBox, E as deserializeDrawing, F as sketchRectangle, I as sketchRoundedRectangle, L as FaceSketcher, M as sketchHelix, N as sketchParametricFunction, O as polysideInnerRadius, P as sketchPolysides, R as Sketcher, S as drawText, _ as drawPolysides, a as drawingIntersect, b as drawSingleCircle, c as rotateDrawing, d as drawFaceOutline, f as drawProjection, g as drawPointsInterpolation, h as drawParametricFunction, i as drawingFuse, j as sketchFaceOffset, k as sketchCircle, l as scaleDrawing, m as drawEllipse, n as drawingCut, o as drawingToSketchOnPlane, p as drawCircle, r as drawingFillet, s as mirrorDrawing, t as drawingChamfer, u as translateDrawing, v as drawRectangle, w as draw, x as drawSingleEllipse, y as drawRoundedRectangle } from "./drawFns-
|
|
22
|
-
import { a as measureDistance, c as measureLinearProps, d as measureVolumeProps, i as measureCurvatureAtMid, l as measureSurfaceProps, n as measureArea, o as measureDistanceProps, r as measureCurvatureAt, s as measureLength, t as createDistanceQuery, u as measureVolume } from "./measureFns-
|
|
23
|
-
import { t as cornerFinder } from "./cornerFinder-
|
|
24
|
-
import { a as fuseBlueprints, c as roundedRectangleBlueprint, i as cutBlueprints, n as fuse2D, o as intersectBlueprints, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-
|
|
25
|
-
import { S as reverseCurve, _ as curve2dIsOnCurve, a as isInside2D, b as curve2dSplitAt, c as scale2D, d as stretch2D, f as toSVGPathD, g as curve2dFirstPoint, h as curve2dDistanceFrom, i as getOrientation2D, l as sketchOnFace2D, m as curve2dBoundingBox, n as createCompoundBlueprint, o as mirror2D, p as translate2D, r as getBounds2D, s as rotate2D, t as createBlueprint, u as sketchOnPlane2D, v as curve2dLastPoint, x as curve2dTangentAt, y as curve2dParameter } from "./blueprintFns-
|
|
26
|
-
import { a as importSVG, c as blueprintToDXF, d as exportGltf, f as exportOBJ, i as exportSTEPConfigured, l as exportDXF, n as importSTEP, o as importSVGPathD, r as importSTL, s as exportThreeMF, t as importIGES, u as exportGlb } from "./importFns-
|
|
27
|
-
import { a as revolve$1, c as multiSectionSweep, d as twistExtrude, i as extrudeAll, l as supportExtrude, n as loftAll, o as complexExtrude, r as extrude$1, s as guidedSweep, t as loft$1, u as sweep$1 } from "./loftFns-
|
|
28
|
-
import { a as Sketch, c as compoundSketchLoft, d as sketchFace, f as sketchLoft, h as sketchWires, i as Sketches, l as compoundSketchRevolve, m as sketchSweep, n as getFont, o as compoundSketchExtrude, p as sketchRevolve, r as loadFont, s as compoundSketchFace, t as textBlueprints, u as sketchExtrude, v as CompoundSketch } from "./textBlueprints-
|
|
29
|
-
import { a as makeProjectedEdges, i as projectEdges, n as cameraLookAt, r as createCamera, s as isProjectionPlane, t as cameraFromPlane } from "./cameraFns-
|
|
30
|
-
import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-
|
|
31
|
-
import { a as updateRoles, i as resolveRef, n as captureHint, o as defaultScorer, r as createRef, t as assignRoles } from "./shapeRefFns-
|
|
15
|
+
import { _ as makeThreePointArc, d as makeCircle, h as makeLine, l as makeBSplineInterpolation, n as fill, r as makeFace, s as assembleWire } from "./surfaceBuilders-BDEc8WSE.js";
|
|
16
|
+
import { _ as section$1, b as split$1, d as booleanPipeline, f as cut$2, g as intersect$2, h as fuseAll, m as fuse$2, p as cutAll, r as makeCylinder, v as sectionToFace$1, y as slice$1 } from "./solidBuilders-BHRL7010.js";
|
|
17
|
+
import { A as edgesOfFace, C as shellWithEvolution, D as getNurbsCurveData, E as fuseAllBisect, F as chamferDistAngle, I as toBufferGeometryData, L as toGroupedBufferGeometryData, M as sharedEdges, N as verticesOfEdge, O as getNurbsSurfaceData, P as wiresOfFace, R as toLODGeometryData, S as intersectWithEvolution, T as cutAllBisect, _ as positionOnCurve, a as healFace, b as filletWithEvolution, c as isValid$1, d as draft$1, f as fillet$1, g as variableFillet, h as thicken$1, i as heal$1, j as facesOfEdge, k as adjacentFaces, l as solidFromShell, m as shell$1, n as fixSelfIntersection, o as healSolid, p as offset$1, r as fixShape, s as healWire, t as autoHeal, u as chamfer$1, v as chamferWithEvolution, w as checkBoolean, x as fuseWithEvolution, y as cutWithEvolution, z as toLineGeometryData } from "./healingFns-CUn6v5p4.js";
|
|
18
|
+
import { A as setJointValue, B as findNode, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, F as quatRotate, H as updateNode, I as addChild, J as createAssembly, K as linearPattern, L as collectShapes, M as sphericalJoint, N as quatFromAxisAngle, O as prismaticJoint, P as quatFromTo, R as countNodes, S as addJoint, T as jointTransform, U as walkAssembly, V as removeChild, W as circularPattern, _ as exportURDF, a as deserializeHistory, b as inverseKinematics, c as modifyStep, d as replayFrom, f as replayHistory, g as undoLast, h as stepsFrom, i as createRegistry, j as setJointValues, k as revoluteJoint, l as registerOperation, m as stepCount, n as addStep, o as findStep, p as serializeHistory, q as exportAssemblySTEP, r as createHistory, s as getShape, t as thread, u as registerShape, v as importURDF, w as forwardKinematics, x as jointTrajectory, y as jointsFromDH, z as createAssemblyNode } from "./threadFns-74sXf2tN.js";
|
|
19
|
+
import { n as BaseSketcher2d, r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-DzCTWt_f.js";
|
|
20
|
+
import { a as createTypedFinder, i as wireFinder, n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-DOE4GlZ0.js";
|
|
21
|
+
import { A as sketchEllipse, D as makeBaseBox, E as deserializeDrawing, F as sketchRectangle, I as sketchRoundedRectangle, L as FaceSketcher, M as sketchHelix, N as sketchParametricFunction, O as polysideInnerRadius, P as sketchPolysides, R as Sketcher, S as drawText, _ as drawPolysides, a as drawingIntersect, b as drawSingleCircle, c as rotateDrawing, d as drawFaceOutline, f as drawProjection, g as drawPointsInterpolation, h as drawParametricFunction, i as drawingFuse, j as sketchFaceOffset, k as sketchCircle, l as scaleDrawing, m as drawEllipse, n as drawingCut, o as drawingToSketchOnPlane, p as drawCircle, r as drawingFillet, s as mirrorDrawing, t as drawingChamfer, u as translateDrawing, v as drawRectangle, w as draw, x as drawSingleEllipse, y as drawRoundedRectangle } from "./drawFns-D7q8qpEI.js";
|
|
22
|
+
import { a as measureDistance, c as measureLinearProps, d as measureVolumeProps, i as measureCurvatureAtMid, l as measureSurfaceProps, n as measureArea, o as measureDistanceProps, r as measureCurvatureAt, s as measureLength, t as createDistanceQuery, u as measureVolume } from "./measureFns-Bka10mrS.js";
|
|
23
|
+
import { t as cornerFinder } from "./cornerFinder-KoakXQze.js";
|
|
24
|
+
import { a as fuseBlueprints, c as roundedRectangleBlueprint, i as cutBlueprints, n as fuse2D, o as intersectBlueprints, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-DGtpfl2g.js";
|
|
25
|
+
import { S as reverseCurve, _ as curve2dIsOnCurve, a as isInside2D, b as curve2dSplitAt, c as scale2D, d as stretch2D, f as toSVGPathD, g as curve2dFirstPoint, h as curve2dDistanceFrom, i as getOrientation2D, l as sketchOnFace2D, m as curve2dBoundingBox, n as createCompoundBlueprint, o as mirror2D, p as translate2D, r as getBounds2D, s as rotate2D, t as createBlueprint, u as sketchOnPlane2D, v as curve2dLastPoint, x as curve2dTangentAt, y as curve2dParameter } from "./blueprintFns-Bhmqz0_E.js";
|
|
26
|
+
import { a as importSVG, c as blueprintToDXF, d as exportGltf, f as exportOBJ, i as exportSTEPConfigured, l as exportDXF, n as importSTEP, o as importSVGPathD, r as importSTL, s as exportThreeMF, t as importIGES, u as exportGlb } from "./importFns-CPZWa8WK.js";
|
|
27
|
+
import { a as revolve$1, c as multiSectionSweep, d as twistExtrude, i as extrudeAll, l as supportExtrude, n as loftAll, o as complexExtrude, r as extrude$1, s as guidedSweep, t as loft$1, u as sweep$1 } from "./loftFns-DusJd7Qq.js";
|
|
28
|
+
import { a as Sketch, c as compoundSketchLoft, d as sketchFace, f as sketchLoft, h as sketchWires, i as Sketches, l as compoundSketchRevolve, m as sketchSweep, n as getFont, o as compoundSketchExtrude, p as sketchRevolve, r as loadFont, s as compoundSketchFace, t as textBlueprints, u as sketchExtrude, v as CompoundSketch } from "./textBlueprints-Cl5P2MkE.js";
|
|
29
|
+
import { a as makeProjectedEdges, i as projectEdges, n as cameraLookAt, r as createCamera, s as isProjectionPlane, t as cameraFromPlane } from "./cameraFns-B2WR42Tm.js";
|
|
30
|
+
import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-DBEv2A2N.js";
|
|
31
|
+
import { a as updateRoles, i as resolveRef, n as captureHint, o as defaultScorer, r as createRef, t as assignRoles } from "./shapeRefFns-CXWVzhbm.js";
|
|
32
32
|
import { a as createTaskQueue, c as isEmpty$1, d as isDisposeRequest, f as isErrorResponse, h as isSuccessResponse, i as createWorkerClient, l as pendingCount, m as isOperationRequest, n as createWorkerHandler, o as dequeueTask, p as isInitRequest, r as registerHandler, s as enqueueTask, t as createOperationRegistry, u as rejectAll } from "./workerHandler-CFetYgIm.js";
|
|
33
|
-
import { C as threePointArc, D as wireLoop, E as wire, S as tangentArc, T as vertex, _ as polygon, a as circle, b as sphere$1, c as cylinder, d as ellipsoid, f as face, g as offsetFace, h as line, i as bsplineApprox, l as ellipse, m as helix, n as bezier, o as compound, p as filledFace, r as box, s as cone, t as addHoles, u as ellipseArc, v as sewShells, w as torus$1, x as subFace, y as solid } from "./primitiveFns-
|
|
33
|
+
import { C as threePointArc, D as wireLoop, E as wire, S as tangentArc, T as vertex, _ as polygon, a as circle, b as sphere$1, c as cylinder, d as ellipsoid, f as face, g as offsetFace, h as line, i as bsplineApprox, l as ellipse, m as helix, n as bezier, o as compound, p as filledFace, r as box, s as cone, t as addHoles, u as ellipseArc, v as sewShells, w as torus$1, x as subFace, y as solid } from "./primitiveFns-C-kQixz1.js";
|
|
34
34
|
//#region \0rolldown/runtime.js
|
|
35
35
|
var __defProp = Object.defineProperty;
|
|
36
36
|
var __exportAll = (all, no_symbols) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Z as getKernel, t as castShape } from "./shapeTypes-
|
|
1
|
+
import { Z as getKernel, t as castShape } from "./shapeTypes-Caa9T1VR.js";
|
|
2
2
|
import { A as ok, b as err, d as validationError } from "./errors-DNWJsfVU.js";
|
|
3
|
-
import { s as getEdges } from "./topologyQueryFns-
|
|
3
|
+
import { s as getEdges } from "./topologyQueryFns-CR7zQvDK.js";
|
|
4
4
|
import { c as vecLength, d as vecNormalize, g as vecSub, r as vecCross } from "./vecOps-SKPRvPH-.js";
|
|
5
5
|
//#region src/projection/projectionPlanes.ts
|
|
6
6
|
/** Lookup table mapping each {@link ProjectionPlane} to its camera configuration. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-DpDcMU0a.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-imRz9gK2.cjs");
|
|
4
4
|
const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
|
|
5
5
|
//#region src/projection/projectionPlanes.ts
|
|
6
6
|
/** Lookup table mapping each {@link ProjectionPlane} to its camera configuration. */
|
package/dist/core.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
+
const require_shapeTypes = require("./shapeTypes-DpDcMU0a.cjs");
|
|
3
3
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
4
4
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
5
5
|
const require_types = require("./types-KjA8tY4Y.cjs");
|
package/dist/core.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as createKernelHandle, C as isOrientedFace, D as manifoldShell, E as isValidSolid, H as isLive, I as is2D, J as withScopeResultAsync, K as withScope, L as is3D, M as getShapeKind, O as orientedFace, R as DisposalScope, S as isManifoldShell, _ as isSolid, b as closedWire, d as isCompound, f as isEdge, g as isShell, h as isShape3D, j as validSolid, m as isShape1D, p as isFace, q as withScopeResult, t as castShape, v as isVertex, x as isClosedWire, y as isWire, z as createHandle } from "./shapeTypes-
|
|
1
|
+
import { B as createKernelHandle, C as isOrientedFace, D as manifoldShell, E as isValidSolid, H as isLive, I as is2D, J as withScopeResultAsync, K as withScope, L as is3D, M as getShapeKind, O as orientedFace, R as DisposalScope, S as isManifoldShell, _ as isSolid, b as closedWire, d as isCompound, f as isEdge, g as isShell, h as isShape3D, j as validSolid, m as isShape1D, p as isFace, q as withScopeResult, t as castShape, v as isVertex, x as isClosedWire, y as isWire, z as createHandle } from "./shapeTypes-Caa9T1VR.js";
|
|
2
2
|
import { A as ok, B as unwrapOr, E as map, I as tryCatch, L as tryCatchAsync, O as mapErr, R as unwrap, T as isOk, V as unwrapOrElse, a as moduleInitError, b as err, c as sketcherStateError, d as validationError, g as OK, h as bug, i as kernelError, k as match, l as typeCastError, m as BrepBugError, n as computationError, o as queryError, r as ioError, u as unsupportedError, v as andThen, w as isErr, x as flatMap, y as collect, z as unwrapErr } from "./errors-DNWJsfVU.js";
|
|
3
3
|
import { n as HASH_CODE_MAX, r as RAD2DEG, t as DEG2RAD } from "./constants-ITRzCnCp.js";
|
|
4
4
|
import { n as toVec2, r as toVec3, t as resolveDirection } from "./types-D24Y27N0.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
2
2
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
3
|
-
const require_helpers = require("./helpers-
|
|
3
|
+
const require_helpers = require("./helpers-D6yNdVOO.cjs");
|
|
4
4
|
//#region src/query/cornerFinder.ts
|
|
5
5
|
var PI_2 = 2 * Math.PI;
|
|
6
6
|
function positiveHalfAngle(angle) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as DEG2RAD } from "./constants-ITRzCnCp.js";
|
|
2
2
|
import { n as getAtOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
3
|
-
import { _ as samePoint, p as distance2d, u as angle2d } from "./helpers-
|
|
3
|
+
import { _ as samePoint, p as distance2d, u as angle2d } from "./helpers-DOE4GlZ0.js";
|
|
4
4
|
//#region src/query/cornerFinder.ts
|
|
5
5
|
var PI_2 = 2 * Math.PI;
|
|
6
6
|
function positiveHalfAngle(angle) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Z as getKernel, f as isEdge, t as castShape, y as isWire } from "./shapeTypes-
|
|
1
|
+
import { Z as getKernel, f as isEdge, t as castShape, y as isWire } from "./shapeTypes-Caa9T1VR.js";
|
|
2
2
|
import { A as ok, b as err, l as typeCastError } from "./errors-DNWJsfVU.js";
|
|
3
3
|
//#region src/topology/curveFns.ts
|
|
4
4
|
/**
|