brepjs 20.12.4 → 20.12.5
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-54UTqtan.js → adjacencyFns-B2Po1gPs.js} +3 -3
- package/dist/{adjacencyFns-C_Vb1AeW.cjs → adjacencyFns-Cho9v3Q3.cjs} +3 -3
- package/dist/{blueprint-D0VEeTzJ.cjs → blueprint-ERmwk6zG.cjs} +5 -5
- package/dist/{blueprint-DFpjcrlm.js → blueprint-Zmt5-07y.js} +5 -5
- package/dist/{blueprintFns-Douf5ZdX.cjs → blueprintFns-B_sxtIo7.cjs} +2 -2
- package/dist/{blueprintFns-Dye1jezD.js → blueprintFns-Dtm-XukP.js} +2 -2
- package/dist/{blueprintSketcher-W9yON-UC.cjs → blueprintSketcher-CZyokLGJ.cjs} +3 -3
- package/dist/{blueprintSketcher-Cr0Lr1Dq.js → blueprintSketcher-CwTAtrkY.js} +3 -3
- package/dist/{boolean2D-C9VghXHG.cjs → boolean2D-CRuNKgXs.cjs} +4 -4
- package/dist/{boolean2D-CCV3R6lN.js → boolean2D-yUpS8onH.js} +4 -4
- package/dist/brepjs.cjs +128 -100
- package/dist/brepjs.js +128 -100
- package/dist/{cameraFns-x3L6dtA8.cjs → cameraFns-DB1IyMmS.cjs} +3 -3
- package/dist/{cameraFns-DZOI_ewG.js → cameraFns-DRok4UxZ.js} +3 -3
- package/dist/core.cjs +2 -2
- package/dist/core.js +2 -2
- package/dist/{cornerFinder-BY10jciz.js → cornerFinder-D5qnDbtZ.js} +1 -1
- package/dist/{cornerFinder-B8PqO4um.cjs → cornerFinder-DfYBHHZG.cjs} +1 -1
- package/dist/{curveFns-B4308HNM.js → curveFns-BGPSFUWB.js} +1 -1
- package/dist/{curveFns-8lUhNquZ.cjs → curveFns-BKT4Sg8q.cjs} +1 -1
- package/dist/{drawFns-C7zAvera.cjs → drawFns-D8e5RiRe.cjs} +23 -15
- package/dist/{drawFns-DjnU3fEd.js → drawFns-aGufr-pr.js} +23 -15
- package/dist/{faceFns-BjmlYcc9.cjs → faceFns-Cx7cwUMx.cjs} +2 -2
- package/dist/{faceFns-7eHqNM0P.js → faceFns-lE2OvBfq.js} +2 -2
- package/dist/{healingFns-BW7mZ_SW.js → healingFns-B94zSk1-.js} +5 -5
- package/dist/{healingFns-CYLIcIWv.cjs → healingFns-CcgyrL6h.cjs} +5 -5
- package/dist/{helpers-De0Z_6iV.cjs → helpers-C4f2MV-r.cjs} +14 -10
- package/dist/{helpers-BQ6XMFcm.js → helpers-CNgipe6l.js} +14 -10
- package/dist/{importFns-3IMBHQrQ.cjs → importFns-fIdcaMqt.cjs} +2 -2
- package/dist/{importFns-BCL4-H8e.js → importFns-gB1X3ti2.js} +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/io.cjs +2 -2
- package/dist/io.js +2 -2
- package/dist/kernel/occtWasm/constructionOps.d.ts +1 -1
- package/dist/kernel/occtWasm/occtWasmAdapter.cjs +1 -1
- package/dist/kernel/occtWasm/occtWasmAdapter.d.ts +1 -1
- package/dist/kernel/occtWasm/occtWasmAdapter.js +1 -1
- package/dist/kernel/occtWasm/occtWasmTypes.d.ts +5 -0
- package/dist/{loftFns-DlG5oR0X.cjs → loftFns-AHaYxJyS.cjs} +17 -2
- package/dist/{loftFns-H4ZOpRAk.js → loftFns-mbyBvJ8Y.js} +17 -2
- package/dist/{measureFns-1IfNe629.js → measureFns-C94G0fH8.js} +102 -35
- package/dist/{measureFns-Ce01LVwq.cjs → measureFns-CuabRDRL.cjs} +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-GXF5gPZL.cjs} +3 -3
- package/dist/{meshFns-DaRZxa7B.js → meshFns-jarDZKw1.js} +3 -3
- package/dist/{occtWasmAdapter-CRd9RFEu.cjs → occtWasmAdapter-DeoeK2iJ.cjs} +7 -4
- package/dist/{occtWasmAdapter-ipKUdNLN.js → occtWasmAdapter-DlNmVNUn.js} +7 -4
- 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-BxeUD2NM.js} +2 -2
- package/dist/{originTrackingFns-9gyCMFFQ.cjs → originTrackingFns-C-yuMV3m.cjs} +2 -2
- package/dist/{primitiveFns-BRXZ7jnP.cjs → primitiveFns-BVAkYHVf.cjs} +7 -14
- package/dist/{primitiveFns-ClQP6zMQ.js → primitiveFns-CualoFAk.js} +7 -14
- package/dist/{principalBoxFns-tIv-crMB.cjs → principalBoxFns-DHh5_HCw.cjs} +3 -3
- package/dist/{principalBoxFns-DsfWOoXg.js → principalBoxFns-DtI7tVuS.js} +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-BG3JGs--.js → refResolveFns--SRyN2qa.js} +6 -6
- package/dist/{refResolveFns-BZdUlv9f.cjs → refResolveFns-CaAw-ya3.cjs} +6 -6
- package/dist/{shapeFns-BCgegapL.js → shapeFns-CdrDroOM.js} +2 -2
- package/dist/{shapeFns-BbXqiNqY.cjs → shapeFns-CwjjUOr0.cjs} +2 -2
- package/dist/shapeRef.cjs +1 -1
- package/dist/shapeRef.js +1 -1
- package/dist/{shapeTypes-DJT3SnGK.cjs → shapeTypes-D938X2mg.cjs} +1 -1
- package/dist/{shapeTypes-DAz6aAnJ.js → shapeTypes-PNVEv6ga.js} +1 -1
- package/dist/sketching/sketches.d.ts +2 -0
- package/dist/sketching.cjs +3 -3
- package/dist/sketching.js +3 -3
- package/dist/{solidBuilders-BWbqhbyv.cjs → solidBuilders-CAkBQKWb.cjs} +5 -5
- package/dist/{solidBuilders-8xytLt8-.js → solidBuilders-Hft8Cr6a.js} +5 -5
- package/dist/{surfaceBuilders-CwG_RPdZ.cjs → surfaceBuilders-BKCiVf7T.cjs} +3 -3
- package/dist/{surfaceBuilders-BO96DMCH.js → surfaceBuilders-CrO_BBKM.js} +3 -3
- package/dist/text.cjs +2 -2
- package/dist/text.js +2 -2
- package/dist/{textBlueprints-Dhe8_Uvc.js → textBlueprints-B8q2a-nN.js} +19 -11
- package/dist/{textBlueprints-DHfYmLtP.cjs → textBlueprints-C9HeYc5a.cjs} +19 -11
- package/dist/{textMetrics-CwYDH9js.cjs → textMetrics-1fhCSAGF.cjs} +1 -1
- package/dist/{textMetrics-Bbf-Dllw.js → textMetrics-DJfTSy6w.js} +1 -1
- package/dist/{threadFns-B23RqugN.cjs → threadFns-CVIEbOW3.cjs} +37 -29
- package/dist/{threadFns-Cn7_bmux.js → threadFns-f2KwibLR.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-4WYqtSFF.cjs} +1 -1
- package/dist/{topologyQueryFns-BfYdGOJc.js → topologyQueryFns-BZUY10TD.js} +1 -1
- package/dist/{validityTypes-BfOuvfyp.js → validityTypes-DAXIqwZM.js} +1 -1
- package/dist/{validityTypes-CXkecqMw.cjs → validityTypes-tWSx_zAH.cjs} +1 -1
- package/package.json +2 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-D938X2mg.cjs");
|
|
2
2
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
4
|
-
const require_originTrackingFns = require("./originTrackingFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-4WYqtSFF.cjs");
|
|
4
|
+
const require_originTrackingFns = require("./originTrackingFns-C-yuMV3m.cjs");
|
|
5
5
|
// src/topology/meshCache.ts
|
|
6
6
|
/**
|
|
7
7
|
* Build a parameter key for the inner cache map (excludes shape identity).
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { q as getKernel, ut as qualityDeflection } from "./shapeTypes-
|
|
1
|
+
import { q as getKernel, ut as qualityDeflection } from "./shapeTypes-PNVEv6ga.js";
|
|
2
2
|
import { E as ok, g as err, r as ioError } from "./errors-BTccWbtE.js";
|
|
3
|
-
import { d as getSolids, n as getBounds } from "./topologyQueryFns-
|
|
4
|
-
import { t as getFaceOrigins } from "./originTrackingFns-
|
|
3
|
+
import { d as getSolids, n as getBounds } from "./topologyQueryFns-BZUY10TD.js";
|
|
4
|
+
import { t as getFaceOrigins } from "./originTrackingFns-BxeUD2NM.js";
|
|
5
5
|
// src/topology/meshCache.ts
|
|
6
6
|
/**
|
|
7
7
|
* Build a parameter key for the inner cache map (excludes shape identity).
|
|
@@ -3894,14 +3894,17 @@ function makeTangentArc(k, startPoint, startTangent, endPoint) {
|
|
|
3894
3894
|
const [x2, y2, z2] = endPoint;
|
|
3895
3895
|
return handle("edge", k.makeTangentArc(x1, y1, z1, tx, ty, tz, x2, y2, z2));
|
|
3896
3896
|
}
|
|
3897
|
-
function makeHelixWire(k, pitch, height, radius, center, direction) {
|
|
3897
|
+
function makeHelixWire(k, pitch, height, radius, center, direction, leftHanded = false) {
|
|
3898
3898
|
const px = center ? center[0] : 0;
|
|
3899
3899
|
const py = center ? center[1] : 0;
|
|
3900
3900
|
const pz = center ? center[2] : 0;
|
|
3901
3901
|
const dx = direction ? direction[0] : 0;
|
|
3902
3902
|
const dy = direction ? direction[1] : 0;
|
|
3903
3903
|
const dz = direction ? direction[2] : 1;
|
|
3904
|
-
|
|
3904
|
+
let wireId;
|
|
3905
|
+
if (typeof k.makeHelixWireHanded === "function") wireId = k.makeHelixWireHanded(px, py, pz, dx, dy, dz, pitch, height, radius, leftHanded);
|
|
3906
|
+
else if (leftHanded) throw new Error("occt-wasm: a left-handed helix needs occt-wasm 4.3.0 or newer");
|
|
3907
|
+
else wireId = k.makeHelixWire(px, py, pz, dx, dy, dz, pitch, height, radius);
|
|
3905
3908
|
k.buildCurves3d(wireId);
|
|
3906
3909
|
return handle("wire", wireId);
|
|
3907
3910
|
}
|
|
@@ -5288,8 +5291,8 @@ var OcctWasmAdapter = class OcctWasmAdapter {
|
|
|
5288
5291
|
makeTangentArc(startPoint, startTangent, endPoint) {
|
|
5289
5292
|
return makeTangentArc(this.k, startPoint, startTangent, endPoint);
|
|
5290
5293
|
}
|
|
5291
|
-
makeHelixWire(pitch, height, radius, center, direction,
|
|
5292
|
-
return makeHelixWire(this.k, pitch, height, radius, center, direction);
|
|
5294
|
+
makeHelixWire(pitch, height, radius, center, direction, leftHanded) {
|
|
5295
|
+
return makeHelixWire(this.k, pitch, height, radius, center, direction, leftHanded);
|
|
5293
5296
|
}
|
|
5294
5297
|
makeWireFromMixed(items) {
|
|
5295
5298
|
return makeWireFromMixed(this.k, this.Module, items);
|
|
@@ -3894,14 +3894,17 @@ function makeTangentArc(k, startPoint, startTangent, endPoint) {
|
|
|
3894
3894
|
const [x2, y2, z2] = endPoint;
|
|
3895
3895
|
return handle("edge", k.makeTangentArc(x1, y1, z1, tx, ty, tz, x2, y2, z2));
|
|
3896
3896
|
}
|
|
3897
|
-
function makeHelixWire(k, pitch, height, radius, center, direction) {
|
|
3897
|
+
function makeHelixWire(k, pitch, height, radius, center, direction, leftHanded = false) {
|
|
3898
3898
|
const px = center ? center[0] : 0;
|
|
3899
3899
|
const py = center ? center[1] : 0;
|
|
3900
3900
|
const pz = center ? center[2] : 0;
|
|
3901
3901
|
const dx = direction ? direction[0] : 0;
|
|
3902
3902
|
const dy = direction ? direction[1] : 0;
|
|
3903
3903
|
const dz = direction ? direction[2] : 1;
|
|
3904
|
-
|
|
3904
|
+
let wireId;
|
|
3905
|
+
if (typeof k.makeHelixWireHanded === "function") wireId = k.makeHelixWireHanded(px, py, pz, dx, dy, dz, pitch, height, radius, leftHanded);
|
|
3906
|
+
else if (leftHanded) throw new Error("occt-wasm: a left-handed helix needs occt-wasm 4.3.0 or newer");
|
|
3907
|
+
else wireId = k.makeHelixWire(px, py, pz, dx, dy, dz, pitch, height, radius);
|
|
3905
3908
|
k.buildCurves3d(wireId);
|
|
3906
3909
|
return handle("wire", wireId);
|
|
3907
3910
|
}
|
|
@@ -5288,8 +5291,8 @@ var OcctWasmAdapter = class OcctWasmAdapter {
|
|
|
5288
5291
|
makeTangentArc(startPoint, startTangent, endPoint) {
|
|
5289
5292
|
return makeTangentArc(this.k, startPoint, startTangent, endPoint);
|
|
5290
5293
|
}
|
|
5291
|
-
makeHelixWire(pitch, height, radius, center, direction,
|
|
5292
|
-
return makeHelixWire(this.k, pitch, height, radius, center, direction);
|
|
5294
|
+
makeHelixWire(pitch, height, radius, center, direction, leftHanded) {
|
|
5295
|
+
return makeHelixWire(this.k, pitch, height, radius, center, direction, leftHanded);
|
|
5293
5296
|
}
|
|
5294
5297
|
makeWireFromMixed(items) {
|
|
5295
5298
|
return makeWireFromMixed(this.k, this.Module, items);
|
|
@@ -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-CVIEbOW3.cjs");
|
|
3
|
+
const require_loftFns = require("./loftFns-AHaYxJyS.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-f2KwibLR.js";
|
|
2
|
+
import { c as twistExtrude, o as supportExtrude, r as complexExtrude, s as sweep } from "./loftFns-mbyBvJ8Y.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-PNVEv6ga.js";
|
|
2
|
+
import { C as subShapeHashes, c as getFaces, l as getOrCreateCache, r as getCacheEntry } from "./topologyQueryFns-BZUY10TD.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-D938X2mg.cjs");
|
|
2
|
+
const require_topologyQueryFns = require("./topologyQueryFns-4WYqtSFF.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-D938X2mg.cjs");
|
|
2
2
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
3
|
-
const require_validityTypes = require("./validityTypes-
|
|
3
|
+
const require_validityTypes = require("./validityTypes-tWSx_zAH.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-CAkBQKWb.cjs");
|
|
7
|
+
const require_surfaceBuilders = require("./surfaceBuilders-BKCiVf7T.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-PNVEv6ga.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-DAXIqwZM.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-Hft8Cr6a.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-CrO_BBKM.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
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-D938X2mg.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-4WYqtSFF.cjs");
|
|
5
5
|
const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
|
|
6
|
-
const require_measureFns = require("./measureFns-
|
|
6
|
+
const require_measureFns = require("./measureFns-CuabRDRL.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
|
|
@@ -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-PNVEv6ga.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-BZUY10TD.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-C94G0fH8.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
|
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-DB1IyMmS.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-DRok4UxZ.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-C4f2MV-r.cjs");
|
|
3
|
+
const require_cornerFinder = require("./cornerFinder-DfYBHHZG.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-CNgipe6l.js";
|
|
2
|
+
import { t as cornerFinder } from "./cornerFinder-D5qnDbtZ.js";
|
|
3
3
|
export { cornerFinder, edgeFinder, faceFinder, getSingleFace };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { g as disposeTransientSubShape, o as castShapeWithKnownType, q as getKernel } from "./shapeTypes-
|
|
2
|
-
import { c as getFaces, w as vertexPosition } from "./topologyQueryFns-
|
|
3
|
-
import { i as faceGeomType, l as normalAt, r as faceCenter } from "./faceFns-
|
|
1
|
+
import { g as disposeTransientSubShape, o as castShapeWithKnownType, q as getKernel } from "./shapeTypes-PNVEv6ga.js";
|
|
2
|
+
import { c as getFaces, w as vertexPosition } from "./topologyQueryFns-BZUY10TD.js";
|
|
3
|
+
import { i as faceGeomType, l as normalAt, r as faceCenter } from "./faceFns-lE2OvBfq.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-CdrDroOM.js";
|
|
6
|
+
import { n as measureArea, s as measureLength } from "./measureFns-C94G0fH8.js";
|
|
7
|
+
import { a as facesOfVertex, c as verticesOfFace, i as facesOfEdge, o as sharedEdges, s as verticesOfEdge, t as adjacentFaceHashes } from "./adjacencyFns-B2Po1gPs.js";
|
|
8
8
|
// src/topology/shapeRef/scoring.ts
|
|
9
9
|
/**
|
|
10
10
|
* Default face scorer combining surface type, normal alignment, centroid proximity,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
-
const require_faceFns = require("./faceFns-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-D938X2mg.cjs");
|
|
2
|
+
const require_topologyQueryFns = require("./topologyQueryFns-4WYqtSFF.cjs");
|
|
3
|
+
const require_faceFns = require("./faceFns-Cx7cwUMx.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-CwjjUOr0.cjs");
|
|
6
|
+
const require_measureFns = require("./measureFns-CuabRDRL.cjs");
|
|
7
|
+
const require_adjacencyFns = require("./adjacencyFns-Cho9v3Q3.cjs");
|
|
8
8
|
// src/topology/shapeRef/scoring.ts
|
|
9
9
|
/**
|
|
10
10
|
* Default face scorer combining surface type, normal alignment, centroid proximity,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { q as getKernel } from "./shapeTypes-
|
|
1
|
+
import { q as getKernel } from "./shapeTypes-PNVEv6ga.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-BZUY10TD.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-D938X2mg.cjs");
|
|
2
2
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-4WYqtSFF.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-CaAw-ya3.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--SRyN2qa.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as scaleCurve2d$2, D as quickHull, E as translateCurve2d$2, M as OCCT_CAPABILITIES, O as UnsupportedKernelOperationError, S as rotateCurve2d$2, T as tangentCurve2d, _ 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 EXACT_BREP_CAPABILITIES, k as isUnsupportedKernelOperationError, 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 serializeCurve2d$2, x as mirrorAtPoint, y as makeLine2d$2 } from "./occtWasmAdapter-
|
|
1
|
+
import { C as scaleCurve2d$2, D as quickHull, E as translateCurve2d$2, M as OCCT_CAPABILITIES, O as UnsupportedKernelOperationError, S as rotateCurve2d$2, T as tangentCurve2d, _ 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 EXACT_BREP_CAPABILITIES, k as isUnsupportedKernelOperationError, 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 serializeCurve2d$2, x as mirrorAtPoint, y as makeLine2d$2 } from "./occtWasmAdapter-DlNmVNUn.js";
|
|
2
2
|
import { i as wasmIndex, r as vec3At } from "./bug-ClMTAJhe.js";
|
|
3
3
|
// src/kernel/quality.ts
|
|
4
4
|
/**
|
|
@@ -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-CZyokLGJ.cjs");
|
|
3
|
+
const require_drawFns = require("./drawFns-D8e5RiRe.cjs");
|
|
4
|
+
const require_textBlueprints = require("./textBlueprints-C9HeYc5a.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-CwTAtrkY.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-aGufr-pr.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-B8q2a-nN.js";
|
|
4
4
|
// src/sketching.ts
|
|
5
5
|
/**
|
|
6
6
|
* brepjs/sketching — Sketcher, Drawing, and sketch-to-shape operations.
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-D938X2mg.cjs");
|
|
2
2
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-4WYqtSFF.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-Cx7cwUMx.cjs");
|
|
8
|
+
const require_originTrackingFns = require("./originTrackingFns-C-yuMV3m.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-BKCiVf7T.cjs");
|
|
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
|
-
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-PNVEv6ga.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-BZUY10TD.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-lE2OvBfq.js";
|
|
8
|
+
import { n as propagateOriginsByHash, r as propagateOriginsFromEvolution, t as getFaceOrigins } from "./originTrackingFns-BxeUD2NM.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-CrO_BBKM.js";
|
|
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-D938X2mg.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-tWSx_zAH.cjs");
|
|
4
|
+
const require_faceFns = require("./faceFns-Cx7cwUMx.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-PNVEv6ga.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-DAXIqwZM.js";
|
|
4
|
+
import { _ as cast, u as outerWire } from "./faceFns-lE2OvBfq.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-C9HeYc5a.cjs");
|
|
3
|
+
const require_textMetrics = require("./textMetrics-1fhCSAGF.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-B8q2a-nN.js";
|
|
2
|
+
import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-DJfTSy6w.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-PNVEv6ga.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-lE2OvBfq.js";
|
|
9
|
+
import { o as makeSolid, p as cutAll, t as makeCompound } from "./solidBuilders-Hft8Cr6a.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-BGPSFUWB.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-CrO_BBKM.js";
|
|
14
|
+
import { r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-CwTAtrkY.js";
|
|
15
|
+
import { c as twistExtrude, r as complexExtrude, s as sweep, t as loft } from "./loftFns-mbyBvJ8Y.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
|
}
|