brepjs 18.69.3 → 18.71.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/2d.cjs +6 -6
- package/dist/2d.js +6 -6
- package/dist/{blueprint-DIQeD9xj.cjs → blueprint-jlSsZ0sZ.cjs} +5 -5
- package/dist/{blueprint-Dgl9IkCV.js → blueprint-qVw9ZkE4.js} +5 -5
- package/dist/{blueprintFns-BO44cqFY.cjs → blueprintFns-DsuY7gCu.cjs} +2 -2
- package/dist/{blueprintFns-sKzHcJ4U.js → blueprintFns-zLwbytjs.js} +2 -2
- package/dist/{blueprintSketcher-DbINWerx.js → blueprintSketcher-BRKbVgE2.js} +3 -3
- package/dist/{blueprintSketcher-BpOknLmX.cjs → blueprintSketcher-dZZ8e5ey.cjs} +3 -3
- package/dist/{boolean2D-DZcOTOSA.cjs → boolean2D-4E1kbwQx.cjs} +4 -4
- package/dist/{boolean2D-CreNaKXt.js → boolean2D-CANP43pN.js} +4 -4
- package/dist/{booleanFns-DvXg6a2Y.cjs → booleanFns-Bp_wYEwG.cjs} +4 -4
- package/dist/{booleanFns-0jDBFjAv.js → booleanFns-DYSaupiG.js} +4 -4
- package/dist/brepjs.cjs +375 -65
- package/dist/brepjs.js +372 -68
- package/dist/{cameraFns-Bwxq0IDz.js → cameraFns-BFRGMXSn.js} +2 -2
- package/dist/{cameraFns-CsGSVYgb.cjs → cameraFns-dRK1CnFi.cjs} +2 -2
- package/dist/core.cjs +1 -1
- package/dist/core.js +1 -1
- package/dist/{cornerFinder-ChltJ_ur.cjs → cornerFinder-CQPXY8Aw.cjs} +1 -1
- package/dist/{cornerFinder-fMf9-El_.js → cornerFinder-DcHCKoUh.js} +1 -1
- package/dist/{curveFns-BhTtS18d.js → curveFns-CXhOkKR4.js} +1 -1
- package/dist/{curveFns-CXytEfTr.cjs → curveFns-uPVW6eo-.cjs} +1 -1
- package/dist/{drawFns-Bzr38vZx.js → drawFns-ZqWpAG8b.js} +12 -12
- package/dist/{drawFns-Bn4vzbUr.cjs → drawFns-eMU4H__w.cjs} +12 -12
- package/dist/{extrudeFns-rnUgev_g.js → extrudeFns-CSy2C7WW.js} +1 -1
- package/dist/{extrudeFns-C0FsOXev.cjs → extrudeFns-CzQans6p.cjs} +1 -1
- package/dist/{faceFns-Dreo5ksY.js → faceFns-BBcrvY7r.js} +11 -3
- package/dist/{faceFns-FAZgMVCx.cjs → faceFns-CcLFCtg4.cjs} +16 -2
- package/dist/{helpers-D8ycrNeD.cjs → helpers-BmY5kO0w.cjs} +6 -6
- package/dist/{helpers--BMa_zB7.js → helpers-CxT3j8jG.js} +6 -6
- package/dist/{historyFns-mnmeZ0kB.cjs → historyFns-BEB2Yjld.cjs} +4 -4
- package/dist/{historyFns-CR0RejKJ.js → historyFns-ClLT60_V.js} +4 -4
- package/dist/{importFns-DRPQExAD.js → importFns-BNDWuBuq.js} +2 -2
- package/dist/{importFns-4mi5Ih46.cjs → importFns-DA0Klh7_.cjs} +2 -2
- package/dist/index.d.ts +2 -1
- package/dist/io.cjs +2 -2
- package/dist/io.js +2 -2
- package/dist/kernel/brepkit/geometryOps.d.ts +1 -0
- package/dist/kernel/interfaces/surfaceOps.d.ts +9 -0
- package/dist/kernel/occt/geometryQueryOps.d.ts +9 -0
- package/dist/kernel/occtWasm/occtWasmAdapter.cjs +1 -1
- package/dist/kernel/occtWasm/occtWasmAdapter.d.ts +4 -0
- package/dist/kernel/occtWasm/occtWasmAdapter.js +1 -1
- package/dist/kernel/occtWasm/surfaceOps.d.ts +17 -0
- package/dist/kernel/solverAdapter.d.ts +8 -7
- package/dist/{measureFns-BLEx4ZU3.js → measureFns-DAP8LjBB.js} +3 -3
- package/dist/{measureFns-CT0XaSOt.cjs → measureFns-zGABZl6o.cjs} +3 -3
- package/dist/measurement.cjs +1 -1
- package/dist/measurement.js +1 -1
- package/dist/{meshFns-lwgHYQ79.cjs → meshFns-CEGnFm33.cjs} +3 -3
- package/dist/{meshFns-B3MjIqk1.js → meshFns-D-nLiHvU.js} +3 -3
- package/dist/{occtWasmAdapter-BH7r2nTq.cjs → occtWasmAdapter-Crs07qIe.cjs} +67 -0
- package/dist/{occtWasmAdapter-C7FDeTaw.js → occtWasmAdapter-D0MtWZYO.js} +67 -0
- package/dist/operations/assemblyFns.d.ts +2 -0
- package/dist/operations/jointFns.d.ts +55 -0
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/{primitiveFns-DcZDTQ_R.js → primitiveFns-CDbe5gjc.js} +7 -7
- package/dist/{primitiveFns-DZmgvzvk.cjs → primitiveFns-CpkG8ZkI.cjs} +7 -7
- package/dist/projection.cjs +1 -1
- package/dist/projection.js +1 -1
- package/dist/query.cjs +2 -2
- package/dist/query.js +2 -2
- package/dist/{shapeFns-w1YoIn_p.cjs → shapeFns-CDHya-nt.cjs} +2 -2
- package/dist/{shapeFns-BnkizFjV.js → shapeFns-DVUNOG2I.js} +2 -2
- package/dist/shapeRef.cjs +1 -1
- package/dist/shapeRef.js +1 -1
- package/dist/{shapeRefFns-B3myHs0D.cjs → shapeRefFns-B1Tygk9V.cjs} +4 -4
- package/dist/{shapeRefFns-OVWdFOAC.js → shapeRefFns-CAJUDLTi.js} +4 -4
- package/dist/{shapeTypes-yCQ8z5Hc.js → shapeTypes-2cKwu2z4.js} +35 -1
- package/dist/{shapeTypes-BIlZar9m.cjs → shapeTypes-DRxArFIc.cjs} +35 -1
- package/dist/sketching.cjs +3 -3
- package/dist/sketching.js +3 -3
- package/dist/{solidBuilders-CPOTKI5i.js → solidBuilders-Bx3UdW91.js} +2 -2
- package/dist/{solidBuilders-dNhToZgl.cjs → solidBuilders-ibLq_9EK.cjs} +2 -2
- package/dist/{surfaceBuilders-CS1QccDv.js → surfaceBuilders-BtNrSolT.js} +2 -2
- package/dist/{surfaceBuilders-CzHPZtd3.cjs → surfaceBuilders-D2PBBoja.cjs} +2 -2
- package/dist/text.cjs +2 -2
- package/dist/text.js +2 -2
- package/dist/{textBlueprints-TG6AH06v.cjs → textBlueprints-COG8m1aE.cjs} +7 -7
- package/dist/{textBlueprints-B57ej88L.js → textBlueprints-HfRD4iNF.js} +7 -7
- package/dist/{textMetrics-Dag-YREs.cjs → textMetrics-CTSpUXtk.cjs} +1 -1
- package/dist/{textMetrics-BxtB3sjj.js → textMetrics-Zp8rzokO.js} +1 -1
- package/dist/topology/faceFns.d.ts +9 -0
- package/dist/topology/index.d.ts +1 -1
- package/dist/topology.cjs +8 -7
- package/dist/topology.d.ts +1 -1
- package/dist/topology.js +8 -8
- package/dist/{topologyQueryFns-BuWZAQ_o.cjs → topologyQueryFns-024l64sD.cjs} +1 -1
- package/dist/{topologyQueryFns-Bxdnl5Vt.js → topologyQueryFns-c2RQIcfW.js} +1 -1
- package/dist/utils/quaternion.d.ts +15 -0
- package/package.json +1 -1
|
@@ -1772,6 +1772,70 @@ function pointOnSurface(k, face, u, v) {
|
|
|
1772
1772
|
vec.delete();
|
|
1773
1773
|
}
|
|
1774
1774
|
}
|
|
1775
|
+
var subV = (a, b) => [
|
|
1776
|
+
a[0] - b[0],
|
|
1777
|
+
a[1] - b[1],
|
|
1778
|
+
a[2] - b[2]
|
|
1779
|
+
];
|
|
1780
|
+
var lenV = (a) => Math.hypot(a[0], a[1], a[2]);
|
|
1781
|
+
var crossV = (a, b) => [
|
|
1782
|
+
a[1] * b[2] - a[2] * b[1],
|
|
1783
|
+
a[2] * b[0] - a[0] * b[2],
|
|
1784
|
+
a[0] * b[1] - a[1] * b[0]
|
|
1785
|
+
];
|
|
1786
|
+
/**
|
|
1787
|
+
* Derive a cylindrical face's axis (point on axis + unit direction) from the
|
|
1788
|
+
* primitives occt-wasm exposes — it has no analytic `gp_Cylinder` accessor.
|
|
1789
|
+
*
|
|
1790
|
+
* Two surface samples at the same height v give radial normals n1,n2 (lying in
|
|
1791
|
+
* the plane perpendicular to the axis), so `n1 x n2` is parallel to the axis.
|
|
1792
|
+
* The points satisfy `p1 - p2 = ±r(n1 - n2)`, giving the radius
|
|
1793
|
+
* `r = |p1-p2| / |n1-n2|`; the axis point is then `p - r·n` with the normal's
|
|
1794
|
+
* sign chosen so both samples agree. Exact for full and partial cylinders.
|
|
1795
|
+
* Returns null for non-cylinders.
|
|
1796
|
+
*/
|
|
1797
|
+
function getSurfaceAxis(k, face) {
|
|
1798
|
+
if (surfaceType(k, face) !== "cylinder") return null;
|
|
1799
|
+
const b = uvBounds(k, face);
|
|
1800
|
+
const vMid = .5 * (b.vMin + b.vMax);
|
|
1801
|
+
const u1 = b.uMin + .25 * (b.uMax - b.uMin);
|
|
1802
|
+
const u2 = b.uMin + .5 * (b.uMax - b.uMin);
|
|
1803
|
+
const n1 = surfaceNormal(k, face, u1, vMid);
|
|
1804
|
+
const n2 = surfaceNormal(k, face, u2, vMid);
|
|
1805
|
+
const p1 = pointOnSurface(k, face, u1, vMid);
|
|
1806
|
+
const p2 = pointOnSurface(k, face, u2, vMid);
|
|
1807
|
+
const axis = crossV(n1, n2);
|
|
1808
|
+
const axisLen = lenV(axis);
|
|
1809
|
+
const dnLen = lenV(subV(n1, n2));
|
|
1810
|
+
if (axisLen < 1e-9 || dnLen < 1e-9) return null;
|
|
1811
|
+
const direction = [
|
|
1812
|
+
axis[0] / axisLen,
|
|
1813
|
+
axis[1] / axisLen,
|
|
1814
|
+
axis[2] / axisLen
|
|
1815
|
+
];
|
|
1816
|
+
const r = lenV(subV(p1, p2)) / dnLen;
|
|
1817
|
+
const minus1 = [
|
|
1818
|
+
p1[0] - r * n1[0],
|
|
1819
|
+
p1[1] - r * n1[1],
|
|
1820
|
+
p1[2] - r * n1[2]
|
|
1821
|
+
];
|
|
1822
|
+
if (lenV(subV(minus1, [
|
|
1823
|
+
p2[0] - r * n2[0],
|
|
1824
|
+
p2[1] - r * n2[1],
|
|
1825
|
+
p2[2] - r * n2[2]
|
|
1826
|
+
])) < 1e-6) return {
|
|
1827
|
+
origin: minus1,
|
|
1828
|
+
direction
|
|
1829
|
+
};
|
|
1830
|
+
return {
|
|
1831
|
+
origin: [
|
|
1832
|
+
p1[0] + r * n1[0],
|
|
1833
|
+
p1[1] + r * n1[1],
|
|
1834
|
+
p1[2] + r * n1[2]
|
|
1835
|
+
],
|
|
1836
|
+
direction
|
|
1837
|
+
};
|
|
1838
|
+
}
|
|
1775
1839
|
function uvFromPoint(k, face, point) {
|
|
1776
1840
|
const vec = k.uvFromPoint(unwrap(face), point[0], point[1], point[2]);
|
|
1777
1841
|
try {
|
|
@@ -4777,6 +4841,9 @@ var OcctWasmAdapter = class OcctWasmAdapter {
|
|
|
4777
4841
|
getSurfaceCylinderData(_surface) {
|
|
4778
4842
|
notImplemented("getSurfaceCylinderData");
|
|
4779
4843
|
}
|
|
4844
|
+
getSurfaceAxis(face) {
|
|
4845
|
+
return getSurfaceAxis(this.k, face);
|
|
4846
|
+
}
|
|
4780
4847
|
reverseSurfaceU(_surface) {
|
|
4781
4848
|
notImplemented("reverseSurfaceU");
|
|
4782
4849
|
}
|
|
@@ -11,6 +11,8 @@ export interface AssemblyNode {
|
|
|
11
11
|
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
12
12
|
readonly children: ReadonlyArray<AssemblyNode>;
|
|
13
13
|
readonly mates?: readonly unknown[];
|
|
14
|
+
/** Drivable kinematic joints (see jointFns). Typed loosely to avoid a cycle. */
|
|
15
|
+
readonly joints?: readonly unknown[];
|
|
14
16
|
}
|
|
15
17
|
export interface AssemblyNodeOptions {
|
|
16
18
|
shape?: AnyShape;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Vec3 } from '../core/types.js';
|
|
2
|
+
import { AssemblyNode } from './assemblyFns.js';
|
|
3
|
+
/** A joint axis: a point on the axis line plus a direction. */
|
|
4
|
+
export interface JointAxis {
|
|
5
|
+
readonly origin: Vec3;
|
|
6
|
+
readonly direction: Vec3;
|
|
7
|
+
}
|
|
8
|
+
export type JointType = 'revolute' | 'prismatic';
|
|
9
|
+
export interface Joint {
|
|
10
|
+
readonly type: JointType;
|
|
11
|
+
/** Reference body (stays put); the child moves relative to it. */
|
|
12
|
+
readonly parent: string;
|
|
13
|
+
readonly child: string;
|
|
14
|
+
readonly axis: JointAxis;
|
|
15
|
+
/** Range bounds — degrees for revolute, length units for prismatic. */
|
|
16
|
+
readonly min: number;
|
|
17
|
+
readonly max: number;
|
|
18
|
+
/** Current drivable parameter, always clamped to `[min, max]`. */
|
|
19
|
+
readonly value: number;
|
|
20
|
+
}
|
|
21
|
+
/** A rigid transform: translation + quaternion rotation `[w, x, y, z]`. */
|
|
22
|
+
export interface JointPose {
|
|
23
|
+
readonly position: Vec3;
|
|
24
|
+
readonly rotation: [number, number, number, number];
|
|
25
|
+
}
|
|
26
|
+
export interface JointOptions {
|
|
27
|
+
/** Range lower bound. Default: -180 (revolute) / 0 (prismatic). */
|
|
28
|
+
min?: number;
|
|
29
|
+
/** Range upper bound. Default: 180 (revolute) / 100 (prismatic). */
|
|
30
|
+
max?: number;
|
|
31
|
+
/** Initial value, clamped to the range. Default: 0. */
|
|
32
|
+
value?: number;
|
|
33
|
+
}
|
|
34
|
+
/** A revolute (hinge) joint — the child rotates about `axis` by `value` degrees. */
|
|
35
|
+
export declare function revoluteJoint(parent: string, child: string, axis: JointAxis, opts?: JointOptions): Joint;
|
|
36
|
+
/**
|
|
37
|
+
* A prismatic (slider) joint — the child translates along `axis` by `value`
|
|
38
|
+
* units. Only `axis.direction` is used; `axis.origin` is ignored (a pure
|
|
39
|
+
* translation has no anchor point), unlike a revolute joint which rotates about
|
|
40
|
+
* the axis line through `origin`.
|
|
41
|
+
*/
|
|
42
|
+
export declare function prismaticJoint(parent: string, child: string, axis: JointAxis, opts?: JointOptions): Joint;
|
|
43
|
+
/** Return a copy of `joint` with its drivable parameter set (clamped to range). */
|
|
44
|
+
export declare function setJointValue(joint: Joint, value: number): Joint;
|
|
45
|
+
/**
|
|
46
|
+
* The child's local rigid transform (relative to the parent) for a joint value.
|
|
47
|
+
* Defaults to the joint's stored value; an explicit value is clamped to range.
|
|
48
|
+
*
|
|
49
|
+
* - **revolute**: rotation of `value` degrees about the axis line. Rotating
|
|
50
|
+
* about a line through `origin` is `p ↦ R·p + (origin − R·origin)`.
|
|
51
|
+
* - **prismatic**: translation of `value` units along the axis direction.
|
|
52
|
+
*/
|
|
53
|
+
export declare function jointTransform(joint: Joint, value?: number): JointPose;
|
|
54
|
+
/** Attach a joint to an assembly node. Returns a new node (immutable). */
|
|
55
|
+
export declare function addJoint(assembly: AssemblyNode, joint: Joint): AssemblyNode;
|
package/dist/operations.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_historyFns = require("./historyFns-
|
|
3
|
-
const require_extrudeFns = require("./extrudeFns-
|
|
2
|
+
const require_historyFns = require("./historyFns-BEB2Yjld.cjs");
|
|
3
|
+
const require_extrudeFns = require("./extrudeFns-CzQans6p.cjs");
|
|
4
4
|
exports.addChild = require_historyFns.addChild;
|
|
5
5
|
exports.addStep = require_historyFns.addStep;
|
|
6
6
|
exports.circularPattern = require_historyFns.circularPattern;
|
package/dist/operations.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { C as walkAssembly, D as exportAssemblySTEP, E as linearPattern, O as createAssembly, S as updateNode, T as gridPattern, _ as collectShapes, a as findStep, b as findNode, c as registerOperation, d as replayHistory, g as addChild, h as undoLast, l as registerShape, m as stepsFrom, n as createHistory, o as getShape, p as stepCount, r as createRegistry, s as modifyStep, t as addStep, u as replayFrom, v as countNodes, w as circularPattern, x as removeChild, y as createAssemblyNode } from "./historyFns-
|
|
2
|
-
import { c as sweep, i as complexExtrude, l as twistExtrude, s as supportExtrude } from "./extrudeFns-
|
|
1
|
+
import { C as walkAssembly, D as exportAssemblySTEP, E as linearPattern, O as createAssembly, S as updateNode, T as gridPattern, _ as collectShapes, a as findStep, b as findNode, c as registerOperation, d as replayHistory, g as addChild, h as undoLast, l as registerShape, m as stepsFrom, n as createHistory, o as getShape, p as stepCount, r as createRegistry, s as modifyStep, t as addStep, u as replayFrom, v as countNodes, w as circularPattern, x as removeChild, y as createAssemblyNode } from "./historyFns-ClLT60_V.js";
|
|
2
|
+
import { c as sweep, i as complexExtrude, l as twistExtrude, s as supportExtrude } from "./extrudeFns-CSy2C7WW.js";
|
|
3
3
|
export { addChild, addStep, circularPattern, collectShapes, complexExtrude, countNodes, createAssembly, createAssemblyNode, createHistory, createRegistry, exportAssemblySTEP, findNode, findStep, getShape as getHistoryShape, gridPattern, linearPattern, modifyStep, registerOperation, registerShape, removeChild, replayFrom, replayHistory, stepCount, stepsFrom, supportExtrude, sweep, twistExtrude, undoLast, updateNode, walkAssembly };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Z as getKernel, _ as isSolid, c as createSolid, h as isShape3D, p as isFace, r as castShapeWithKnownType, t as castShape, x as isClosedWire, y as isWire } from "./shapeTypes-
|
|
1
|
+
import { Z as getKernel, _ as isSolid, c as createSolid, h as isShape3D, p as isFace, r as castShapeWithKnownType, t as castShape, x as isClosedWire, y as isWire } from "./shapeTypes-2cKwu2z4.js";
|
|
2
2
|
import { A as ok, T as isOk, b as err, d as validationError, i as kernelError, l as typeCastError, t as BrepErrorCode, v as andThen, w as isErr } from "./errors-DNWJsfVU.js";
|
|
3
|
-
import { c as getFaces, i as getCachedIsValid, l as getOrCreateCache, m as invalidateShapeCache, p as getWires, s as getEdges } from "./topologyQueryFns-
|
|
3
|
+
import { c as getFaces, i as getCachedIsValid, l as getOrCreateCache, m as invalidateShapeCache, p as getWires, s as getEdges } from "./topologyQueryFns-c2RQIcfW.js";
|
|
4
4
|
import { n as HASH_CODE_MAX, t as DEG2RAD } from "./constants-ITRzCnCp.js";
|
|
5
|
-
import {
|
|
6
|
-
import { _ as propagateAllMetadata, g as collectInputFaceHashes, h as translate } from "./shapeFns-
|
|
5
|
+
import { v as downcast } from "./faceFns-BBcrvY7r.js";
|
|
6
|
+
import { _ as propagateAllMetadata, g as collectInputFaceHashes, h as translate } from "./shapeFns-DVUNOG2I.js";
|
|
7
7
|
import { t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
8
|
-
import { _ as makeThreePointArc, a as makeNonPlanarFace, c as makeBSplineApproximation, d as makeCircle, f as makeEllipse, g as makeTangentArc, h as makeLine, i as makeNewFaceWithinFace, m as makeHelix, o as makePolygon, p as makeEllipseArc, r as makeFace, s as assembleWire, t as addHolesInFace, u as makeBezierCurve } from "./surfaceBuilders-
|
|
9
|
-
import { a as fuseAll, i as fuse, n as cut, r as cutAll } from "./booleanFns-
|
|
10
|
-
import { a as makeOffset, c as makeTorus, i as makeEllipsoid, l as makeVertex, n as makeCone, o as makeSolid, r as makeCylinder, s as makeSphere, t as makeCompound, u as weldShellsAndFaces } from "./solidBuilders-
|
|
8
|
+
import { _ as makeThreePointArc, a as makeNonPlanarFace, c as makeBSplineApproximation, d as makeCircle, f as makeEllipse, g as makeTangentArc, h as makeLine, i as makeNewFaceWithinFace, m as makeHelix, o as makePolygon, p as makeEllipseArc, r as makeFace, s as assembleWire, t as addHolesInFace, u as makeBezierCurve } from "./surfaceBuilders-BtNrSolT.js";
|
|
9
|
+
import { a as fuseAll, i as fuse, n as cut, r as cutAll } from "./booleanFns-DYSaupiG.js";
|
|
10
|
+
import { a as makeOffset, c as makeTorus, i as makeEllipsoid, l as makeVertex, n as makeCone, o as makeSolid, r as makeCylinder, s as makeSphere, t as makeCompound, u as weldShellsAndFaces } from "./solidBuilders-Bx3UdW91.js";
|
|
11
11
|
//#region src/topology/threeHelpers.ts
|
|
12
12
|
/**
|
|
13
13
|
* Convert a ShapeMesh into BufferGeometry-compatible typed arrays.
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-DRxArFIc.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-024l64sD.cjs");
|
|
4
4
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
5
|
-
const require_faceFns = require("./faceFns-
|
|
6
|
-
const require_shapeFns = require("./shapeFns-
|
|
5
|
+
const require_faceFns = require("./faceFns-CcLFCtg4.cjs");
|
|
6
|
+
const require_shapeFns = require("./shapeFns-CDHya-nt.cjs");
|
|
7
7
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
8
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
9
|
-
const require_booleanFns = require("./booleanFns-
|
|
10
|
-
const require_solidBuilders = require("./solidBuilders-
|
|
8
|
+
const require_surfaceBuilders = require("./surfaceBuilders-D2PBBoja.cjs");
|
|
9
|
+
const require_booleanFns = require("./booleanFns-Bp_wYEwG.cjs");
|
|
10
|
+
const require_solidBuilders = require("./solidBuilders-ibLq_9EK.cjs");
|
|
11
11
|
//#region src/topology/threeHelpers.ts
|
|
12
12
|
/**
|
|
13
13
|
* Convert a ShapeMesh into BufferGeometry-compatible typed arrays.
|
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-dRK1CnFi.cjs");
|
|
3
3
|
exports.PROJECTION_PLANES = require_cameraFns.PROJECTION_PLANES;
|
|
4
4
|
exports.cameraFromPlane = require_cameraFns.cameraFromPlane;
|
|
5
5
|
exports.cameraLookAt = require_cameraFns.cameraLookAt;
|
package/dist/projection.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as makeProjectedEdges, i as projectEdges, n as cameraLookAt, o as PROJECTION_PLANES, r as createCamera, s as isProjectionPlane, t as cameraFromPlane } from "./cameraFns-
|
|
1
|
+
import { a as makeProjectedEdges, i as projectEdges, n as cameraLookAt, o as PROJECTION_PLANES, r as createCamera, s as isProjectionPlane, t as cameraFromPlane } from "./cameraFns-BFRGMXSn.js";
|
|
2
2
|
export { PROJECTION_PLANES, cameraFromPlane, cameraLookAt, createCamera, isProjectionPlane, makeProjectedEdges, projectEdges };
|
package/dist/query.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_helpers = require("./helpers-
|
|
3
|
-
const require_cornerFinder = require("./cornerFinder-
|
|
2
|
+
const require_helpers = require("./helpers-BmY5kO0w.cjs");
|
|
3
|
+
const require_cornerFinder = require("./cornerFinder-CQPXY8Aw.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-CxT3j8jG.js";
|
|
2
|
+
import { t as cornerFinder } from "./cornerFinder-DcHCKoUh.js";
|
|
3
3
|
export { cornerFinder, edgeFinder, faceFinder, getSingleFace };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-DRxArFIc.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-024l64sD.cjs");
|
|
4
4
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
5
5
|
//#region src/topology/metadata/originTrackingFns.ts
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Z as getKernel, t as castShape } from "./shapeTypes-
|
|
1
|
+
import { Z as getKernel, t as castShape } from "./shapeTypes-2cKwu2z4.js";
|
|
2
2
|
import { A as ok, b as err, d as validationError, t as BrepErrorCode } from "./errors-DNWJsfVU.js";
|
|
3
|
-
import { C as kernelCall, c as getFaces, l as getOrCreateCache, r as getCacheEntry, w as kernelCallRaw } from "./topologyQueryFns-
|
|
3
|
+
import { C as kernelCall, c as getFaces, l as getOrCreateCache, r as getCacheEntry, w as kernelCallRaw } from "./topologyQueryFns-c2RQIcfW.js";
|
|
4
4
|
import { n as HASH_CODE_MAX, t as DEG2RAD } from "./constants-ITRzCnCp.js";
|
|
5
5
|
//#region src/topology/metadata/originTrackingFns.ts
|
|
6
6
|
/**
|
package/dist/shapeRef.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_shapeRefFns = require("./shapeRefFns-
|
|
2
|
+
const require_shapeRefFns = require("./shapeRefFns-B1Tygk9V.cjs");
|
|
3
3
|
exports.assignRoles = require_shapeRefFns.assignRoles;
|
|
4
4
|
exports.captureHint = require_shapeRefFns.captureHint;
|
|
5
5
|
exports.createRef = require_shapeRefFns.createRef;
|
package/dist/shapeRef.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as updateRoles, i as resolveRef, n as captureHint, o as defaultScorer, r as createRef, t as assignRoles } from "./shapeRefFns-
|
|
1
|
+
import { a as updateRoles, i as resolveRef, n as captureHint, o as defaultScorer, r as createRef, t as assignRoles } from "./shapeRefFns-CAJUDLTi.js";
|
|
2
2
|
export { assignRoles, captureHint, createRef, defaultScorer, resolveRef, updateRoles };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
|
|
2
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
-
const require_faceFns = require("./faceFns-
|
|
4
|
-
const require_shapeFns = require("./shapeFns-
|
|
5
|
-
const require_measureFns = require("./measureFns-
|
|
2
|
+
const require_topologyQueryFns = require("./topologyQueryFns-024l64sD.cjs");
|
|
3
|
+
const require_faceFns = require("./faceFns-CcLFCtg4.cjs");
|
|
4
|
+
const require_shapeFns = require("./shapeFns-CDHya-nt.cjs");
|
|
5
|
+
const require_measureFns = require("./measureFns-zGABZl6o.cjs");
|
|
6
6
|
//#region src/topology/shapeRef/scoring.ts
|
|
7
7
|
/**
|
|
8
8
|
* Default face scorer combining surface type, normal alignment, centroid proximity,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as wasmIndex } from "./vec3-Dpha8d5k.js";
|
|
2
|
-
import { c as getFaces } from "./topologyQueryFns-
|
|
3
|
-
import {
|
|
4
|
-
import { n as getHashCode } from "./shapeFns-
|
|
5
|
-
import { n as measureArea } from "./measureFns-
|
|
2
|
+
import { c as getFaces } from "./topologyQueryFns-c2RQIcfW.js";
|
|
3
|
+
import { i as faceGeomType, l as normalAt, r as faceCenter } from "./faceFns-BBcrvY7r.js";
|
|
4
|
+
import { n as getHashCode } from "./shapeFns-DVUNOG2I.js";
|
|
5
|
+
import { n as measureArea } from "./measureFns-DAP8LjBB.js";
|
|
6
6
|
//#region src/topology/shapeRef/scoring.ts
|
|
7
7
|
/**
|
|
8
8
|
* Default face scorer combining surface type, normal alignment, centroid proximity,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as translateCurve2d$2, E as EXACT_BREP_CAPABILITIES, S as tangentCurve2d, _ as mirrorAcrossAxis, a as buildBinarySTL, b as scaleCurve2d$2, c as curveBounds, d as evaluateCurve2d$2, f as intersectCurves2dFn, g as makeLine2d$2, h as makeEllipse2d$2, i as buildAsciiSTL, l as curveTypeName, m as makeCircle2d$2, n as DEFAULT_STL_ANGULAR_TOLERANCE, o as addCurveToBBox, p as makeBezier2d$2, r as DEFAULT_STL_TOLERANCE, s as createBBox2d, t as OcctWasmAdapter, u as deserializeCurve2d$2, v as mirrorAtPoint, w as quickHull, x as serializeCurve2d$2, y as rotateCurve2d$2 } from "./occtWasmAdapter-
|
|
1
|
+
import { C as translateCurve2d$2, E as EXACT_BREP_CAPABILITIES, S as tangentCurve2d, _ as mirrorAcrossAxis, a as buildBinarySTL, b as scaleCurve2d$2, c as curveBounds, d as evaluateCurve2d$2, f as intersectCurves2dFn, g as makeLine2d$2, h as makeEllipse2d$2, i as buildAsciiSTL, l as curveTypeName, m as makeCircle2d$2, n as DEFAULT_STL_ANGULAR_TOLERANCE, o as addCurveToBBox, p as makeBezier2d$2, r as DEFAULT_STL_TOLERANCE, s as createBBox2d, t as OcctWasmAdapter, u as deserializeCurve2d$2, v as mirrorAtPoint, w as quickHull, x as serializeCurve2d$2, y as rotateCurve2d$2 } from "./occtWasmAdapter-D0MtWZYO.js";
|
|
2
2
|
import { n as wasmIndex, t as vec3At } from "./vec3-Dpha8d5k.js";
|
|
3
3
|
import { A as ok, b as err } from "./errors-DNWJsfVU.js";
|
|
4
4
|
//#region src/kernel/quality.ts
|
|
@@ -2886,6 +2886,37 @@ function getSurfaceCylinderData$1(oc, surface) {
|
|
|
2886
2886
|
adaptor.delete();
|
|
2887
2887
|
return result;
|
|
2888
2888
|
}
|
|
2889
|
+
/** Get a cylindrical face's axis (point on axis + unit direction). Null otherwise. */
|
|
2890
|
+
function getSurfaceAxis(oc, face) {
|
|
2891
|
+
const adaptor = new oc.BRepAdaptor_Surface_2(face, false);
|
|
2892
|
+
try {
|
|
2893
|
+
const typeVal = adaptor.GetType();
|
|
2894
|
+
if ((typeof typeVal === "number" ? typeVal : Number(typeVal?.value ?? typeVal)) !== 1) return null;
|
|
2895
|
+
const cyl = adaptor.Cylinder();
|
|
2896
|
+
const axis = cyl.Axis();
|
|
2897
|
+
const loc = axis.Location();
|
|
2898
|
+
const dir = axis.Direction();
|
|
2899
|
+
const result = {
|
|
2900
|
+
origin: [
|
|
2901
|
+
loc.X(),
|
|
2902
|
+
loc.Y(),
|
|
2903
|
+
loc.Z()
|
|
2904
|
+
],
|
|
2905
|
+
direction: [
|
|
2906
|
+
dir.X(),
|
|
2907
|
+
dir.Y(),
|
|
2908
|
+
dir.Z()
|
|
2909
|
+
]
|
|
2910
|
+
};
|
|
2911
|
+
loc.delete();
|
|
2912
|
+
dir.delete();
|
|
2913
|
+
axis.delete();
|
|
2914
|
+
cyl.delete();
|
|
2915
|
+
return result;
|
|
2916
|
+
} finally {
|
|
2917
|
+
adaptor.delete();
|
|
2918
|
+
}
|
|
2919
|
+
}
|
|
2889
2920
|
/** Reverse the U direction of a surface. Returns a new surface handle. */
|
|
2890
2921
|
function reverseSurfaceU$1(_oc, surface) {
|
|
2891
2922
|
return surface.get().UReversed();
|
|
@@ -2920,6 +2951,7 @@ function makeGeometryQueryOps(oc) {
|
|
|
2920
2951
|
curvePeriod: (shape) => curvePeriod$1(oc, shape),
|
|
2921
2952
|
curveType: (shape) => curveType$1(oc, shape),
|
|
2922
2953
|
getSurfaceCylinderData: (surface) => getSurfaceCylinderData$1(oc, surface),
|
|
2954
|
+
getSurfaceAxis: (face) => getSurfaceAxis(oc, face),
|
|
2923
2955
|
reverseSurfaceU: (surface) => reverseSurfaceU$1(oc, surface)
|
|
2924
2956
|
};
|
|
2925
2957
|
}
|
|
@@ -6087,6 +6119,7 @@ function makeGeometryOps$1(bk) {
|
|
|
6087
6119
|
createCurveAdaptor: (shape) => createCurveAdaptor(bk, shape),
|
|
6088
6120
|
getBezierPenultimatePole: (edge) => getBezierPenultimatePole(bk, edge),
|
|
6089
6121
|
getSurfaceCylinderData: (surface) => getSurfaceCylinderData(bk, surface),
|
|
6122
|
+
getSurfaceAxis: () => null,
|
|
6090
6123
|
reverseSurfaceU: (surface) => reverseSurfaceU(bk, surface),
|
|
6091
6124
|
classifyPointOnFace: (face, u, v, tolerance) => classifyPointOnFace(bk, face, u, v, tolerance),
|
|
6092
6125
|
classifyPointRobust: (shape, point, tolerance) => classifyPointRobust(bk, shape, point, tolerance),
|
|
@@ -14213,6 +14246,7 @@ function makeGeometryOps(_module) {
|
|
|
14213
14246
|
approximateSurfaceLspia: (coords, rows, cols, degreeU, degreeV, numCpsU, numCpsV, tolerance, maxIterations) => occtOrThrow("approximateSurfaceLspia").approximateSurfaceLspia(coords, rows, cols, degreeU, degreeV, numCpsU, numCpsV, tolerance, maxIterations),
|
|
14214
14247
|
untrimFace: (face, samplesPerCurve, interiorSamples) => viaOcct(face, (s, occt) => occt.untrimFace(s, samplesPerCurve, interiorSamples)),
|
|
14215
14248
|
getSurfaceCylinderData: (surface) => viaOcct(surface, (s, occt) => occt.getSurfaceCylinderData(s)),
|
|
14249
|
+
getSurfaceAxis: (face) => viaOcct(face, (s, occt) => occt.getSurfaceAxis(s)),
|
|
14216
14250
|
reverseSurfaceU: (surface) => occtOrThrow("reverseSurfaceU").reverseSurfaceU(surface),
|
|
14217
14251
|
detectSmallFeatures: (shape, areaThreshold, tolerance) => viaOcct(shape, (s, occt) => occt.detectSmallFeatures(s, areaThreshold, tolerance)),
|
|
14218
14252
|
recognizeFeatures: (shape, tolerance) => viaOcct(shape, (s, occt) => occt.recognizeFeatures(s, tolerance)),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_occtWasmAdapter = require("./occtWasmAdapter-
|
|
1
|
+
const require_occtWasmAdapter = require("./occtWasmAdapter-Crs07qIe.cjs");
|
|
2
2
|
const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
|
|
3
3
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
4
4
|
//#region src/kernel/quality.ts
|
|
@@ -2886,6 +2886,37 @@ function getSurfaceCylinderData$1(oc, surface) {
|
|
|
2886
2886
|
adaptor.delete();
|
|
2887
2887
|
return result;
|
|
2888
2888
|
}
|
|
2889
|
+
/** Get a cylindrical face's axis (point on axis + unit direction). Null otherwise. */
|
|
2890
|
+
function getSurfaceAxis(oc, face) {
|
|
2891
|
+
const adaptor = new oc.BRepAdaptor_Surface_2(face, false);
|
|
2892
|
+
try {
|
|
2893
|
+
const typeVal = adaptor.GetType();
|
|
2894
|
+
if ((typeof typeVal === "number" ? typeVal : Number(typeVal?.value ?? typeVal)) !== 1) return null;
|
|
2895
|
+
const cyl = adaptor.Cylinder();
|
|
2896
|
+
const axis = cyl.Axis();
|
|
2897
|
+
const loc = axis.Location();
|
|
2898
|
+
const dir = axis.Direction();
|
|
2899
|
+
const result = {
|
|
2900
|
+
origin: [
|
|
2901
|
+
loc.X(),
|
|
2902
|
+
loc.Y(),
|
|
2903
|
+
loc.Z()
|
|
2904
|
+
],
|
|
2905
|
+
direction: [
|
|
2906
|
+
dir.X(),
|
|
2907
|
+
dir.Y(),
|
|
2908
|
+
dir.Z()
|
|
2909
|
+
]
|
|
2910
|
+
};
|
|
2911
|
+
loc.delete();
|
|
2912
|
+
dir.delete();
|
|
2913
|
+
axis.delete();
|
|
2914
|
+
cyl.delete();
|
|
2915
|
+
return result;
|
|
2916
|
+
} finally {
|
|
2917
|
+
adaptor.delete();
|
|
2918
|
+
}
|
|
2919
|
+
}
|
|
2889
2920
|
/** Reverse the U direction of a surface. Returns a new surface handle. */
|
|
2890
2921
|
function reverseSurfaceU$1(_oc, surface) {
|
|
2891
2922
|
return surface.get().UReversed();
|
|
@@ -2920,6 +2951,7 @@ function makeGeometryQueryOps(oc) {
|
|
|
2920
2951
|
curvePeriod: (shape) => curvePeriod$1(oc, shape),
|
|
2921
2952
|
curveType: (shape) => curveType$1(oc, shape),
|
|
2922
2953
|
getSurfaceCylinderData: (surface) => getSurfaceCylinderData$1(oc, surface),
|
|
2954
|
+
getSurfaceAxis: (face) => getSurfaceAxis(oc, face),
|
|
2923
2955
|
reverseSurfaceU: (surface) => reverseSurfaceU$1(oc, surface)
|
|
2924
2956
|
};
|
|
2925
2957
|
}
|
|
@@ -6091,6 +6123,7 @@ function makeGeometryOps$1(bk) {
|
|
|
6091
6123
|
createCurveAdaptor: (shape) => createCurveAdaptor(bk, shape),
|
|
6092
6124
|
getBezierPenultimatePole: (edge) => getBezierPenultimatePole(bk, edge),
|
|
6093
6125
|
getSurfaceCylinderData: (surface) => getSurfaceCylinderData(bk, surface),
|
|
6126
|
+
getSurfaceAxis: () => null,
|
|
6094
6127
|
reverseSurfaceU: (surface) => reverseSurfaceU(bk, surface),
|
|
6095
6128
|
classifyPointOnFace: (face, u, v, tolerance) => classifyPointOnFace(bk, face, u, v, tolerance),
|
|
6096
6129
|
classifyPointRobust: (shape, point, tolerance) => classifyPointRobust(bk, shape, point, tolerance),
|
|
@@ -14221,6 +14254,7 @@ function makeGeometryOps(_module) {
|
|
|
14221
14254
|
approximateSurfaceLspia: (coords, rows, cols, degreeU, degreeV, numCpsU, numCpsV, tolerance, maxIterations) => occtOrThrow("approximateSurfaceLspia").approximateSurfaceLspia(coords, rows, cols, degreeU, degreeV, numCpsU, numCpsV, tolerance, maxIterations),
|
|
14222
14255
|
untrimFace: (face, samplesPerCurve, interiorSamples) => viaOcct(face, (s, occt) => occt.untrimFace(s, samplesPerCurve, interiorSamples)),
|
|
14223
14256
|
getSurfaceCylinderData: (surface) => viaOcct(surface, (s, occt) => occt.getSurfaceCylinderData(s)),
|
|
14257
|
+
getSurfaceAxis: (face) => viaOcct(face, (s, occt) => occt.getSurfaceAxis(s)),
|
|
14224
14258
|
reverseSurfaceU: (surface) => occtOrThrow("reverseSurfaceU").reverseSurfaceU(surface),
|
|
14225
14259
|
detectSmallFeatures: (shape, areaThreshold, tolerance) => viaOcct(shape, (s, occt) => occt.detectSmallFeatures(s, areaThreshold, tolerance)),
|
|
14226
14260
|
recognizeFeatures: (shape, tolerance) => viaOcct(shape, (s, occt) => occt.recognizeFeatures(s, tolerance)),
|
package/dist/sketching.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_textBlueprints = require("./textBlueprints-
|
|
3
|
-
const require_blueprintSketcher = require("./blueprintSketcher-
|
|
4
|
-
const require_drawFns = require("./drawFns-
|
|
2
|
+
const require_textBlueprints = require("./textBlueprints-COG8m1aE.cjs");
|
|
3
|
+
const require_blueprintSketcher = require("./blueprintSketcher-dZZ8e5ey.cjs");
|
|
4
|
+
const require_drawFns = require("./drawFns-eMU4H__w.cjs");
|
|
5
5
|
//#region src/sketching.ts
|
|
6
6
|
/**
|
|
7
7
|
* brepjs/sketching — Sketcher, Drawing, and sketch-to-shape operations.
|
package/dist/sketching.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as BaseSketcher2d, t as BlueprintSketcher } from "./blueprintSketcher-
|
|
2
|
-
import { A as sketchEllipse, C as DrawingPen, D as makeBaseBox, E as deserializeDrawing, F as sketchRectangle, I as sketchRoundedRectangle, L as FaceSketcher, M as sketchHelix, N as sketchParametricFunction, O as polysideInnerRadius, P as sketchPolysides, R as Sketcher, S as drawText, T as Drawing, _ as drawPolysides, a as drawingIntersect, b as drawSingleCircle, c as rotateDrawing, d as drawFaceOutline, f as drawProjection, g as drawPointsInterpolation, h as drawParametricFunction, i as drawingFuse, j as sketchFaceOffset, k as sketchCircle, l as scaleDrawing, m as drawEllipse, n as drawingCut, o as drawingToSketchOnPlane, p as drawCircle, r as drawingFillet, s as mirrorDrawing, t as drawingChamfer, u as translateDrawing, v as drawRectangle, w as draw, x as drawSingleEllipse, y as drawRoundedRectangle } from "./drawFns-
|
|
3
|
-
import { a as Sketch, c as compoundSketchLoft, d as sketchFace, f as sketchLoft, h as sketchWires, i as Sketches, l as compoundSketchRevolve, m as sketchSweep, o as compoundSketchExtrude, p as sketchRevolve, s as compoundSketchFace, u as sketchExtrude, v as CompoundSketch } from "./textBlueprints-
|
|
1
|
+
import { n as BaseSketcher2d, t as BlueprintSketcher } from "./blueprintSketcher-BRKbVgE2.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-ZqWpAG8b.js";
|
|
3
|
+
import { a as Sketch, c as compoundSketchLoft, d as sketchFace, f as sketchLoft, h as sketchWires, i as Sketches, l as compoundSketchRevolve, m as sketchSweep, o as compoundSketchExtrude, p as sketchRevolve, s as compoundSketchFace, u as sketchExtrude, v as CompoundSketch } from "./textBlueprints-HfRD4iNF.js";
|
|
4
4
|
//#region src/sketching.ts
|
|
5
5
|
/**
|
|
6
6
|
* brepjs/sketching — Sketcher, Drawing, and sketch-to-shape operations.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Z as getKernel, _ as isSolid, c as createSolid, g as isShell, h as isShape3D, i as createCompound, l as createVertex } from "./shapeTypes-
|
|
1
|
+
import { Z as getKernel, _ as isSolid, c as createSolid, g as isShell, h as isShape3D, i as createCompound, l as createVertex } from "./shapeTypes-2cKwu2z4.js";
|
|
2
2
|
import { A as ok, R as unwrap, b as err, l as typeCastError, v as andThen } from "./errors-DNWJsfVU.js";
|
|
3
|
-
import { _ as
|
|
3
|
+
import { _ as cast, v as downcast } from "./faceFns-BBcrvY7r.js";
|
|
4
4
|
//#region src/topology/shapeUtils.ts
|
|
5
5
|
/**
|
|
6
6
|
* Shape assembly utilities — welding and sewing operations.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-DRxArFIc.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
|
-
const require_faceFns = require("./faceFns-
|
|
3
|
+
const require_faceFns = require("./faceFns-CcLFCtg4.cjs");
|
|
4
4
|
//#region src/topology/shapeUtils.ts
|
|
5
5
|
/**
|
|
6
6
|
* Shape assembly utilities — welding and sewing operations.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Z as getKernel, a as createEdge, o as createFace, p as isFace, u as createWire, w as isPlanarFace } from "./shapeTypes-
|
|
1
|
+
import { Z as getKernel, a as createEdge, o as createFace, p as isFace, u as createWire, w as isPlanarFace } from "./shapeTypes-2cKwu2z4.js";
|
|
2
2
|
import { A as ok, b as err, d as validationError, i as kernelError, v as andThen } from "./errors-DNWJsfVU.js";
|
|
3
|
-
import {
|
|
3
|
+
import { _ as cast, u as outerWire } from "./faceFns-BBcrvY7r.js";
|
|
4
4
|
//#region src/utils/range.ts
|
|
5
5
|
/** Generate an array of integers `[0, 1, …, len - 1]`. */
|
|
6
6
|
function range(len) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-DRxArFIc.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
|
-
const require_faceFns = require("./faceFns-
|
|
3
|
+
const require_faceFns = require("./faceFns-CcLFCtg4.cjs");
|
|
4
4
|
//#region src/utils/range.ts
|
|
5
5
|
/** Generate an array of integers `[0, 1, …, len - 1]`. */
|
|
6
6
|
function range(len) {
|
package/dist/text.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_textBlueprints = require("./textBlueprints-
|
|
3
|
-
const require_textMetrics = require("./textMetrics-
|
|
2
|
+
const require_textBlueprints = require("./textBlueprints-COG8m1aE.cjs");
|
|
3
|
+
const require_textMetrics = require("./textMetrics-CTSpUXtk.cjs");
|
|
4
4
|
exports.fontMetrics = require_textMetrics.fontMetrics;
|
|
5
5
|
exports.getFont = require_textBlueprints.getFont;
|
|
6
6
|
exports.loadFont = require_textBlueprints.loadFont;
|
package/dist/text.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as getFont, r as loadFont, t as textBlueprints } from "./textBlueprints-
|
|
2
|
-
import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-
|
|
1
|
+
import { n as getFont, r as loadFont, t as textBlueprints } from "./textBlueprints-HfRD4iNF.js";
|
|
2
|
+
import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-Zp8rzokO.js";
|
|
3
3
|
export { fontMetrics, getFont, loadFont, sketchText, textBlueprints, textMetrics };
|
|
@@ -29,18 +29,18 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
29
29
|
enumerable: true
|
|
30
30
|
}) : target, mod));
|
|
31
31
|
//#endregion
|
|
32
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
32
|
+
const require_shapeTypes = require("./shapeTypes-DRxArFIc.cjs");
|
|
33
33
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
34
34
|
const require_types = require("./types-KjA8tY4Y.cjs");
|
|
35
35
|
const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
|
|
36
36
|
const require_planeOps = require("./planeOps-BA4HfgQu.cjs");
|
|
37
|
-
const require_faceFns = require("./faceFns-
|
|
38
|
-
const require_curveFns = require("./curveFns-
|
|
37
|
+
const require_faceFns = require("./faceFns-CcLFCtg4.cjs");
|
|
38
|
+
const require_curveFns = require("./curveFns-uPVW6eo-.cjs");
|
|
39
39
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
40
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
41
|
-
const require_blueprintSketcher = require("./blueprintSketcher-
|
|
42
|
-
const require_solidBuilders = require("./solidBuilders-
|
|
43
|
-
const require_extrudeFns = require("./extrudeFns-
|
|
40
|
+
const require_surfaceBuilders = require("./surfaceBuilders-D2PBBoja.cjs");
|
|
41
|
+
const require_blueprintSketcher = require("./blueprintSketcher-dZZ8e5ey.cjs");
|
|
42
|
+
const require_solidBuilders = require("./solidBuilders-ibLq_9EK.cjs");
|
|
43
|
+
const require_extrudeFns = require("./extrudeFns-CzQans6p.cjs");
|
|
44
44
|
let opentype_js = require("opentype.js");
|
|
45
45
|
opentype_js = __toESM(opentype_js, 1);
|
|
46
46
|
//#region src/operations/loftFns.ts
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { Z as getKernel, h as isShape3D, o as createFace, p as isFace, t as castShape, u as createWire } from "./shapeTypes-
|
|
1
|
+
import { Z as getKernel, h as isShape3D, o as createFace, p as isFace, t as castShape, u as createWire } from "./shapeTypes-2cKwu2z4.js";
|
|
2
2
|
import { A as ok, R as unwrap, T as isOk, b as err, d as validationError, h as bug, i as kernelError, l as typeCastError, r as ioError, t as BrepErrorCode } from "./errors-DNWJsfVU.js";
|
|
3
3
|
import { r as toVec3 } from "./types-D24Y27N0.js";
|
|
4
4
|
import { d as vecNormalize, h as vecScale, r as vecCross } from "./vecOps-SKPRvPH-.js";
|
|
5
5
|
import { n as createPlane } from "./planeOps-DSjjtrjg.js";
|
|
6
|
-
import { _ as
|
|
7
|
-
import { c as curveStartPoint, l as curveTangentAt } from "./curveFns-
|
|
6
|
+
import { _ as cast, v as downcast } from "./faceFns-BBcrvY7r.js";
|
|
7
|
+
import { c as curveStartPoint, l as curveTangentAt } from "./curveFns-CXhOkKR4.js";
|
|
8
8
|
import { n as getAtOrThrow, t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
9
|
-
import { i as makeNewFaceWithinFace, r as makeFace, t as addHolesInFace } from "./surfaceBuilders-
|
|
10
|
-
import { r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-
|
|
11
|
-
import { o as makeSolid, t as makeCompound } from "./solidBuilders-
|
|
12
|
-
import { c as sweep, i as complexExtrude, l as twistExtrude, r as revolve, t as extrude } from "./extrudeFns-
|
|
9
|
+
import { i as makeNewFaceWithinFace, r as makeFace, t as addHolesInFace } from "./surfaceBuilders-BtNrSolT.js";
|
|
10
|
+
import { r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-BRKbVgE2.js";
|
|
11
|
+
import { o as makeSolid, t as makeCompound } from "./solidBuilders-Bx3UdW91.js";
|
|
12
|
+
import { c as sweep, i as complexExtrude, l as twistExtrude, r as revolve, t as extrude } from "./extrudeFns-CSy2C7WW.js";
|
|
13
13
|
import opentype from "opentype.js";
|
|
14
14
|
//#region src/operations/loftFns.ts
|
|
15
15
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { A as ok, b as err, d as validationError, t as BrepErrorCode } from "./errors-DNWJsfVU.js";
|
|
2
|
-
import { g as wrapSketchData, i as Sketches, n as getFont, t as textBlueprints, v as CompoundSketch } from "./textBlueprints-
|
|
2
|
+
import { g as wrapSketchData, i as Sketches, n as getFont, t as textBlueprints, v as CompoundSketch } from "./textBlueprints-HfRD4iNF.js";
|
|
3
3
|
//#region src/text/sketchText.ts
|
|
4
4
|
/**
|
|
5
5
|
* Render text as 3D sketch outlines on a plane.
|
|
@@ -54,6 +54,15 @@ export declare function projectPointOnFace(face: Face, point: PointInput): Resul
|
|
|
54
54
|
export declare function normalAt(face: Face, locationPoint?: PointInput): Vec3;
|
|
55
55
|
/** Get the center of mass of a face. */
|
|
56
56
|
export declare function faceCenter(face: Face): Vec3;
|
|
57
|
+
/**
|
|
58
|
+
* Get a face's axis of symmetry — a point on the axis plus a unit direction —
|
|
59
|
+
* for analytic faces that have one (e.g. a cylinder's axis). Returns null when
|
|
60
|
+
* the face has no well-defined axis or the active kernel can't determine it.
|
|
61
|
+
*/
|
|
62
|
+
export declare function faceAxis(face: Face): {
|
|
63
|
+
origin: Vec3;
|
|
64
|
+
direction: Vec3;
|
|
65
|
+
} | null;
|
|
57
66
|
/**
|
|
58
67
|
* Classify a 3D point's position relative to a face boundary.
|
|
59
68
|
* Projects the point onto the face's surface and classifies the UV result.
|