brepjs 18.35.0 → 18.35.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/2d.cjs +7 -7
- package/dist/2d.js +7 -7
- package/dist/{blueprint-BB_nIqH9.cjs → blueprint-BF0DcVwE.cjs} +7 -7
- package/dist/{blueprint-DmWmhXi4.js → blueprint-KwH2JNPU.js} +7 -7
- package/dist/{blueprintFns-C3NplQ86.cjs → blueprintFns-CbPsMijw.cjs} +3 -3
- package/dist/{blueprintFns-B4xOCuT3.js → blueprintFns-X7jVGGUE.js} +3 -3
- package/dist/{blueprintSketcher-DaqbMIfk.js → blueprintSketcher-BwFpbp0B.js} +4 -4
- package/dist/{blueprintSketcher-C1C9mJuK.cjs → blueprintSketcher-m18T1U1T.cjs} +4 -4
- package/dist/{boolean2D-CbChdB3y.cjs → boolean2D-BzlbvCIH.cjs} +5 -5
- package/dist/{boolean2D-B3DOcj6G.js → boolean2D-DAq015PP.js} +5 -5
- package/dist/{booleanFns-X-pT22Jh.cjs → booleanFns-D19tR8Gn.cjs} +6 -6
- package/dist/{booleanFns-Byv33KMu.js → booleanFns-nHsLqZ7Y.js} +6 -6
- package/dist/brepjs.cjs +26 -26
- package/dist/brepjs.js +26 -26
- package/dist/{cameraFns-DkUpqMdm.js → cameraFns-Bhjy2SuC.js} +3 -3
- package/dist/{cameraFns-B9duZ94U.cjs → cameraFns-D_8-JO0p.cjs} +3 -3
- package/dist/core/errors.d.ts +2 -0
- package/dist/core.cjs +3 -3
- package/dist/core.js +3 -3
- package/dist/{cornerFinder-BEHY1k0Q.cjs → cornerFinder-Bmp3Vm5g.cjs} +1 -1
- package/dist/{cornerFinder-4ieWbVIN.js → cornerFinder-U6kzoCXY.js} +1 -1
- package/dist/{curveFns-ChkLRL8a.cjs → curveFns-p1YEnmZu.cjs} +2 -2
- package/dist/{curveFns-DHAvRosC.js → curveFns-rUkX4tEm.js} +2 -2
- package/dist/{drawFns-DzgqLm1w.cjs → drawFns-BGIQ1IeV.cjs} +14 -14
- package/dist/{drawFns-D2u7C_7g.js → drawFns-ZhKR7xa0.js} +14 -14
- package/dist/{errors-D9tBO0km.cjs → errors-CXJtc4I7.cjs} +2 -0
- package/dist/{errors-DOPT3OTg.js → errors-DNWJsfVU.js} +2 -0
- package/dist/{extrudeFns-WH0yd_Fb.js → extrudeFns-Cl_azGgy.js} +2 -2
- package/dist/{extrudeFns-WYDSlEW8.cjs → extrudeFns-DpRGUaxD.cjs} +2 -2
- package/dist/{faceFns-DNOsmyRn.cjs → faceFns-C6qUr_gw.cjs} +3 -3
- package/dist/{faceFns-Druzi4mz.js → faceFns-eVWgSIzt.js} +3 -3
- package/dist/{helpers-DXRsnEpy.js → helpers-BhJOo535.js} +7 -7
- package/dist/{helpers-BxCilYLb.cjs → helpers-DNVILwHA.cjs} +7 -7
- package/dist/{historyFns-DqY8zLUq.js → historyFns-ByJG4mBP.js} +5 -5
- package/dist/{historyFns-C9J3s9xB.cjs → historyFns-C2glA6vu.cjs} +5 -5
- package/dist/{importFns-CAR9g6W8.cjs → importFns-CJc5NYJp.cjs} +3 -3
- package/dist/{importFns-D8NOuxmA.js → importFns-DuAmdf0Q.js} +3 -3
- package/dist/io.cjs +2 -2
- package/dist/io.js +2 -2
- package/dist/kernel/manifold/replay.d.ts +7 -0
- package/dist/{measureFns-Dg3pLNRE.js → measureFns-BiflqrZ_.js} +4 -4
- package/dist/{measureFns-CSbBsOLY.cjs → measureFns-D7lxkIjt.cjs} +4 -4
- package/dist/measurement.cjs +1 -1
- package/dist/measurement.js +1 -1
- package/dist/{meshFns-CkzlLwZw.js → meshFns-Bbm7_5wS.js} +28 -3
- package/dist/{meshFns-yusYccFx.cjs → meshFns-D66okPxP.cjs} +28 -3
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/{planeOps-DTY92UCh.cjs → planeOps-BA4HfgQu.cjs} +1 -1
- package/dist/{planeOps-YTeuXs80.js → planeOps-DSjjtrjg.js} +1 -1
- package/dist/{primitiveFns-DzGTYy_l.cjs → primitiveFns-CXn9Jl4q.cjs} +8 -8
- package/dist/{primitiveFns-CbpHBZdf.js → primitiveFns-vQh7Lz7B.js} +8 -8
- package/dist/projection.cjs +1 -1
- package/dist/projection.js +1 -1
- package/dist/query.cjs +2 -2
- package/dist/query.js +2 -2
- package/dist/result.cjs +1 -1
- package/dist/result.js +1 -1
- package/dist/{shapeFns-CSlSyyi1.cjs → shapeFns-B3v9_keQ.cjs} +3 -3
- package/dist/{shapeFns-BYKFvtTb.js → shapeFns-BbHQjI5-.js} +3 -3
- package/dist/shapeRef.cjs +1 -1
- package/dist/shapeRef.js +1 -1
- package/dist/{shapeRefFns-UIsEV1jg.js → shapeRefFns-BOsX8Tim.js} +4 -4
- package/dist/{shapeRefFns-B4xO4AI1.cjs → shapeRefFns-CkafUjdM.cjs} +4 -4
- package/dist/{shapeTypes-DRIhPf8A.cjs → shapeTypes-Bbh2doYh.cjs} +24 -10
- package/dist/{shapeTypes-D946X6Qx.js → shapeTypes-C-MpR5-e.js} +24 -10
- package/dist/sketching.cjs +3 -3
- package/dist/sketching.js +3 -3
- package/dist/{solidBuilders-2xiE6FDe.js → solidBuilders-C44fKbQQ.js} +3 -3
- package/dist/{solidBuilders-8PLYgzL9.cjs → solidBuilders-Ck6gpdQR.cjs} +3 -3
- package/dist/{surfaceBuilders-CUFC3tNT.js → surfaceBuilders-D4p1YPCz.js} +3 -3
- package/dist/{surfaceBuilders-CZ7u_Xmi.cjs → surfaceBuilders-DsISMCwj.cjs} +3 -3
- package/dist/text.cjs +2 -2
- package/dist/text.js +2 -2
- package/dist/{textBlueprints-Dv4YWJrA.js → textBlueprints-BKdQqBn8.js} +9 -9
- package/dist/{textBlueprints-CZ4MphXu.cjs → textBlueprints-C93RophN.cjs} +9 -9
- package/dist/{textMetrics-BpmNTwLm.cjs → textMetrics-2vq4PFfz.cjs} +2 -2
- package/dist/{textMetrics-Dvh4HzSZ.js → textMetrics-DEmVsP5C.js} +2 -2
- package/dist/topology.cjs +7 -7
- package/dist/topology.js +7 -7
- package/dist/{topologyQueryFns-D5YTf9GW.js → topologyQueryFns-B81GSST_.js} +2 -2
- package/dist/{topologyQueryFns-esX6R5j4.cjs → topologyQueryFns-C0kAqcn5.cjs} +2 -2
- package/dist/vectors.cjs +1 -1
- package/dist/vectors.js +1 -1
- package/package.json +8 -8
|
@@ -355,9 +355,11 @@ var BrepErrorCode = {
|
|
|
355
355
|
STEP_EXPORT_CONFIGURED_FAILED: "STEP_EXPORT_CONFIGURED_FAILED",
|
|
356
356
|
STEP_FILE_READ_ERROR: "STEP_FILE_READ_ERROR",
|
|
357
357
|
STEP_EXPORT_CRASHED: "STEP_EXPORT_CRASHED",
|
|
358
|
+
STEP_EXPORT_UNSERIALIZABLE: "STEP_EXPORT_UNSERIALIZABLE",
|
|
358
359
|
STL_EXPORT_FAILED: "STL_EXPORT_FAILED",
|
|
359
360
|
STL_FILE_READ_ERROR: "STL_FILE_READ_ERROR",
|
|
360
361
|
STL_EXPORT_CRASHED: "STL_EXPORT_CRASHED",
|
|
362
|
+
STL_EXPORT_UNSERIALIZABLE: "STL_EXPORT_UNSERIALIZABLE",
|
|
361
363
|
STEP_IMPORT_FAILED: "STEP_IMPORT_FAILED",
|
|
362
364
|
STL_IMPORT_FAILED: "STL_IMPORT_FAILED",
|
|
363
365
|
IGES_EXPORT_FAILED: "IGES_EXPORT_FAILED",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Z as getKernel, c as createSolid, h as isShape3D, t as castShape, y as isWire } from "./shapeTypes-
|
|
2
|
-
import { A as ok, b as err, d as validationError, i as kernelError, l as typeCastError, t as BrepErrorCode, w as isErr } from "./errors-
|
|
1
|
+
import { Z as getKernel, c as createSolid, h as isShape3D, t as castShape, y as isWire } from "./shapeTypes-C-MpR5-e.js";
|
|
2
|
+
import { A as ok, b as err, d as validationError, i as kernelError, l as typeCastError, t as BrepErrorCode, w as isErr } from "./errors-DNWJsfVU.js";
|
|
3
3
|
import { c as vecLength, d as vecNormalize, t as vecAdd } from "./vecOps-SKPRvPH-.js";
|
|
4
4
|
//#region src/operations/extrudeUtils.ts
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_errors = require("./errors-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-Bbh2doYh.cjs");
|
|
2
|
+
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
3
|
const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
|
|
4
4
|
//#region src/operations/extrudeUtils.ts
|
|
5
5
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_errors = require("./errors-
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-Bbh2doYh.cjs");
|
|
2
|
+
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-C0kAqcn5.cjs");
|
|
4
4
|
const require_types = require("./types-KjA8tY4Y.cjs");
|
|
5
5
|
//#region src/topology/cast.ts
|
|
6
6
|
var TOPO_ENUM = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Z as getKernel, t as castShape } from "./shapeTypes-
|
|
2
|
-
import { A as ok, R as unwrap, b as err, l as typeCastError } from "./errors-
|
|
3
|
-
import { a as getCachedSurfaceType } from "./topologyQueryFns-
|
|
1
|
+
import { Z as getKernel, t as castShape } from "./shapeTypes-C-MpR5-e.js";
|
|
2
|
+
import { A as ok, R as unwrap, b as err, l as typeCastError } from "./errors-DNWJsfVU.js";
|
|
3
|
+
import { a as getCachedSurfaceType } from "./topologyQueryFns-B81GSST_.js";
|
|
4
4
|
import { r as toVec3 } from "./types-D24Y27N0.js";
|
|
5
5
|
//#region src/topology/cast.ts
|
|
6
6
|
var TOPO_ENUM = {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Z as getKernel, p as isFace } from "./shapeTypes-
|
|
2
|
-
import { A as ok, T as isOk, b as err, h as bug, o as queryError } from "./errors-
|
|
3
|
-
import { c as getFaces, f as getVertices, p as getWires, s as getEdges } from "./topologyQueryFns-
|
|
1
|
+
import { Z as getKernel, p as isFace } from "./shapeTypes-C-MpR5-e.js";
|
|
2
|
+
import { A as ok, T as isOk, b as err, h as bug, o as queryError } from "./errors-DNWJsfVU.js";
|
|
3
|
+
import { c as getFaces, f as getVertices, p as getWires, s as getEdges } from "./topologyQueryFns-B81GSST_.js";
|
|
4
4
|
import { t as DEG2RAD } from "./constants-ITRzCnCp.js";
|
|
5
5
|
import { a as vecDot, d as vecNormalize } from "./vecOps-SKPRvPH-.js";
|
|
6
|
-
import { c as normalAt, o as getSurfaceType } from "./faceFns-
|
|
7
|
-
import { a as isSameShape, n as getHashCode } from "./shapeFns-
|
|
8
|
-
import { a as curveLength, d as getCurveType, r as curveIsClosed } from "./curveFns-
|
|
9
|
-
import { n as measureArea } from "./measureFns-
|
|
6
|
+
import { c as normalAt, o as getSurfaceType } from "./faceFns-eVWgSIzt.js";
|
|
7
|
+
import { a as isSameShape, n as getHashCode } from "./shapeFns-BbHQjI5-.js";
|
|
8
|
+
import { a as curveLength, d as getCurveType, r as curveIsClosed } from "./curveFns-rUkX4tEm.js";
|
|
9
|
+
import { n as measureArea } from "./measureFns-BiflqrZ_.js";
|
|
10
10
|
//#region src/utils/vec2d.ts
|
|
11
11
|
/** Precision for curve intersection and parameter operations. */
|
|
12
12
|
var PRECISION_INTERSECTION = 1e-9;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_errors = require("./errors-
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-Bbh2doYh.cjs");
|
|
2
|
+
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-C0kAqcn5.cjs");
|
|
4
4
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
5
5
|
const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
|
|
6
|
-
const require_faceFns = require("./faceFns-
|
|
7
|
-
const require_shapeFns = require("./shapeFns-
|
|
8
|
-
const require_curveFns = require("./curveFns-
|
|
9
|
-
const require_measureFns = require("./measureFns-
|
|
6
|
+
const require_faceFns = require("./faceFns-C6qUr_gw.cjs");
|
|
7
|
+
const require_shapeFns = require("./shapeFns-B3v9_keQ.cjs");
|
|
8
|
+
const require_curveFns = require("./curveFns-p1YEnmZu.cjs");
|
|
9
|
+
const require_measureFns = require("./measureFns-D7lxkIjt.cjs");
|
|
10
10
|
//#region src/utils/vec2d.ts
|
|
11
11
|
/** Precision for curve intersection and parameter operations. */
|
|
12
12
|
var PRECISION_INTERSECTION = 1e-9;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { B as createKernelHandle, Z as getKernel, t as castShape } from "./shapeTypes-
|
|
2
|
-
import { A as ok, b as err, d as validationError, n as computationError, r as ioError } from "./errors-
|
|
1
|
+
import { B as createKernelHandle, Z as getKernel, t as castShape } from "./shapeTypes-C-MpR5-e.js";
|
|
2
|
+
import { A as ok, b as err, d as validationError, n as computationError, r as ioError } from "./errors-DNWJsfVU.js";
|
|
3
3
|
import { d as vecNormalize, s as vecIsZero } from "./vecOps-SKPRvPH-.js";
|
|
4
|
-
import { v as fromBREP } from "./faceFns-
|
|
5
|
-
import { s as toBREP } from "./shapeFns-
|
|
6
|
-
import { a as fuseAll } from "./booleanFns-
|
|
4
|
+
import { v as fromBREP } from "./faceFns-eVWgSIzt.js";
|
|
5
|
+
import { s as toBREP } from "./shapeFns-BbHQjI5-.js";
|
|
6
|
+
import { a as fuseAll } from "./booleanFns-nHsLqZ7Y.js";
|
|
7
7
|
//#region src/utils/uuid.ts
|
|
8
8
|
/** Generate a v4-style UUID string using `crypto.getRandomValues`. */
|
|
9
9
|
function uuidv() {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_errors = require("./errors-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-Bbh2doYh.cjs");
|
|
2
|
+
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
3
|
const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
|
|
4
|
-
const require_faceFns = require("./faceFns-
|
|
5
|
-
const require_shapeFns = require("./shapeFns-
|
|
6
|
-
const require_booleanFns = require("./booleanFns-
|
|
4
|
+
const require_faceFns = require("./faceFns-C6qUr_gw.cjs");
|
|
5
|
+
const require_shapeFns = require("./shapeFns-B3v9_keQ.cjs");
|
|
6
|
+
const require_booleanFns = require("./booleanFns-D19tR8Gn.cjs");
|
|
7
7
|
//#region src/utils/uuid.ts
|
|
8
8
|
/** Generate a v4-style UUID string using `crypto.getRandomValues`. */
|
|
9
9
|
function uuidv() {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-Bbh2doYh.cjs");
|
|
2
2
|
const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
|
|
3
|
-
const require_errors = require("./errors-
|
|
3
|
+
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
4
4
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
5
|
-
const require_blueprint = require("./blueprint-
|
|
5
|
+
const require_blueprint = require("./blueprint-BF0DcVwE.cjs");
|
|
6
6
|
//#region src/io/objExportFns.ts
|
|
7
7
|
/** Read a vec3 from a typed array at the given vertex index. */
|
|
8
8
|
function vec3At(arr, i) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Z as getKernel, t as castShape } from "./shapeTypes-
|
|
1
|
+
import { Z as getKernel, t as castShape } from "./shapeTypes-C-MpR5-e.js";
|
|
2
2
|
import { n as wasmIndex, t as vec3At$1 } from "./vec3-Dpha8d5k.js";
|
|
3
|
-
import { A as ok, b as err, r as ioError, t as BrepErrorCode } from "./errors-
|
|
3
|
+
import { A as ok, b as err, r as ioError, t as BrepErrorCode } from "./errors-DNWJsfVU.js";
|
|
4
4
|
import { n as getAtOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
5
|
-
import { f as make2dSegmentCurve, m as make2dThreePointArc, s as make2dBezierCurve, t as Blueprint } from "./blueprint-
|
|
5
|
+
import { f as make2dSegmentCurve, m as make2dThreePointArc, s as make2dBezierCurve, t as Blueprint } from "./blueprint-KwH2JNPU.js";
|
|
6
6
|
//#region src/io/objExportFns.ts
|
|
7
7
|
/** Read a vec3 from a typed array at the given vertex index. */
|
|
8
8
|
function vec3At(arr, i) {
|
package/dist/io.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_meshFns = require("./meshFns-
|
|
3
|
-
const require_importFns = require("./importFns-
|
|
2
|
+
const require_meshFns = require("./meshFns-D66okPxP.cjs");
|
|
3
|
+
const require_importFns = require("./importFns-CJc5NYJp.cjs");
|
|
4
4
|
exports.blueprintToDXF = require_importFns.blueprintToDXF;
|
|
5
5
|
exports.exportDXF = require_importFns.exportDXF;
|
|
6
6
|
exports.exportGlb = require_importFns.exportGlb;
|
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-Bbm7_5wS.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-DuAmdf0Q.js";
|
|
3
3
|
export { blueprintToDXF, exportDXF, exportGlb, exportGltf, exportIGES, exportOBJ, exportSTEP, exportSTEPConfigured, exportSTL, exportThreeMF, importIGES, importSTEP, importSTL, importSVG, importSVGPathD };
|
|
@@ -7,5 +7,12 @@ import { OpNode } from './opGraph.js';
|
|
|
7
7
|
* Memoized post-order: each node's inputs are replayed first (deduplicated via
|
|
8
8
|
* the shared cache so a DAG with reused sub-graphs replays each node once), then
|
|
9
9
|
* the node's own handler runs. Throws on any non-replayable node or unmapped op.
|
|
10
|
+
*
|
|
11
|
+
* Every node produces an intermediate OCCT WASM-heap shape, but only the root is
|
|
12
|
+
* returned (and retained by the caller's `brepCache`). To avoid leaking the rest
|
|
13
|
+
* for the lifetime of the session, the intermediates this call allocated are
|
|
14
|
+
* disposed once the full recursion completes — they are only inputs to copying
|
|
15
|
+
* ops (booleans/modifiers), so the root holds its own geometry. Shapes the caller
|
|
16
|
+
* pre-seeded into `cache` are not in `allocated` and so are never disposed here.
|
|
10
17
|
*/
|
|
11
18
|
export declare function replay(node: OpNode, targetKernel: KernelAdapter, cache?: Map<OpNode, KernelShape>): KernelShape;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Z as getKernel } from "./shapeTypes-
|
|
2
|
-
import { A as ok, b as err, d as validationError, t as BrepErrorCode } from "./errors-
|
|
3
|
-
import { w as kernelCallRaw } from "./topologyQueryFns-
|
|
4
|
-
import { p as uvBounds } from "./faceFns-
|
|
1
|
+
import { Z as getKernel } from "./shapeTypes-C-MpR5-e.js";
|
|
2
|
+
import { A as ok, b as err, d as validationError, t as BrepErrorCode } from "./errors-DNWJsfVU.js";
|
|
3
|
+
import { w as kernelCallRaw } from "./topologyQueryFns-B81GSST_.js";
|
|
4
|
+
import { p as uvBounds } from "./faceFns-eVWgSIzt.js";
|
|
5
5
|
//#region src/measurement/measureCache.ts
|
|
6
6
|
var cache = /* @__PURE__ */ new WeakMap();
|
|
7
7
|
function getCachedMeasurement(shape, key) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_errors = require("./errors-
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
4
|
-
const require_faceFns = require("./faceFns-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-Bbh2doYh.cjs");
|
|
2
|
+
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-C0kAqcn5.cjs");
|
|
4
|
+
const require_faceFns = require("./faceFns-C6qUr_gw.cjs");
|
|
5
5
|
//#region src/measurement/measureCache.ts
|
|
6
6
|
var cache = /* @__PURE__ */ new WeakMap();
|
|
7
7
|
function getCachedMeasurement(shape, key) {
|
package/dist/measurement.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_measureFns = require("./measureFns-
|
|
2
|
+
const require_measureFns = require("./measureFns-D7lxkIjt.cjs");
|
|
3
3
|
exports.createDistanceQuery = require_measureFns.createDistanceQuery;
|
|
4
4
|
exports.measureArea = require_measureFns.measureArea;
|
|
5
5
|
exports.measureDistance = require_measureFns.measureDistance;
|
package/dist/measurement.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as measureDistance, c as measureLinearProps, d as measureVolumeProps, l as measureSurfaceProps, n as measureArea, o as measureDistanceProps, s as measureLength, t as createDistanceQuery, u as measureVolume } from "./measureFns-
|
|
1
|
+
import { a as measureDistance, c as measureLinearProps, d as measureVolumeProps, l as measureSurfaceProps, n as measureArea, o as measureDistanceProps, s as measureLength, t as createDistanceQuery, u as measureVolume } from "./measureFns-BiflqrZ_.js";
|
|
2
2
|
export { createDistanceQuery, measureArea, measureDistance, measureDistanceProps, measureLength, measureLinearProps, measureSurfaceProps, measureVolume, measureVolumeProps };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { Z as getKernel } from "./shapeTypes-
|
|
2
|
-
import { A as ok, b as err, r as ioError } from "./errors-
|
|
3
|
-
import {
|
|
1
|
+
import { Z as getKernel } from "./shapeTypes-C-MpR5-e.js";
|
|
2
|
+
import { A as ok, b as err, r as ioError } from "./errors-DNWJsfVU.js";
|
|
3
|
+
import { n as getBounds } from "./topologyQueryFns-B81GSST_.js";
|
|
4
|
+
import { O as getFaceOrigins } from "./shapeFns-BbHQjI5-.js";
|
|
4
5
|
//#region src/topology/meshCache.ts
|
|
5
6
|
/**
|
|
6
7
|
* Build a parameter key for the inner cache map (excludes shape identity).
|
|
@@ -194,7 +195,29 @@ function exportError(e, fmt) {
|
|
|
194
195
|
if (e instanceof WebAssembly.RuntimeError) return ioError(`${fmt}_EXPORT_CRASHED`, `${fmt} export crashed the kernel (${e.message}); the shape likely contains geometry the ${fmt} writer cannot serialize`, e);
|
|
195
196
|
return ioError(`${fmt}_FILE_READ_ERROR`, `Failed to read exported ${fmt} file`, e);
|
|
196
197
|
}
|
|
198
|
+
/**
|
|
199
|
+
* Probe a shape's bounding box before handing it to the STEP/STL writer.
|
|
200
|
+
*
|
|
201
|
+
* Some sub-shapes pass `isValid`/`validSolid` yet are degenerate enough that the
|
|
202
|
+
* OCCT writer traps with a `WebAssembly.RuntimeError` (OOB) mid-transfer — which
|
|
203
|
+
* corrupts the Emscripten heap and poisons the kernel for the rest of the session
|
|
204
|
+
* (#1126). `getBounds` exercises the same geometry but fails *catchably*, so a
|
|
205
|
+
* cheap pre-export probe lets us return a clean `Err` instead of crashing.
|
|
206
|
+
* Heuristic, not universal: it only catches shapes whose bounding-box evaluation
|
|
207
|
+
* also throws.
|
|
208
|
+
*/
|
|
209
|
+
function probeSerializable(shape, fmt) {
|
|
210
|
+
try {
|
|
211
|
+
getBounds(shape);
|
|
212
|
+
return null;
|
|
213
|
+
} catch (e) {
|
|
214
|
+
if (e instanceof TypeError) throw e;
|
|
215
|
+
return ioError(`${fmt}_EXPORT_UNSERIALIZABLE`, `${fmt} export aborted: the shape contains degenerate geometry the ${fmt} writer cannot serialize (bounding-box evaluation failed); export was skipped to avoid crashing the kernel`, e);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
197
218
|
function exportSTEP(shape) {
|
|
219
|
+
const unserializable = probeSerializable(shape, "STEP");
|
|
220
|
+
if (unserializable) return err(unserializable);
|
|
198
221
|
try {
|
|
199
222
|
const stepString = getKernel().exportSTEP([shape.wrapped]);
|
|
200
223
|
return ok(new Blob([stepString], { type: "application/STEP" }));
|
|
@@ -208,6 +231,8 @@ function exportSTEP(shape) {
|
|
|
208
231
|
* @returns Ok with a Blob (MIME type `application/sla`), or Err on failure.
|
|
209
232
|
*/
|
|
210
233
|
function exportSTL(shape, { tolerance = .001, angularTolerance = .1, binary = false } = {}) {
|
|
234
|
+
const unserializable = probeSerializable(shape, "STL");
|
|
235
|
+
if (unserializable) return err(unserializable);
|
|
211
236
|
try {
|
|
212
237
|
if (!getKernel().hasTriangulation(shape.wrapped)) getKernel().meshShape(shape.wrapped, tolerance, angularTolerance);
|
|
213
238
|
const stlData = getKernel().exportSTL(shape.wrapped, binary);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_errors = require("./errors-
|
|
3
|
-
const
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-Bbh2doYh.cjs");
|
|
2
|
+
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-C0kAqcn5.cjs");
|
|
4
|
+
const require_shapeFns = require("./shapeFns-B3v9_keQ.cjs");
|
|
4
5
|
//#region src/topology/meshCache.ts
|
|
5
6
|
/**
|
|
6
7
|
* Build a parameter key for the inner cache map (excludes shape identity).
|
|
@@ -194,7 +195,29 @@ function exportError(e, fmt) {
|
|
|
194
195
|
if (e instanceof WebAssembly.RuntimeError) return require_errors.ioError(`${fmt}_EXPORT_CRASHED`, `${fmt} export crashed the kernel (${e.message}); the shape likely contains geometry the ${fmt} writer cannot serialize`, e);
|
|
195
196
|
return require_errors.ioError(`${fmt}_FILE_READ_ERROR`, `Failed to read exported ${fmt} file`, e);
|
|
196
197
|
}
|
|
198
|
+
/**
|
|
199
|
+
* Probe a shape's bounding box before handing it to the STEP/STL writer.
|
|
200
|
+
*
|
|
201
|
+
* Some sub-shapes pass `isValid`/`validSolid` yet are degenerate enough that the
|
|
202
|
+
* OCCT writer traps with a `WebAssembly.RuntimeError` (OOB) mid-transfer — which
|
|
203
|
+
* corrupts the Emscripten heap and poisons the kernel for the rest of the session
|
|
204
|
+
* (#1126). `getBounds` exercises the same geometry but fails *catchably*, so a
|
|
205
|
+
* cheap pre-export probe lets us return a clean `Err` instead of crashing.
|
|
206
|
+
* Heuristic, not universal: it only catches shapes whose bounding-box evaluation
|
|
207
|
+
* also throws.
|
|
208
|
+
*/
|
|
209
|
+
function probeSerializable(shape, fmt) {
|
|
210
|
+
try {
|
|
211
|
+
require_topologyQueryFns.getBounds(shape);
|
|
212
|
+
return null;
|
|
213
|
+
} catch (e) {
|
|
214
|
+
if (e instanceof TypeError) throw e;
|
|
215
|
+
return require_errors.ioError(`${fmt}_EXPORT_UNSERIALIZABLE`, `${fmt} export aborted: the shape contains degenerate geometry the ${fmt} writer cannot serialize (bounding-box evaluation failed); export was skipped to avoid crashing the kernel`, e);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
197
218
|
function exportSTEP(shape) {
|
|
219
|
+
const unserializable = probeSerializable(shape, "STEP");
|
|
220
|
+
if (unserializable) return require_errors.err(unserializable);
|
|
198
221
|
try {
|
|
199
222
|
const stepString = require_shapeTypes.getKernel().exportSTEP([shape.wrapped]);
|
|
200
223
|
return require_errors.ok(new Blob([stepString], { type: "application/STEP" }));
|
|
@@ -208,6 +231,8 @@ function exportSTEP(shape) {
|
|
|
208
231
|
* @returns Ok with a Blob (MIME type `application/sla`), or Err on failure.
|
|
209
232
|
*/
|
|
210
233
|
function exportSTL(shape, { tolerance = .001, angularTolerance = .1, binary = false } = {}) {
|
|
234
|
+
const unserializable = probeSerializable(shape, "STL");
|
|
235
|
+
if (unserializable) return require_errors.err(unserializable);
|
|
211
236
|
try {
|
|
212
237
|
if (!require_shapeTypes.getKernel().hasTriangulation(shape.wrapped)) require_shapeTypes.getKernel().meshShape(shape.wrapped, tolerance, angularTolerance);
|
|
213
238
|
const stlData = require_shapeTypes.getKernel().exportSTL(shape.wrapped, binary);
|
package/dist/operations.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_historyFns = require("./historyFns-
|
|
3
|
-
const require_extrudeFns = require("./extrudeFns-
|
|
2
|
+
const require_historyFns = require("./historyFns-C2glA6vu.cjs");
|
|
3
|
+
const require_extrudeFns = require("./extrudeFns-DpRGUaxD.cjs");
|
|
4
4
|
exports.addChild = require_historyFns.addChild;
|
|
5
5
|
exports.addStep = require_historyFns.addStep;
|
|
6
6
|
exports.circularPattern = require_historyFns.circularPattern;
|
package/dist/operations.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { C as walkAssembly, D as exportAssemblySTEP, E as linearPattern, O as createAssembly, S as updateNode, T as gridPattern, _ as collectShapes, a as findStep, b as findNode, c as registerOperation, d as replayHistory, g as addChild, h as undoLast, l as registerShape, m as stepsFrom, n as createHistory, o as getShape, p as stepCount, r as createRegistry, s as modifyStep, t as addStep, u as replayFrom, v as countNodes, w as circularPattern, x as removeChild, y as createAssemblyNode } from "./historyFns-
|
|
2
|
-
import { c as sweep, i as complexExtrude, l as twistExtrude, s as supportExtrude } from "./extrudeFns-
|
|
1
|
+
import { C as walkAssembly, D as exportAssemblySTEP, E as linearPattern, O as createAssembly, S as updateNode, T as gridPattern, _ as collectShapes, a as findStep, b as findNode, c as registerOperation, d as replayHistory, g as addChild, h as undoLast, l as registerShape, m as stepsFrom, n as createHistory, o as getShape, p as stepCount, r as createRegistry, s as modifyStep, t as addStep, u as replayFrom, v as countNodes, w as circularPattern, x as removeChild, y as createAssemblyNode } from "./historyFns-ByJG4mBP.js";
|
|
2
|
+
import { c as sweep, i as complexExtrude, l as twistExtrude, s as supportExtrude } from "./extrudeFns-Cl_azGgy.js";
|
|
3
3
|
export { addChild, addStep, circularPattern, collectShapes, complexExtrude, countNodes, createAssembly, createAssemblyNode, createHistory, createRegistry, exportAssemblySTEP, findNode, findStep, getShape as getHistoryShape, gridPattern, linearPattern, modifyStep, registerOperation, registerShape, removeChild, replayFrom, replayHistory, stepCount, stepsFrom, supportExtrude, sweep, twistExtrude, undoLast, updateNode, walkAssembly };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_errors = require("./errors-
|
|
1
|
+
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
2
2
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
3
3
|
const require_types = require("./types-KjA8tY4Y.cjs");
|
|
4
4
|
const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as ok, R as unwrap, b as err, d as validationError } from "./errors-
|
|
1
|
+
import { A as ok, R as unwrap, b as err, d as validationError } from "./errors-DNWJsfVU.js";
|
|
2
2
|
import { t as DEG2RAD } from "./constants-ITRzCnCp.js";
|
|
3
3
|
import { r as toVec3 } from "./types-D24Y27N0.js";
|
|
4
4
|
import { d as vecNormalize, h as vecScale, m as vecRotate, r as vecCross, s as vecIsZero, t as vecAdd } from "./vecOps-SKPRvPH-.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_errors = require("./errors-
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-Bbh2doYh.cjs");
|
|
2
|
+
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-C0kAqcn5.cjs");
|
|
4
4
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
5
|
-
const require_faceFns = require("./faceFns-
|
|
6
|
-
const require_shapeFns = require("./shapeFns-
|
|
5
|
+
const require_faceFns = require("./faceFns-C6qUr_gw.cjs");
|
|
6
|
+
const require_shapeFns = require("./shapeFns-B3v9_keQ.cjs");
|
|
7
7
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
8
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
9
|
-
const require_booleanFns = require("./booleanFns-
|
|
10
|
-
const require_solidBuilders = require("./solidBuilders-
|
|
8
|
+
const require_surfaceBuilders = require("./surfaceBuilders-DsISMCwj.cjs");
|
|
9
|
+
const require_booleanFns = require("./booleanFns-D19tR8Gn.cjs");
|
|
10
|
+
const require_solidBuilders = require("./solidBuilders-Ck6gpdQR.cjs");
|
|
11
11
|
//#region src/topology/threeHelpers.ts
|
|
12
12
|
/**
|
|
13
13
|
* Convert a ShapeMesh into BufferGeometry-compatible typed arrays.
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Z as getKernel, _ as isSolid, c as createSolid, h as isShape3D, p as isFace, r as castShapeWithKnownType, t as castShape, x as isClosedWire, y as isWire } from "./shapeTypes-
|
|
2
|
-
import { A as ok, T as isOk, b as err, d as validationError, i as kernelError, l as typeCastError, t as BrepErrorCode, v as andThen, w as isErr } from "./errors-
|
|
3
|
-
import { c as getFaces, i as getCachedIsValid, l as getOrCreateCache, m as invalidateShapeCache, p as getWires, s as getEdges } from "./topologyQueryFns-
|
|
1
|
+
import { Z as getKernel, _ as isSolid, c as createSolid, h as isShape3D, p as isFace, r as castShapeWithKnownType, t as castShape, x as isClosedWire, y as isWire } from "./shapeTypes-C-MpR5-e.js";
|
|
2
|
+
import { A as ok, T as isOk, b as err, d as validationError, i as kernelError, l as typeCastError, t as BrepErrorCode, v as andThen, w as isErr } from "./errors-DNWJsfVU.js";
|
|
3
|
+
import { c as getFaces, i as getCachedIsValid, l as getOrCreateCache, m as invalidateShapeCache, p as getWires, s as getEdges } from "./topologyQueryFns-B81GSST_.js";
|
|
4
4
|
import { n as HASH_CODE_MAX, t as DEG2RAD } from "./constants-ITRzCnCp.js";
|
|
5
|
-
import { _ as downcast } from "./faceFns-
|
|
6
|
-
import { _ as propagateAllMetadata, g as collectInputFaceHashes, h as translate } from "./shapeFns-
|
|
5
|
+
import { _ as downcast } from "./faceFns-eVWgSIzt.js";
|
|
6
|
+
import { _ as propagateAllMetadata, g as collectInputFaceHashes, h as translate } from "./shapeFns-BbHQjI5-.js";
|
|
7
7
|
import { t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
8
|
-
import { _ as makeThreePointArc, a as makeNonPlanarFace, c as makeBSplineApproximation, d as makeCircle, f as makeEllipse, g as makeTangentArc, h as makeLine, i as makeNewFaceWithinFace, m as makeHelix, o as makePolygon, p as makeEllipseArc, r as makeFace, s as assembleWire, t as addHolesInFace, u as makeBezierCurve } from "./surfaceBuilders-
|
|
9
|
-
import { a as fuseAll, i as fuse, n as cut, r as cutAll } from "./booleanFns-
|
|
10
|
-
import { a as makeOffset, c as makeTorus, i as makeEllipsoid, l as makeVertex, n as makeCone, o as makeSolid, r as makeCylinder, s as makeSphere, t as makeCompound, u as weldShellsAndFaces } from "./solidBuilders-
|
|
8
|
+
import { _ as makeThreePointArc, a as makeNonPlanarFace, c as makeBSplineApproximation, d as makeCircle, f as makeEllipse, g as makeTangentArc, h as makeLine, i as makeNewFaceWithinFace, m as makeHelix, o as makePolygon, p as makeEllipseArc, r as makeFace, s as assembleWire, t as addHolesInFace, u as makeBezierCurve } from "./surfaceBuilders-D4p1YPCz.js";
|
|
9
|
+
import { a as fuseAll, i as fuse, n as cut, r as cutAll } from "./booleanFns-nHsLqZ7Y.js";
|
|
10
|
+
import { a as makeOffset, c as makeTorus, i as makeEllipsoid, l as makeVertex, n as makeCone, o as makeSolid, r as makeCylinder, s as makeSphere, t as makeCompound, u as weldShellsAndFaces } from "./solidBuilders-C44fKbQQ.js";
|
|
11
11
|
//#region src/topology/threeHelpers.ts
|
|
12
12
|
/**
|
|
13
13
|
* Convert a ShapeMesh into BufferGeometry-compatible typed arrays.
|
package/dist/projection.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_cameraFns = require("./cameraFns-
|
|
2
|
+
const require_cameraFns = require("./cameraFns-D_8-JO0p.cjs");
|
|
3
3
|
exports.PROJECTION_PLANES = require_cameraFns.PROJECTION_PLANES;
|
|
4
4
|
exports.cameraFromPlane = require_cameraFns.cameraFromPlane;
|
|
5
5
|
exports.cameraLookAt = require_cameraFns.cameraLookAt;
|
package/dist/projection.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as makeProjectedEdges, i as projectEdges, n as cameraLookAt, o as PROJECTION_PLANES, r as createCamera, s as isProjectionPlane, t as cameraFromPlane } from "./cameraFns-
|
|
1
|
+
import { a as makeProjectedEdges, i as projectEdges, n as cameraLookAt, o as PROJECTION_PLANES, r as createCamera, s as isProjectionPlane, t as cameraFromPlane } from "./cameraFns-Bhjy2SuC.js";
|
|
2
2
|
export { PROJECTION_PLANES, cameraFromPlane, cameraLookAt, createCamera, isProjectionPlane, makeProjectedEdges, projectEdges };
|
package/dist/query.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_helpers = require("./helpers-
|
|
3
|
-
const require_cornerFinder = require("./cornerFinder-
|
|
2
|
+
const require_helpers = require("./helpers-DNVILwHA.cjs");
|
|
3
|
+
const require_cornerFinder = require("./cornerFinder-Bmp3Vm5g.cjs");
|
|
4
4
|
exports.cornerFinder = require_cornerFinder.cornerFinder;
|
|
5
5
|
exports.edgeFinder = require_helpers.edgeFinder;
|
|
6
6
|
exports.faceFinder = require_helpers.faceFinder;
|
package/dist/query.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-
|
|
2
|
-
import { t as cornerFinder } from "./cornerFinder-
|
|
1
|
+
import { n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-BhJOo535.js";
|
|
2
|
+
import { t as cornerFinder } from "./cornerFinder-U6kzoCXY.js";
|
|
3
3
|
export { cornerFinder, edgeFinder, faceFinder, getSingleFace };
|
package/dist/result.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_errors = require("./errors-
|
|
2
|
+
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
3
|
exports.BrepBugError = require_errors.BrepBugError;
|
|
4
4
|
exports.BrepErrorCode = require_errors.BrepErrorCode;
|
|
5
5
|
exports.OK = require_errors.OK;
|
package/dist/result.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as ok, B as unwrapOr, E as map, I as tryCatch, L as tryCatchAsync, N as pipeline, O as mapErr, R as unwrap, T as isOk, V as unwrapOrElse, a as moduleInitError, b as err, c as sketcherStateError, d as validationError, g as OK, h as bug, i as kernelError, k as match, l as typeCastError, m as BrepBugError, n as computationError, o as queryError, r as ioError, t as BrepErrorCode, v as andThen, w as isErr, x as flatMap, y as collect, z as unwrapErr } from "./errors-
|
|
1
|
+
import { A as ok, B as unwrapOr, E as map, I as tryCatch, L as tryCatchAsync, N as pipeline, O as mapErr, R as unwrap, T as isOk, V as unwrapOrElse, a as moduleInitError, b as err, c as sketcherStateError, d as validationError, g as OK, h as bug, i as kernelError, k as match, l as typeCastError, m as BrepBugError, n as computationError, o as queryError, r as ioError, t as BrepErrorCode, v as andThen, w as isErr, x as flatMap, y as collect, z as unwrapErr } from "./errors-DNWJsfVU.js";
|
|
2
2
|
export { BrepBugError, BrepErrorCode, OK, andThen, bug, collect, computationError, err, flatMap, ioError, isErr, isOk, kernelError, map, mapErr, match, moduleInitError, ok, pipeline, queryError, sketcherStateError, tryCatch, tryCatchAsync, typeCastError, unwrap, unwrapErr, unwrapOr, unwrapOrElse, validationError };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_errors = require("./errors-
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-Bbh2doYh.cjs");
|
|
2
|
+
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-C0kAqcn5.cjs");
|
|
4
4
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
5
5
|
//#region src/topology/metadata/originTrackingFns.ts
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Z as getKernel, t as castShape } from "./shapeTypes-
|
|
2
|
-
import { A as ok, b as err, d as validationError, t as BrepErrorCode } from "./errors-
|
|
3
|
-
import { C as kernelCall, c as getFaces, l as getOrCreateCache, r as getCacheEntry, w as kernelCallRaw } from "./topologyQueryFns-
|
|
1
|
+
import { Z as getKernel, t as castShape } from "./shapeTypes-C-MpR5-e.js";
|
|
2
|
+
import { A as ok, b as err, d as validationError, t as BrepErrorCode } from "./errors-DNWJsfVU.js";
|
|
3
|
+
import { C as kernelCall, c as getFaces, l as getOrCreateCache, r as getCacheEntry, w as kernelCallRaw } from "./topologyQueryFns-B81GSST_.js";
|
|
4
4
|
import { n as HASH_CODE_MAX, t as DEG2RAD } from "./constants-ITRzCnCp.js";
|
|
5
5
|
//#region src/topology/metadata/originTrackingFns.ts
|
|
6
6
|
/**
|
package/dist/shapeRef.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_shapeRefFns = require("./shapeRefFns-
|
|
2
|
+
const require_shapeRefFns = require("./shapeRefFns-CkafUjdM.cjs");
|
|
3
3
|
exports.assignRoles = require_shapeRefFns.assignRoles;
|
|
4
4
|
exports.captureHint = require_shapeRefFns.captureHint;
|
|
5
5
|
exports.createRef = require_shapeRefFns.createRef;
|
package/dist/shapeRef.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as updateRoles, i as resolveRef, n as captureHint, o as defaultScorer, r as createRef, t as assignRoles } from "./shapeRefFns-
|
|
1
|
+
import { a as updateRoles, i as resolveRef, n as captureHint, o as defaultScorer, r as createRef, t as assignRoles } from "./shapeRefFns-BOsX8Tim.js";
|
|
2
2
|
export { assignRoles, captureHint, createRef, defaultScorer, resolveRef, updateRoles };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as wasmIndex } from "./vec3-Dpha8d5k.js";
|
|
2
|
-
import { c as getFaces } from "./topologyQueryFns-
|
|
3
|
-
import { c as normalAt, n as faceCenter, r as faceGeomType } from "./faceFns-
|
|
4
|
-
import { n as getHashCode } from "./shapeFns-
|
|
5
|
-
import { n as measureArea } from "./measureFns-
|
|
2
|
+
import { c as getFaces } from "./topologyQueryFns-B81GSST_.js";
|
|
3
|
+
import { c as normalAt, n as faceCenter, r as faceGeomType } from "./faceFns-eVWgSIzt.js";
|
|
4
|
+
import { n as getHashCode } from "./shapeFns-BbHQjI5-.js";
|
|
5
|
+
import { n as measureArea } from "./measureFns-BiflqrZ_.js";
|
|
6
6
|
//#region src/topology/shapeRef/scoring.ts
|
|
7
7
|
/**
|
|
8
8
|
* Default face scorer combining surface type, normal alignment, centroid proximity,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
|
|
2
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
-
const require_faceFns = require("./faceFns-
|
|
4
|
-
const require_shapeFns = require("./shapeFns-
|
|
5
|
-
const require_measureFns = require("./measureFns-
|
|
2
|
+
const require_topologyQueryFns = require("./topologyQueryFns-C0kAqcn5.cjs");
|
|
3
|
+
const require_faceFns = require("./faceFns-C6qUr_gw.cjs");
|
|
4
|
+
const require_shapeFns = require("./shapeFns-B3v9_keQ.cjs");
|
|
5
|
+
const require_measureFns = require("./measureFns-D7lxkIjt.cjs");
|
|
6
6
|
//#region src/topology/shapeRef/scoring.ts
|
|
7
7
|
/**
|
|
8
8
|
* Default face scorer combining surface type, normal alignment, centroid proximity,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
|
|
2
2
|
const require_occtWasmAdapter = require("./occtWasmAdapter-CdyaMnBW.cjs");
|
|
3
|
-
const require_errors = require("./errors-
|
|
3
|
+
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
4
4
|
//#region src/kernel/kernel2dTypes.ts
|
|
5
5
|
/** Check if the kernel supports 2D geometry operations. */
|
|
6
6
|
function supportsKernel2D(kernel) {
|
|
@@ -12031,24 +12031,38 @@ function spineWire(target, params) {
|
|
|
12031
12031
|
function isShellResult(value) {
|
|
12032
12032
|
return typeof value === "object" && value !== null && "shape" in value && "firstShape" in value && "lastShape" in value;
|
|
12033
12033
|
}
|
|
12034
|
-
|
|
12035
|
-
* Replay an op-graph onto `targetKernel`, returning the exact B-rep shape.
|
|
12036
|
-
*
|
|
12037
|
-
* Memoized post-order: each node's inputs are replayed first (deduplicated via
|
|
12038
|
-
* the shared cache so a DAG with reused sub-graphs replays each node once), then
|
|
12039
|
-
* the node's own handler runs. Throws on any non-replayable node or unmapped op.
|
|
12040
|
-
*/
|
|
12041
|
-
function replay(node, targetKernel, cache = /* @__PURE__ */ new Map()) {
|
|
12034
|
+
function replayNode(node, targetKernel, cache, allocated) {
|
|
12042
12035
|
const cached = cache.get(node);
|
|
12043
12036
|
if (cached !== void 0) return cached;
|
|
12044
12037
|
if (!node.replayable) throw new Error(`manifold replay: op '${node.op}' is not replayable (raw-mesh origin or unsupported)`);
|
|
12045
12038
|
const handler = HANDLERS[node.op];
|
|
12046
12039
|
if (!handler) throw new Error(`manifold replay: no replay handler for op '${node.op}'`);
|
|
12047
|
-
const inputs = node.inputs.map((child) =>
|
|
12040
|
+
const inputs = node.inputs.map((child) => replayNode(child, targetKernel, cache, allocated));
|
|
12048
12041
|
const result = handler(targetKernel, node.params, inputs);
|
|
12049
12042
|
cache.set(node, result);
|
|
12043
|
+
allocated.add(result);
|
|
12050
12044
|
return result;
|
|
12051
12045
|
}
|
|
12046
|
+
/**
|
|
12047
|
+
* Replay an op-graph onto `targetKernel`, returning the exact B-rep shape.
|
|
12048
|
+
*
|
|
12049
|
+
* Memoized post-order: each node's inputs are replayed first (deduplicated via
|
|
12050
|
+
* the shared cache so a DAG with reused sub-graphs replays each node once), then
|
|
12051
|
+
* the node's own handler runs. Throws on any non-replayable node or unmapped op.
|
|
12052
|
+
*
|
|
12053
|
+
* Every node produces an intermediate OCCT WASM-heap shape, but only the root is
|
|
12054
|
+
* returned (and retained by the caller's `brepCache`). To avoid leaking the rest
|
|
12055
|
+
* for the lifetime of the session, the intermediates this call allocated are
|
|
12056
|
+
* disposed once the full recursion completes — they are only inputs to copying
|
|
12057
|
+
* ops (booleans/modifiers), so the root holds its own geometry. Shapes the caller
|
|
12058
|
+
* pre-seeded into `cache` are not in `allocated` and so are never disposed here.
|
|
12059
|
+
*/
|
|
12060
|
+
function replay(node, targetKernel, cache = /* @__PURE__ */ new Map()) {
|
|
12061
|
+
const allocated = /* @__PURE__ */ new Set();
|
|
12062
|
+
const root = replayNode(node, targetKernel, cache, allocated);
|
|
12063
|
+
for (const shape of allocated) if (shape !== root) targetKernel.dispose(shape);
|
|
12064
|
+
return root;
|
|
12065
|
+
}
|
|
12052
12066
|
//#endregion
|
|
12053
12067
|
//#region src/kernel/manifold/measureOps.ts
|
|
12054
12068
|
function solidOf(shape) {
|