brepjs 20.12.4 → 20.12.6
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/lib/offset.d.ts +1 -1
- package/dist/2d.cjs +6 -6
- package/dist/2d.js +6 -6
- package/dist/{adjacencyFns-54UTqtan.js → adjacencyFns--KmBIKYJ.js} +3 -3
- package/dist/{adjacencyFns-C_Vb1AeW.cjs → adjacencyFns-BFJfaUwX.cjs} +3 -3
- package/dist/{blueprint-DFpjcrlm.js → blueprint-BhIk9Pvm.js} +7 -8
- package/dist/{blueprint-D0VEeTzJ.cjs → blueprint-D83DDDPb.cjs} +7 -8
- package/dist/{blueprintFns-Douf5ZdX.cjs → blueprintFns-C4TQn-x_.cjs} +2 -2
- package/dist/{blueprintFns-Dye1jezD.js → blueprintFns-eULVgkq9.js} +2 -2
- package/dist/{blueprintSketcher-Cr0Lr1Dq.js → blueprintSketcher-D_Faf0GO.js} +32 -14
- package/dist/{blueprintSketcher-W9yON-UC.cjs → blueprintSketcher-Di376t-0.cjs} +32 -14
- package/dist/{boolean2D-C9VghXHG.cjs → boolean2D-CNZFI_y8.cjs} +4 -4
- package/dist/{boolean2D-CCV3R6lN.js → boolean2D-DqpCF72W.js} +4 -4
- package/dist/brepjs.cjs +128 -100
- package/dist/brepjs.js +128 -100
- package/dist/{cameraFns-DZOI_ewG.js → cameraFns-CrClIkmV.js} +3 -3
- package/dist/{cameraFns-x3L6dtA8.cjs → cameraFns-RqraCXIc.cjs} +3 -3
- package/dist/core.cjs +2 -2
- package/dist/core.js +2 -2
- package/dist/{cornerFinder-BY10jciz.js → cornerFinder-BZuQkRp2.js} +1 -1
- package/dist/{cornerFinder-B8PqO4um.cjs → cornerFinder-CdOe1Wrb.cjs} +1 -1
- package/dist/{curveFns-B4308HNM.js → curveFns-BP3srCfK.js} +1 -1
- package/dist/{curveFns-8lUhNquZ.cjs → curveFns-CyIvQNYT.cjs} +1 -1
- package/dist/{drawFns-C7zAvera.cjs → drawFns-71cOhWD-.cjs} +29 -16
- package/dist/{drawFns-DjnU3fEd.js → drawFns-DxDwJ5zZ.js} +29 -16
- package/dist/{faceFns-BjmlYcc9.cjs → faceFns-B7MiDYj1.cjs} +2 -2
- package/dist/{faceFns-7eHqNM0P.js → faceFns-iVPbTxki.js} +2 -2
- package/dist/{healingFns-BW7mZ_SW.js → healingFns-BhP8zfp1.js} +5 -5
- package/dist/{healingFns-CYLIcIWv.cjs → healingFns-DWljGTNR.cjs} +5 -5
- package/dist/{helpers-BQ6XMFcm.js → helpers-D2hANLRu.js} +14 -10
- package/dist/{helpers-De0Z_6iV.cjs → helpers-DKEVm6Hu.cjs} +14 -10
- package/dist/{importFns-BCL4-H8e.js → importFns-DUzIkns7.js} +2 -2
- package/dist/{importFns-3IMBHQrQ.cjs → importFns-KEPAgbjj.cjs} +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/io.cjs +2 -2
- package/dist/io.js +2 -2
- package/dist/kernel/bspline2dFit.d.ts +42 -0
- package/dist/kernel/geometry2d.d.ts +45 -0
- package/dist/kernel/occt/kernel2dOps.d.ts +1 -1
- package/dist/kernel/occtWasm/constructionOps.d.ts +1 -1
- package/dist/kernel/occtWasm/kernel2dOps.d.ts +7 -4
- package/dist/kernel/occtWasm/occtWasmAdapter.cjs +1 -1
- package/dist/kernel/occtWasm/occtWasmAdapter.d.ts +3 -3
- package/dist/kernel/occtWasm/occtWasmAdapter.js +1 -1
- package/dist/kernel/occtWasm/occtWasmTypes.d.ts +7 -0
- package/dist/{loftFns-DlG5oR0X.cjs → loftFns-D5AvfCGG.cjs} +17 -2
- package/dist/{loftFns-H4ZOpRAk.js → loftFns-D5NJpHLZ.js} +17 -2
- package/dist/{measureFns-Ce01LVwq.cjs → measureFns-CZHNWkiA.cjs} +102 -35
- package/dist/{measureFns-1IfNe629.js → measureFns-mxBdPiWa.js} +102 -35
- package/dist/measurement/measureFns.d.ts +3 -2
- package/dist/measurement.cjs +2 -2
- package/dist/measurement.js +2 -2
- package/dist/{meshFns-nEvfwNRF.cjs → meshFns-Czlt-GBJ.cjs} +3 -3
- package/dist/{meshFns-DaRZxa7B.js → meshFns-DmjMzNbH.js} +3 -3
- package/dist/{occtWasmAdapter-ipKUdNLN.js → occtWasmAdapter-B9d0Q0Vl.js} +1160 -261
- package/dist/{occtWasmAdapter-CRd9RFEu.cjs → occtWasmAdapter-DVxLkjlJ.cjs} +1171 -260
- package/dist/operations/patternFns.d.ts +6 -1
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/{originTrackingFns-zrksCJTa.js → originTrackingFns-CBnyKLm7.js} +2 -2
- package/dist/{originTrackingFns-9gyCMFFQ.cjs → originTrackingFns-CHymOLLm.cjs} +2 -2
- package/dist/{primitiveFns-BRXZ7jnP.cjs → primitiveFns-BVeBEaa4.cjs} +7 -14
- package/dist/{primitiveFns-ClQP6zMQ.js → primitiveFns-DeNl60Rw.js} +7 -14
- package/dist/{principalBoxFns-DsfWOoXg.js → principalBoxFns-3mW_hA6z.js} +3 -3
- package/dist/{principalBoxFns-tIv-crMB.cjs → principalBoxFns-CG6kG7vT.cjs} +3 -3
- package/dist/projection.cjs +1 -1
- package/dist/projection.js +1 -1
- package/dist/query/finderCore.d.ts +7 -7
- package/dist/query.cjs +2 -2
- package/dist/query.js +2 -2
- package/dist/{refResolveFns-BZdUlv9f.cjs → refResolveFns-BAs4p9z7.cjs} +6 -6
- package/dist/{refResolveFns-BG3JGs--.js → refResolveFns-DHx1Y3GG.js} +6 -6
- package/dist/{shapeFns-BbXqiNqY.cjs → shapeFns-C0w8vvfb.cjs} +2 -2
- package/dist/{shapeFns-BCgegapL.js → shapeFns-CgqKICF_.js} +2 -2
- package/dist/shapeRef.cjs +1 -1
- package/dist/shapeRef.js +1 -1
- package/dist/{shapeTypes-DJT3SnGK.cjs → shapeTypes-Dc7j-MYg.cjs} +10 -16
- package/dist/{shapeTypes-DAz6aAnJ.js → shapeTypes-DwvQUp9M.js} +10 -16
- package/dist/sketching/sketches.d.ts +2 -0
- package/dist/sketching.cjs +3 -3
- package/dist/sketching.js +3 -3
- package/dist/{solidBuilders-8xytLt8-.js → solidBuilders-DT1gpVWM.js} +5 -5
- package/dist/{solidBuilders-BWbqhbyv.cjs → solidBuilders-iS5DDwg8.cjs} +5 -5
- package/dist/{surfaceBuilders-CwG_RPdZ.cjs → surfaceBuilders-BvwSgD3C.cjs} +3 -3
- package/dist/{surfaceBuilders-BO96DMCH.js → surfaceBuilders-CPLe0bbk.js} +3 -3
- package/dist/text.cjs +2 -2
- package/dist/text.js +2 -2
- package/dist/{textBlueprints-Dhe8_Uvc.js → textBlueprints-BU0Rhk54.js} +19 -11
- package/dist/{textBlueprints-DHfYmLtP.cjs → textBlueprints-CNPCPJix.cjs} +19 -11
- package/dist/{textMetrics-CwYDH9js.cjs → textMetrics-C71g4TmO.cjs} +1 -1
- package/dist/{textMetrics-Bbf-Dllw.js → textMetrics-Df9aLYK2.js} +1 -1
- package/dist/{threadFns-B23RqugN.cjs → threadFns-CzXEnnmo.cjs} +37 -29
- package/dist/{threadFns-Cn7_bmux.js → threadFns-DESH7lcs.js} +36 -28
- package/dist/topology/apiTypes.d.ts +13 -7
- package/dist/topology.cjs +9 -9
- package/dist/topology.d.ts +1 -1
- package/dist/topology.js +9 -9
- package/dist/{topologyQueryFns-xh11vEQw.cjs → topologyQueryFns-5Frx8Y-0.cjs} +1 -1
- package/dist/{topologyQueryFns-BfYdGOJc.js → topologyQueryFns-LXV1nTaS.js} +1 -1
- package/dist/{validityTypes-CXkecqMw.cjs → validityTypes-C6rROGTP.cjs} +1 -1
- package/dist/{validityTypes-BfOuvfyp.js → validityTypes-DM-Iwe8N.js} +1 -1
- package/package.json +2 -1
|
@@ -16,10 +16,15 @@ export declare function linearPattern(shape: Shape3D, direction: Vec3, count: nu
|
|
|
16
16
|
/**
|
|
17
17
|
* Create a circular pattern of a shape around an axis.
|
|
18
18
|
*
|
|
19
|
+
* A full turn (`fullAngle` of ±360) spaces the copies `fullAngle / count`
|
|
20
|
+
* apart, so the last copy does not land on the first. Any other angle is an
|
|
21
|
+
* open arc: the first copy stays in place, the last lands at `fullAngle`, and
|
|
22
|
+
* they are spaced `fullAngle / (count - 1)` apart.
|
|
23
|
+
*
|
|
19
24
|
* @param shape - The shape to replicate
|
|
20
25
|
* @param axis - Rotation axis direction
|
|
21
26
|
* @param count - Total number of copies (including the original)
|
|
22
|
-
* @param fullAngle -
|
|
27
|
+
* @param fullAngle - Angle in degrees the copies span (default: 360)
|
|
23
28
|
* @param center - Center point of rotation (default: [0,0,0])
|
|
24
29
|
* @param options - Boolean options for the fuse operation
|
|
25
30
|
* @returns Fused shape of all copies
|
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-CzXEnnmo.cjs");
|
|
3
|
+
const require_loftFns = require("./loftFns-D5AvfCGG.cjs");
|
|
4
4
|
exports.addChild = require_threadFns.addChild;
|
|
5
5
|
exports.addJoint = require_threadFns.addJoint;
|
|
6
6
|
exports.addStep = require_threadFns.addStep;
|
package/dist/operations.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { A as setJointValue, B as walkAssembly, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, F as countNodes, H as circularPattern, I as createAssemblyNode, L as findNode, M as sphericalJoint, N as addChild, O as prismaticJoint, P as collectShapes, R as removeChild, S as addJoint, T as jointTransform, U as gridPattern, V as exportAssemblySTEP, W as linearPattern, Y as createAssembly, _ as exportURDF, b as inverseKinematics, c as modifyStep, d as replayFrom, f as replayHistory, g as undoLast, h as stepsFrom, i as createRegistry, j as setJointValues, k as revoluteJoint, l as registerOperation, m as stepCount, n as addStep, o as findStep, r as createHistory, s as getShape, t as thread, u as registerShape, v as importURDF, w as forwardKinematics, x as jointTrajectory, y as jointsFromDH, z as updateNode } from "./threadFns-
|
|
2
|
-
import { c as twistExtrude, o as supportExtrude, r as complexExtrude, s as sweep } from "./loftFns-
|
|
1
|
+
import { A as setJointValue, B as walkAssembly, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, F as countNodes, H as circularPattern, I as createAssemblyNode, L as findNode, M as sphericalJoint, N as addChild, O as prismaticJoint, P as collectShapes, R as removeChild, S as addJoint, T as jointTransform, U as gridPattern, V as exportAssemblySTEP, W as linearPattern, Y as createAssembly, _ as exportURDF, b as inverseKinematics, c as modifyStep, d as replayFrom, f as replayHistory, g as undoLast, h as stepsFrom, i as createRegistry, j as setJointValues, k as revoluteJoint, l as registerOperation, m as stepCount, n as addStep, o as findStep, r as createHistory, s as getShape, t as thread, u as registerShape, v as importURDF, w as forwardKinematics, x as jointTrajectory, y as jointsFromDH, z as updateNode } from "./threadFns-DESH7lcs.js";
|
|
2
|
+
import { c as twistExtrude, o as supportExtrude, r as complexExtrude, s as sweep } from "./loftFns-D5NJpHLZ.js";
|
|
3
3
|
export { addChild, addJoint, addStep, circularPattern, collectShapes, complexExtrude, countNodes, createAssembly, createAssemblyNode, createHistory, createRegistry, cylindricalJoint, exportAssemblySTEP, exportURDF, findNode, findStep, forwardKinematics, getShape as getHistoryShape, gridPattern, importURDF, inverseKinematics, jointTrajectory, jointTransform, jointsFromDH, linearPattern, mechanismDOF, modifyStep, planarJoint, prismaticJoint, registerOperation, registerShape, removeChild, replayFrom, replayHistory, revoluteJoint, setJointValue, setJointValues, sphericalJoint, stepCount, stepsFrom, supportExtrude, sweep, thread, twistExtrude, undoLast, updateNode, walkAssembly };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { q as getKernel } from "./shapeTypes-
|
|
2
|
-
import { C as subShapeHashes, c as getFaces, l as getOrCreateCache, r as getCacheEntry } from "./topologyQueryFns-
|
|
1
|
+
import { q as getKernel } from "./shapeTypes-DwvQUp9M.js";
|
|
2
|
+
import { C as subShapeHashes, c as getFaces, l as getOrCreateCache, r as getCacheEntry } from "./topologyQueryFns-LXV1nTaS.js";
|
|
3
3
|
import { n as HASH_CODE_MAX } from "./constants-iraOnb2p.js";
|
|
4
4
|
// src/topology/metadata/originTrackingFns.ts
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-Dc7j-MYg.cjs");
|
|
2
|
+
const require_topologyQueryFns = require("./topologyQueryFns-5Frx8Y-0.cjs");
|
|
3
3
|
const require_constants = require("./constants-oee0S_x6.cjs");
|
|
4
4
|
// src/topology/metadata/originTrackingFns.ts
|
|
5
5
|
/**
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-Dc7j-MYg.cjs");
|
|
2
2
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
3
|
-
const require_validityTypes = require("./validityTypes-
|
|
3
|
+
const require_validityTypes = require("./validityTypes-C6rROGTP.cjs");
|
|
4
4
|
const require_constants = require("./constants-oee0S_x6.cjs");
|
|
5
|
-
const
|
|
6
|
-
const
|
|
5
|
+
const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
|
|
6
|
+
const require_solidBuilders = require("./solidBuilders-iS5DDwg8.cjs");
|
|
7
|
+
const require_surfaceBuilders = require("./surfaceBuilders-BvwSgD3C.cjs");
|
|
7
8
|
// src/topology/transformFns.ts
|
|
8
9
|
/**
|
|
9
10
|
* Immutable shape transforms — translate, rotate, scale, mirror, applyMatrix.
|
|
@@ -315,11 +316,7 @@ function cylinder(radius, height, options) {
|
|
|
315
316
|
const solid = require_solidBuilders.makeCylinder(radius, height, at, axis);
|
|
316
317
|
if (options?.centered) try {
|
|
317
318
|
var _usingCtx3 = require_shapeTypes._usingCtx();
|
|
318
|
-
const halfShift =
|
|
319
|
-
-axis[0] * height * .5,
|
|
320
|
-
-axis[1] * height * .5,
|
|
321
|
-
-axis[2] * height * .5
|
|
322
|
-
];
|
|
319
|
+
const halfShift = require_vecOps.vecScale(require_vecOps.vecNormalize(axis), -height * .5);
|
|
323
320
|
return translate(_usingCtx3.u(solid), halfShift);
|
|
324
321
|
} catch (_) {
|
|
325
322
|
_usingCtx3.e = _;
|
|
@@ -364,11 +361,7 @@ function cone(bottomRadius, topRadius, height, options) {
|
|
|
364
361
|
const solid = require_solidBuilders.makeCone(bottomRadius, topRadius, height, at, axis);
|
|
365
362
|
if (options?.centered) try {
|
|
366
363
|
var _usingCtx5 = require_shapeTypes._usingCtx();
|
|
367
|
-
const halfShift =
|
|
368
|
-
-axis[0] * height * .5,
|
|
369
|
-
-axis[1] * height * .5,
|
|
370
|
-
-axis[2] * height * .5
|
|
371
|
-
];
|
|
364
|
+
const halfShift = require_vecOps.vecScale(require_vecOps.vecNormalize(axis), -height * .5);
|
|
372
365
|
return translate(_usingCtx5.u(solid), halfShift);
|
|
373
366
|
} catch (_) {
|
|
374
367
|
_usingCtx5.e = _;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { E as GeometryCleanupError, G as _usingCtx, d as createSolid, n as castResultShape, q as getKernel } from "./shapeTypes-
|
|
1
|
+
import { E as GeometryCleanupError, G as _usingCtx, d as createSolid, n as castResultShape, q as getKernel } from "./shapeTypes-DwvQUp9M.js";
|
|
2
2
|
import { E as ok, d as validationError, g as err, m as andThen, t as BrepErrorCode } from "./errors-BTccWbtE.js";
|
|
3
|
-
import { n as isClosedWire } from "./validityTypes-
|
|
3
|
+
import { n as isClosedWire } from "./validityTypes-DM-Iwe8N.js";
|
|
4
4
|
import { n as HASH_CODE_MAX, t as DEG2RAD } from "./constants-iraOnb2p.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { d as vecNormalize, h as vecScale } from "./vecOps-S-m9H_fe.js";
|
|
6
|
+
import { C as propagateAllMetadata, S as hasAnyMetadata, T as propagateMetadataThroughRelocation, a as makeOffset, c as makeTorus, i as makeEllipsoid, l as makeVertex, n as makeCone, o as makeSolid, r as makeCylinder, s as makeSphere, t as makeCompound, u as weldShellsAndFaces, w as propagateMetadataByHash, x as collectInputFaceHashes } from "./solidBuilders-DT1gpVWM.js";
|
|
7
|
+
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-CPLe0bbk.js";
|
|
7
8
|
// src/topology/transformFns.ts
|
|
8
9
|
/**
|
|
9
10
|
* Immutable shape transforms — translate, rotate, scale, mirror, applyMatrix.
|
|
@@ -315,11 +316,7 @@ function cylinder(radius, height, options) {
|
|
|
315
316
|
const solid = makeCylinder(radius, height, at, axis);
|
|
316
317
|
if (options?.centered) try {
|
|
317
318
|
var _usingCtx3 = _usingCtx();
|
|
318
|
-
const halfShift =
|
|
319
|
-
-axis[0] * height * .5,
|
|
320
|
-
-axis[1] * height * .5,
|
|
321
|
-
-axis[2] * height * .5
|
|
322
|
-
];
|
|
319
|
+
const halfShift = vecScale(vecNormalize(axis), -height * .5);
|
|
323
320
|
return translate(_usingCtx3.u(solid), halfShift);
|
|
324
321
|
} catch (_) {
|
|
325
322
|
_usingCtx3.e = _;
|
|
@@ -364,11 +361,7 @@ function cone(bottomRadius, topRadius, height, options) {
|
|
|
364
361
|
const solid = makeCone(bottomRadius, topRadius, height, at, axis);
|
|
365
362
|
if (options?.centered) try {
|
|
366
363
|
var _usingCtx5 = _usingCtx();
|
|
367
|
-
const halfShift =
|
|
368
|
-
-axis[0] * height * .5,
|
|
369
|
-
-axis[1] * height * .5,
|
|
370
|
-
-axis[2] * height * .5
|
|
371
|
-
];
|
|
364
|
+
const halfShift = vecScale(vecNormalize(axis), -height * .5);
|
|
372
365
|
return translate(_usingCtx5.u(solid), halfShift);
|
|
373
366
|
} catch (_) {
|
|
374
367
|
_usingCtx5.e = _;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { G as _usingCtx, n as castResultShape, q as getKernel } from "./shapeTypes-
|
|
1
|
+
import { G as _usingCtx, n as castResultShape, q as getKernel } from "./shapeTypes-DwvQUp9M.js";
|
|
2
2
|
import { i as wasmIndex } from "./bug-ClMTAJhe.js";
|
|
3
3
|
import { E as ok, d as validationError, g as err, t as BrepErrorCode, u as unsupportedError } from "./errors-BTccWbtE.js";
|
|
4
|
-
import { E as kernelCallRaw, S as subShapeCount } from "./topologyQueryFns-
|
|
4
|
+
import { E as kernelCallRaw, S as subShapeCount } from "./topologyQueryFns-LXV1nTaS.js";
|
|
5
5
|
import { r as vecCross } from "./vecOps-S-m9H_fe.js";
|
|
6
|
-
import { f as getCachedMeasurement, p as setCachedMeasurement } from "./measureFns-
|
|
6
|
+
import { f as getCachedMeasurement, p as setCachedMeasurement } from "./measureFns-mxBdPiWa.js";
|
|
7
7
|
// src/measurement/principalBoxFns.ts
|
|
8
8
|
/**
|
|
9
9
|
* Principal-axes bounding box: a solid's extent measured in the frame of its
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-Dc7j-MYg.cjs");
|
|
2
2
|
const require_bug = require("./bug-CBcpIPuf.cjs");
|
|
3
3
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
4
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
4
|
+
const require_topologyQueryFns = require("./topologyQueryFns-5Frx8Y-0.cjs");
|
|
5
5
|
const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
|
|
6
|
-
const require_measureFns = require("./measureFns-
|
|
6
|
+
const require_measureFns = require("./measureFns-CZHNWkiA.cjs");
|
|
7
7
|
// src/measurement/principalBoxFns.ts
|
|
8
8
|
/**
|
|
9
9
|
* Principal-axes bounding box: a solid's extent measured in the frame of its
|
package/dist/projection.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_cameraFns = require("./cameraFns-
|
|
2
|
+
const require_cameraFns = require("./cameraFns-RqraCXIc.cjs");
|
|
3
3
|
exports.PROJECTION_PLANES = require_cameraFns.PROJECTION_PLANES;
|
|
4
4
|
exports.cameraFromPlane = require_cameraFns.cameraFromPlane;
|
|
5
5
|
exports.cameraLookAt = require_cameraFns.cameraLookAt;
|
package/dist/projection.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { o as PROJECTION_PLANES, t as cameraFromPlane, n as cameraLookAt, r as createCamera, s as isProjectionPlane, a as makeProjectedEdges, i as projectEdges } from "./cameraFns-
|
|
1
|
+
export { o as PROJECTION_PLANES, t as cameraFromPlane, n as cameraLookAt, r as createCamera, s as isProjectionPlane, a as makeProjectedEdges, i as projectEdges } from "./cameraFns-CrClIkmV.js";
|
|
@@ -4,13 +4,13 @@ export type Predicate<T> = (element: T) => boolean;
|
|
|
4
4
|
export type TopoKind = 'edge' | 'face' | 'wire' | 'vertex';
|
|
5
5
|
export interface ShapeFinder<T extends AnyShape<Dimension>> {
|
|
6
6
|
/** Add a custom predicate filter. Returns new finder. */
|
|
7
|
-
readonly when: (predicate: Predicate<T>) =>
|
|
7
|
+
readonly when: (predicate: Predicate<T>) => this;
|
|
8
8
|
/** Filter to elements in a list. Returns new finder. */
|
|
9
|
-
readonly inList: (elements: T[]) =>
|
|
9
|
+
readonly inList: (elements: T[]) => this;
|
|
10
10
|
/** Invert a filter. Returns new finder. */
|
|
11
|
-
readonly not: (builderFn: (f:
|
|
11
|
+
readonly not: (builderFn: (f: this) => ShapeFinder<T>) => this;
|
|
12
12
|
/** Combine filters with OR. Returns new finder. */
|
|
13
|
-
readonly either: (fns: ((f:
|
|
13
|
+
readonly either: (fns: ((f: this) => ShapeFinder<T>)[]) => this;
|
|
14
14
|
/** Find all matching elements from a shape. */
|
|
15
15
|
readonly findAll: (shape: AnyShape<Dimension>) => T[];
|
|
16
16
|
/** Find exactly one matching element. Returns error if 0 or more than 1 match. */
|
|
@@ -18,11 +18,11 @@ export interface ShapeFinder<T extends AnyShape<Dimension>> {
|
|
|
18
18
|
/** Check if an element passes all filters. */
|
|
19
19
|
readonly shouldKeep: (element: T) => boolean;
|
|
20
20
|
/** Intersect: element must match both this finder AND other. */
|
|
21
|
-
readonly and: (other: ShapeFinder<T>) =>
|
|
21
|
+
readonly and: (other: ShapeFinder<T>) => this;
|
|
22
22
|
/** Union: element must match this finder OR other. */
|
|
23
|
-
readonly or: (other: ShapeFinder<T>) =>
|
|
23
|
+
readonly or: (other: ShapeFinder<T>) => this;
|
|
24
24
|
/** Negate: invert all filters on this finder. */
|
|
25
|
-
readonly negate: () =>
|
|
25
|
+
readonly negate: () => this;
|
|
26
26
|
readonly _filters: ReadonlyArray<Predicate<T>>;
|
|
27
27
|
readonly _topoKind: TopoKind;
|
|
28
28
|
}
|
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-DKEVm6Hu.cjs");
|
|
3
|
+
const require_cornerFinder = require("./cornerFinder-CdOe1Wrb.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-D2hANLRu.js";
|
|
2
|
+
import { t as cornerFinder } from "./cornerFinder-BZuQkRp2.js";
|
|
3
3
|
export { cornerFinder, edgeFinder, faceFinder, getSingleFace };
|
|
@@ -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-Dc7j-MYg.cjs");
|
|
2
|
+
const require_topologyQueryFns = require("./topologyQueryFns-5Frx8Y-0.cjs");
|
|
3
|
+
const require_faceFns = require("./faceFns-B7MiDYj1.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-C0w8vvfb.cjs");
|
|
6
|
+
const require_measureFns = require("./measureFns-CZHNWkiA.cjs");
|
|
7
|
+
const require_adjacencyFns = require("./adjacencyFns-BFJfaUwX.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-DwvQUp9M.js";
|
|
2
|
+
import { c as getFaces, w as vertexPosition } from "./topologyQueryFns-LXV1nTaS.js";
|
|
3
|
+
import { i as faceGeomType, l as normalAt, r as faceCenter } from "./faceFns-iVPbTxki.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-CgqKICF_.js";
|
|
6
|
+
import { n as measureArea, s as measureLength } from "./measureFns-mxBdPiWa.js";
|
|
7
|
+
import { a as facesOfVertex, c as verticesOfFace, i as facesOfEdge, o as sharedEdges, s as verticesOfEdge, t as adjacentFaceHashes } from "./adjacencyFns--KmBIKYJ.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
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-Dc7j-MYg.cjs");
|
|
2
2
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-5Frx8Y-0.cjs");
|
|
4
4
|
const require_constants = require("./constants-oee0S_x6.cjs");
|
|
5
5
|
// src/topology/shapeFns.ts
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { q as getKernel } from "./shapeTypes-
|
|
1
|
+
import { q as getKernel } from "./shapeTypes-DwvQUp9M.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-LXV1nTaS.js";
|
|
4
4
|
import { n as HASH_CODE_MAX } from "./constants-iraOnb2p.js";
|
|
5
5
|
// src/topology/shapeFns.ts
|
|
6
6
|
/**
|
package/dist/shapeRef.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_refResolveFns = require("./refResolveFns-
|
|
2
|
+
const require_refResolveFns = require("./refResolveFns-BAs4p9z7.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-DHx1Y3GG.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_occtWasmAdapter = require("./occtWasmAdapter-
|
|
1
|
+
const require_occtWasmAdapter = require("./occtWasmAdapter-DVxLkjlJ.cjs");
|
|
2
2
|
const require_bug = require("./bug-CBcpIPuf.cjs");
|
|
3
3
|
// src/kernel/quality.ts
|
|
4
4
|
/**
|
|
@@ -4514,28 +4514,20 @@ function getCurve2dType$1(curve) {
|
|
|
4514
4514
|
function trimCurve2d$1(curve, start, end) {
|
|
4515
4515
|
return {
|
|
4516
4516
|
__bk2d: "trimmed",
|
|
4517
|
-
basis: c2d$1(curve),
|
|
4517
|
+
basis: structuredClone(c2d$1(curve)),
|
|
4518
4518
|
tStart: start,
|
|
4519
4519
|
tEnd: end
|
|
4520
4520
|
};
|
|
4521
4521
|
}
|
|
4522
|
+
function reverseCurve2d$1(curve) {
|
|
4523
|
+
const c = c2d$1(curve);
|
|
4524
|
+
Object.assign(c, require_occtWasmAdapter.reverseCurve2d(c));
|
|
4525
|
+
}
|
|
4522
4526
|
function copyCurve2d$1(curve) {
|
|
4523
4527
|
return JSON.parse(JSON.stringify(curve));
|
|
4524
4528
|
}
|
|
4525
4529
|
function offsetCurve2d$1(curve, offset) {
|
|
4526
|
-
|
|
4527
|
-
const bounds = require_occtWasmAdapter.curveBounds(c);
|
|
4528
|
-
const N = 30;
|
|
4529
|
-
const poles = [];
|
|
4530
|
-
for (let i = 0; i <= N; i++) {
|
|
4531
|
-
const t = bounds.first + (bounds.last - bounds.first) * i / N;
|
|
4532
|
-
const [px, py] = require_occtWasmAdapter.evaluateCurve2d(c, t);
|
|
4533
|
-
const [tvx, tvy] = require_occtWasmAdapter.tangentCurve2d(c, t);
|
|
4534
|
-
const tLen = Math.sqrt(tvx * tvx + tvy * tvy);
|
|
4535
|
-
if (tLen > 1e-12) poles.push([px - tvy / tLen * offset, py + tvx / tLen * offset]);
|
|
4536
|
-
else poles.push([px, py]);
|
|
4537
|
-
}
|
|
4538
|
-
return makeBSpline2d$1(poles);
|
|
4530
|
+
return require_occtWasmAdapter.offsetCurve2d(c2d$1(curve), offset);
|
|
4539
4531
|
}
|
|
4540
4532
|
function translateCurve2d$1(curve, dx, dy) {
|
|
4541
4533
|
return require_occtWasmAdapter.translateCurve2d(c2d$1(curve), dx, dy);
|
|
@@ -5180,7 +5172,9 @@ function makeKernel2dOps$1(oc) {
|
|
|
5180
5172
|
getCurve2dBounds: (curve) => getCurve2dBounds$1(curve),
|
|
5181
5173
|
getCurve2dType: (curve) => getCurve2dType$1(curve),
|
|
5182
5174
|
trimCurve2d: (curve, start, end) => trimCurve2d$1(curve, start, end),
|
|
5183
|
-
reverseCurve2d: (curve) => {
|
|
5175
|
+
reverseCurve2d: (curve) => {
|
|
5176
|
+
reverseCurve2d$1(curve);
|
|
5177
|
+
},
|
|
5184
5178
|
copyCurve2d: (curve) => copyCurve2d$1(curve),
|
|
5185
5179
|
offsetCurve2d: (curve, offset) => offsetCurve2d$1(curve, offset),
|
|
5186
5180
|
translateCurve2d: (curve, dx, dy) => translateCurve2d$1(curve, dx, dy),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as
|
|
1
|
+
import { A as UnsupportedKernelOperationError, C as reverseCurve2d$2, D as tangentCurve2d, E as serializeCurve2d$2, N as EXACT_BREP_CAPABILITIES, O as translateCurve2d$2, P as OCCT_CAPABILITIES, S as offsetCurve2d$2, T as scaleCurve2d$2, _ as makeCircle2d$2, a as buildAsciiSTL, b as mirrorAcrossAxis, c as createBBox2d, d as deserializeCurve2d$2, f as evaluateCurve2d$2, g as makeBezier2d$2, h as makeArc2dThreePoints, i as DEFAULT_STL_TOLERANCE, j as isUnsupportedKernelOperationError, k as quickHull, l as curveBounds, m as makeArc2dTangent, o as buildBinarySTL, p as intersectCurves2dFn, r as DEFAULT_STL_ANGULAR_TOLERANCE, s as addCurveToBBox, t as OcctWasmAdapter, u as curveTypeName, v as makeEllipse2d$2, w as rotateCurve2d$2, x as mirrorAtPoint, y as makeLine2d$2 } from "./occtWasmAdapter-B9d0Q0Vl.js";
|
|
2
2
|
import { i as wasmIndex, r as vec3At } from "./bug-ClMTAJhe.js";
|
|
3
3
|
// src/kernel/quality.ts
|
|
4
4
|
/**
|
|
@@ -4514,28 +4514,20 @@ function getCurve2dType$1(curve) {
|
|
|
4514
4514
|
function trimCurve2d$1(curve, start, end) {
|
|
4515
4515
|
return {
|
|
4516
4516
|
__bk2d: "trimmed",
|
|
4517
|
-
basis: c2d$1(curve),
|
|
4517
|
+
basis: structuredClone(c2d$1(curve)),
|
|
4518
4518
|
tStart: start,
|
|
4519
4519
|
tEnd: end
|
|
4520
4520
|
};
|
|
4521
4521
|
}
|
|
4522
|
+
function reverseCurve2d$1(curve) {
|
|
4523
|
+
const c = c2d$1(curve);
|
|
4524
|
+
Object.assign(c, reverseCurve2d$2(c));
|
|
4525
|
+
}
|
|
4522
4526
|
function copyCurve2d$1(curve) {
|
|
4523
4527
|
return JSON.parse(JSON.stringify(curve));
|
|
4524
4528
|
}
|
|
4525
4529
|
function offsetCurve2d$1(curve, offset) {
|
|
4526
|
-
|
|
4527
|
-
const bounds = curveBounds(c);
|
|
4528
|
-
const N = 30;
|
|
4529
|
-
const poles = [];
|
|
4530
|
-
for (let i = 0; i <= N; i++) {
|
|
4531
|
-
const t = bounds.first + (bounds.last - bounds.first) * i / N;
|
|
4532
|
-
const [px, py] = evaluateCurve2d$2(c, t);
|
|
4533
|
-
const [tvx, tvy] = tangentCurve2d(c, t);
|
|
4534
|
-
const tLen = Math.sqrt(tvx * tvx + tvy * tvy);
|
|
4535
|
-
if (tLen > 1e-12) poles.push([px - tvy / tLen * offset, py + tvx / tLen * offset]);
|
|
4536
|
-
else poles.push([px, py]);
|
|
4537
|
-
}
|
|
4538
|
-
return makeBSpline2d$1(poles);
|
|
4530
|
+
return offsetCurve2d$2(c2d$1(curve), offset);
|
|
4539
4531
|
}
|
|
4540
4532
|
function translateCurve2d$1(curve, dx, dy) {
|
|
4541
4533
|
return translateCurve2d$2(c2d$1(curve), dx, dy);
|
|
@@ -5180,7 +5172,9 @@ function makeKernel2dOps$1(oc) {
|
|
|
5180
5172
|
getCurve2dBounds: (curve) => getCurve2dBounds$1(curve),
|
|
5181
5173
|
getCurve2dType: (curve) => getCurve2dType$1(curve),
|
|
5182
5174
|
trimCurve2d: (curve, start, end) => trimCurve2d$1(curve, start, end),
|
|
5183
|
-
reverseCurve2d: (curve) => {
|
|
5175
|
+
reverseCurve2d: (curve) => {
|
|
5176
|
+
reverseCurve2d$1(curve);
|
|
5177
|
+
},
|
|
5184
5178
|
copyCurve2d: (curve) => copyCurve2d$1(curve),
|
|
5185
5179
|
offsetCurve2d: (curve, offset) => offsetCurve2d$1(curve, offset),
|
|
5186
5180
|
translateCurve2d: (curve, dx, dy) => translateCurve2d$1(curve, dx, dy),
|
|
@@ -27,6 +27,8 @@ export default class Sketches implements SketchInterface {
|
|
|
27
27
|
* the single profile is a compound (face-with-holes) sketch.
|
|
28
28
|
*/
|
|
29
29
|
private soleSketch;
|
|
30
|
+
/** Release the kernel resources of every contained sketch. */
|
|
31
|
+
delete(): void;
|
|
30
32
|
/** Build a face from the sole contained profile (see {@link Sketches.faces}). */
|
|
31
33
|
face(): Face;
|
|
32
34
|
/** Loft from the sole contained profile to one or more other sketches. */
|
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-Di376t-0.cjs");
|
|
3
|
+
const require_drawFns = require("./drawFns-71cOhWD-.cjs");
|
|
4
|
+
const require_textBlueprints = require("./textBlueprints-CNPCPJix.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-D_Faf0GO.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-DxDwJ5zZ.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-BU0Rhk54.js";
|
|
4
4
|
// src/sketching.ts
|
|
5
5
|
/**
|
|
6
6
|
* brepjs/sketching — Sketcher, Drawing, and sketch-to-shape operations.
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { C as isSolid, D as getShapeKind, E as GeometryCleanupError, 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, D as getShapeKind, E as GeometryCleanupError, 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-DwvQUp9M.js";
|
|
2
2
|
import { E as ok, P as unwrap, b as isErr, d as validationError, g as err, i as kernelError, l as typeCastError, m as andThen, t as BrepErrorCode } from "./errors-BTccWbtE.js";
|
|
3
|
-
import { C as subShapeHashes, c as getFaces, f as getVertices, p as getWires, s as getEdges } from "./topologyQueryFns-
|
|
3
|
+
import { C as subShapeHashes, c as getFaces, f as getVertices, p as getWires, s as getEdges } from "./topologyQueryFns-LXV1nTaS.js";
|
|
4
4
|
import { n as HASH_CODE_MAX } from "./constants-iraOnb2p.js";
|
|
5
5
|
import { a as vecDot, g as vecSub, h as vecScale, t as vecAdd } from "./vecOps-S-m9H_fe.js";
|
|
6
6
|
import { o as resolvePlane } from "./planeOps-D3yDuMux.js";
|
|
7
|
-
import { _ as cast, y as downcast } from "./faceFns-
|
|
8
|
-
import { n as propagateOriginsByHash, r as propagateOriginsFromEvolution, t as getFaceOrigins } from "./originTrackingFns-
|
|
7
|
+
import { _ as cast, y as downcast } from "./faceFns-iVPbTxki.js";
|
|
8
|
+
import { n as propagateOriginsByHash, r as propagateOriginsFromEvolution, t as getFaceOrigins } from "./originTrackingFns-CBnyKLm7.js";
|
|
9
9
|
import { n as hasFaceRoles, r as propagateFaceRolesFromEvolution } from "./faceRoleFns-BPxzQF-n.js";
|
|
10
10
|
import { n as getAtOrThrow, t as firstOrThrow } from "./arrayAccess-BpgouNir.js";
|
|
11
|
-
import { r as makeFace } from "./surfaceBuilders-
|
|
11
|
+
import { r as makeFace } from "./surfaceBuilders-CPLe0bbk.js";
|
|
12
12
|
// src/topology/metadata/faceTagFns.ts
|
|
13
13
|
var shapeTagStore = /* @__PURE__ */ new WeakMap();
|
|
14
14
|
var tagMetadataStore = /* @__PURE__ */ new WeakMap();
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-Dc7j-MYg.cjs");
|
|
2
2
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-5Frx8Y-0.cjs");
|
|
4
4
|
const require_constants = require("./constants-oee0S_x6.cjs");
|
|
5
5
|
const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
|
|
6
6
|
const require_planeOps = require("./planeOps-DZfLToKZ.cjs");
|
|
7
|
-
const require_faceFns = require("./faceFns-
|
|
8
|
-
const require_originTrackingFns = require("./originTrackingFns-
|
|
7
|
+
const require_faceFns = require("./faceFns-B7MiDYj1.cjs");
|
|
8
|
+
const require_originTrackingFns = require("./originTrackingFns-CHymOLLm.cjs");
|
|
9
9
|
const require_faceRoleFns = require("./faceRoleFns-Db5bYj4Q.cjs");
|
|
10
10
|
const require_arrayAccess = require("./arrayAccess-DpJYARwv.cjs");
|
|
11
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
11
|
+
const require_surfaceBuilders = require("./surfaceBuilders-BvwSgD3C.cjs");
|
|
12
12
|
// src/topology/metadata/faceTagFns.ts
|
|
13
13
|
var shapeTagStore = /* @__PURE__ */ new WeakMap();
|
|
14
14
|
var tagMetadataStore = /* @__PURE__ */ new WeakMap();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-Dc7j-MYg.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-C6rROGTP.cjs");
|
|
4
|
+
const require_faceFns = require("./faceFns-B7MiDYj1.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-DwvQUp9M.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-DM-Iwe8N.js";
|
|
4
|
+
import { _ as cast, u as outerWire } from "./faceFns-iVPbTxki.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-CNPCPJix.cjs");
|
|
3
|
+
const require_textMetrics = require("./textMetrics-C71g4TmO.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-BU0Rhk54.js";
|
|
2
|
+
import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-Df9aLYK2.js";
|
|
3
3
|
export { fontMetrics, getFont, loadFont, setFallbackFont, sketchText, textBlueprints, textMetrics };
|
|
@@ -1,18 +1,18 @@
|
|
|
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-DwvQUp9M.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, p as cutAll, t as makeCompound } from "./solidBuilders-
|
|
8
|
+
import { v as copyShape } from "./faceFns-iVPbTxki.js";
|
|
9
|
+
import { o as makeSolid, p as cutAll, t as makeCompound } from "./solidBuilders-DT1gpVWM.js";
|
|
10
10
|
import { i as setFaceRoles } from "./faceRoleFns-BPxzQF-n.js";
|
|
11
|
-
import { l as curveStartPoint, u as curveTangentAt } from "./curveFns-
|
|
11
|
+
import { l as curveStartPoint, u as curveTangentAt } from "./curveFns-BP3srCfK.js";
|
|
12
12
|
import { n as getAtOrThrow, t as firstOrThrow } from "./arrayAccess-BpgouNir.js";
|
|
13
|
-
import { i as makeNewFaceWithinFace, r as makeFace, t as addHolesInFace } from "./surfaceBuilders-
|
|
14
|
-
import { r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-
|
|
15
|
-
import { c as twistExtrude, r as complexExtrude, s as sweep, t as loft } from "./loftFns-
|
|
13
|
+
import { i as makeNewFaceWithinFace, r as makeFace, t as addHolesInFace } from "./surfaceBuilders-CPLe0bbk.js";
|
|
14
|
+
import { r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-D_Faf0GO.js";
|
|
15
|
+
import { c as twistExtrude, r as complexExtrude, s as sweep, t as loft } from "./loftFns-D5NJpHLZ.js";
|
|
16
16
|
import opentype from "opentype.js";
|
|
17
17
|
// src/topology/shapeRef/extrudeRoleFns.ts
|
|
18
18
|
/** Match tolerance as a fraction of the extrusion's size. */
|
|
@@ -484,9 +484,13 @@ function sketchSweep(sketch, sketchOnPlane, sweepConfig = {}) {
|
|
|
484
484
|
...sweepConfig
|
|
485
485
|
};
|
|
486
486
|
if (sketch.baseFace) config.support = sketch.baseFace.wrapped;
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
487
|
+
try {
|
|
488
|
+
const shape = unwrap(sweep(profile.wire, sketch.wire, config));
|
|
489
|
+
sketch.delete();
|
|
490
|
+
return shape;
|
|
491
|
+
} finally {
|
|
492
|
+
profile.delete();
|
|
493
|
+
}
|
|
490
494
|
}
|
|
491
495
|
/**
|
|
492
496
|
* Loft between this sketch and one or more other sketches.
|
|
@@ -761,6 +765,10 @@ var Sketches = class {
|
|
|
761
765
|
if (!(only instanceof Sketch)) bug(`Sketches.${op}`, `${op} is only supported on single-wire profiles.`);
|
|
762
766
|
return only;
|
|
763
767
|
}
|
|
768
|
+
/** Release the kernel resources of every contained sketch. */
|
|
769
|
+
delete() {
|
|
770
|
+
for (const s of this.sketches) s.delete();
|
|
771
|
+
}
|
|
764
772
|
/** Build a face from the sole contained profile (see {@link Sketches.faces}). */
|
|
765
773
|
face() {
|
|
766
774
|
if (this.sketches.length !== 1) bug("Sketches.face", "Multiple profiles — use faces() to combine them.");
|
|
@@ -928,7 +936,7 @@ function textBlueprints(text, { startX = 0, startY = 0, fontSize = 16, fontFamil
|
|
|
928
936
|
let font = getFont(fontFamily);
|
|
929
937
|
if (!font) font = getFont();
|
|
930
938
|
if (!font) bug("text", "No fonts loaded. Call loadFont() before using text functions.");
|
|
931
|
-
const writtenText = font.getPath(text,
|
|
939
|
+
const writtenText = font.getPath(text, startX, -startY, fontSize);
|
|
932
940
|
const blueprints = Array.from(sketchFontCommands(writtenText.commands));
|
|
933
941
|
return organiseBlueprints(blueprints).mirror([0, 0]);
|
|
934
942
|
}
|