brepjs 18.107.0 → 18.109.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/{blueprint-D5ArjKiA.cjs → blueprint-BwkD2qeC.cjs} +5 -5
- package/dist/{blueprint-CF12Nceg.js → blueprint-Dw0QqImu.js} +5 -5
- package/dist/{blueprintFns-CcCfkbyd.cjs → blueprintFns-B-aybpEo.cjs} +2 -2
- package/dist/{blueprintFns-BuPAK4OB.js → blueprintFns-BowWsZgJ.js} +2 -2
- package/dist/{blueprintSketcher-CEQ8s7TD.js → blueprintSketcher-7rtwqUHZ.js} +3 -3
- package/dist/{blueprintSketcher-DCttG3KS.cjs → blueprintSketcher-RK-cH6ps.cjs} +3 -3
- package/dist/{boolean2D-BCqDjg0y.cjs → boolean2D-CZUEOoAh.cjs} +4 -4
- package/dist/{boolean2D-8rB2sUzj.js → boolean2D-y0SSZfe2.js} +4 -4
- package/dist/brepjs.cjs +111 -27
- package/dist/brepjs.js +111 -27
- package/dist/{cameraFns-Bu6jgTKc.js → cameraFns-bk9e0F-T.js} +2 -2
- package/dist/{cameraFns-S7YbAxfg.cjs → cameraFns-uo1sZbBT.cjs} +2 -2
- package/dist/core.cjs +1 -1
- package/dist/core.js +1 -1
- package/dist/{cornerFinder-Ci2NbbAW.cjs → cornerFinder-B4q88TRb.cjs} +1 -1
- package/dist/{cornerFinder-COqoeY--.js → cornerFinder-DUGeBIvD.js} +1 -1
- package/dist/csg/evaluate.d.ts +25 -0
- package/dist/{curveFns-CG05Jygr.js → curveFns-CcSn4-Rf.js} +1 -1
- package/dist/{curveFns-Dx7_wMut.cjs → curveFns-DgUJpH4z.cjs} +1 -1
- package/dist/{drawFns-DYkjT_hx.cjs → drawFns-DNxs7PAT.cjs} +12 -12
- package/dist/{drawFns-CsXPFyDe.js → drawFns-SQIBls6p.js} +12 -12
- package/dist/{faceFns-mo4ThIHz.js → faceFns-B86WGqDg.js} +2 -2
- package/dist/{faceFns-DKg2St8b.cjs → faceFns-BV0GnTlt.cjs} +2 -2
- package/dist/{healingFns-OL0bBSSY.cjs → healingFns-C4UE1ZyM.cjs} +5 -5
- package/dist/{healingFns-C5AomW4j.js → healingFns-CPm_VFck.js} +5 -5
- package/dist/{helpers-8zxf2gkc.cjs → helpers-BSLPCflF.cjs} +6 -6
- package/dist/{helpers-DT44wBAD.js → helpers-DhJwFrkC.js} +6 -6
- package/dist/{importFns-B6hw9Nhx.cjs → importFns-CgMQIi0z.cjs} +2 -2
- package/dist/{importFns-CEczwPdN.js → importFns-nR9lEx22.js} +2 -2
- package/dist/io.cjs +2 -2
- package/dist/io.js +2 -2
- package/dist/kernel/brepkit/transformOps.d.ts +1 -0
- package/dist/kernel/interfaces/transformOps.d.ts +10 -0
- package/dist/kernel/occt/transformOps.d.ts +8 -0
- package/dist/kernel/occtWasm/occtWasmAdapter.cjs +1 -1
- package/dist/kernel/occtWasm/occtWasmAdapter.d.ts +1 -0
- package/dist/kernel/occtWasm/occtWasmAdapter.js +1 -1
- package/dist/kernel/occtWasm/occtWasmTypes.d.ts +7 -0
- package/dist/kernel/occtWasm/transformOps.d.ts +7 -0
- package/dist/{loftFns-DyNuD9XL.js → loftFns-CmShFQlv.js} +1 -1
- package/dist/{loftFns-DaRDYpfB.cjs → loftFns-fpTmrIdd.cjs} +1 -1
- package/dist/{measureFns-Q2dnokUU.cjs → measureFns-DblG0Yaz.cjs} +3 -3
- package/dist/{measureFns-Dkh_DmrE.js → measureFns-a5Vx25or.js} +3 -3
- package/dist/measurement.cjs +1 -1
- package/dist/measurement.js +1 -1
- package/dist/{meshFns-BgF4Xesg.cjs → meshFns-1hQSn1p2.cjs} +9 -3
- package/dist/{meshFns-BvP9Tm5Q.js → meshFns-DbmidUzH.js} +4 -4
- package/dist/{occtWasmAdapter-DDZELjlB.cjs → occtWasmAdapter-B2TEQOjs.cjs} +38 -10
- package/dist/{occtWasmAdapter-BDEPveZs.js → occtWasmAdapter-CKwtxwNH.js} +38 -10
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/{primitiveFns-62SO4ti5.js → primitiveFns-CBrOyk5S.js} +4 -4
- package/dist/{primitiveFns-BAWtMd9H.cjs → primitiveFns-DLIWtQWA.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/{shapeFns-DyBbhU30.js → shapeFns-DrZOVwHX.js} +44 -4
- package/dist/{shapeFns-L4a8kH_A.cjs → shapeFns-ybo0INGL.cjs} +55 -3
- package/dist/shapeRef.cjs +1 -1
- package/dist/shapeRef.js +1 -1
- package/dist/{shapeRefFns-Dij41NuC.cjs → shapeRefFns--2FPCL7P.cjs} +4 -4
- package/dist/{shapeRefFns-Cn4WNb3q.js → shapeRefFns-C1DefNzr.js} +4 -4
- package/dist/{shapeTypes-Bwgm5N6R.cjs → shapeTypes-BTTwjHy5.cjs} +18 -1
- package/dist/{shapeTypes-C4lPfrc2.js → shapeTypes-Dpu6mD3m.js} +18 -1
- package/dist/sketching.cjs +3 -3
- package/dist/sketching.js +3 -3
- package/dist/{solidBuilders-Biwv2cW3.js → solidBuilders-C32wXQWG.js} +5 -5
- package/dist/{solidBuilders-CgRmJEdn.cjs → solidBuilders-DiUv_mD0.cjs} +5 -5
- package/dist/{surfaceBuilders-FLnYYA70.cjs → surfaceBuilders-UyyfZy8w.cjs} +2 -2
- package/dist/{surfaceBuilders-Bww4jhBo.js → surfaceBuilders-rkE-jE90.js} +2 -2
- package/dist/text.cjs +2 -2
- package/dist/text.js +2 -2
- package/dist/{textBlueprints-CEzTC9vX.js → textBlueprints-BnkWAqwS.js} +7 -7
- package/dist/{textBlueprints-08NcMO9T.cjs → textBlueprints-D5lsZswr.cjs} +7 -7
- package/dist/{textMetrics-CBbDQ5QW.js → textMetrics-COGYk0LE.js} +1 -1
- package/dist/{textMetrics-W-H6jUDj.cjs → textMetrics-IC_IoI7l.cjs} +1 -1
- package/dist/{threadFns-DGYdomjN.cjs → threadFns-C8bErjVC.cjs} +6 -6
- package/dist/{threadFns-8rKpQXiR.js → threadFns-bCOhVQLb.js} +6 -6
- package/dist/topology/metadata/metadataPropagation.d.ts +21 -0
- package/dist/topology.cjs +8 -8
- package/dist/topology.js +8 -8
- package/dist/{topologyQueryFns-Do8E4EXj.js → topologyQueryFns-BeKaWpNm.js} +1 -1
- package/dist/{topologyQueryFns-ygBBXxnP.cjs → topologyQueryFns-CoXVHuN7.cjs} +1 -1
- package/package.json +1 -1
|
@@ -2741,28 +2741,53 @@ function composeTransform(ops) {
|
|
|
2741
2741
|
dispose: noop
|
|
2742
2742
|
};
|
|
2743
2743
|
}
|
|
2744
|
-
|
|
2744
|
+
/**
|
|
2745
|
+
* Extract a 12-element row-major 3x4 matrix from the trsf representations the
|
|
2746
|
+
* occt-wasm adapter accepts (raw array, `{ matrix }`, `{ elements }`). Returns
|
|
2747
|
+
* undefined when no usable matrix is present.
|
|
2748
|
+
*/
|
|
2749
|
+
function toMatrix12(trsf) {
|
|
2745
2750
|
const t = trsf;
|
|
2746
2751
|
let matrix;
|
|
2747
2752
|
if (Array.isArray(t)) matrix = t;
|
|
2748
|
-
else if (typeof t === "object") {
|
|
2749
|
-
if (Array.isArray(t["matrix"]))
|
|
2750
|
-
|
|
2751
|
-
if (matrix.length === 16) matrix = matrix.slice(0, 12);
|
|
2752
|
-
} else if (Array.isArray(t["elements"])) matrix = t["elements"];
|
|
2753
|
+
else if (t !== null && typeof t === "object") {
|
|
2754
|
+
if (Array.isArray(t["matrix"])) matrix = t["matrix"];
|
|
2755
|
+
else if (Array.isArray(t["elements"])) matrix = t["elements"];
|
|
2753
2756
|
}
|
|
2757
|
+
if (matrix && matrix.length === 16) matrix = matrix.slice(0, 12);
|
|
2758
|
+
return matrix && matrix.length >= 12 ? matrix : void 0;
|
|
2759
|
+
}
|
|
2760
|
+
function transform(k, Module, shape, trsf) {
|
|
2761
|
+
const matrix = toMatrix12(trsf);
|
|
2754
2762
|
if (matrix) {
|
|
2755
|
-
|
|
2756
|
-
|
|
2763
|
+
const vec = makeVecDouble(Module, matrix);
|
|
2764
|
+
try {
|
|
2765
|
+
return wrapResult(k, k.transform(unwrap(shape), vec));
|
|
2766
|
+
} finally {
|
|
2767
|
+
vec.delete();
|
|
2768
|
+
}
|
|
2769
|
+
}
|
|
2770
|
+
return handle(k.getShapeType(unwrap(shape)), k.copy(unwrap(shape)));
|
|
2771
|
+
}
|
|
2772
|
+
/**
|
|
2773
|
+
* Cheap location-only move. Uses the occt-wasm `located` facade method (a
|
|
2774
|
+
* `TopLoc_Location` re-tag that shares the source `TShape`) when the loaded
|
|
2775
|
+
* WASM build exposes it; builds without `located` fall back to the copying
|
|
2776
|
+
* `transform` — same geometry, only the cost differs.
|
|
2777
|
+
*/
|
|
2778
|
+
function locate(k, Module, shape, trsf) {
|
|
2779
|
+
if (typeof k.located === "function") {
|
|
2780
|
+
const matrix = toMatrix12(trsf);
|
|
2781
|
+
if (matrix) {
|
|
2757
2782
|
const vec = makeVecDouble(Module, matrix);
|
|
2758
2783
|
try {
|
|
2759
|
-
return wrapResult(k, k.
|
|
2784
|
+
return wrapResult(k, k.located(unwrap(shape), vec));
|
|
2760
2785
|
} finally {
|
|
2761
2786
|
vec.delete();
|
|
2762
2787
|
}
|
|
2763
2788
|
}
|
|
2764
2789
|
}
|
|
2765
|
-
return
|
|
2790
|
+
return transform(k, Module, shape, trsf);
|
|
2766
2791
|
}
|
|
2767
2792
|
function translate(k, shape, x, y, z) {
|
|
2768
2793
|
return wrapResult(k, k.translate(unwrap(shape), x, y, z));
|
|
@@ -4758,6 +4783,9 @@ var OcctWasmAdapter = class OcctWasmAdapter {
|
|
|
4758
4783
|
transform(shape, trsf) {
|
|
4759
4784
|
return transform(this.k, this.Module, shape, trsf);
|
|
4760
4785
|
}
|
|
4786
|
+
locate(shape, trsf) {
|
|
4787
|
+
return locate(this.k, this.Module, shape, trsf);
|
|
4788
|
+
}
|
|
4761
4789
|
translate(shape, x, y, z) {
|
|
4762
4790
|
return translate(this.k, shape, x, y, z);
|
|
4763
4791
|
}
|
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-C8bErjVC.cjs");
|
|
3
|
+
const require_loftFns = require("./loftFns-fpTmrIdd.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 findNode, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, G as gridPattern, H as updateNode, I as addChild, J as createAssembly, K as linearPattern, L as collectShapes, M as sphericalJoint, O as prismaticJoint, R as countNodes, S as addJoint, T as jointTransform, U as walkAssembly, V as removeChild, W as circularPattern, _ 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 exportAssemblySTEP, 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 createAssemblyNode } from "./threadFns-
|
|
2
|
-
import { d as twistExtrude, l as supportExtrude, o as complexExtrude, u as sweep } from "./loftFns-
|
|
1
|
+
import { A as setJointValue, B as findNode, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, G as gridPattern, H as updateNode, I as addChild, J as createAssembly, K as linearPattern, L as collectShapes, M as sphericalJoint, O as prismaticJoint, R as countNodes, S as addJoint, T as jointTransform, U as walkAssembly, V as removeChild, W as circularPattern, _ 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 exportAssemblySTEP, 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 createAssemblyNode } from "./threadFns-bCOhVQLb.js";
|
|
2
|
+
import { d as twistExtrude, l as supportExtrude, o as complexExtrude, u as sweep } from "./loftFns-CmShFQlv.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,9 +1,9 @@
|
|
|
1
|
-
import { Z as getKernel, c as createSolid, x as isClosedWire } from "./shapeTypes-
|
|
1
|
+
import { Z as getKernel, c as createSolid, x as isClosedWire } from "./shapeTypes-Dpu6mD3m.js";
|
|
2
2
|
import { A as ok, b as err, d as validationError, v as andThen } from "./errors-DNWJsfVU.js";
|
|
3
3
|
import { t as DEG2RAD } from "./constants-ITRzCnCp.js";
|
|
4
|
-
import { h as translate } from "./shapeFns-
|
|
5
|
-
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-
|
|
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-
|
|
4
|
+
import { h as translate } from "./shapeFns-DrZOVwHX.js";
|
|
5
|
+
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-rkE-jE90.js";
|
|
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-C32wXQWG.js";
|
|
7
7
|
//#region src/topology/primitiveFns.ts
|
|
8
8
|
/**
|
|
9
9
|
* Create a box with the given dimensions.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-BTTwjHy5.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
3
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
4
|
-
const require_shapeFns = require("./shapeFns-
|
|
5
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
6
|
-
const require_solidBuilders = require("./solidBuilders-
|
|
4
|
+
const require_shapeFns = require("./shapeFns-ybo0INGL.cjs");
|
|
5
|
+
const require_surfaceBuilders = require("./surfaceBuilders-UyyfZy8w.cjs");
|
|
6
|
+
const require_solidBuilders = require("./solidBuilders-DiUv_mD0.cjs");
|
|
7
7
|
//#region src/topology/primitiveFns.ts
|
|
8
8
|
/**
|
|
9
9
|
* Create a box with the given dimensions.
|
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-uo1sZbBT.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-bk9e0F-T.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-BSLPCflF.cjs");
|
|
3
|
+
const require_cornerFinder = require("./cornerFinder-B4q88TRb.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-DhJwFrkC.js";
|
|
2
|
+
import { t as cornerFinder } from "./cornerFinder-DUGeBIvD.js";
|
|
3
3
|
export { cornerFinder, edgeFinder, faceFinder, getSingleFace };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Z as getKernel, t as castShape } from "./shapeTypes-
|
|
1
|
+
import { Z as getKernel, t as castShape } from "./shapeTypes-Dpu6mD3m.js";
|
|
2
2
|
import { A as ok, b as err, d as validationError, t as BrepErrorCode } from "./errors-DNWJsfVU.js";
|
|
3
|
-
import { C as kernelCall, c as getFaces, l as getOrCreateCache, r as getCacheEntry, w as kernelCallRaw } from "./topologyQueryFns-
|
|
3
|
+
import { C as kernelCall, c as getFaces, l as getOrCreateCache, r as getCacheEntry, w as kernelCallRaw } from "./topologyQueryFns-BeKaWpNm.js";
|
|
4
4
|
import { n as HASH_CODE_MAX, t as DEG2RAD } from "./constants-ITRzCnCp.js";
|
|
5
5
|
//#region src/topology/metadata/originTrackingFns.ts
|
|
6
6
|
/**
|
|
@@ -376,8 +376,16 @@ function propagateColorsFromEvolution(evolution, inputs, result) {
|
|
|
376
376
|
* Fast-path: returns empty array when no inputs have any metadata (origins,
|
|
377
377
|
* tags, or colors), avoiding expensive WASM topology exploration.
|
|
378
378
|
*/
|
|
379
|
+
/**
|
|
380
|
+
* O(1) check: does a shape carry any propagatable metadata (face origins,
|
|
381
|
+
* tags, or colors)? Lets callers skip both expensive face iteration and
|
|
382
|
+
* metadata-preserving slow paths when there's nothing to preserve.
|
|
383
|
+
*/
|
|
384
|
+
function hasAnyMetadata(shape) {
|
|
385
|
+
return getFaceOrigins(shape) !== void 0 || hasFaceTags(shape) || hasColorMetadata(shape);
|
|
386
|
+
}
|
|
379
387
|
function collectInputFaceHashes(inputs) {
|
|
380
|
-
if (!inputs.some(
|
|
388
|
+
if (!inputs.some(hasAnyMetadata)) return [];
|
|
381
389
|
const kernel = getKernel();
|
|
382
390
|
const hashes = [];
|
|
383
391
|
for (const input of inputs) {
|
|
@@ -412,6 +420,38 @@ function propagateAllMetadata(evolution, inputs, result) {
|
|
|
412
420
|
function propagateMetadataByHash(inputs, result) {
|
|
413
421
|
propagateOriginsByHash(inputs, result);
|
|
414
422
|
}
|
|
423
|
+
/**
|
|
424
|
+
* Propagate all metadata through a *rigid relocation* (a `locate` re-tag).
|
|
425
|
+
*
|
|
426
|
+
* A relocated shape shares the source's TShape, so its faces correspond 1:1 to
|
|
427
|
+
* the source faces in iteration order — but carry new, location-dependent
|
|
428
|
+
* hashes, so the hash-keyed metadata must be re-keyed rather than left as-is.
|
|
429
|
+
* This synthesizes a 1:1 `modified` evolution (source face hash → moved face
|
|
430
|
+
* hash) and runs the standard propagation pipeline, so origins, tags, and
|
|
431
|
+
* colors all survive a move at `locate` cost (O(faces)), not a full copy.
|
|
432
|
+
*
|
|
433
|
+
* Callers should gate on {@link hasAnyMetadata} first: with no metadata this
|
|
434
|
+
* does pointless face iteration. The face counts always match for a rigid
|
|
435
|
+
* relocation; the length guard is purely defensive.
|
|
436
|
+
*/
|
|
437
|
+
function propagateMetadataThroughRelocation(source, moved) {
|
|
438
|
+
const kernel = getKernel();
|
|
439
|
+
const srcFaces = [...kernel.iterShapes(source.wrapped, "face")];
|
|
440
|
+
const movedFaces = [...kernel.iterShapes(moved.wrapped, "face")];
|
|
441
|
+
if (srcFaces.length !== movedFaces.length) return;
|
|
442
|
+
const modified = /* @__PURE__ */ new Map();
|
|
443
|
+
for (let i = 0; i < srcFaces.length; i++) {
|
|
444
|
+
const sf = srcFaces[i];
|
|
445
|
+
const mf = movedFaces[i];
|
|
446
|
+
if (sf === void 0 || mf === void 0) continue;
|
|
447
|
+
modified.set(kernel.hashCode(sf, HASH_CODE_MAX), [kernel.hashCode(mf, HASH_CODE_MAX)]);
|
|
448
|
+
}
|
|
449
|
+
propagateAllMetadata({
|
|
450
|
+
modified,
|
|
451
|
+
generated: /* @__PURE__ */ new Map(),
|
|
452
|
+
deleted: /* @__PURE__ */ new Set()
|
|
453
|
+
}, [source], moved);
|
|
454
|
+
}
|
|
415
455
|
//#endregion
|
|
416
456
|
//#region src/topology/transformFns.ts
|
|
417
457
|
/**
|
|
@@ -653,4 +693,4 @@ function simplify(shape) {
|
|
|
653
693
|
return kernelCall(() => getKernel().simplify(shape.wrapped), BrepErrorCode.SIMPLIFY_FAILED, "Failed to simplify shape");
|
|
654
694
|
}
|
|
655
695
|
//#endregion
|
|
656
|
-
export {
|
|
696
|
+
export { getFaceOrigins as A, getFaceColor as C, getTagMetadata as D, getFaceTags as E, setTagMetadata as O, colorShape as S, findFacesByTag as T, hasAnyMetadata as _, isSameShape as a, propagateMetadataThroughRelocation as b, applyMatrix as c, resize as d, rotate as f, collectInputFaceHashes as g, translate as h, isEqualShape as i, setShapeOrigin as j, tagFaces as k, composeTransforms as l, transformCopy as m, getHashCode as n, simplify as o, scale as p, isEmpty as r, toBREP as s, clone as t, mirror as u, propagateAllMetadata as v, getShapeColor as w, colorFaces as x, propagateMetadataByHash as y };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-BTTwjHy5.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-CoXVHuN7.cjs");
|
|
4
4
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
5
5
|
//#region src/topology/metadata/originTrackingFns.ts
|
|
6
6
|
/**
|
|
@@ -376,8 +376,16 @@ function propagateColorsFromEvolution(evolution, inputs, result) {
|
|
|
376
376
|
* Fast-path: returns empty array when no inputs have any metadata (origins,
|
|
377
377
|
* tags, or colors), avoiding expensive WASM topology exploration.
|
|
378
378
|
*/
|
|
379
|
+
/**
|
|
380
|
+
* O(1) check: does a shape carry any propagatable metadata (face origins,
|
|
381
|
+
* tags, or colors)? Lets callers skip both expensive face iteration and
|
|
382
|
+
* metadata-preserving slow paths when there's nothing to preserve.
|
|
383
|
+
*/
|
|
384
|
+
function hasAnyMetadata(shape) {
|
|
385
|
+
return getFaceOrigins(shape) !== void 0 || hasFaceTags(shape) || hasColorMetadata(shape);
|
|
386
|
+
}
|
|
379
387
|
function collectInputFaceHashes(inputs) {
|
|
380
|
-
if (!inputs.some(
|
|
388
|
+
if (!inputs.some(hasAnyMetadata)) return [];
|
|
381
389
|
const kernel = require_shapeTypes.getKernel();
|
|
382
390
|
const hashes = [];
|
|
383
391
|
for (const input of inputs) {
|
|
@@ -412,6 +420,38 @@ function propagateAllMetadata(evolution, inputs, result) {
|
|
|
412
420
|
function propagateMetadataByHash(inputs, result) {
|
|
413
421
|
propagateOriginsByHash(inputs, result);
|
|
414
422
|
}
|
|
423
|
+
/**
|
|
424
|
+
* Propagate all metadata through a *rigid relocation* (a `locate` re-tag).
|
|
425
|
+
*
|
|
426
|
+
* A relocated shape shares the source's TShape, so its faces correspond 1:1 to
|
|
427
|
+
* the source faces in iteration order — but carry new, location-dependent
|
|
428
|
+
* hashes, so the hash-keyed metadata must be re-keyed rather than left as-is.
|
|
429
|
+
* This synthesizes a 1:1 `modified` evolution (source face hash → moved face
|
|
430
|
+
* hash) and runs the standard propagation pipeline, so origins, tags, and
|
|
431
|
+
* colors all survive a move at `locate` cost (O(faces)), not a full copy.
|
|
432
|
+
*
|
|
433
|
+
* Callers should gate on {@link hasAnyMetadata} first: with no metadata this
|
|
434
|
+
* does pointless face iteration. The face counts always match for a rigid
|
|
435
|
+
* relocation; the length guard is purely defensive.
|
|
436
|
+
*/
|
|
437
|
+
function propagateMetadataThroughRelocation(source, moved) {
|
|
438
|
+
const kernel = require_shapeTypes.getKernel();
|
|
439
|
+
const srcFaces = [...kernel.iterShapes(source.wrapped, "face")];
|
|
440
|
+
const movedFaces = [...kernel.iterShapes(moved.wrapped, "face")];
|
|
441
|
+
if (srcFaces.length !== movedFaces.length) return;
|
|
442
|
+
const modified = /* @__PURE__ */ new Map();
|
|
443
|
+
for (let i = 0; i < srcFaces.length; i++) {
|
|
444
|
+
const sf = srcFaces[i];
|
|
445
|
+
const mf = movedFaces[i];
|
|
446
|
+
if (sf === void 0 || mf === void 0) continue;
|
|
447
|
+
modified.set(kernel.hashCode(sf, require_constants.HASH_CODE_MAX), [kernel.hashCode(mf, require_constants.HASH_CODE_MAX)]);
|
|
448
|
+
}
|
|
449
|
+
propagateAllMetadata({
|
|
450
|
+
modified,
|
|
451
|
+
generated: /* @__PURE__ */ new Map(),
|
|
452
|
+
deleted: /* @__PURE__ */ new Set()
|
|
453
|
+
}, [source], moved);
|
|
454
|
+
}
|
|
415
455
|
//#endregion
|
|
416
456
|
//#region src/topology/transformFns.ts
|
|
417
457
|
/**
|
|
@@ -731,6 +771,12 @@ Object.defineProperty(exports, "getTagMetadata", {
|
|
|
731
771
|
return getTagMetadata;
|
|
732
772
|
}
|
|
733
773
|
});
|
|
774
|
+
Object.defineProperty(exports, "hasAnyMetadata", {
|
|
775
|
+
enumerable: true,
|
|
776
|
+
get: function() {
|
|
777
|
+
return hasAnyMetadata;
|
|
778
|
+
}
|
|
779
|
+
});
|
|
734
780
|
Object.defineProperty(exports, "isEmpty", {
|
|
735
781
|
enumerable: true,
|
|
736
782
|
get: function() {
|
|
@@ -767,6 +813,12 @@ Object.defineProperty(exports, "propagateMetadataByHash", {
|
|
|
767
813
|
return propagateMetadataByHash;
|
|
768
814
|
}
|
|
769
815
|
});
|
|
816
|
+
Object.defineProperty(exports, "propagateMetadataThroughRelocation", {
|
|
817
|
+
enumerable: true,
|
|
818
|
+
get: function() {
|
|
819
|
+
return propagateMetadataThroughRelocation;
|
|
820
|
+
}
|
|
821
|
+
});
|
|
770
822
|
Object.defineProperty(exports, "resize", {
|
|
771
823
|
enumerable: true,
|
|
772
824
|
get: function() {
|
package/dist/shapeRef.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_shapeRefFns = require("./shapeRefFns
|
|
2
|
+
const require_shapeRefFns = require("./shapeRefFns--2FPCL7P.cjs");
|
|
3
3
|
exports.assignRoles = require_shapeRefFns.assignRoles;
|
|
4
4
|
exports.captureHint = require_shapeRefFns.captureHint;
|
|
5
5
|
exports.createRef = require_shapeRefFns.createRef;
|
package/dist/shapeRef.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as updateRoles, i as resolveRef, n as captureHint, o as defaultScorer, r as createRef, t as assignRoles } from "./shapeRefFns-
|
|
1
|
+
import { a as updateRoles, i as resolveRef, n as captureHint, o as defaultScorer, r as createRef, t as assignRoles } from "./shapeRefFns-C1DefNzr.js";
|
|
2
2
|
export { assignRoles, captureHint, createRef, defaultScorer, resolveRef, updateRoles };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
|
|
2
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
-
const require_faceFns = require("./faceFns-
|
|
4
|
-
const require_shapeFns = require("./shapeFns-
|
|
5
|
-
const require_measureFns = require("./measureFns-
|
|
2
|
+
const require_topologyQueryFns = require("./topologyQueryFns-CoXVHuN7.cjs");
|
|
3
|
+
const require_faceFns = require("./faceFns-BV0GnTlt.cjs");
|
|
4
|
+
const require_shapeFns = require("./shapeFns-ybo0INGL.cjs");
|
|
5
|
+
const require_measureFns = require("./measureFns-DblG0Yaz.cjs");
|
|
6
6
|
//#region src/topology/shapeRef/scoring.ts
|
|
7
7
|
/**
|
|
8
8
|
* Default face scorer combining surface type, normal alignment, centroid proximity,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as wasmIndex } from "./vec3-Dpha8d5k.js";
|
|
2
|
-
import { 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 } from "./measureFns-
|
|
2
|
+
import { c as getFaces } from "./topologyQueryFns-BeKaWpNm.js";
|
|
3
|
+
import { i as faceGeomType, l as normalAt, r as faceCenter } from "./faceFns-B86WGqDg.js";
|
|
4
|
+
import { n as getHashCode } from "./shapeFns-DrZOVwHX.js";
|
|
5
|
+
import { n as measureArea } from "./measureFns-a5Vx25or.js";
|
|
6
6
|
//#region src/topology/shapeRef/scoring.ts
|
|
7
7
|
/**
|
|
8
8
|
* Default face scorer combining surface type, normal alignment, centroid proximity,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_occtWasmAdapter = require("./occtWasmAdapter-
|
|
1
|
+
const require_occtWasmAdapter = require("./occtWasmAdapter-B2TEQOjs.cjs");
|
|
2
2
|
const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
|
|
3
3
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
4
4
|
//#region src/kernel/quality.ts
|
|
@@ -2215,6 +2215,20 @@ function transform$3(oc, shape, trsf) {
|
|
|
2215
2215
|
return result;
|
|
2216
2216
|
}
|
|
2217
2217
|
/**
|
|
2218
|
+
* Apply a rigid transform as a location re-tag. Passing copy=false makes
|
|
2219
|
+
* BRepBuilderAPI_Transform share the source TShape under a new location for a
|
|
2220
|
+
* rigid motion, instead of the deep topology copy {@link transform} (copy=true)
|
|
2221
|
+
* performs. Use only for rigid `trsf` (rotation + translation).
|
|
2222
|
+
*/
|
|
2223
|
+
function locate(oc, shape, trsf) {
|
|
2224
|
+
const transformer = new oc.BRepBuilderAPI_Transform_2(shape, trsf, false, false);
|
|
2225
|
+
try {
|
|
2226
|
+
return transformer.ModifiedShape(shape);
|
|
2227
|
+
} finally {
|
|
2228
|
+
transformer.delete();
|
|
2229
|
+
}
|
|
2230
|
+
}
|
|
2231
|
+
/**
|
|
2218
2232
|
* Translates a shape by the given offset.
|
|
2219
2233
|
*/
|
|
2220
2234
|
function translate$2(oc, shape, x, y, z) {
|
|
@@ -2322,6 +2336,7 @@ function simplify$2(oc, shape) {
|
|
|
2322
2336
|
function makeTransformOps$2(oc) {
|
|
2323
2337
|
return {
|
|
2324
2338
|
transform: (shape, trsf) => transform$3(oc, shape, trsf),
|
|
2339
|
+
locate: (shape, trsf) => locate(oc, shape, trsf),
|
|
2325
2340
|
translate: (shape, x, y, z) => translate$2(oc, shape, x, y, z),
|
|
2326
2341
|
rotate: (shape, angle, axis, center) => rotate$2(oc, shape, angle, axis, center),
|
|
2327
2342
|
mirror: (shape, origin, normal) => mirror$2(oc, shape, origin, normal),
|
|
@@ -6250,6 +6265,7 @@ function transformBatch$1(bk, entries) {
|
|
|
6250
6265
|
function makeTransformOps$1(bk) {
|
|
6251
6266
|
return {
|
|
6252
6267
|
transform: (shape, trsf) => transform$2(bk, shape, trsf),
|
|
6268
|
+
locate: (shape, trsf) => transform$2(bk, shape, trsf),
|
|
6253
6269
|
translate: (shape, x, y, z) => translate$1(bk, shape, x, y, z),
|
|
6254
6270
|
rotate: (shape, angle, axis, center) => rotate$1(bk, shape, angle, axis, center),
|
|
6255
6271
|
mirror: (shape, origin, normal) => mirror$1(bk, shape, origin, normal),
|
|
@@ -10492,6 +10508,7 @@ function makeTransformOps(module) {
|
|
|
10492
10508
|
return {
|
|
10493
10509
|
composeTransform,
|
|
10494
10510
|
transform: transform$1,
|
|
10511
|
+
locate: transform$1,
|
|
10495
10512
|
translate,
|
|
10496
10513
|
rotate,
|
|
10497
10514
|
mirror,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as serializeCurve2d$2, E as quickHull, O as EXACT_BREP_CAPABILITIES, S as scaleCurve2d$2, T as translateCurve2d$2, _ as makeEllipse2d$2, a as buildBinarySTL, b as mirrorAtPoint, c as curveBounds, d as evaluateCurve2d$2, f as intersectCurves2dFn, g as makeCircle2d$2, h as makeBezier2d$2, i as buildAsciiSTL, l as curveTypeName, m as makeArc2dThreePoints, n as DEFAULT_STL_ANGULAR_TOLERANCE, o as addCurveToBBox, p as makeArc2dTangent, r as DEFAULT_STL_TOLERANCE, s as createBBox2d, t as OcctWasmAdapter, u as deserializeCurve2d$2, v as makeLine2d$2, w as tangentCurve2d, x as rotateCurve2d$2, y as mirrorAcrossAxis } from "./occtWasmAdapter-
|
|
1
|
+
import { C as serializeCurve2d$2, E as quickHull, O as EXACT_BREP_CAPABILITIES, S as scaleCurve2d$2, T as translateCurve2d$2, _ as makeEllipse2d$2, a as buildBinarySTL, b as mirrorAtPoint, c as curveBounds, d as evaluateCurve2d$2, f as intersectCurves2dFn, g as makeCircle2d$2, h as makeBezier2d$2, i as buildAsciiSTL, l as curveTypeName, m as makeArc2dThreePoints, n as DEFAULT_STL_ANGULAR_TOLERANCE, o as addCurveToBBox, p as makeArc2dTangent, r as DEFAULT_STL_TOLERANCE, s as createBBox2d, t as OcctWasmAdapter, u as deserializeCurve2d$2, v as makeLine2d$2, w as tangentCurve2d, x as rotateCurve2d$2, y as mirrorAcrossAxis } from "./occtWasmAdapter-CKwtxwNH.js";
|
|
2
2
|
import { n as wasmIndex, t as vec3At } from "./vec3-Dpha8d5k.js";
|
|
3
3
|
import { A as ok, b as err } from "./errors-DNWJsfVU.js";
|
|
4
4
|
//#region src/kernel/quality.ts
|
|
@@ -2215,6 +2215,20 @@ function transform$3(oc, shape, trsf) {
|
|
|
2215
2215
|
return result;
|
|
2216
2216
|
}
|
|
2217
2217
|
/**
|
|
2218
|
+
* Apply a rigid transform as a location re-tag. Passing copy=false makes
|
|
2219
|
+
* BRepBuilderAPI_Transform share the source TShape under a new location for a
|
|
2220
|
+
* rigid motion, instead of the deep topology copy {@link transform} (copy=true)
|
|
2221
|
+
* performs. Use only for rigid `trsf` (rotation + translation).
|
|
2222
|
+
*/
|
|
2223
|
+
function locate(oc, shape, trsf) {
|
|
2224
|
+
const transformer = new oc.BRepBuilderAPI_Transform_2(shape, trsf, false, false);
|
|
2225
|
+
try {
|
|
2226
|
+
return transformer.ModifiedShape(shape);
|
|
2227
|
+
} finally {
|
|
2228
|
+
transformer.delete();
|
|
2229
|
+
}
|
|
2230
|
+
}
|
|
2231
|
+
/**
|
|
2218
2232
|
* Translates a shape by the given offset.
|
|
2219
2233
|
*/
|
|
2220
2234
|
function translate$2(oc, shape, x, y, z) {
|
|
@@ -2322,6 +2336,7 @@ function simplify$2(oc, shape) {
|
|
|
2322
2336
|
function makeTransformOps$2(oc) {
|
|
2323
2337
|
return {
|
|
2324
2338
|
transform: (shape, trsf) => transform$3(oc, shape, trsf),
|
|
2339
|
+
locate: (shape, trsf) => locate(oc, shape, trsf),
|
|
2325
2340
|
translate: (shape, x, y, z) => translate$2(oc, shape, x, y, z),
|
|
2326
2341
|
rotate: (shape, angle, axis, center) => rotate$2(oc, shape, angle, axis, center),
|
|
2327
2342
|
mirror: (shape, origin, normal) => mirror$2(oc, shape, origin, normal),
|
|
@@ -6246,6 +6261,7 @@ function transformBatch$1(bk, entries) {
|
|
|
6246
6261
|
function makeTransformOps$1(bk) {
|
|
6247
6262
|
return {
|
|
6248
6263
|
transform: (shape, trsf) => transform$2(bk, shape, trsf),
|
|
6264
|
+
locate: (shape, trsf) => transform$2(bk, shape, trsf),
|
|
6249
6265
|
translate: (shape, x, y, z) => translate$1(bk, shape, x, y, z),
|
|
6250
6266
|
rotate: (shape, angle, axis, center) => rotate$1(bk, shape, angle, axis, center),
|
|
6251
6267
|
mirror: (shape, origin, normal) => mirror$1(bk, shape, origin, normal),
|
|
@@ -10484,6 +10500,7 @@ function makeTransformOps(module) {
|
|
|
10484
10500
|
return {
|
|
10485
10501
|
composeTransform,
|
|
10486
10502
|
transform: transform$1,
|
|
10503
|
+
locate: transform$1,
|
|
10487
10504
|
translate,
|
|
10488
10505
|
rotate,
|
|
10489
10506
|
mirror,
|
package/dist/sketching.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_textBlueprints = require("./textBlueprints-
|
|
3
|
-
const require_blueprintSketcher = require("./blueprintSketcher-
|
|
4
|
-
const require_drawFns = require("./drawFns-
|
|
2
|
+
const require_textBlueprints = require("./textBlueprints-D5lsZswr.cjs");
|
|
3
|
+
const require_blueprintSketcher = require("./blueprintSketcher-RK-cH6ps.cjs");
|
|
4
|
+
const require_drawFns = require("./drawFns-DNxs7PAT.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-7rtwqUHZ.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-SQIBls6p.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-BnkWAqwS.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
|
-
import { Z as getKernel, _ as isSolid, c as createSolid, g as isShell, h as isShape3D, i as createCompound, l as createVertex, t as castShape } from "./shapeTypes-
|
|
1
|
+
import { Z as getKernel, _ as isSolid, c as createSolid, g as isShell, h as isShape3D, i as createCompound, l as createVertex, t as castShape } from "./shapeTypes-Dpu6mD3m.js";
|
|
2
2
|
import { A as ok, R as unwrap, b as err, d as validationError, i as kernelError, l as typeCastError, t as BrepErrorCode, v as andThen, w as isErr } from "./errors-DNWJsfVU.js";
|
|
3
|
-
import { f as getVertices, p as getWires, s as getEdges } from "./topologyQueryFns-
|
|
3
|
+
import { f as getVertices, p as getWires, s as getEdges } from "./topologyQueryFns-BeKaWpNm.js";
|
|
4
4
|
import { n as HASH_CODE_MAX } from "./constants-ITRzCnCp.js";
|
|
5
5
|
import { h as vecScale, t as vecAdd } from "./vecOps-SKPRvPH-.js";
|
|
6
6
|
import { o as resolvePlane } from "./planeOps-DSjjtrjg.js";
|
|
7
|
-
import { _ as cast, v as downcast } from "./faceFns-
|
|
8
|
-
import {
|
|
7
|
+
import { _ as cast, v as downcast } from "./faceFns-B86WGqDg.js";
|
|
8
|
+
import { g as collectInputFaceHashes, v as propagateAllMetadata, y as propagateMetadataByHash } from "./shapeFns-DrZOVwHX.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-rkE-jE90.js";
|
|
11
11
|
//#region src/topology/booleanFns.ts
|
|
12
12
|
/**
|
|
13
13
|
* Boolean and compound operations — functional replacements for _3DShape boolean methods.
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-BTTwjHy5.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-CoXVHuN7.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-BA4HfgQu.cjs");
|
|
7
|
-
const require_faceFns = require("./faceFns-
|
|
8
|
-
const require_shapeFns = require("./shapeFns-
|
|
7
|
+
const require_faceFns = require("./faceFns-BV0GnTlt.cjs");
|
|
8
|
+
const require_shapeFns = require("./shapeFns-ybo0INGL.cjs");
|
|
9
9
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
10
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
10
|
+
const require_surfaceBuilders = require("./surfaceBuilders-UyyfZy8w.cjs");
|
|
11
11
|
//#region src/topology/booleanFns.ts
|
|
12
12
|
/**
|
|
13
13
|
* Boolean and compound operations — functional replacements for _3DShape boolean methods.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-BTTwjHy5.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
|
-
const require_faceFns = require("./faceFns-
|
|
3
|
+
const require_faceFns = require("./faceFns-BV0GnTlt.cjs");
|
|
4
4
|
//#region src/utils/range.ts
|
|
5
5
|
/** Generate an array of integers `[0, 1, …, len - 1]`. */
|
|
6
6
|
function range(len) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Z as getKernel, a as createEdge, o as createFace, p as isFace, u as createWire, w as isPlanarFace } from "./shapeTypes-
|
|
1
|
+
import { Z as getKernel, a as createEdge, o as createFace, p as isFace, u as createWire, w as isPlanarFace } from "./shapeTypes-Dpu6mD3m.js";
|
|
2
2
|
import { A as ok, b as err, d as validationError, i as kernelError, v as andThen } from "./errors-DNWJsfVU.js";
|
|
3
|
-
import { _ as cast, u as outerWire } from "./faceFns-
|
|
3
|
+
import { _ as cast, u as outerWire } from "./faceFns-B86WGqDg.js";
|
|
4
4
|
//#region src/utils/range.ts
|
|
5
5
|
/** Generate an array of integers `[0, 1, …, len - 1]`. */
|
|
6
6
|
function range(len) {
|
package/dist/text.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_textBlueprints = require("./textBlueprints-
|
|
3
|
-
const require_textMetrics = require("./textMetrics-
|
|
2
|
+
const require_textBlueprints = require("./textBlueprints-D5lsZswr.cjs");
|
|
3
|
+
const require_textMetrics = require("./textMetrics-IC_IoI7l.cjs");
|
|
4
4
|
exports.fontMetrics = require_textMetrics.fontMetrics;
|
|
5
5
|
exports.getFont = require_textBlueprints.getFont;
|
|
6
6
|
exports.loadFont = require_textBlueprints.loadFont;
|
package/dist/text.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as getFont, r as loadFont, t as textBlueprints } from "./textBlueprints-
|
|
2
|
-
import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-
|
|
1
|
+
import { n as getFont, r as loadFont, t as textBlueprints } from "./textBlueprints-BnkWAqwS.js";
|
|
2
|
+
import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-COGYk0LE.js";
|
|
3
3
|
export { fontMetrics, getFont, loadFont, sketchText, textBlueprints, textMetrics };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { o as createFace, u as createWire } from "./shapeTypes-
|
|
1
|
+
import { o as createFace, u as createWire } from "./shapeTypes-Dpu6mD3m.js";
|
|
2
2
|
import { A as ok, R as unwrap, b as err, h as bug, r as ioError, t as BrepErrorCode } from "./errors-DNWJsfVU.js";
|
|
3
3
|
import { r as toVec3 } from "./types-D24Y27N0.js";
|
|
4
4
|
import { d as vecNormalize, h as vecScale, r as vecCross } from "./vecOps-SKPRvPH-.js";
|
|
5
5
|
import { n as createPlane } from "./planeOps-DSjjtrjg.js";
|
|
6
|
-
import { v as downcast } from "./faceFns-
|
|
7
|
-
import { l as curveStartPoint, u as curveTangentAt } from "./curveFns-
|
|
6
|
+
import { v as downcast } from "./faceFns-B86WGqDg.js";
|
|
7
|
+
import { l as curveStartPoint, u as curveTangentAt } from "./curveFns-CcSn4-Rf.js";
|
|
8
8
|
import { n as getAtOrThrow, t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
9
|
-
import { i as makeNewFaceWithinFace, r as makeFace, t as addHolesInFace } from "./surfaceBuilders-
|
|
10
|
-
import { o as makeSolid, p as cutAll, t as makeCompound } from "./solidBuilders-
|
|
11
|
-
import { r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-
|
|
12
|
-
import { a as revolve, d as twistExtrude, o as complexExtrude, r as extrude, t as loft, u as sweep } from "./loftFns-
|
|
9
|
+
import { i as makeNewFaceWithinFace, r as makeFace, t as addHolesInFace } from "./surfaceBuilders-rkE-jE90.js";
|
|
10
|
+
import { o as makeSolid, p as cutAll, t as makeCompound } from "./solidBuilders-C32wXQWG.js";
|
|
11
|
+
import { r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-7rtwqUHZ.js";
|
|
12
|
+
import { a as revolve, d as twistExtrude, o as complexExtrude, r as extrude, t as loft, u as sweep } from "./loftFns-CmShFQlv.js";
|
|
13
13
|
import opentype from "opentype.js";
|
|
14
14
|
//#region src/sketching/compoundSketch.ts
|
|
15
15
|
/**
|
|
@@ -29,18 +29,18 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
29
29
|
enumerable: true
|
|
30
30
|
}) : target, mod));
|
|
31
31
|
//#endregion
|
|
32
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
32
|
+
const require_shapeTypes = require("./shapeTypes-BTTwjHy5.cjs");
|
|
33
33
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
34
34
|
const require_types = require("./types-KjA8tY4Y.cjs");
|
|
35
35
|
const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
|
|
36
36
|
const require_planeOps = require("./planeOps-BA4HfgQu.cjs");
|
|
37
|
-
const require_faceFns = require("./faceFns-
|
|
38
|
-
const require_curveFns = require("./curveFns-
|
|
37
|
+
const require_faceFns = require("./faceFns-BV0GnTlt.cjs");
|
|
38
|
+
const require_curveFns = require("./curveFns-DgUJpH4z.cjs");
|
|
39
39
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
40
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
41
|
-
const require_solidBuilders = require("./solidBuilders-
|
|
42
|
-
const require_blueprintSketcher = require("./blueprintSketcher-
|
|
43
|
-
const require_loftFns = require("./loftFns-
|
|
40
|
+
const require_surfaceBuilders = require("./surfaceBuilders-UyyfZy8w.cjs");
|
|
41
|
+
const require_solidBuilders = require("./solidBuilders-DiUv_mD0.cjs");
|
|
42
|
+
const require_blueprintSketcher = require("./blueprintSketcher-RK-cH6ps.cjs");
|
|
43
|
+
const require_loftFns = require("./loftFns-fpTmrIdd.cjs");
|
|
44
44
|
let opentype_js = require("opentype.js");
|
|
45
45
|
opentype_js = __toESM(opentype_js, 1);
|
|
46
46
|
//#region src/sketching/compoundSketch.ts
|