brepjs 18.121.0 → 18.122.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/2d.cjs +6 -6
- package/dist/2d.js +6 -6
- package/dist/{adjacencyFns-DsMqFuNj.cjs → adjacencyFns-Cs8nmeaT.cjs} +2 -2
- package/dist/{adjacencyFns-WI6jTgPj.js → adjacencyFns-D3uvUKTG.js} +2 -2
- package/dist/{blueprint-BMfA1l7L.cjs → blueprint-BdNwti5o.cjs} +5 -5
- package/dist/{blueprint-BKhUBppm.js → blueprint-Cpzb1U6t.js} +5 -5
- package/dist/{blueprintFns-BeTceE3q.js → blueprintFns-D4KLHFe2.js} +2 -2
- package/dist/{blueprintFns-7OWsu7ZF.cjs → blueprintFns-GUyxnnZn.cjs} +2 -2
- package/dist/{blueprintSketcher-DO_d7zqD.cjs → blueprintSketcher-COszlmz7.cjs} +3 -3
- package/dist/{blueprintSketcher-Y3MwCn3L.js → blueprintSketcher-CcoIcgyK.js} +3 -3
- package/dist/{boolean2D-QNJlLnod.js → boolean2D-BgdnrYSf.js} +4 -4
- package/dist/{boolean2D-B6D_lNFf.cjs → boolean2D-CSxq-dJW.cjs} +4 -4
- package/dist/brepjs.cjs +27 -27
- package/dist/brepjs.js +27 -27
- package/dist/{cameraFns-8sR-ZoHf.js → cameraFns-DWuceOs3.js} +3 -3
- package/dist/{cameraFns-BT-CtMCf.cjs → cameraFns-DsjfINgp.cjs} +3 -3
- package/dist/core.cjs +2 -2
- package/dist/core.js +2 -2
- package/dist/{cornerFinder-CvTaOXxr.cjs → cornerFinder-CptGPW5j.cjs} +1 -1
- package/dist/{cornerFinder-BM3F3OoM.js → cornerFinder-CzvV4DOD.js} +1 -1
- package/dist/{curveFns-BbcHDXEJ.cjs → curveFns-CGrPWjo3.cjs} +1 -1
- package/dist/{curveFns-B32q-8TZ.js → curveFns-fk4E_Grw.js} +1 -1
- package/dist/{drawFns-C2De1BsF.cjs → drawFns-0Tqeawy9.cjs} +12 -12
- package/dist/{drawFns-Du6sMJon.js → drawFns-Du7ocHOi.js} +12 -12
- package/dist/{faceFns-qndTnNgT.cjs → faceFns-CxTf97z-.cjs} +2 -2
- package/dist/{faceFns-ykEYdhaL.js → faceFns-Dhz3bkzQ.js} +2 -2
- package/dist/{healingFns-BBaO4Bwp.cjs → healingFns-BDcq3qqJ.cjs} +4 -4
- package/dist/{healingFns-C00g70Wt.js → healingFns-Du19Qqqf.js} +4 -4
- package/dist/{helpers-RUc2v5oR.cjs → helpers-3VNhnQjX.cjs} +6 -6
- package/dist/{helpers-D5qx9stJ.js → helpers-DPSL-65h.js} +6 -6
- package/dist/{importFns-DEvKlGHD.js → importFns-C2_nVVDU.js} +2 -2
- package/dist/{importFns-C6B9_oV5.cjs → importFns-C7AEdZCD.cjs} +2 -2
- package/dist/io.cjs +2 -2
- package/dist/io.js +2 -2
- package/dist/kernel/brepkit/brepkitWasmTypes.d.ts +10 -0
- package/dist/kernel/brepkit/helpers.d.ts +2 -3
- package/dist/{loftFns-mx6ZC-gX.js → loftFns-DDVkxTMU.js} +1 -1
- package/dist/{loftFns-C7GehOnK.cjs → loftFns-vQgPT1BQ.cjs} +1 -1
- package/dist/{measureFns-BNFhDFqE.js → measureFns-CGUuFdQT.js} +3 -3
- package/dist/{measureFns-DYdsT8Kl.cjs → measureFns-DqFny8g5.cjs} +3 -3
- package/dist/measurement.cjs +1 -1
- package/dist/measurement.js +1 -1
- package/dist/{meshFns-ChL7_iMB.js → meshFns-DQuLwLEC.js} +3 -3
- package/dist/{meshFns-l8fLXV8e.cjs → meshFns-Jg7ryUC0.cjs} +3 -3
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/{originTrackingFns-BYk4QA5P.js → originTrackingFns-B_hMNb6j.js} +2 -2
- package/dist/{originTrackingFns-CH_pg-B0.cjs → originTrackingFns-BzsWQj_i.cjs} +2 -2
- package/dist/{primitiveFns-D6b8VUa5.js → primitiveFns-BInid2mg.js} +4 -4
- package/dist/{primitiveFns-Q0T78yRR.cjs → primitiveFns-CII1p2Mf.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-ns4tH7qp.cjs → refResolveFns-BqnYgG9L.cjs} +6 -6
- package/dist/{refResolveFns-2aQXAUDR.js → refResolveFns-CjZVdigs.js} +6 -6
- package/dist/{shapeFns-0K8bnnSz.cjs → shapeFns-B2EZUOB3.cjs} +2 -2
- package/dist/{shapeFns-kHa5Xhg0.js → shapeFns-DkGbtIFX.js} +2 -2
- package/dist/shapeRef.cjs +1 -1
- package/dist/shapeRef.js +1 -1
- package/dist/{shapeTypes-D48Ybkzn.js → shapeTypes-BQoWcRwS.js} +21 -11
- package/dist/{shapeTypes-BS3RkG3d.cjs → shapeTypes-ZcbG2_Lb.cjs} +21 -11
- package/dist/sketching.cjs +3 -3
- package/dist/sketching.js +3 -3
- package/dist/{solidBuilders-DA7ZFDJL.cjs → solidBuilders-CBEqp-pE.cjs} +5 -5
- package/dist/{solidBuilders-DZipoLXo.js → solidBuilders-CJjOwzPw.js} +5 -5
- package/dist/{surfaceBuilders-Bim7KfuU.cjs → surfaceBuilders-50udezKU.cjs} +3 -3
- package/dist/{surfaceBuilders-DECJNVyK.js → surfaceBuilders-BGI_nRQr.js} +3 -3
- package/dist/text.cjs +2 -2
- package/dist/text.js +2 -2
- package/dist/{textBlueprints-DF0uAYfO.js → textBlueprints-D-bu8xo5.js} +7 -7
- package/dist/{textBlueprints-CKj_ly-g.cjs → textBlueprints-DHPvkCU_.cjs} +7 -7
- package/dist/{textMetrics-BwV29g3M.cjs → textMetrics-Df_v7bw-.cjs} +1 -1
- package/dist/{textMetrics-Pb9-8-fs.js → textMetrics-V6FjDpWU.js} +1 -1
- package/dist/{threadFns-Dirl_a3b.js → threadFns-C9fS6fQL.js} +7 -7
- package/dist/{threadFns-CcJMDRyn.cjs → threadFns-Cdsvqg8c.cjs} +7 -7
- package/dist/topology.cjs +9 -9
- package/dist/topology.js +9 -9
- package/dist/{topologyQueryFns-BCkE83BP.cjs → topologyQueryFns-H8KgyUg1.cjs} +1 -1
- package/dist/{topologyQueryFns-BKo5nl6-.js → topologyQueryFns-qvBQ93KV.js} +1 -1
- package/dist/{validityTypes-D08EKrAq.js → validityTypes-BY2V8ni0.js} +1 -1
- package/dist/{validityTypes-CZOLuo05.cjs → validityTypes-CqfzOb9v.cjs} +1 -1
- package/package.json +2 -2
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-ZcbG2_Lb.cjs");
|
|
2
2
|
const require_errors = require("./errors-RHkKO5bZ.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-H8KgyUg1.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-CxTf97z-.cjs");
|
|
7
|
+
const require_shapeFns = require("./shapeFns-B2EZUOB3.cjs");
|
|
8
|
+
const require_curveFns = require("./curveFns-CGrPWjo3.cjs");
|
|
9
|
+
const require_measureFns = require("./measureFns-DqFny8g5.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 { K as getKernel, y as isFace } from "./shapeTypes-
|
|
1
|
+
import { K as getKernel, y as isFace } from "./shapeTypes-BQoWcRwS.js";
|
|
2
2
|
import { E as ok, g as err, o as queryError, x as isOk } from "./errors-MHLiNE-C.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-qvBQ93KV.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-Dhz3bkzQ.js";
|
|
7
|
+
import { a as isSameShape, n as getHashCode } from "./shapeFns-DkGbtIFX.js";
|
|
8
|
+
import { f as getCurveType, i as curveIsClosed, o as curveLength } from "./curveFns-fk4E_Grw.js";
|
|
9
|
+
import { n as measureArea } from "./measureFns-CGUuFdQT.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 { K as getKernel, n as castResultShape } from "./shapeTypes-
|
|
1
|
+
import { K as getKernel, n as castResultShape } from "./shapeTypes-BQoWcRwS.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-MHLiNE-C.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-Cpzb1U6t.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-ZcbG2_Lb.cjs");
|
|
2
2
|
const require_bug = require("./bug-O02CsAmt.cjs");
|
|
3
3
|
const require_errors = require("./errors-RHkKO5bZ.cjs");
|
|
4
4
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
5
|
-
const require_blueprint = require("./blueprint-
|
|
5
|
+
const require_blueprint = require("./blueprint-BdNwti5o.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-Jg7ryUC0.cjs");
|
|
3
|
+
const require_importFns = require("./importFns-C7AEdZCD.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-DQuLwLEC.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-C2_nVVDU.js";
|
|
3
3
|
export { blueprintToDXF, exportDXF, exportGlb, exportGltf, exportIGES, exportOBJ, exportSTEP, exportSTEPConfigured, exportSTL, exportThreeMF, importIGES, importSTEP, importSTL, importSVG, importSVGPathD };
|
|
@@ -85,6 +85,16 @@ export interface BrepkitKernel {
|
|
|
85
85
|
fuse(a: number, b: number): number;
|
|
86
86
|
cut(a: number, b: number): number;
|
|
87
87
|
intersect(a: number, b: number): number;
|
|
88
|
+
/** brepkit-wasm >= 3.2: boolean with post-processing (simplify = unify co-surface fragments). */
|
|
89
|
+
fuseWithOptions?(a: number, b: number, simplify: boolean): number;
|
|
90
|
+
cutWithOptions?(a: number, b: number, simplify: boolean): number;
|
|
91
|
+
intersectWithOptions?(a: number, b: number, simplify: boolean): number;
|
|
92
|
+
/**
|
|
93
|
+
* brepkit-wasm >= 3.2: process-wide count of booleans that used the mesh
|
|
94
|
+
* (co-refinement) fallback. Snapshot around a chain; growth means at least
|
|
95
|
+
* one approximate, possibly non-watertight result.
|
|
96
|
+
*/
|
|
97
|
+
meshFallbackCount?(): number;
|
|
88
98
|
compoundCut(target: number, toolIds: Uint32Array | number[]): number;
|
|
89
99
|
convexHull(coords: Float64Array | number[]): number;
|
|
90
100
|
section(solid: number, px: number, py: number, pz: number, nx: number, ny: number, nz: number): Uint32Array;
|
|
@@ -71,10 +71,9 @@ export declare function nextSyntheticId(): number;
|
|
|
71
71
|
export declare const syntheticCompounds: Map<number, BrepkitHandle[]>;
|
|
72
72
|
/** Emit a console.warn once per key per session. */
|
|
73
73
|
export declare function warnOnce(key: string, message: string): void;
|
|
74
|
-
/** Check if a BooleanOptions object
|
|
75
|
-
export declare function
|
|
74
|
+
/** Check if a BooleanOptions object sets an option brepkit still ignores. */
|
|
75
|
+
export declare function hasIgnoredBooleanOptions(opts: {
|
|
76
76
|
optimisation?: unknown;
|
|
77
|
-
simplify?: unknown;
|
|
78
77
|
strategy?: unknown;
|
|
79
78
|
fuzzyValue?: unknown;
|
|
80
79
|
}): boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { K as getKernel, T as isWire, W as _usingCtx, h as disposeResultShape, n as castResultShape, x as isShape3D } from "./shapeTypes-
|
|
1
|
+
import { K as getKernel, T as isWire, W as _usingCtx, h as disposeResultShape, n as castResultShape, x as isShape3D } from "./shapeTypes-BQoWcRwS.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-MHLiNE-C.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,4 +1,4 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-ZcbG2_Lb.cjs");
|
|
2
2
|
const require_errors = require("./errors-RHkKO5bZ.cjs");
|
|
3
3
|
const require_types = require("./types-KjA8tY4Y.cjs");
|
|
4
4
|
const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { K as getKernel } from "./shapeTypes-
|
|
1
|
+
import { K as getKernel } from "./shapeTypes-BQoWcRwS.js";
|
|
2
2
|
import { E as ok, d as validationError, g as err, t as BrepErrorCode } from "./errors-MHLiNE-C.js";
|
|
3
|
-
import { T as kernelCallRaw } from "./topologyQueryFns-
|
|
4
|
-
import { m as uvBounds } from "./faceFns-
|
|
3
|
+
import { T as kernelCallRaw } from "./topologyQueryFns-qvBQ93KV.js";
|
|
4
|
+
import { m as uvBounds } from "./faceFns-Dhz3bkzQ.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-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-ZcbG2_Lb.cjs");
|
|
2
2
|
const require_errors = require("./errors-RHkKO5bZ.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
4
|
-
const require_faceFns = require("./faceFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-H8KgyUg1.cjs");
|
|
4
|
+
const require_faceFns = require("./faceFns-CxTf97z-.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-DqFny8g5.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-CGUuFdQT.js";
|
|
2
2
|
export { createDistanceQuery, measureArea, measureDistance, measureDistanceProps, measureLength, measureLinearProps, measureSurfaceProps, measureVolume, measureVolumeProps };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { K as getKernel, lt as qualityDeflection } from "./shapeTypes-
|
|
1
|
+
import { K as getKernel, lt as qualityDeflection } from "./shapeTypes-BQoWcRwS.js";
|
|
2
2
|
import { E as ok, g as err, r as ioError } from "./errors-MHLiNE-C.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-qvBQ93KV.js";
|
|
4
|
+
import { t as getFaceOrigins } from "./originTrackingFns-B_hMNb6j.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-ZcbG2_Lb.cjs");
|
|
2
2
|
const require_errors = require("./errors-RHkKO5bZ.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
4
|
-
const require_originTrackingFns = require("./originTrackingFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-H8KgyUg1.cjs");
|
|
4
|
+
const require_originTrackingFns = require("./originTrackingFns-BzsWQj_i.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-Cdsvqg8c.cjs");
|
|
3
|
+
const require_loftFns = require("./loftFns-vQgPT1BQ.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 createAssemblyNode, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, G as circularPattern, H as removeChild, J as exportAssemblySTEP, K as gridPattern, L as addChild, M as sphericalJoint, O as prismaticJoint, R as collectShapes, S as addJoint, T as jointTransform, U as updateNode, V as findNode, W as walkAssembly, 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, q as linearPattern, 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 countNodes } 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 createAssemblyNode, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, G as circularPattern, H as removeChild, J as exportAssemblySTEP, K as gridPattern, L as addChild, M as sphericalJoint, O as prismaticJoint, R as collectShapes, S as addJoint, T as jointTransform, U as updateNode, V as findNode, W as walkAssembly, 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, q as linearPattern, 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 countNodes } from "./threadFns-C9fS6fQL.js";
|
|
2
|
+
import { c as twistExtrude, o as supportExtrude, r as complexExtrude, s as sweep } from "./loftFns-DDVkxTMU.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 { K as getKernel } from "./shapeTypes-
|
|
2
|
-
import { S as subShapeHashes, c as getFaces, l as getOrCreateCache, r as getCacheEntry } from "./topologyQueryFns-
|
|
1
|
+
import { K as getKernel } from "./shapeTypes-BQoWcRwS.js";
|
|
2
|
+
import { S as subShapeHashes, c as getFaces, l as getOrCreateCache, r as getCacheEntry } from "./topologyQueryFns-qvBQ93KV.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-ZcbG2_Lb.cjs");
|
|
2
|
+
const require_topologyQueryFns = require("./topologyQueryFns-H8KgyUg1.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 { K as getKernel, W as _usingCtx, d as createSolid, n as castResultShape } from "./shapeTypes-
|
|
1
|
+
import { K as getKernel, W as _usingCtx, d as createSolid, n as castResultShape } from "./shapeTypes-BQoWcRwS.js";
|
|
2
2
|
import { E as ok, d as validationError, g as err, m as andThen, t as BrepErrorCode } from "./errors-MHLiNE-C.js";
|
|
3
|
-
import { n as isClosedWire } from "./validityTypes-
|
|
3
|
+
import { n as isClosedWire } from "./validityTypes-BY2V8ni0.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-CJjOwzPw.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-BGI_nRQr.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-ZcbG2_Lb.cjs");
|
|
2
2
|
const require_errors = require("./errors-RHkKO5bZ.cjs");
|
|
3
|
-
const require_validityTypes = require("./validityTypes-
|
|
3
|
+
const require_validityTypes = require("./validityTypes-CqfzOb9v.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-CBEqp-pE.cjs");
|
|
6
|
+
const require_surfaceBuilders = require("./surfaceBuilders-50udezKU.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-DsjfINgp.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-DWuceOs3.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-3VNhnQjX.cjs");
|
|
3
|
+
const require_cornerFinder = require("./cornerFinder-CptGPW5j.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-DPSL-65h.js";
|
|
2
|
+
import { t as cornerFinder } from "./cornerFinder-CzvV4DOD.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-ZcbG2_Lb.cjs");
|
|
2
|
+
const require_topologyQueryFns = require("./topologyQueryFns-H8KgyUg1.cjs");
|
|
3
|
+
const require_faceFns = require("./faceFns-CxTf97z-.cjs");
|
|
4
|
+
const require_shapeFns = require("./shapeFns-B2EZUOB3.cjs");
|
|
5
|
+
const require_measureFns = require("./measureFns-DqFny8g5.cjs");
|
|
6
|
+
const require_adjacencyFns = require("./adjacencyFns-Cs8nmeaT.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 { K as getKernel, g as disposeTransientSubShape, o as castShapeWithKnownType } 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 { K as getKernel, g as disposeTransientSubShape, o as castShapeWithKnownType } from "./shapeTypes-BQoWcRwS.js";
|
|
2
|
+
import { C as vertexPosition, c as getFaces } from "./topologyQueryFns-qvBQ93KV.js";
|
|
3
|
+
import { i as faceGeomType, l as normalAt, r as faceCenter } from "./faceFns-Dhz3bkzQ.js";
|
|
4
|
+
import { n as getHashCode } from "./shapeFns-DkGbtIFX.js";
|
|
5
|
+
import { n as measureArea, s as measureLength } from "./measureFns-CGUuFdQT.js";
|
|
6
|
+
import { a as facesOfVertex, c as verticesOfFace, i as facesOfEdge, o as sharedEdges, s as verticesOfEdge, t as adjacentFaceHashes } from "./adjacencyFns-D3uvUKTG.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-ZcbG2_Lb.cjs");
|
|
2
2
|
const require_errors = require("./errors-RHkKO5bZ.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-H8KgyUg1.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 { K as getKernel } from "./shapeTypes-
|
|
1
|
+
import { K as getKernel } from "./shapeTypes-BQoWcRwS.js";
|
|
2
2
|
import { t as BrepErrorCode } from "./errors-MHLiNE-C.js";
|
|
3
|
-
import { T as kernelCallRaw, w as kernelCall } from "./topologyQueryFns-
|
|
3
|
+
import { T as kernelCallRaw, w as kernelCall } from "./topologyQueryFns-qvBQ93KV.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-BqnYgG9L.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-CjZVdigs.js";
|
|
2
2
|
export { assignRoles, captureHint, createDerivedFaceRef, createEdgeRef, createRef, createVertexRef, defaultScorer, isDerivedFaceRef, isEdgeRef, isFaceRef, isLineageRef, isVertexRef, resolveDerivedFaceRef, resolveEdgeRef, resolveLineageRef, resolveRef, resolveRefIn, resolveRefParams, resolveVertexRef, updateRoles };
|
|
@@ -5633,9 +5633,9 @@ function warnOnce(key, message) {
|
|
|
5633
5633
|
_warned.add(key);
|
|
5634
5634
|
console.warn(`brepkit: ${message}`);
|
|
5635
5635
|
}
|
|
5636
|
-
/** Check if a BooleanOptions object
|
|
5637
|
-
function
|
|
5638
|
-
return opts.optimisation !== void 0 || opts.
|
|
5636
|
+
/** Check if a BooleanOptions object sets an option brepkit still ignores. */
|
|
5637
|
+
function hasIgnoredBooleanOptions(opts) {
|
|
5638
|
+
return opts.optimisation !== void 0 || opts.strategy !== void 0 || opts.fuzzyValue !== void 0;
|
|
5639
5639
|
}
|
|
5640
5640
|
/** Cast opaque Curve2dHandle to internal Curve2dObj. */
|
|
5641
5641
|
function c2d(h) {
|
|
@@ -6588,8 +6588,18 @@ function isEmptyCompound(bk, h) {
|
|
|
6588
6588
|
function emptyCompound(bk) {
|
|
6589
6589
|
return compoundHandle(bk.makeCompound([]));
|
|
6590
6590
|
}
|
|
6591
|
+
/** Kernel boolean honoring `simplify` when the kernel supports it (brepkit-wasm >= 3.2). */
|
|
6592
|
+
function kernelBoolean(bk, op, a, b, options) {
|
|
6593
|
+
if (options?.simplify) {
|
|
6594
|
+
if (op === "fuse" && typeof bk.fuseWithOptions === "function") return bk.fuseWithOptions(a, b, true);
|
|
6595
|
+
if (op === "cut" && typeof bk.cutWithOptions === "function") return bk.cutWithOptions(a, b, true);
|
|
6596
|
+
if (op === "intersect" && typeof bk.intersectWithOptions === "function") return bk.intersectWithOptions(a, b, true);
|
|
6597
|
+
warnOnce("boolean-simplify", "BooleanOptions.simplify needs brepkit-wasm >= 3.2; ignored on this kernel.");
|
|
6598
|
+
}
|
|
6599
|
+
return bk[op](a, b);
|
|
6600
|
+
}
|
|
6591
6601
|
function fuse(bk, shape, tool, _options) {
|
|
6592
|
-
if (_options &&
|
|
6602
|
+
if (_options && hasIgnoredBooleanOptions(_options)) warnOnce("boolean-options", "BooleanOptions (optimisation, strategy, fuzzyValue) not supported; ignored.");
|
|
6593
6603
|
if (isEmptyCompound(bk, shape)) return tool;
|
|
6594
6604
|
if (isEmptyCompound(bk, tool)) return shape;
|
|
6595
6605
|
const baseId = unwrapSolidOrThrow(shape, "fuse");
|
|
@@ -6597,13 +6607,13 @@ function fuse(bk, shape, tool, _options) {
|
|
|
6597
6607
|
if (toolHandle.type === "compound") {
|
|
6598
6608
|
const toolSolidIds = toArray(bk.getCompoundSolids(toolHandle.id));
|
|
6599
6609
|
let currentId = baseId;
|
|
6600
|
-
for (const toolSolidId of toolSolidIds) currentId = bk
|
|
6610
|
+
for (const toolSolidId of toolSolidIds) currentId = kernelBoolean(bk, "fuse", currentId, toolSolidId, _options);
|
|
6601
6611
|
return solidHandle(currentId);
|
|
6602
6612
|
}
|
|
6603
|
-
return solidHandle(bk
|
|
6613
|
+
return solidHandle(kernelBoolean(bk, "fuse", baseId, unwrapSolidOrThrow(tool, "fuse"), _options));
|
|
6604
6614
|
}
|
|
6605
6615
|
function cut(bk, shape, tool, _options) {
|
|
6606
|
-
if (_options &&
|
|
6616
|
+
if (_options && hasIgnoredBooleanOptions(_options)) warnOnce("boolean-options", "BooleanOptions (optimisation, strategy, fuzzyValue) not supported; ignored.");
|
|
6607
6617
|
if (isEmptyCompound(bk, shape)) return emptyCompound(bk);
|
|
6608
6618
|
if (isEmptyCompound(bk, tool)) return shape;
|
|
6609
6619
|
const baseId = unwrapSolidOrThrow(shape, "cut");
|
|
@@ -6612,7 +6622,7 @@ function cut(bk, shape, tool, _options) {
|
|
|
6612
6622
|
const toolSolidIds = toArray(bk.getCompoundSolids(toolHandle.id));
|
|
6613
6623
|
let currentId = baseId;
|
|
6614
6624
|
for (const toolSolidId of toolSolidIds) try {
|
|
6615
|
-
currentId = bk
|
|
6625
|
+
currentId = kernelBoolean(bk, "cut", currentId, toolSolidId, _options);
|
|
6616
6626
|
} catch (e) {
|
|
6617
6627
|
if (isEmptyBooleanError(e)) return emptyCompound(bk);
|
|
6618
6628
|
throw e;
|
|
@@ -6620,17 +6630,17 @@ function cut(bk, shape, tool, _options) {
|
|
|
6620
6630
|
return solidHandle(currentId);
|
|
6621
6631
|
}
|
|
6622
6632
|
try {
|
|
6623
|
-
return solidHandle(bk
|
|
6633
|
+
return solidHandle(kernelBoolean(bk, "cut", baseId, unwrapSolidOrThrow(tool, "cut"), _options));
|
|
6624
6634
|
} catch (e) {
|
|
6625
6635
|
if (isEmptyBooleanError(e)) return emptyCompound(bk);
|
|
6626
6636
|
throw e;
|
|
6627
6637
|
}
|
|
6628
6638
|
}
|
|
6629
6639
|
function intersect(bk, shape, tool, _options) {
|
|
6630
|
-
if (_options &&
|
|
6640
|
+
if (_options && hasIgnoredBooleanOptions(_options)) warnOnce("boolean-options", "BooleanOptions (optimisation, strategy, fuzzyValue) not supported; ignored.");
|
|
6631
6641
|
if (isEmptyCompound(bk, shape) || isEmptyCompound(bk, tool)) return emptyCompound(bk);
|
|
6632
6642
|
try {
|
|
6633
|
-
return solidHandle(bk
|
|
6643
|
+
return solidHandle(kernelBoolean(bk, "intersect", unwrapSolidOrThrow(shape, "intersect"), unwrapSolidOrThrow(tool, "intersect"), _options));
|
|
6634
6644
|
} catch (e) {
|
|
6635
6645
|
if (isEmptyBooleanError(e)) return emptyCompound(bk);
|
|
6636
6646
|
throw e;
|
|
@@ -5637,9 +5637,9 @@ function warnOnce(key, message) {
|
|
|
5637
5637
|
_warned.add(key);
|
|
5638
5638
|
console.warn(`brepkit: ${message}`);
|
|
5639
5639
|
}
|
|
5640
|
-
/** Check if a BooleanOptions object
|
|
5641
|
-
function
|
|
5642
|
-
return opts.optimisation !== void 0 || opts.
|
|
5640
|
+
/** Check if a BooleanOptions object sets an option brepkit still ignores. */
|
|
5641
|
+
function hasIgnoredBooleanOptions(opts) {
|
|
5642
|
+
return opts.optimisation !== void 0 || opts.strategy !== void 0 || opts.fuzzyValue !== void 0;
|
|
5643
5643
|
}
|
|
5644
5644
|
/** Cast opaque Curve2dHandle to internal Curve2dObj. */
|
|
5645
5645
|
function c2d(h) {
|
|
@@ -6592,8 +6592,18 @@ function isEmptyCompound(bk, h) {
|
|
|
6592
6592
|
function emptyCompound(bk) {
|
|
6593
6593
|
return compoundHandle(bk.makeCompound([]));
|
|
6594
6594
|
}
|
|
6595
|
+
/** Kernel boolean honoring `simplify` when the kernel supports it (brepkit-wasm >= 3.2). */
|
|
6596
|
+
function kernelBoolean(bk, op, a, b, options) {
|
|
6597
|
+
if (options?.simplify) {
|
|
6598
|
+
if (op === "fuse" && typeof bk.fuseWithOptions === "function") return bk.fuseWithOptions(a, b, true);
|
|
6599
|
+
if (op === "cut" && typeof bk.cutWithOptions === "function") return bk.cutWithOptions(a, b, true);
|
|
6600
|
+
if (op === "intersect" && typeof bk.intersectWithOptions === "function") return bk.intersectWithOptions(a, b, true);
|
|
6601
|
+
warnOnce("boolean-simplify", "BooleanOptions.simplify needs brepkit-wasm >= 3.2; ignored on this kernel.");
|
|
6602
|
+
}
|
|
6603
|
+
return bk[op](a, b);
|
|
6604
|
+
}
|
|
6595
6605
|
function fuse(bk, shape, tool, _options) {
|
|
6596
|
-
if (_options &&
|
|
6606
|
+
if (_options && hasIgnoredBooleanOptions(_options)) warnOnce("boolean-options", "BooleanOptions (optimisation, strategy, fuzzyValue) not supported; ignored.");
|
|
6597
6607
|
if (isEmptyCompound(bk, shape)) return tool;
|
|
6598
6608
|
if (isEmptyCompound(bk, tool)) return shape;
|
|
6599
6609
|
const baseId = unwrapSolidOrThrow(shape, "fuse");
|
|
@@ -6601,13 +6611,13 @@ function fuse(bk, shape, tool, _options) {
|
|
|
6601
6611
|
if (toolHandle.type === "compound") {
|
|
6602
6612
|
const toolSolidIds = toArray(bk.getCompoundSolids(toolHandle.id));
|
|
6603
6613
|
let currentId = baseId;
|
|
6604
|
-
for (const toolSolidId of toolSolidIds) currentId = bk
|
|
6614
|
+
for (const toolSolidId of toolSolidIds) currentId = kernelBoolean(bk, "fuse", currentId, toolSolidId, _options);
|
|
6605
6615
|
return solidHandle(currentId);
|
|
6606
6616
|
}
|
|
6607
|
-
return solidHandle(bk
|
|
6617
|
+
return solidHandle(kernelBoolean(bk, "fuse", baseId, unwrapSolidOrThrow(tool, "fuse"), _options));
|
|
6608
6618
|
}
|
|
6609
6619
|
function cut(bk, shape, tool, _options) {
|
|
6610
|
-
if (_options &&
|
|
6620
|
+
if (_options && hasIgnoredBooleanOptions(_options)) warnOnce("boolean-options", "BooleanOptions (optimisation, strategy, fuzzyValue) not supported; ignored.");
|
|
6611
6621
|
if (isEmptyCompound(bk, shape)) return emptyCompound(bk);
|
|
6612
6622
|
if (isEmptyCompound(bk, tool)) return shape;
|
|
6613
6623
|
const baseId = unwrapSolidOrThrow(shape, "cut");
|
|
@@ -6616,7 +6626,7 @@ function cut(bk, shape, tool, _options) {
|
|
|
6616
6626
|
const toolSolidIds = toArray(bk.getCompoundSolids(toolHandle.id));
|
|
6617
6627
|
let currentId = baseId;
|
|
6618
6628
|
for (const toolSolidId of toolSolidIds) try {
|
|
6619
|
-
currentId = bk
|
|
6629
|
+
currentId = kernelBoolean(bk, "cut", currentId, toolSolidId, _options);
|
|
6620
6630
|
} catch (e) {
|
|
6621
6631
|
if (isEmptyBooleanError(e)) return emptyCompound(bk);
|
|
6622
6632
|
throw e;
|
|
@@ -6624,17 +6634,17 @@ function cut(bk, shape, tool, _options) {
|
|
|
6624
6634
|
return solidHandle(currentId);
|
|
6625
6635
|
}
|
|
6626
6636
|
try {
|
|
6627
|
-
return solidHandle(bk
|
|
6637
|
+
return solidHandle(kernelBoolean(bk, "cut", baseId, unwrapSolidOrThrow(tool, "cut"), _options));
|
|
6628
6638
|
} catch (e) {
|
|
6629
6639
|
if (isEmptyBooleanError(e)) return emptyCompound(bk);
|
|
6630
6640
|
throw e;
|
|
6631
6641
|
}
|
|
6632
6642
|
}
|
|
6633
6643
|
function intersect(bk, shape, tool, _options) {
|
|
6634
|
-
if (_options &&
|
|
6644
|
+
if (_options && hasIgnoredBooleanOptions(_options)) warnOnce("boolean-options", "BooleanOptions (optimisation, strategy, fuzzyValue) not supported; ignored.");
|
|
6635
6645
|
if (isEmptyCompound(bk, shape) || isEmptyCompound(bk, tool)) return emptyCompound(bk);
|
|
6636
6646
|
try {
|
|
6637
|
-
return solidHandle(bk
|
|
6647
|
+
return solidHandle(kernelBoolean(bk, "intersect", unwrapSolidOrThrow(shape, "intersect"), unwrapSolidOrThrow(tool, "intersect"), _options));
|
|
6638
6648
|
} catch (e) {
|
|
6639
6649
|
if (isEmptyBooleanError(e)) return emptyCompound(bk);
|
|
6640
6650
|
throw e;
|
package/dist/sketching.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_blueprintSketcher = require("./blueprintSketcher-
|
|
3
|
-
const require_drawFns = require("./drawFns-
|
|
4
|
-
const require_textBlueprints = require("./textBlueprints-
|
|
2
|
+
const require_blueprintSketcher = require("./blueprintSketcher-COszlmz7.cjs");
|
|
3
|
+
const require_drawFns = require("./drawFns-0Tqeawy9.cjs");
|
|
4
|
+
const require_textBlueprints = require("./textBlueprints-DHPvkCU_.cjs");
|
|
5
5
|
//#region src/sketching.ts
|
|
6
6
|
/**
|
|
7
7
|
* brepjs/sketching — Sketcher, Drawing, and sketch-to-shape operations.
|
package/dist/sketching.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as BaseSketcher2d, t as BlueprintSketcher } from "./blueprintSketcher-
|
|
2
|
-
import { A as sketchEllipse, C as DrawingPen, D as makeBaseBox, E as deserializeDrawing, F as sketchRectangle, I as sketchRoundedRectangle, L as FaceSketcher, M as sketchHelix, N as sketchParametricFunction, O as polysideInnerRadius, P as sketchPolysides, R as Sketcher, S as drawText, T as Drawing, _ as drawPolysides, a as drawingIntersect, b as drawSingleCircle, c as rotateDrawing, d as drawFaceOutline, f as drawProjection, g as drawPointsInterpolation, h as drawParametricFunction, i as drawingFuse, j as sketchFaceOffset, k as sketchCircle, l as scaleDrawing, m as drawEllipse, n as drawingCut, o as drawingToSketchOnPlane, p as drawCircle, r as drawingFillet, s as mirrorDrawing, t as drawingChamfer, u as translateDrawing, v as drawRectangle, w as draw, x as drawSingleEllipse, y as drawRoundedRectangle } from "./drawFns-
|
|
3
|
-
import { a as Sketch, c as compoundSketchLoft, d as sketchFace, f as sketchLoft, h as sketchWires, i as Sketches, l as compoundSketchRevolve, m as sketchSweep, o as compoundSketchExtrude, p as sketchRevolve, s as compoundSketchFace, u as sketchExtrude, v as CompoundSketch } from "./textBlueprints-
|
|
1
|
+
import { n as BaseSketcher2d, t as BlueprintSketcher } from "./blueprintSketcher-CcoIcgyK.js";
|
|
2
|
+
import { A as sketchEllipse, C as DrawingPen, D as makeBaseBox, E as deserializeDrawing, F as sketchRectangle, I as sketchRoundedRectangle, L as FaceSketcher, M as sketchHelix, N as sketchParametricFunction, O as polysideInnerRadius, P as sketchPolysides, R as Sketcher, S as drawText, T as Drawing, _ as drawPolysides, a as drawingIntersect, b as drawSingleCircle, c as rotateDrawing, d as drawFaceOutline, f as drawProjection, g as drawPointsInterpolation, h as drawParametricFunction, i as drawingFuse, j as sketchFaceOffset, k as sketchCircle, l as scaleDrawing, m as drawEllipse, n as drawingCut, o as drawingToSketchOnPlane, p as drawCircle, r as drawingFillet, s as mirrorDrawing, t as drawingChamfer, u as translateDrawing, v as drawRectangle, w as draw, x as drawSingleEllipse, y as drawRoundedRectangle } from "./drawFns-Du7ocHOi.js";
|
|
3
|
+
import { a as Sketch, c as compoundSketchLoft, d as sketchFace, f as sketchLoft, h as sketchWires, i as Sketches, l as compoundSketchRevolve, m as sketchSweep, o as compoundSketchExtrude, p as sketchRevolve, s as compoundSketchFace, u as sketchExtrude, v as CompoundSketch } from "./textBlueprints-D-bu8xo5.js";
|
|
4
4
|
//#region src/sketching.ts
|
|
5
5
|
/**
|
|
6
6
|
* brepjs/sketching — Sketcher, Drawing, and sketch-to-shape operations.
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-ZcbG2_Lb.cjs");
|
|
2
2
|
const require_errors = require("./errors-RHkKO5bZ.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-H8KgyUg1.cjs");
|
|
4
4
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
5
5
|
const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
|
|
6
6
|
const require_planeOps = require("./planeOps-VlFxtvzY.cjs");
|
|
7
|
-
const require_faceFns = require("./faceFns-
|
|
8
|
-
const require_originTrackingFns = require("./originTrackingFns-
|
|
7
|
+
const require_faceFns = require("./faceFns-CxTf97z-.cjs");
|
|
8
|
+
const require_originTrackingFns = require("./originTrackingFns-BzsWQj_i.cjs");
|
|
9
9
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
10
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
10
|
+
const require_surfaceBuilders = require("./surfaceBuilders-50udezKU.cjs");
|
|
11
11
|
//#region src/topology/metadata/faceTagFns.ts
|
|
12
12
|
var shapeTagStore = /* @__PURE__ */ new WeakMap();
|
|
13
13
|
var tagMetadataStore = /* @__PURE__ */ new WeakMap();
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { C as isSolid, E as getShapeKind, K as getKernel, S as isShell, W as _usingCtx, d as createSolid, f as createVertex, h as disposeResultShape, i as castShape, m as disposeDowncastSource, n as castResultShape, s as createCompound, x as isShape3D } from "./shapeTypes-
|
|
1
|
+
import { C as isSolid, E as getShapeKind, K as getKernel, S as isShell, W as _usingCtx, d as createSolid, f as createVertex, h as disposeResultShape, i as castShape, m as disposeDowncastSource, n as castResultShape, s as createCompound, x as isShape3D } from "./shapeTypes-BQoWcRwS.js";
|
|
2
2
|
import { E as ok, P as unwrap, b as isErr, d as validationError, g as err, i as kernelError, l as typeCastError, m as andThen, t as BrepErrorCode } from "./errors-MHLiNE-C.js";
|
|
3
|
-
import { S as subShapeHashes, c as getFaces, f as getVertices, p as getWires, s as getEdges } from "./topologyQueryFns-
|
|
3
|
+
import { S as subShapeHashes, c as getFaces, f as getVertices, p as getWires, s as getEdges } from "./topologyQueryFns-qvBQ93KV.js";
|
|
4
4
|
import { n as HASH_CODE_MAX } from "./constants-ITRzCnCp.js";
|
|
5
5
|
import { a as vecDot, g as vecSub, h as vecScale, t as vecAdd } from "./vecOps-SKPRvPH-.js";
|
|
6
6
|
import { o as resolvePlane } from "./planeOps-CQahLrCx.js";
|
|
7
|
-
import { _ as cast, y as downcast } from "./faceFns-
|
|
8
|
-
import { n as propagateOriginsByHash, r as propagateOriginsFromEvolution, t as getFaceOrigins } from "./originTrackingFns-
|
|
7
|
+
import { _ as cast, y as downcast } from "./faceFns-Dhz3bkzQ.js";
|
|
8
|
+
import { n as propagateOriginsByHash, r as propagateOriginsFromEvolution, t as getFaceOrigins } from "./originTrackingFns-B_hMNb6j.js";
|
|
9
9
|
import { n as getAtOrThrow, t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
10
|
-
import { r as makeFace } from "./surfaceBuilders-
|
|
10
|
+
import { r as makeFace } from "./surfaceBuilders-BGI_nRQr.js";
|
|
11
11
|
//#region src/topology/metadata/faceTagFns.ts
|
|
12
12
|
var shapeTagStore = /* @__PURE__ */ new WeakMap();
|
|
13
13
|
var tagMetadataStore = /* @__PURE__ */ new WeakMap();
|