brepjs 18.82.4 → 18.82.6
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-BBUOweQy.cjs → blueprint-C2gkyxYc.cjs} +7 -7
- package/dist/{blueprint-DjzevNhB.js → blueprint-yJsyEFn_.js} +7 -7
- package/dist/{blueprintFns-CRES_5vP.cjs → blueprintFns-CL4VZzCL.cjs} +2 -2
- package/dist/{blueprintFns-CxSMnMfl.js → blueprintFns-DjpRmsbi.js} +2 -2
- package/dist/{blueprintSketcher-CFa32JZU.cjs → blueprintSketcher-BLXntEIS.cjs} +140 -86
- package/dist/{blueprintSketcher-CIydRzRr.js → blueprintSketcher-BbYPEPMa.js} +140 -86
- package/dist/{boolean2D-Z0KE98a4.cjs → boolean2D-BbvyYF-v.cjs} +4 -4
- package/dist/{boolean2D-BRWPIJhe.js → boolean2D-C3k4iO92.js} +4 -4
- package/dist/brepjs.cjs +50 -50
- package/dist/brepjs.js +25 -25
- package/dist/{cameraFns-B3Wb4Br9.js → cameraFns-BiQGAnPd.js} +2 -2
- package/dist/{cameraFns-Drgka78Q.cjs → cameraFns-BkSHm_Vo.cjs} +2 -2
- package/dist/core.cjs +1 -1
- package/dist/core.js +1 -1
- package/dist/{cornerFinder-BRYZAgdE.js → cornerFinder-C9zvdkpK.js} +1 -1
- package/dist/{cornerFinder-BuYpqGO8.cjs → cornerFinder-D3lGL_Td.cjs} +1 -1
- package/dist/{curveFns-XSz4F9j3.js → curveFns-B4_om-yp.js} +1 -1
- package/dist/{curveFns-BA5zsoce.cjs → curveFns-Dlbfncal.cjs} +1 -1
- package/dist/{drawFns-DrlxFhe4.js → drawFns-DaTn2p7M.js} +12 -12
- package/dist/{drawFns-CmSMHb12.cjs → drawFns-lls9IuPY.cjs} +12 -12
- package/dist/{faceFns-BO8IXhhf.js → faceFns-4JEna8n9.js} +2 -2
- package/dist/{faceFns-6AarivqH.cjs → faceFns-Obtamglc.cjs} +2 -2
- package/dist/{healingFns-MxlhdTIc.cjs → healingFns-gHxvhsbJ.cjs} +9 -9
- package/dist/{healingFns-Ct_-O3yk.js → healingFns-uXLI1vJ7.js} +5 -5
- package/dist/{helpers-CTc8ZbY8.js → helpers-CJV31xig.js} +6 -6
- package/dist/{helpers-DN6s-TLC.cjs → helpers-rAK5qEBu.cjs} +6 -6
- package/dist/{importFns-Cb-cmpGG.cjs → importFns-BJVEly-l.cjs} +2 -2
- package/dist/{importFns-D4Xet5aD.js → importFns-Dcc2KviL.js} +2 -2
- package/dist/io.cjs +2 -2
- package/dist/io.js +2 -2
- package/dist/kernel/brepkit/brepkitWasmTypes.d.ts +10 -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-BAM49XJy.cjs} +1 -1
- package/dist/{loftFns-BVbzy6gm.js → loftFns-DF3KNz9-.js} +1 -1
- package/dist/{measureFns-BNHvjShh.cjs → measureFns-Ym_I522s.cjs} +3 -3
- package/dist/{measureFns-7Nz5JklM.js → measureFns-xpevHRLG.js} +3 -3
- package/dist/measurement.cjs +1 -1
- package/dist/measurement.js +1 -1
- package/dist/{meshFns-YXFipjjx.cjs → meshFns-DDhKhVK0.cjs} +3 -3
- package/dist/{meshFns-CWwOpBlM.js → meshFns-soCHj3jp.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-BmUIWDC7.js +300 -0
- package/dist/primitiveFns-SEyCwNra.cjs +461 -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/{shapeFns-B6UAiYAx.js → shapeFns-B8REDWBf.js} +2 -2
- package/dist/{shapeFns-sF0x5Zhj.cjs → shapeFns-CE6c_4D4.cjs} +2 -2
- package/dist/shapeRef.cjs +1 -1
- package/dist/shapeRef.js +1 -1
- package/dist/{shapeRefFns-Bb0aQZWz.cjs → shapeRefFns-C3tglb5A.cjs} +4 -4
- package/dist/{shapeRefFns-NdQvPa5J.js → shapeRefFns-O5h8bOr9.js} +4 -4
- package/dist/{shapeTypes-D4Evnmz_.js → shapeTypes-B8d_6R0X.js} +9 -6
- package/dist/{shapeTypes-D1eUDuzl.cjs → shapeTypes-nFeOa7gQ.cjs} +9 -6
- package/dist/sketching.cjs +3 -3
- package/dist/sketching.js +3 -3
- package/dist/{primitiveFns-CjL5bygY.js → solidBuilders-BSnsqitN.js} +100 -257
- package/dist/{primitiveFns-LWkd7M2f.cjs → solidBuilders-DfGIPlQ2.cjs} +124 -383
- package/dist/{surfaceBuilders-R4DKNFkI.cjs → surfaceBuilders-CDX6sDZz.cjs} +2 -2
- package/dist/{surfaceBuilders-CLMyFimy.js → surfaceBuilders-D5sQZ6ah.js} +2 -2
- package/dist/text.cjs +2 -2
- package/dist/text.js +2 -2
- package/dist/{textBlueprints-BjSwFtO2.cjs → textBlueprints-BwRqV98S.cjs} +31 -48
- package/dist/{textBlueprints-BJ22J1c2.js → textBlueprints-Cqu-mcRD.js} +32 -49
- package/dist/{textMetrics-BrSfzuY6.js → textMetrics-Cikow3vH.js} +1 -1
- package/dist/{textMetrics-5DyMA99n.cjs → textMetrics-DpCTYcE2.cjs} +1 -1
- package/dist/{threadFns-DqMbjyxZ.js → threadFns-BQHEnI7a.js} +6 -5
- package/dist/{threadFns-CX9l8sRv.cjs → threadFns-BzFhh87N.cjs} +8 -7
- package/dist/topology.cjs +10 -9
- package/dist/topology.js +8 -7
- package/dist/{topologyQueryFns-5EeBz6_7.js → topologyQueryFns-BcGLEMvc.js} +1 -1
- package/dist/{topologyQueryFns-Nnu56Ke2.cjs → topologyQueryFns-Bhey0q1G.cjs} +1 -1
- package/package.json +16 -16
- package/dist/solidBuilders-CgPOdC3Q.js +0 -140
- package/dist/solidBuilders-mxHbGDW6.cjs +0 -199
|
@@ -1,18 +1,36 @@
|
|
|
1
|
-
import { Q as getKernel2D, Z as getKernel } from "./shapeTypes-
|
|
1
|
+
import { Q as getKernel2D, Z as getKernel } from "./shapeTypes-B8d_6R0X.js";
|
|
2
2
|
import { n as wasmIndex } from "./vec3-Dpha8d5k.js";
|
|
3
3
|
import { A as ok, R as unwrap, T as isOk, b as err, h as bug, n as computationError, s as safeIndex } from "./errors-DNWJsfVU.js";
|
|
4
4
|
import { r as RAD2DEG, t as DEG2RAD } from "./constants-ITRzCnCp.js";
|
|
5
5
|
import { t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
6
|
-
import { _ as samePoint, b as subtract2d, d as cartesianToPolar, f as crossProduct2d, g as rotate2d, h as polarToCartesian, l as add2d, m as polarAngle2d, o as normalize2d, p as distance2d, v as scalarMultiply2d } from "./helpers-
|
|
7
|
-
import { _ as Curve2D, c as make2dCircle, f as make2dSegmentCurve, h as approximateAsBSpline, m as make2dThreePointArc, n as asSVG, o as make2dArcFromCenter, p as make2dTangentArc, r as viewbox, s as make2dBezierCurve, t as Blueprint, u as make2dEllipseArc, x as isPoint2D, y as BoundingBox2d } from "./blueprint-
|
|
6
|
+
import { _ as samePoint, b as subtract2d, d as cartesianToPolar, f as crossProduct2d, g as rotate2d, h as polarToCartesian, l as add2d, m as polarAngle2d, o as normalize2d, p as distance2d, v as scalarMultiply2d } from "./helpers-CJV31xig.js";
|
|
7
|
+
import { _ as Curve2D, c as make2dCircle, f as make2dSegmentCurve, h as approximateAsBSpline, m as make2dThreePointArc, n as asSVG, o as make2dArcFromCenter, p as make2dTangentArc, r as viewbox, s as make2dBezierCurve, t as Blueprint, u as make2dEllipseArc, x as isPoint2D, y as BoundingBox2d } from "./blueprint-yJsyEFn_.js";
|
|
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
|
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-CDX6sDZz.cjs");
|
|
5
|
+
const require_blueprintSketcher = require("./blueprintSketcher-BLXntEIS.cjs");
|
|
6
|
+
const require_helpers = require("./helpers-rAK5qEBu.cjs");
|
|
7
|
+
const require_blueprint = require("./blueprint-C2gkyxYc.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.
|
|
@@ -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-D5sQZ6ah.js";
|
|
5
|
+
import { a as Blueprints, i as CompoundBlueprint, l as intersectCurves, r as organiseBlueprints, t as BlueprintSketcher, u as Flatbush } from "./blueprintSketcher-BbYPEPMa.js";
|
|
6
|
+
import { _ as samePoint$1, b as subtract2d, f as crossProduct2d, s as PRECISION_INTERSECTION } from "./helpers-CJV31xig.js";
|
|
7
|
+
import { b as removeDuplicatePoints, f as make2dSegmentCurve, t as Blueprint } from "./blueprint-yJsyEFn_.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.
|
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-BwRqV98S.cjs");
|
|
3
|
+
const require_shapeTypes = require("./shapeTypes-nFeOa7gQ.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-Bhey0q1G.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-Obtamglc.cjs");
|
|
13
|
+
const require_shapeFns = require("./shapeFns-CE6c_4D4.cjs");
|
|
14
|
+
const require_curveFns = require("./curveFns-Dlbfncal.cjs");
|
|
15
|
+
const require_meshFns = require("./meshFns-DDhKhVK0.cjs");
|
|
16
16
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
17
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
18
|
-
const
|
|
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
|
|
25
|
-
const
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
const
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
const
|
|
33
|
-
const require_shapeRefFns = require("./shapeRefFns-Bb0aQZWz.cjs");
|
|
17
|
+
const require_surfaceBuilders = require("./surfaceBuilders-CDX6sDZz.cjs");
|
|
18
|
+
const require_solidBuilders = require("./solidBuilders-DfGIPlQ2.cjs");
|
|
19
|
+
const require_healingFns = require("./healingFns-gHxvhsbJ.cjs");
|
|
20
|
+
const require_threadFns = require("./threadFns-BzFhh87N.cjs");
|
|
21
|
+
const require_blueprintSketcher = require("./blueprintSketcher-BLXntEIS.cjs");
|
|
22
|
+
const require_helpers = require("./helpers-rAK5qEBu.cjs");
|
|
23
|
+
const require_drawFns = require("./drawFns-lls9IuPY.cjs");
|
|
24
|
+
const require_measureFns = require("./measureFns-Ym_I522s.cjs");
|
|
25
|
+
const require_cornerFinder = require("./cornerFinder-D3lGL_Td.cjs");
|
|
26
|
+
const require_boolean2D = require("./boolean2D-BbvyYF-v.cjs");
|
|
27
|
+
const require_blueprintFns = require("./blueprintFns-CL4VZzCL.cjs");
|
|
28
|
+
const require_importFns = require("./importFns-BJVEly-l.cjs");
|
|
29
|
+
const require_loftFns = require("./loftFns-BAM49XJy.cjs");
|
|
30
|
+
const require_cameraFns = require("./cameraFns-BkSHm_Vo.cjs");
|
|
31
|
+
const require_textMetrics = require("./textMetrics-DpCTYcE2.cjs");
|
|
32
|
+
const require_shapeRefFns = require("./shapeRefFns-C3tglb5A.cjs");
|
|
34
33
|
const require_workerHandler = require("./workerHandler-CdlOTwJg.cjs");
|
|
34
|
+
const require_primitiveFns = require("./primitiveFns-SEyCwNra.cjs");
|
|
35
35
|
//#region src/topology/shapeBooleans.ts
|
|
36
36
|
var BOPAlgo_GlueShift = 1;
|
|
37
37
|
var BOPAlgo_GlueFull = 2;
|
|
@@ -3342,40 +3342,40 @@ function transformCopy(shape, composed) {
|
|
|
3342
3342
|
}
|
|
3343
3343
|
/** Fuse two 3D shapes (boolean union). */
|
|
3344
3344
|
function fuse(a, b, options) {
|
|
3345
|
-
return
|
|
3345
|
+
return require_solidBuilders.fuse(resolve(a), resolve(b), {
|
|
3346
3346
|
...options,
|
|
3347
3347
|
unsafe: true
|
|
3348
3348
|
});
|
|
3349
3349
|
}
|
|
3350
3350
|
/** Cut a tool from a base shape (boolean subtraction). */
|
|
3351
3351
|
function cut(base, tool, options) {
|
|
3352
|
-
return
|
|
3352
|
+
return require_solidBuilders.cut(resolve(base), resolve(tool), {
|
|
3353
3353
|
...options,
|
|
3354
3354
|
unsafe: true
|
|
3355
3355
|
});
|
|
3356
3356
|
}
|
|
3357
3357
|
/** Compute the intersection of two shapes (boolean common). */
|
|
3358
3358
|
function intersect(a, b, options) {
|
|
3359
|
-
return
|
|
3359
|
+
return require_solidBuilders.intersect(resolve(a), resolve(b), {
|
|
3360
3360
|
...options,
|
|
3361
3361
|
unsafe: true
|
|
3362
3362
|
});
|
|
3363
3363
|
}
|
|
3364
3364
|
/** Section (cross-section) a shape with a plane. */
|
|
3365
3365
|
function section(shape, plane, options) {
|
|
3366
|
-
return
|
|
3366
|
+
return require_solidBuilders.section(resolve(shape), plane, options);
|
|
3367
3367
|
}
|
|
3368
3368
|
/** Section a shape with a plane and return a filled Face. */
|
|
3369
3369
|
function sectionToFace(shape, plane, options) {
|
|
3370
|
-
return
|
|
3370
|
+
return require_solidBuilders.sectionToFace(resolve(shape), plane, options);
|
|
3371
3371
|
}
|
|
3372
3372
|
/** Split a shape with tool shapes. */
|
|
3373
3373
|
function split(shape, tools) {
|
|
3374
|
-
return
|
|
3374
|
+
return require_solidBuilders.split(resolve(shape), tools);
|
|
3375
3375
|
}
|
|
3376
3376
|
/** Slice a shape with multiple planes. */
|
|
3377
3377
|
function slice(shape, planes, options) {
|
|
3378
|
-
return
|
|
3378
|
+
return require_solidBuilders.slice(resolve(shape), planes, options);
|
|
3379
3379
|
}
|
|
3380
3380
|
/**
|
|
3381
3381
|
* Resolve a FinderFn callback or ShapeFinder into an array of elements.
|
|
@@ -3667,7 +3667,7 @@ function drill(shape, options) {
|
|
|
3667
3667
|
pos[2] + dir[2] * tMin
|
|
3668
3668
|
], dir);
|
|
3669
3669
|
}
|
|
3670
|
-
return
|
|
3670
|
+
return require_solidBuilders.cut(s, tool, { unsafe: true });
|
|
3671
3671
|
}
|
|
3672
3672
|
/**
|
|
3673
3673
|
* Cut a pocket (2D profile extruded inward) into a shape.
|
|
@@ -3688,7 +3688,7 @@ function pocket(shape, options) {
|
|
|
3688
3688
|
if (require_errors.isErr(faceResult)) return faceResult;
|
|
3689
3689
|
const toolResult = require_loftFns.extrude(require_shapeFns.translate(faceResult.value, center), require_vecOps.vecScale(require_vecOps.vecNormalize(normal), -depth));
|
|
3690
3690
|
if (require_errors.isErr(toolResult)) return toolResult;
|
|
3691
|
-
return
|
|
3691
|
+
return require_solidBuilders.cut(s, toolResult.value, { unsafe: true });
|
|
3692
3692
|
}
|
|
3693
3693
|
/**
|
|
3694
3694
|
* Add a boss (2D profile extruded outward) onto a shape.
|
|
@@ -3709,7 +3709,7 @@ function boss(shape, options) {
|
|
|
3709
3709
|
if (require_errors.isErr(faceResult)) return faceResult;
|
|
3710
3710
|
const toolResult = require_loftFns.extrude(require_shapeFns.translate(faceResult.value, center), require_vecOps.vecScale(require_vecOps.vecNormalize(normal), height));
|
|
3711
3711
|
if (require_errors.isErr(toolResult)) return toolResult;
|
|
3712
|
-
return
|
|
3712
|
+
return require_solidBuilders.fuse(s, toolResult.value, { unsafe: true });
|
|
3713
3713
|
}
|
|
3714
3714
|
/**
|
|
3715
3715
|
* Mirror a shape and fuse it with the original.
|
|
@@ -3725,7 +3725,7 @@ function mirrorJoin(shape, options) {
|
|
|
3725
3725
|
];
|
|
3726
3726
|
const planeOrigin = options?.at;
|
|
3727
3727
|
if (require_vecOps.vecIsZero(normal)) return require_errors.err(require_errors.validationError("MIRROR_ZERO_NORMAL", "Mirror plane normal cannot be zero"));
|
|
3728
|
-
return
|
|
3728
|
+
return require_solidBuilders.fuse(s, require_shapeFns.mirror(s, normal, planeOrigin), { unsafe: true });
|
|
3729
3729
|
}
|
|
3730
3730
|
/**
|
|
3731
3731
|
* Create a rectangular (2D grid) pattern of a shape.
|
|
@@ -3752,7 +3752,7 @@ function rectangularPattern(shape, options) {
|
|
|
3752
3752
|
];
|
|
3753
3753
|
copies.push(require_shapeFns.translate(s, offset));
|
|
3754
3754
|
}
|
|
3755
|
-
return
|
|
3755
|
+
return require_solidBuilders.fuseAll(copies, { unsafe: true });
|
|
3756
3756
|
}
|
|
3757
3757
|
//#endregion
|
|
3758
3758
|
//#region src/topology/wrapperFns.ts
|
|
@@ -3869,11 +3869,11 @@ function create3DBooleans(val) {
|
|
|
3869
3869
|
...opts,
|
|
3870
3870
|
unsafe: true
|
|
3871
3871
|
}))),
|
|
3872
|
-
fuseAll: (tools, opts) => wrap3D(trustAsT(unwrapOrThrow(
|
|
3872
|
+
fuseAll: (tools, opts) => wrap3D(trustAsT(unwrapOrThrow(require_solidBuilders.fuseAll([val, ...tools.map(resolve)], {
|
|
3873
3873
|
...opts,
|
|
3874
3874
|
unsafe: true
|
|
3875
3875
|
})))),
|
|
3876
|
-
cutAll: (tools, opts) => wrap3D(trustAsT(unwrapOrThrow(
|
|
3876
|
+
cutAll: (tools, opts) => wrap3D(trustAsT(unwrapOrThrow(require_solidBuilders.cutAll(val, tools, {
|
|
3877
3877
|
...opts,
|
|
3878
3878
|
unsafe: true
|
|
3879
3879
|
})))),
|
|
@@ -4483,7 +4483,7 @@ function finalizeExternalSolid(wire, thickness, bore, geom, diagnostics) {
|
|
|
4483
4483
|
0,
|
|
4484
4484
|
-.5
|
|
4485
4485
|
]));
|
|
4486
|
-
const cutResult =
|
|
4486
|
+
const cutResult = require_solidBuilders.cut(solidResult.value, boreSolid);
|
|
4487
4487
|
if (require_errors.isErr(cutResult)) return cutResult;
|
|
4488
4488
|
return require_errors.ok(buildGearResult(cutResult.value, geom, diagnostics));
|
|
4489
4489
|
} catch (_) {
|
|
@@ -4661,10 +4661,10 @@ var booleans_exports = /* @__PURE__ */ require_textBlueprints.__exportAll({
|
|
|
4661
4661
|
checkBoolean: () => require_healingFns.checkBoolean,
|
|
4662
4662
|
convexHull: () => convexHull,
|
|
4663
4663
|
cut: () => cut,
|
|
4664
|
-
cutAll: () =>
|
|
4664
|
+
cutAll: () => require_solidBuilders.cutAll,
|
|
4665
4665
|
cutAllBisect: () => require_healingFns.cutAllBisect,
|
|
4666
4666
|
fuse: () => fuse,
|
|
4667
|
-
fuseAll: () =>
|
|
4667
|
+
fuseAll: () => require_solidBuilders.fuseAll,
|
|
4668
4668
|
fuseAllBisect: () => require_healingFns.fuseAllBisect,
|
|
4669
4669
|
hull: () => hull,
|
|
4670
4670
|
intersect: () => intersect,
|
|
@@ -5450,7 +5450,7 @@ function evalFuse(node, ctx) {
|
|
|
5450
5450
|
if (!a.ok) return a;
|
|
5451
5451
|
const b = resolveOperand(ctx, node.b, "Fuse.b");
|
|
5452
5452
|
if (!b.ok) return b;
|
|
5453
|
-
return
|
|
5453
|
+
return require_solidBuilders.fuse(a.value, b.value, boolOptions(node, ctx));
|
|
5454
5454
|
}
|
|
5455
5455
|
function evalCut(node, ctx) {
|
|
5456
5456
|
if (node.a.kind === "Empty") return emptyResult$1("Cut");
|
|
@@ -5459,7 +5459,7 @@ function evalCut(node, ctx) {
|
|
|
5459
5459
|
if (!a.ok) return a;
|
|
5460
5460
|
const b = resolveOperand(ctx, node.b, "Cut.b");
|
|
5461
5461
|
if (!b.ok) return b;
|
|
5462
|
-
return
|
|
5462
|
+
return require_solidBuilders.cut(a.value, b.value, boolOptions(node, ctx));
|
|
5463
5463
|
}
|
|
5464
5464
|
function evalIntersect(node, ctx) {
|
|
5465
5465
|
if (node.a.kind === "Empty" || node.b.kind === "Empty") return emptyResult$1("Intersect");
|
|
@@ -5467,7 +5467,7 @@ function evalIntersect(node, ctx) {
|
|
|
5467
5467
|
if (!a.ok) return a;
|
|
5468
5468
|
const b = resolveOperand(ctx, node.b, "Intersect.b");
|
|
5469
5469
|
if (!b.ok) return b;
|
|
5470
|
-
return
|
|
5470
|
+
return require_solidBuilders.intersect(a.value, b.value, boolOptions(node, ctx));
|
|
5471
5471
|
}
|
|
5472
5472
|
function resolveAll(ctx, nodes, where) {
|
|
5473
5473
|
const out = [];
|
|
@@ -5484,7 +5484,7 @@ function evalFuseAll(node, ctx) {
|
|
|
5484
5484
|
if (non.length === 1 && non[0]) return ctx.evalNode(non[0]);
|
|
5485
5485
|
const resolved = resolveAll(ctx, non, "FuseAll.operand");
|
|
5486
5486
|
if (!resolved.ok) return resolved;
|
|
5487
|
-
return
|
|
5487
|
+
return require_solidBuilders.fuseAll(resolved.value, boolOptions(node, ctx));
|
|
5488
5488
|
}
|
|
5489
5489
|
function evalCutAll(node, ctx) {
|
|
5490
5490
|
if (node.base.kind === "Empty") return emptyResult$1("CutAll");
|
|
@@ -5494,7 +5494,7 @@ function evalCutAll(node, ctx) {
|
|
|
5494
5494
|
if (!base.ok) return base;
|
|
5495
5495
|
const resolved = resolveAll(ctx, tools, "CutAll.tool");
|
|
5496
5496
|
if (!resolved.ok) return resolved;
|
|
5497
|
-
return
|
|
5497
|
+
return require_solidBuilders.cutAll(base.value, resolved.value, boolOptions(node, ctx));
|
|
5498
5498
|
}
|
|
5499
5499
|
//#endregion
|
|
5500
5500
|
//#region src/csg/evaluators/transforms.ts
|
|
@@ -6491,7 +6491,7 @@ exports.assignRoles = require_shapeRefFns.assignRoles;
|
|
|
6491
6491
|
exports.autoHeal = require_healingFns.autoHeal;
|
|
6492
6492
|
exports.bezier = require_primitiveFns.bezier;
|
|
6493
6493
|
exports.blueprintToDXF = require_importFns.blueprintToDXF;
|
|
6494
|
-
exports.booleanPipeline =
|
|
6494
|
+
exports.booleanPipeline = require_solidBuilders.booleanPipeline;
|
|
6495
6495
|
Object.defineProperty(exports, "booleans", {
|
|
6496
6496
|
enumerable: true,
|
|
6497
6497
|
get: function() {
|
|
@@ -6594,7 +6594,7 @@ exports.curveStartPoint = require_curveFns.curveStartPoint;
|
|
|
6594
6594
|
exports.curveTangentAt = require_curveFns.curveTangentAt;
|
|
6595
6595
|
exports.cut = cut;
|
|
6596
6596
|
exports.cut2D = require_boolean2D.cut2D;
|
|
6597
|
-
exports.cutAll =
|
|
6597
|
+
exports.cutAll = require_solidBuilders.cutAll;
|
|
6598
6598
|
exports.cutAllBisect = require_healingFns.cutAllBisect;
|
|
6599
6599
|
exports.cutBlueprints = require_boolean2D.cutBlueprints;
|
|
6600
6600
|
exports.cutWithEvolution = require_healingFns.cutWithEvolution;
|
|
@@ -6682,7 +6682,7 @@ exports.fromKernelVec = fromKernelVec;
|
|
|
6682
6682
|
exports.fromNullable = require_errors.fromNullable;
|
|
6683
6683
|
exports.fuse = fuse;
|
|
6684
6684
|
exports.fuse2D = require_boolean2D.fuse2D;
|
|
6685
|
-
exports.fuseAll =
|
|
6685
|
+
exports.fuseAll = require_solidBuilders.fuseAll;
|
|
6686
6686
|
exports.fuseAllBisect = require_healingFns.fuseAllBisect;
|
|
6687
6687
|
exports.fuseBlueprints = require_boolean2D.fuseBlueprints;
|
|
6688
6688
|
exports.fuseWithEvolution = require_healingFns.fuseWithEvolution;
|