brepjs 18.118.2 → 18.118.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/2d.cjs +6 -6
- package/dist/2d.js +6 -6
- package/dist/{adjacencyFns-COWMJ1OX.cjs → adjacencyFns-CiDCunAU.cjs} +2 -2
- package/dist/{adjacencyFns-D026zKM3.js → adjacencyFns-CxepMm7H.js} +2 -2
- package/dist/{blueprint-BeCL-AAl.js → blueprint-BIf01dZl.js} +15 -10
- package/dist/{blueprint-xcDMSkia.cjs → blueprint-Bp_sSxx2.cjs} +17 -11
- package/dist/{blueprintFns-DIMiD67q.cjs → blueprintFns-Dc8amB5a.cjs} +2 -2
- package/dist/{blueprintFns-BkSFPipn.js → blueprintFns-Dl_drDhd.js} +2 -2
- package/dist/{blueprintSketcher-DKfkNg71.js → blueprintSketcher-D-xSC6Mp.js} +5 -4
- package/dist/{blueprintSketcher-DGcCDQq2.cjs → blueprintSketcher-XiLc6fJ4.cjs} +5 -4
- package/dist/{boolean2D-BCTOcf19.js → boolean2D-BNjpYyZl.js} +5 -5
- package/dist/{boolean2D-Dh4IPW_X.cjs → boolean2D-BfKG5Wio.cjs} +7 -6
- package/dist/brepjs.cjs +29 -29
- package/dist/brepjs.js +29 -29
- package/dist/{cameraFns-BAm-2Clq.cjs → cameraFns-ClE0QcuX.cjs} +2 -2
- package/dist/{cameraFns-CRln-7RT.js → cameraFns-DyMKpFHq.js} +2 -2
- package/dist/core/shapeTypes.d.ts +32 -0
- package/dist/core.cjs +1 -1
- package/dist/core.js +1 -1
- package/dist/{cornerFinder-DMJBP4I2.cjs → cornerFinder-CINnfCPc.cjs} +1 -1
- package/dist/{cornerFinder-Bu482P3S.js → cornerFinder-DFswCdwf.js} +1 -1
- package/dist/{curveFns-pGQFlJG-.js → curveFns-BYcTyyb7.js} +1 -1
- package/dist/{curveFns-CpaxYpa4.cjs → curveFns-YvH970hp.cjs} +1 -1
- package/dist/{drawFns-D-PqWuBQ.cjs → drawFns-CG3ksr6q.cjs} +14 -13
- package/dist/{drawFns-BAETgRWM.js → drawFns-DkhqDgS5.js} +14 -13
- package/dist/{faceFns-Bc6sBrBV.js → faceFns-CpOAl1K5.js} +2 -2
- package/dist/{faceFns-rbWcdpvj.cjs → faceFns-DnLXDWq2.cjs} +4 -3
- package/dist/{healingFns-DfshoSeQ.cjs → healingFns-BIcPeCM9.cjs} +16 -15
- package/dist/{healingFns-DHxzmeCt.js → healingFns-BP0xjoIs.js} +16 -15
- package/dist/{helpers-YD71h41H.js → helpers-BVkEnH5n.js} +6 -6
- package/dist/{helpers-CKbgoPDr.cjs → helpers-Beq_ugyN.cjs} +6 -6
- package/dist/{importFns-CQ16LqPQ.cjs → importFns-BZYgEOu-.cjs} +4 -4
- package/dist/{importFns-A437Sgj6.js → importFns-DPQmk2TS.js} +4 -4
- package/dist/io.cjs +2 -2
- package/dist/io.js +2 -2
- package/dist/kernel/occtWasm/booleanOps.d.ts +9 -1
- package/dist/kernel/occtWasm/occtWasmAdapter.cjs +1 -1
- package/dist/kernel/occtWasm/occtWasmAdapter.js +1 -1
- package/dist/kernel/types.d.ts +2 -4
- package/dist/{loftFns-BQktV4u4.cjs → loftFns-CZC_NH_h.cjs} +1 -1
- package/dist/{loftFns-CXc9tRv6.js → loftFns-NauDWzek.js} +1 -1
- package/dist/{measureFns-B_vJqwDc.js → measureFns-BLmLZr0K.js} +3 -3
- package/dist/{measureFns-I5KcAgSb.cjs → measureFns-C4BxD4kC.cjs} +3 -3
- package/dist/measurement.cjs +1 -1
- package/dist/measurement.js +1 -1
- package/dist/{meshFns-COdN1kVO.js → meshFns-BK5O_pJ9.js} +3 -3
- package/dist/{meshFns-fPnPGEPl.cjs → meshFns-BoF6g1go.cjs} +3 -3
- package/dist/{occtWasmAdapter-B2TEQOjs.cjs → occtWasmAdapter-Bj9dX3Lb.cjs} +45 -10
- package/dist/{occtWasmAdapter-CKwtxwNH.js → occtWasmAdapter-wBLknH8f.js} +45 -10
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/{primitiveFns-DxP7GVQh.js → primitiveFns-DJUXtN6W.js} +4 -4
- package/dist/{primitiveFns-Cohp602Q.cjs → primitiveFns-DOyyz54-.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/{refResolveFns-NGXXyTBa.js → refResolveFns-DL1zXF8u.js} +18 -11
- package/dist/{refResolveFns-Du0v4e3Y.cjs → refResolveFns-DbTYd_Nj.cjs} +18 -11
- package/dist/{shapeFns-DqGDtCsE.js → shapeFns-DED4C70_.js} +84 -23
- package/dist/{shapeFns-DvmBIZaX.cjs → shapeFns-DxAhtxFP.cjs} +84 -23
- package/dist/shapeRef.cjs +1 -1
- package/dist/shapeRef.js +1 -1
- package/dist/{shapeTypes-EI4Uxlsb.js → shapeTypes-BguzpBK0.js} +70 -22
- package/dist/{shapeTypes-BLREi6xB.cjs → shapeTypes-Ca76Bklg.cjs} +87 -21
- package/dist/sketching.cjs +3 -3
- package/dist/sketching.js +3 -3
- package/dist/{solidBuilders-Oq-hxTvJ.js → solidBuilders-_8mqPO7I.js} +6 -5
- package/dist/{solidBuilders-B6DBRdRc.cjs → solidBuilders-yyfZ2Q-7.cjs} +6 -5
- package/dist/{surfaceBuilders-C0pJwtCO.js → surfaceBuilders-CT__o6Be.js} +2 -2
- package/dist/{surfaceBuilders-C-UhFlpS.cjs → surfaceBuilders-De2XKidK.cjs} +2 -2
- package/dist/text.cjs +2 -2
- package/dist/text.js +2 -2
- package/dist/{textBlueprints-lSKzw-nT.cjs → textBlueprints-C17PPSzH.cjs} +9 -8
- package/dist/{textBlueprints-fBpuvT3m.js → textBlueprints-D9l3v-f3.js} +9 -8
- package/dist/{textMetrics-BkTdFBwC.cjs → textMetrics-BwQ7TD47.cjs} +1 -1
- package/dist/{textMetrics-CnrAQwLI.js → textMetrics-GSAxEtaJ.js} +1 -1
- package/dist/{threadFns-DJt3EStH.cjs → threadFns-Bu2c-lu_.cjs} +8 -8
- package/dist/{threadFns-Dlts4xFy.js → threadFns-DOqhI5OK.js} +8 -8
- package/dist/topology.cjs +9 -9
- package/dist/topology.js +9 -9
- package/dist/{topologyQueryFns-1PqfeHrV.cjs → topologyQueryFns-B1QAiZVI.cjs} +1 -1
- package/dist/{topologyQueryFns-BjgBf2t-.js → topologyQueryFns-Dl2F-2d9.js} +1 -1
- package/package.json +16 -15
package/dist/measurement.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_measureFns = require("./measureFns-
|
|
2
|
+
const require_measureFns = require("./measureFns-C4BxD4kC.cjs");
|
|
3
3
|
exports.createDistanceQuery = require_measureFns.createDistanceQuery;
|
|
4
4
|
exports.measureArea = require_measureFns.measureArea;
|
|
5
5
|
exports.measureDistance = require_measureFns.measureDistance;
|
package/dist/measurement.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as measureDistance, c as measureLinearProps, d as measureVolumeProps, l as measureSurfaceProps, n as measureArea, o as measureDistanceProps, s as measureLength, t as createDistanceQuery, u as measureVolume } from "./measureFns-
|
|
1
|
+
import { a as measureDistance, c as measureLinearProps, d as measureVolumeProps, l as measureSurfaceProps, n as measureArea, o as measureDistanceProps, s as measureLength, t as createDistanceQuery, u as measureVolume } from "./measureFns-BLmLZr0K.js";
|
|
2
2
|
export { createDistanceQuery, measureArea, measureDistance, measureDistanceProps, measureLength, measureLinearProps, measureSurfaceProps, measureVolume, measureVolumeProps };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { et as getKernel, yt as qualityDeflection } from "./shapeTypes-BguzpBK0.js";
|
|
2
2
|
import { A as ok, b as err, r as ioError } from "./errors-DNWJsfVU.js";
|
|
3
|
-
import { d as getSolids, n as getBounds } from "./topologyQueryFns-
|
|
4
|
-
import { j as getFaceOrigins } from "./shapeFns-
|
|
3
|
+
import { d as getSolids, n as getBounds } from "./topologyQueryFns-Dl2F-2d9.js";
|
|
4
|
+
import { j as getFaceOrigins } from "./shapeFns-DED4C70_.js";
|
|
5
5
|
//#region src/topology/meshCache.ts
|
|
6
6
|
/**
|
|
7
7
|
* Build a parameter key for the inner cache map (excludes shape identity).
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-Ca76Bklg.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
4
|
-
const require_shapeFns = require("./shapeFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-B1QAiZVI.cjs");
|
|
4
|
+
const require_shapeFns = require("./shapeFns-DxAhtxFP.cjs");
|
|
5
5
|
//#region src/topology/meshCache.ts
|
|
6
6
|
/**
|
|
7
7
|
* Build a parameter key for the inner cache map (excludes shape identity).
|
|
@@ -171,11 +171,12 @@ function quickHull(inputPoints, tolerance) {
|
|
|
171
171
|
};
|
|
172
172
|
function makeOutwardFace(a, b, c) {
|
|
173
173
|
const face = makeFace$1(points, a, b, c);
|
|
174
|
-
const
|
|
174
|
+
const faceCenter = {
|
|
175
175
|
x: (at(points, a).x + at(points, b).x + at(points, c).x) / 3,
|
|
176
176
|
y: (at(points, a).y + at(points, b).y + at(points, c).y) / 3,
|
|
177
177
|
z: (at(points, a).z + at(points, b).z + at(points, c).z) / 3
|
|
178
|
-
}
|
|
178
|
+
};
|
|
179
|
+
const toCentroid = sub(centroid, faceCenter);
|
|
179
180
|
if (dot(face.normal, toCentroid) > 0) return makeFace$1(points, a, c, b);
|
|
180
181
|
return face;
|
|
181
182
|
}
|
|
@@ -185,7 +186,7 @@ function quickHull(inputPoints, tolerance) {
|
|
|
185
186
|
makeOutwardFace(t0, t3, t1),
|
|
186
187
|
makeOutwardFace(t1, t3, t2)
|
|
187
188
|
];
|
|
188
|
-
const tetSet = new Set([
|
|
189
|
+
const tetSet = /* @__PURE__ */ new Set([
|
|
189
190
|
t0,
|
|
190
191
|
t1,
|
|
191
192
|
t2,
|
|
@@ -1341,8 +1342,24 @@ function resolveBooleanTool(k, tool) {
|
|
|
1341
1342
|
const toolId = unwrap(tool);
|
|
1342
1343
|
const solids = k.getSubShapes(toolId, "solid");
|
|
1343
1344
|
try {
|
|
1344
|
-
|
|
1345
|
+
if (solids.size() > 1) {
|
|
1346
|
+
const fusedId = k.fuseAll(solids);
|
|
1347
|
+
return {
|
|
1348
|
+
id: fusedId,
|
|
1349
|
+
dispose: () => {
|
|
1350
|
+
k.release(fusedId);
|
|
1351
|
+
}
|
|
1352
|
+
};
|
|
1353
|
+
}
|
|
1354
|
+
return {
|
|
1355
|
+
id: toolId,
|
|
1356
|
+
dispose: () => {}
|
|
1357
|
+
};
|
|
1345
1358
|
} finally {
|
|
1359
|
+
for (let i = 0, n = solids.size(); i < n; i++) {
|
|
1360
|
+
const id = solids.get(i);
|
|
1361
|
+
if (id !== toolId) k.release(id);
|
|
1362
|
+
}
|
|
1346
1363
|
solids.delete();
|
|
1347
1364
|
}
|
|
1348
1365
|
}
|
|
@@ -1350,10 +1367,20 @@ function fuse(k, shape, tool, _options) {
|
|
|
1350
1367
|
return wrapResult(k, k.fuse(unwrap(shape), unwrap(tool)));
|
|
1351
1368
|
}
|
|
1352
1369
|
function cut(k, shape, tool, _options) {
|
|
1353
|
-
|
|
1370
|
+
const resolved = resolveBooleanTool(k, tool);
|
|
1371
|
+
try {
|
|
1372
|
+
return wrapResult(k, k.cut(unwrap(shape), resolved.id));
|
|
1373
|
+
} finally {
|
|
1374
|
+
resolved.dispose();
|
|
1375
|
+
}
|
|
1354
1376
|
}
|
|
1355
1377
|
function intersect(k, shape, tool, _options) {
|
|
1356
|
-
|
|
1378
|
+
const resolved = resolveBooleanTool(k, tool);
|
|
1379
|
+
try {
|
|
1380
|
+
return wrapResult(k, k.intersect(unwrap(shape), resolved.id));
|
|
1381
|
+
} finally {
|
|
1382
|
+
resolved.dispose();
|
|
1383
|
+
}
|
|
1357
1384
|
}
|
|
1358
1385
|
function section(k, shape, plane, _approximation) {
|
|
1359
1386
|
return wrapResult(k, k.section(unwrap(shape), unwrap(plane)));
|
|
@@ -1598,7 +1625,7 @@ function mesh(k, Module, shape, options) {
|
|
|
1598
1625
|
}
|
|
1599
1626
|
return {
|
|
1600
1627
|
vertices,
|
|
1601
|
-
normals: options.skipNormals ? new Float32Array(0) : normals,
|
|
1628
|
+
normals: options.skipNormals ? /* @__PURE__ */ new Float32Array(0) : normals,
|
|
1602
1629
|
triangles,
|
|
1603
1630
|
uvs,
|
|
1604
1631
|
faceGroups
|
|
@@ -4326,8 +4353,10 @@ function fuseWithHistory(k, Module, shape, tool, inputFaceHashes, hashUpperBound
|
|
|
4326
4353
|
}
|
|
4327
4354
|
function cutWithHistory(k, Module, shape, tool, inputFaceHashes, hashUpperBound, _options) {
|
|
4328
4355
|
const hashVec = makeVecInt(Module, inputFaceHashes);
|
|
4356
|
+
let resolved;
|
|
4329
4357
|
try {
|
|
4330
|
-
|
|
4358
|
+
resolved = resolveBooleanTool(k, tool);
|
|
4359
|
+
const { id, evolution } = parseEvolution(k.cutWithHistory(unwrap(shape), resolved.id, hashVec, hashUpperBound));
|
|
4331
4360
|
return {
|
|
4332
4361
|
shape: wrapResult(k, id),
|
|
4333
4362
|
evolution,
|
|
@@ -4339,12 +4368,15 @@ function cutWithHistory(k, Module, shape, tool, inputFaceHashes, hashUpperBound,
|
|
|
4339
4368
|
};
|
|
4340
4369
|
} finally {
|
|
4341
4370
|
hashVec.delete();
|
|
4371
|
+
resolved?.dispose();
|
|
4342
4372
|
}
|
|
4343
4373
|
}
|
|
4344
4374
|
function intersectWithHistory(k, Module, shape, tool, inputFaceHashes, hashUpperBound, _options) {
|
|
4345
4375
|
const hashVec = makeVecInt(Module, inputFaceHashes);
|
|
4376
|
+
let resolved;
|
|
4346
4377
|
try {
|
|
4347
|
-
|
|
4378
|
+
resolved = resolveBooleanTool(k, tool);
|
|
4379
|
+
const { id, evolution } = parseEvolution(k.intersectWithHistory(unwrap(shape), resolved.id, hashVec, hashUpperBound));
|
|
4348
4380
|
return {
|
|
4349
4381
|
shape: wrapResult(k, id),
|
|
4350
4382
|
evolution,
|
|
@@ -4356,6 +4388,7 @@ function intersectWithHistory(k, Module, shape, tool, inputFaceHashes, hashUpper
|
|
|
4356
4388
|
};
|
|
4357
4389
|
} finally {
|
|
4358
4390
|
hashVec.delete();
|
|
4391
|
+
resolved?.dispose();
|
|
4359
4392
|
}
|
|
4360
4393
|
}
|
|
4361
4394
|
function filletWithHistory(k, Module, shape, edges, radius, inputFaceHashes, hashUpperBound) {
|
|
@@ -4530,7 +4563,9 @@ var OcctWasmAdapter = class OcctWasmAdapter {
|
|
|
4530
4563
|
* only borrows the raw kernel can be left pointing at freed memory.
|
|
4531
4564
|
*/
|
|
4532
4565
|
static fromKernel(kernel) {
|
|
4533
|
-
|
|
4566
|
+
const module = kernel.getRawModule();
|
|
4567
|
+
const rawKernel = kernel.getRawKernel();
|
|
4568
|
+
return new OcctWasmAdapter(module, rawKernel, kernel);
|
|
4534
4569
|
}
|
|
4535
4570
|
/** The owner retained to keep the borrowed raw kernel alive, or `undefined` when built from a raw kernel. */
|
|
4536
4571
|
get retainedKernelOwner() {
|
|
@@ -171,11 +171,12 @@ function quickHull(inputPoints, tolerance) {
|
|
|
171
171
|
};
|
|
172
172
|
function makeOutwardFace(a, b, c) {
|
|
173
173
|
const face = makeFace$1(points, a, b, c);
|
|
174
|
-
const
|
|
174
|
+
const faceCenter = {
|
|
175
175
|
x: (at(points, a).x + at(points, b).x + at(points, c).x) / 3,
|
|
176
176
|
y: (at(points, a).y + at(points, b).y + at(points, c).y) / 3,
|
|
177
177
|
z: (at(points, a).z + at(points, b).z + at(points, c).z) / 3
|
|
178
|
-
}
|
|
178
|
+
};
|
|
179
|
+
const toCentroid = sub(centroid, faceCenter);
|
|
179
180
|
if (dot(face.normal, toCentroid) > 0) return makeFace$1(points, a, c, b);
|
|
180
181
|
return face;
|
|
181
182
|
}
|
|
@@ -185,7 +186,7 @@ function quickHull(inputPoints, tolerance) {
|
|
|
185
186
|
makeOutwardFace(t0, t3, t1),
|
|
186
187
|
makeOutwardFace(t1, t3, t2)
|
|
187
188
|
];
|
|
188
|
-
const tetSet = new Set([
|
|
189
|
+
const tetSet = /* @__PURE__ */ new Set([
|
|
189
190
|
t0,
|
|
190
191
|
t1,
|
|
191
192
|
t2,
|
|
@@ -1341,8 +1342,24 @@ function resolveBooleanTool(k, tool) {
|
|
|
1341
1342
|
const toolId = unwrap(tool);
|
|
1342
1343
|
const solids = k.getSubShapes(toolId, "solid");
|
|
1343
1344
|
try {
|
|
1344
|
-
|
|
1345
|
+
if (solids.size() > 1) {
|
|
1346
|
+
const fusedId = k.fuseAll(solids);
|
|
1347
|
+
return {
|
|
1348
|
+
id: fusedId,
|
|
1349
|
+
dispose: () => {
|
|
1350
|
+
k.release(fusedId);
|
|
1351
|
+
}
|
|
1352
|
+
};
|
|
1353
|
+
}
|
|
1354
|
+
return {
|
|
1355
|
+
id: toolId,
|
|
1356
|
+
dispose: () => {}
|
|
1357
|
+
};
|
|
1345
1358
|
} finally {
|
|
1359
|
+
for (let i = 0, n = solids.size(); i < n; i++) {
|
|
1360
|
+
const id = solids.get(i);
|
|
1361
|
+
if (id !== toolId) k.release(id);
|
|
1362
|
+
}
|
|
1346
1363
|
solids.delete();
|
|
1347
1364
|
}
|
|
1348
1365
|
}
|
|
@@ -1350,10 +1367,20 @@ function fuse(k, shape, tool, _options) {
|
|
|
1350
1367
|
return wrapResult(k, k.fuse(unwrap(shape), unwrap(tool)));
|
|
1351
1368
|
}
|
|
1352
1369
|
function cut(k, shape, tool, _options) {
|
|
1353
|
-
|
|
1370
|
+
const resolved = resolveBooleanTool(k, tool);
|
|
1371
|
+
try {
|
|
1372
|
+
return wrapResult(k, k.cut(unwrap(shape), resolved.id));
|
|
1373
|
+
} finally {
|
|
1374
|
+
resolved.dispose();
|
|
1375
|
+
}
|
|
1354
1376
|
}
|
|
1355
1377
|
function intersect(k, shape, tool, _options) {
|
|
1356
|
-
|
|
1378
|
+
const resolved = resolveBooleanTool(k, tool);
|
|
1379
|
+
try {
|
|
1380
|
+
return wrapResult(k, k.intersect(unwrap(shape), resolved.id));
|
|
1381
|
+
} finally {
|
|
1382
|
+
resolved.dispose();
|
|
1383
|
+
}
|
|
1357
1384
|
}
|
|
1358
1385
|
function section(k, shape, plane, _approximation) {
|
|
1359
1386
|
return wrapResult(k, k.section(unwrap(shape), unwrap(plane)));
|
|
@@ -1598,7 +1625,7 @@ function mesh(k, Module, shape, options) {
|
|
|
1598
1625
|
}
|
|
1599
1626
|
return {
|
|
1600
1627
|
vertices,
|
|
1601
|
-
normals: options.skipNormals ? new Float32Array(0) : normals,
|
|
1628
|
+
normals: options.skipNormals ? /* @__PURE__ */ new Float32Array(0) : normals,
|
|
1602
1629
|
triangles,
|
|
1603
1630
|
uvs,
|
|
1604
1631
|
faceGroups
|
|
@@ -4326,8 +4353,10 @@ function fuseWithHistory(k, Module, shape, tool, inputFaceHashes, hashUpperBound
|
|
|
4326
4353
|
}
|
|
4327
4354
|
function cutWithHistory(k, Module, shape, tool, inputFaceHashes, hashUpperBound, _options) {
|
|
4328
4355
|
const hashVec = makeVecInt(Module, inputFaceHashes);
|
|
4356
|
+
let resolved;
|
|
4329
4357
|
try {
|
|
4330
|
-
|
|
4358
|
+
resolved = resolveBooleanTool(k, tool);
|
|
4359
|
+
const { id, evolution } = parseEvolution(k.cutWithHistory(unwrap(shape), resolved.id, hashVec, hashUpperBound));
|
|
4331
4360
|
return {
|
|
4332
4361
|
shape: wrapResult(k, id),
|
|
4333
4362
|
evolution,
|
|
@@ -4339,12 +4368,15 @@ function cutWithHistory(k, Module, shape, tool, inputFaceHashes, hashUpperBound,
|
|
|
4339
4368
|
};
|
|
4340
4369
|
} finally {
|
|
4341
4370
|
hashVec.delete();
|
|
4371
|
+
resolved?.dispose();
|
|
4342
4372
|
}
|
|
4343
4373
|
}
|
|
4344
4374
|
function intersectWithHistory(k, Module, shape, tool, inputFaceHashes, hashUpperBound, _options) {
|
|
4345
4375
|
const hashVec = makeVecInt(Module, inputFaceHashes);
|
|
4376
|
+
let resolved;
|
|
4346
4377
|
try {
|
|
4347
|
-
|
|
4378
|
+
resolved = resolveBooleanTool(k, tool);
|
|
4379
|
+
const { id, evolution } = parseEvolution(k.intersectWithHistory(unwrap(shape), resolved.id, hashVec, hashUpperBound));
|
|
4348
4380
|
return {
|
|
4349
4381
|
shape: wrapResult(k, id),
|
|
4350
4382
|
evolution,
|
|
@@ -4356,6 +4388,7 @@ function intersectWithHistory(k, Module, shape, tool, inputFaceHashes, hashUpper
|
|
|
4356
4388
|
};
|
|
4357
4389
|
} finally {
|
|
4358
4390
|
hashVec.delete();
|
|
4391
|
+
resolved?.dispose();
|
|
4359
4392
|
}
|
|
4360
4393
|
}
|
|
4361
4394
|
function filletWithHistory(k, Module, shape, edges, radius, inputFaceHashes, hashUpperBound) {
|
|
@@ -4530,7 +4563,9 @@ var OcctWasmAdapter = class OcctWasmAdapter {
|
|
|
4530
4563
|
* only borrows the raw kernel can be left pointing at freed memory.
|
|
4531
4564
|
*/
|
|
4532
4565
|
static fromKernel(kernel) {
|
|
4533
|
-
|
|
4566
|
+
const module = kernel.getRawModule();
|
|
4567
|
+
const rawKernel = kernel.getRawKernel();
|
|
4568
|
+
return new OcctWasmAdapter(module, rawKernel, kernel);
|
|
4534
4569
|
}
|
|
4535
4570
|
/** The owner retained to keep the borrowed raw kernel alive, or `undefined` when built from a raw kernel. */
|
|
4536
4571
|
get retainedKernelOwner() {
|
package/dist/operations.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_threadFns = require("./threadFns-
|
|
3
|
-
const require_loftFns = require("./loftFns-
|
|
2
|
+
const require_threadFns = require("./threadFns-Bu2c-lu_.cjs");
|
|
3
|
+
const require_loftFns = require("./loftFns-CZC_NH_h.cjs");
|
|
4
4
|
exports.addChild = require_threadFns.addChild;
|
|
5
5
|
exports.addJoint = require_threadFns.addJoint;
|
|
6
6
|
exports.addStep = require_threadFns.addStep;
|
package/dist/operations.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { A as setJointValue, B as createAssemblyNode, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, G as circularPattern, H as removeChild, J as exportAssemblySTEP, K as gridPattern, L as addChild, M as sphericalJoint, O as prismaticJoint, R as collectShapes, S as addJoint, T as jointTransform, U as updateNode, V as findNode, W as walkAssembly, Y as createAssembly, _ as exportURDF, 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, q as linearPattern, 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 countNodes } from "./threadFns-
|
|
2
|
-
import { d as twistExtrude, l as supportExtrude, o as complexExtrude, u as sweep } from "./loftFns-
|
|
1
|
+
import { A as setJointValue, B as createAssemblyNode, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, G as circularPattern, H as removeChild, J as exportAssemblySTEP, K as gridPattern, L as addChild, M as sphericalJoint, O as prismaticJoint, R as collectShapes, S as addJoint, T as jointTransform, U as updateNode, V as findNode, W as walkAssembly, Y as createAssembly, _ as exportURDF, 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, q as linearPattern, 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 countNodes } from "./threadFns-DOqhI5OK.js";
|
|
2
|
+
import { d as twistExtrude, l as supportExtrude, o as complexExtrude, u as sweep } from "./loftFns-NauDWzek.js";
|
|
3
3
|
export { addChild, addJoint, addStep, circularPattern, collectShapes, complexExtrude, countNodes, createAssembly, createAssemblyNode, createHistory, createRegistry, cylindricalJoint, exportAssemblySTEP, exportURDF, findNode, findStep, forwardKinematics, getShape as getHistoryShape, gridPattern, importURDF, inverseKinematics, jointTrajectory, jointTransform, jointsFromDH, linearPattern, mechanismDOF, modifyStep, planarJoint, prismaticJoint, registerOperation, registerShape, removeChild, replayFrom, replayHistory, revoluteJoint, setJointValue, setJointValues, sphericalJoint, stepCount, stepsFrom, supportExtrude, sweep, thread, twistExtrude, undoLast, updateNode, walkAssembly };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { et as getKernel, l as createSolid, w as isClosedWire } from "./shapeTypes-BguzpBK0.js";
|
|
2
2
|
import { A as ok, b as err, d as validationError, v as andThen } from "./errors-DNWJsfVU.js";
|
|
3
3
|
import { t as DEG2RAD } from "./constants-ITRzCnCp.js";
|
|
4
|
-
import { g as translate } from "./shapeFns-
|
|
5
|
-
import { _ as makeThreePointArc, a as makeNonPlanarFace, c as makeBSplineApproximation, d as makeCircle, f as makeEllipse, g as makeTangentArc, h as makeLine, i as makeNewFaceWithinFace, m as makeHelix, o as makePolygon, p as makeEllipseArc, r as makeFace, s as assembleWire, t as addHolesInFace, u as makeBezierCurve } from "./surfaceBuilders-
|
|
6
|
-
import { a as makeOffset, c as makeTorus, i as makeEllipsoid, l as makeVertex, n as makeCone, o as makeSolid, r as makeCylinder, s as makeSphere, t as makeCompound, u as weldShellsAndFaces } from "./solidBuilders-
|
|
4
|
+
import { g as translate } from "./shapeFns-DED4C70_.js";
|
|
5
|
+
import { _ as makeThreePointArc, a as makeNonPlanarFace, c as makeBSplineApproximation, d as makeCircle, f as makeEllipse, g as makeTangentArc, h as makeLine, i as makeNewFaceWithinFace, m as makeHelix, o as makePolygon, p as makeEllipseArc, r as makeFace, s as assembleWire, t as addHolesInFace, u as makeBezierCurve } from "./surfaceBuilders-CT__o6Be.js";
|
|
6
|
+
import { a as makeOffset, c as makeTorus, i as makeEllipsoid, l as makeVertex, n as makeCone, o as makeSolid, r as makeCylinder, s as makeSphere, t as makeCompound, u as weldShellsAndFaces } from "./solidBuilders-_8mqPO7I.js";
|
|
7
7
|
//#region src/topology/primitiveFns.ts
|
|
8
8
|
/**
|
|
9
9
|
* Create a box with the given dimensions.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-Ca76Bklg.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
3
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
4
|
-
const require_shapeFns = require("./shapeFns-
|
|
5
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
6
|
-
const require_solidBuilders = require("./solidBuilders-
|
|
4
|
+
const require_shapeFns = require("./shapeFns-DxAhtxFP.cjs");
|
|
5
|
+
const require_surfaceBuilders = require("./surfaceBuilders-De2XKidK.cjs");
|
|
6
|
+
const require_solidBuilders = require("./solidBuilders-yyfZ2Q-7.cjs");
|
|
7
7
|
//#region src/topology/primitiveFns.ts
|
|
8
8
|
/**
|
|
9
9
|
* Create a box with the given dimensions.
|
package/dist/projection.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_cameraFns = require("./cameraFns-
|
|
2
|
+
const require_cameraFns = require("./cameraFns-ClE0QcuX.cjs");
|
|
3
3
|
exports.PROJECTION_PLANES = require_cameraFns.PROJECTION_PLANES;
|
|
4
4
|
exports.cameraFromPlane = require_cameraFns.cameraFromPlane;
|
|
5
5
|
exports.cameraLookAt = require_cameraFns.cameraLookAt;
|
package/dist/projection.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as makeProjectedEdges, i as projectEdges, n as cameraLookAt, o as PROJECTION_PLANES, r as createCamera, s as isProjectionPlane, t as cameraFromPlane } from "./cameraFns-
|
|
1
|
+
import { a as makeProjectedEdges, i as projectEdges, n as cameraLookAt, o as PROJECTION_PLANES, r as createCamera, s as isProjectionPlane, t as cameraFromPlane } from "./cameraFns-DyMKpFHq.js";
|
|
2
2
|
export { PROJECTION_PLANES, cameraFromPlane, cameraLookAt, createCamera, isProjectionPlane, makeProjectedEdges, projectEdges };
|
package/dist/query.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_helpers = require("./helpers-
|
|
3
|
-
const require_cornerFinder = require("./cornerFinder-
|
|
2
|
+
const require_helpers = require("./helpers-Beq_ugyN.cjs");
|
|
3
|
+
const require_cornerFinder = require("./cornerFinder-CINnfCPc.cjs");
|
|
4
4
|
exports.cornerFinder = require_cornerFinder.cornerFinder;
|
|
5
5
|
exports.edgeFinder = require_helpers.edgeFinder;
|
|
6
6
|
exports.faceFinder = require_helpers.faceFinder;
|
package/dist/query.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-
|
|
2
|
-
import { t as cornerFinder } from "./cornerFinder-
|
|
1
|
+
import { n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-BVkEnH5n.js";
|
|
2
|
+
import { t as cornerFinder } from "./cornerFinder-DFswCdwf.js";
|
|
3
3
|
export { cornerFinder, edgeFinder, faceFinder, getSingleFace };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { n as
|
|
5
|
-
import {
|
|
1
|
+
import { et as getKernel, i as castShapeWithKnownType, p as disposeTransientSubShape } from "./shapeTypes-BguzpBK0.js";
|
|
2
|
+
import { S as vertexPosition, c as getFaces } from "./topologyQueryFns-Dl2F-2d9.js";
|
|
3
|
+
import { i as faceGeomType, l as normalAt, r as faceCenter } from "./faceFns-CpOAl1K5.js";
|
|
4
|
+
import { n as getHashCode } from "./shapeFns-DED4C70_.js";
|
|
5
|
+
import { n as measureArea, s as measureLength } from "./measureFns-BLmLZr0K.js";
|
|
6
|
+
import { a as sharedEdges, i as facesOfVertex, o as verticesOfEdge, r as facesOfEdge, s as verticesOfFace, t as adjacentFaces } from "./adjacencyFns-CxepMm7H.js";
|
|
6
7
|
//#region src/topology/shapeRef/scoring.ts
|
|
7
8
|
/**
|
|
8
9
|
* Default face scorer combining surface type, normal alignment, centroid proximity,
|
|
@@ -115,12 +116,18 @@ var ROLE_ASSIGNERS = {
|
|
|
115
116
|
function assignRoles(shape, operationType) {
|
|
116
117
|
const roles = /* @__PURE__ */ new Map();
|
|
117
118
|
const assigner = ROLE_ASSIGNERS[operationType];
|
|
119
|
+
const kernel = getKernel();
|
|
118
120
|
let index = 0;
|
|
119
|
-
for (const
|
|
120
|
-
const
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
121
|
+
for (const raw of kernel.iterShapes(shape.wrapped, "face")) {
|
|
122
|
+
const face = castShapeWithKnownType(raw, "face");
|
|
123
|
+
try {
|
|
124
|
+
const semantic = assigner?.(face);
|
|
125
|
+
const role = semantic !== void 0 && !roles.has(semantic) ? semantic : `${operationType}:face_${index}`;
|
|
126
|
+
roles.set(role, [getHashCode(face)]);
|
|
127
|
+
index++;
|
|
128
|
+
} finally {
|
|
129
|
+
disposeTransientSubShape(face, raw);
|
|
130
|
+
}
|
|
124
131
|
}
|
|
125
132
|
return roles;
|
|
126
133
|
}
|
|
@@ -724,7 +731,7 @@ function resolveLineageRef(ref, roles, shape) {
|
|
|
724
731
|
function rolesFor(ref, shape, cache) {
|
|
725
732
|
const cached = cache.get(ref.origin);
|
|
726
733
|
if (cached !== void 0) return cached;
|
|
727
|
-
const roles = new Map([[ref.origin, assignRoles(shape, ref.origin)]]);
|
|
734
|
+
const roles = /* @__PURE__ */ new Map([[ref.origin, assignRoles(shape, ref.origin)]]);
|
|
728
735
|
cache.set(ref.origin, roles);
|
|
729
736
|
return roles;
|
|
730
737
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
const
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-Ca76Bklg.cjs");
|
|
2
|
+
const require_topologyQueryFns = require("./topologyQueryFns-B1QAiZVI.cjs");
|
|
3
|
+
const require_faceFns = require("./faceFns-DnLXDWq2.cjs");
|
|
4
|
+
const require_shapeFns = require("./shapeFns-DxAhtxFP.cjs");
|
|
5
|
+
const require_measureFns = require("./measureFns-C4BxD4kC.cjs");
|
|
6
|
+
const require_adjacencyFns = require("./adjacencyFns-CiDCunAU.cjs");
|
|
6
7
|
//#region src/topology/shapeRef/scoring.ts
|
|
7
8
|
/**
|
|
8
9
|
* Default face scorer combining surface type, normal alignment, centroid proximity,
|
|
@@ -115,12 +116,18 @@ var ROLE_ASSIGNERS = {
|
|
|
115
116
|
function assignRoles(shape, operationType) {
|
|
116
117
|
const roles = /* @__PURE__ */ new Map();
|
|
117
118
|
const assigner = ROLE_ASSIGNERS[operationType];
|
|
119
|
+
const kernel = require_shapeTypes.getKernel();
|
|
118
120
|
let index = 0;
|
|
119
|
-
for (const
|
|
120
|
-
const
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
121
|
+
for (const raw of kernel.iterShapes(shape.wrapped, "face")) {
|
|
122
|
+
const face = require_shapeTypes.castShapeWithKnownType(raw, "face");
|
|
123
|
+
try {
|
|
124
|
+
const semantic = assigner?.(face);
|
|
125
|
+
const role = semantic !== void 0 && !roles.has(semantic) ? semantic : `${operationType}:face_${index}`;
|
|
126
|
+
roles.set(role, [require_shapeFns.getHashCode(face)]);
|
|
127
|
+
index++;
|
|
128
|
+
} finally {
|
|
129
|
+
require_shapeTypes.disposeTransientSubShape(face, raw);
|
|
130
|
+
}
|
|
124
131
|
}
|
|
125
132
|
return roles;
|
|
126
133
|
}
|
|
@@ -724,7 +731,7 @@ function resolveLineageRef(ref, roles, shape) {
|
|
|
724
731
|
function rolesFor(ref, shape, cache) {
|
|
725
732
|
const cached = cache.get(ref.origin);
|
|
726
733
|
if (cached !== void 0) return cached;
|
|
727
|
-
const roles = new Map([[ref.origin, assignRoles(shape, ref.origin)]]);
|
|
734
|
+
const roles = /* @__PURE__ */ new Map([[ref.origin, assignRoles(shape, ref.origin)]]);
|
|
728
735
|
cache.set(ref.origin, roles);
|
|
729
736
|
return roles;
|
|
730
737
|
}
|