brepjs 20.12.12 → 20.12.13
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-DfPO5LGP.js → adjacencyFns-DBN26xm_.js} +2 -2
- package/dist/{adjacencyFns-DSGyqGyy.cjs → adjacencyFns-Djv832MP.cjs} +2 -2
- package/dist/{blueprint-BYXwa2cF.js → blueprint-BTccTqFy.js} +5 -5
- package/dist/{blueprint-DtPRNDEu.cjs → blueprint-nVQsEilp.cjs} +5 -5
- package/dist/{blueprintFns-y2oH3LOO.cjs → blueprintFns-DFDOgqqe.cjs} +2 -2
- package/dist/{blueprintFns-YuJQgywS.js → blueprintFns-DX7yLZpR.js} +2 -2
- package/dist/{blueprintSketcher-zQgjgodb.cjs → blueprintSketcher-CoGp1dM9.cjs} +3 -3
- package/dist/{blueprintSketcher-DPP1g95U.js → blueprintSketcher-rk64lh8e.js} +3 -3
- package/dist/{boolean2D-BJFpEXix.cjs → boolean2D-DP2DiMfT.cjs} +4 -4
- package/dist/{boolean2D-CNf7lVXV.js → boolean2D-Dv-57m9d.js} +4 -4
- package/dist/{booleanFns-B9RvEpHB.js → booleanFns-CjIZaNBh.js} +5 -5
- package/dist/{booleanFns-CkcJ8WB7.cjs → booleanFns-ewBwy7V_.cjs} +5 -5
- package/dist/brepjs.cjs +29 -29
- package/dist/brepjs.js +29 -29
- package/dist/{cameraFns-CLkNCsYU.js → cameraFns-D0JDXxwO.js} +3 -3
- package/dist/{cameraFns-B9xKg36U.cjs → cameraFns-DmIQsPIr.cjs} +3 -3
- package/dist/core.cjs +2 -2
- package/dist/core.js +2 -2
- package/dist/{cornerFinder-Dzsi68w-.cjs → cornerFinder-CZ1XbVx7.cjs} +1 -1
- package/dist/{cornerFinder-DgVMDBCo.js → cornerFinder-Df7ajnlz.js} +1 -1
- package/dist/{curveFns-EsJgIpc6.js → curveFns-CUrIF9LG.js} +1 -1
- package/dist/{curveFns-B8mm5cou.cjs → curveFns-DK5eG57I.cjs} +1 -1
- package/dist/{drawFns-CLJog-Xp.cjs → drawFns-B2CPxqd1.cjs} +12 -12
- package/dist/{drawFns-Bht1ceeH.js → drawFns-BKKWQ4JW.js} +12 -12
- package/dist/{faceFns-2jGPfqvB.js → faceFns-B3vblI_s.js} +2 -2
- package/dist/{faceFns-Jo9hMVqL.cjs → faceFns-C1Ii1MJ-.cjs} +2 -2
- package/dist/{healingFns-DvuJr4RS.js → healingFns-CqiHrJcx.js} +39 -14
- package/dist/{healingFns-DGc2hk9z.cjs → healingFns-sfguIlrW.cjs} +39 -14
- package/dist/{helpers-D7Y4Vxhf.cjs → helpers-CTxyRIoE.cjs} +6 -6
- package/dist/{helpers-BuI9lh-t.js → helpers-Dy1moMMd.js} +6 -6
- package/dist/{importFns-TKzj4FaZ.js → importFns-BXiAHbyn.js} +5 -5
- package/dist/{importFns-Dwlc0KtB.cjs → importFns-C3ILnGTv.cjs} +5 -5
- package/dist/io.cjs +2 -2
- package/dist/io.js +2 -2
- package/dist/{loftFns-jnQL_zpD.js → loftFns-BJqF1p_f.js} +1 -1
- package/dist/{loftFns-CnerVgTM.cjs → loftFns-CzERU_TY.cjs} +1 -1
- package/dist/{measureFns--UKrACtx.js → measureFns-CT2TRojo.js} +3 -3
- package/dist/{measureFns-D8uSDn-8.cjs → measureFns-DN5YMfKZ.cjs} +3 -3
- package/dist/measurement.cjs +2 -2
- package/dist/measurement.js +2 -2
- package/dist/{meshFns-Cs_qrlXI.cjs → meshFns-BDn_nIVv.cjs} +3 -3
- package/dist/{meshFns-Bo4EQJFO.js → meshFns-Cp8uEpVt.js} +3 -3
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/{primitiveFns-CZqSRhm8.cjs → primitiveFns-1FcmvZ6Y.cjs} +5 -5
- package/dist/{primitiveFns-DPqHA3sX.js → primitiveFns-BzJi89Y6.js} +5 -5
- package/dist/{principalBoxFns-Cozj46sS.cjs → principalBoxFns-DT4ngNuy.cjs} +3 -3
- package/dist/{principalBoxFns-C3SQMyG5.js → principalBoxFns-farY7tvh.js} +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-DBY8yC6n.cjs → refResolveFns-By31fyEv.cjs} +6 -6
- package/dist/{refResolveFns-DtztzO1g.js → refResolveFns-dNAt7W9t.js} +6 -6
- package/dist/{shapeFns-kFm-m8jh.js → shapeFns-381QqZ8n.js} +2 -2
- package/dist/{shapeFns-D47cmLG8.cjs → shapeFns-DhTfkxbN.cjs} +2 -2
- package/dist/shapeRef.cjs +1 -1
- package/dist/shapeRef.js +1 -1
- package/dist/{shapeTypes-C06KHgTm.cjs → shapeTypes-C0NcoN5g.cjs} +11 -14
- package/dist/{shapeTypes-DoPnZHn_.js → shapeTypes-DfBx__EF.js} +11 -14
- package/dist/sketching.cjs +3 -3
- package/dist/sketching.js +3 -3
- package/dist/{solidBuilders-ZDGdvaTU.js → solidBuilders-BZ1qXlFZ.js} +3 -3
- package/dist/{solidBuilders-Dwm0hXn5.cjs → solidBuilders-VPkj5ChQ.cjs} +3 -3
- package/dist/{surfaceBuilders-D5kFAV1i.cjs → surfaceBuilders-DQre19g8.cjs} +3 -3
- package/dist/{surfaceBuilders-BBs6D6Km.js → surfaceBuilders-sBre5aYy.js} +3 -3
- package/dist/text.cjs +2 -2
- package/dist/text.js +2 -2
- package/dist/{textBlueprints-BPrPhg5b.cjs → textBlueprints-ChDNr0L4.cjs} +8 -8
- package/dist/{textBlueprints-Dq3pUNSr.js → textBlueprints-DCorV4gM.js} +8 -8
- package/dist/{textMetrics-JN70dV5x.js → textMetrics-ByzyMC1I.js} +1 -1
- package/dist/{textMetrics-4xkjKmD1.cjs → textMetrics-C0qTX3sH.cjs} +1 -1
- package/dist/{threadFns-D7D_qR7t.js → threadFns-AJP69FU6.js} +7 -7
- package/dist/{threadFns-Dq_Gff0C.cjs → threadFns-CzWqzDN_.cjs} +7 -7
- package/dist/topology/apiTypes.d.ts +4 -2
- package/dist/topology/chamferAngleFns.d.ts +6 -4
- package/dist/topology/evolutionFns.d.ts +2 -0
- package/dist/topology/modifierFns.d.ts +8 -0
- package/dist/topology.cjs +9 -9
- package/dist/topology.js +9 -9
- package/dist/{topologyQueryFns-yOGEI9hO.js → topologyQueryFns-CTCsQIH_.js} +1 -1
- package/dist/{topologyQueryFns-BUhKY2Kj.cjs → topologyQueryFns-svM8Yfsk.cjs} +1 -1
- package/dist/{validityTypes-lfyOkCQm.cjs → validityTypes-BCUWXQNA.cjs} +1 -1
- package/dist/{validityTypes-CGrEOscY.js → validityTypes-DrWg6_qM.js} +1 -1
- package/package.json +1 -1
|
@@ -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-C0NcoN5g.cjs");
|
|
2
|
+
const require_topologyQueryFns = require("./topologyQueryFns-svM8Yfsk.cjs");
|
|
3
|
+
const require_faceFns = require("./faceFns-C1Ii1MJ-.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-DhTfkxbN.cjs");
|
|
6
|
+
const require_measureFns = require("./measureFns-DN5YMfKZ.cjs");
|
|
7
|
+
const require_adjacencyFns = require("./adjacencyFns-Djv832MP.cjs");
|
|
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
|
-
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-DfBx__EF.js";
|
|
2
|
+
import { c as getFaces, w as vertexPosition } from "./topologyQueryFns-CTCsQIH_.js";
|
|
3
|
+
import { i as faceGeomType, l as normalAt, r as faceCenter } from "./faceFns-B3vblI_s.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-381QqZ8n.js";
|
|
6
|
+
import { n as measureArea, s as measureLength } from "./measureFns-CT2TRojo.js";
|
|
7
|
+
import { a as facesOfVertex, c as verticesOfFace, i as facesOfEdge, o as sharedEdges, s as verticesOfEdge, t as adjacentFaceHashes } from "./adjacencyFns-DBN26xm_.js";
|
|
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
|
-
import { q as getKernel } from "./shapeTypes-
|
|
1
|
+
import { q as getKernel } from "./shapeTypes-DfBx__EF.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-CTCsQIH_.js";
|
|
4
4
|
import { n as HASH_CODE_MAX } from "./constants-iraOnb2p.js";
|
|
5
5
|
// src/topology/shapeFns.ts
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-C0NcoN5g.cjs");
|
|
2
2
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-svM8Yfsk.cjs");
|
|
4
4
|
const require_constants = require("./constants-oee0S_x6.cjs");
|
|
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-By31fyEv.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-dNAt7W9t.js";
|
|
@@ -7498,15 +7498,19 @@ function fillet(bk, shape, edges, radius) {
|
|
|
7498
7498
|
}
|
|
7499
7499
|
return solidHandle(bk.filletVariable(solidId, JSON.stringify(spec)));
|
|
7500
7500
|
}
|
|
7501
|
+
/** brepkit's two-distance chamfer, bound to `bk`; throws on builds without it. */
|
|
7502
|
+
function requireChamferAsymmetric(bk, what) {
|
|
7503
|
+
if (typeof bk.chamferAsymmetric !== "function") throw new require_occtWasmAdapter.UnsupportedKernelOperationError(`brepkit: ${what} requires chamferAsymmetric, which this brepkit-wasm build lacks`);
|
|
7504
|
+
return bk.chamferAsymmetric.bind(bk);
|
|
7505
|
+
}
|
|
7501
7506
|
function chamfer(bk, shape, edges, distance) {
|
|
7502
7507
|
const solidId = unwrapSolidOrThrow(shape, "chamfer");
|
|
7503
7508
|
const edgeIds = edges.map((e) => unwrap$1(e, "edge"));
|
|
7504
7509
|
if (typeof distance === "number") return solidHandle(bk.chamfer(solidId, edgeIds, distance));
|
|
7505
7510
|
if (Array.isArray(distance)) {
|
|
7506
7511
|
const [d1, d2] = distance;
|
|
7507
|
-
if (
|
|
7508
|
-
|
|
7509
|
-
return solidHandle(bk.chamfer(solidId, edgeIds, (d1 + d2) / 2));
|
|
7512
|
+
if (d1 === d2) return solidHandle(bk.chamfer(solidId, edgeIds, d1));
|
|
7513
|
+
return solidHandle(requireChamferAsymmetric(bk, "an asymmetric chamfer")(solidId, edgeIds, d1, d2));
|
|
7510
7514
|
}
|
|
7511
7515
|
const groups = /* @__PURE__ */ new Map();
|
|
7512
7516
|
for (const [i, edge] of edges.entries()) {
|
|
@@ -7523,22 +7527,15 @@ function chamfer(bk, shape, edges, distance) {
|
|
|
7523
7527
|
d2
|
|
7524
7528
|
});
|
|
7525
7529
|
}
|
|
7530
|
+
const asymmetric = [...groups.values()].some((g) => g.d1 !== g.d2) ? requireChamferAsymmetric(bk, "an asymmetric chamfer") : void 0;
|
|
7526
7531
|
let result = solidId;
|
|
7527
|
-
for (const group of groups.values())
|
|
7528
|
-
else if (typeof bk.chamferAsymmetric === "function") result = bk.chamferAsymmetric(result, group.ids, group.d1, group.d2);
|
|
7529
|
-
else {
|
|
7530
|
-
warnOnce("chamfer-callback", "chamferAsymmetric not available; asymmetric edges use averaged distance.");
|
|
7531
|
-
result = bk.chamfer(result, group.ids, (group.d1 + group.d2) / 2);
|
|
7532
|
-
}
|
|
7532
|
+
for (const group of groups.values()) result = asymmetric && group.d1 !== group.d2 ? asymmetric(result, group.ids, group.d1, group.d2) : bk.chamfer(result, group.ids, group.d1);
|
|
7533
7533
|
return solidHandle(result);
|
|
7534
7534
|
}
|
|
7535
7535
|
function chamferDistAngle$1(bk, shape, edges, distance, angleDeg) {
|
|
7536
|
+
const asymmetric = requireChamferAsymmetric(bk, "chamferDistAngle");
|
|
7536
7537
|
const d2 = distance * Math.tan(angleDeg * Math.PI / 180);
|
|
7537
|
-
|
|
7538
|
-
const edgeIds = edges.map((e) => unwrap$1(e, "edge"));
|
|
7539
|
-
if (typeof bk.chamferAsymmetric === "function") return solidHandle(bk.chamferAsymmetric(solidId, edgeIds, distance, d2));
|
|
7540
|
-
warnOnce("chamfer-dist-angle", "chamferAsymmetric not available; using averaged distance.");
|
|
7541
|
-
return solidHandle(bk.chamfer(solidId, edgeIds, (distance + d2) / 2));
|
|
7538
|
+
return solidHandle(asymmetric(unwrapSolidOrThrow(shape, "chamferDistAngle"), edges.map((e) => unwrap$1(e, "edge")), distance, d2));
|
|
7542
7539
|
}
|
|
7543
7540
|
function faceCentroid(bk, faceId) {
|
|
7544
7541
|
const verts = toArray(bk.getFaceVertices(faceId));
|
|
@@ -7498,15 +7498,19 @@ function fillet(bk, shape, edges, radius) {
|
|
|
7498
7498
|
}
|
|
7499
7499
|
return solidHandle(bk.filletVariable(solidId, JSON.stringify(spec)));
|
|
7500
7500
|
}
|
|
7501
|
+
/** brepkit's two-distance chamfer, bound to `bk`; throws on builds without it. */
|
|
7502
|
+
function requireChamferAsymmetric(bk, what) {
|
|
7503
|
+
if (typeof bk.chamferAsymmetric !== "function") throw new UnsupportedKernelOperationError(`brepkit: ${what} requires chamferAsymmetric, which this brepkit-wasm build lacks`);
|
|
7504
|
+
return bk.chamferAsymmetric.bind(bk);
|
|
7505
|
+
}
|
|
7501
7506
|
function chamfer(bk, shape, edges, distance) {
|
|
7502
7507
|
const solidId = unwrapSolidOrThrow(shape, "chamfer");
|
|
7503
7508
|
const edgeIds = edges.map((e) => unwrap$1(e, "edge"));
|
|
7504
7509
|
if (typeof distance === "number") return solidHandle(bk.chamfer(solidId, edgeIds, distance));
|
|
7505
7510
|
if (Array.isArray(distance)) {
|
|
7506
7511
|
const [d1, d2] = distance;
|
|
7507
|
-
if (
|
|
7508
|
-
|
|
7509
|
-
return solidHandle(bk.chamfer(solidId, edgeIds, (d1 + d2) / 2));
|
|
7512
|
+
if (d1 === d2) return solidHandle(bk.chamfer(solidId, edgeIds, d1));
|
|
7513
|
+
return solidHandle(requireChamferAsymmetric(bk, "an asymmetric chamfer")(solidId, edgeIds, d1, d2));
|
|
7510
7514
|
}
|
|
7511
7515
|
const groups = /* @__PURE__ */ new Map();
|
|
7512
7516
|
for (const [i, edge] of edges.entries()) {
|
|
@@ -7523,22 +7527,15 @@ function chamfer(bk, shape, edges, distance) {
|
|
|
7523
7527
|
d2
|
|
7524
7528
|
});
|
|
7525
7529
|
}
|
|
7530
|
+
const asymmetric = [...groups.values()].some((g) => g.d1 !== g.d2) ? requireChamferAsymmetric(bk, "an asymmetric chamfer") : void 0;
|
|
7526
7531
|
let result = solidId;
|
|
7527
|
-
for (const group of groups.values())
|
|
7528
|
-
else if (typeof bk.chamferAsymmetric === "function") result = bk.chamferAsymmetric(result, group.ids, group.d1, group.d2);
|
|
7529
|
-
else {
|
|
7530
|
-
warnOnce("chamfer-callback", "chamferAsymmetric not available; asymmetric edges use averaged distance.");
|
|
7531
|
-
result = bk.chamfer(result, group.ids, (group.d1 + group.d2) / 2);
|
|
7532
|
-
}
|
|
7532
|
+
for (const group of groups.values()) result = asymmetric && group.d1 !== group.d2 ? asymmetric(result, group.ids, group.d1, group.d2) : bk.chamfer(result, group.ids, group.d1);
|
|
7533
7533
|
return solidHandle(result);
|
|
7534
7534
|
}
|
|
7535
7535
|
function chamferDistAngle$1(bk, shape, edges, distance, angleDeg) {
|
|
7536
|
+
const asymmetric = requireChamferAsymmetric(bk, "chamferDistAngle");
|
|
7536
7537
|
const d2 = distance * Math.tan(angleDeg * Math.PI / 180);
|
|
7537
|
-
|
|
7538
|
-
const edgeIds = edges.map((e) => unwrap$1(e, "edge"));
|
|
7539
|
-
if (typeof bk.chamferAsymmetric === "function") return solidHandle(bk.chamferAsymmetric(solidId, edgeIds, distance, d2));
|
|
7540
|
-
warnOnce("chamfer-dist-angle", "chamferAsymmetric not available; using averaged distance.");
|
|
7541
|
-
return solidHandle(bk.chamfer(solidId, edgeIds, (distance + d2) / 2));
|
|
7538
|
+
return solidHandle(asymmetric(unwrapSolidOrThrow(shape, "chamferDistAngle"), edges.map((e) => unwrap$1(e, "edge")), distance, d2));
|
|
7542
7539
|
}
|
|
7543
7540
|
function faceCentroid(bk, faceId) {
|
|
7544
7541
|
const verts = toArray(bk.getFaceVertices(faceId));
|
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-CoGp1dM9.cjs");
|
|
3
|
+
const require_drawFns = require("./drawFns-B2CPxqd1.cjs");
|
|
4
|
+
const require_textBlueprints = require("./textBlueprints-ChDNr0L4.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-rk64lh8e.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-BKKWQ4JW.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-DCorV4gM.js";
|
|
4
4
|
// src/sketching.ts
|
|
5
5
|
/**
|
|
6
6
|
* brepjs/sketching — Sketcher, Drawing, and sketch-to-shape operations.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { C as isSolid, G as _usingCtx, S as isShell, d as createSolid, f as createVertex, h as disposeResultShape, n as castResultShape, q as getKernel, s as createCompound, x as isShape3D } from "./shapeTypes-
|
|
1
|
+
import { C as isSolid, G as _usingCtx, S as isShell, d as createSolid, f as createVertex, h as disposeResultShape, n as castResultShape, q as getKernel, s as createCompound, x as isShape3D } from "./shapeTypes-DfBx__EF.js";
|
|
2
2
|
import { E as ok, g as err, l as typeCastError, m as andThen } from "./errors-BTccWbtE.js";
|
|
3
|
-
import { C as subShapeHashes, c as getFaces, l as getOrCreateCache, r as getCacheEntry } from "./topologyQueryFns-
|
|
3
|
+
import { C as subShapeHashes, c as getFaces, l as getOrCreateCache, r as getCacheEntry } from "./topologyQueryFns-CTCsQIH_.js";
|
|
4
4
|
import { n as HASH_CODE_MAX } from "./constants-iraOnb2p.js";
|
|
5
|
-
import { _ as cast, y as downcast } from "./faceFns-
|
|
5
|
+
import { _ as cast, y as downcast } from "./faceFns-B3vblI_s.js";
|
|
6
6
|
// src/topology/metadata/originTrackingFns.ts
|
|
7
7
|
/**
|
|
8
8
|
* Face origin tracking — tag faces with integer origins and propagate
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-C0NcoN5g.cjs");
|
|
2
2
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-svM8Yfsk.cjs");
|
|
4
4
|
const require_constants = require("./constants-oee0S_x6.cjs");
|
|
5
|
-
const require_faceFns = require("./faceFns-
|
|
5
|
+
const require_faceFns = require("./faceFns-C1Ii1MJ-.cjs");
|
|
6
6
|
// src/topology/metadata/originTrackingFns.ts
|
|
7
7
|
/**
|
|
8
8
|
* Face origin tracking — tag faces with integer origins and propagate
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-C0NcoN5g.cjs");
|
|
2
2
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
3
|
-
const require_validityTypes = require("./validityTypes-
|
|
4
|
-
const require_faceFns = require("./faceFns-
|
|
3
|
+
const require_validityTypes = require("./validityTypes-BCUWXQNA.cjs");
|
|
4
|
+
const require_faceFns = require("./faceFns-C1Ii1MJ-.cjs");
|
|
5
5
|
// src/utils/range.ts
|
|
6
6
|
/** Generate an array of integers `[0, 1, …, len - 1]`. */
|
|
7
7
|
function range(len) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { G as _usingCtx, N as DisposalScope, c as createEdge, l as createFace, p as createWire, q as getKernel, y as isFace } from "./shapeTypes-
|
|
1
|
+
import { G as _usingCtx, N as DisposalScope, c as createEdge, l as createFace, p as createWire, q as getKernel, y as isFace } from "./shapeTypes-DfBx__EF.js";
|
|
2
2
|
import { E as ok, d as validationError, g as err, i as kernelError, m as andThen } from "./errors-BTccWbtE.js";
|
|
3
|
-
import { a as isPlanarFace } from "./validityTypes-
|
|
4
|
-
import { _ as cast, u as outerWire } from "./faceFns-
|
|
3
|
+
import { a as isPlanarFace } from "./validityTypes-DrWg6_qM.js";
|
|
4
|
+
import { _ as cast, u as outerWire } from "./faceFns-B3vblI_s.js";
|
|
5
5
|
// src/utils/range.ts
|
|
6
6
|
/** Generate an array of integers `[0, 1, …, len - 1]`. */
|
|
7
7
|
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-ChDNr0L4.cjs");
|
|
3
|
+
const require_textMetrics = require("./textMetrics-C0qTX3sH.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 { i as setFallbackFont, 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 { i as setFallbackFont, n as getFont, r as loadFont, t as textBlueprints } from "./textBlueprints-DCorV4gM.js";
|
|
2
|
+
import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-ByzyMC1I.js";
|
|
3
3
|
export { fontMetrics, getFont, loadFont, setFallbackFont, sketchText, textBlueprints, textMetrics };
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-BW-eSwOZ.cjs");
|
|
2
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
+
const require_shapeTypes = require("./shapeTypes-C0NcoN5g.cjs");
|
|
3
3
|
const require_bug = require("./bug-CBcpIPuf.cjs");
|
|
4
4
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
5
5
|
const require_constants = require("./constants-oee0S_x6.cjs");
|
|
6
6
|
const require_types = require("./types-CjF9Rofr.cjs");
|
|
7
7
|
const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
|
|
8
8
|
const require_planeOps = require("./planeOps-DZfLToKZ.cjs");
|
|
9
|
-
const require_faceFns = require("./faceFns-
|
|
10
|
-
const require_solidBuilders = require("./solidBuilders-
|
|
11
|
-
const require_booleanFns = require("./booleanFns-
|
|
9
|
+
const require_faceFns = require("./faceFns-C1Ii1MJ-.cjs");
|
|
10
|
+
const require_solidBuilders = require("./solidBuilders-VPkj5ChQ.cjs");
|
|
11
|
+
const require_booleanFns = require("./booleanFns-ewBwy7V_.cjs");
|
|
12
12
|
const require_faceRoleFns = require("./faceRoleFns-Db5bYj4Q.cjs");
|
|
13
|
-
const require_curveFns = require("./curveFns-
|
|
13
|
+
const require_curveFns = require("./curveFns-DK5eG57I.cjs");
|
|
14
14
|
const require_arrayAccess = require("./arrayAccess-DpJYARwv.cjs");
|
|
15
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
16
|
-
const require_blueprintSketcher = require("./blueprintSketcher-
|
|
17
|
-
const require_loftFns = require("./loftFns-
|
|
15
|
+
const require_surfaceBuilders = require("./surfaceBuilders-DQre19g8.cjs");
|
|
16
|
+
const require_blueprintSketcher = require("./blueprintSketcher-CoGp1dM9.cjs");
|
|
17
|
+
const require_loftFns = require("./loftFns-CzERU_TY.cjs");
|
|
18
18
|
let opentype_js = require("opentype.js");
|
|
19
19
|
opentype_js = require_rolldown_runtime.__toESM(opentype_js, 1);
|
|
20
20
|
// src/topology/shapeRef/extrudeRoleFns.ts
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { d as createSolid, h as disposeResultShape, l as createFace, m as disposeDowncastSource, n as castResultShape, p as createWire, q as getKernel, x as isShape3D } from "./shapeTypes-
|
|
1
|
+
import { d as createSolid, h as disposeResultShape, l as createFace, m as disposeDowncastSource, n as castResultShape, p as createWire, q as getKernel, x as isShape3D } from "./shapeTypes-DfBx__EF.js";
|
|
2
2
|
import { n as bug } from "./bug-ClMTAJhe.js";
|
|
3
3
|
import { E as ok, P as unwrap, d as validationError, g as err, i as kernelError, l as typeCastError, r as ioError, t as BrepErrorCode } from "./errors-BTccWbtE.js";
|
|
4
4
|
import { n as HASH_CODE_MAX } from "./constants-iraOnb2p.js";
|
|
5
5
|
import { r as toVec3 } from "./types-CKXsIm9-.js";
|
|
6
6
|
import { c as vecLength, d as vecNormalize, h as vecScale, i as vecDistance, r as vecCross, t as vecAdd } from "./vecOps-S-m9H_fe.js";
|
|
7
7
|
import { n as createPlane } from "./planeOps-D3yDuMux.js";
|
|
8
|
-
import { v as copyShape } from "./faceFns-
|
|
9
|
-
import { o as makeSolid, t as makeCompound } from "./solidBuilders-
|
|
10
|
-
import { i as cutAll } from "./booleanFns-
|
|
8
|
+
import { v as copyShape } from "./faceFns-B3vblI_s.js";
|
|
9
|
+
import { o as makeSolid, t as makeCompound } from "./solidBuilders-BZ1qXlFZ.js";
|
|
10
|
+
import { i as cutAll } from "./booleanFns-CjIZaNBh.js";
|
|
11
11
|
import { i as setFaceRoles } from "./faceRoleFns-BPxzQF-n.js";
|
|
12
|
-
import { l as curveStartPoint, u as curveTangentAt } from "./curveFns-
|
|
12
|
+
import { l as curveStartPoint, u as curveTangentAt } from "./curveFns-CUrIF9LG.js";
|
|
13
13
|
import { n as getAtOrThrow, t as firstOrThrow } from "./arrayAccess-BpgouNir.js";
|
|
14
|
-
import { i as makeNewFaceWithinFace, r as makeFace, t as addHolesInFace } from "./surfaceBuilders-
|
|
15
|
-
import { r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-
|
|
16
|
-
import { c as twistExtrude, r as complexExtrude, s as sweep, t as loft } from "./loftFns-
|
|
14
|
+
import { i as makeNewFaceWithinFace, r as makeFace, t as addHolesInFace } from "./surfaceBuilders-sBre5aYy.js";
|
|
15
|
+
import { r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-rk64lh8e.js";
|
|
16
|
+
import { c as twistExtrude, r as complexExtrude, s as sweep, t as loft } from "./loftFns-BJqF1p_f.js";
|
|
17
17
|
import opentype from "opentype.js";
|
|
18
18
|
// src/topology/shapeRef/extrudeRoleFns.ts
|
|
19
19
|
/** Match tolerance as a fraction of the extrusion's size. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { E as ok, d as validationError, g as err, t as BrepErrorCode } from "./errors-BTccWbtE.js";
|
|
2
|
-
import { _ as wrapSketchData, a as Sketches, n as getFont, t as textBlueprints, y as CompoundSketch } from "./textBlueprints-
|
|
2
|
+
import { _ as wrapSketchData, a as Sketches, n as getFont, t as textBlueprints, y as CompoundSketch } from "./textBlueprints-DCorV4gM.js";
|
|
3
3
|
// src/text/sketchText.ts
|
|
4
4
|
/**
|
|
5
5
|
* Render text as 3D sketch outlines on a plane.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
2
|
-
const require_textBlueprints = require("./textBlueprints-
|
|
2
|
+
const require_textBlueprints = require("./textBlueprints-ChDNr0L4.cjs");
|
|
3
3
|
// src/text/sketchText.ts
|
|
4
4
|
/**
|
|
5
5
|
* Render text as 3D sketch outlines on a plane.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { F as createKernelHandle, G as _usingCtx, N as DisposalScope, n as castResultShape, q as getKernel, x as isShape3D } from "./shapeTypes-
|
|
1
|
+
import { F as createKernelHandle, G as _usingCtx, N as DisposalScope, n as castResultShape, q as getKernel, x as isShape3D } from "./shapeTypes-DfBx__EF.js";
|
|
2
2
|
import { E as ok, d as validationError, g as err, n as computationError, r as ioError, t as BrepErrorCode, x as isOk } from "./errors-BTccWbtE.js";
|
|
3
3
|
import { d as vecNormalize, s as vecIsZero } from "./vecOps-S-m9H_fe.js";
|
|
4
|
-
import { b as fromBREP } from "./faceFns-
|
|
5
|
-
import { o as fuseAll } from "./booleanFns-
|
|
6
|
-
import { E as wire, h as line } from "./primitiveFns-
|
|
7
|
-
import { s as toBREP, t as clone } from "./shapeFns-
|
|
8
|
-
import { t as loft } from "./loftFns-
|
|
9
|
-
import { c as resolveRefParams } from "./refResolveFns-
|
|
4
|
+
import { b as fromBREP } from "./faceFns-B3vblI_s.js";
|
|
5
|
+
import { o as fuseAll } from "./booleanFns-CjIZaNBh.js";
|
|
6
|
+
import { E as wire, h as line } from "./primitiveFns-BzJi89Y6.js";
|
|
7
|
+
import { s as toBREP, t as clone } from "./shapeFns-381QqZ8n.js";
|
|
8
|
+
import { t as loft } from "./loftFns-BJqF1p_f.js";
|
|
9
|
+
import { c as resolveRefParams } from "./refResolveFns-dNAt7W9t.js";
|
|
10
10
|
// src/utils/uuid.ts
|
|
11
11
|
/** Generate a v4-style UUID string using `crypto.getRandomValues`. */
|
|
12
12
|
function uuidv() {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-C0NcoN5g.cjs");
|
|
2
2
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
3
3
|
const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
|
|
4
|
-
const require_faceFns = require("./faceFns-
|
|
5
|
-
const require_booleanFns = require("./booleanFns-
|
|
6
|
-
const require_primitiveFns = require("./primitiveFns-
|
|
7
|
-
const require_shapeFns = require("./shapeFns-
|
|
8
|
-
const require_loftFns = require("./loftFns-
|
|
9
|
-
const require_refResolveFns = require("./refResolveFns-
|
|
4
|
+
const require_faceFns = require("./faceFns-C1Ii1MJ-.cjs");
|
|
5
|
+
const require_booleanFns = require("./booleanFns-ewBwy7V_.cjs");
|
|
6
|
+
const require_primitiveFns = require("./primitiveFns-1FcmvZ6Y.cjs");
|
|
7
|
+
const require_shapeFns = require("./shapeFns-DhTfkxbN.cjs");
|
|
8
|
+
const require_loftFns = require("./loftFns-CzERU_TY.cjs");
|
|
9
|
+
const require_refResolveFns = require("./refResolveFns-By31fyEv.cjs");
|
|
10
10
|
// src/utils/uuid.ts
|
|
11
11
|
/** Generate a v4-style UUID string using `crypto.getRandomValues`. */
|
|
12
12
|
function uuidv() {
|
|
@@ -27,8 +27,10 @@ export type FilletRadius = number | [number, number] | ((edge: Edge<Dimension>)
|
|
|
27
27
|
* Chamfer distance specification.
|
|
28
28
|
*
|
|
29
29
|
* - `number` — equal distance
|
|
30
|
-
* - `[number, number]` — asymmetric distances (dist1, dist2)
|
|
31
|
-
*
|
|
30
|
+
* - `[number, number]` — asymmetric distances (dist1, dist2). brepkit has no asymmetric
|
|
31
|
+
* chamfer and returns an `UNSUPPORTED_CAPABILITY` error for two different distances.
|
|
32
|
+
* - `{ distance, angle }` — distance-angle mode (replaces chamferDistAngleShape); angle in degrees.
|
|
33
|
+
* brepkit has no distance-angle chamfer and returns an `UNSUPPORTED_CAPABILITY` error.
|
|
32
34
|
* - callback — per-edge value of any of the above; return `null` (or a non-positive
|
|
33
35
|
* distance) to skip an edge. The edges it keeps must all get plain distances or all
|
|
34
36
|
* get `{ distance, angle }`: mixing the two is an `INVALID_CHAMFER_DISTANCE` error.
|
|
@@ -10,7 +10,9 @@ import { Result } from '../core/result.js';
|
|
|
10
10
|
* @param edges - Edges to chamfer (must not be empty).
|
|
11
11
|
* @param distance - Chamfer distance along the face (must be positive).
|
|
12
12
|
* @param angleDeg - Chamfer angle in degrees (must be in range (0, 90)).
|
|
13
|
-
* @returns Ok with the chamfered shape, or Err on invalid input or kernel
|
|
13
|
+
* @returns Ok with the chamfered shape, or Err on invalid input or kernel
|
|
14
|
+
* failure. A kernel without a distance-angle chamfer (brepkit) returns
|
|
15
|
+
* `UNSUPPORTED_CAPABILITY`.
|
|
14
16
|
*
|
|
15
17
|
* @remarks Uses `BRepFilletAPI_MakeChamfer.AddDA(dist, angle, edge, face)` internally.
|
|
16
18
|
*/
|
|
@@ -27,9 +29,9 @@ export interface EdgeDistAngle {
|
|
|
27
29
|
* Chamfer each edge by its own distance and angle, in one operation.
|
|
28
30
|
*
|
|
29
31
|
* Edges that all share one distance and angle go through
|
|
30
|
-
* {@link chamferDistAngle}, which every kernel provides. Different
|
|
31
|
-
* a kernel with a per-edge distance-angle chamfer (occt-wasm 5.9.0
|
|
32
|
-
* on any other kernel the result is an `UNSUPPORTED_CAPABILITY` error. On
|
|
32
|
+
* {@link chamferDistAngle}, which every kernel but brepkit provides. Different
|
|
33
|
+
* values need a kernel with a per-edge distance-angle chamfer (occt-wasm 5.9.0
|
|
34
|
+
* or later); on any other kernel the result is an `UNSUPPORTED_CAPABILITY` error. On
|
|
33
35
|
* occt-wasm the edges of one tangent-continuous contour must share their
|
|
34
36
|
* distance and angle, or the result is `CHAMFER_ANGLE_FAILED`.
|
|
35
37
|
*
|
|
@@ -56,6 +56,8 @@ export declare function filletWithEvolution(shape: ValidSolid, edges: ReadonlyAr
|
|
|
56
56
|
* @param shape - The shape to modify.
|
|
57
57
|
* @param edges - Edges to chamfer. Pass `undefined` to chamfer all edges.
|
|
58
58
|
* @param distance - Symmetric distance, asymmetric `[d1, d2]`, or per-edge callback.
|
|
59
|
+
* @returns Err `UNSUPPORTED_CAPABILITY` when the kernel cannot build the
|
|
60
|
+
* distances asked for (brepkit has no asymmetric chamfer).
|
|
59
61
|
*/
|
|
60
62
|
export declare function chamferWithEvolution(shape: ValidSolid, edges: ReadonlyArray<Edge> | undefined, distance: number | [number, number] | ((edge: Edge) => number | [number, number] | null)): Result<EvolutionResult<ValidSolid>>;
|
|
61
63
|
/**
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Edge, Face, Shell, Solid } from '../core/shapeTypes.js';
|
|
2
2
|
import { ValidSolid } from '../core/validityTypes.js';
|
|
3
3
|
import { Result } from '../core/result.js';
|
|
4
|
+
import { BrepError } from '../core/errors.js';
|
|
4
5
|
import { Vec3 } from '../core/types.js';
|
|
5
6
|
import { DraftAngle } from './apiTypes.js';
|
|
6
7
|
/**
|
|
@@ -21,12 +22,19 @@ export declare function thicken(shape: Face | Shell, thickness: number): Result<
|
|
|
21
22
|
export declare function fillet(shape: ValidSolid, edges: ReadonlyArray<Edge> | undefined, radius: number | [number, number] | ((edge: Edge) => number | [number, number] | null), { trackEvolution }?: {
|
|
22
23
|
trackEvolution?: boolean | undefined;
|
|
23
24
|
}): Result<ValidSolid>;
|
|
25
|
+
/**
|
|
26
|
+
* `UNSUPPORTED_CAPABILITY` for a chamfer the kernel cannot build as asked
|
|
27
|
+
* (asymmetric or per-edge distances), from its `UnsupportedKernelOperationError`.
|
|
28
|
+
*/
|
|
29
|
+
export declare function chamferUnsupportedError(e: unknown): BrepError;
|
|
24
30
|
/**
|
|
25
31
|
* Apply a chamfer (beveled edge) to selected edges of a 3D shape.
|
|
26
32
|
*
|
|
27
33
|
* @param shape - The shape to modify.
|
|
28
34
|
* @param edges - Edges to chamfer. Pass `undefined` to chamfer all edges.
|
|
29
35
|
* @param distance - Symmetric distance, asymmetric `[d1, d2]`, or per-edge callback.
|
|
36
|
+
* @returns Err `UNSUPPORTED_CAPABILITY` when the kernel cannot build the
|
|
37
|
+
* distances asked for (brepkit has no asymmetric chamfer).
|
|
30
38
|
*/
|
|
31
39
|
export declare function chamfer(shape: ValidSolid, edges: ReadonlyArray<Edge> | undefined, distance: number | [number, number] | ((edge: Edge) => number | [number, number] | null)): Result<ValidSolid>;
|
|
32
40
|
/**
|
package/dist/topology.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
-
const require_faceFns = require("./faceFns-
|
|
4
|
-
const require_booleanFns = require("./booleanFns-
|
|
5
|
-
const require_primitiveFns = require("./primitiveFns-
|
|
6
|
-
const require_shapeFns = require("./shapeFns-
|
|
7
|
-
const require_curveFns = require("./curveFns-
|
|
8
|
-
const require_meshFns = require("./meshFns-
|
|
9
|
-
const require_healingFns = require("./healingFns-
|
|
10
|
-
const require_adjacencyFns = require("./adjacencyFns-
|
|
2
|
+
const require_topologyQueryFns = require("./topologyQueryFns-svM8Yfsk.cjs");
|
|
3
|
+
const require_faceFns = require("./faceFns-C1Ii1MJ-.cjs");
|
|
4
|
+
const require_booleanFns = require("./booleanFns-ewBwy7V_.cjs");
|
|
5
|
+
const require_primitiveFns = require("./primitiveFns-1FcmvZ6Y.cjs");
|
|
6
|
+
const require_shapeFns = require("./shapeFns-DhTfkxbN.cjs");
|
|
7
|
+
const require_curveFns = require("./curveFns-DK5eG57I.cjs");
|
|
8
|
+
const require_meshFns = require("./meshFns-BDn_nIVv.cjs");
|
|
9
|
+
const require_healingFns = require("./healingFns-sfguIlrW.cjs");
|
|
10
|
+
const require_adjacencyFns = require("./adjacencyFns-Djv832MP.cjs");
|
|
11
11
|
exports.addHoles = require_primitiveFns.addHoles;
|
|
12
12
|
exports.adjacentFaces = require_adjacencyFns.adjacentFaces;
|
|
13
13
|
exports.approximateCurve = require_curveFns.approximateCurve;
|
package/dist/topology.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { _ as iterFaces, b as iterVertices, c as getFaces, f as getVertices, g as iterEdges, m as invalidateShapeCache, n as getBounds, p as getWires, s as getEdges, w as vertexPosition, x as iterWires } from "./topologyQueryFns-
|
|
2
|
-
import { C as shapeType, S as iterTopo, _ as cast, a as faceOrientation, b as fromBREP, c as innerWires, d as pointOnSurface, f as projectPointOnFace, g as asTopo, h as uvCoordinates, i as faceGeomType, l as normalAt, m as uvBounds, n as faceAxis, o as flipFaceOrientation, r as faceCenter, s as getSurfaceType, t as classifyPointOnFace, u as outerWire, x as isCompSolid, y as downcast } from "./faceFns-
|
|
3
|
-
import { i as cutAll, o as fuseAll } from "./booleanFns-
|
|
4
|
-
import { C as threePointArc, D as wireLoop, E as wire, S as tangentArc, T as vertex, _ as polygon, a as circle, b as sphere, c as cylinder, d as ellipsoid, f as face, g as offsetFace, h as line, i as bsplineApprox, l as ellipse, m as helix, n as bezier, o as compound, p as filledFace, r as box, s as cone, t as addHoles, u as ellipseArc, v as sewShells, w as torus, x as subFace, y as solid } from "./primitiveFns-
|
|
5
|
-
import { a as isSameShape, i as isEqualShape, n as getHashCode } from "./shapeFns-
|
|
6
|
-
import { a as curveIsPeriodic, c as curvePointAt, d as flipOrientation, f as getCurveType, h as offsetWire2D, i as curveIsClosed, l as curveStartPoint, m as interpolateCurve, n as curveAxis, o as curveLength, p as getOrientation, r as curveEndPoint, s as curvePeriod, t as approximateCurve, u as curveTangentAt } from "./curveFns-
|
|
7
|
-
import { f as clearMeshCache, n as exportSTEP, p as createMeshCache, r as exportSTL, t as exportIGES } from "./meshFns-
|
|
8
|
-
import { I as toLineGeometryData, M as toBufferGeometryData, N as toGroupedBufferGeometryData, S as chamferDistAngle, _ as checkBoolean, a as healFace, b as getNurbsCurveData, d as chamferWithEvolution, f as cutWithEvolution, g as shellWithEvolution, h as intersectWithEvolution, j as variableFillet, l as solidFromShell, m as fuseWithEvolution, n as fixSelfIntersection, o as healSolid, p as filletWithEvolution, r as fixShape, s as healWire, t as autoHeal, u as positionOnCurve, v as cutAllBisect, x as getNurbsSurfaceData, y as fuseAllBisect } from "./healingFns-
|
|
9
|
-
import { i as facesOfEdge, l as wiresOfFace, n as adjacentFaces, o as sharedEdges, r as edgesOfFace, s as verticesOfEdge } from "./adjacencyFns-
|
|
1
|
+
import { _ as iterFaces, b as iterVertices, c as getFaces, f as getVertices, g as iterEdges, m as invalidateShapeCache, n as getBounds, p as getWires, s as getEdges, w as vertexPosition, x as iterWires } from "./topologyQueryFns-CTCsQIH_.js";
|
|
2
|
+
import { C as shapeType, S as iterTopo, _ as cast, a as faceOrientation, b as fromBREP, c as innerWires, d as pointOnSurface, f as projectPointOnFace, g as asTopo, h as uvCoordinates, i as faceGeomType, l as normalAt, m as uvBounds, n as faceAxis, o as flipFaceOrientation, r as faceCenter, s as getSurfaceType, t as classifyPointOnFace, u as outerWire, x as isCompSolid, y as downcast } from "./faceFns-B3vblI_s.js";
|
|
3
|
+
import { i as cutAll, o as fuseAll } from "./booleanFns-CjIZaNBh.js";
|
|
4
|
+
import { C as threePointArc, D as wireLoop, E as wire, S as tangentArc, T as vertex, _ as polygon, a as circle, b as sphere, c as cylinder, d as ellipsoid, f as face, g as offsetFace, h as line, i as bsplineApprox, l as ellipse, m as helix, n as bezier, o as compound, p as filledFace, r as box, s as cone, t as addHoles, u as ellipseArc, v as sewShells, w as torus, x as subFace, y as solid } from "./primitiveFns-BzJi89Y6.js";
|
|
5
|
+
import { a as isSameShape, i as isEqualShape, n as getHashCode } from "./shapeFns-381QqZ8n.js";
|
|
6
|
+
import { a as curveIsPeriodic, c as curvePointAt, d as flipOrientation, f as getCurveType, h as offsetWire2D, i as curveIsClosed, l as curveStartPoint, m as interpolateCurve, n as curveAxis, o as curveLength, p as getOrientation, r as curveEndPoint, s as curvePeriod, t as approximateCurve, u as curveTangentAt } from "./curveFns-CUrIF9LG.js";
|
|
7
|
+
import { f as clearMeshCache, n as exportSTEP, p as createMeshCache, r as exportSTL, t as exportIGES } from "./meshFns-Cp8uEpVt.js";
|
|
8
|
+
import { I as toLineGeometryData, M as toBufferGeometryData, N as toGroupedBufferGeometryData, S as chamferDistAngle, _ as checkBoolean, a as healFace, b as getNurbsCurveData, d as chamferWithEvolution, f as cutWithEvolution, g as shellWithEvolution, h as intersectWithEvolution, j as variableFillet, l as solidFromShell, m as fuseWithEvolution, n as fixSelfIntersection, o as healSolid, p as filletWithEvolution, r as fixShape, s as healWire, t as autoHeal, u as positionOnCurve, v as cutAllBisect, x as getNurbsSurfaceData, y as fuseAllBisect } from "./healingFns-CqiHrJcx.js";
|
|
9
|
+
import { i as facesOfEdge, l as wiresOfFace, n as adjacentFaces, o as sharedEdges, r as edgesOfFace, s as verticesOfEdge } from "./adjacencyFns-DBN26xm_.js";
|
|
10
10
|
export { addHoles, adjacentFaces, approximateCurve, asTopo, autoHeal, bezier, box, bsplineApprox, cast, chamferDistAngle as chamferDistAngleShape, chamferWithEvolution, checkBoolean, circle, classifyPointOnFace, clearMeshCache, compound, cone, createMeshCache, curveAxis, curveEndPoint, curveIsClosed, curveIsPeriodic, curveLength, curvePeriod, curvePointAt, curveStartPoint, curveTangentAt, cutAll, cutAllBisect, cutWithEvolution, cylinder, fromBREP as deserializeShape, downcast, edgesOfFace, ellipse, ellipseArc, ellipsoid, exportIGES, exportSTEP, exportSTL, face, faceAxis, faceCenter, faceGeomType, faceOrientation, facesOfEdge, filledFace, filletWithEvolution, fixSelfIntersection, fixShape, flipFaceOrientation, flipOrientation, fuseAll, fuseAllBisect, fuseWithEvolution, getBounds, getCurveType, getEdges, getFaces, getHashCode, getNurbsCurveData, getNurbsSurfaceData, getOrientation, getSurfaceType, getVertices, getWires, healFace, healSolid, healWire, helix, innerWires, interpolateCurve, intersectWithEvolution, invalidateShapeCache, isCompSolid, isEqualShape, isSameShape, iterEdges, iterFaces, iterTopo, iterVertices, iterWires, line, normalAt, offsetFace, offsetWire2D, outerWire, pointOnSurface, polygon, positionOnCurve, projectPointOnFace, sewShells, shapeType, sharedEdges, shellWithEvolution, solid, solidFromShell, sphere, subFace, tangentArc, threePointArc, toBufferGeometryData, toGroupedBufferGeometryData, toLineGeometryData, torus, uvBounds, uvCoordinates, variableFillet, vertex, vertexPosition, verticesOfEdge, wire, wireLoop, wiresOfFace };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { G as _usingCtx, N as DisposalScope, O as getOrQueryType, n as castResultShape, q as getKernel, r as castResultShapeWithKnownType } from "./shapeTypes-
|
|
1
|
+
import { G as _usingCtx, N as DisposalScope, O as getOrQueryType, n as castResultShape, q as getKernel, r as castResultShapeWithKnownType } from "./shapeTypes-DfBx__EF.js";
|
|
2
2
|
import { E as ok, g as err } from "./errors-BTccWbtE.js";
|
|
3
3
|
import { n as HASH_CODE_MAX } from "./constants-iraOnb2p.js";
|
|
4
4
|
// src/core/kernelErrorTranslation.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-C0NcoN5g.cjs");
|
|
2
2
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
3
3
|
const require_constants = require("./constants-oee0S_x6.cjs");
|
|
4
4
|
// src/core/kernelErrorTranslation.ts
|