brepjs 15.1.11 → 15.1.12
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 +5 -5
- package/dist/2d.js +5 -5
- package/dist/{blueprint-DD20bL3n.js → blueprint-CY11BkHM.js} +9 -8
- package/dist/{blueprint-BvUKWbkE.cjs → blueprint-DpfTrOOt.cjs} +13 -12
- package/dist/{blueprintFns-DgUIqFgy.js → blueprintFns-B6NYYOlY.js} +2 -2
- package/dist/{blueprintFns-CXdRmpJv.cjs → blueprintFns-oD720gYA.cjs} +2 -2
- package/dist/{boolean2D-Cpk3Ieie.cjs → boolean2D-BUqgODrH.cjs} +19 -18
- package/dist/{boolean2D-BtmgEhzg.js → boolean2D-zRsWUMD9.js} +12 -11
- package/dist/{booleanFns-8kJL7byz.cjs → booleanFns-B86ltlZD.cjs} +13 -13
- package/dist/{booleanFns-BmOsJHAY.js → booleanFns-CiiCf7YH.js} +10 -10
- package/dist/brepjs.cjs +28 -27
- package/dist/brepjs.js +25 -24
- package/dist/constants-BNP_xnBN.cjs +26 -0
- package/dist/constants-csSEYddm.js +9 -0
- package/dist/core.cjs +8 -7
- package/dist/core.js +5 -4
- package/dist/{cornerFinder-BybcZVxL.cjs → cornerFinder-DNmYCgaQ.cjs} +4 -4
- package/dist/{cornerFinder-C7k0yipe.js → cornerFinder-lO-ySgHJ.js} +3 -3
- package/dist/{curveFns-BErRtKDj.cjs → curveFns-B_pwrAMv.cjs} +1 -1
- package/dist/{curveFns-DbIakl9J.js → curveFns-Dv0wz8Zm.js} +1 -1
- package/dist/{drawFns-PktTJbzy.cjs → drawFns-D98GdpRM.cjs} +16 -15
- package/dist/{drawFns-Rn-dEfBR.js → drawFns-L7NpQwWq.js} +15 -14
- package/dist/{extrudeFns-7_WDVoEg.cjs → extrudeFns-B9muBNIT.cjs} +2 -2
- package/dist/{extrudeFns-pjrR5ECA.js → extrudeFns-lgSsOjwq.js} +2 -2
- package/dist/{faceFns-wSgaAQrJ.js → faceFns-CauBoVg1.js} +5 -35
- package/dist/{faceFns-B8y0xqpK.cjs → faceFns-DnIpKBex.cjs} +4 -40
- package/dist/{helpers-DsVYL2Ri.js → helpers-B_-mIteL.js} +7 -7
- package/dist/{helpers-CpCe09zS.cjs → helpers-kil7evW4.cjs} +9 -9
- package/dist/{historyFns-DbUJQAXI.cjs → historyFns-D7UojEn3.cjs} +5 -5
- package/dist/{historyFns-B3d7YiP9.js → historyFns-DYrliEQE.js} +5 -5
- package/dist/{importFns-C0Edyiov.js → importFns-CPzDHVKm.js} +3 -3
- package/dist/{importFns-B-5chCzB.cjs → importFns-Y4wgn0rJ.cjs} +3 -3
- package/dist/io.cjs +2 -2
- package/dist/io.js +2 -2
- package/dist/kernel/geometry2d.d.ts.map +1 -1
- package/dist/kernel/occt/defaultAdapter.d.ts.map +1 -1
- package/dist/kernel/occt/kernel2dOps.d.ts +68 -61
- package/dist/kernel/occt/kernel2dOps.d.ts.map +1 -1
- package/dist/{measureFns-gRr84qGk.js → measureFns-Bey2EmNQ.js} +2 -2
- package/dist/{measureFns-vgnbVhDc.cjs → measureFns-Bt0Rd9q9.cjs} +2 -2
- package/dist/measurement.cjs +1 -1
- package/dist/measurement.js +1 -1
- package/dist/{meshFns-rMEka_pV.cjs → meshFns-Cxs6gU44.cjs} +2 -2
- package/dist/{meshFns-CA6fJ-Z0.js → meshFns-DO58R94T.js} +2 -2
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/{planeOps-DoTESDTM.cjs → planeOps-CuI-sDtn.cjs} +4 -3
- package/dist/{planeOps-C94s53Ia.js → planeOps-Da2ylKGq.js} +3 -2
- package/dist/{primitiveFns-B1R8RWjt.cjs → primitiveFns-CWiHuJw9.cjs} +34 -34
- package/dist/{primitiveFns-DtfUR91z.js → primitiveFns-Rpdnd3FK.js} +21 -21
- package/dist/query.cjs +2 -2
- package/dist/query.js +2 -2
- package/dist/{shapeFns-ClKIHb3P.js → shapeFns-4ySHDRyO.js} +14 -14
- package/dist/{shapeFns-BtGq6ZqD.cjs → shapeFns-CBRy0V_S.cjs} +20 -20
- package/dist/shapeRef.cjs +1 -1
- package/dist/shapeRef.js +1 -1
- package/dist/{shapeRefFns-DjWRttT2.js → shapeRefFns-D21Yl4Eu.js} +3 -3
- package/dist/{shapeRefFns-MA4_U4Fn.cjs → shapeRefFns-oAyQxHO1.cjs} +3 -3
- package/dist/{shapeTypes-Qh4ErtGx.js → shapeTypes-BLV4Ktdb.js} +604 -788
- package/dist/{shapeTypes-Cs7uihz8.cjs → shapeTypes-CaSWO-Hg.cjs} +604 -793
- package/dist/sketching.cjs +2 -2
- package/dist/sketching.js +2 -2
- package/dist/{solidBuilders-BMv6UQUY.cjs → solidBuilders-BZFaM6nk.cjs} +2 -2
- package/dist/{solidBuilders-CHvrwtLL.js → solidBuilders-BexZFemn.js} +2 -2
- package/dist/{surfaceBuilders-CL8MJABt.js → surfaceBuilders-AnSYsNAb.js} +2 -2
- package/dist/{surfaceBuilders-Bgc5TlIe.cjs → surfaceBuilders-Bixz70pj.cjs} +2 -2
- package/dist/topology/booleanFns.d.ts.map +1 -1
- package/dist/topology/evolutionFns.d.ts.map +1 -1
- package/dist/topology/modifierFns.d.ts.map +1 -1
- package/dist/topology/shapeFns.d.ts.map +1 -1
- package/dist/topology/topologyQueryFns.d.ts +1 -1
- package/dist/topology/topologyQueryFns.d.ts.map +1 -1
- package/dist/topology.cjs +6 -6
- package/dist/topology.js +6 -6
- package/dist/{types-SLY3VwcI.js → types--GD-LVc6.js} +1 -9
- package/dist/{types-hXSlplF3.cjs → types-gLi9wL0N.cjs} +0 -26
- package/dist/vectors.cjs +6 -5
- package/dist/vectors.js +4 -3
- package/dist/worker.cjs +1 -1
- package/dist/worker.js +1 -1
- package/package.json +1 -1
- package/dist/core/shapePropertyCache.d.ts +0 -17
- package/dist/core/shapePropertyCache.d.ts.map +0 -1
- /package/dist/{arrayAccess-CmulMesb.cjs → arrayAccess-DsnQpdSD.cjs} +0 -0
- /package/dist/{arrayAccess-xxcB3YNq.js → arrayAccess-tCIbjLs5.js} +0 -0
- /package/dist/{vecOps-BXvBYIor.cjs → vecOps-5bNB19nE.cjs} +0 -0
- /package/dist/{vecOps-D9etjPgV.js → vecOps-DBmIPNhk.js} +0 -0
- /package/dist/{workerHandler-C-7OUJsa.cjs → workerHandler-C-3cFcsQ.cjs} +0 -0
- /package/dist/{workerHandler-o2xzAfFk.js → workerHandler-Dm0_0F8Z.js} +0 -0
package/dist/2d.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
+
const require_shapeTypes = require("./shapeTypes-CaSWO-Hg.cjs");
|
|
3
3
|
const require_errors = require("./errors-CXRNVCec.cjs");
|
|
4
|
-
const require_faceFns = require("./faceFns-
|
|
5
|
-
const require_boolean2D = require("./boolean2D-
|
|
6
|
-
const require_blueprint = require("./blueprint-
|
|
7
|
-
const require_blueprintFns = require("./blueprintFns-
|
|
4
|
+
const require_faceFns = require("./faceFns-DnIpKBex.cjs");
|
|
5
|
+
const require_boolean2D = require("./boolean2D-BUqgODrH.cjs");
|
|
6
|
+
const require_blueprint = require("./blueprint-DpfTrOOt.cjs");
|
|
7
|
+
const require_blueprintFns = require("./blueprintFns-oD720gYA.cjs");
|
|
8
8
|
//#region src/core/curve2dHandle.ts
|
|
9
9
|
/**
|
|
10
10
|
* Wrap a raw kernel 2D curve handle with brand + disposal tracking.
|
package/dist/2d.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { B as createKernelHandle, Z as getKernel2D, a as createEdge } from "./shapeTypes-
|
|
1
|
+
import { B as createKernelHandle, Z as getKernel2D, a as createEdge } from "./shapeTypes-BLV4Ktdb.js";
|
|
2
2
|
import { A as ok, b as err, d as validationError, t as BrepErrorCode } from "./errors-DboJwVCf.js";
|
|
3
|
-
import {
|
|
4
|
-
import { _ as Blueprints, a as fuseBlueprints, c as roundedRectangleBlueprint, g as CompoundBlueprint, h as organiseBlueprints, i as cutBlueprints, n as fuse2D, o as intersectBlueprints, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-
|
|
5
|
-
import { _ as Curve2D, t as Blueprint, y as BoundingBox2d } from "./blueprint-
|
|
6
|
-
import { S as reverseCurve, _ as curve2dIsOnCurve, a as isInside2D, b as curve2dSplitAt, c as scale2D, d as stretch2D, f as toSVGPathD, g as curve2dFirstPoint, h as curve2dDistanceFrom, i as getOrientation2D, l as sketchOnFace2D, m as curve2dBoundingBox, o as mirror2D, p as translate2D, r as getBounds2D, s as rotate2D, t as createBlueprint, u as sketchOnPlane2D, v as curve2dLastPoint, x as curve2dTangentAt, y as curve2dParameter } from "./blueprintFns-
|
|
3
|
+
import { z as kernelCallRaw } from "./faceFns-CauBoVg1.js";
|
|
4
|
+
import { _ as Blueprints, a as fuseBlueprints, c as roundedRectangleBlueprint, g as CompoundBlueprint, h as organiseBlueprints, i as cutBlueprints, n as fuse2D, o as intersectBlueprints, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-zRsWUMD9.js";
|
|
5
|
+
import { _ as Curve2D, t as Blueprint, y as BoundingBox2d } from "./blueprint-CY11BkHM.js";
|
|
6
|
+
import { S as reverseCurve, _ as curve2dIsOnCurve, a as isInside2D, b as curve2dSplitAt, c as scale2D, d as stretch2D, f as toSVGPathD, g as curve2dFirstPoint, h as curve2dDistanceFrom, i as getOrientation2D, l as sketchOnFace2D, m as curve2dBoundingBox, o as mirror2D, p as translate2D, r as getBounds2D, s as rotate2D, t as createBlueprint, u as sketchOnPlane2D, v as curve2dLastPoint, x as curve2dTangentAt, y as curve2dParameter } from "./blueprintFns-B6NYYOlY.js";
|
|
7
7
|
//#region src/core/curve2dHandle.ts
|
|
8
8
|
/**
|
|
9
9
|
* Wrap a raw kernel 2D curve handle with brand + disposal tracking.
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { G as unregisterFromCleanup, U as registerForCleanup, X as getKernel, Z as getKernel2D, a as createEdge, u as createWire } from "./shapeTypes-
|
|
1
|
+
import { G as unregisterFromCleanup, U as registerForCleanup, X as getKernel, Z as getKernel2D, a as createEdge, u as createWire } from "./shapeTypes-BLV4Ktdb.js";
|
|
2
2
|
import { A as ok, R as unwrap, b as err, d as validationError, h as bug, n as computationError } from "./errors-DboJwVCf.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { r as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { r as
|
|
9
|
-
import {
|
|
3
|
+
import { M as cast, m as uvCoordinates, n as faceCenter, p as uvBounds, r as faceGeomType } from "./faceFns-CauBoVg1.js";
|
|
4
|
+
import { r as RAD2DEG, t as DEG2RAD } from "./constants-csSEYddm.js";
|
|
5
|
+
import { r as toVec3 } from "./types--GD-LVc6.js";
|
|
6
|
+
import { r as makePlane } from "./planeOps-Da2ylKGq.js";
|
|
7
|
+
import { f as getOrientation } from "./curveFns-Dv0wz8Zm.js";
|
|
8
|
+
import { n as getAtOrThrow, r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-tCIbjLs5.js";
|
|
9
|
+
import { r as makeFace } from "./surfaceBuilders-AnSYsNAb.js";
|
|
10
|
+
import { _ as samePoint, b as subtract2d, l as add2d, o as normalize2d, p as distance2d, t as getSingleFace, v as scalarMultiply2d } from "./helpers-B_-mIteL.js";
|
|
10
11
|
//#region src/2d/lib/definitions.ts
|
|
11
12
|
/** Type guard that checks whether a value is a `Point2D`. */
|
|
12
13
|
function isPoint2D(point) {
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-CaSWO-Hg.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXRNVCec.cjs");
|
|
3
|
-
const require_faceFns = require("./faceFns-
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
3
|
+
const require_faceFns = require("./faceFns-DnIpKBex.cjs");
|
|
4
|
+
const require_constants = require("./constants-BNP_xnBN.cjs");
|
|
5
|
+
const require_types = require("./types-gLi9wL0N.cjs");
|
|
6
|
+
const require_planeOps = require("./planeOps-CuI-sDtn.cjs");
|
|
7
|
+
const require_curveFns = require("./curveFns-B_pwrAMv.cjs");
|
|
8
|
+
const require_arrayAccess = require("./arrayAccess-DsnQpdSD.cjs");
|
|
9
|
+
const require_surfaceBuilders = require("./surfaceBuilders-Bixz70pj.cjs");
|
|
10
|
+
const require_helpers = require("./helpers-kil7evW4.cjs");
|
|
10
11
|
//#region src/2d/lib/definitions.ts
|
|
11
12
|
/** Type guard that checks whether a value is a `Point2D`. */
|
|
12
13
|
function isPoint2D(point) {
|
|
@@ -536,7 +537,7 @@ var adaptedCurveToPathElem = (curve, lastPoint) => {
|
|
|
536
537
|
if (!circleData) require_errors.bug("adaptedCurveToPathElem", "Expected circle data");
|
|
537
538
|
const { radius, isDirect } = circleData;
|
|
538
539
|
const bounds = k2d.getCurve2dBounds(curve.wrapped);
|
|
539
|
-
const paramAngle = (bounds.last - bounds.first) *
|
|
540
|
+
const paramAngle = (bounds.last - bounds.first) * require_constants.RAD2DEG;
|
|
540
541
|
const end = paramAngle !== 360 ? endpoint : `${round5(endX)} ${round5(endY + 1e-4)}`;
|
|
541
542
|
return `A ${radius} ${radius} 0 ${Math.abs(paramAngle) > 180 ? "1" : "0"} ${isDirect ? "1" : "0"} ${end}`;
|
|
542
543
|
}
|
|
@@ -545,9 +546,9 @@ var adaptedCurveToPathElem = (curve, lastPoint) => {
|
|
|
545
546
|
if (!ellipseData) require_errors.bug("adaptedCurveToPathElem", "Expected ellipse data");
|
|
546
547
|
const { majorRadius: rx, minorRadius: ry, xAxisAngle, isDirect } = ellipseData;
|
|
547
548
|
const bounds = k2d.getCurve2dBounds(curve.wrapped);
|
|
548
|
-
const paramAngle = (bounds.last - bounds.first) *
|
|
549
|
+
const paramAngle = (bounds.last - bounds.first) * require_constants.RAD2DEG;
|
|
549
550
|
const end = paramAngle !== 360 ? endpoint : `${round5(endX)} ${round5(endY + 1e-4)}`;
|
|
550
|
-
const angle = 180 - xAxisAngle *
|
|
551
|
+
const angle = 180 - xAxisAngle * require_constants.RAD2DEG;
|
|
551
552
|
return `A ${round5(rx)} ${round5(ry)} ${round5(angle)} ${Math.abs(paramAngle) > 180 ? "1" : "0"} ${isDirect ? "1" : "0"} ${end}`;
|
|
552
553
|
}
|
|
553
554
|
require_errors.bug("adaptedCurveToPathElem", `Unsupported curve type: ${curveType}`);
|
|
@@ -816,7 +817,7 @@ var Blueprint = class Blueprint {
|
|
|
816
817
|
* @returns A new rotated Blueprint.
|
|
817
818
|
*/
|
|
818
819
|
rotate(angle, center) {
|
|
819
|
-
return new Blueprint(transformCurves(this.curves, rotateTransform2d(angle *
|
|
820
|
+
return new Blueprint(transformCurves(this.curves, rotateTransform2d(angle * require_constants.DEG2RAD, center)));
|
|
820
821
|
}
|
|
821
822
|
translate(xDistOrPoint, yDist = 0) {
|
|
822
823
|
const translationVector = isPoint2D(xDistOrPoint) ? xDistOrPoint : [xDistOrPoint, yDist];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { A as ok, b as err, d as validationError, t as BrepErrorCode } from "./errors-DboJwVCf.js";
|
|
2
|
-
import { g as CompoundBlueprint } from "./boolean2D-
|
|
3
|
-
import { t as Blueprint } from "./blueprint-
|
|
2
|
+
import { g as CompoundBlueprint } from "./boolean2D-zRsWUMD9.js";
|
|
3
|
+
import { t as Blueprint } from "./blueprint-CY11BkHM.js";
|
|
4
4
|
//#region src/2d/lib/curve2dFns.ts
|
|
5
5
|
/**
|
|
6
6
|
* Return a reversed copy of the curve (non-mutating).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_errors = require("./errors-CXRNVCec.cjs");
|
|
2
|
-
const require_boolean2D = require("./boolean2D-
|
|
3
|
-
const require_blueprint = require("./blueprint-
|
|
2
|
+
const require_boolean2D = require("./boolean2D-BUqgODrH.cjs");
|
|
3
|
+
const require_blueprint = require("./blueprint-DpfTrOOt.cjs");
|
|
4
4
|
//#region src/2d/lib/curve2dFns.ts
|
|
5
5
|
/**
|
|
6
6
|
* Return a reversed copy of the curve (non-mutating).
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-CaSWO-Hg.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXRNVCec.cjs");
|
|
3
|
-
const require_faceFns = require("./faceFns-
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
3
|
+
const require_faceFns = require("./faceFns-DnIpKBex.cjs");
|
|
4
|
+
const require_constants = require("./constants-BNP_xnBN.cjs");
|
|
5
|
+
const require_types = require("./types-gLi9wL0N.cjs");
|
|
6
|
+
const require_vecOps = require("./vecOps-5bNB19nE.cjs");
|
|
7
|
+
const require_planeOps = require("./planeOps-CuI-sDtn.cjs");
|
|
8
|
+
const require_curveFns = require("./curveFns-B_pwrAMv.cjs");
|
|
9
|
+
const require_arrayAccess = require("./arrayAccess-DsnQpdSD.cjs");
|
|
10
|
+
const require_surfaceBuilders = require("./surfaceBuilders-Bixz70pj.cjs");
|
|
11
|
+
const require_helpers = require("./helpers-kil7evW4.cjs");
|
|
12
|
+
const require_blueprint = require("./blueprint-DpfTrOOt.cjs");
|
|
13
|
+
const require_extrudeFns = require("./extrudeFns-B9muBNIT.cjs");
|
|
13
14
|
//#region node_modules/flatqueue/index.js
|
|
14
15
|
/** @template T */
|
|
15
16
|
var FlatQueue = class {
|
|
@@ -1265,10 +1266,10 @@ var defaultsSplineOptions = (config) => {
|
|
|
1265
1266
|
};
|
|
1266
1267
|
const { endTangent: endTgt, startFactor = 1, endFactor = 1, startTangent: startTgt } = conf;
|
|
1267
1268
|
let endTangent;
|
|
1268
|
-
if (typeof endTgt === "number") endTangent = require_helpers.polarToCartesian(1, endTgt *
|
|
1269
|
+
if (typeof endTgt === "number") endTangent = require_helpers.polarToCartesian(1, endTgt * require_constants.DEG2RAD);
|
|
1269
1270
|
else endTangent = endTgt;
|
|
1270
1271
|
let startTangent;
|
|
1271
|
-
if (typeof startTgt === "number") startTangent = require_helpers.polarToCartesian(1, startTgt *
|
|
1272
|
+
if (typeof startTgt === "number") startTangent = require_helpers.polarToCartesian(1, startTgt * require_constants.DEG2RAD);
|
|
1272
1273
|
else startTangent = startTgt;
|
|
1273
1274
|
return {
|
|
1274
1275
|
endTangent,
|
|
@@ -1387,7 +1388,7 @@ function normalizeEllipseRadii(horizontalRadius, verticalRadius, rotation) {
|
|
|
1387
1388
|
* @param convertToUV - Coordinate conversion function from user space to UV space.
|
|
1388
1389
|
*/
|
|
1389
1390
|
function makeEllipseArcFromSvgParams(startUV, endUV, majorRadius, minorRadius, rotationAngleDeg, longAxis, sweep, convertToUV) {
|
|
1390
|
-
const radRotationAngle = rotationAngleDeg *
|
|
1391
|
+
const radRotationAngle = rotationAngleDeg * require_constants.DEG2RAD;
|
|
1391
1392
|
const convertAxis = (ax) => require_helpers.distance2d(convertToUV(ax));
|
|
1392
1393
|
const r1 = convertAxis(require_helpers.polarToCartesian(majorRadius, radRotationAngle));
|
|
1393
1394
|
const r2 = convertAxis(require_helpers.polarToCartesian(minorRadius, radRotationAngle + Math.PI / 2));
|
|
@@ -1479,7 +1480,7 @@ var BaseSketcher2d = class {
|
|
|
1479
1480
|
const lastCurve = this._lastCurve();
|
|
1480
1481
|
if (!lastCurve) return 0;
|
|
1481
1482
|
const [dx, dy] = lastCurve.tangentAt(1);
|
|
1482
|
-
return Math.atan2(dy, dx) *
|
|
1483
|
+
return Math.atan2(dy, dx) * require_constants.RAD2DEG;
|
|
1483
1484
|
}
|
|
1484
1485
|
/** Move the pen to an absolute 2D position before drawing any curves. */
|
|
1485
1486
|
movePointerTo(point) {
|
|
@@ -1525,11 +1526,11 @@ var BaseSketcher2d = class {
|
|
|
1525
1526
|
}
|
|
1526
1527
|
/** Draw a line to a point given in polar coordinates [r, theta] from the origin. */
|
|
1527
1528
|
polarLineTo([r, theta]) {
|
|
1528
|
-
return this.lineTo(require_helpers.polarToCartesian(r, theta *
|
|
1529
|
+
return this.lineTo(require_helpers.polarToCartesian(r, theta * require_constants.DEG2RAD));
|
|
1529
1530
|
}
|
|
1530
1531
|
/** Draw a line in polar coordinates (distance and angle in degrees) from the current point. */
|
|
1531
1532
|
polarLine(distance, angle) {
|
|
1532
|
-
const [x, y] = require_helpers.polarToCartesian(distance, angle *
|
|
1533
|
+
const [x, y] = require_helpers.polarToCartesian(distance, angle * require_constants.DEG2RAD);
|
|
1533
1534
|
return this.line(x, y);
|
|
1534
1535
|
}
|
|
1535
1536
|
/** Draw a line tangent to the previous curve, extending by the given distance. */
|
|
@@ -1616,7 +1617,7 @@ var BaseSketcher2d = class {
|
|
|
1616
1617
|
halfEllipseTo(end, minorRadius, sweep = false) {
|
|
1617
1618
|
const angle = require_helpers.polarAngle2d(end, this.pointer);
|
|
1618
1619
|
const dist = require_helpers.distance2d(end, this.pointer);
|
|
1619
|
-
return this.ellipseTo(end, dist / 2, minorRadius, angle *
|
|
1620
|
+
return this.ellipseTo(end, dist / 2, minorRadius, angle * require_constants.RAD2DEG, true, sweep);
|
|
1620
1621
|
}
|
|
1621
1622
|
/** Draw a half-ellipse arc to a relative end point with a given minor radius. */
|
|
1622
1623
|
halfEllipse(xDist, yDist, minorRadius, sweep = false) {
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { R as DisposalScope, X as getKernel, Y as _usingCtx, Z as getKernel2D, a as createEdge, h as isShape3D, o as createFace, t as castShape, u as createWire } from "./shapeTypes-
|
|
1
|
+
import { R as DisposalScope, X as getKernel, Y as _usingCtx, Z as getKernel2D, a as createEdge, h as isShape3D, o as createFace, t as castShape, u as createWire } from "./shapeTypes-BLV4Ktdb.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, n as computationError, s as safeIndex } from "./errors-DboJwVCf.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { _ as
|
|
11
|
-
import { _ as
|
|
12
|
-
import { c as
|
|
3
|
+
import { N as downcast, c as normalAt, p as uvBounds, u as pointOnSurface } from "./faceFns-CauBoVg1.js";
|
|
4
|
+
import { r as RAD2DEG, t as DEG2RAD } from "./constants-csSEYddm.js";
|
|
5
|
+
import { r as toVec3 } from "./types--GD-LVc6.js";
|
|
6
|
+
import { d as vecNormalize, h as vecScale, r as vecCross } from "./vecOps-DBmIPNhk.js";
|
|
7
|
+
import { n as createPlane } from "./planeOps-Da2ylKGq.js";
|
|
8
|
+
import { c as curveStartPoint, l as curveTangentAt, r as curveIsClosed } from "./curveFns-Dv0wz8Zm.js";
|
|
9
|
+
import { r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-tCIbjLs5.js";
|
|
10
|
+
import { _ as zip, i as makeNewFaceWithinFace, r as makeFace, s as assembleWire } from "./surfaceBuilders-AnSYsNAb.js";
|
|
11
|
+
import { _ as samePoint$1, b as subtract2d, d as cartesianToPolar, f as crossProduct2d, g as rotate2d, h as polarToCartesian, l as add2d, m as polarAngle2d, o as normalize2d, p as distance2d, s as PRECISION_INTERSECTION, v as scalarMultiply2d } from "./helpers-B_-mIteL.js";
|
|
12
|
+
import { _ as Curve2D, b as removeDuplicatePoints, c as make2dCircle, f as make2dSegmentCurve, h as approximateAsBSpline, m as make2dThreePointArc, n as asSVG, o as make2dArcFromCenter, p as make2dTangentArc, r as viewbox, s as make2dBezierCurve, t as Blueprint, u as make2dEllipseArc, x as isPoint2D, y as BoundingBox2d } from "./blueprint-CY11BkHM.js";
|
|
13
|
+
import { c as sweep, i as complexExtrude, l as twistExtrude, r as revolve, t as extrude } from "./extrudeFns-lgSsOjwq.js";
|
|
13
14
|
//#region node_modules/flatqueue/index.js
|
|
14
15
|
/** @template T */
|
|
15
16
|
var FlatQueue = class {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-CaSWO-Hg.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXRNVCec.cjs");
|
|
3
|
-
const require_faceFns = require("./faceFns-
|
|
4
|
-
const
|
|
5
|
-
const require_vecOps = require("./vecOps-
|
|
6
|
-
const require_planeOps = require("./planeOps-
|
|
7
|
-
const require_shapeFns = require("./shapeFns-
|
|
8
|
-
const require_arrayAccess = require("./arrayAccess-
|
|
9
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
3
|
+
const require_faceFns = require("./faceFns-DnIpKBex.cjs");
|
|
4
|
+
const require_constants = require("./constants-BNP_xnBN.cjs");
|
|
5
|
+
const require_vecOps = require("./vecOps-5bNB19nE.cjs");
|
|
6
|
+
const require_planeOps = require("./planeOps-CuI-sDtn.cjs");
|
|
7
|
+
const require_shapeFns = require("./shapeFns-CBRy0V_S.cjs");
|
|
8
|
+
const require_arrayAccess = require("./arrayAccess-DsnQpdSD.cjs");
|
|
9
|
+
const require_surfaceBuilders = require("./surfaceBuilders-Bixz70pj.cjs");
|
|
10
10
|
//#region src/topology/booleanFns.ts
|
|
11
11
|
/**
|
|
12
12
|
* Boolean and compound operations — functional replacements for _3DShape boolean methods.
|
|
@@ -48,7 +48,7 @@ function fuse(a, b, { optimisation = "none", simplify = false, signal, fuzzyValu
|
|
|
48
48
|
fuzzyValue
|
|
49
49
|
}), "FUSE_NOT_3D", "Fuse did not produce a 3D shape");
|
|
50
50
|
const inputFaceHashes = require_shapeFns.collectInputFaceHashes([a, b]);
|
|
51
|
-
const { shape: resultShape, evolution, diagnostics } = require_shapeTypes.getKernel().fuseWithHistory(a.wrapped, b.wrapped, inputFaceHashes,
|
|
51
|
+
const { shape: resultShape, evolution, diagnostics } = require_shapeTypes.getKernel().fuseWithHistory(a.wrapped, b.wrapped, inputFaceHashes, require_constants.HASH_CODE_MAX, {
|
|
52
52
|
optimisation,
|
|
53
53
|
simplify,
|
|
54
54
|
fuzzyValue
|
|
@@ -81,7 +81,7 @@ function cut(base, tool, { optimisation = "none", simplify = false, signal, fuzz
|
|
|
81
81
|
fuzzyValue
|
|
82
82
|
}), "CUT_NOT_3D", "Cut did not produce a 3D shape");
|
|
83
83
|
const inputFaceHashes = require_shapeFns.collectInputFaceHashes([base, tool]);
|
|
84
|
-
const { shape: resultShape, evolution, diagnostics } = require_shapeTypes.getKernel().cutWithHistory(base.wrapped, tool.wrapped, inputFaceHashes,
|
|
84
|
+
const { shape: resultShape, evolution, diagnostics } = require_shapeTypes.getKernel().cutWithHistory(base.wrapped, tool.wrapped, inputFaceHashes, require_constants.HASH_CODE_MAX, {
|
|
85
85
|
optimisation,
|
|
86
86
|
simplify,
|
|
87
87
|
fuzzyValue
|
|
@@ -113,7 +113,7 @@ function intersect(a, b, { simplify = false, signal, fuzzyValue, unsafe: _unsafe
|
|
|
113
113
|
fuzzyValue
|
|
114
114
|
}), "INTERSECT_NOT_3D", "Intersect did not produce a 3D shape");
|
|
115
115
|
const inputFaceHashes = require_shapeFns.collectInputFaceHashes([a, b]);
|
|
116
|
-
const { shape: resultShape, evolution, diagnostics } = require_shapeTypes.getKernel().intersectWithHistory(a.wrapped, b.wrapped, inputFaceHashes,
|
|
116
|
+
const { shape: resultShape, evolution, diagnostics } = require_shapeTypes.getKernel().intersectWithHistory(a.wrapped, b.wrapped, inputFaceHashes, require_constants.HASH_CODE_MAX, {
|
|
117
117
|
simplify,
|
|
118
118
|
fuzzyValue
|
|
119
119
|
});
|
|
@@ -263,8 +263,8 @@ function buildEdgeAdjacency(edges) {
|
|
|
263
263
|
const edgeVertexHashes = /* @__PURE__ */ new Map();
|
|
264
264
|
for (const edge of edges) {
|
|
265
265
|
const verts = require_faceFns.getVertices(edge);
|
|
266
|
-
const h0 = verts[0] ?
|
|
267
|
-
const h1 = verts.length > 1 && verts[1] ?
|
|
266
|
+
const h0 = verts[0] ? kernel.hashCode(verts[0].wrapped, require_constants.HASH_CODE_MAX) : -1;
|
|
267
|
+
const h1 = verts.length > 1 && verts[1] ? kernel.hashCode(verts[1].wrapped, require_constants.HASH_CODE_MAX) : h0;
|
|
268
268
|
edgeVertexHashes.set(edge, [h0, h1]);
|
|
269
269
|
for (const h of [h0, h1]) {
|
|
270
270
|
const bucket = vertexToEdges.get(h) ?? [];
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { X as getKernel, h as isShape3D, t as castShape } from "./shapeTypes-
|
|
1
|
+
import { X as getKernel, h as isShape3D, t as castShape } from "./shapeTypes-BLV4Ktdb.js";
|
|
2
2
|
import { A as ok, R as unwrap, b as err, d as validationError, i as kernelError, l as typeCastError, t as BrepErrorCode, w as isErr } from "./errors-DboJwVCf.js";
|
|
3
|
-
import { C as getVertices, b as getEdges,
|
|
4
|
-
import {
|
|
5
|
-
import { h as vecScale, t as vecAdd } from "./vecOps-
|
|
6
|
-
import { o as resolvePlane } from "./planeOps-
|
|
7
|
-
import { _ as propagateAllMetadata, g as collectInputFaceHashes, v as propagateMetadataByHash } from "./shapeFns-
|
|
8
|
-
import { n as getAtOrThrow, t as firstOrThrow } from "./arrayAccess-
|
|
9
|
-
import { r as makeFace } from "./surfaceBuilders-
|
|
3
|
+
import { C as getVertices, b as getEdges, w as getWires } from "./faceFns-CauBoVg1.js";
|
|
4
|
+
import { n as HASH_CODE_MAX } from "./constants-csSEYddm.js";
|
|
5
|
+
import { h as vecScale, t as vecAdd } from "./vecOps-DBmIPNhk.js";
|
|
6
|
+
import { o as resolvePlane } from "./planeOps-Da2ylKGq.js";
|
|
7
|
+
import { _ as propagateAllMetadata, g as collectInputFaceHashes, v as propagateMetadataByHash } from "./shapeFns-4ySHDRyO.js";
|
|
8
|
+
import { n as getAtOrThrow, t as firstOrThrow } from "./arrayAccess-tCIbjLs5.js";
|
|
9
|
+
import { r as makeFace } from "./surfaceBuilders-AnSYsNAb.js";
|
|
10
10
|
//#region src/topology/booleanFns.ts
|
|
11
11
|
/**
|
|
12
12
|
* Boolean and compound operations — functional replacements for _3DShape boolean methods.
|
|
@@ -263,8 +263,8 @@ function buildEdgeAdjacency(edges) {
|
|
|
263
263
|
const edgeVertexHashes = /* @__PURE__ */ new Map();
|
|
264
264
|
for (const edge of edges) {
|
|
265
265
|
const verts = getVertices(edge);
|
|
266
|
-
const h0 = verts[0] ?
|
|
267
|
-
const h1 = verts.length > 1 && verts[1] ?
|
|
266
|
+
const h0 = verts[0] ? kernel.hashCode(verts[0].wrapped, HASH_CODE_MAX) : -1;
|
|
267
|
+
const h1 = verts.length > 1 && verts[1] ? kernel.hashCode(verts[1].wrapped, HASH_CODE_MAX) : h0;
|
|
268
268
|
edgeVertexHashes.set(edge, [h0, h1]);
|
|
269
269
|
for (const h of [h0, h1]) {
|
|
270
270
|
const bucket = vertexToEdges.get(h) ?? [];
|
package/dist/brepjs.cjs
CHANGED
|
@@ -1,30 +1,31 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_drawFns = require("./drawFns-
|
|
3
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
+
const require_drawFns = require("./drawFns-D98GdpRM.cjs");
|
|
3
|
+
const require_shapeTypes = require("./shapeTypes-CaSWO-Hg.cjs");
|
|
4
4
|
const require_occtWasmAdapter = require("./occtWasmAdapter-DcGOi3MQ.cjs");
|
|
5
5
|
const require_errors = require("./errors-CXRNVCec.cjs");
|
|
6
|
-
const require_faceFns = require("./faceFns-
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
const
|
|
26
|
-
const
|
|
27
|
-
const
|
|
6
|
+
const require_faceFns = require("./faceFns-DnIpKBex.cjs");
|
|
7
|
+
const require_constants = require("./constants-BNP_xnBN.cjs");
|
|
8
|
+
const require_types = require("./types-gLi9wL0N.cjs");
|
|
9
|
+
const require_vecOps = require("./vecOps-5bNB19nE.cjs");
|
|
10
|
+
const require_planeOps = require("./planeOps-CuI-sDtn.cjs");
|
|
11
|
+
const require_shapeFns = require("./shapeFns-CBRy0V_S.cjs");
|
|
12
|
+
const require_curveFns = require("./curveFns-B_pwrAMv.cjs");
|
|
13
|
+
const require_meshFns = require("./meshFns-Cxs6gU44.cjs");
|
|
14
|
+
const require_arrayAccess = require("./arrayAccess-DsnQpdSD.cjs");
|
|
15
|
+
const require_surfaceBuilders = require("./surfaceBuilders-Bixz70pj.cjs");
|
|
16
|
+
const require_booleanFns = require("./booleanFns-B86ltlZD.cjs");
|
|
17
|
+
const require_primitiveFns = require("./primitiveFns-CWiHuJw9.cjs");
|
|
18
|
+
const require_historyFns = require("./historyFns-D7UojEn3.cjs");
|
|
19
|
+
const require_boolean2D = require("./boolean2D-BUqgODrH.cjs");
|
|
20
|
+
const require_helpers = require("./helpers-kil7evW4.cjs");
|
|
21
|
+
const require_solidBuilders = require("./solidBuilders-BZFaM6nk.cjs");
|
|
22
|
+
const require_measureFns = require("./measureFns-Bt0Rd9q9.cjs");
|
|
23
|
+
const require_cornerFinder = require("./cornerFinder-DNmYCgaQ.cjs");
|
|
24
|
+
const require_extrudeFns = require("./extrudeFns-B9muBNIT.cjs");
|
|
25
|
+
const require_blueprintFns = require("./blueprintFns-oD720gYA.cjs");
|
|
26
|
+
const require_importFns = require("./importFns-Y4wgn0rJ.cjs");
|
|
27
|
+
const require_shapeRefFns = require("./shapeRefFns-oAyQxHO1.cjs");
|
|
28
|
+
const require_workerHandler = require("./workerHandler-C-3cFcsQ.cjs");
|
|
28
29
|
//#region src/topology/shapeBooleans.ts
|
|
29
30
|
var BOPAlgo_GlueShift = 1;
|
|
30
31
|
var BOPAlgo_GlueFull = 2;
|
|
@@ -2765,12 +2766,12 @@ exports.BrepErrorCode = require_errors.BrepErrorCode;
|
|
|
2765
2766
|
exports.BrepWrapperError = BrepWrapperError;
|
|
2766
2767
|
exports.BrepkitAdapter = require_shapeTypes.BrepkitAdapter;
|
|
2767
2768
|
exports.CompoundSketch = require_drawFns.CompoundSketch;
|
|
2768
|
-
exports.DEG2RAD =
|
|
2769
|
+
exports.DEG2RAD = require_constants.DEG2RAD;
|
|
2769
2770
|
exports.DisposalScope = require_shapeTypes.DisposalScope;
|
|
2770
|
-
exports.HASH_CODE_MAX =
|
|
2771
|
+
exports.HASH_CODE_MAX = require_constants.HASH_CODE_MAX;
|
|
2771
2772
|
exports.OK = require_errors.OK;
|
|
2772
2773
|
exports.OcctWasmAdapter = require_occtWasmAdapter.OcctWasmAdapter;
|
|
2773
|
-
exports.RAD2DEG =
|
|
2774
|
+
exports.RAD2DEG = require_constants.RAD2DEG;
|
|
2774
2775
|
exports.Sketch = require_boolean2D.Sketch;
|
|
2775
2776
|
exports.Sketches = require_drawFns.Sketches;
|
|
2776
2777
|
exports.addChild = require_historyFns.addChild;
|
package/dist/brepjs.js
CHANGED
|
@@ -1,29 +1,30 @@
|
|
|
1
|
-
import { $ as initFromOC, A as planarWire, B as createKernelHandle, C as isOrientedFace, D as manifoldShell, E as isValidSolid, F as as3D, H as isLive, I as is2D, J as withScopeResultAsync, K as withScope, L as is3D, M as getShapeKind, O as orientedFace, P as as2D, Q as init, R as DisposalScope, S as isManifoldShell, T as isPlanarWire, V as getDisposalStats, W as resetDisposalStats, X as getKernel, _ as isSolid, a as createEdge, at as BrepkitAdapter, b as closedWire, c as createSolid, d as isCompound, et as prewarm, f as isEdge, g as isShell, h as isShape3D, i as createCompound, it as supportsProjection, j as validSolid, k as planarFace, l as createVertex, m as isShape1D, n as castShape3D, nt as withKernel, o as createFace, ot as getPerformanceStats, p as isFace, q as withScopeResult, rt as supportsConstraintSketch, s as createShell, st as resetPerformanceStats, t as castShape, tt as registerKernel, u as createWire, v as isVertex, w as isPlanarFace, x as isClosedWire, y as isWire, z as createHandle } from "./shapeTypes-
|
|
1
|
+
import { $ as initFromOC, A as planarWire, B as createKernelHandle, C as isOrientedFace, D as manifoldShell, E as isValidSolid, F as as3D, H as isLive, I as is2D, J as withScopeResultAsync, K as withScope, L as is3D, M as getShapeKind, O as orientedFace, P as as2D, Q as init, R as DisposalScope, S as isManifoldShell, T as isPlanarWire, V as getDisposalStats, W as resetDisposalStats, X as getKernel, _ as isSolid, a as createEdge, at as BrepkitAdapter, b as closedWire, c as createSolid, d as isCompound, et as prewarm, f as isEdge, g as isShell, h as isShape3D, i as createCompound, it as supportsProjection, j as validSolid, k as planarFace, l as createVertex, m as isShape1D, n as castShape3D, nt as withKernel, o as createFace, ot as getPerformanceStats, p as isFace, q as withScopeResult, rt as supportsConstraintSketch, s as createShell, st as resetPerformanceStats, t as castShape, tt as registerKernel, u as createWire, v as isVertex, w as isPlanarFace, x as isClosedWire, y as isWire, z as createHandle } from "./shapeTypes-BLV4Ktdb.js";
|
|
2
2
|
import { t as OcctWasmAdapter } from "./occtWasmAdapter-BBr9e9ej.js";
|
|
3
3
|
import { A as ok, B as unwrapOr, C as fromNullable, D as mapBoth, E as map, F as tapErr, H as zip, I as tryCatch, L as tryCatchAsync, M as orElse, N as pipeline, O as mapErr, P as tap, R as unwrap, S as flatten, T as isOk, V as unwrapOrElse, _ as all, a as moduleInitError, b as err, c as sketcherStateError, d as validationError, g as OK, h as bug, i as kernelError, j as or, k as match, l as typeCastError, m as BrepBugError, n as computationError, o as queryError, r as ioError, t as BrepErrorCode, u as unsupportedError, v as andThen, w as isErr, x as flatMap, y as collect, z as unwrapErr } from "./errors-DboJwVCf.js";
|
|
4
|
-
import { A as vertexPosition, B as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { i as
|
|
8
|
-
import {
|
|
9
|
-
import { a as
|
|
10
|
-
import { a as
|
|
11
|
-
import { n as
|
|
12
|
-
import { n as
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import { C as
|
|
16
|
-
import { a as
|
|
17
|
-
import { a as
|
|
18
|
-
import {
|
|
19
|
-
import { r as
|
|
20
|
-
import {
|
|
21
|
-
import { t as
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import { a as
|
|
25
|
-
import { a as
|
|
26
|
-
import { a as
|
|
4
|
+
import { A as vertexPosition, B as kernelCallScoped, C as getVertices, D as iterFaces, E as iterEdges, F as isCompSolid, I as iterTopo, L as shapeType, M as cast, N as downcast, O as iterVertices, P as fromBREP, R as kernelCall, T as invalidateShapeCache, a as flipFaceOrientation, b as getEdges, c as normalAt, d as projectPointOnFace, f as removeHolesFromFace, g as getBounds, h as describe$1, i as faceOrientation, j as asTopo, k as iterWires, l as outerWire, m as uvCoordinates, n as faceCenter, o as getSurfaceType, p as uvBounds, r as faceGeomType, s as innerWires, t as classifyPointOnFace, u as pointOnSurface, w as getWires, x as getFaces, y as getCachedSurfaceType, z as kernelCallRaw } from "./faceFns-CauBoVg1.js";
|
|
5
|
+
import { n as HASH_CODE_MAX, r as RAD2DEG, t as DEG2RAD } from "./constants-csSEYddm.js";
|
|
6
|
+
import { n as toVec2, r as toVec3, t as resolveDirection } from "./types--GD-LVc6.js";
|
|
7
|
+
import { a as vecDot, c as vecLength, d as vecNormalize, f as vecProjectToPlane, g as vecSub, h as vecScale, i as vecDistance, l as vecLengthSq, m as vecRotate, n as vecAngle, o as vecEquals, p as vecRepr, r as vecCross, s as vecIsZero, t as vecAdd, u as vecNegate } from "./vecOps-DBmIPNhk.js";
|
|
8
|
+
import { i as pivotPlane, n as createPlane, o as resolvePlane, r as makePlane, s as translatePlane, t as createNamedPlane } from "./planeOps-Da2ylKGq.js";
|
|
9
|
+
import { C as findFacesByTag, D as tagFaces, E as setTagMetadata, O as getFaceOrigins, S as getShapeColor, T as getTagMetadata, a as isSameShape, b as colorShape, c as applyMatrix$1, d as resize, f as rotate$1, h as translate$1, i as isEqualShape, k as setShapeOrigin, l as composeTransforms, m as transformCopy$1, n as getHashCode, o as simplify$1, p as scale$1, r as isEmpty$2, s as toBREP$1, t as clone$1, u as mirror$1, w as getFaceTags, x as getFaceColor, y as colorFaces } from "./shapeFns-4ySHDRyO.js";
|
|
10
|
+
import { a as curveLength, c as curveStartPoint, d as getCurveType, f as getOrientation, i as curveIsPeriodic, l as curveTangentAt, m as offsetWire2D, n as curveEndPoint, o as curvePeriod, p as interpolateCurve, r as curveIsClosed, s as curvePointAt, t as approximateCurve, u as flipOrientation } from "./curveFns-Dv0wz8Zm.js";
|
|
11
|
+
import { a as meshEdges$1, c as createMeshCache, i as mesh$1, n as exportSTEP, o as meshMultiLOD, r as exportSTL, s as clearMeshCache, t as exportIGES } from "./meshFns-DO58R94T.js";
|
|
12
|
+
import { n as getAtOrThrow, t as firstOrThrow } from "./arrayAccess-tCIbjLs5.js";
|
|
13
|
+
import { n as fill, r as makeFace } from "./surfaceBuilders-AnSYsNAb.js";
|
|
14
|
+
import { a as fuseAll, c as sectionToFace$1, i as fuse$1, l as slice$1, n as cut$1, o as intersect$1, r as cutAll, s as section$1, t as booleanPipeline, u as split$1 } from "./booleanFns-CiiCf7YH.js";
|
|
15
|
+
import { $ as getNurbsSurfaceData, A as fixShape, B as offset$1, C as threePointArc, D as wireLoop, E as wire, F as isValid$1, G as chamferWithEvolution, H as thicken$1, I as solidFromShell, J as fuseWithEvolution, K as cutWithEvolution, L as chamfer$1, M as healFace, N as healSolid, O as autoHeal, P as healWire, Q as getNurbsCurveData, R as draft$1, S as tangentArc, T as vertex, U as variableFillet, V as shell$1, W as positionOnCurve, X as shellWithEvolution, Y as intersectWithEvolution, Z as checkBoolean, _ as polygon, a as circle, at as wiresOfFace, b as sphere, c as cylinder, ct as toGroupedBufferGeometryData, d as ellipsoid, et as adjacentFaces, f as face, g as offsetFace, h as line, i as bsplineApprox, it as verticesOfEdge, j as heal$1, k as fixSelfIntersection, l as ellipse, lt as toLODGeometryData, m as helix, n as bezier, nt as facesOfEdge, o as compound, ot as chamferDistAngle, p as filledFace, q as filletWithEvolution, r as box, rt as sharedEdges, s as cone, st as toBufferGeometryData, t as addHoles, tt as edgesOfFace, u as ellipseArc, ut as toLineGeometryData, v as sewShells, w as torus, x as subFace, y as solid, z as fillet$1 } from "./primitiveFns-Rpdnd3FK.js";
|
|
16
|
+
import { C as walkAssembly, D as exportAssemblySTEP, E as linearPattern, O as createAssembly, S as updateNode, _ as collectShapes, a as findStep, b as findNode, c as registerOperation, d as replayHistory, f as serializeHistory, g as addChild, h as undoLast, i as deserializeHistory, 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-DYrliEQE.js";
|
|
17
|
+
import { a as fuseBlueprints, c as roundedRectangleBlueprint, f as Sketch, h as organiseBlueprints, i as cutBlueprints, m as loftAll, n as fuse2D, o as intersectBlueprints, p as loft$1, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-zRsWUMD9.js";
|
|
18
|
+
import { a as createTypedFinder, i as wireFinder, n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-B_-mIteL.js";
|
|
19
|
+
import { $ as sketchFaceOffset, B as drawSingleCircle, C as cameraFromPlane, D as makeProjectedEdges, E as projectEdges, F as drawParametricFunction, G as loadFont, H as drawText, I as drawPointsInterpolation, J as textMetrics, K as sketchText, L as drawPolysides, M as draw, N as drawCircle, O as isProjectionPlane, P as drawEllipse, Q as sketchEllipse, R as drawRectangle, S as drawProjection, T as createCamera, U as fontMetrics, V as drawSingleEllipse, W as getFont, X as polysideInnerRadius, Y as makeBaseBox, Z as sketchCircle, _ as sketchLoft, a as drawingIntersect, b as sketchWires, c as rotateDrawing, d as compoundSketchExtrude, et as sketchHelix, f as compoundSketchFace, g as sketchFace, h as sketchExtrude, i as drawingFuse, it as sketchRoundedRectangle, j as deserializeDrawing, l as scaleDrawing, m as compoundSketchRevolve, n as drawingCut, nt as sketchPolysides, o as drawingToSketchOnPlane, ot as Sketches, p as compoundSketchLoft, q as textBlueprints, r as drawingFillet, rt as sketchRectangle, s as mirrorDrawing, st as CompoundSketch, t as drawingChamfer, tt as sketchParametricFunction, u as translateDrawing, v as sketchRevolve, w as cameraLookAt, x as drawFaceOutline, y as sketchSweep, z as drawRoundedRectangle } from "./drawFns-L7NpQwWq.js";
|
|
20
|
+
import { r as makeCylinder } from "./solidBuilders-BexZFemn.js";
|
|
21
|
+
import { a as measureDistance, c as measureLinearProps, d as measureVolumeProps, i as measureCurvatureAtMid, l as measureSurfaceProps, n as measureArea, o as measureDistanceProps, r as measureCurvatureAt, s as measureLength, t as createDistanceQuery, u as measureVolume } from "./measureFns-Bey2EmNQ.js";
|
|
22
|
+
import { t as cornerFinder } from "./cornerFinder-lO-ySgHJ.js";
|
|
23
|
+
import { a as guidedSweep, c as sweep, i as complexExtrude, l as twistExtrude, n as extrudeAll, o as multiSectionSweep, r as revolve$1, s as supportExtrude, t as extrude$1 } from "./extrudeFns-lgSsOjwq.js";
|
|
24
|
+
import { S as reverseCurve, _ as curve2dIsOnCurve, a as isInside2D, b as curve2dSplitAt, c as scale2D, d as stretch2D, f as toSVGPathD, g as curve2dFirstPoint, h as curve2dDistanceFrom, i as getOrientation2D, l as sketchOnFace2D, m as curve2dBoundingBox, n as createCompoundBlueprint, o as mirror2D, p as translate2D, r as getBounds2D, s as rotate2D, t as createBlueprint, u as sketchOnPlane2D, v as curve2dLastPoint, x as curve2dTangentAt, y as curve2dParameter } from "./blueprintFns-B6NYYOlY.js";
|
|
25
|
+
import { a as importSVG, c as blueprintToDXF, d as exportGltf, f as exportOBJ, i as exportSTEPConfigured, l as exportDXF, n as importSTEP, o as importSVGPathD, r as importSTL, s as exportThreeMF, t as importIGES, u as exportGlb } from "./importFns-CPzDHVKm.js";
|
|
26
|
+
import { a as updateRoles, i as resolveRef, n as captureHint, o as defaultScorer, r as createRef, t as assignRoles } from "./shapeRefFns-D21Yl4Eu.js";
|
|
27
|
+
import { a as createTaskQueue, c as isEmpty$1, d as isDisposeRequest, f as isErrorResponse, h as isSuccessResponse, i as createWorkerClient, l as pendingCount, m as isOperationRequest, n as createWorkerHandler, o as dequeueTask, p as isInitRequest, r as registerHandler, s as enqueueTask, t as createOperationRegistry, u as rejectAll } from "./workerHandler-Dm0_0F8Z.js";
|
|
27
28
|
//#region \0rolldown/runtime.js
|
|
28
29
|
var __defProp = Object.defineProperty;
|
|
29
30
|
var __exportAll = (all, no_symbols) => {
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
//#region src/core/constants.ts
|
|
2
|
+
/** Maximum hash code value for kernel shape hashing (2^31 - 1). */
|
|
3
|
+
var HASH_CODE_MAX = 2147483647;
|
|
4
|
+
/** Multiply degrees by this constant to convert to radians. */
|
|
5
|
+
var DEG2RAD = Math.PI / 180;
|
|
6
|
+
/** Multiply radians by this constant to convert to degrees. */
|
|
7
|
+
var RAD2DEG = 180 / Math.PI;
|
|
8
|
+
//#endregion
|
|
9
|
+
Object.defineProperty(exports, "DEG2RAD", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function() {
|
|
12
|
+
return DEG2RAD;
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(exports, "HASH_CODE_MAX", {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function() {
|
|
18
|
+
return HASH_CODE_MAX;
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
Object.defineProperty(exports, "RAD2DEG", {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function() {
|
|
24
|
+
return RAD2DEG;
|
|
25
|
+
}
|
|
26
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
//#region src/core/constants.ts
|
|
2
|
+
/** Maximum hash code value for kernel shape hashing (2^31 - 1). */
|
|
3
|
+
var HASH_CODE_MAX = 2147483647;
|
|
4
|
+
/** Multiply degrees by this constant to convert to radians. */
|
|
5
|
+
var DEG2RAD = Math.PI / 180;
|
|
6
|
+
/** Multiply radians by this constant to convert to degrees. */
|
|
7
|
+
var RAD2DEG = 180 / Math.PI;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { HASH_CODE_MAX as n, RAD2DEG as r, DEG2RAD as t };
|
package/dist/core.cjs
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
+
const require_shapeTypes = require("./shapeTypes-CaSWO-Hg.cjs");
|
|
3
3
|
const require_errors = require("./errors-CXRNVCec.cjs");
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
4
|
+
const require_constants = require("./constants-BNP_xnBN.cjs");
|
|
5
|
+
const require_types = require("./types-gLi9wL0N.cjs");
|
|
6
|
+
const require_vecOps = require("./vecOps-5bNB19nE.cjs");
|
|
7
|
+
const require_planeOps = require("./planeOps-CuI-sDtn.cjs");
|
|
7
8
|
exports.BrepBugError = require_errors.BrepBugError;
|
|
8
|
-
exports.DEG2RAD =
|
|
9
|
+
exports.DEG2RAD = require_constants.DEG2RAD;
|
|
9
10
|
exports.DisposalScope = require_shapeTypes.DisposalScope;
|
|
10
|
-
exports.HASH_CODE_MAX =
|
|
11
|
+
exports.HASH_CODE_MAX = require_constants.HASH_CODE_MAX;
|
|
11
12
|
exports.OK = require_errors.OK;
|
|
12
|
-
exports.RAD2DEG =
|
|
13
|
+
exports.RAD2DEG = require_constants.RAD2DEG;
|
|
13
14
|
exports.andThen = require_errors.andThen;
|
|
14
15
|
exports.bug = require_errors.bug;
|
|
15
16
|
exports.castShape = require_shapeTypes.castShape;
|
package/dist/core.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { B as createKernelHandle, C as isOrientedFace, D as manifoldShell, E as isValidSolid, H as isLive, I as is2D, J as withScopeResultAsync, K as withScope, L as is3D, M as getShapeKind, O as orientedFace, R as DisposalScope, S as isManifoldShell, _ as isSolid, b as closedWire, d as isCompound, f as isEdge, g as isShell, h as isShape3D, j as validSolid, m as isShape1D, p as isFace, q as withScopeResult, t as castShape, v as isVertex, x as isClosedWire, y as isWire, z as createHandle } from "./shapeTypes-
|
|
1
|
+
import { B as createKernelHandle, C as isOrientedFace, D as manifoldShell, E as isValidSolid, H as isLive, I as is2D, J as withScopeResultAsync, K as withScope, L as is3D, M as getShapeKind, O as orientedFace, R as DisposalScope, S as isManifoldShell, _ as isSolid, b as closedWire, d as isCompound, f as isEdge, g as isShell, h as isShape3D, j as validSolid, m as isShape1D, p as isFace, q as withScopeResult, t as castShape, v as isVertex, x as isClosedWire, y as isWire, z as createHandle } from "./shapeTypes-BLV4Ktdb.js";
|
|
2
2
|
import { A as ok, B as unwrapOr, E as map, I as tryCatch, L as tryCatchAsync, O as mapErr, R as unwrap, T as isOk, V as unwrapOrElse, a as moduleInitError, b as err, c as sketcherStateError, d as validationError, g as OK, h as bug, i as kernelError, k as match, l as typeCastError, m as BrepBugError, n as computationError, o as queryError, r as ioError, u as unsupportedError, v as andThen, w as isErr, x as flatMap, y as collect, z as unwrapErr } from "./errors-DboJwVCf.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { i as
|
|
3
|
+
import { n as HASH_CODE_MAX, r as RAD2DEG, t as DEG2RAD } from "./constants-csSEYddm.js";
|
|
4
|
+
import { n as toVec2, r as toVec3, t as resolveDirection } from "./types--GD-LVc6.js";
|
|
5
|
+
import { a as vecDot, c as vecLength, d as vecNormalize, f as vecProjectToPlane, g as vecSub, h as vecScale, i as vecDistance, l as vecLengthSq, m as vecRotate, n as vecAngle, o as vecEquals, p as vecRepr, r as vecCross, s as vecIsZero, t as vecAdd, u as vecNegate } from "./vecOps-DBmIPNhk.js";
|
|
6
|
+
import { i as pivotPlane, n as createPlane, o as resolvePlane, s as translatePlane, t as createNamedPlane } from "./planeOps-Da2ylKGq.js";
|
|
6
7
|
export { BrepBugError, DEG2RAD, DisposalScope, HASH_CODE_MAX, OK, RAD2DEG, andThen, bug, castShape, closedWire, collect, computationError, createHandle, createKernelHandle, createNamedPlane, createPlane, err, flatMap, getShapeKind, ioError, is2D, is3D, isClosedWire, isCompound, isEdge, isErr, isFace, isLive, isManifoldShell, isOk, isOrientedFace, isShape1D, isShape3D, isShell, isSolid, isValidSolid, isVertex, isWire, kernelError, manifoldShell, map, mapErr, match, moduleInitError, ok, orientedFace, pivotPlane, queryError, resolveDirection, resolvePlane, sketcherStateError, toVec2, toVec3, translatePlane, tryCatch, tryCatchAsync, typeCastError, unsupportedError, unwrap, unwrapErr, unwrapOr, unwrapOrElse, validSolid, validationError, vecAdd, vecAngle, vecCross, vecDistance, vecDot, vecEquals, vecIsZero, vecLength, vecLengthSq, vecNegate, vecNormalize, vecProjectToPlane, vecRepr, vecRotate, vecScale, vecSub, withScope, withScopeResult, withScopeResultAsync };
|