brepjs 20.4.0 → 20.6.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-1rxgJ6Hw.cjs → adjacencyFns-CmNvIFu1.cjs} +5 -6
- package/dist/{adjacencyFns-DeyXahej.js → adjacencyFns-DO9_F2YJ.js} +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-Yyoiz-U1.cjs → blueprint-Ci2Mw5v-.cjs} +24 -37
- package/dist/{blueprint-rwJjYPzo.js → blueprint-DHKul4EN.js} +24 -37
- package/dist/{blueprintFns-Ce6OoPSX.cjs → blueprintFns-CbJPSd5r.cjs} +5 -7
- package/dist/{blueprintFns-Q3Sq-Fse.js → blueprintFns-D68_PxRl.js} +5 -7
- package/dist/{blueprintSketcher-FywUpRiV.js → blueprintSketcher-j9vJAniE.js} +19 -31
- package/dist/{blueprintSketcher-CzKbxeTk.cjs → blueprintSketcher-pVbM0BHf.cjs} +19 -31
- package/dist/{boolean2D-D8igCYc9.js → boolean2D-D6Oc8tBx.js} +13 -19
- package/dist/{boolean2D-BzZ9iBSn.cjs → boolean2D-Dq29HCr9.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-RHCb1F1s.cjs → cameraFns-BMXugx7m.cjs} +8 -11
- package/dist/{cameraFns-Cs6v3bWQ.js → cameraFns-DVZkA2eq.js} +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.cjs +8 -8
- package/dist/core.js +8 -8
- package/dist/{cornerFinder-Dlae8IX5.js → cornerFinder-DSnn8gRP.js} +4 -5
- package/dist/{cornerFinder-Cji_BK-R.cjs → cornerFinder-DshfhGHG.cjs} +4 -5
- package/dist/{curveFns-KS1BWGhF.js → curveFns-CEb6TLxC.js} +3 -4
- package/dist/{curveFns-6-ULFrEB.cjs → curveFns-Cxq5lFqU.cjs} +3 -4
- package/dist/{drawFns-Ddlgp9gQ.cjs → drawFns-CH0q-0JP.cjs} +32 -45
- package/dist/{drawFns-3yRVBDgI.js → drawFns-DMhKXGgG.js} +32 -45
- package/dist/{errors-Zb3jBa0u.js → errors-B3espUT6.js} +3 -5
- package/dist/{errors-jwhfQJZK.cjs → errors-DoMAp7mQ.cjs} +3 -5
- package/dist/{faceFns-CZeHWke7.cjs → faceFns-B8ctN5Te.cjs} +6 -8
- package/dist/{faceFns-CTlJC5IY.js → faceFns-C-wc4fX-.js} +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-Ct3gEMvk.js → healingFns-CJfuZMw2.js} +16 -25
- package/dist/{healingFns-DwSpJZfg.cjs → healingFns-D3mNy1rp.cjs} +16 -25
- package/dist/{helpers-BN1mVMuZ.js → helpers-BXoAMWe3.js} +15 -21
- package/dist/{helpers-NRZVshPb.cjs → helpers-BhHbDu6-.cjs} +15 -21
- package/dist/{importFns-BEi-HsSw.cjs → importFns-DHaw1x5R.cjs} +12 -19
- package/dist/{importFns-0kHGg-b8.js → importFns-YZyGYu_M.js} +12 -19
- package/dist/io.cjs +2 -2
- package/dist/io.js +2 -2
- package/dist/kernel/occtWasm/occtWasmAdapter.cjs +1 -1
- package/dist/kernel/occtWasm/occtWasmAdapter.js +1 -2
- package/dist/{loftFns-B5mq1WDh.js → loftFns-CTTia_cZ.js} +7 -10
- package/dist/{loftFns-DL9UsQhd.cjs → loftFns-DVr6PaTM.cjs} +7 -10
- package/dist/{measureFns-CyDVZomf.js → measureFns-BmdVG0_8.js} +6 -8
- package/dist/{measureFns-D_GpQw5z.cjs → measureFns-C6wgH_1a.cjs} +6 -8
- package/dist/measurement.cjs +2 -2
- package/dist/measurement.js +2 -2
- package/dist/{meshFns-CAxkaRTm.cjs → meshFns-r_p0RRoO.cjs} +6 -8
- package/dist/{meshFns-COlno8TY.js → meshFns-uNRS602U.js} +6 -8
- package/dist/{occtWasmAdapter-CA6PmIIj.cjs → occtWasmAdapter-CxSY6Ty2.cjs} +37 -56
- package/dist/{occtWasmAdapter-BX10fyla.js → occtWasmAdapter-cnV8J7Y-.js} +37 -56
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/{originTrackingFns-DiHy5BZC.js → originTrackingFns-BIa3TdgX.js} +4 -5
- package/dist/{originTrackingFns-CWo6NWHK.cjs → originTrackingFns-DgJ-MTtE.cjs} +4 -5
- package/dist/{planeOps-DJuclNxa.cjs → planeOps-BDt05NAD.cjs} +5 -6
- package/dist/{planeOps-Cxws4Tiu.js → planeOps-BkwaqhUj.js} +5 -6
- package/dist/{primitiveFns-ZV3aMbqG.cjs → primitiveFns-CktCbLBo.cjs} +8 -10
- package/dist/{primitiveFns-CGJzS4MO.js → primitiveFns-h_zOAbmf.js} +8 -10
- package/dist/{principalBoxFns-5FSbxAj-.cjs → principalBoxFns-28BQIeo8.cjs} +7 -8
- package/dist/{principalBoxFns-BJgGEoik.js → principalBoxFns-DkP-681E.js} +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-DUDJqfOM.js} +14 -21
- package/dist/{refResolveFns-Ct52Uw7R.cjs → refResolveFns-fSzDZ1rx.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--1wNlcc_.js → shapeFns-B5hzkmwe.js} +5 -6
- package/dist/{shapeFns-C2j6oZ2u.cjs → shapeFns-DKDlt3k2.cjs} +5 -6
- package/dist/shapeRef.cjs +1 -1
- package/dist/shapeRef.js +1 -2
- package/dist/{shapeTypes-CqNJoSam.js → shapeTypes-Bva18qvE.js} +81 -160
- package/dist/{shapeTypes-DH2ShBU_.cjs → shapeTypes-CkxvJRpq.cjs} +81 -160
- package/dist/sketching.cjs +4 -5
- package/dist/sketching.js +4 -5
- package/dist/{solidBuilders-CgicU3le.cjs → solidBuilders-BFEnqrU0.cjs} +17 -23
- package/dist/{solidBuilders-IstbiWju.js → solidBuilders-BpTN-NfM.js} +17 -23
- package/dist/{surfaceBuilders-vYgSvgI6.cjs → surfaceBuilders-CTk2lGlw.cjs} +8 -12
- package/dist/{surfaceBuilders-8nLk2PWk.js → surfaceBuilders-DAZCPa5O.js} +8 -12
- package/dist/text.cjs +2 -2
- package/dist/text.js +2 -2
- package/dist/{textBlueprints-fa7VHJZz.cjs → textBlueprints-DbEWBdhF.cjs} +24 -32
- package/dist/{textBlueprints-C13NAA3C.js → textBlueprints-DuwP72D6.js} +23 -31
- package/dist/{textMetrics--cikHkGX.cjs → textMetrics-CbNBlPsl.cjs} +4 -6
- package/dist/{textMetrics-Dcc63qRm.js → textMetrics-q6RSXX9Z.js} +4 -6
- package/dist/{threadFns-BUQPg_vI.cjs → threadFns-5FXCN-9R.cjs} +21 -33
- package/dist/{threadFns-3U9x4v_M.js → threadFns-BcsScbp4.js} +21 -33
- package/dist/topology.cjs +9 -9
- package/dist/topology.js +9 -9
- package/dist/{topologyQueryFns-q2bGyuEV.cjs → topologyQueryFns-C6HwYYpi.cjs} +6 -9
- package/dist/{topologyQueryFns-DnfjQgP7.js → topologyQueryFns-CY6YiGsk.js} +6 -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-D0IDDMbY.cjs} +3 -4
- package/dist/{validityTypes-t7JpS0Ki.js → validityTypes-MiXYsBZi.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 +15 -15
package/dist/io.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as exportSTEP, r as exportSTL, t as exportIGES } from "./meshFns-
|
|
2
|
-
import { a as importSVG, c as blueprintToDXF, d as exportGltf, f as exportOBJ, i as exportSTEPConfigured, l as exportDXF, n as importSTEP, o as importSVGPathD, r as importSTL, s as exportThreeMF, t as importIGES, u as exportGlb } from "./importFns-
|
|
1
|
+
import { n as exportSTEP, r as exportSTL, t as exportIGES } from "./meshFns-uNRS602U.js";
|
|
2
|
+
import { a as importSVG, c as blueprintToDXF, d as exportGltf, f as exportOBJ, i as exportSTEPConfigured, l as exportDXF, n as importSTEP, o as importSVGPathD, r as importSTL, s as exportThreeMF, t as importIGES, u as exportGlb } from "./importFns-YZyGYu_M.js";
|
|
3
3
|
export { blueprintToDXF, exportDXF, exportGlb, exportGltf, exportIGES, exportOBJ, exportSTEP, exportSTEPConfigured, exportSTL, exportThreeMF, importIGES, importSTEP, importSTL, importSVG, importSVGPathD };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_occtWasmAdapter = require("../../occtWasmAdapter-
|
|
2
|
+
const require_occtWasmAdapter = require("../../occtWasmAdapter-CxSY6Ty2.cjs");
|
|
3
3
|
exports.OcctWasmAdapter = require_occtWasmAdapter.OcctWasmAdapter;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { OcctWasmAdapter };
|
|
1
|
+
export { t as OcctWasmAdapter } from "../../occtWasmAdapter-cnV8J7Y-.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-Bva18qvE.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-B3espUT6.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-CkxvJRpq.cjs");
|
|
2
|
+
const require_errors = require("./errors-DoMAp7mQ.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
|
-
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-Bva18qvE.js";
|
|
2
|
+
import { E as ok, d as validationError, g as err, t as BrepErrorCode } from "./errors-B3espUT6.js";
|
|
3
|
+
import { E as kernelCallRaw } from "./topologyQueryFns-CY6YiGsk.js";
|
|
4
|
+
import { m as uvBounds } from "./faceFns-C-wc4fX-.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 };
|
|
@@ -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-CkxvJRpq.cjs");
|
|
2
|
+
const require_errors = require("./errors-DoMAp7mQ.cjs");
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-C6HwYYpi.cjs");
|
|
4
|
+
const require_faceFns = require("./faceFns-B8ctN5Te.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() {
|
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-C6wgH_1a.cjs");
|
|
3
|
+
const require_principalBoxFns = require("./principalBoxFns-28BQIeo8.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-BmdVG0_8.js";
|
|
2
|
+
import { t as principalBoundingBox } from "./principalBoxFns-DkP-681E.js";
|
|
3
3
|
export { createDistanceQuery, measureArea, measureDistance, measureDistanceProps, measureLength, measureLinearProps, measureSurfaceProps, measureVolume, measureVolumeProps, principalBoundingBox };
|
|
@@ -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-CkxvJRpq.cjs");
|
|
2
|
+
const require_errors = require("./errors-DoMAp7mQ.cjs");
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-C6HwYYpi.cjs");
|
|
4
|
+
const require_originTrackingFns = require("./originTrackingFns-DgJ-MTtE.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,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-Bva18qvE.js";
|
|
2
|
+
import { E as ok, g as err, r as ioError } from "./errors-B3espUT6.js";
|
|
3
|
+
import { d as getSolids, n as getBounds } from "./topologyQueryFns-CY6YiGsk.js";
|
|
4
|
+
import { t as getFaceOrigins } from "./originTrackingFns-BIa3TdgX.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,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,
|
|
@@ -18,8 +18,7 @@ var DEFAULT_CAPABILITIES = {
|
|
|
18
18
|
exactMeasurement: true,
|
|
19
19
|
tessellationModel: "none"
|
|
20
20
|
};
|
|
21
|
-
|
|
22
|
-
//#region src/kernel/unsupported.ts
|
|
21
|
+
// src/kernel/unsupported.ts
|
|
23
22
|
/**
|
|
24
23
|
* Shared error for "this kernel doesn't implement this operation" — a stubbed
|
|
25
24
|
* adapter method (occt's brepkit-only stubs, occt-wasm's not-yet-implemented) or
|
|
@@ -41,8 +40,7 @@ var UnsupportedKernelOperationError = class extends Error {
|
|
|
41
40
|
function isUnsupportedKernelOperationError(error) {
|
|
42
41
|
return error instanceof Error && Reflect.get(error, UNSUPPORTED_MARKER) === true;
|
|
43
42
|
}
|
|
44
|
-
|
|
45
|
-
//#region src/kernel/hullGeometry.ts
|
|
43
|
+
// src/kernel/hullGeometry.ts
|
|
46
44
|
function sub(a, b) {
|
|
47
45
|
return {
|
|
48
46
|
x: a.x - b.x,
|
|
@@ -293,8 +291,7 @@ function quickHull(inputPoints, tolerance) {
|
|
|
293
291
|
points
|
|
294
292
|
};
|
|
295
293
|
}
|
|
296
|
-
|
|
297
|
-
//#region src/kernel/geometry2d.ts
|
|
294
|
+
// src/kernel/geometry2d.ts
|
|
298
295
|
/* v8 ignore file -- excluded from coverage reports; prevents V8 instrumentation
|
|
299
296
|
overhead that causes 2D-heavy tests to timeout under coverage mode. */
|
|
300
297
|
function evaluateCurve2d$1(c, t) {
|
|
@@ -1119,8 +1116,7 @@ function evaluateBSpline2d(c, t) {
|
|
|
1119
1116
|
}
|
|
1120
1117
|
return d[p];
|
|
1121
1118
|
}
|
|
1122
|
-
|
|
1123
|
-
//#region src/kernel/stlBuilder.ts
|
|
1119
|
+
// src/kernel/stlBuilder.ts
|
|
1124
1120
|
/**
|
|
1125
1121
|
* Kernel-agnostic STL serializers.
|
|
1126
1122
|
*
|
|
@@ -1224,8 +1220,7 @@ function buildAsciiSTL(vertices, triangles) {
|
|
|
1224
1220
|
lines.push("endsolid brepjs");
|
|
1225
1221
|
return lines.join("\n") + "\n";
|
|
1226
1222
|
}
|
|
1227
|
-
|
|
1228
|
-
//#region src/kernel/occtWasm/helpers.ts
|
|
1223
|
+
// src/kernel/occtWasm/helpers.ts
|
|
1229
1224
|
var noop = () => {};
|
|
1230
1225
|
/** Build an opaque kernel handle for an arena-allocated WASM shape. */
|
|
1231
1226
|
function handle(type, id) {
|
|
@@ -1358,8 +1353,7 @@ function parseEvolution(evo) {
|
|
|
1358
1353
|
evo.delete();
|
|
1359
1354
|
}
|
|
1360
1355
|
}
|
|
1361
|
-
|
|
1362
|
-
//#region src/kernel/occtWasm/adapterShims.ts
|
|
1356
|
+
// src/kernel/occtWasm/adapterShims.ts
|
|
1363
1357
|
function wrapKernelExceptions(kernel, mod) {
|
|
1364
1358
|
return new Proxy(kernel, { get(target, prop, receiver) {
|
|
1365
1359
|
const val = Reflect.get(target, prop, receiver);
|
|
@@ -1411,8 +1405,7 @@ function buildOcShim(module, k) {
|
|
|
1411
1405
|
}
|
|
1412
1406
|
});
|
|
1413
1407
|
}
|
|
1414
|
-
|
|
1415
|
-
//#region src/kernel/occtWasm/booleanOps.ts
|
|
1408
|
+
// src/kernel/occtWasm/booleanOps.ts
|
|
1416
1409
|
var BOOLEAN_OP_CODE = {
|
|
1417
1410
|
fuse: 0,
|
|
1418
1411
|
cut: 1,
|
|
@@ -1626,8 +1619,7 @@ function checkBoolean(k, shape, tool, _op) {
|
|
|
1626
1619
|
function meshBoolean(_positionsA, _indicesA, _positionsB, _indicesB, _op, _tolerance) {
|
|
1627
1620
|
throw new Error("occt-wasm: meshBoolean is not supported (use brepkit for mesh booleans)");
|
|
1628
1621
|
}
|
|
1629
|
-
|
|
1630
|
-
//#region src/kernel/occtWasm/primitiveOps.ts
|
|
1622
|
+
// src/kernel/occtWasm/primitiveOps.ts
|
|
1631
1623
|
/**
|
|
1632
1624
|
* Apply an id-remapping positioning step (rotate/translate), releasing the
|
|
1633
1625
|
* orphaned source slot. rotate/translate return fresh arena slots on occt-wasm;
|
|
@@ -1673,8 +1665,7 @@ function makeBoxFromCorners(k, p1, p2) {
|
|
|
1673
1665
|
function makeRectangle(k, width, height) {
|
|
1674
1666
|
return handle("face", k.makeRectangle(width, height));
|
|
1675
1667
|
}
|
|
1676
|
-
|
|
1677
|
-
//#region src/kernel/occtWasm/topologyOps.ts
|
|
1668
|
+
// src/kernel/occtWasm/topologyOps.ts
|
|
1678
1669
|
function iterShapes(k, shape, type) {
|
|
1679
1670
|
const vec = k.getSubShapes(unwrap(shape), type);
|
|
1680
1671
|
const results = [];
|
|
@@ -1772,8 +1763,7 @@ function sew(k, Module, shapes, tolerance) {
|
|
|
1772
1763
|
vec.delete();
|
|
1773
1764
|
}
|
|
1774
1765
|
}
|
|
1775
|
-
|
|
1776
|
-
//#region src/kernel/occtWasm/repairOps.ts
|
|
1766
|
+
// src/kernel/occtWasm/repairOps.ts
|
|
1777
1767
|
var HEAL_TOLERANCE = 1e-6;
|
|
1778
1768
|
function isValid(k, shape) {
|
|
1779
1769
|
return k.isValid(unwrap(shape));
|
|
@@ -1803,8 +1793,7 @@ function fixFaceOrientations(k, shape) {
|
|
|
1803
1793
|
function fixShape(k, shape) {
|
|
1804
1794
|
return wrapResult(k, k.fixShape(unwrap(shape)));
|
|
1805
1795
|
}
|
|
1806
|
-
|
|
1807
|
-
//#region src/kernel/occtWasm/meshOps.ts
|
|
1796
|
+
// src/kernel/occtWasm/meshOps.ts
|
|
1808
1797
|
function mesh(k, Module, shape, options) {
|
|
1809
1798
|
const meshData = k.tessellate(unwrap(shape), options.tolerance, options.angularTolerance);
|
|
1810
1799
|
try {
|
|
@@ -1895,8 +1884,7 @@ function hasTriangulation(k, shape) {
|
|
|
1895
1884
|
function meshShape(k, shape, tolerance, angularTolerance) {
|
|
1896
1885
|
k.meshShape(unwrap(shape), tolerance, angularTolerance).delete();
|
|
1897
1886
|
}
|
|
1898
|
-
|
|
1899
|
-
//#region src/kernel/occtWasm/curveOps.ts
|
|
1887
|
+
// src/kernel/occtWasm/curveOps.ts
|
|
1900
1888
|
var CURVE_TYPE_MAP = {
|
|
1901
1889
|
line: "LINE",
|
|
1902
1890
|
circle: "CIRCLE",
|
|
@@ -2046,8 +2034,7 @@ function getNurbsCurveData(k, edge) {
|
|
|
2046
2034
|
return null;
|
|
2047
2035
|
}
|
|
2048
2036
|
}
|
|
2049
|
-
|
|
2050
|
-
//#region src/kernel/occtWasm/surfaceOps.ts
|
|
2037
|
+
// src/kernel/occtWasm/surfaceOps.ts
|
|
2051
2038
|
function vertexPosition(k, vertex) {
|
|
2052
2039
|
const vec = k.vertexPosition(unwrap(vertex));
|
|
2053
2040
|
try {
|
|
@@ -2327,8 +2314,7 @@ function projectEdges(k, Module, shape, cameraOrigin, cameraDirection, cameraXAx
|
|
|
2327
2314
|
}
|
|
2328
2315
|
};
|
|
2329
2316
|
}
|
|
2330
|
-
|
|
2331
|
-
//#region src/kernel/occtWasm/measureOps.ts
|
|
2317
|
+
// src/kernel/occtWasm/measureOps.ts
|
|
2332
2318
|
function volume(k, shape) {
|
|
2333
2319
|
return k.getVolume(unwrap(shape));
|
|
2334
2320
|
}
|
|
@@ -2457,13 +2443,18 @@ function collectDistanceSamples(k, mod, shapeId) {
|
|
|
2457
2443
|
try {
|
|
2458
2444
|
const n = verts.size();
|
|
2459
2445
|
for (let i = 0; i < n; i++) {
|
|
2460
|
-
const
|
|
2461
|
-
|
|
2462
|
-
p.
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2446
|
+
const vertexId = verts.get(i);
|
|
2447
|
+
try {
|
|
2448
|
+
const p = k.vertexPosition(vertexId);
|
|
2449
|
+
out.push([
|
|
2450
|
+
p.get(0),
|
|
2451
|
+
p.get(1),
|
|
2452
|
+
p.get(2)
|
|
2453
|
+
]);
|
|
2454
|
+
p.delete();
|
|
2455
|
+
} finally {
|
|
2456
|
+
k.release(vertexId);
|
|
2457
|
+
}
|
|
2467
2458
|
}
|
|
2468
2459
|
} finally {
|
|
2469
2460
|
verts.delete();
|
|
@@ -2752,8 +2743,7 @@ function surfaceCurvature(k, face, u, v) {
|
|
|
2752
2743
|
minDirection
|
|
2753
2744
|
};
|
|
2754
2745
|
}
|
|
2755
|
-
|
|
2756
|
-
//#region src/kernel/occtWasm/modifierOps.ts
|
|
2746
|
+
// src/kernel/occtWasm/modifierOps.ts
|
|
2757
2747
|
var HASH_UPPER_BOUND = 2147483647;
|
|
2758
2748
|
function fillet(k, Module, shape, edges, radius) {
|
|
2759
2749
|
const r = resolveUniformRadius(edges, radius);
|
|
@@ -2889,8 +2879,7 @@ function simplify(k, shape) {
|
|
|
2889
2879
|
function reverseShape(k, shape) {
|
|
2890
2880
|
return wrapResult(k, k.reverseShape(unwrap(shape)));
|
|
2891
2881
|
}
|
|
2892
|
-
|
|
2893
|
-
//#region src/kernel/occtWasm/sweepOps.ts
|
|
2882
|
+
// src/kernel/occtWasm/sweepOps.ts
|
|
2894
2883
|
var SWEEP_MODE_FIXED = 0;
|
|
2895
2884
|
var SWEEP_MODE_FRENET = 1;
|
|
2896
2885
|
var SWEEP_MODE_AUXILIARY = 3;
|
|
@@ -3077,8 +3066,7 @@ function draftPrism(k, shape, _face, _baseFace, height, angleDeg, _fuse) {
|
|
|
3077
3066
|
const h = height ?? 10;
|
|
3078
3067
|
return wrapResult(k, k.draftPrism(unwrap(shape), 0, 0, h, angleDeg));
|
|
3079
3068
|
}
|
|
3080
|
-
|
|
3081
|
-
//#region src/kernel/occtWasm/transformOps.ts
|
|
3069
|
+
// src/kernel/occtWasm/transformOps.ts
|
|
3082
3070
|
function composeTransform(ops) {
|
|
3083
3071
|
let matrix = [
|
|
3084
3072
|
1,
|
|
@@ -3381,8 +3369,7 @@ function transformBatch(k, entries) {
|
|
|
3381
3369
|
}
|
|
3382
3370
|
});
|
|
3383
3371
|
}
|
|
3384
|
-
|
|
3385
|
-
//#region src/kernel/occtWasm/ioOps.ts
|
|
3372
|
+
// src/kernel/occtWasm/ioOps.ts
|
|
3386
3373
|
function computePositionBounds(positions, vCount) {
|
|
3387
3374
|
if (vCount === 0) return {
|
|
3388
3375
|
min: [
|
|
@@ -3697,8 +3684,7 @@ function exportSTEPConfigured(k, Module, shapes, _options) {
|
|
|
3697
3684
|
doc.delete();
|
|
3698
3685
|
}
|
|
3699
3686
|
}
|
|
3700
|
-
|
|
3701
|
-
//#region src/kernel/occtWasm/constructionOps.ts
|
|
3687
|
+
// src/kernel/occtWasm/constructionOps.ts
|
|
3702
3688
|
function makeVertex(k, x, y, z) {
|
|
3703
3689
|
return handle("vertex", k.makeVertex(x, y, z));
|
|
3704
3690
|
}
|
|
@@ -3982,8 +3968,7 @@ function createAxis3(ox, oy, oz, zx, zy, zz, xx, xy, xz) {
|
|
|
3982
3968
|
delete: noop
|
|
3983
3969
|
};
|
|
3984
3970
|
}
|
|
3985
|
-
|
|
3986
|
-
//#region src/kernel/occtWasm/kernel2dOps.ts
|
|
3971
|
+
// src/kernel/occtWasm/kernel2dOps.ts
|
|
3987
3972
|
function c2d(h) {
|
|
3988
3973
|
return h;
|
|
3989
3974
|
}
|
|
@@ -4666,8 +4651,7 @@ function buildCurves3d(k, wire) {
|
|
|
4666
4651
|
function fixWireOnFace(k, wire, face, tolerance) {
|
|
4667
4652
|
return handle("wire", k.fixWireOnFace(unwrap(wire), unwrap(face), tolerance));
|
|
4668
4653
|
}
|
|
4669
|
-
|
|
4670
|
-
//#region src/kernel/occtWasm/evolutionOps.ts
|
|
4654
|
+
// src/kernel/occtWasm/evolutionOps.ts
|
|
4671
4655
|
/**
|
|
4672
4656
|
* Parse an EvolutionData result from the WASM kernel into a ShapeEvolution.
|
|
4673
4657
|
* The C++ facade returns flat vectors of [inputHash, count, out1, out2, ..., inputHash, count, ...].
|
|
@@ -4945,8 +4929,7 @@ function applyComposedTransformWithHistory(transformFn, iterShapesFn, hashCodeFn
|
|
|
4945
4929
|
}
|
|
4946
4930
|
};
|
|
4947
4931
|
}
|
|
4948
|
-
|
|
4949
|
-
//#region src/kernel/occtWasm/hullOps.ts
|
|
4932
|
+
// src/kernel/occtWasm/hullOps.ts
|
|
4950
4933
|
function hullFromPoints(k, Module, points, tolerance) {
|
|
4951
4934
|
if (points.length < 4) throw new Error("hullFromPoints: need at least 4 points");
|
|
4952
4935
|
const { points: hullPoints, faces } = quickHull(points, tolerance);
|
|
@@ -4983,8 +4966,7 @@ function hull(k, Module, shapes, tolerance) {
|
|
|
4983
4966
|
if (points.length < 4) throw new Error("hull: fewer than 4 vertices extracted from input shapes");
|
|
4984
4967
|
return hullFromPoints(k, Module, points, tolerance);
|
|
4985
4968
|
}
|
|
4986
|
-
|
|
4987
|
-
//#region src/kernel/occtWasm/occtWasmAdapter.ts
|
|
4969
|
+
// src/kernel/occtWasm/occtWasmAdapter.ts
|
|
4988
4970
|
/**
|
|
4989
4971
|
* Parse an EvolutionData result from the WASM kernel into a ShapeEvolution.
|
|
4990
4972
|
*
|
|
@@ -5839,7 +5821,6 @@ var OcctWasmAdapter = class OcctWasmAdapter {
|
|
|
5839
5821
|
return getNurbsCurveData(this.k, edge);
|
|
5840
5822
|
}
|
|
5841
5823
|
};
|
|
5842
|
-
//#endregion
|
|
5843
5824
|
Object.defineProperty(exports, "DEFAULT_CAPABILITIES", {
|
|
5844
5825
|
enumerable: true,
|
|
5845
5826
|
get: function() {
|