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,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { OcctWasmAdapter };
|
|
1
|
+
export { t as OcctWasmAdapter } from "../../occtWasmAdapter-PzZJHUAd.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { G as _usingCtx, T as isWire, h as disposeResultShape, n as castResultShape, q as getKernel, x as isShape3D } from "./shapeTypes-
|
|
2
|
-
import { E as ok, b as isErr, d as validationError, g as err, i as kernelError, l as typeCastError, t as BrepErrorCode } from "./errors-
|
|
3
|
-
import { r as toVec3 } from "./types-
|
|
4
|
-
import { c as vecLength, t as vecAdd } from "./vecOps-
|
|
5
|
-
|
|
1
|
+
import { G as _usingCtx, T as isWire, h as disposeResultShape, n as castResultShape, q as getKernel, x as isShape3D } from "./shapeTypes-CgbUTASh.js";
|
|
2
|
+
import { E as ok, b as isErr, d as validationError, g as err, i as kernelError, l as typeCastError, t as BrepErrorCode } from "./errors-vxP5FT8B.js";
|
|
3
|
+
import { r as toVec3 } from "./types-CKXsIm9-.js";
|
|
4
|
+
import { c as vecLength, t as vecAdd } from "./vecOps-S-m9H_fe.js";
|
|
5
|
+
// src/operations/extrudeUtils.ts
|
|
6
6
|
/**
|
|
7
7
|
* Shared utilities for extrusion operations.
|
|
8
8
|
* Used by both class-based (extrude.ts) and functional (extrudeFns.ts) APIs.
|
|
@@ -25,8 +25,7 @@ function buildLawFromProfile(extrusionLength, { profile, endFactor = 1 }) {
|
|
|
25
25
|
const law = getKernel().buildExtrusionLaw(profile, extrusionLength, endFactor);
|
|
26
26
|
return ok(law.Trim(0, extrusionLength, 1e-6));
|
|
27
27
|
}
|
|
28
|
-
|
|
29
|
-
//#region src/operations/sweepFns.ts
|
|
28
|
+
// src/operations/sweepFns.ts
|
|
30
29
|
/**
|
|
31
30
|
* Sweep operations — generic sweep, support extrude, complex extrude,
|
|
32
31
|
* twist extrude, multi-section sweep, and guided sweep.
|
|
@@ -341,8 +340,7 @@ function guidedSweep(profile, spine, guides, options = {}) {
|
|
|
341
340
|
return err(kernelError(BrepErrorCode.GUIDED_SWEEP_FAILED, `Guided sweep failed: ${raw}`, e, void 0, "Common causes: profile too large for path curvature, self-intersecting result, or discontinuous path. Try simplifying the profile or path."));
|
|
342
341
|
}
|
|
343
342
|
}
|
|
344
|
-
|
|
345
|
-
//#region src/operations/loftFns.ts
|
|
343
|
+
// src/operations/loftFns.ts
|
|
346
344
|
/**
|
|
347
345
|
* Functional loft operation using branded shape types.
|
|
348
346
|
*/
|
|
@@ -438,5 +436,4 @@ function loftAll(entries) {
|
|
|
438
436
|
for (const v of verticesToDelete) kernel.dispose(v);
|
|
439
437
|
}
|
|
440
438
|
}
|
|
441
|
-
//#endregion
|
|
442
439
|
export { multiSectionSweep as a, twistExtrude as c, guidedSweep as i, loftAll as n, supportExtrude as o, complexExtrude as r, sweep as s, loft as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_errors = require("./errors-
|
|
3
|
-
const require_types = require("./types-
|
|
4
|
-
const require_vecOps = require("./vecOps-
|
|
5
|
-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-D_anqiRe.cjs");
|
|
2
|
+
const require_errors = require("./errors-GVyCnpi0.cjs");
|
|
3
|
+
const require_types = require("./types-CjF9Rofr.cjs");
|
|
4
|
+
const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
|
|
5
|
+
// src/operations/extrudeUtils.ts
|
|
6
6
|
/**
|
|
7
7
|
* Shared utilities for extrusion operations.
|
|
8
8
|
* Used by both class-based (extrude.ts) and functional (extrudeFns.ts) APIs.
|
|
@@ -25,8 +25,7 @@ function buildLawFromProfile(extrusionLength, { profile, endFactor = 1 }) {
|
|
|
25
25
|
const law = require_shapeTypes.getKernel().buildExtrusionLaw(profile, extrusionLength, endFactor);
|
|
26
26
|
return require_errors.ok(law.Trim(0, extrusionLength, 1e-6));
|
|
27
27
|
}
|
|
28
|
-
|
|
29
|
-
//#region src/operations/sweepFns.ts
|
|
28
|
+
// src/operations/sweepFns.ts
|
|
30
29
|
/**
|
|
31
30
|
* Sweep operations — generic sweep, support extrude, complex extrude,
|
|
32
31
|
* twist extrude, multi-section sweep, and guided sweep.
|
|
@@ -341,8 +340,7 @@ function guidedSweep(profile, spine, guides, options = {}) {
|
|
|
341
340
|
return require_errors.err(require_errors.kernelError(require_errors.BrepErrorCode.GUIDED_SWEEP_FAILED, `Guided sweep failed: ${raw}`, e, void 0, "Common causes: profile too large for path curvature, self-intersecting result, or discontinuous path. Try simplifying the profile or path."));
|
|
342
341
|
}
|
|
343
342
|
}
|
|
344
|
-
|
|
345
|
-
//#region src/operations/loftFns.ts
|
|
343
|
+
// src/operations/loftFns.ts
|
|
346
344
|
/**
|
|
347
345
|
* Functional loft operation using branded shape types.
|
|
348
346
|
*/
|
|
@@ -438,7 +436,6 @@ function loftAll(entries) {
|
|
|
438
436
|
for (const v of verticesToDelete) kernel.dispose(v);
|
|
439
437
|
}
|
|
440
438
|
}
|
|
441
|
-
//#endregion
|
|
442
439
|
Object.defineProperty(exports, "complexExtrude", {
|
|
443
440
|
enumerable: true,
|
|
444
441
|
get: function() {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_errors = require("./errors-
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
4
|
-
const require_faceFns = require("./faceFns-
|
|
5
|
-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-D_anqiRe.cjs");
|
|
2
|
+
const require_errors = require("./errors-GVyCnpi0.cjs");
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-ENxs8uu2.cjs");
|
|
4
|
+
const require_faceFns = require("./faceFns-DSRREV5G.cjs");
|
|
5
|
+
// src/measurement/measureCache.ts
|
|
6
6
|
var cache = /* @__PURE__ */ new WeakMap();
|
|
7
7
|
function getCachedMeasurement(shape, key) {
|
|
8
8
|
return cache.get(shape)?.get(key);
|
|
@@ -15,8 +15,7 @@ function setCachedMeasurement(shape, key, value) {
|
|
|
15
15
|
}
|
|
16
16
|
map.set(key, value);
|
|
17
17
|
}
|
|
18
|
-
|
|
19
|
-
//#region src/measurement/measureFns.ts
|
|
18
|
+
// src/measurement/measureFns.ts
|
|
20
19
|
/**
|
|
21
20
|
* Functional measurement utilities using branded shape types.
|
|
22
21
|
* All functions return `Result<T>` for consistent error handling.
|
|
@@ -223,7 +222,6 @@ function measureCurvatureAtMid(face) {
|
|
|
223
222
|
minDirection: result.minDirection
|
|
224
223
|
});
|
|
225
224
|
}
|
|
226
|
-
//#endregion
|
|
227
225
|
Object.defineProperty(exports, "createDistanceQuery", {
|
|
228
226
|
enumerable: true,
|
|
229
227
|
get: function() {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { q as getKernel } from "./shapeTypes-
|
|
2
|
-
import { E as ok, d as validationError, g as err, t as BrepErrorCode } from "./errors-
|
|
3
|
-
import { E as kernelCallRaw } from "./topologyQueryFns-
|
|
4
|
-
import { m as uvBounds } from "./faceFns-
|
|
5
|
-
|
|
1
|
+
import { q as getKernel } from "./shapeTypes-CgbUTASh.js";
|
|
2
|
+
import { E as ok, d as validationError, g as err, t as BrepErrorCode } from "./errors-vxP5FT8B.js";
|
|
3
|
+
import { E as kernelCallRaw } from "./topologyQueryFns-6M_dbT1R.js";
|
|
4
|
+
import { m as uvBounds } from "./faceFns-BBk6XKJO.js";
|
|
5
|
+
// src/measurement/measureCache.ts
|
|
6
6
|
var cache = /* @__PURE__ */ new WeakMap();
|
|
7
7
|
function getCachedMeasurement(shape, key) {
|
|
8
8
|
return cache.get(shape)?.get(key);
|
|
@@ -15,8 +15,7 @@ function setCachedMeasurement(shape, key, value) {
|
|
|
15
15
|
}
|
|
16
16
|
map.set(key, value);
|
|
17
17
|
}
|
|
18
|
-
|
|
19
|
-
//#region src/measurement/measureFns.ts
|
|
18
|
+
// src/measurement/measureFns.ts
|
|
20
19
|
/**
|
|
21
20
|
* Functional measurement utilities using branded shape types.
|
|
22
21
|
* All functions return `Result<T>` for consistent error handling.
|
|
@@ -223,5 +222,4 @@ function measureCurvatureAtMid(face) {
|
|
|
223
222
|
minDirection: result.minDirection
|
|
224
223
|
});
|
|
225
224
|
}
|
|
226
|
-
//#endregion
|
|
227
225
|
export { measureDistance as a, measureLinearProps as c, measureVolumeProps as d, getCachedMeasurement as f, measureCurvatureAtMid as i, measureSurfaceProps as l, measureArea as n, measureDistanceProps as o, setCachedMeasurement as p, measureCurvatureAt as r, measureLength as s, createDistanceQuery as t, measureVolume as u };
|
package/dist/measurement.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_measureFns = require("./measureFns-
|
|
3
|
-
const require_principalBoxFns = require("./principalBoxFns-
|
|
2
|
+
const require_measureFns = require("./measureFns-BvNkzSR6.cjs");
|
|
3
|
+
const require_principalBoxFns = require("./principalBoxFns-CmZa7qHi.cjs");
|
|
4
4
|
exports.createDistanceQuery = require_measureFns.createDistanceQuery;
|
|
5
5
|
exports.measureArea = require_measureFns.measureArea;
|
|
6
6
|
exports.measureDistance = require_measureFns.measureDistance;
|
package/dist/measurement.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
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-
|
|
2
|
-
import { t as principalBoundingBox } from "./principalBoxFns-
|
|
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-PRM3gOjw.js";
|
|
2
|
+
import { t as principalBoundingBox } from "./principalBoxFns-Cbtty-2_.js";
|
|
3
3
|
export { createDistanceQuery, measureArea, measureDistance, measureDistanceProps, measureLength, measureLinearProps, measureSurfaceProps, measureVolume, measureVolumeProps, principalBoundingBox };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { q as getKernel, ut as qualityDeflection } from "./shapeTypes-
|
|
2
|
-
import { E as ok, g as err, r as ioError } from "./errors-
|
|
3
|
-
import { d as getSolids, n as getBounds } from "./topologyQueryFns-
|
|
4
|
-
import { t as getFaceOrigins } from "./originTrackingFns-
|
|
5
|
-
|
|
1
|
+
import { q as getKernel, ut as qualityDeflection } from "./shapeTypes-CgbUTASh.js";
|
|
2
|
+
import { E as ok, g as err, r as ioError } from "./errors-vxP5FT8B.js";
|
|
3
|
+
import { d as getSolids, n as getBounds } from "./topologyQueryFns-6M_dbT1R.js";
|
|
4
|
+
import { t as getFaceOrigins } from "./originTrackingFns-D8SNCDKj.js";
|
|
5
|
+
// src/topology/meshCache.ts
|
|
6
6
|
/**
|
|
7
7
|
* Build a parameter key for the inner cache map (excludes shape identity).
|
|
8
8
|
* Shape identity is handled by the WeakMap outer layer.
|
|
@@ -107,8 +107,7 @@ function createMeshCache() {
|
|
|
107
107
|
}
|
|
108
108
|
};
|
|
109
109
|
}
|
|
110
|
-
|
|
111
|
-
//#region src/topology/meshFns.ts
|
|
110
|
+
// src/topology/meshFns.ts
|
|
112
111
|
/**
|
|
113
112
|
* Meshing and export functions — functional replacements for Shape mesh/export methods.
|
|
114
113
|
*/
|
|
@@ -437,5 +436,4 @@ async function meshLODsProgressive(shape, options = {}) {
|
|
|
437
436
|
}
|
|
438
437
|
return results;
|
|
439
438
|
}
|
|
440
|
-
//#endregion
|
|
441
439
|
export { meshEdges as a, meshMultiLOD as c, clearMeshCache as d, createMeshCache as f, mesh as i, scaleDefaultTolerance as l, exportSTEP as n, meshLODs as o, exportSTL as r, meshLODsProgressive as s, exportIGES as t, buildMeshCacheKey as u };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_errors = require("./errors-
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
4
|
-
const require_originTrackingFns = require("./originTrackingFns-
|
|
5
|
-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-D_anqiRe.cjs");
|
|
2
|
+
const require_errors = require("./errors-GVyCnpi0.cjs");
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-ENxs8uu2.cjs");
|
|
4
|
+
const require_originTrackingFns = require("./originTrackingFns-DJDTRJh3.cjs");
|
|
5
|
+
// src/topology/meshCache.ts
|
|
6
6
|
/**
|
|
7
7
|
* Build a parameter key for the inner cache map (excludes shape identity).
|
|
8
8
|
* Shape identity is handled by the WeakMap outer layer.
|
|
@@ -107,8 +107,7 @@ function createMeshCache() {
|
|
|
107
107
|
}
|
|
108
108
|
};
|
|
109
109
|
}
|
|
110
|
-
|
|
111
|
-
//#region src/topology/meshFns.ts
|
|
110
|
+
// src/topology/meshFns.ts
|
|
112
111
|
/**
|
|
113
112
|
* Meshing and export functions — functional replacements for Shape mesh/export methods.
|
|
114
113
|
*/
|
|
@@ -437,7 +436,6 @@ async function meshLODsProgressive(shape, options = {}) {
|
|
|
437
436
|
}
|
|
438
437
|
return results;
|
|
439
438
|
}
|
|
440
|
-
//#endregion
|
|
441
439
|
Object.defineProperty(exports, "buildMeshCacheKey", {
|
|
442
440
|
enumerable: true,
|
|
443
441
|
get: function() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_bug = require("./bug-
|
|
2
|
-
|
|
1
|
+
const require_bug = require("./bug-CBcpIPuf.cjs");
|
|
2
|
+
// src/kernel/capabilities.ts
|
|
3
3
|
/** Default for an exact B-rep kernel (OCCT family, brepkit). */
|
|
4
4
|
var EXACT_BREP_CAPABILITIES = {
|
|
5
5
|
exact: true,
|
|
@@ -7,6 +7,11 @@ var EXACT_BREP_CAPABILITIES = {
|
|
|
7
7
|
exactMeasurement: true,
|
|
8
8
|
tessellationModel: "extract-time"
|
|
9
9
|
};
|
|
10
|
+
/** OCCT-family kernels: exact B-rep with OCCT's own shape history. */
|
|
11
|
+
var OCCT_CAPABILITIES = {
|
|
12
|
+
...EXACT_BREP_CAPABILITIES,
|
|
13
|
+
nativeHistory: true
|
|
14
|
+
};
|
|
10
15
|
/**
|
|
11
16
|
* Conservative fallback for a kernel that doesn't declare capabilities: assume
|
|
12
17
|
* exact B-rep so export/measurement aren't wrongly blocked, but claim no
|
|
@@ -18,8 +23,7 @@ var DEFAULT_CAPABILITIES = {
|
|
|
18
23
|
exactMeasurement: true,
|
|
19
24
|
tessellationModel: "none"
|
|
20
25
|
};
|
|
21
|
-
|
|
22
|
-
//#region src/kernel/unsupported.ts
|
|
26
|
+
// src/kernel/unsupported.ts
|
|
23
27
|
/**
|
|
24
28
|
* Shared error for "this kernel doesn't implement this operation" — a stubbed
|
|
25
29
|
* adapter method (occt's brepkit-only stubs, occt-wasm's not-yet-implemented) or
|
|
@@ -41,8 +45,7 @@ var UnsupportedKernelOperationError = class extends Error {
|
|
|
41
45
|
function isUnsupportedKernelOperationError(error) {
|
|
42
46
|
return error instanceof Error && Reflect.get(error, UNSUPPORTED_MARKER) === true;
|
|
43
47
|
}
|
|
44
|
-
|
|
45
|
-
//#region src/kernel/hullGeometry.ts
|
|
48
|
+
// src/kernel/hullGeometry.ts
|
|
46
49
|
function sub(a, b) {
|
|
47
50
|
return {
|
|
48
51
|
x: a.x - b.x,
|
|
@@ -293,8 +296,7 @@ function quickHull(inputPoints, tolerance) {
|
|
|
293
296
|
points
|
|
294
297
|
};
|
|
295
298
|
}
|
|
296
|
-
|
|
297
|
-
//#region src/kernel/geometry2d.ts
|
|
299
|
+
// src/kernel/geometry2d.ts
|
|
298
300
|
/* v8 ignore file -- excluded from coverage reports; prevents V8 instrumentation
|
|
299
301
|
overhead that causes 2D-heavy tests to timeout under coverage mode. */
|
|
300
302
|
function evaluateCurve2d$1(c, t) {
|
|
@@ -1119,8 +1121,7 @@ function evaluateBSpline2d(c, t) {
|
|
|
1119
1121
|
}
|
|
1120
1122
|
return d[p];
|
|
1121
1123
|
}
|
|
1122
|
-
|
|
1123
|
-
//#region src/kernel/stlBuilder.ts
|
|
1124
|
+
// src/kernel/stlBuilder.ts
|
|
1124
1125
|
/**
|
|
1125
1126
|
* Kernel-agnostic STL serializers.
|
|
1126
1127
|
*
|
|
@@ -1224,8 +1225,7 @@ function buildAsciiSTL(vertices, triangles) {
|
|
|
1224
1225
|
lines.push("endsolid brepjs");
|
|
1225
1226
|
return lines.join("\n") + "\n";
|
|
1226
1227
|
}
|
|
1227
|
-
|
|
1228
|
-
//#region src/kernel/occtWasm/helpers.ts
|
|
1228
|
+
// src/kernel/occtWasm/helpers.ts
|
|
1229
1229
|
var noop = () => {};
|
|
1230
1230
|
/** Build an opaque kernel handle for an arena-allocated WASM shape. */
|
|
1231
1231
|
function handle(type, id) {
|
|
@@ -1358,8 +1358,7 @@ function parseEvolution(evo) {
|
|
|
1358
1358
|
evo.delete();
|
|
1359
1359
|
}
|
|
1360
1360
|
}
|
|
1361
|
-
|
|
1362
|
-
//#region src/kernel/occtWasm/adapterShims.ts
|
|
1361
|
+
// src/kernel/occtWasm/adapterShims.ts
|
|
1363
1362
|
function wrapKernelExceptions(kernel, mod) {
|
|
1364
1363
|
return new Proxy(kernel, { get(target, prop, receiver) {
|
|
1365
1364
|
const val = Reflect.get(target, prop, receiver);
|
|
@@ -1411,8 +1410,7 @@ function buildOcShim(module, k) {
|
|
|
1411
1410
|
}
|
|
1412
1411
|
});
|
|
1413
1412
|
}
|
|
1414
|
-
|
|
1415
|
-
//#region src/kernel/occtWasm/booleanOps.ts
|
|
1413
|
+
// src/kernel/occtWasm/booleanOps.ts
|
|
1416
1414
|
var BOOLEAN_OP_CODE = {
|
|
1417
1415
|
fuse: 0,
|
|
1418
1416
|
cut: 1,
|
|
@@ -1626,8 +1624,7 @@ function checkBoolean(k, shape, tool, _op) {
|
|
|
1626
1624
|
function meshBoolean(_positionsA, _indicesA, _positionsB, _indicesB, _op, _tolerance) {
|
|
1627
1625
|
throw new Error("occt-wasm: meshBoolean is not supported (use brepkit for mesh booleans)");
|
|
1628
1626
|
}
|
|
1629
|
-
|
|
1630
|
-
//#region src/kernel/occtWasm/primitiveOps.ts
|
|
1627
|
+
// src/kernel/occtWasm/primitiveOps.ts
|
|
1631
1628
|
/**
|
|
1632
1629
|
* Apply an id-remapping positioning step (rotate/translate), releasing the
|
|
1633
1630
|
* orphaned source slot. rotate/translate return fresh arena slots on occt-wasm;
|
|
@@ -1673,8 +1670,7 @@ function makeBoxFromCorners(k, p1, p2) {
|
|
|
1673
1670
|
function makeRectangle(k, width, height) {
|
|
1674
1671
|
return handle("face", k.makeRectangle(width, height));
|
|
1675
1672
|
}
|
|
1676
|
-
|
|
1677
|
-
//#region src/kernel/occtWasm/topologyOps.ts
|
|
1673
|
+
// src/kernel/occtWasm/topologyOps.ts
|
|
1678
1674
|
function iterShapes(k, shape, type) {
|
|
1679
1675
|
const vec = k.getSubShapes(unwrap(shape), type);
|
|
1680
1676
|
const results = [];
|
|
@@ -1772,8 +1768,7 @@ function sew(k, Module, shapes, tolerance) {
|
|
|
1772
1768
|
vec.delete();
|
|
1773
1769
|
}
|
|
1774
1770
|
}
|
|
1775
|
-
|
|
1776
|
-
//#region src/kernel/occtWasm/repairOps.ts
|
|
1771
|
+
// src/kernel/occtWasm/repairOps.ts
|
|
1777
1772
|
var HEAL_TOLERANCE = 1e-6;
|
|
1778
1773
|
function isValid(k, shape) {
|
|
1779
1774
|
return k.isValid(unwrap(shape));
|
|
@@ -1803,8 +1798,7 @@ function fixFaceOrientations(k, shape) {
|
|
|
1803
1798
|
function fixShape(k, shape) {
|
|
1804
1799
|
return wrapResult(k, k.fixShape(unwrap(shape)));
|
|
1805
1800
|
}
|
|
1806
|
-
|
|
1807
|
-
//#region src/kernel/occtWasm/meshOps.ts
|
|
1801
|
+
// src/kernel/occtWasm/meshOps.ts
|
|
1808
1802
|
function mesh(k, Module, shape, options) {
|
|
1809
1803
|
const meshData = k.tessellate(unwrap(shape), options.tolerance, options.angularTolerance);
|
|
1810
1804
|
try {
|
|
@@ -1895,8 +1889,7 @@ function hasTriangulation(k, shape) {
|
|
|
1895
1889
|
function meshShape(k, shape, tolerance, angularTolerance) {
|
|
1896
1890
|
k.meshShape(unwrap(shape), tolerance, angularTolerance).delete();
|
|
1897
1891
|
}
|
|
1898
|
-
|
|
1899
|
-
//#region src/kernel/occtWasm/curveOps.ts
|
|
1892
|
+
// src/kernel/occtWasm/curveOps.ts
|
|
1900
1893
|
var CURVE_TYPE_MAP = {
|
|
1901
1894
|
line: "LINE",
|
|
1902
1895
|
circle: "CIRCLE",
|
|
@@ -2046,8 +2039,7 @@ function getNurbsCurveData(k, edge) {
|
|
|
2046
2039
|
return null;
|
|
2047
2040
|
}
|
|
2048
2041
|
}
|
|
2049
|
-
|
|
2050
|
-
//#region src/kernel/occtWasm/surfaceOps.ts
|
|
2042
|
+
// src/kernel/occtWasm/surfaceOps.ts
|
|
2051
2043
|
function vertexPosition(k, vertex) {
|
|
2052
2044
|
const vec = k.vertexPosition(unwrap(vertex));
|
|
2053
2045
|
try {
|
|
@@ -2327,8 +2319,7 @@ function projectEdges(k, Module, shape, cameraOrigin, cameraDirection, cameraXAx
|
|
|
2327
2319
|
}
|
|
2328
2320
|
};
|
|
2329
2321
|
}
|
|
2330
|
-
|
|
2331
|
-
//#region src/kernel/occtWasm/measureOps.ts
|
|
2322
|
+
// src/kernel/occtWasm/measureOps.ts
|
|
2332
2323
|
function volume(k, shape) {
|
|
2333
2324
|
return k.getVolume(unwrap(shape));
|
|
2334
2325
|
}
|
|
@@ -2457,13 +2448,18 @@ function collectDistanceSamples(k, mod, shapeId) {
|
|
|
2457
2448
|
try {
|
|
2458
2449
|
const n = verts.size();
|
|
2459
2450
|
for (let i = 0; i < n; i++) {
|
|
2460
|
-
const
|
|
2461
|
-
|
|
2462
|
-
p.
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2451
|
+
const vertexId = verts.get(i);
|
|
2452
|
+
try {
|
|
2453
|
+
const p = k.vertexPosition(vertexId);
|
|
2454
|
+
out.push([
|
|
2455
|
+
p.get(0),
|
|
2456
|
+
p.get(1),
|
|
2457
|
+
p.get(2)
|
|
2458
|
+
]);
|
|
2459
|
+
p.delete();
|
|
2460
|
+
} finally {
|
|
2461
|
+
k.release(vertexId);
|
|
2462
|
+
}
|
|
2467
2463
|
}
|
|
2468
2464
|
} finally {
|
|
2469
2465
|
verts.delete();
|
|
@@ -2752,8 +2748,7 @@ function surfaceCurvature(k, face, u, v) {
|
|
|
2752
2748
|
minDirection
|
|
2753
2749
|
};
|
|
2754
2750
|
}
|
|
2755
|
-
|
|
2756
|
-
//#region src/kernel/occtWasm/modifierOps.ts
|
|
2751
|
+
// src/kernel/occtWasm/modifierOps.ts
|
|
2757
2752
|
var HASH_UPPER_BOUND = 2147483647;
|
|
2758
2753
|
function fillet(k, Module, shape, edges, radius) {
|
|
2759
2754
|
const r = resolveUniformRadius(edges, radius);
|
|
@@ -2889,8 +2884,7 @@ function simplify(k, shape) {
|
|
|
2889
2884
|
function reverseShape(k, shape) {
|
|
2890
2885
|
return wrapResult(k, k.reverseShape(unwrap(shape)));
|
|
2891
2886
|
}
|
|
2892
|
-
|
|
2893
|
-
//#region src/kernel/occtWasm/sweepOps.ts
|
|
2887
|
+
// src/kernel/occtWasm/sweepOps.ts
|
|
2894
2888
|
var SWEEP_MODE_FIXED = 0;
|
|
2895
2889
|
var SWEEP_MODE_FRENET = 1;
|
|
2896
2890
|
var SWEEP_MODE_AUXILIARY = 3;
|
|
@@ -3077,8 +3071,7 @@ function draftPrism(k, shape, _face, _baseFace, height, angleDeg, _fuse) {
|
|
|
3077
3071
|
const h = height ?? 10;
|
|
3078
3072
|
return wrapResult(k, k.draftPrism(unwrap(shape), 0, 0, h, angleDeg));
|
|
3079
3073
|
}
|
|
3080
|
-
|
|
3081
|
-
//#region src/kernel/occtWasm/transformOps.ts
|
|
3074
|
+
// src/kernel/occtWasm/transformOps.ts
|
|
3082
3075
|
function composeTransform(ops) {
|
|
3083
3076
|
let matrix = [
|
|
3084
3077
|
1,
|
|
@@ -3381,8 +3374,7 @@ function transformBatch(k, entries) {
|
|
|
3381
3374
|
}
|
|
3382
3375
|
});
|
|
3383
3376
|
}
|
|
3384
|
-
|
|
3385
|
-
//#region src/kernel/occtWasm/ioOps.ts
|
|
3377
|
+
// src/kernel/occtWasm/ioOps.ts
|
|
3386
3378
|
function computePositionBounds(positions, vCount) {
|
|
3387
3379
|
if (vCount === 0) return {
|
|
3388
3380
|
min: [
|
|
@@ -3697,8 +3689,7 @@ function exportSTEPConfigured(k, Module, shapes, _options) {
|
|
|
3697
3689
|
doc.delete();
|
|
3698
3690
|
}
|
|
3699
3691
|
}
|
|
3700
|
-
|
|
3701
|
-
//#region src/kernel/occtWasm/constructionOps.ts
|
|
3692
|
+
// src/kernel/occtWasm/constructionOps.ts
|
|
3702
3693
|
function makeVertex(k, x, y, z) {
|
|
3703
3694
|
return handle("vertex", k.makeVertex(x, y, z));
|
|
3704
3695
|
}
|
|
@@ -3982,8 +3973,7 @@ function createAxis3(ox, oy, oz, zx, zy, zz, xx, xy, xz) {
|
|
|
3982
3973
|
delete: noop
|
|
3983
3974
|
};
|
|
3984
3975
|
}
|
|
3985
|
-
|
|
3986
|
-
//#region src/kernel/occtWasm/kernel2dOps.ts
|
|
3976
|
+
// src/kernel/occtWasm/kernel2dOps.ts
|
|
3987
3977
|
function c2d(h) {
|
|
3988
3978
|
return h;
|
|
3989
3979
|
}
|
|
@@ -4666,8 +4656,7 @@ function buildCurves3d(k, wire) {
|
|
|
4666
4656
|
function fixWireOnFace(k, wire, face, tolerance) {
|
|
4667
4657
|
return handle("wire", k.fixWireOnFace(unwrap(wire), unwrap(face), tolerance));
|
|
4668
4658
|
}
|
|
4669
|
-
|
|
4670
|
-
//#region src/kernel/occtWasm/evolutionOps.ts
|
|
4659
|
+
// src/kernel/occtWasm/evolutionOps.ts
|
|
4671
4660
|
/**
|
|
4672
4661
|
* Parse an EvolutionData result from the WASM kernel into a ShapeEvolution.
|
|
4673
4662
|
* The C++ facade returns flat vectors of [inputHash, count, out1, out2, ..., inputHash, count, ...].
|
|
@@ -4945,8 +4934,7 @@ function applyComposedTransformWithHistory(transformFn, iterShapesFn, hashCodeFn
|
|
|
4945
4934
|
}
|
|
4946
4935
|
};
|
|
4947
4936
|
}
|
|
4948
|
-
|
|
4949
|
-
//#region src/kernel/occtWasm/hullOps.ts
|
|
4937
|
+
// src/kernel/occtWasm/hullOps.ts
|
|
4950
4938
|
function hullFromPoints(k, Module, points, tolerance) {
|
|
4951
4939
|
if (points.length < 4) throw new Error("hullFromPoints: need at least 4 points");
|
|
4952
4940
|
const { points: hullPoints, faces } = quickHull(points, tolerance);
|
|
@@ -4983,8 +4971,7 @@ function hull(k, Module, shapes, tolerance) {
|
|
|
4983
4971
|
if (points.length < 4) throw new Error("hull: fewer than 4 vertices extracted from input shapes");
|
|
4984
4972
|
return hullFromPoints(k, Module, points, tolerance);
|
|
4985
4973
|
}
|
|
4986
|
-
|
|
4987
|
-
//#region src/kernel/occtWasm/occtWasmAdapter.ts
|
|
4974
|
+
// src/kernel/occtWasm/occtWasmAdapter.ts
|
|
4988
4975
|
/**
|
|
4989
4976
|
* Parse an EvolutionData result from the WASM kernel into a ShapeEvolution.
|
|
4990
4977
|
*
|
|
@@ -4997,7 +4984,7 @@ function notImplemented(method) {
|
|
|
4997
4984
|
var OcctWasmAdapter = class OcctWasmAdapter {
|
|
4998
4985
|
oc;
|
|
4999
4986
|
kernelId = "occt-wasm";
|
|
5000
|
-
capabilities =
|
|
4987
|
+
capabilities = OCCT_CAPABILITIES;
|
|
5001
4988
|
Module;
|
|
5002
4989
|
k;
|
|
5003
4990
|
owner;
|
|
@@ -5839,7 +5826,6 @@ var OcctWasmAdapter = class OcctWasmAdapter {
|
|
|
5839
5826
|
return getNurbsCurveData(this.k, edge);
|
|
5840
5827
|
}
|
|
5841
5828
|
};
|
|
5842
|
-
//#endregion
|
|
5843
5829
|
Object.defineProperty(exports, "DEFAULT_CAPABILITIES", {
|
|
5844
5830
|
enumerable: true,
|
|
5845
5831
|
get: function() {
|
|
@@ -5864,6 +5850,12 @@ Object.defineProperty(exports, "EXACT_BREP_CAPABILITIES", {
|
|
|
5864
5850
|
return EXACT_BREP_CAPABILITIES;
|
|
5865
5851
|
}
|
|
5866
5852
|
});
|
|
5853
|
+
Object.defineProperty(exports, "OCCT_CAPABILITIES", {
|
|
5854
|
+
enumerable: true,
|
|
5855
|
+
get: function() {
|
|
5856
|
+
return OCCT_CAPABILITIES;
|
|
5857
|
+
}
|
|
5858
|
+
});
|
|
5867
5859
|
Object.defineProperty(exports, "OcctWasmAdapter", {
|
|
5868
5860
|
enumerable: true,
|
|
5869
5861
|
get: function() {
|