brepjs 20.5.0 → 20.7.0
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/README.md +1 -0
- package/dist/2d.cjs +9 -11
- package/dist/2d.js +9 -11
- package/dist/{adjacencyFns-DeyXahej.js → adjacencyFns-BgJQQjdt.js} +5 -6
- package/dist/{adjacencyFns-1rxgJ6Hw.cjs → adjacencyFns-_RTYhwtD.cjs} +5 -6
- package/dist/{arrayAccess-DrUGPADn.js → arrayAccess-BpgouNir.js} +1 -2
- package/dist/{arrayAccess-e4H9cBfh.cjs → arrayAccess-DpJYARwv.cjs} +1 -2
- package/dist/{blueprint-rwJjYPzo.js → blueprint-Bth4EVaO.js} +24 -37
- package/dist/{blueprint-Yyoiz-U1.cjs → blueprint-wq2TU1XP.cjs} +24 -37
- package/dist/{blueprintFns-Q3Sq-Fse.js → blueprintFns-DQmNe1p6.js} +5 -7
- package/dist/{blueprintFns-Ce6OoPSX.cjs → blueprintFns-Dd0gm1rX.cjs} +5 -7
- package/dist/{blueprintSketcher-CzKbxeTk.cjs → blueprintSketcher-CSDqr27-.cjs} +19 -31
- package/dist/{blueprintSketcher-FywUpRiV.js → blueprintSketcher-DNp87aQZ.js} +19 -31
- package/dist/{boolean2D-D8igCYc9.js → boolean2D-BAb4SnIL.js} +13 -19
- package/dist/{boolean2D-BzZ9iBSn.cjs → boolean2D-BkgOjMRt.cjs} +13 -19
- package/dist/brepjs.cjs +113 -187
- package/dist/brepjs.js +113 -188
- package/dist/{bug-O02CsAmt.cjs → bug-CBcpIPuf.cjs} +2 -4
- package/dist/{bug-BdOHwn_e.js → bug-ClMTAJhe.js} +2 -4
- package/dist/{cameraFns-Cs6v3bWQ.js → cameraFns-9AGyuZVp.js} +8 -11
- package/dist/{cameraFns-RHCb1F1s.cjs → cameraFns-CKUN90f_.cjs} +8 -11
- package/dist/{constants-ITRzCnCp.js → constants-iraOnb2p.js} +1 -2
- package/dist/{constants-BOVyEYGH.cjs → constants-oee0S_x6.cjs} +1 -2
- package/dist/core/errors.d.ts +3 -0
- package/dist/core.cjs +8 -8
- package/dist/core.js +8 -8
- package/dist/{cornerFinder-Dlae8IX5.js → cornerFinder-Cr_04etw.js} +4 -5
- package/dist/{cornerFinder-Cji_BK-R.cjs → cornerFinder-DJWo6h1Z.cjs} +4 -5
- package/dist/{curveFns-KS1BWGhF.js → curveFns-CkA2WJP2.js} +3 -4
- package/dist/{curveFns-6-ULFrEB.cjs → curveFns-U7srQ3ZA.cjs} +3 -4
- package/dist/{drawFns-3yRVBDgI.js → drawFns-C6bmFijD.js} +32 -45
- package/dist/{drawFns-Ddlgp9gQ.cjs → drawFns-DlCxozRP.cjs} +32 -45
- package/dist/{errors-jwhfQJZK.cjs → errors-GVyCnpi0.cjs} +6 -5
- package/dist/{errors-Zb3jBa0u.js → errors-vxP5FT8B.js} +6 -5
- package/dist/{faceFns-CTlJC5IY.js → faceFns-BBk6XKJO.js} +6 -8
- package/dist/{faceFns-CZeHWke7.cjs → faceFns-DSRREV5G.cjs} +6 -8
- package/dist/{faceRoleFns-CWU1-Pm8.js → faceRoleFns-BPxzQF-n.js} +1 -2
- package/dist/{faceRoleFns-CtH_48MO.cjs → faceRoleFns-Db5bYj4Q.cjs} +1 -2
- package/dist/{healingFns-DwSpJZfg.cjs → healingFns-C9G3yjOe.cjs} +148 -51
- package/dist/{healingFns-Ct3gEMvk.js → healingFns-CEr0afli.js} +148 -51
- package/dist/{helpers-NRZVshPb.cjs → helpers-JuPoaP_b.cjs} +15 -21
- package/dist/{helpers-BN1mVMuZ.js → helpers-sDialr0f.js} +15 -21
- package/dist/{importFns-BEi-HsSw.cjs → importFns-ClqPJCFR.cjs} +12 -19
- package/dist/{importFns-0kHGg-b8.js → importFns-DSUfSQn2.js} +12 -19
- package/dist/io.cjs +2 -2
- package/dist/io.js +2 -2
- package/dist/kernel/capabilities.d.ts +8 -0
- package/dist/kernel/occtWasm/occtWasmAdapter.cjs +1 -1
- package/dist/kernel/occtWasm/occtWasmAdapter.js +1 -2
- package/dist/{loftFns-B5mq1WDh.js → loftFns-B8DSoG-F.js} +7 -10
- package/dist/{loftFns-DL9UsQhd.cjs → loftFns-mkJeOaII.cjs} +7 -10
- package/dist/{measureFns-D_GpQw5z.cjs → measureFns-BvNkzSR6.cjs} +6 -8
- package/dist/{measureFns-CyDVZomf.js → measureFns-PRM3gOjw.js} +6 -8
- package/dist/measurement.cjs +2 -2
- package/dist/measurement.js +2 -2
- package/dist/{meshFns-COlno8TY.js → meshFns-CgbT3uuO.js} +6 -8
- package/dist/{meshFns-CAxkaRTm.cjs → meshFns-W7ZTKqiJ.cjs} +6 -8
- package/dist/{occtWasmAdapter-CA6PmIIj.cjs → occtWasmAdapter-BSQeA69d.cjs} +49 -57
- package/dist/{occtWasmAdapter-BX10fyla.js → occtWasmAdapter-PzZJHUAd.js} +44 -58
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/{originTrackingFns-DiHy5BZC.js → originTrackingFns-D8SNCDKj.js} +4 -5
- package/dist/{originTrackingFns-CWo6NWHK.cjs → originTrackingFns-DJDTRJh3.cjs} +4 -5
- package/dist/{planeOps-DJuclNxa.cjs → planeOps-C9d2Y56B.cjs} +5 -6
- package/dist/{planeOps-Cxws4Tiu.js → planeOps-Dp0YvuFE.js} +5 -6
- package/dist/{primitiveFns-ZV3aMbqG.cjs → primitiveFns-EtHyTqhw.cjs} +8 -10
- package/dist/{primitiveFns-CGJzS4MO.js → primitiveFns-W3RYNJcm.js} +8 -10
- package/dist/{principalBoxFns-BJgGEoik.js → principalBoxFns-Cbtty-2_.js} +7 -8
- package/dist/{principalBoxFns-5FSbxAj-.cjs → principalBoxFns-CmZa7qHi.cjs} +7 -8
- package/dist/projection.cjs +1 -1
- package/dist/projection.js +1 -2
- package/dist/query.cjs +2 -2
- package/dist/query.js +2 -2
- package/dist/{refResolveFns-CpVZoeOT.js → refResolveFns-BkciKtNP.js} +14 -21
- package/dist/{refResolveFns-Ct52Uw7R.cjs → refResolveFns-D99Vqe7a.cjs} +14 -21
- package/dist/result.cjs +2 -2
- package/dist/result.js +2 -2
- package/dist/{rolldown-runtime-C0BPl7ul.cjs → rolldown-runtime-BW-eSwOZ.cjs} +1 -2
- package/dist/{shapeFns-C2j6oZ2u.cjs → shapeFns-B54CsPyk.cjs} +5 -6
- package/dist/{shapeFns--1wNlcc_.js → shapeFns-DB3l3ULC.js} +5 -6
- package/dist/shapeRef.cjs +1 -1
- package/dist/shapeRef.js +1 -2
- package/dist/{shapeTypes-CqNJoSam.js → shapeTypes-CgbUTASh.js} +82 -161
- package/dist/{shapeTypes-DH2ShBU_.cjs → shapeTypes-D_anqiRe.cjs} +82 -161
- package/dist/sketching.cjs +4 -5
- package/dist/sketching.js +4 -5
- package/dist/{solidBuilders-CgicU3le.cjs → solidBuilders-CUd-korS.cjs} +17 -23
- package/dist/{solidBuilders-IstbiWju.js → solidBuilders-DE_na4G3.js} +17 -23
- package/dist/{surfaceBuilders-vYgSvgI6.cjs → surfaceBuilders-DOn2jWkh.cjs} +8 -12
- package/dist/{surfaceBuilders-8nLk2PWk.js → surfaceBuilders-wdGNiImD.js} +8 -12
- package/dist/text.cjs +2 -2
- package/dist/text.js +2 -2
- package/dist/{textBlueprints-fa7VHJZz.cjs → textBlueprints-BQ60Rc96.cjs} +24 -32
- package/dist/{textBlueprints-C13NAA3C.js → textBlueprints-B_jwMuej.js} +23 -31
- package/dist/{textMetrics--cikHkGX.cjs → textMetrics-Bm0a4kh7.cjs} +4 -6
- package/dist/{textMetrics-Dcc63qRm.js → textMetrics-Dj3yfZNQ.js} +4 -6
- package/dist/{threadFns-BUQPg_vI.cjs → threadFns-BuRPVenB.cjs} +21 -33
- package/dist/{threadFns-3U9x4v_M.js → threadFns-DlL5VnMf.js} +21 -33
- package/dist/topology/modifierFns.d.ts +5 -0
- package/dist/topology/thickResultCheck.d.ts +18 -0
- package/dist/topology.cjs +9 -9
- package/dist/topology.js +9 -9
- package/dist/{topologyQueryFns-DnfjQgP7.js → topologyQueryFns-6M_dbT1R.js} +10 -10
- package/dist/{topologyQueryFns-q2bGyuEV.cjs → topologyQueryFns-ENxs8uu2.cjs} +15 -9
- package/dist/{types-D24Y27N0.js → types-CKXsIm9-.js} +1 -2
- package/dist/{types-KjA8tY4Y.cjs → types-CjF9Rofr.cjs} +1 -2
- package/dist/{validityTypes-r0A2YdNq.cjs → validityTypes-BPamqRZ8.cjs} +3 -4
- package/dist/{validityTypes-t7JpS0Ki.js → validityTypes-BTuI0vcR.js} +3 -4
- package/dist/{vecOps-CCnJt-yH.cjs → vecOps-CrGEPPQM.cjs} +1 -2
- package/dist/{vecOps-SKPRvPH-.js → vecOps-S-m9H_fe.js} +1 -2
- package/dist/vectors.cjs +4 -4
- package/dist/vectors.js +4 -4
- package/dist/worker.cjs +1 -1
- package/dist/worker.js +1 -2
- package/dist/{workerPool-XcYX2UZ0.js → workerPool-Bc5hmJc4.js} +5 -10
- package/dist/{workerPool-D30NsiIW.cjs → workerPool-D5tiNXrI.cjs} +5 -10
- package/package.json +10 -10
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_errors = require("./errors-
|
|
3
|
-
const require_vecOps = require("./vecOps-
|
|
4
|
-
const require_faceFns = require("./faceFns-
|
|
5
|
-
const require_solidBuilders = require("./solidBuilders-
|
|
6
|
-
const require_primitiveFns = require("./primitiveFns-
|
|
7
|
-
const require_shapeFns = require("./shapeFns-
|
|
8
|
-
const require_loftFns = require("./loftFns-
|
|
9
|
-
const require_refResolveFns = require("./refResolveFns-
|
|
10
|
-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-D_anqiRe.cjs");
|
|
2
|
+
const require_errors = require("./errors-GVyCnpi0.cjs");
|
|
3
|
+
const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
|
|
4
|
+
const require_faceFns = require("./faceFns-DSRREV5G.cjs");
|
|
5
|
+
const require_solidBuilders = require("./solidBuilders-CUd-korS.cjs");
|
|
6
|
+
const require_primitiveFns = require("./primitiveFns-EtHyTqhw.cjs");
|
|
7
|
+
const require_shapeFns = require("./shapeFns-B54CsPyk.cjs");
|
|
8
|
+
const require_loftFns = require("./loftFns-mkJeOaII.cjs");
|
|
9
|
+
const require_refResolveFns = require("./refResolveFns-D99Vqe7a.cjs");
|
|
10
|
+
// src/utils/uuid.ts
|
|
11
11
|
/** Generate a v4-style UUID string using `crypto.getRandomValues`. */
|
|
12
12
|
function uuidv() {
|
|
13
13
|
return (String([1e7]) + String(-1e3) + String(-4e3) + String(-8e3) + String(-1e11)).replace(/[018]/g, (c) => (Number(c) ^ crypto.getRandomValues(/* @__PURE__ */ new Uint8Array(1))[0] & 15 >> Number(c) / 4).toString(16));
|
|
14
14
|
}
|
|
15
|
-
|
|
16
|
-
//#region src/operations/exporters.ts
|
|
15
|
+
// src/operations/exporters.ts
|
|
17
16
|
/**
|
|
18
17
|
* Create an XCAF assembly document from a list of shape configurations.
|
|
19
18
|
*
|
|
@@ -48,8 +47,7 @@ function createAssembly(shapes = []) {
|
|
|
48
47
|
const doc = require_shapeTypes.getKernel().createXCAFDocument(parts);
|
|
49
48
|
return require_shapeTypes.createKernelHandle(doc);
|
|
50
49
|
}
|
|
51
|
-
|
|
52
|
-
//#region src/utils/quaternion.ts
|
|
50
|
+
// src/utils/quaternion.ts
|
|
53
51
|
function dot(a, b) {
|
|
54
52
|
return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
|
|
55
53
|
}
|
|
@@ -136,8 +134,7 @@ function quatMultiply(a, b) {
|
|
|
136
134
|
aw * bz + ax * by - ay * bx + az * bw
|
|
137
135
|
];
|
|
138
136
|
}
|
|
139
|
-
|
|
140
|
-
//#region src/operations/patternFns.ts
|
|
137
|
+
// src/operations/patternFns.ts
|
|
141
138
|
/**
|
|
142
139
|
* Create a linear pattern of a shape along a direction.
|
|
143
140
|
*
|
|
@@ -226,8 +223,7 @@ function gridPattern(shape, directionX, directionY, countX, countY, spacingX, sp
|
|
|
226
223
|
if (row !== shape && !passthrough) row[Symbol.dispose]();
|
|
227
224
|
return out;
|
|
228
225
|
}
|
|
229
|
-
|
|
230
|
-
//#region src/operations/exporterFns.ts
|
|
226
|
+
// src/operations/exporterFns.ts
|
|
231
227
|
/**
|
|
232
228
|
* Functional assembly exporter using branded shape types.
|
|
233
229
|
*/
|
|
@@ -292,8 +288,7 @@ function exportAssemblySTEP(shapes = [], { unit, modelUnit } = {}) {
|
|
|
292
288
|
doc.delete();
|
|
293
289
|
}
|
|
294
290
|
}
|
|
295
|
-
|
|
296
|
-
//#region src/operations/assemblyFns.ts
|
|
291
|
+
// src/operations/assemblyFns.ts
|
|
297
292
|
/** Create a new assembly node. */
|
|
298
293
|
function createAssemblyNode(name, options = {}) {
|
|
299
294
|
return {
|
|
@@ -360,8 +355,7 @@ function collectShapes(root) {
|
|
|
360
355
|
});
|
|
361
356
|
return shapes;
|
|
362
357
|
}
|
|
363
|
-
|
|
364
|
-
//#region src/operations/jointFns.ts
|
|
358
|
+
// src/operations/jointFns.ts
|
|
365
359
|
var DEG2RAD$2 = Math.PI / 180;
|
|
366
360
|
function clamp(value, min, max) {
|
|
367
361
|
return Math.min(max, Math.max(min, value));
|
|
@@ -687,8 +681,7 @@ function forwardKinematics(assembly, jointValues = {}) {
|
|
|
687
681
|
function mechanismDOF(assembly) {
|
|
688
682
|
return collectJoints(assembly).reduce((sum, j) => sum + j.dofs.length, 0);
|
|
689
683
|
}
|
|
690
|
-
|
|
691
|
-
//#region src/operations/ikFns.ts
|
|
684
|
+
// src/operations/ikFns.ts
|
|
692
685
|
var IDENTITY_POSE = {
|
|
693
686
|
position: [
|
|
694
687
|
0,
|
|
@@ -987,8 +980,7 @@ function jointTrajectory(assembly, from, to, steps) {
|
|
|
987
980
|
}
|
|
988
981
|
return samples;
|
|
989
982
|
}
|
|
990
|
-
|
|
991
|
-
//#region src/operations/dhFns.ts
|
|
983
|
+
// src/operations/dhFns.ts
|
|
992
984
|
/**
|
|
993
985
|
* Denavit-Hartenberg interchange: build a brepjs joint chain from a standard
|
|
994
986
|
* (distal) DH parameter table.
|
|
@@ -1064,8 +1056,7 @@ function jointsFromDH(rows, options = {}) {
|
|
|
1064
1056
|
};
|
|
1065
1057
|
});
|
|
1066
1058
|
}
|
|
1067
|
-
|
|
1068
|
-
//#region src/operations/urdfFns.ts
|
|
1059
|
+
// src/operations/urdfFns.ts
|
|
1069
1060
|
/**
|
|
1070
1061
|
* URDF interchange: export a brepjs assembly + its joints to URDF, and import a
|
|
1071
1062
|
* URDF document back into links and joints.
|
|
@@ -1241,8 +1232,7 @@ function importURDF(xml) {
|
|
|
1241
1232
|
joints
|
|
1242
1233
|
});
|
|
1243
1234
|
}
|
|
1244
|
-
|
|
1245
|
-
//#region src/operations/historyFns.ts
|
|
1235
|
+
// src/operations/historyFns.ts
|
|
1246
1236
|
/** Create a new empty history. */
|
|
1247
1237
|
function createHistory() {
|
|
1248
1238
|
return {
|
|
@@ -1458,8 +1448,7 @@ function deserializeHistory(data) {
|
|
|
1458
1448
|
shapes
|
|
1459
1449
|
});
|
|
1460
1450
|
}
|
|
1461
|
-
|
|
1462
|
-
//#region src/operations/threadFns.ts
|
|
1451
|
+
// src/operations/threadFns.ts
|
|
1463
1452
|
/**
|
|
1464
1453
|
* Build a helical screw-thread ridge by lofting rotated tooth sections.
|
|
1465
1454
|
*
|
|
@@ -1529,7 +1518,6 @@ function thread(options) {
|
|
|
1529
1518
|
_usingCtx$1.d();
|
|
1530
1519
|
}
|
|
1531
1520
|
}
|
|
1532
|
-
//#endregion
|
|
1533
1521
|
Object.defineProperty(exports, "addChild", {
|
|
1534
1522
|
enumerable: true,
|
|
1535
1523
|
get: function() {
|
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import { F as createKernelHandle, G as _usingCtx, N as DisposalScope, n as castResultShape, q as getKernel, x as isShape3D } from "./shapeTypes-
|
|
2
|
-
import { E as ok, d as validationError, g as err, n as computationError, r as ioError, t as BrepErrorCode, x as isOk } from "./errors-
|
|
3
|
-
import { d as vecNormalize, s as vecIsZero } from "./vecOps-
|
|
4
|
-
import { b as fromBREP } from "./faceFns-
|
|
5
|
-
import { h as fuseAll } from "./solidBuilders-
|
|
6
|
-
import { E as wire, h as line } from "./primitiveFns-
|
|
7
|
-
import { s as toBREP } from "./shapeFns
|
|
8
|
-
import { t as loft } from "./loftFns-
|
|
9
|
-
import { c as resolveRefParams } from "./refResolveFns-
|
|
10
|
-
|
|
1
|
+
import { F as createKernelHandle, G as _usingCtx, N as DisposalScope, n as castResultShape, q as getKernel, x as isShape3D } from "./shapeTypes-CgbUTASh.js";
|
|
2
|
+
import { E as ok, d as validationError, g as err, n as computationError, r as ioError, t as BrepErrorCode, x as isOk } from "./errors-vxP5FT8B.js";
|
|
3
|
+
import { d as vecNormalize, s as vecIsZero } from "./vecOps-S-m9H_fe.js";
|
|
4
|
+
import { b as fromBREP } from "./faceFns-BBk6XKJO.js";
|
|
5
|
+
import { h as fuseAll } from "./solidBuilders-DE_na4G3.js";
|
|
6
|
+
import { E as wire, h as line } from "./primitiveFns-W3RYNJcm.js";
|
|
7
|
+
import { s as toBREP } from "./shapeFns-DB3l3ULC.js";
|
|
8
|
+
import { t as loft } from "./loftFns-B8DSoG-F.js";
|
|
9
|
+
import { c as resolveRefParams } from "./refResolveFns-BkciKtNP.js";
|
|
10
|
+
// src/utils/uuid.ts
|
|
11
11
|
/** Generate a v4-style UUID string using `crypto.getRandomValues`. */
|
|
12
12
|
function uuidv() {
|
|
13
13
|
return (String([1e7]) + String(-1e3) + String(-4e3) + String(-8e3) + String(-1e11)).replace(/[018]/g, (c) => (Number(c) ^ crypto.getRandomValues(/* @__PURE__ */ new Uint8Array(1))[0] & 15 >> Number(c) / 4).toString(16));
|
|
14
14
|
}
|
|
15
|
-
|
|
16
|
-
//#region src/operations/exporters.ts
|
|
15
|
+
// src/operations/exporters.ts
|
|
17
16
|
/**
|
|
18
17
|
* Create an XCAF assembly document from a list of shape configurations.
|
|
19
18
|
*
|
|
@@ -48,8 +47,7 @@ function createAssembly(shapes = []) {
|
|
|
48
47
|
const doc = getKernel().createXCAFDocument(parts);
|
|
49
48
|
return createKernelHandle(doc);
|
|
50
49
|
}
|
|
51
|
-
|
|
52
|
-
//#region src/utils/quaternion.ts
|
|
50
|
+
// src/utils/quaternion.ts
|
|
53
51
|
function dot(a, b) {
|
|
54
52
|
return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
|
|
55
53
|
}
|
|
@@ -136,8 +134,7 @@ function quatMultiply(a, b) {
|
|
|
136
134
|
aw * bz + ax * by - ay * bx + az * bw
|
|
137
135
|
];
|
|
138
136
|
}
|
|
139
|
-
|
|
140
|
-
//#region src/operations/patternFns.ts
|
|
137
|
+
// src/operations/patternFns.ts
|
|
141
138
|
/**
|
|
142
139
|
* Create a linear pattern of a shape along a direction.
|
|
143
140
|
*
|
|
@@ -226,8 +223,7 @@ function gridPattern(shape, directionX, directionY, countX, countY, spacingX, sp
|
|
|
226
223
|
if (row !== shape && !passthrough) row[Symbol.dispose]();
|
|
227
224
|
return out;
|
|
228
225
|
}
|
|
229
|
-
|
|
230
|
-
//#region src/operations/exporterFns.ts
|
|
226
|
+
// src/operations/exporterFns.ts
|
|
231
227
|
/**
|
|
232
228
|
* Functional assembly exporter using branded shape types.
|
|
233
229
|
*/
|
|
@@ -292,8 +288,7 @@ function exportAssemblySTEP(shapes = [], { unit, modelUnit } = {}) {
|
|
|
292
288
|
doc.delete();
|
|
293
289
|
}
|
|
294
290
|
}
|
|
295
|
-
|
|
296
|
-
//#region src/operations/assemblyFns.ts
|
|
291
|
+
// src/operations/assemblyFns.ts
|
|
297
292
|
/** Create a new assembly node. */
|
|
298
293
|
function createAssemblyNode(name, options = {}) {
|
|
299
294
|
return {
|
|
@@ -360,8 +355,7 @@ function collectShapes(root) {
|
|
|
360
355
|
});
|
|
361
356
|
return shapes;
|
|
362
357
|
}
|
|
363
|
-
|
|
364
|
-
//#region src/operations/jointFns.ts
|
|
358
|
+
// src/operations/jointFns.ts
|
|
365
359
|
var DEG2RAD$2 = Math.PI / 180;
|
|
366
360
|
function clamp(value, min, max) {
|
|
367
361
|
return Math.min(max, Math.max(min, value));
|
|
@@ -687,8 +681,7 @@ function forwardKinematics(assembly, jointValues = {}) {
|
|
|
687
681
|
function mechanismDOF(assembly) {
|
|
688
682
|
return collectJoints(assembly).reduce((sum, j) => sum + j.dofs.length, 0);
|
|
689
683
|
}
|
|
690
|
-
|
|
691
|
-
//#region src/operations/ikFns.ts
|
|
684
|
+
// src/operations/ikFns.ts
|
|
692
685
|
var IDENTITY_POSE = {
|
|
693
686
|
position: [
|
|
694
687
|
0,
|
|
@@ -987,8 +980,7 @@ function jointTrajectory(assembly, from, to, steps) {
|
|
|
987
980
|
}
|
|
988
981
|
return samples;
|
|
989
982
|
}
|
|
990
|
-
|
|
991
|
-
//#region src/operations/dhFns.ts
|
|
983
|
+
// src/operations/dhFns.ts
|
|
992
984
|
/**
|
|
993
985
|
* Denavit-Hartenberg interchange: build a brepjs joint chain from a standard
|
|
994
986
|
* (distal) DH parameter table.
|
|
@@ -1064,8 +1056,7 @@ function jointsFromDH(rows, options = {}) {
|
|
|
1064
1056
|
};
|
|
1065
1057
|
});
|
|
1066
1058
|
}
|
|
1067
|
-
|
|
1068
|
-
//#region src/operations/urdfFns.ts
|
|
1059
|
+
// src/operations/urdfFns.ts
|
|
1069
1060
|
/**
|
|
1070
1061
|
* URDF interchange: export a brepjs assembly + its joints to URDF, and import a
|
|
1071
1062
|
* URDF document back into links and joints.
|
|
@@ -1241,8 +1232,7 @@ function importURDF(xml) {
|
|
|
1241
1232
|
joints
|
|
1242
1233
|
});
|
|
1243
1234
|
}
|
|
1244
|
-
|
|
1245
|
-
//#region src/operations/historyFns.ts
|
|
1235
|
+
// src/operations/historyFns.ts
|
|
1246
1236
|
/** Create a new empty history. */
|
|
1247
1237
|
function createHistory() {
|
|
1248
1238
|
return {
|
|
@@ -1458,8 +1448,7 @@ function deserializeHistory(data) {
|
|
|
1458
1448
|
shapes
|
|
1459
1449
|
});
|
|
1460
1450
|
}
|
|
1461
|
-
|
|
1462
|
-
//#region src/operations/threadFns.ts
|
|
1451
|
+
// src/operations/threadFns.ts
|
|
1463
1452
|
/**
|
|
1464
1453
|
* Build a helical screw-thread ridge by lofting rotated tooth sections.
|
|
1465
1454
|
*
|
|
@@ -1529,5 +1518,4 @@ function thread(options) {
|
|
|
1529
1518
|
_usingCtx$1.d();
|
|
1530
1519
|
}
|
|
1531
1520
|
}
|
|
1532
|
-
//#endregion
|
|
1533
1521
|
export { setJointValue as A, walkAssembly as B, cylindricalJoint as C, planarJoint as D, mechanismDOF as E, countNodes as F, quatFromAxisAngle as G, circularPattern as H, createAssemblyNode as I, quatRotate as J, quatFromTo as K, findNode as L, sphericalJoint as M, addChild as N, prismaticJoint as O, collectShapes as P, removeChild as R, addJoint as S, jointTransform as T, gridPattern as U, exportAssemblySTEP as V, linearPattern as W, createAssembly as Y, exportURDF as _, deserializeHistory as a, inverseKinematics as b, modifyStep as c, replayFrom as d, replayHistory as f, undoLast as g, stepsFrom as h, createRegistry as i, setJointValues as j, revoluteJoint as k, registerOperation as l, stepCount as m, addStep as n, findStep as o, serializeHistory as p, quatMultiply as q, createHistory as r, getShape as s, thread as t, registerShape as u, importURDF as v, forwardKinematics as w, jointTrajectory as x, jointsFromDH as y, updateNode as z };
|
|
@@ -36,6 +36,9 @@ export declare function chamfer(shape: ValidSolid, edges: ReadonlyArray<Edge> |
|
|
|
36
36
|
* @param faces - Faces to remove.
|
|
37
37
|
* @param thickness - Wall thickness.
|
|
38
38
|
* @param tolerance - Shell operation tolerance (default 1e-3).
|
|
39
|
+
* @returns Err `SHELL_NO_EFFECT` when the wall is too thick and the kernel
|
|
40
|
+
* hands back the input, `SHELL_INVALID_RESULT` when the result is not a
|
|
41
|
+
* usable hollow body.
|
|
39
42
|
*/
|
|
40
43
|
export declare function shell(shape: ValidSolid, faces: ReadonlyArray<Face>, thickness: number, tolerance?: number, { trackEvolution }?: {
|
|
41
44
|
trackEvolution?: boolean | undefined;
|
|
@@ -46,6 +49,8 @@ export declare function shell(shape: ValidSolid, faces: ReadonlyArray<Face>, thi
|
|
|
46
49
|
* @param shape - The shape to offset (must be a 3D shape with faces).
|
|
47
50
|
* @param distance - Offset distance (positive = outward, negative = inward).
|
|
48
51
|
* @param tolerance - Offset tolerance (default 1e-6).
|
|
52
|
+
* @returns Err `OFFSET_INVALID_RESULT` when the offset consumes the body or
|
|
53
|
+
* gives no usable solid.
|
|
49
54
|
*/
|
|
50
55
|
export declare function offset(shape: ValidSolid, distance: number, tolerance?: number): Result<ValidSolid>;
|
|
51
56
|
/**
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Shape3D } from '../core/shapeTypes.js';
|
|
2
|
+
import { ValidSolid } from '../core/validityTypes.js';
|
|
3
|
+
import { Result } from '../core/result.js';
|
|
4
|
+
import { ShapeEvolution } from '../kernel/types.js';
|
|
5
|
+
export interface ThickResultSpec {
|
|
6
|
+
readonly operation: 'shell' | 'offset';
|
|
7
|
+
/** Signed offset distance; a shell wall grows inward, so pass its thickness negated. */
|
|
8
|
+
readonly distance: number;
|
|
9
|
+
readonly tolerance: number;
|
|
10
|
+
/** Shell openings: their history records the rim, not an offset wall. */
|
|
11
|
+
readonly openedFaceHashes?: ReadonlySet<number> | undefined;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Verify a shell/offset result against its input. The wall-distance check
|
|
15
|
+
* needs `evolution` built from every input face hash and a kernel with native
|
|
16
|
+
* history; pass `undefined` to skip it.
|
|
17
|
+
*/
|
|
18
|
+
export declare function checkThickResult(input: ValidSolid, result: Shape3D, evolution: ShapeEvolution | undefined, spec: ThickResultSpec): Result<undefined>;
|
package/dist/topology.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
-
const require_faceFns = require("./faceFns-
|
|
4
|
-
const require_solidBuilders = require("./solidBuilders-
|
|
5
|
-
const require_primitiveFns = require("./primitiveFns-
|
|
6
|
-
const require_shapeFns = require("./shapeFns-
|
|
7
|
-
const require_curveFns = require("./curveFns-
|
|
8
|
-
const require_meshFns = require("./meshFns-
|
|
9
|
-
const require_healingFns = require("./healingFns-
|
|
10
|
-
const require_adjacencyFns = require("./adjacencyFns-
|
|
2
|
+
const require_topologyQueryFns = require("./topologyQueryFns-ENxs8uu2.cjs");
|
|
3
|
+
const require_faceFns = require("./faceFns-DSRREV5G.cjs");
|
|
4
|
+
const require_solidBuilders = require("./solidBuilders-CUd-korS.cjs");
|
|
5
|
+
const require_primitiveFns = require("./primitiveFns-EtHyTqhw.cjs");
|
|
6
|
+
const require_shapeFns = require("./shapeFns-B54CsPyk.cjs");
|
|
7
|
+
const require_curveFns = require("./curveFns-U7srQ3ZA.cjs");
|
|
8
|
+
const require_meshFns = require("./meshFns-W7ZTKqiJ.cjs");
|
|
9
|
+
const require_healingFns = require("./healingFns-C9G3yjOe.cjs");
|
|
10
|
+
const require_adjacencyFns = require("./adjacencyFns-_RTYhwtD.cjs");
|
|
11
11
|
exports.addHoles = require_primitiveFns.addHoles;
|
|
12
12
|
exports.adjacentFaces = require_adjacencyFns.adjacentFaces;
|
|
13
13
|
exports.approximateCurve = require_curveFns.approximateCurve;
|
package/dist/topology.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { _ as iterFaces, b as iterVertices, c as getFaces, f as getVertices, g as iterEdges, m as invalidateShapeCache, n as getBounds, p as getWires, s as getEdges, w as vertexPosition, x as iterWires } from "./topologyQueryFns-
|
|
2
|
-
import { C as shapeType, S as iterTopo, _ as cast, a as faceOrientation, b as fromBREP, 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, r as faceCenter, s as getSurfaceType, t as classifyPointOnFace, u as outerWire, x as isCompSolid, y as downcast } from "./faceFns-
|
|
3
|
-
import { h as fuseAll, p as cutAll } from "./solidBuilders-
|
|
4
|
-
import { C as threePointArc, D as wireLoop, E as wire, S as tangentArc, T as vertex, _ as polygon, a as circle, b as sphere, 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, x as subFace, y as solid } from "./primitiveFns-
|
|
5
|
-
import { a as isSameShape, i as isEqualShape, n as getHashCode } from "./shapeFns
|
|
6
|
-
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-
|
|
7
|
-
import { d as clearMeshCache, f as createMeshCache, n as exportSTEP, r as exportSTL, t as exportIGES } from "./meshFns-
|
|
8
|
-
import { A as toBufferGeometryData, P as toLineGeometryData, S as chamferDistAngle, _ as checkBoolean, a as healFace, b as getNurbsCurveData, d as chamferWithEvolution, f as cutWithEvolution, g as shellWithEvolution, h as intersectWithEvolution, j as toGroupedBufferGeometryData, k as variableFillet, l as solidFromShell, m as fuseWithEvolution, n as fixSelfIntersection, o as healSolid, p as filletWithEvolution, r as fixShape, s as healWire, t as autoHeal, u as positionOnCurve, v as cutAllBisect, x as getNurbsSurfaceData, y as fuseAllBisect } from "./healingFns-
|
|
9
|
-
import { i as facesOfEdge, l as wiresOfFace, n as adjacentFaces, o as sharedEdges, r as edgesOfFace, s as verticesOfEdge } from "./adjacencyFns-
|
|
1
|
+
import { _ as iterFaces, b as iterVertices, c as getFaces, f as getVertices, g as iterEdges, m as invalidateShapeCache, n as getBounds, p as getWires, s as getEdges, w as vertexPosition, x as iterWires } from "./topologyQueryFns-6M_dbT1R.js";
|
|
2
|
+
import { C as shapeType, S as iterTopo, _ as cast, a as faceOrientation, b as fromBREP, 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, r as faceCenter, s as getSurfaceType, t as classifyPointOnFace, u as outerWire, x as isCompSolid, y as downcast } from "./faceFns-BBk6XKJO.js";
|
|
3
|
+
import { h as fuseAll, p as cutAll } from "./solidBuilders-DE_na4G3.js";
|
|
4
|
+
import { C as threePointArc, D as wireLoop, E as wire, S as tangentArc, T as vertex, _ as polygon, a as circle, b as sphere, 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, x as subFace, y as solid } from "./primitiveFns-W3RYNJcm.js";
|
|
5
|
+
import { a as isSameShape, i as isEqualShape, n as getHashCode } from "./shapeFns-DB3l3ULC.js";
|
|
6
|
+
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-CkA2WJP2.js";
|
|
7
|
+
import { d as clearMeshCache, f as createMeshCache, n as exportSTEP, r as exportSTL, t as exportIGES } from "./meshFns-CgbT3uuO.js";
|
|
8
|
+
import { A as toBufferGeometryData, P as toLineGeometryData, S as chamferDistAngle, _ as checkBoolean, a as healFace, b as getNurbsCurveData, d as chamferWithEvolution, f as cutWithEvolution, g as shellWithEvolution, h as intersectWithEvolution, j as toGroupedBufferGeometryData, k as variableFillet, l as solidFromShell, m as fuseWithEvolution, n as fixSelfIntersection, o as healSolid, p as filletWithEvolution, r as fixShape, s as healWire, t as autoHeal, u as positionOnCurve, v as cutAllBisect, x as getNurbsSurfaceData, y as fuseAllBisect } from "./healingFns-CEr0afli.js";
|
|
9
|
+
import { i as facesOfEdge, l as wiresOfFace, n as adjacentFaces, o as sharedEdges, r as edgesOfFace, s as verticesOfEdge } from "./adjacencyFns-BgJQQjdt.js";
|
|
10
10
|
export { addHoles, adjacentFaces, approximateCurve, asTopo, autoHeal, bezier, box, bsplineApprox, cast, chamferDistAngle as chamferDistAngleShape, chamferWithEvolution, checkBoolean, circle, classifyPointOnFace, clearMeshCache, compound, cone, createMeshCache, curveAxis, curveEndPoint, curveIsClosed, curveIsPeriodic, curveLength, curvePeriod, curvePointAt, curveStartPoint, curveTangentAt, cutAll, cutAllBisect, cutWithEvolution, cylinder, fromBREP as deserializeShape, downcast, edgesOfFace, ellipse, ellipseArc, ellipsoid, exportIGES, exportSTEP, exportSTL, face, faceAxis, faceCenter, faceGeomType, faceOrientation, facesOfEdge, filledFace, filletWithEvolution, fixSelfIntersection, fixShape, flipFaceOrientation, flipOrientation, fuseAll, fuseAllBisect, fuseWithEvolution, getBounds, getCurveType, getEdges, getFaces, getHashCode, getNurbsCurveData, getNurbsSurfaceData, getOrientation, getSurfaceType, getVertices, getWires, healFace, healSolid, healWire, helix, innerWires, interpolateCurve, intersectWithEvolution, invalidateShapeCache, isCompSolid, isEqualShape, isSameShape, iterEdges, iterFaces, iterTopo, iterVertices, iterWires, line, normalAt, offsetFace, offsetWire2D, outerWire, pointOnSurface, polygon, positionOnCurve, projectPointOnFace, sewShells, shapeType, sharedEdges, shellWithEvolution, solid, solidFromShell, sphere, subFace, tangentArc, threePointArc, toBufferGeometryData, toGroupedBufferGeometryData, toLineGeometryData, torus, uvBounds, uvCoordinates, variableFillet, vertex, vertexPosition, verticesOfEdge, wire, wireLoop, wiresOfFace };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { G as _usingCtx, N as DisposalScope, O as getOrQueryType, n as castResultShape, q as getKernel, r as castResultShapeWithKnownType } from "./shapeTypes-
|
|
2
|
-
import { E as ok, g as err } from "./errors-
|
|
3
|
-
import { n as HASH_CODE_MAX } from "./constants-
|
|
4
|
-
|
|
1
|
+
import { G as _usingCtx, N as DisposalScope, O as getOrQueryType, n as castResultShape, q as getKernel, r as castResultShapeWithKnownType } from "./shapeTypes-CgbUTASh.js";
|
|
2
|
+
import { E as ok, g as err } from "./errors-vxP5FT8B.js";
|
|
3
|
+
import { n as HASH_CODE_MAX } from "./constants-iraOnb2p.js";
|
|
4
|
+
// src/core/kernelErrorTranslation.ts
|
|
5
5
|
/**
|
|
6
6
|
* Kernel error translation — maps cryptic kernel messages to user-friendly explanations.
|
|
7
7
|
*
|
|
@@ -74,6 +74,9 @@ var ERROR_CODE_SUGGESTIONS = {
|
|
|
74
74
|
CHAMFER_NOT_3D: "The chamfer distance may be too large. Try a smaller distance or check edge geometry.",
|
|
75
75
|
SHELL_NOT_3D: "The shell thickness may be too large for the shape. Try reducing thickness or removing problematic faces.",
|
|
76
76
|
OFFSET_NOT_3D: "The offset distance may be too large for the shape geometry. Try a smaller distance.",
|
|
77
|
+
SHELL_NO_EFFECT: "The wall is too thick for this body. Use a wall thinner than half the narrowest part of the shape.",
|
|
78
|
+
SHELL_INVALID_RESULT: "The wall is too thick for this body or one of its curved faces. Use a wall thinner than half the narrowest part and smaller than the tightest convex radius.",
|
|
79
|
+
OFFSET_INVALID_RESULT: "The offset is too large for this body. An inward offset must stay below half the narrowest part and the tightest convex radius.",
|
|
77
80
|
DRAFT_FAILED: "The draft angle may be too large or the selected faces incompatible. Try a smaller angle or different faces."
|
|
78
81
|
};
|
|
79
82
|
/** Look up an actionable suggestion for a given error code. */
|
|
@@ -91,8 +94,7 @@ function translateKernelError(kernelMessage) {
|
|
|
91
94
|
for (const { pattern, translation } of kernel_ERROR_PATTERNS) if (pattern.test(kernelMessage)) return `${translation} (kernel: ${kernelMessage})`;
|
|
92
95
|
return kernelMessage;
|
|
93
96
|
}
|
|
94
|
-
|
|
95
|
-
//#region src/core/kernelCall.ts
|
|
97
|
+
// src/core/kernelCall.ts
|
|
96
98
|
function buildError(kind, code, message, cause, suggestion) {
|
|
97
99
|
const base = {
|
|
98
100
|
kind,
|
|
@@ -181,8 +183,7 @@ function kernelCallScoped(fn, code, message, kind = "KERNEL_OPERATION") {
|
|
|
181
183
|
_usingCtx$1.d();
|
|
182
184
|
}
|
|
183
185
|
}
|
|
184
|
-
|
|
185
|
-
//#region src/topology/topologyQueryFns.ts
|
|
186
|
+
// src/topology/topologyQueryFns.ts
|
|
186
187
|
/**
|
|
187
188
|
* Topology query functions — extract sub-shapes, compute bounds, and
|
|
188
189
|
* describe shape topology. All results are lazily cached per shape.
|
|
@@ -428,5 +429,4 @@ function describe(shape) {
|
|
|
428
429
|
function vertexPosition(vertex) {
|
|
429
430
|
return getKernel().vertexPosition(vertex.wrapped);
|
|
430
431
|
}
|
|
431
|
-
|
|
432
|
-
export { subShapeHashes as C, kernelCallScoped as D, kernelCallRaw as E, subShapeCount as S, kernelCall as T, iterFaces as _, getCachedSurfaceType as a, iterVertices as b, getFaces as c, getSolids as d, getVertices as f, iterEdges as g, iterCompSolids as h, getCachedIsValid as i, getOrCreateCache as l, invalidateShapeCache as m, getBounds as n, getCompSolids as o, getWires as p, getCacheEntry as r, getEdges as s, describe as t, getShells as u, iterShells as v, vertexPosition as w, iterWires as x, iterSolids as y };
|
|
432
|
+
export { subShapeHashes as C, kernelCallScoped as D, kernelCallRaw as E, getSuggestionForCode as O, subShapeCount as S, kernelCall as T, iterFaces as _, getCachedSurfaceType as a, iterVertices as b, getFaces as c, getSolids as d, getVertices as f, iterEdges as g, iterCompSolids as h, getCachedIsValid as i, getOrCreateCache as l, invalidateShapeCache as m, getBounds as n, getCompSolids as o, getWires as p, getCacheEntry as r, getEdges as s, describe as t, getShells as u, iterShells as v, vertexPosition as w, iterWires as x, iterSolids as y };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_errors = require("./errors-
|
|
3
|
-
const require_constants = require("./constants-
|
|
4
|
-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-D_anqiRe.cjs");
|
|
2
|
+
const require_errors = require("./errors-GVyCnpi0.cjs");
|
|
3
|
+
const require_constants = require("./constants-oee0S_x6.cjs");
|
|
4
|
+
// src/core/kernelErrorTranslation.ts
|
|
5
5
|
/**
|
|
6
6
|
* Kernel error translation — maps cryptic kernel messages to user-friendly explanations.
|
|
7
7
|
*
|
|
@@ -74,6 +74,9 @@ var ERROR_CODE_SUGGESTIONS = {
|
|
|
74
74
|
CHAMFER_NOT_3D: "The chamfer distance may be too large. Try a smaller distance or check edge geometry.",
|
|
75
75
|
SHELL_NOT_3D: "The shell thickness may be too large for the shape. Try reducing thickness or removing problematic faces.",
|
|
76
76
|
OFFSET_NOT_3D: "The offset distance may be too large for the shape geometry. Try a smaller distance.",
|
|
77
|
+
SHELL_NO_EFFECT: "The wall is too thick for this body. Use a wall thinner than half the narrowest part of the shape.",
|
|
78
|
+
SHELL_INVALID_RESULT: "The wall is too thick for this body or one of its curved faces. Use a wall thinner than half the narrowest part and smaller than the tightest convex radius.",
|
|
79
|
+
OFFSET_INVALID_RESULT: "The offset is too large for this body. An inward offset must stay below half the narrowest part and the tightest convex radius.",
|
|
77
80
|
DRAFT_FAILED: "The draft angle may be too large or the selected faces incompatible. Try a smaller angle or different faces."
|
|
78
81
|
};
|
|
79
82
|
/** Look up an actionable suggestion for a given error code. */
|
|
@@ -91,8 +94,7 @@ function translateKernelError(kernelMessage) {
|
|
|
91
94
|
for (const { pattern, translation } of kernel_ERROR_PATTERNS) if (pattern.test(kernelMessage)) return `${translation} (kernel: ${kernelMessage})`;
|
|
92
95
|
return kernelMessage;
|
|
93
96
|
}
|
|
94
|
-
|
|
95
|
-
//#region src/core/kernelCall.ts
|
|
97
|
+
// src/core/kernelCall.ts
|
|
96
98
|
function buildError(kind, code, message, cause, suggestion) {
|
|
97
99
|
const base = {
|
|
98
100
|
kind,
|
|
@@ -181,8 +183,7 @@ function kernelCallScoped(fn, code, message, kind = "KERNEL_OPERATION") {
|
|
|
181
183
|
_usingCtx$1.d();
|
|
182
184
|
}
|
|
183
185
|
}
|
|
184
|
-
|
|
185
|
-
//#region src/topology/topologyQueryFns.ts
|
|
186
|
+
// src/topology/topologyQueryFns.ts
|
|
186
187
|
/**
|
|
187
188
|
* Topology query functions — extract sub-shapes, compute bounds, and
|
|
188
189
|
* describe shape topology. All results are lazily cached per shape.
|
|
@@ -428,7 +429,6 @@ function describe(shape) {
|
|
|
428
429
|
function vertexPosition(vertex) {
|
|
429
430
|
return require_shapeTypes.getKernel().vertexPosition(vertex.wrapped);
|
|
430
431
|
}
|
|
431
|
-
//#endregion
|
|
432
432
|
Object.defineProperty(exports, "describe", {
|
|
433
433
|
enumerable: true,
|
|
434
434
|
get: function() {
|
|
@@ -495,6 +495,12 @@ Object.defineProperty(exports, "getSolids", {
|
|
|
495
495
|
return getSolids;
|
|
496
496
|
}
|
|
497
497
|
});
|
|
498
|
+
Object.defineProperty(exports, "getSuggestionForCode", {
|
|
499
|
+
enumerable: true,
|
|
500
|
+
get: function() {
|
|
501
|
+
return getSuggestionForCode;
|
|
502
|
+
}
|
|
503
|
+
});
|
|
498
504
|
Object.defineProperty(exports, "getVertices", {
|
|
499
505
|
enumerable: true,
|
|
500
506
|
get: function() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/core/types.ts
|
|
2
2
|
/** Normalize any point input to Vec3 */
|
|
3
3
|
function toVec3(p) {
|
|
4
4
|
if (p.length === 2) return [
|
|
@@ -46,5 +46,4 @@ function resolveDirection(d) {
|
|
|
46
46
|
}
|
|
47
47
|
return d;
|
|
48
48
|
}
|
|
49
|
-
//#endregion
|
|
50
49
|
export { toVec2 as n, toVec3 as r, resolveDirection as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/core/types.ts
|
|
2
2
|
/** Normalize any point input to Vec3 */
|
|
3
3
|
function toVec3(p) {
|
|
4
4
|
if (p.length === 2) return [
|
|
@@ -46,7 +46,6 @@ function resolveDirection(d) {
|
|
|
46
46
|
}
|
|
47
47
|
return d;
|
|
48
48
|
}
|
|
49
|
-
//#endregion
|
|
50
49
|
Object.defineProperty(exports, "resolveDirection", {
|
|
51
50
|
enumerable: true,
|
|
52
51
|
get: function() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_errors = require("./errors-
|
|
3
|
-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-D_anqiRe.cjs");
|
|
2
|
+
const require_errors = require("./errors-GVyCnpi0.cjs");
|
|
3
|
+
// src/core/validityTypes.ts
|
|
4
4
|
/**
|
|
5
5
|
* Type guard — check if a wire is closed (forms a loop).
|
|
6
6
|
* Uses the kernel's `curveIsClosed` to verify at runtime.
|
|
@@ -125,7 +125,6 @@ function planarWire(wire) {
|
|
|
125
125
|
if (isPlanarWire(wire)) return require_errors.ok(wire);
|
|
126
126
|
return require_errors.err("Wire is not planar: edges do not lie in a common plane");
|
|
127
127
|
}
|
|
128
|
-
//#endregion
|
|
129
128
|
Object.defineProperty(exports, "closedWire", {
|
|
130
129
|
enumerable: true,
|
|
131
130
|
get: function() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { q as getKernel } from "./shapeTypes-
|
|
2
|
-
import { E as ok, g as err } from "./errors-
|
|
3
|
-
|
|
1
|
+
import { q as getKernel } from "./shapeTypes-CgbUTASh.js";
|
|
2
|
+
import { E as ok, g as err } from "./errors-vxP5FT8B.js";
|
|
3
|
+
// src/core/validityTypes.ts
|
|
4
4
|
/**
|
|
5
5
|
* Type guard — check if a wire is closed (forms a loop).
|
|
6
6
|
* Uses the kernel's `curveIsClosed` to verify at runtime.
|
|
@@ -125,5 +125,4 @@ function planarWire(wire) {
|
|
|
125
125
|
if (isPlanarWire(wire)) return ok(wire);
|
|
126
126
|
return err("Wire is not planar: edges do not lie in a common plane");
|
|
127
127
|
}
|
|
128
|
-
//#endregion
|
|
129
128
|
export { isPlanarFace as a, manifoldShell as c, planarWire as d, validSolid as f, isOrientedFace as i, orientedFace as l, isClosedWire as n, isPlanarWire as o, isManifoldShell as r, isValidSolid as s, closedWire as t, planarFace as u };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/core/vecOps.ts
|
|
2
2
|
/** Add two 3D vectors component-wise. */
|
|
3
3
|
function vecAdd(a, b) {
|
|
4
4
|
return [
|
|
@@ -125,7 +125,6 @@ var round3 = (v) => Math.round(v * 1e3) / 1e3;
|
|
|
125
125
|
function vecRepr(v) {
|
|
126
126
|
return `x: ${round3(v[0])}, y: ${round3(v[1])}, z: ${round3(v[2])}`;
|
|
127
127
|
}
|
|
128
|
-
//#endregion
|
|
129
128
|
Object.defineProperty(exports, "vecAdd", {
|
|
130
129
|
enumerable: true,
|
|
131
130
|
get: function() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/core/vecOps.ts
|
|
2
2
|
/** Add two 3D vectors component-wise. */
|
|
3
3
|
function vecAdd(a, b) {
|
|
4
4
|
return [
|
|
@@ -125,5 +125,4 @@ var round3 = (v) => Math.round(v * 1e3) / 1e3;
|
|
|
125
125
|
function vecRepr(v) {
|
|
126
126
|
return `x: ${round3(v[0])}, y: ${round3(v[1])}, z: ${round3(v[2])}`;
|
|
127
127
|
}
|
|
128
|
-
//#endregion
|
|
129
128
|
export { vecDot as a, vecLength as c, vecNormalize as d, vecProjectToPlane as f, vecSub as g, vecScale as h, vecDistance as i, vecLengthSq as l, vecRotate as m, vecAngle as n, vecEquals as o, vecRepr as p, vecCross as r, vecIsZero as s, vecAdd as t, vecNegate as u };
|
package/dist/vectors.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_constants = require("./constants-
|
|
3
|
-
const require_types = require("./types-
|
|
4
|
-
const require_vecOps = require("./vecOps-
|
|
5
|
-
const require_planeOps = require("./planeOps-
|
|
2
|
+
const require_constants = require("./constants-oee0S_x6.cjs");
|
|
3
|
+
const require_types = require("./types-CjF9Rofr.cjs");
|
|
4
|
+
const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
|
|
5
|
+
const require_planeOps = require("./planeOps-C9d2Y56B.cjs");
|
|
6
6
|
exports.DEG2RAD = require_constants.DEG2RAD;
|
|
7
7
|
exports.RAD2DEG = require_constants.RAD2DEG;
|
|
8
8
|
exports.createNamedPlane = require_planeOps.createNamedPlane;
|
package/dist/vectors.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as RAD2DEG, t as DEG2RAD } from "./constants-
|
|
2
|
-
import { n as toVec2, r as toVec3, t as resolveDirection } from "./types-
|
|
3
|
-
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-
|
|
4
|
-
import { i as pivotPlane, n as createPlane, o as resolvePlane, s as translatePlane, t as createNamedPlane } from "./planeOps-
|
|
1
|
+
import { r as RAD2DEG, t as DEG2RAD } from "./constants-iraOnb2p.js";
|
|
2
|
+
import { n as toVec2, r as toVec3, t as resolveDirection } from "./types-CKXsIm9-.js";
|
|
3
|
+
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-S-m9H_fe.js";
|
|
4
|
+
import { i as pivotPlane, n as createPlane, o as resolvePlane, s as translatePlane, t as createNamedPlane } from "./planeOps-Dp0YvuFE.js";
|
|
5
5
|
export { DEG2RAD, RAD2DEG, createNamedPlane, createPlane, pivotPlane, resolveDirection, resolvePlane, toVec2, toVec3, translatePlane, vecAdd, vecAngle, vecCross, vecDistance, vecDot, vecEquals, vecIsZero, vecLength, vecLengthSq, vecNegate, vecNormalize, vecProjectToPlane, vecRepr, vecRotate, vecScale, vecSub };
|
package/dist/worker.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_workerPool = require("./workerPool-
|
|
2
|
+
const require_workerPool = require("./workerPool-D5tiNXrI.cjs");
|
|
3
3
|
exports.createOperationRegistry = require_workerPool.createOperationRegistry;
|
|
4
4
|
exports.createTaskQueue = require_workerPool.createTaskQueue;
|
|
5
5
|
exports.createWorkerClient = require_workerPool.createWorkerClient;
|
package/dist/worker.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { createOperationRegistry, createTaskQueue, createWorkerClient, createWorkerHandler, createWorkerPool, dequeueTask, enqueueTask, isBatchRequest, isDisposeRequest, isErrorResponse, isInitRequest, isOperationRequest, isEmpty as isQueueEmpty, isSuccessResponse, pendingCount, registerHandler, rejectAll };
|
|
1
|
+
export { n as createOperationRegistry, o as createTaskQueue, a as createWorkerClient, r as createWorkerHandler, t as createWorkerPool, s as dequeueTask, c as enqueueTask, f as isBatchRequest, p as isDisposeRequest, m as isErrorResponse, h as isInitRequest, g as isOperationRequest, l as isQueueEmpty, _ as isSuccessResponse, u as pendingCount, i as registerHandler, d as rejectAll } from "./workerPool-Bc5hmJc4.js";
|