brepjs 20.12.7 → 20.12.8
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-mMmTBUBY.cjs → adjacencyFns-BfgFo-Rh.cjs} +3 -3
- package/dist/{adjacencyFns-hMihivxC.js → adjacencyFns-Bl109A3Z.js} +3 -3
- package/dist/{blueprint-17RUHsoP.cjs → blueprint-DTDSztfd.cjs} +5 -5
- package/dist/{blueprint-BS50D3J_.js → blueprint-RqemOtg5.js} +5 -5
- package/dist/{blueprintFns-zy5lo2IF.js → blueprintFns-B9_PhTr8.js} +2 -2
- package/dist/{blueprintFns-Dw5_4_Bk.cjs → blueprintFns-C7E5R89N.cjs} +2 -2
- package/dist/{blueprintSketcher-C1WCI6E0.js → blueprintSketcher-B15522Kr.js} +3 -3
- package/dist/{blueprintSketcher-BG--DxWB.cjs → blueprintSketcher-Brj4lXjj.cjs} +3 -3
- package/dist/{boolean2D-7SQ3B0pC.cjs → boolean2D-DZ8aJbI-.cjs} +4 -4
- package/dist/{boolean2D-CsdyfjFE.js → boolean2D-_eiIiNw1.js} +4 -4
- package/dist/{solidBuilders-DdG4NPHM.cjs → booleanFns-D5nQ1nWS.cjs} +11 -217
- package/dist/{solidBuilders-Bmr59cGp.js → booleanFns-cNfXGqMX.js} +10 -156
- package/dist/brepjs.cjs +325 -168
- package/dist/brepjs.js +282 -125
- package/dist/{cameraFns-BAtzhCYM.cjs → cameraFns-6Er2lhp5.cjs} +3 -3
- package/dist/{cameraFns-BVWyAscu.js → cameraFns-YhB7A_Zc.js} +3 -3
- package/dist/core.cjs +2 -2
- package/dist/core.js +2 -2
- package/dist/{cornerFinder-e4Wc7_yp.cjs → cornerFinder-D9Wx3DWu.cjs} +1 -1
- package/dist/{cornerFinder-Dv_2rmaY.js → cornerFinder-G1WkSkVl.js} +1 -1
- package/dist/{curveFns-BAM7QHrP.cjs → curveFns-B5_N-gMj.cjs} +1 -1
- package/dist/{curveFns-CEI-rouh.js → curveFns-C4CqthJp.js} +1 -1
- package/dist/{drawFns-Cl1i8B_B.js → drawFns-DU5fewKl.js} +12 -12
- package/dist/{drawFns-d-RvC6u6.cjs → drawFns-UPbO2heB.cjs} +12 -12
- package/dist/{faceFns-Q87HCJrp.js → faceFns-BgRNa5vx.js} +2 -2
- package/dist/{faceFns-C-2ttg8X.cjs → faceFns-C4NOGZBg.cjs} +2 -2
- package/dist/{healingFns-Cm4NkKD8.js → healingFns-BzOo0yyz.js} +5 -5
- package/dist/{healingFns-DZkO5okn.cjs → healingFns-i5gV3BMG.cjs} +29 -29
- package/dist/{helpers-BdGGaLhF.cjs → helpers-DJQeDf_5.cjs} +6 -6
- package/dist/{helpers-DpGcM2qZ.js → helpers-DPHQt2Kr.js} +6 -6
- package/dist/{importFns-DLiP26NW.cjs → importFns-BiRpt227.cjs} +319 -14
- package/dist/{importFns-Bp-p0jiP.js → importFns-CwrJsNvg.js} +314 -15
- package/dist/io/igesSupport.d.ts +6 -0
- package/dist/io/importFns.d.ts +15 -5
- package/dist/io/ioUtils.d.ts +15 -3
- package/dist/io/meshNesting.d.ts +11 -0
- package/dist/io/threemfImportFns.d.ts +6 -3
- package/dist/io.cjs +2 -2
- package/dist/io.js +2 -2
- package/dist/kernel/occtWasm/occtWasmAdapter.cjs +1 -1
- package/dist/kernel/occtWasm/occtWasmAdapter.js +1 -1
- package/dist/kernel/occtWasm/occtWasmTypes.d.ts +4 -2
- package/dist/{loftFns-DGV1z2NJ.cjs → loftFns-DgkK4Kj_.cjs} +1 -1
- package/dist/{loftFns-DQ7Z29n3.js → loftFns-lwzTh1fI.js} +1 -1
- package/dist/{measureFns-BdSjw5fr.cjs → measureFns-D_RRjCZg.cjs} +3 -3
- package/dist/{measureFns-BrdCH4cH.js → measureFns-Q3K25IfN.js} +3 -3
- package/dist/measurement.cjs +2 -2
- package/dist/measurement.js +2 -2
- package/dist/{meshFns-UE8tByyw.js → meshFns-BGoJU6_P.js} +20 -6
- package/dist/{meshFns-BeubBqEI.cjs → meshFns-Djbb4PUC.cjs} +25 -5
- package/dist/{occtWasmAdapter-DA7oMgcQ.js → occtWasmAdapter-BCCwaYkq.js} +7 -5
- package/dist/{occtWasmAdapter-D3qerQTq.cjs → occtWasmAdapter-UcYZRi-w.cjs} +7 -5
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/{primitiveFns-CLGVLwG8.cjs → primitiveFns-CfSnex9P.cjs} +19 -18
- package/dist/{primitiveFns-3-gs-FUX.js → primitiveFns-D-aYcwt2.js} +5 -4
- package/dist/{principalBoxFns-RMZItjfR.js → principalBoxFns-Dcp9gg5e.js} +3 -3
- package/dist/{principalBoxFns-CiXzjOkr.cjs → principalBoxFns-IY8FfPVj.cjs} +3 -3
- 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-kJg2iCad.js → refResolveFns-BPge7T5w.js} +6 -6
- package/dist/{refResolveFns-DNX0bCrP.cjs → refResolveFns-gZQ1o5XK.cjs} +6 -6
- package/dist/{shapeFns-SgIrOjN4.cjs → shapeFns-Bs92VrZh.cjs} +2 -2
- package/dist/{shapeFns-CZ6VF1yd.js → shapeFns-TWdr4Dv4.js} +2 -2
- package/dist/shapeRef.cjs +1 -1
- package/dist/shapeRef.js +1 -1
- package/dist/{shapeTypes-BNGu103j.js → shapeTypes-CIH-8d_a.js} +1 -1
- package/dist/{shapeTypes-MUEH4XuH.cjs → shapeTypes-DmThK_oa.cjs} +1 -1
- package/dist/sketching.cjs +3 -3
- package/dist/sketching.js +3 -3
- package/dist/{originTrackingFns-rEKOAP65.cjs → solidBuilders-DGskMugU.cjs} +209 -2
- package/dist/{originTrackingFns-c2qgRZ_9.js → solidBuilders-q_hwYsdo.js} +150 -3
- package/dist/{surfaceBuilders-DI376ai0.js → surfaceBuilders-DXo4N7wQ.js} +3 -3
- package/dist/{surfaceBuilders-DOmDVuMs.cjs → surfaceBuilders-DeSLKg73.cjs} +3 -3
- package/dist/text.cjs +2 -2
- package/dist/text.js +2 -2
- package/dist/{textBlueprints-CE0oxB43.js → textBlueprints-BYWZho_c.js} +8 -7
- package/dist/{textBlueprints-B7Vhr0xu.cjs → textBlueprints-Dz6wNgve.cjs} +9 -8
- package/dist/{textMetrics-C6_kSht6.cjs → textMetrics-bKoFTj3m.cjs} +1 -1
- package/dist/{textMetrics-_VGqdewQ.js → textMetrics-k_rGqib2.js} +1 -1
- package/dist/{threadFns-CHdY-4Cz.js → threadFns-BeB8s0tA.js} +7 -7
- package/dist/{threadFns-1H60LrFX.cjs → threadFns-CoGAFHHt.cjs} +9 -9
- package/dist/topology/meshFns.d.ts +3 -0
- package/dist/topology.cjs +11 -11
- package/dist/topology.js +9 -9
- package/dist/{topologyQueryFns-C_fXO6xL.cjs → topologyQueryFns-CXbCFaU2.cjs} +1 -1
- package/dist/{topologyQueryFns-CltEv7Pi.js → topologyQueryFns-Cp0yekBh.js} +1 -1
- package/dist/{validityTypes-GanLrmvY.js → validityTypes-DlrWkrSR.js} +1 -1
- package/dist/{validityTypes-CGX2ES81.cjs → validityTypes-m6eLRTYE.cjs} +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-DmThK_oa.cjs");
|
|
2
|
+
const require_occtWasmAdapter = require("./occtWasmAdapter-UcYZRi-w.cjs");
|
|
2
3
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
4
|
-
const
|
|
4
|
+
const require_topologyQueryFns = require("./topologyQueryFns-CXbCFaU2.cjs");
|
|
5
|
+
const require_solidBuilders = require("./solidBuilders-DGskMugU.cjs");
|
|
5
6
|
// src/topology/meshCache.ts
|
|
6
7
|
/**
|
|
7
8
|
* Build a parameter key for the inner cache map (excludes shape identity).
|
|
@@ -107,6 +108,16 @@ function createMeshCache() {
|
|
|
107
108
|
}
|
|
108
109
|
};
|
|
109
110
|
}
|
|
111
|
+
// src/io/igesSupport.ts
|
|
112
|
+
/**
|
|
113
|
+
* The capability error for an IGES call on a kernel built without an IGES
|
|
114
|
+
* translator (occt-wasm), or `null` when `cause` is any other failure.
|
|
115
|
+
*/
|
|
116
|
+
function igesUnsupportedError(operation, cause) {
|
|
117
|
+
if (!require_occtWasmAdapter.isUnsupportedKernelOperationError(cause)) return null;
|
|
118
|
+
const kernel = require_shapeTypes.getKernel().kernelId;
|
|
119
|
+
return require_errors.unsupportedError(require_errors.BrepErrorCode.UNSUPPORTED_CAPABILITY, `${operation}: the ${kernel} kernel has no IGES support`, cause, { kernel }, "Exchange the model as STEP (importSTEP / exportSTEP) instead");
|
|
120
|
+
}
|
|
110
121
|
// src/topology/meshFns.ts
|
|
111
122
|
/**
|
|
112
123
|
* Meshing and export functions — functional replacements for Shape mesh/export methods.
|
|
@@ -150,7 +161,7 @@ function mesh(shape, opts = {}) {
|
|
|
150
161
|
includeUVs,
|
|
151
162
|
...signal ? { signal } : {}
|
|
152
163
|
});
|
|
153
|
-
const origins =
|
|
164
|
+
const origins = require_solidBuilders.getFaceOrigins(shape);
|
|
154
165
|
const mesh = {
|
|
155
166
|
vertices: result.vertices,
|
|
156
167
|
normals: result.normals,
|
|
@@ -297,13 +308,16 @@ function exportSTL(shape, opts = {}) {
|
|
|
297
308
|
* Export a shape as an IGES file Blob.
|
|
298
309
|
*
|
|
299
310
|
* @returns Ok with a Blob (MIME type `application/iges`), or Err on failure.
|
|
311
|
+
*
|
|
312
|
+
* @remarks The default occt-wasm kernel is built without an IGES translator, so
|
|
313
|
+
* there this returns an `UNSUPPORTED_CAPABILITY` error; export STEP instead.
|
|
300
314
|
*/
|
|
301
315
|
function exportIGES(shape) {
|
|
302
316
|
try {
|
|
303
317
|
const igesString = require_shapeTypes.getKernel().exportIGES([shape.wrapped]);
|
|
304
318
|
return require_errors.ok(new Blob([igesString], { type: "application/iges" }));
|
|
305
319
|
} catch (e) {
|
|
306
|
-
return require_errors.err(require_errors.ioError("IGES_EXPORT_FAILED", "Failed to write IGES file", e));
|
|
320
|
+
return require_errors.err(igesUnsupportedError("exportIGES", e) ?? require_errors.ioError("IGES_EXPORT_FAILED", "Failed to write IGES file", e));
|
|
307
321
|
}
|
|
308
322
|
}
|
|
309
323
|
/**
|
|
@@ -472,6 +486,12 @@ Object.defineProperty(exports, "exportSTL", {
|
|
|
472
486
|
return exportSTL;
|
|
473
487
|
}
|
|
474
488
|
});
|
|
489
|
+
Object.defineProperty(exports, "igesUnsupportedError", {
|
|
490
|
+
enumerable: true,
|
|
491
|
+
get: function() {
|
|
492
|
+
return igesUnsupportedError;
|
|
493
|
+
}
|
|
494
|
+
});
|
|
475
495
|
Object.defineProperty(exports, "mesh", {
|
|
476
496
|
enumerable: true,
|
|
477
497
|
get: function() {
|
|
@@ -4508,13 +4508,15 @@ function importSTL(k, Module, data) {
|
|
|
4508
4508
|
return wrapResult(k, k.importStl(""));
|
|
4509
4509
|
}
|
|
4510
4510
|
function exportIGES(k, makeCompound, shapes) {
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
return
|
|
4511
|
+
const exportIges = k.exportIges?.bind(k);
|
|
4512
|
+
if (!exportIges) throw new UnsupportedKernelOperationError("occt-wasm: exportIGES is unsupported");
|
|
4513
|
+
if (shapes.length === 1) return exportIges(unwrap(shapes[0]));
|
|
4514
|
+
return exportIges(unwrap(makeCompound(shapes)));
|
|
4514
4515
|
}
|
|
4515
4516
|
function importIGES(k, data) {
|
|
4516
|
-
const
|
|
4517
|
-
|
|
4517
|
+
const importIges = k.importIges?.bind(k);
|
|
4518
|
+
if (!importIges) throw new UnsupportedKernelOperationError("occt-wasm: importIGES is unsupported");
|
|
4519
|
+
return [wrapResult(k, importIges(typeof data === "string" ? data : new TextDecoder().decode(data)))];
|
|
4518
4520
|
}
|
|
4519
4521
|
function exportSTEPAssembly(k, Module, parts, _options) {
|
|
4520
4522
|
if (parts.length === 0) return "";
|
|
@@ -4508,13 +4508,15 @@ function importSTL(k, Module, data) {
|
|
|
4508
4508
|
return wrapResult(k, k.importStl(""));
|
|
4509
4509
|
}
|
|
4510
4510
|
function exportIGES(k, makeCompound, shapes) {
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
return
|
|
4511
|
+
const exportIges = k.exportIges?.bind(k);
|
|
4512
|
+
if (!exportIges) throw new UnsupportedKernelOperationError("occt-wasm: exportIGES is unsupported");
|
|
4513
|
+
if (shapes.length === 1) return exportIges(unwrap(shapes[0]));
|
|
4514
|
+
return exportIges(unwrap(makeCompound(shapes)));
|
|
4514
4515
|
}
|
|
4515
4516
|
function importIGES(k, data) {
|
|
4516
|
-
const
|
|
4517
|
-
|
|
4517
|
+
const importIges = k.importIges?.bind(k);
|
|
4518
|
+
if (!importIges) throw new UnsupportedKernelOperationError("occt-wasm: importIGES is unsupported");
|
|
4519
|
+
return [wrapResult(k, importIges(typeof data === "string" ? data : new TextDecoder().decode(data)))];
|
|
4518
4520
|
}
|
|
4519
4521
|
function exportSTEPAssembly(k, Module, parts, _options) {
|
|
4520
4522
|
if (parts.length === 0) return "";
|
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-CoGAFHHt.cjs");
|
|
3
|
+
const require_loftFns = require("./loftFns-DgkK4Kj_.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-BeB8s0tA.js";
|
|
2
|
+
import { c as twistExtrude, o as supportExtrude, r as complexExtrude, s as sweep } from "./loftFns-lwzTh1fI.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,10 +1,11 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-DmThK_oa.cjs");
|
|
2
2
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
3
|
-
const require_validityTypes = require("./validityTypes-
|
|
3
|
+
const require_validityTypes = require("./validityTypes-m6eLRTYE.cjs");
|
|
4
4
|
const require_constants = require("./constants-oee0S_x6.cjs");
|
|
5
5
|
const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
|
|
6
|
-
const require_solidBuilders = require("./solidBuilders-
|
|
7
|
-
const
|
|
6
|
+
const require_solidBuilders = require("./solidBuilders-DGskMugU.cjs");
|
|
7
|
+
const require_booleanFns = require("./booleanFns-D5nQ1nWS.cjs");
|
|
8
|
+
const require_surfaceBuilders = require("./surfaceBuilders-DeSLKg73.cjs");
|
|
8
9
|
// src/topology/transformFns.ts
|
|
9
10
|
/**
|
|
10
11
|
* Immutable shape transforms — translate, rotate, scale, mirror, applyMatrix.
|
|
@@ -12,10 +13,10 @@ const require_surfaceBuilders = require("./surfaceBuilders-DOmDVuMs.cjs");
|
|
|
12
13
|
*/
|
|
13
14
|
/** Translate a shape by a vector. Returns a new shape. */
|
|
14
15
|
function translate(shape, v) {
|
|
15
|
-
const inputFaceHashes =
|
|
16
|
+
const inputFaceHashes = require_booleanFns.collectInputFaceHashes([shape]);
|
|
16
17
|
const { shape: resultShape, evolution } = require_shapeTypes.getKernel().translateWithHistory(shape.wrapped, v[0], v[1], v[2], inputFaceHashes, require_constants.HASH_CODE_MAX);
|
|
17
18
|
const result = require_shapeTypes.castResultShape(resultShape);
|
|
18
|
-
|
|
19
|
+
require_booleanFns.propagateAllMetadata(evolution, [shape], result);
|
|
19
20
|
return result;
|
|
20
21
|
}
|
|
21
22
|
/** Rotate a shape around an axis. Angle is in degrees. Returns a new shape. */
|
|
@@ -28,10 +29,10 @@ function rotate(shape, angle, position = [
|
|
|
28
29
|
0,
|
|
29
30
|
1
|
|
30
31
|
]) {
|
|
31
|
-
const inputFaceHashes =
|
|
32
|
+
const inputFaceHashes = require_booleanFns.collectInputFaceHashes([shape]);
|
|
32
33
|
const { shape: resultShape, evolution } = require_shapeTypes.getKernel().rotateWithHistory(shape.wrapped, angle * require_constants.DEG2RAD, inputFaceHashes, require_constants.HASH_CODE_MAX, direction, position);
|
|
33
34
|
const result = require_shapeTypes.castResultShape(resultShape);
|
|
34
|
-
|
|
35
|
+
require_booleanFns.propagateAllMetadata(evolution, [shape], result);
|
|
35
36
|
return result;
|
|
36
37
|
}
|
|
37
38
|
/** Mirror a shape through a plane defined by origin and normal. Returns a new shape. */
|
|
@@ -44,10 +45,10 @@ function mirror(shape, planeNormal = [
|
|
|
44
45
|
0,
|
|
45
46
|
0
|
|
46
47
|
]) {
|
|
47
|
-
const inputFaceHashes =
|
|
48
|
+
const inputFaceHashes = require_booleanFns.collectInputFaceHashes([shape]);
|
|
48
49
|
const { shape: resultShape, evolution } = require_shapeTypes.getKernel().mirrorWithHistory(shape.wrapped, planeOrigin, planeNormal, inputFaceHashes, require_constants.HASH_CODE_MAX);
|
|
49
50
|
const result = require_shapeTypes.castResultShape(resultShape);
|
|
50
|
-
|
|
51
|
+
require_booleanFns.propagateAllMetadata(evolution, [shape], result);
|
|
51
52
|
return result;
|
|
52
53
|
}
|
|
53
54
|
/** Scale a shape uniformly. Returns a new shape. */
|
|
@@ -56,10 +57,10 @@ function scale(shape, factor, center = [
|
|
|
56
57
|
0,
|
|
57
58
|
0
|
|
58
59
|
]) {
|
|
59
|
-
const inputFaceHashes =
|
|
60
|
+
const inputFaceHashes = require_booleanFns.collectInputFaceHashes([shape]);
|
|
60
61
|
const { shape: resultShape, evolution } = require_shapeTypes.getKernel().scaleWithHistory(shape.wrapped, center, factor, inputFaceHashes, require_constants.HASH_CODE_MAX);
|
|
61
62
|
const result = require_shapeTypes.castResultShape(resultShape);
|
|
62
|
-
|
|
63
|
+
require_booleanFns.propagateAllMetadata(evolution, [shape], result);
|
|
63
64
|
return result;
|
|
64
65
|
}
|
|
65
66
|
/** Resize a shape to exact target dimensions with optional auto-proportional scaling. */
|
|
@@ -167,16 +168,16 @@ function applyMatrix(shape, matrix) {
|
|
|
167
168
|
const d = det3x3(linear);
|
|
168
169
|
if (Math.abs(d) < 1e-12) return require_errors.err(require_errors.validationError(require_errors.BrepErrorCode.VALIDATION_FAILED, "applyMatrix: singular matrix (determinant ≈ 0). Cannot apply a non-invertible transform."));
|
|
169
170
|
if (isOrthogonalMatrix(linear)) {
|
|
170
|
-
const inputFaceHashes =
|
|
171
|
+
const inputFaceHashes = require_booleanFns.collectInputFaceHashes([shape]);
|
|
171
172
|
const { shape: resultShape, evolution } = require_shapeTypes.getKernel().generalTransformWithHistory(shape.wrapped, linear, translation, true, inputFaceHashes, require_constants.HASH_CODE_MAX);
|
|
172
173
|
const result = require_shapeTypes.castResultShape(resultShape);
|
|
173
|
-
|
|
174
|
+
require_booleanFns.propagateAllMetadata(evolution, [shape], result);
|
|
174
175
|
return require_errors.ok(result);
|
|
175
176
|
}
|
|
176
177
|
/* v8 ignore start -- untestable until WASM is rebuilt with BRepBuilderAPI_GTransform */
|
|
177
178
|
const resultShape = require_shapeTypes.getKernel().generalTransformNonOrthogonal(shape.wrapped, linear, translation);
|
|
178
179
|
const result = require_shapeTypes.castResultShape(resultShape);
|
|
179
|
-
|
|
180
|
+
require_booleanFns.propagateMetadataByHash([shape], result);
|
|
180
181
|
return require_errors.ok(result);
|
|
181
182
|
/* v8 ignore stop */
|
|
182
183
|
}
|
|
@@ -244,7 +245,7 @@ function locate(shape, placement) {
|
|
|
244
245
|
} finally {
|
|
245
246
|
_usingCtx$2.d();
|
|
246
247
|
}
|
|
247
|
-
if (
|
|
248
|
+
if (require_booleanFns.hasAnyMetadata(shape)) require_booleanFns.propagateMetadataThroughRelocation(shape, moved);
|
|
248
249
|
return moved;
|
|
249
250
|
} catch (cause) {
|
|
250
251
|
if (moved !== void 0) try {
|
|
@@ -264,10 +265,10 @@ function locate(shape, placement) {
|
|
|
264
265
|
* Much faster than separate clone() + translate() + rotate() calls.
|
|
265
266
|
*/
|
|
266
267
|
function transformCopy(shape, composed) {
|
|
267
|
-
const inputFaceHashes =
|
|
268
|
+
const inputFaceHashes = require_booleanFns.collectInputFaceHashes([shape]);
|
|
268
269
|
const { shape: resultShape, evolution } = require_shapeTypes.getKernel().applyComposedTransformWithHistory(shape.wrapped, composed.trsf, inputFaceHashes, require_constants.HASH_CODE_MAX);
|
|
269
270
|
const result = require_shapeTypes.castResultShape(resultShape);
|
|
270
|
-
|
|
271
|
+
require_booleanFns.propagateAllMetadata(evolution, [shape], result);
|
|
271
272
|
return result;
|
|
272
273
|
}
|
|
273
274
|
// src/topology/primitiveFns.ts
|
|
@@ -1,10 +1,11 @@
|
|
|
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-CIH-8d_a.js";
|
|
2
2
|
import { E as ok, d as validationError, g as err, m as andThen, t as BrepErrorCode } from "./errors-BTccWbtE.js";
|
|
3
|
-
import { n as isClosedWire } from "./validityTypes-
|
|
3
|
+
import { n as isClosedWire } from "./validityTypes-DlrWkrSR.js";
|
|
4
4
|
import { n as HASH_CODE_MAX, t as DEG2RAD } from "./constants-iraOnb2p.js";
|
|
5
5
|
import { d as vecNormalize, h as vecScale } from "./vecOps-S-m9H_fe.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { a as makeOffset, c as makeTorus, i as makeEllipsoid, l as makeVertex, n as makeCone, o as makeSolid, r as makeCylinder, s as makeSphere, t as makeCompound, u as weldShellsAndFaces } from "./solidBuilders-q_hwYsdo.js";
|
|
7
|
+
import { d as collectInputFaceHashes, f as hasAnyMetadata, h as propagateMetadataThroughRelocation, m as propagateMetadataByHash, p as propagateAllMetadata } from "./booleanFns-cNfXGqMX.js";
|
|
8
|
+
import { _ as makeThreePointArc, a as makeNonPlanarFace, c as makeBSplineApproximation, d as makeCircle, f as makeEllipse, g as makeTangentArc, h as makeLine, i as makeNewFaceWithinFace, m as makeHelix, o as makePolygon, p as makeEllipseArc, r as makeFace, s as assembleWire, t as addHolesInFace, u as makeBezierCurve } from "./surfaceBuilders-DXo4N7wQ.js";
|
|
8
9
|
// src/topology/transformFns.ts
|
|
9
10
|
/**
|
|
10
11
|
* Immutable shape transforms — translate, rotate, scale, mirror, applyMatrix.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { G as _usingCtx, n as castResultShape, q as getKernel } from "./shapeTypes-
|
|
1
|
+
import { G as _usingCtx, n as castResultShape, q as getKernel } from "./shapeTypes-CIH-8d_a.js";
|
|
2
2
|
import { i as wasmIndex } from "./bug-ClMTAJhe.js";
|
|
3
3
|
import { E as ok, d as validationError, g as err, t as BrepErrorCode, u as unsupportedError } from "./errors-BTccWbtE.js";
|
|
4
|
-
import { E as kernelCallRaw, S as subShapeCount } from "./topologyQueryFns-
|
|
4
|
+
import { E as kernelCallRaw, S as subShapeCount } from "./topologyQueryFns-Cp0yekBh.js";
|
|
5
5
|
import { r as vecCross } from "./vecOps-S-m9H_fe.js";
|
|
6
|
-
import { f as getCachedMeasurement, p as setCachedMeasurement } from "./measureFns-
|
|
6
|
+
import { f as getCachedMeasurement, p as setCachedMeasurement } from "./measureFns-Q3K25IfN.js";
|
|
7
7
|
// src/measurement/principalBoxFns.ts
|
|
8
8
|
/**
|
|
9
9
|
* Principal-axes bounding box: a solid's extent measured in the frame of its
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-DmThK_oa.cjs");
|
|
2
2
|
const require_bug = require("./bug-CBcpIPuf.cjs");
|
|
3
3
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
4
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
4
|
+
const require_topologyQueryFns = require("./topologyQueryFns-CXbCFaU2.cjs");
|
|
5
5
|
const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
|
|
6
|
-
const require_measureFns = require("./measureFns-
|
|
6
|
+
const require_measureFns = require("./measureFns-D_RRjCZg.cjs");
|
|
7
7
|
// src/measurement/principalBoxFns.ts
|
|
8
8
|
/**
|
|
9
9
|
* Principal-axes bounding box: a solid's extent measured in the frame of its
|
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-6Er2lhp5.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 +1 @@
|
|
|
1
|
-
export { o as PROJECTION_PLANES, t as cameraFromPlane, n as cameraLookAt, r as createCamera, s as isProjectionPlane, a as makeProjectedEdges, i as projectEdges } from "./cameraFns-
|
|
1
|
+
export { o as PROJECTION_PLANES, t as cameraFromPlane, n as cameraLookAt, r as createCamera, s as isProjectionPlane, a as makeProjectedEdges, i as projectEdges } from "./cameraFns-YhB7A_Zc.js";
|
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-DJQeDf_5.cjs");
|
|
3
|
+
const require_cornerFinder = require("./cornerFinder-D9Wx3DWu.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-DPHQt2Kr.js";
|
|
2
|
+
import { t as cornerFinder } from "./cornerFinder-G1WkSkVl.js";
|
|
3
3
|
export { cornerFinder, edgeFinder, faceFinder, getSingleFace };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { g as disposeTransientSubShape, o as castShapeWithKnownType, q as getKernel } from "./shapeTypes-
|
|
2
|
-
import { c as getFaces, w as vertexPosition } from "./topologyQueryFns-
|
|
3
|
-
import { i as faceGeomType, l as normalAt, r as faceCenter } from "./faceFns-
|
|
1
|
+
import { g as disposeTransientSubShape, o as castShapeWithKnownType, q as getKernel } from "./shapeTypes-CIH-8d_a.js";
|
|
2
|
+
import { c as getFaces, w as vertexPosition } from "./topologyQueryFns-Cp0yekBh.js";
|
|
3
|
+
import { i as faceGeomType, l as normalAt, r as faceCenter } from "./faceFns-BgRNa5vx.js";
|
|
4
4
|
import { t as getFaceRoles } from "./faceRoleFns-BPxzQF-n.js";
|
|
5
|
-
import { n as getHashCode } from "./shapeFns-
|
|
6
|
-
import { n as measureArea, s as measureLength } from "./measureFns-
|
|
7
|
-
import { a as facesOfVertex, c as verticesOfFace, i as facesOfEdge, o as sharedEdges, s as verticesOfEdge, t as adjacentFaceHashes } from "./adjacencyFns-
|
|
5
|
+
import { n as getHashCode } from "./shapeFns-TWdr4Dv4.js";
|
|
6
|
+
import { n as measureArea, s as measureLength } from "./measureFns-Q3K25IfN.js";
|
|
7
|
+
import { a as facesOfVertex, c as verticesOfFace, i as facesOfEdge, o as sharedEdges, s as verticesOfEdge, t as adjacentFaceHashes } from "./adjacencyFns-Bl109A3Z.js";
|
|
8
8
|
// src/topology/shapeRef/scoring.ts
|
|
9
9
|
/**
|
|
10
10
|
* Default face scorer combining surface type, normal alignment, centroid proximity,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
-
const require_faceFns = require("./faceFns-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-DmThK_oa.cjs");
|
|
2
|
+
const require_topologyQueryFns = require("./topologyQueryFns-CXbCFaU2.cjs");
|
|
3
|
+
const require_faceFns = require("./faceFns-C4NOGZBg.cjs");
|
|
4
4
|
const require_faceRoleFns = require("./faceRoleFns-Db5bYj4Q.cjs");
|
|
5
|
-
const require_shapeFns = require("./shapeFns-
|
|
6
|
-
const require_measureFns = require("./measureFns-
|
|
7
|
-
const require_adjacencyFns = require("./adjacencyFns-
|
|
5
|
+
const require_shapeFns = require("./shapeFns-Bs92VrZh.cjs");
|
|
6
|
+
const require_measureFns = require("./measureFns-D_RRjCZg.cjs");
|
|
7
|
+
const require_adjacencyFns = require("./adjacencyFns-BfgFo-Rh.cjs");
|
|
8
8
|
// src/topology/shapeRef/scoring.ts
|
|
9
9
|
/**
|
|
10
10
|
* 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-DmThK_oa.cjs");
|
|
2
2
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-CXbCFaU2.cjs");
|
|
4
4
|
const require_constants = require("./constants-oee0S_x6.cjs");
|
|
5
5
|
// src/topology/shapeFns.ts
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { q as getKernel } from "./shapeTypes-
|
|
1
|
+
import { q as getKernel } from "./shapeTypes-CIH-8d_a.js";
|
|
2
2
|
import { t as BrepErrorCode } from "./errors-BTccWbtE.js";
|
|
3
|
-
import { E as kernelCallRaw, T as kernelCall } from "./topologyQueryFns-
|
|
3
|
+
import { E as kernelCallRaw, T as kernelCall } from "./topologyQueryFns-Cp0yekBh.js";
|
|
4
4
|
import { n as HASH_CODE_MAX } from "./constants-iraOnb2p.js";
|
|
5
5
|
// 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-gZQ1o5XK.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 +1 @@
|
|
|
1
|
-
export { h as assignRoles, g as captureHint, l as createDerivedFaceRef, p as createEdgeRef, _ as createRef, d as createVertexRef, b as defaultScorer, t as isDerivedFaceRef, n as isEdgeRef, r as isFaceRef, i as isLineageRef, a as isVertexRef, u as resolveDerivedFaceRef, m as resolveEdgeRef, o as resolveLineageRef, v as resolveRef, s as resolveRefIn, c as resolveRefParams, f as resolveVertexRef, y as updateRoles } from "./refResolveFns-
|
|
1
|
+
export { h as assignRoles, g as captureHint, l as createDerivedFaceRef, p as createEdgeRef, _ as createRef, d as createVertexRef, b as defaultScorer, t as isDerivedFaceRef, n as isEdgeRef, r as isFaceRef, i as isLineageRef, a as isVertexRef, u as resolveDerivedFaceRef, m as resolveEdgeRef, o as resolveLineageRef, v as resolveRef, s as resolveRefIn, c as resolveRefParams, f as resolveVertexRef, y as updateRoles } from "./refResolveFns-BPge7T5w.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as UnsupportedKernelOperationError, C as reverseCurve2d$2, D as tangentCurve2d, E as serializeCurve2d$2, N as EXACT_BREP_CAPABILITIES, O as translateCurve2d$2, P as OCCT_CAPABILITIES, S as offsetCurve2d$2, T as scaleCurve2d$2, _ as makeCircle2d$2, a as buildAsciiSTL, b as mirrorAcrossAxis, c as createBBox2d, d as deserializeCurve2d$2, f as evaluateCurve2d$2, g as makeBezier2d$2, h as makeArc2dThreePoints, i as DEFAULT_STL_TOLERANCE, j as isUnsupportedKernelOperationError, k as quickHull, l as curveBounds, m as makeArc2dTangent, o as buildBinarySTL, p as intersectCurves2dFn, r as DEFAULT_STL_ANGULAR_TOLERANCE, s as addCurveToBBox, t as OcctWasmAdapter, u as curveTypeName, v as makeEllipse2d$2, w as rotateCurve2d$2, x as mirrorAtPoint, y as makeLine2d$2 } from "./occtWasmAdapter-
|
|
1
|
+
import { A as UnsupportedKernelOperationError, C as reverseCurve2d$2, D as tangentCurve2d, E as serializeCurve2d$2, N as EXACT_BREP_CAPABILITIES, O as translateCurve2d$2, P as OCCT_CAPABILITIES, S as offsetCurve2d$2, T as scaleCurve2d$2, _ as makeCircle2d$2, a as buildAsciiSTL, b as mirrorAcrossAxis, c as createBBox2d, d as deserializeCurve2d$2, f as evaluateCurve2d$2, g as makeBezier2d$2, h as makeArc2dThreePoints, i as DEFAULT_STL_TOLERANCE, j as isUnsupportedKernelOperationError, k as quickHull, l as curveBounds, m as makeArc2dTangent, o as buildBinarySTL, p as intersectCurves2dFn, r as DEFAULT_STL_ANGULAR_TOLERANCE, s as addCurveToBBox, t as OcctWasmAdapter, u as curveTypeName, v as makeEllipse2d$2, w as rotateCurve2d$2, x as mirrorAtPoint, y as makeLine2d$2 } from "./occtWasmAdapter-BCCwaYkq.js";
|
|
2
2
|
import { i as wasmIndex, r as vec3At } from "./bug-ClMTAJhe.js";
|
|
3
3
|
// src/kernel/quality.ts
|
|
4
4
|
/**
|
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-Brj4lXjj.cjs");
|
|
3
|
+
const require_drawFns = require("./drawFns-UPbO2heB.cjs");
|
|
4
|
+
const require_textBlueprints = require("./textBlueprints-Dz6wNgve.cjs");
|
|
5
5
|
// 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 Sketches, c as compoundSketchFace, d as sketchExtrude, f as sketchFace, g as sketchWires, h as sketchSweep, l as compoundSketchLoft, m as sketchRevolve, o as Sketch, p as sketchLoft, s as compoundSketchExtrude, u as compoundSketchRevolve, y as CompoundSketch } from "./textBlueprints-
|
|
1
|
+
import { n as BaseSketcher2d, t as BlueprintSketcher } from "./blueprintSketcher-B15522Kr.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-DU5fewKl.js";
|
|
3
|
+
import { a as Sketches, c as compoundSketchFace, d as sketchExtrude, f as sketchFace, g as sketchWires, h as sketchSweep, l as compoundSketchLoft, m as sketchRevolve, o as Sketch, p as sketchLoft, s as compoundSketchExtrude, u as compoundSketchRevolve, y as CompoundSketch } from "./textBlueprints-BYWZho_c.js";
|
|
4
4
|
// src/sketching.ts
|
|
5
5
|
/**
|
|
6
6
|
* brepjs/sketching — Sketcher, Drawing, and sketch-to-shape operations.
|