brepjs 20.1.2 → 20.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/2d.cjs +6 -6
- package/dist/2d.js +6 -6
- package/dist/{adjacencyFns-ej9hO9xZ.js → adjacencyFns-A1SikG3N.js} +2 -2
- package/dist/{adjacencyFns-zDv9Y_vQ.cjs → adjacencyFns-C_ZNyZRx.cjs} +2 -2
- package/dist/{blueprint-SRu61-iN.cjs → blueprint-BsaJ4TJW.cjs} +5 -5
- package/dist/{blueprint-Cmg-LbRn.js → blueprint-CAg8eRRu.js} +5 -5
- package/dist/{blueprintFns-C-oyZ7Zi.js → blueprintFns-BRXgJCA2.js} +2 -2
- package/dist/{blueprintFns-DkvwC3RT.cjs → blueprintFns-CCVf2Yat.cjs} +2 -2
- package/dist/{blueprintSketcher-BlZGYoPw.js → blueprintSketcher-CNbOLihr.js} +3 -3
- package/dist/{blueprintSketcher-BrM_Pw3f.cjs → blueprintSketcher-DobJgYX3.cjs} +3 -3
- package/dist/{boolean2D-De5gvlXc.js → boolean2D-C-TdmZUJ.js} +4 -4
- package/dist/{boolean2D-CV3aESVd.cjs → boolean2D-CB3xwM21.cjs} +4 -4
- package/dist/brepjs.cjs +28 -28
- package/dist/brepjs.js +28 -28
- package/dist/{cameraFns-CmF8UUHE.cjs → cameraFns-BSHErz3i.cjs} +3 -3
- package/dist/{cameraFns-Cc64fYYx.js → cameraFns-CdtviYur.js} +3 -3
- package/dist/core.cjs +2 -2
- package/dist/core.js +2 -2
- package/dist/{cornerFinder-Cs0EZ0Ne.cjs → cornerFinder-BdK6e9T-.cjs} +1 -1
- package/dist/{cornerFinder-BcUFKX9b.js → cornerFinder-DCXsZzIe.js} +1 -1
- package/dist/{curveFns-DuR-eBys.cjs → curveFns-BXGE1xHa.cjs} +1 -1
- package/dist/{curveFns-BKsD1ODV.js → curveFns-D_xfC1HQ.js} +1 -1
- package/dist/{drawFns-Dl8qMkEz.cjs → drawFns-B9JThnjT.cjs} +12 -12
- package/dist/{drawFns-lOJWjgrQ.js → drawFns-CIfCWrWw.js} +12 -12
- package/dist/{faceFns-Ce23Cb4Q.cjs → faceFns-CGXvMjno.cjs} +2 -2
- package/dist/{faceFns-BGhhLR-E.js → faceFns-CwweiLRC.js} +2 -2
- package/dist/{healingFns-DmIfO2cE.cjs → healingFns-D8_IZ8LC.cjs} +4 -4
- package/dist/{healingFns-C8NNkFcz.js → healingFns-DVH0JBpC.js} +4 -4
- package/dist/{helpers-CRSf_sid.cjs → helpers-BjKe6-M-.cjs} +6 -6
- package/dist/{helpers-D8YOkdnU.js → helpers-jV94RJf1.js} +6 -6
- package/dist/{importFns-COBw14C4.js → importFns-8OY0H66Q.js} +2 -2
- package/dist/{importFns-fdBP-Jna.cjs → importFns-C0WKTbbQ.cjs} +2 -2
- package/dist/io.cjs +2 -2
- package/dist/io.js +2 -2
- package/dist/kernel/brepkit/evolutionOps.d.ts +22 -0
- package/dist/kernel/brepkit/helpers.d.ts +6 -0
- package/dist/{loftFns-BOMgg6L-.cjs → loftFns-B3aEz87L.cjs} +1 -1
- package/dist/{loftFns-yMpD7BA9.js → loftFns-CS0JYNr4.js} +1 -1
- package/dist/{measureFns-CwgfqnSt.cjs → measureFns-CyU-fOaZ.cjs} +3 -3
- package/dist/{measureFns-BhqDp378.js → measureFns-LkW9r9Dm.js} +3 -3
- package/dist/measurement.cjs +1 -1
- package/dist/measurement.js +1 -1
- package/dist/{meshFns-BHGieABm.js → meshFns-BI_fEj-T.js} +3 -3
- package/dist/{meshFns-BEJgW3TE.cjs → meshFns-vO9xsIlB.cjs} +3 -3
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/{originTrackingFns-CO8e_LS7.js → originTrackingFns-BTBemULp.js} +2 -2
- package/dist/{originTrackingFns-W6ywaEKW.cjs → originTrackingFns-CuCeiMNZ.cjs} +2 -2
- package/dist/{primitiveFns-CuS1e3EQ.js → primitiveFns-CfxGT0nf.js} +4 -4
- package/dist/{primitiveFns-BDhSnM7w.cjs → primitiveFns-DSUL72Md.cjs} +4 -4
- package/dist/projection.cjs +1 -1
- package/dist/projection.js +1 -1
- package/dist/query.cjs +2 -2
- package/dist/query.js +2 -2
- package/dist/{refResolveFns-CBFzu4MO.cjs → refResolveFns-BleIGUVN.cjs} +6 -6
- package/dist/{refResolveFns-DAELSL_-.js → refResolveFns-BuS72b11.js} +6 -6
- package/dist/{shapeFns-Dkv5hQqS.cjs → shapeFns-BsuUPJR3.cjs} +2 -2
- package/dist/{shapeFns-CcYDq9w_.js → shapeFns-DTZ96dTc.js} +2 -2
- package/dist/shapeRef.cjs +1 -1
- package/dist/shapeRef.js +1 -1
- package/dist/{shapeTypes-K-8sOZJX.cjs → shapeTypes-CACpB7r3.cjs} +62 -37
- package/dist/{shapeTypes-DR09c_Mq.js → shapeTypes-CEFHrXNb.js} +62 -37
- package/dist/sketching.cjs +3 -3
- package/dist/sketching.js +3 -3
- package/dist/{solidBuilders-Js3NDrDt.cjs → solidBuilders-BdKU5bQ9.cjs} +5 -5
- package/dist/{solidBuilders-B93Vxsox.js → solidBuilders-De11-Gp-.js} +5 -5
- package/dist/{surfaceBuilders-BogUIjPP.cjs → surfaceBuilders-BaVNAtRf.cjs} +3 -3
- package/dist/{surfaceBuilders-lWeHYtC-.js → surfaceBuilders-QGhgel6X.js} +3 -3
- package/dist/text.cjs +2 -2
- package/dist/text.js +2 -2
- package/dist/{textBlueprints-CBgZxt_j.cjs → textBlueprints-BHOADZSh.cjs} +7 -7
- package/dist/{textBlueprints-DlDqZ1_L.js → textBlueprints-B_yfJn3S.js} +7 -7
- package/dist/{textMetrics-BDmGtyyR.js → textMetrics-C4I5t9jZ.js} +1 -1
- package/dist/{textMetrics-DIONpTho.cjs → textMetrics-DHWYuTUK.cjs} +1 -1
- package/dist/{threadFns-CpfBKRPw.js → threadFns-BVwQUwRJ.js} +7 -7
- package/dist/{threadFns-CQXZ4TG7.cjs → threadFns-P682L-Kg.cjs} +7 -7
- package/dist/topology.cjs +9 -9
- package/dist/topology.js +9 -9
- package/dist/{topologyQueryFns-D0QnCShx.js → topologyQueryFns-CFfTw0pA.js} +1 -1
- package/dist/{topologyQueryFns-xuTRkmJV.cjs → topologyQueryFns-Cp390rTF.cjs} +1 -1
- package/dist/{validityTypes-rF_6gey6.js → validityTypes-Biiyb5lR.js} +1 -1
- package/dist/{validityTypes-DHlUzxhk.cjs → validityTypes-DtfxKjGs.cjs} +1 -1
- package/package.json +11 -11
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-CACpB7r3.cjs");
|
|
2
2
|
const require_errors = require("./errors-DWezb9DI.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-Cp390rTF.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-CGXvMjno.cjs");
|
|
7
|
+
const require_shapeFns = require("./shapeFns-BsuUPJR3.cjs");
|
|
8
|
+
const require_curveFns = require("./curveFns-BXGE1xHa.cjs");
|
|
9
|
+
const require_measureFns = require("./measureFns-CyU-fOaZ.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,12 +1,12 @@
|
|
|
1
|
-
import { q as getKernel, y as isFace } from "./shapeTypes-
|
|
1
|
+
import { q as getKernel, y as isFace } from "./shapeTypes-CEFHrXNb.js";
|
|
2
2
|
import { E as ok, g as err, o as queryError, x as isOk } from "./errors-CTn8i3lY.js";
|
|
3
|
-
import { c as getFaces, f as getVertices, p as getWires, s as getEdges } from "./topologyQueryFns-
|
|
3
|
+
import { c as getFaces, f as getVertices, p as getWires, s as getEdges } from "./topologyQueryFns-CFfTw0pA.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 { l as normalAt, s as getSurfaceType } from "./faceFns-
|
|
7
|
-
import { a as isSameShape, n as getHashCode } from "./shapeFns-
|
|
8
|
-
import { f as getCurveType, i as curveIsClosed, o as curveLength } from "./curveFns-
|
|
9
|
-
import { n as measureArea } from "./measureFns-
|
|
6
|
+
import { l as normalAt, s as getSurfaceType } from "./faceFns-CwweiLRC.js";
|
|
7
|
+
import { a as isSameShape, n as getHashCode } from "./shapeFns-DTZ96dTc.js";
|
|
8
|
+
import { f as getCurveType, i as curveIsClosed, o as curveLength } from "./curveFns-D_xfC1HQ.js";
|
|
9
|
+
import { n as measureArea } from "./measureFns-LkW9r9Dm.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,8 +1,8 @@
|
|
|
1
|
-
import { n as castResultShape, q as getKernel } from "./shapeTypes-
|
|
1
|
+
import { n as castResultShape, q as getKernel } from "./shapeTypes-CEFHrXNb.js";
|
|
2
2
|
import { i as wasmIndex, r as vec3At$1 } from "./bug-BdOHwn_e.js";
|
|
3
3
|
import { E as ok, g as err, r as ioError, t as BrepErrorCode } from "./errors-CTn8i3lY.js";
|
|
4
4
|
import { n as getAtOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
5
|
-
import { c as make2dBezierCurve, h as make2dThreePointArc, p as make2dSegmentCurve, t as Blueprint } from "./blueprint-
|
|
5
|
+
import { c as make2dBezierCurve, h as make2dThreePointArc, p as make2dSegmentCurve, t as Blueprint } from "./blueprint-CAg8eRRu.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) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-CACpB7r3.cjs");
|
|
2
2
|
const require_bug = require("./bug-O02CsAmt.cjs");
|
|
3
3
|
const require_errors = require("./errors-DWezb9DI.cjs");
|
|
4
4
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
5
|
-
const require_blueprint = require("./blueprint-
|
|
5
|
+
const require_blueprint = require("./blueprint-BsaJ4TJW.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) {
|
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-vO9xsIlB.cjs");
|
|
3
|
+
const require_importFns = require("./importFns-C0WKTbbQ.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-BI_fEj-T.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-8OY0H66Q.js";
|
|
3
3
|
export { blueprintToDXF, exportDXF, exportGlb, exportGltf, exportIGES, exportOBJ, exportSTEP, exportSTEPConfigured, exportSTL, exportThreeMF, importIGES, importSTEP, importSTL, importSVG, importSVGPathD };
|
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
import { BrepkitKernel } from './brepkitWasmTypes.js';
|
|
2
2
|
import { KernelShape, KernelType, OperationResult, DiagnosticOperationResult, BooleanOptions } from '../types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Chain an evolution map (modified or generated) through one step of a multi-step
|
|
5
|
+
* boolean. For each entry, each previous output hash is resolved against this
|
|
6
|
+
* step's evolution: if it was further modified, follow to the new outputs; if
|
|
7
|
+
* deleted, drop it; otherwise keep it unchanged.
|
|
8
|
+
*
|
|
9
|
+
* Mutates `map` in-place and records each resolved prevOut in `intermediateOutputs`.
|
|
10
|
+
* When `deleteOnEmpty` is provided, entries that reduce to no outputs are added to it.
|
|
11
|
+
*/
|
|
12
|
+
export declare function chainEvolutionMap(map: Map<number, number[]>, stepModified: ReadonlyMap<number, readonly number[]>, stepDeleted: ReadonlySet<number>, intermediateOutputs: Set<number>, deleteOnEmpty?: Set<number>): void;
|
|
13
|
+
export interface CompoundBooleanAccum {
|
|
14
|
+
combinedModified: Map<number, number[]>;
|
|
15
|
+
combinedGenerated: Map<number, number[]>;
|
|
16
|
+
combinedDeleted: Set<number>;
|
|
17
|
+
inputFaceHashSet: ReadonlySet<number>;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Fold one child solid of a compound tool into the running boolean accumulator.
|
|
21
|
+
* Chains existing modified/generated outputs through this step's evolution,
|
|
22
|
+
* then merges in any step entries not already covered by the chain.
|
|
23
|
+
*/
|
|
24
|
+
export declare function mergeCompoundChildStep(result: OperationResult, accum: CompoundBooleanAccum): void;
|
|
3
25
|
export declare function translateWithHistory(bk: BrepkitKernel, shape: KernelShape, x: number, y: number, z: number, inputFaceHashes: number[], hashUpperBound: number): OperationResult;
|
|
4
26
|
export declare function rotateWithHistory(bk: BrepkitKernel, shape: KernelShape, angle: number, inputFaceHashes: number[], hashUpperBound: number, axis?: readonly [number, number, number], center?: readonly [number, number, number]): OperationResult;
|
|
5
27
|
export declare function mirrorWithHistory(bk: BrepkitKernel, shape: KernelShape, origin: readonly [number, number, number], normal: readonly [number, number, number], inputFaceHashes: number[], hashUpperBound: number): OperationResult;
|
|
@@ -37,6 +37,12 @@ export declare function vertexHandle(id: number): BrepkitHandle;
|
|
|
37
37
|
export declare function unwrap(shape: KernelShape, expected?: ShapeType): number;
|
|
38
38
|
/** Convert a WASM Uint32Array of handles to a plain number[] for use with .map/.filter/.flatMap. */
|
|
39
39
|
export declare function toArray(ids: Uint32Array): number[];
|
|
40
|
+
/**
|
|
41
|
+
* Solid ids inside a compound. A synthetic compound exists JS-side only, so the
|
|
42
|
+
* kernel rejects its id as an invalid handle; its solid children are read from
|
|
43
|
+
* `syntheticCompounds` instead.
|
|
44
|
+
*/
|
|
45
|
+
export declare function compoundSolidIds(bk: BrepkitKernel, id: number): number[];
|
|
40
46
|
/** Unwrap a shape that must be a solid, with a descriptive error naming the method. */
|
|
41
47
|
export declare function unwrapSolidOrThrow(shape: KernelShape, methodName: string): number;
|
|
42
48
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-CACpB7r3.cjs");
|
|
2
2
|
const require_errors = require("./errors-DWezb9DI.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 { G as _usingCtx, T as isWire, h as disposeResultShape, n as castResultShape, q as getKernel, x as isShape3D } from "./shapeTypes-
|
|
1
|
+
import { G as _usingCtx, T as isWire, h as disposeResultShape, n as castResultShape, q as getKernel, x as isShape3D } from "./shapeTypes-CEFHrXNb.js";
|
|
2
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-CTn8i3lY.js";
|
|
3
3
|
import { r as toVec3 } from "./types-D24Y27N0.js";
|
|
4
4
|
import { c as vecLength, t as vecAdd } from "./vecOps-SKPRvPH-.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-CACpB7r3.cjs");
|
|
2
2
|
const require_errors = require("./errors-DWezb9DI.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
4
|
-
const require_faceFns = require("./faceFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-Cp390rTF.cjs");
|
|
4
|
+
const require_faceFns = require("./faceFns-CGXvMjno.cjs");
|
|
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
|
-
import { q as getKernel } from "./shapeTypes-
|
|
1
|
+
import { q as getKernel } from "./shapeTypes-CEFHrXNb.js";
|
|
2
2
|
import { E as ok, d as validationError, g as err, t as BrepErrorCode } from "./errors-CTn8i3lY.js";
|
|
3
|
-
import { T as kernelCallRaw } from "./topologyQueryFns-
|
|
4
|
-
import { m as uvBounds } from "./faceFns-
|
|
3
|
+
import { T as kernelCallRaw } from "./topologyQueryFns-CFfTw0pA.js";
|
|
4
|
+
import { m as uvBounds } from "./faceFns-CwweiLRC.js";
|
|
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-CyU-fOaZ.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-LkW9r9Dm.js";
|
|
2
2
|
export { createDistanceQuery, measureArea, measureDistance, measureDistanceProps, measureLength, measureLinearProps, measureSurfaceProps, measureVolume, measureVolumeProps };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { q as getKernel, ut as qualityDeflection } from "./shapeTypes-
|
|
1
|
+
import { q as getKernel, ut as qualityDeflection } from "./shapeTypes-CEFHrXNb.js";
|
|
2
2
|
import { E as ok, g as err, r as ioError } from "./errors-CTn8i3lY.js";
|
|
3
|
-
import { d as getSolids, n as getBounds } from "./topologyQueryFns-
|
|
4
|
-
import { t as getFaceOrigins } from "./originTrackingFns-
|
|
3
|
+
import { d as getSolids, n as getBounds } from "./topologyQueryFns-CFfTw0pA.js";
|
|
4
|
+
import { t as getFaceOrigins } from "./originTrackingFns-BTBemULp.js";
|
|
5
5
|
//#region src/topology/meshCache.ts
|
|
6
6
|
/**
|
|
7
7
|
* Build a parameter key for the inner cache map (excludes shape identity).
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-CACpB7r3.cjs");
|
|
2
2
|
const require_errors = require("./errors-DWezb9DI.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
4
|
-
const require_originTrackingFns = require("./originTrackingFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-Cp390rTF.cjs");
|
|
4
|
+
const require_originTrackingFns = require("./originTrackingFns-CuCeiMNZ.cjs");
|
|
5
5
|
//#region src/topology/meshCache.ts
|
|
6
6
|
/**
|
|
7
7
|
* Build a parameter key for the inner cache map (excludes shape identity).
|
package/dist/operations.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_threadFns = require("./threadFns-
|
|
3
|
-
const require_loftFns = require("./loftFns-
|
|
2
|
+
const require_threadFns = require("./threadFns-P682L-Kg.cjs");
|
|
3
|
+
const require_loftFns = require("./loftFns-B3aEz87L.cjs");
|
|
4
4
|
exports.addChild = require_threadFns.addChild;
|
|
5
5
|
exports.addJoint = require_threadFns.addJoint;
|
|
6
6
|
exports.addStep = require_threadFns.addStep;
|
package/dist/operations.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { A as setJointValue, B as walkAssembly, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, F as countNodes, H as circularPattern, I as createAssemblyNode, L as findNode, M as sphericalJoint, N as addChild, O as prismaticJoint, P as collectShapes, R as removeChild, S as addJoint, T as jointTransform, U as gridPattern, V as exportAssemblySTEP, W as linearPattern, Y as createAssembly, _ as exportURDF, b as inverseKinematics, c as modifyStep, d as replayFrom, f as replayHistory, g as undoLast, h as stepsFrom, i as createRegistry, j as setJointValues, k as revoluteJoint, l as registerOperation, m as stepCount, n as addStep, o as findStep, r as createHistory, s as getShape, t as thread, u as registerShape, v as importURDF, w as forwardKinematics, x as jointTrajectory, y as jointsFromDH, z as updateNode } from "./threadFns-
|
|
2
|
-
import { c as twistExtrude, o as supportExtrude, r as complexExtrude, s as sweep } from "./loftFns-
|
|
1
|
+
import { A as setJointValue, B as walkAssembly, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, F as countNodes, H as circularPattern, I as createAssemblyNode, L as findNode, M as sphericalJoint, N as addChild, O as prismaticJoint, P as collectShapes, R as removeChild, S as addJoint, T as jointTransform, U as gridPattern, V as exportAssemblySTEP, W as linearPattern, Y as createAssembly, _ as exportURDF, b as inverseKinematics, c as modifyStep, d as replayFrom, f as replayHistory, g as undoLast, h as stepsFrom, i as createRegistry, j as setJointValues, k as revoluteJoint, l as registerOperation, m as stepCount, n as addStep, o as findStep, r as createHistory, s as getShape, t as thread, u as registerShape, v as importURDF, w as forwardKinematics, x as jointTrajectory, y as jointsFromDH, z as updateNode } from "./threadFns-BVwQUwRJ.js";
|
|
2
|
+
import { c as twistExtrude, o as supportExtrude, r as complexExtrude, s as sweep } from "./loftFns-CS0JYNr4.js";
|
|
3
3
|
export { addChild, addJoint, addStep, circularPattern, collectShapes, complexExtrude, countNodes, createAssembly, createAssemblyNode, createHistory, createRegistry, cylindricalJoint, exportAssemblySTEP, exportURDF, findNode, findStep, forwardKinematics, getShape as getHistoryShape, gridPattern, importURDF, inverseKinematics, jointTrajectory, jointTransform, jointsFromDH, linearPattern, mechanismDOF, modifyStep, planarJoint, prismaticJoint, registerOperation, registerShape, removeChild, replayFrom, replayHistory, revoluteJoint, setJointValue, setJointValues, sphericalJoint, stepCount, stepsFrom, supportExtrude, sweep, thread, twistExtrude, undoLast, updateNode, walkAssembly };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { q as getKernel } from "./shapeTypes-
|
|
2
|
-
import { S as subShapeHashes, c as getFaces, l as getOrCreateCache, r as getCacheEntry } from "./topologyQueryFns-
|
|
1
|
+
import { q as getKernel } from "./shapeTypes-CEFHrXNb.js";
|
|
2
|
+
import { S as subShapeHashes, c as getFaces, l as getOrCreateCache, r as getCacheEntry } from "./topologyQueryFns-CFfTw0pA.js";
|
|
3
3
|
import { n as HASH_CODE_MAX } from "./constants-ITRzCnCp.js";
|
|
4
4
|
//#region src/topology/metadata/originTrackingFns.ts
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-CACpB7r3.cjs");
|
|
2
|
+
const require_topologyQueryFns = require("./topologyQueryFns-Cp390rTF.cjs");
|
|
3
3
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
4
4
|
//#region src/topology/metadata/originTrackingFns.ts
|
|
5
5
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { E as GeometryCleanupError, G as _usingCtx, d as createSolid, n as castResultShape, q as getKernel } from "./shapeTypes-
|
|
1
|
+
import { E as GeometryCleanupError, G as _usingCtx, d as createSolid, n as castResultShape, q as getKernel } from "./shapeTypes-CEFHrXNb.js";
|
|
2
2
|
import { E as ok, d as validationError, g as err, m as andThen, t as BrepErrorCode } from "./errors-CTn8i3lY.js";
|
|
3
|
-
import { n as isClosedWire } from "./validityTypes-
|
|
3
|
+
import { n as isClosedWire } from "./validityTypes-Biiyb5lR.js";
|
|
4
4
|
import { n as HASH_CODE_MAX, t as DEG2RAD } from "./constants-ITRzCnCp.js";
|
|
5
|
-
import { C as propagateAllMetadata, S as hasAnyMetadata, T as propagateMetadataThroughRelocation, 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, w as propagateMetadataByHash, x as collectInputFaceHashes } from "./solidBuilders-
|
|
6
|
-
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-
|
|
5
|
+
import { C as propagateAllMetadata, S as hasAnyMetadata, T as propagateMetadataThroughRelocation, 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, w as propagateMetadataByHash, x as collectInputFaceHashes } from "./solidBuilders-De11-Gp-.js";
|
|
6
|
+
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-QGhgel6X.js";
|
|
7
7
|
//#region src/topology/transformFns.ts
|
|
8
8
|
/**
|
|
9
9
|
* Immutable shape transforms — translate, rotate, scale, mirror, applyMatrix.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-CACpB7r3.cjs");
|
|
2
2
|
const require_errors = require("./errors-DWezb9DI.cjs");
|
|
3
|
-
const require_validityTypes = require("./validityTypes-
|
|
3
|
+
const require_validityTypes = require("./validityTypes-DtfxKjGs.cjs");
|
|
4
4
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
5
|
-
const require_solidBuilders = require("./solidBuilders-
|
|
6
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
5
|
+
const require_solidBuilders = require("./solidBuilders-BdKU5bQ9.cjs");
|
|
6
|
+
const require_surfaceBuilders = require("./surfaceBuilders-BaVNAtRf.cjs");
|
|
7
7
|
//#region src/topology/transformFns.ts
|
|
8
8
|
/**
|
|
9
9
|
* Immutable shape transforms — translate, rotate, scale, mirror, applyMatrix.
|
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-BSHErz3i.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-CdtviYur.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-BjKe6-M-.cjs");
|
|
3
|
+
const require_cornerFinder = require("./cornerFinder-BdK6e9T-.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-jV94RJf1.js";
|
|
2
|
+
import { t as cornerFinder } from "./cornerFinder-DCXsZzIe.js";
|
|
3
3
|
export { cornerFinder, edgeFinder, faceFinder, getSingleFace };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
-
const require_faceFns = require("./faceFns-
|
|
4
|
-
const require_shapeFns = require("./shapeFns-
|
|
5
|
-
const require_measureFns = require("./measureFns-
|
|
6
|
-
const require_adjacencyFns = require("./adjacencyFns-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-CACpB7r3.cjs");
|
|
2
|
+
const require_topologyQueryFns = require("./topologyQueryFns-Cp390rTF.cjs");
|
|
3
|
+
const require_faceFns = require("./faceFns-CGXvMjno.cjs");
|
|
4
|
+
const require_shapeFns = require("./shapeFns-BsuUPJR3.cjs");
|
|
5
|
+
const require_measureFns = require("./measureFns-CyU-fOaZ.cjs");
|
|
6
|
+
const require_adjacencyFns = require("./adjacencyFns-C_ZNyZRx.cjs");
|
|
7
7
|
//#region src/topology/shapeRef/scoring.ts
|
|
8
8
|
/**
|
|
9
9
|
* Default face scorer combining surface type, normal alignment, centroid proximity,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { g as disposeTransientSubShape, o as castShapeWithKnownType, q as getKernel } from "./shapeTypes-
|
|
2
|
-
import { C as vertexPosition, c as getFaces } from "./topologyQueryFns-
|
|
3
|
-
import { i as faceGeomType, l as normalAt, r as faceCenter } from "./faceFns-
|
|
4
|
-
import { n as getHashCode } from "./shapeFns-
|
|
5
|
-
import { n as measureArea, s as measureLength } from "./measureFns-
|
|
6
|
-
import { a as facesOfVertex, c as verticesOfFace, i as facesOfEdge, o as sharedEdges, s as verticesOfEdge, t as adjacentFaceHashes } from "./adjacencyFns-
|
|
1
|
+
import { g as disposeTransientSubShape, o as castShapeWithKnownType, q as getKernel } from "./shapeTypes-CEFHrXNb.js";
|
|
2
|
+
import { C as vertexPosition, c as getFaces } from "./topologyQueryFns-CFfTw0pA.js";
|
|
3
|
+
import { i as faceGeomType, l as normalAt, r as faceCenter } from "./faceFns-CwweiLRC.js";
|
|
4
|
+
import { n as getHashCode } from "./shapeFns-DTZ96dTc.js";
|
|
5
|
+
import { n as measureArea, s as measureLength } from "./measureFns-LkW9r9Dm.js";
|
|
6
|
+
import { a as facesOfVertex, c as verticesOfFace, i as facesOfEdge, o as sharedEdges, s as verticesOfEdge, t as adjacentFaceHashes } from "./adjacencyFns-A1SikG3N.js";
|
|
7
7
|
//#region src/topology/shapeRef/scoring.ts
|
|
8
8
|
/**
|
|
9
9
|
* Default face scorer combining surface type, normal alignment, centroid proximity,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-CACpB7r3.cjs");
|
|
2
2
|
const require_errors = require("./errors-DWezb9DI.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-Cp390rTF.cjs");
|
|
4
4
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
5
5
|
//#region src/topology/shapeFns.ts
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { q as getKernel } from "./shapeTypes-
|
|
1
|
+
import { q as getKernel } from "./shapeTypes-CEFHrXNb.js";
|
|
2
2
|
import { t as BrepErrorCode } from "./errors-CTn8i3lY.js";
|
|
3
|
-
import { T as kernelCallRaw, w as kernelCall } from "./topologyQueryFns-
|
|
3
|
+
import { T as kernelCallRaw, w as kernelCall } from "./topologyQueryFns-CFfTw0pA.js";
|
|
4
4
|
import { n as HASH_CODE_MAX } from "./constants-ITRzCnCp.js";
|
|
5
5
|
//#region src/topology/shapeFns.ts
|
|
6
6
|
/**
|
package/dist/shapeRef.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_refResolveFns = require("./refResolveFns-
|
|
2
|
+
const require_refResolveFns = require("./refResolveFns-BleIGUVN.cjs");
|
|
3
3
|
exports.assignRoles = require_refResolveFns.assignRoles;
|
|
4
4
|
exports.captureHint = require_refResolveFns.captureHint;
|
|
5
5
|
exports.createDerivedFaceRef = require_refResolveFns.createDerivedFaceRef;
|
package/dist/shapeRef.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as createRef, a as isVertexRef, b as defaultScorer, c as resolveRefParams, d as createVertexRef, f as resolveVertexRef, g as captureHint, h as assignRoles, i as isLineageRef, l as createDerivedFaceRef, m as resolveEdgeRef, n as isEdgeRef, o as resolveLineageRef, p as createEdgeRef, r as isFaceRef, s as resolveRefIn, t as isDerivedFaceRef, u as resolveDerivedFaceRef, v as resolveRef, y as updateRoles } from "./refResolveFns-
|
|
1
|
+
import { _ as createRef, a as isVertexRef, b as defaultScorer, c as resolveRefParams, d as createVertexRef, f as resolveVertexRef, g as captureHint, h as assignRoles, i as isLineageRef, l as createDerivedFaceRef, m as resolveEdgeRef, n as isEdgeRef, o as resolveLineageRef, p as createEdgeRef, r as isFaceRef, s as resolveRefIn, t as isDerivedFaceRef, u as resolveDerivedFaceRef, v as resolveRef, y as updateRoles } from "./refResolveFns-BuS72b11.js";
|
|
2
2
|
export { assignRoles, captureHint, createDerivedFaceRef, createEdgeRef, createRef, createVertexRef, defaultScorer, isDerivedFaceRef, isEdgeRef, isFaceRef, isLineageRef, isVertexRef, resolveDerivedFaceRef, resolveEdgeRef, resolveLineageRef, resolveRef, resolveRefIn, resolveRefParams, resolveVertexRef, updateRoles };
|
|
@@ -5393,6 +5393,16 @@ function unwrap$1(shape, expected) {
|
|
|
5393
5393
|
function toArray(ids) {
|
|
5394
5394
|
return Array.from(ids);
|
|
5395
5395
|
}
|
|
5396
|
+
/**
|
|
5397
|
+
* Solid ids inside a compound. A synthetic compound exists JS-side only, so the
|
|
5398
|
+
* kernel rejects its id as an invalid handle; its solid children are read from
|
|
5399
|
+
* `syntheticCompounds` instead.
|
|
5400
|
+
*/
|
|
5401
|
+
function compoundSolidIds(bk, id) {
|
|
5402
|
+
const synthetic = syntheticCompounds.get(id);
|
|
5403
|
+
if (synthetic) return synthetic.filter((h) => h.type === "solid").map((h) => h.id);
|
|
5404
|
+
return toArray(bk.getCompoundSolids(id));
|
|
5405
|
+
}
|
|
5396
5406
|
/** Unwrap a shape that must be a solid, with a descriptive error naming the method. */
|
|
5397
5407
|
function unwrapSolidOrThrow(shape, methodName) {
|
|
5398
5408
|
if (!isBrepkitHandle(shape)) throw new Error("brepkit: expected a BrepkitHandle, got " + typeof shape);
|
|
@@ -5408,7 +5418,7 @@ function unwrapSolidsForExport(bk, shape, methodName) {
|
|
|
5408
5418
|
if (!isBrepkitHandle(shape)) throw new Error("brepkit: expected a BrepkitHandle, got " + typeof shape);
|
|
5409
5419
|
if (shape.type === "solid") return [shape.id];
|
|
5410
5420
|
if (shape.type === "compound") {
|
|
5411
|
-
const ids =
|
|
5421
|
+
const ids = compoundSolidIds(bk, shape.id);
|
|
5412
5422
|
if (ids.length > 0) return ids;
|
|
5413
5423
|
throw new Error(`brepkit: ${methodName} received a compound with no solids.`);
|
|
5414
5424
|
}
|
|
@@ -6578,7 +6588,7 @@ function isEmptyBooleanError(e) {
|
|
|
6578
6588
|
}
|
|
6579
6589
|
function isEmptyCompound(bk, h) {
|
|
6580
6590
|
if (h.type !== "compound") return false;
|
|
6581
|
-
return
|
|
6591
|
+
return compoundSolidIds(bk, h.id).length === 0;
|
|
6582
6592
|
}
|
|
6583
6593
|
function emptyCompound(bk) {
|
|
6584
6594
|
return compoundHandle(bk.makeCompound([]));
|
|
@@ -6609,7 +6619,7 @@ function warnCompoundBaseSimplify(options, op) {
|
|
|
6609
6619
|
*/
|
|
6610
6620
|
function solidIdsOf(bk, shape, methodName) {
|
|
6611
6621
|
const h = shape;
|
|
6612
|
-
if (isBrepkitHandle(shape) && h.type === "compound") return
|
|
6622
|
+
if (isBrepkitHandle(shape) && h.type === "compound") return compoundSolidIds(bk, h.id);
|
|
6613
6623
|
return [unwrapSolidOrThrow(shape, methodName)];
|
|
6614
6624
|
}
|
|
6615
6625
|
function fuse(bk, shape, tool, _options) {
|
|
@@ -6627,7 +6637,7 @@ function fuse(bk, shape, tool, _options) {
|
|
|
6627
6637
|
const baseId = unwrapSolidOrThrow(shape, "fuse");
|
|
6628
6638
|
const toolHandle = tool;
|
|
6629
6639
|
if (toolHandle.type === "compound") {
|
|
6630
|
-
const toolSolidIds =
|
|
6640
|
+
const toolSolidIds = compoundSolidIds(bk, toolHandle.id);
|
|
6631
6641
|
let currentId = baseId;
|
|
6632
6642
|
for (const toolSolidId of toolSolidIds) currentId = kernelBoolean(bk, "fuse", currentId, toolSolidId, _options);
|
|
6633
6643
|
return solidHandle(currentId);
|
|
@@ -6643,7 +6653,7 @@ function cut(bk, shape, tool, _options) {
|
|
|
6643
6653
|
warnCompoundBaseSimplify(_options, "cut");
|
|
6644
6654
|
const toolIds = solidIdsOf(bk, tool, "cut");
|
|
6645
6655
|
const survivors = [];
|
|
6646
|
-
for (const childId of
|
|
6656
|
+
for (const childId of compoundSolidIds(bk, cutBase.id)) try {
|
|
6647
6657
|
survivors.push(bk.compoundCut(childId, new Uint32Array(toolIds)));
|
|
6648
6658
|
} catch (e) {
|
|
6649
6659
|
if (!isEmptyBooleanError(e)) throw e;
|
|
@@ -6654,7 +6664,7 @@ function cut(bk, shape, tool, _options) {
|
|
|
6654
6664
|
const baseId = unwrapSolidOrThrow(shape, "cut");
|
|
6655
6665
|
const toolHandle = tool;
|
|
6656
6666
|
if (toolHandle.type === "compound") {
|
|
6657
|
-
const toolSolidIds =
|
|
6667
|
+
const toolSolidIds = compoundSolidIds(bk, toolHandle.id);
|
|
6658
6668
|
let currentId = baseId;
|
|
6659
6669
|
for (const toolSolidId of toolSolidIds) try {
|
|
6660
6670
|
currentId = kernelBoolean(bk, "cut", currentId, toolSolidId, _options);
|
|
@@ -6720,14 +6730,14 @@ function cutAll(bk, shape, tools, options) {
|
|
|
6720
6730
|
const toolIds = [];
|
|
6721
6731
|
for (const tool of tools) {
|
|
6722
6732
|
const h = tool;
|
|
6723
|
-
if (h.type === "compound") toolIds.push(...
|
|
6733
|
+
if (h.type === "compound") toolIds.push(...compoundSolidIds(bk, h.id));
|
|
6724
6734
|
else toolIds.push(unwrapSolidOrThrow(tool, "cutAll"));
|
|
6725
6735
|
}
|
|
6726
6736
|
if (toolIds.length === 0) return shape;
|
|
6727
6737
|
const baseHandle = shape;
|
|
6728
6738
|
if (isBrepkitHandle(shape) && baseHandle.type === "compound") {
|
|
6729
6739
|
const survivors = [];
|
|
6730
|
-
for (const childId of
|
|
6740
|
+
for (const childId of compoundSolidIds(bk, baseHandle.id)) try {
|
|
6731
6741
|
survivors.push(bk.compoundCut(childId, toolIds));
|
|
6732
6742
|
} catch (e) {
|
|
6733
6743
|
if (!isEmptyBooleanError(e)) throw e;
|
|
@@ -7982,14 +7992,14 @@ function buildEvolution(bk, resultShape, inputFaceHashes, hashUpperBound, isTran
|
|
|
7982
7992
|
*/
|
|
7983
7993
|
function chainEvolutionMap(map, stepModified, stepDeleted, intermediateOutputs, deleteOnEmpty) {
|
|
7984
7994
|
for (const [origKey, prevOutputs] of map) {
|
|
7985
|
-
const chainedOutputs =
|
|
7995
|
+
const chainedOutputs = /* @__PURE__ */ new Set();
|
|
7986
7996
|
for (const prevOut of prevOutputs) {
|
|
7987
7997
|
intermediateOutputs.add(prevOut);
|
|
7988
7998
|
const nextOutputs = stepModified.get(prevOut);
|
|
7989
|
-
if (nextOutputs) chainedOutputs.
|
|
7990
|
-
else if (!stepDeleted.has(prevOut)) chainedOutputs.
|
|
7999
|
+
if (nextOutputs) for (const next of nextOutputs) chainedOutputs.add(next);
|
|
8000
|
+
else if (!stepDeleted.has(prevOut)) chainedOutputs.add(prevOut);
|
|
7991
8001
|
}
|
|
7992
|
-
if (chainedOutputs.
|
|
8002
|
+
if (chainedOutputs.size > 0) map.set(origKey, [...chainedOutputs]);
|
|
7993
8003
|
else {
|
|
7994
8004
|
map.delete(origKey);
|
|
7995
8005
|
deleteOnEmpty?.add(origKey);
|
|
@@ -8012,7 +8022,7 @@ function mergeCompoundChildStep(result, accum) {
|
|
|
8012
8022
|
for (const [k, v] of result.evolution.generated) {
|
|
8013
8023
|
if (intermediateOutputs.has(k)) continue;
|
|
8014
8024
|
const existing = accum.combinedGenerated.get(k) ?? [];
|
|
8015
|
-
accum.combinedGenerated.set(k, [...existing, ...v]);
|
|
8025
|
+
accum.combinedGenerated.set(k, [.../* @__PURE__ */ new Set([...existing, ...v])]);
|
|
8016
8026
|
}
|
|
8017
8027
|
for (const d of result.evolution.deleted) {
|
|
8018
8028
|
if (!accum.inputFaceHashSet.has(d)) continue;
|
|
@@ -8020,35 +8030,42 @@ function mergeCompoundChildStep(result, accum) {
|
|
|
8020
8030
|
}
|
|
8021
8031
|
}
|
|
8022
8032
|
/**
|
|
8023
|
-
* Iteratively apply native evolution for each solid
|
|
8024
|
-
*
|
|
8025
|
-
*
|
|
8033
|
+
* Iteratively apply native evolution for each tool solid, chaining evolution
|
|
8034
|
+
* maps so the original input face hashes resolve to final output hashes rather
|
|
8035
|
+
* than intermediates.
|
|
8026
8036
|
*/
|
|
8027
|
-
function applyCompoundBooleanWithHistory(
|
|
8028
|
-
const childSolidIds = toArray(bk.getCompoundSolids(compoundToolId));
|
|
8037
|
+
function applyCompoundBooleanWithHistory(shape, toolSolidIds, accum, hashUpperBound, nativeFn) {
|
|
8029
8038
|
let currentShape = shape;
|
|
8030
|
-
const
|
|
8031
|
-
combinedModified: /* @__PURE__ */ new Map(),
|
|
8032
|
-
combinedGenerated: /* @__PURE__ */ new Map(),
|
|
8033
|
-
combinedDeleted: /* @__PURE__ */ new Set(),
|
|
8034
|
-
inputFaceHashSet: new Set(inputFaceHashes)
|
|
8035
|
-
};
|
|
8036
|
-
for (const childId of childSolidIds) {
|
|
8039
|
+
for (const childId of toolSolidIds) {
|
|
8037
8040
|
const ch = currentShape;
|
|
8038
8041
|
if (ch.type !== "solid") break;
|
|
8039
8042
|
const result = parseNativeEvolution(nativeFn(ch.id, childId), hashUpperBound);
|
|
8040
8043
|
currentShape = result.shape;
|
|
8041
8044
|
mergeCompoundChildStep(result, accum);
|
|
8042
8045
|
}
|
|
8043
|
-
return
|
|
8044
|
-
|
|
8045
|
-
|
|
8046
|
-
|
|
8046
|
+
return currentShape;
|
|
8047
|
+
}
|
|
8048
|
+
/**
|
|
8049
|
+
* The union of a tool's solids, fused one at a time with history folded into
|
|
8050
|
+
* `accum`, so the tool's own faces still resolve to the faces they become.
|
|
8051
|
+
* `undefined` once a fuse leaves no single solid.
|
|
8052
|
+
*/
|
|
8053
|
+
function fuseToolWithHistory(bk, toolSolidIds, accum, hashUpperBound) {
|
|
8054
|
+
let union = toolSolidIds[0];
|
|
8055
|
+
for (const id of toolSolidIds.slice(1)) {
|
|
8056
|
+
if (union === void 0) return void 0;
|
|
8057
|
+
const step = parseNativeEvolution(bk.fuseWithEvolution(union, id), hashUpperBound);
|
|
8058
|
+
const fused = step.shape;
|
|
8059
|
+
if (fused.type !== "solid") return void 0;
|
|
8060
|
+
mergeCompoundChildStep(step, accum);
|
|
8061
|
+
union = fused.id;
|
|
8062
|
+
}
|
|
8063
|
+
return union;
|
|
8047
8064
|
}
|
|
8048
8065
|
/**
|
|
8049
8066
|
* Shared implementation for boolean-with-history operations (fuse, cut, intersect).
|
|
8050
8067
|
*/
|
|
8051
|
-
function booleanWithHistoryImpl(bk, shape, tool, inputFaceHashes, hashUpperBound, options, nativeFn, fallbackFn,
|
|
8068
|
+
function booleanWithHistoryImpl(bk, shape, tool, inputFaceHashes, hashUpperBound, options, nativeFn, fallbackFn, op) {
|
|
8052
8069
|
const noDiagnostics = {
|
|
8053
8070
|
hasErrors: false,
|
|
8054
8071
|
hasWarnings: false,
|
|
@@ -8065,10 +8082,18 @@ function booleanWithHistoryImpl(bk, shape, tool, inputFaceHashes, hashUpperBound
|
|
|
8065
8082
|
} catch (e) {
|
|
8066
8083
|
if (!isEmptyBooleanError(e)) throw e;
|
|
8067
8084
|
}
|
|
8068
|
-
|
|
8069
|
-
|
|
8085
|
+
const toolSolidIds = th.type === "compound" ? compoundSolidIds(bk, th.id) : [];
|
|
8086
|
+
if (toolSolidIds.length > 0) {
|
|
8087
|
+
const accum = {
|
|
8088
|
+
combinedModified: /* @__PURE__ */ new Map(),
|
|
8089
|
+
combinedGenerated: /* @__PURE__ */ new Map(),
|
|
8090
|
+
combinedDeleted: /* @__PURE__ */ new Set(),
|
|
8091
|
+
inputFaceHashSet: new Set(inputFaceHashes)
|
|
8092
|
+
};
|
|
8093
|
+
let steps = toolSolidIds;
|
|
8094
|
+
if (op === "intersect" && toolSolidIds.length > 1) steps = [fuseToolWithHistory(bk, toolSolidIds, accum, hashUpperBound) ?? bk.fuseAll(toolSolidIds)];
|
|
8070
8095
|
return {
|
|
8071
|
-
shape:
|
|
8096
|
+
shape: applyCompoundBooleanWithHistory(shape, steps, accum, hashUpperBound, nativeFn),
|
|
8072
8097
|
evolution: {
|
|
8073
8098
|
modified: accum.combinedModified,
|
|
8074
8099
|
generated: accum.combinedGenerated,
|
|
@@ -8099,13 +8124,13 @@ function generalTransformWithHistory(bk, shape, linear, translation, isOrthogona
|
|
|
8099
8124
|
return buildEvolution(bk, generalTransform$1(bk, shape, linear, translation, isOrthogonal), inputFaceHashes, hashUpperBound, true);
|
|
8100
8125
|
}
|
|
8101
8126
|
function fuseWithHistory(bk, shape, tool, inputFaceHashes, hashUpperBound, options) {
|
|
8102
|
-
return booleanWithHistoryImpl(bk, shape, tool, inputFaceHashes, hashUpperBound, options, (a, b) => bk.fuseWithEvolution(a, b), (s, t, o) => fuse(bk, s, t, o), "
|
|
8127
|
+
return booleanWithHistoryImpl(bk, shape, tool, inputFaceHashes, hashUpperBound, options, (a, b) => bk.fuseWithEvolution(a, b), (s, t, o) => fuse(bk, s, t, o), "fuse");
|
|
8103
8128
|
}
|
|
8104
8129
|
function cutWithHistory(bk, shape, tool, inputFaceHashes, hashUpperBound, options) {
|
|
8105
|
-
return booleanWithHistoryImpl(bk, shape, tool, inputFaceHashes, hashUpperBound, options, (a, b) => bk.cutWithEvolution(a, b), (s, t, o) => cut(bk, s, t, o), "
|
|
8130
|
+
return booleanWithHistoryImpl(bk, shape, tool, inputFaceHashes, hashUpperBound, options, (a, b) => bk.cutWithEvolution(a, b), (s, t, o) => cut(bk, s, t, o), "cut");
|
|
8106
8131
|
}
|
|
8107
8132
|
function intersectWithHistory(bk, shape, tool, inputFaceHashes, hashUpperBound, options) {
|
|
8108
|
-
return booleanWithHistoryImpl(bk, shape, tool, inputFaceHashes, hashUpperBound, options, (a, b) => bk.intersectWithEvolution(a, b), (s, t, o) => intersect(bk, s, t, o), "
|
|
8133
|
+
return booleanWithHistoryImpl(bk, shape, tool, inputFaceHashes, hashUpperBound, options, (a, b) => bk.intersectWithEvolution(a, b), (s, t, o) => intersect(bk, s, t, o), "intersect");
|
|
8109
8134
|
}
|
|
8110
8135
|
function filletWithHistory(bk, shape, edges, radius, inputFaceHashes, hashUpperBound) {
|
|
8111
8136
|
return buildEvolution(bk, fillet(bk, shape, edges, radius), inputFaceHashes, hashUpperBound, false, shape);
|
|
@@ -16266,7 +16291,7 @@ async function init() {
|
|
|
16266
16291
|
throw new Error("brepjs: no kernel package found. Install one of:\n npm install occt-wasm (recommended, default)\n npm install brepjs-opencascade\n npm install brepkit-wasm");
|
|
16267
16292
|
}
|
|
16268
16293
|
//#endregion
|
|
16269
|
-
//#region \0@oxc-project+runtime@0.
|
|
16294
|
+
//#region \0@oxc-project+runtime@0.152.0/helpers/esm/usingCtx.js
|
|
16270
16295
|
function _usingCtx() {
|
|
16271
16296
|
var r = "function" == typeof SuppressedError ? SuppressedError : function(r, e) {
|
|
16272
16297
|
var n = Error();
|