brepjs 15.2.4 → 15.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/2d.cjs +3 -3
- package/dist/2d.js +3 -3
- package/dist/{blueprint-CVDdCwvY.cjs → blueprint-DP00ES4B.cjs} +2 -2
- package/dist/{blueprint-DiLT1cjs.js → blueprint-Q1M0Jh2U.js} +2 -2
- package/dist/{blueprintFns-1Ulj1yXX.js → blueprintFns-CoRxbegA.js} +2 -2
- package/dist/{blueprintFns-VagQe-2I.cjs → blueprintFns-DGoRLy3W.cjs} +2 -2
- package/dist/{boolean2D-C_vue9r7.cjs → boolean2D-BuF_1i4D.cjs} +6 -6
- package/dist/{boolean2D-_yG91bHX.js → boolean2D-w_JU3qA6.js} +6 -6
- package/dist/{booleanFns-C7c98iPH.cjs → booleanFns-CQNV8MMq.cjs} +2 -2
- package/dist/{booleanFns-QZtMt5Aa.js → booleanFns-D_DVbfzR.js} +2 -2
- package/dist/brepjs.cjs +13 -13
- package/dist/brepjs.js +13 -13
- package/dist/core.cjs +2 -2
- package/dist/core.js +2 -2
- package/dist/{cornerFinder-CvF2SrsV.js → cornerFinder-CNpqIRvK.js} +1 -1
- package/dist/{cornerFinder-DP1-TfDV.cjs → cornerFinder-t0r0NiIf.cjs} +1 -1
- package/dist/{drawFns-mX41AgJp.cjs → drawFns-Bk7kfVmD.cjs} +7 -7
- package/dist/{drawFns-BIFwKDPT.js → drawFns-CNPmD8PK.js} +7 -7
- package/dist/{extrudeFns-B588lxcH.cjs → extrudeFns-BQ9mhxB3.cjs} +4 -4
- package/dist/{extrudeFns-DjfHvYJe.js → extrudeFns-yCZ6ZNQy.js} +4 -4
- package/dist/{helpers-B2J4sg4l.js → helpers-CQgRNpa-.js} +1 -1
- package/dist/{helpers-B48K8Z6B.cjs → helpers-Csx69_Wn.cjs} +1 -1
- package/dist/{historyFns-Bxg4_ieD.cjs → historyFns-DBSgZGtF.cjs} +2 -2
- package/dist/{historyFns-BpfArwQu.js → historyFns-DltXL-vp.js} +2 -2
- package/dist/{importFns-D6eumXiz.js → importFns-CcTs485L.js} +2 -2
- package/dist/{importFns-UkXALkBs.cjs → importFns-m2IJXUsB.cjs} +2 -2
- package/dist/io.cjs +1 -1
- package/dist/io.js +1 -1
- package/dist/operations/roofFns.d.ts.map +1 -1
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/{planeOps-CuI-sDtn.cjs → planeOps-BJOIbn4K.cjs} +1 -1
- package/dist/{planeOps-Da2ylKGq.js → planeOps-sTrM3dcQ.js} +1 -1
- package/dist/{primitiveFns-CriBoS7M.cjs → primitiveFns-CVcoZURM.cjs} +2 -2
- package/dist/{primitiveFns-CtWBTFPI.js → primitiveFns-DZBVfdNl.js} +2 -2
- package/dist/query.cjs +2 -2
- package/dist/query.js +2 -2
- package/dist/sketching.cjs +2 -2
- package/dist/sketching.js +2 -2
- package/dist/topology.cjs +2 -2
- package/dist/topology.js +2 -2
- package/dist/{vecOps-DBmIPNhk.js → vecOps-B-PCHgyB.js} +2 -2
- package/dist/{vecOps-5bNB19nE.cjs → vecOps-CODplJp3.cjs} +2 -2
- package/dist/vectors.cjs +2 -2
- package/dist/vectors.js +2 -2
- package/package.json +7 -7
package/dist/2d.cjs
CHANGED
|
@@ -2,9 +2,9 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
2
2
|
const require_shapeTypes = require("./shapeTypes-Bfw136X-.cjs");
|
|
3
3
|
const require_errors = require("./errors-CXRNVCec.cjs");
|
|
4
4
|
const require_faceFns = require("./faceFns-CKL9Us23.cjs");
|
|
5
|
-
const require_boolean2D = require("./boolean2D-
|
|
6
|
-
const require_blueprint = require("./blueprint-
|
|
7
|
-
const require_blueprintFns = require("./blueprintFns-
|
|
5
|
+
const require_boolean2D = require("./boolean2D-BuF_1i4D.cjs");
|
|
6
|
+
const require_blueprint = require("./blueprint-DP00ES4B.cjs");
|
|
7
|
+
const require_blueprintFns = require("./blueprintFns-DGoRLy3W.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
1
|
import { B as createKernelHandle, Z as getKernel2D, a as createEdge } from "./shapeTypes-Ct7W6h2X.js";
|
|
2
2
|
import { A as ok, b as err, d as validationError, t as BrepErrorCode } from "./errors-DboJwVCf.js";
|
|
3
3
|
import { z as kernelCallRaw } from "./faceFns-DMFG-piP.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-
|
|
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-
|
|
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-w_JU3qA6.js";
|
|
5
|
+
import { _ as Curve2D, t as Blueprint, y as BoundingBox2d } from "./blueprint-Q1M0Jh2U.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-CoRxbegA.js";
|
|
7
7
|
//#region src/core/curve2dHandle.ts
|
|
8
8
|
/**
|
|
9
9
|
* Wrap a raw kernel 2D curve handle with brand + disposal tracking.
|
|
@@ -3,11 +3,11 @@ const require_errors = require("./errors-CXRNVCec.cjs");
|
|
|
3
3
|
const require_faceFns = require("./faceFns-CKL9Us23.cjs");
|
|
4
4
|
const require_constants = require("./constants-BNP_xnBN.cjs");
|
|
5
5
|
const require_types = require("./types-gLi9wL0N.cjs");
|
|
6
|
-
const require_planeOps = require("./planeOps-
|
|
6
|
+
const require_planeOps = require("./planeOps-BJOIbn4K.cjs");
|
|
7
7
|
const require_curveFns = require("./curveFns-Bukd9jhv.cjs");
|
|
8
8
|
const require_arrayAccess = require("./arrayAccess-DsnQpdSD.cjs");
|
|
9
9
|
const require_surfaceBuilders = require("./surfaceBuilders-DzTJA3fK.cjs");
|
|
10
|
-
const require_helpers = require("./helpers-
|
|
10
|
+
const require_helpers = require("./helpers-Csx69_Wn.cjs");
|
|
11
11
|
//#region src/2d/lib/definitions.ts
|
|
12
12
|
/** Type guard that checks whether a value is a `Point2D`. */
|
|
13
13
|
function isPoint2D(point) {
|
|
@@ -3,11 +3,11 @@ import { A as ok, R as unwrap, b as err, d as validationError, h as bug, n as co
|
|
|
3
3
|
import { M as cast, m as uvCoordinates, n as faceCenter, p as uvBounds, r as faceGeomType } from "./faceFns-DMFG-piP.js";
|
|
4
4
|
import { r as RAD2DEG, t as DEG2RAD } from "./constants-csSEYddm.js";
|
|
5
5
|
import { r as toVec3 } from "./types--GD-LVc6.js";
|
|
6
|
-
import { r as makePlane } from "./planeOps-
|
|
6
|
+
import { r as makePlane } from "./planeOps-sTrM3dcQ.js";
|
|
7
7
|
import { f as getOrientation } from "./curveFns-Dn4gbNzG.js";
|
|
8
8
|
import { n as getAtOrThrow, r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-tCIbjLs5.js";
|
|
9
9
|
import { r as makeFace } from "./surfaceBuilders-Im6Xef27.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-
|
|
10
|
+
import { _ as samePoint, b as subtract2d, l as add2d, o as normalize2d, p as distance2d, t as getSingleFace, v as scalarMultiply2d } from "./helpers-CQgRNpa-.js";
|
|
11
11
|
//#region src/2d/lib/definitions.ts
|
|
12
12
|
/** Type guard that checks whether a value is a `Point2D`. */
|
|
13
13
|
function isPoint2D(point) {
|
|
@@ -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-w_JU3qA6.js";
|
|
3
|
+
import { t as Blueprint } from "./blueprint-Q1M0Jh2U.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-BuF_1i4D.cjs");
|
|
3
|
+
const require_blueprint = require("./blueprint-DP00ES4B.cjs");
|
|
4
4
|
//#region src/2d/lib/curve2dFns.ts
|
|
5
5
|
/**
|
|
6
6
|
* Return a reversed copy of the curve (non-mutating).
|
|
@@ -3,14 +3,14 @@ const require_errors = require("./errors-CXRNVCec.cjs");
|
|
|
3
3
|
const require_faceFns = require("./faceFns-CKL9Us23.cjs");
|
|
4
4
|
const require_constants = require("./constants-BNP_xnBN.cjs");
|
|
5
5
|
const require_types = require("./types-gLi9wL0N.cjs");
|
|
6
|
-
const require_vecOps = require("./vecOps-
|
|
7
|
-
const require_planeOps = require("./planeOps-
|
|
6
|
+
const require_vecOps = require("./vecOps-CODplJp3.cjs");
|
|
7
|
+
const require_planeOps = require("./planeOps-BJOIbn4K.cjs");
|
|
8
8
|
const require_curveFns = require("./curveFns-Bukd9jhv.cjs");
|
|
9
9
|
const require_arrayAccess = require("./arrayAccess-DsnQpdSD.cjs");
|
|
10
10
|
const require_surfaceBuilders = require("./surfaceBuilders-DzTJA3fK.cjs");
|
|
11
|
-
const require_helpers = require("./helpers-
|
|
12
|
-
const require_blueprint = require("./blueprint-
|
|
13
|
-
const require_extrudeFns = require("./extrudeFns-
|
|
11
|
+
const require_helpers = require("./helpers-Csx69_Wn.cjs");
|
|
12
|
+
const require_blueprint = require("./blueprint-DP00ES4B.cjs");
|
|
13
|
+
const require_extrudeFns = require("./extrudeFns-BQ9mhxB3.cjs");
|
|
14
14
|
//#region node_modules/flatqueue/index.js
|
|
15
15
|
/** @template T */
|
|
16
16
|
var FlatQueue = class {
|
|
@@ -1323,7 +1323,7 @@ function radianAngle(ux, uy, vx, vy) {
|
|
|
1323
1323
|
function convertSvgEllipseParams([x1, y1], [x2, y2], rx, ry, phi, fA, fS) {
|
|
1324
1324
|
if (rx < 0) rx = -rx;
|
|
1325
1325
|
if (ry < 0) ry = -ry;
|
|
1326
|
-
if (rx
|
|
1326
|
+
if (Math.abs(rx) < 1e-10 || Math.abs(ry) < 1e-10) require_errors.bug("convertSvgEllipseParams", "rx and ry cannot be 0");
|
|
1327
1327
|
const s_phi = Math.sin(phi);
|
|
1328
1328
|
const c_phi = Math.cos(phi);
|
|
1329
1329
|
const hd_x = (x1 - x2) / 2;
|
|
@@ -3,14 +3,14 @@ import { A as ok, R as unwrap, T as isOk, b as err, d as validationError, h as b
|
|
|
3
3
|
import { N as downcast, c as normalAt, p as uvBounds, u as pointOnSurface } from "./faceFns-DMFG-piP.js";
|
|
4
4
|
import { r as RAD2DEG, t as DEG2RAD } from "./constants-csSEYddm.js";
|
|
5
5
|
import { r as toVec3 } from "./types--GD-LVc6.js";
|
|
6
|
-
import { d as vecNormalize, h as vecScale, r as vecCross } from "./vecOps-
|
|
7
|
-
import { n as createPlane } from "./planeOps-
|
|
6
|
+
import { d as vecNormalize, h as vecScale, r as vecCross } from "./vecOps-B-PCHgyB.js";
|
|
7
|
+
import { n as createPlane } from "./planeOps-sTrM3dcQ.js";
|
|
8
8
|
import { c as curveStartPoint, l as curveTangentAt, r as curveIsClosed } from "./curveFns-Dn4gbNzG.js";
|
|
9
9
|
import { r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-tCIbjLs5.js";
|
|
10
10
|
import { _ as zip, i as makeNewFaceWithinFace, r as makeFace, s as assembleWire } from "./surfaceBuilders-Im6Xef27.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-
|
|
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-
|
|
13
|
-
import { c as sweep, i as complexExtrude, l as twistExtrude, r as revolve, t as extrude } from "./extrudeFns-
|
|
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-CQgRNpa-.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-Q1M0Jh2U.js";
|
|
13
|
+
import { c as sweep, i as complexExtrude, l as twistExtrude, r as revolve, t as extrude } from "./extrudeFns-yCZ6ZNQy.js";
|
|
14
14
|
//#region node_modules/flatqueue/index.js
|
|
15
15
|
/** @template T */
|
|
16
16
|
var FlatQueue = class {
|
|
@@ -1323,7 +1323,7 @@ function radianAngle(ux, uy, vx, vy) {
|
|
|
1323
1323
|
function convertSvgEllipseParams([x1, y1], [x2, y2], rx, ry, phi, fA, fS) {
|
|
1324
1324
|
if (rx < 0) rx = -rx;
|
|
1325
1325
|
if (ry < 0) ry = -ry;
|
|
1326
|
-
if (rx
|
|
1326
|
+
if (Math.abs(rx) < 1e-10 || Math.abs(ry) < 1e-10) bug("convertSvgEllipseParams", "rx and ry cannot be 0");
|
|
1327
1327
|
const s_phi = Math.sin(phi);
|
|
1328
1328
|
const c_phi = Math.cos(phi);
|
|
1329
1329
|
const hd_x = (x1 - x2) / 2;
|
|
@@ -2,8 +2,8 @@ const require_shapeTypes = require("./shapeTypes-Bfw136X-.cjs");
|
|
|
2
2
|
const require_errors = require("./errors-CXRNVCec.cjs");
|
|
3
3
|
const require_faceFns = require("./faceFns-CKL9Us23.cjs");
|
|
4
4
|
const require_constants = require("./constants-BNP_xnBN.cjs");
|
|
5
|
-
const require_vecOps = require("./vecOps-
|
|
6
|
-
const require_planeOps = require("./planeOps-
|
|
5
|
+
const require_vecOps = require("./vecOps-CODplJp3.cjs");
|
|
6
|
+
const require_planeOps = require("./planeOps-BJOIbn4K.cjs");
|
|
7
7
|
const require_shapeFns = require("./shapeFns-DkFzoJav.cjs");
|
|
8
8
|
const require_arrayAccess = require("./arrayAccess-DsnQpdSD.cjs");
|
|
9
9
|
const require_surfaceBuilders = require("./surfaceBuilders-DzTJA3fK.cjs");
|
|
@@ -2,8 +2,8 @@ import { X as getKernel, h as isShape3D, t as castShape } from "./shapeTypes-Ct7
|
|
|
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
3
|
import { C as getVertices, b as getEdges, w as getWires } from "./faceFns-DMFG-piP.js";
|
|
4
4
|
import { n as HASH_CODE_MAX } from "./constants-csSEYddm.js";
|
|
5
|
-
import { h as vecScale, t as vecAdd } from "./vecOps-
|
|
6
|
-
import { o as resolvePlane } from "./planeOps-
|
|
5
|
+
import { h as vecScale, t as vecAdd } from "./vecOps-B-PCHgyB.js";
|
|
6
|
+
import { o as resolvePlane } from "./planeOps-sTrM3dcQ.js";
|
|
7
7
|
import { _ as propagateAllMetadata, g as collectInputFaceHashes, v as propagateMetadataByHash } from "./shapeFns-QGgHStIU.js";
|
|
8
8
|
import { n as getAtOrThrow, t as firstOrThrow } from "./arrayAccess-tCIbjLs5.js";
|
|
9
9
|
import { r as makeFace } from "./surfaceBuilders-Im6Xef27.js";
|
package/dist/brepjs.cjs
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_drawFns = require("./drawFns-
|
|
2
|
+
const require_drawFns = require("./drawFns-Bk7kfVmD.cjs");
|
|
3
3
|
const require_shapeTypes = require("./shapeTypes-Bfw136X-.cjs");
|
|
4
4
|
const require_occtWasmAdapter = require("./occtWasmAdapter-CPINzXxh.cjs");
|
|
5
5
|
const require_errors = require("./errors-CXRNVCec.cjs");
|
|
6
6
|
const require_faceFns = require("./faceFns-CKL9Us23.cjs");
|
|
7
7
|
const require_constants = require("./constants-BNP_xnBN.cjs");
|
|
8
8
|
const require_types = require("./types-gLi9wL0N.cjs");
|
|
9
|
-
const require_vecOps = require("./vecOps-
|
|
10
|
-
const require_planeOps = require("./planeOps-
|
|
9
|
+
const require_vecOps = require("./vecOps-CODplJp3.cjs");
|
|
10
|
+
const require_planeOps = require("./planeOps-BJOIbn4K.cjs");
|
|
11
11
|
const require_shapeFns = require("./shapeFns-DkFzoJav.cjs");
|
|
12
12
|
const require_curveFns = require("./curveFns-Bukd9jhv.cjs");
|
|
13
13
|
const require_meshFns = require("./meshFns-CO9qVJ24.cjs");
|
|
14
14
|
const require_arrayAccess = require("./arrayAccess-DsnQpdSD.cjs");
|
|
15
15
|
const require_surfaceBuilders = require("./surfaceBuilders-DzTJA3fK.cjs");
|
|
16
|
-
const require_booleanFns = require("./booleanFns-
|
|
17
|
-
const require_primitiveFns = require("./primitiveFns-
|
|
18
|
-
const require_historyFns = require("./historyFns-
|
|
19
|
-
const require_boolean2D = require("./boolean2D-
|
|
20
|
-
const require_helpers = require("./helpers-
|
|
16
|
+
const require_booleanFns = require("./booleanFns-CQNV8MMq.cjs");
|
|
17
|
+
const require_primitiveFns = require("./primitiveFns-CVcoZURM.cjs");
|
|
18
|
+
const require_historyFns = require("./historyFns-DBSgZGtF.cjs");
|
|
19
|
+
const require_boolean2D = require("./boolean2D-BuF_1i4D.cjs");
|
|
20
|
+
const require_helpers = require("./helpers-Csx69_Wn.cjs");
|
|
21
21
|
const require_solidBuilders = require("./solidBuilders-DI9d6ZIx.cjs");
|
|
22
22
|
const require_measureFns = require("./measureFns-C2SnZLhD.cjs");
|
|
23
|
-
const require_cornerFinder = require("./cornerFinder-
|
|
24
|
-
const require_extrudeFns = require("./extrudeFns-
|
|
25
|
-
const require_blueprintFns = require("./blueprintFns-
|
|
26
|
-
const require_importFns = require("./importFns-
|
|
23
|
+
const require_cornerFinder = require("./cornerFinder-t0r0NiIf.cjs");
|
|
24
|
+
const require_extrudeFns = require("./extrudeFns-BQ9mhxB3.cjs");
|
|
25
|
+
const require_blueprintFns = require("./blueprintFns-DGoRLy3W.cjs");
|
|
26
|
+
const require_importFns = require("./importFns-m2IJXUsB.cjs");
|
|
27
27
|
const require_shapeRefFns = require("./shapeRefFns-t-5-Aqku.cjs");
|
|
28
28
|
const require_workerHandler = require("./workerHandler-C-3cFcsQ.cjs");
|
|
29
29
|
//#region src/topology/shapeBooleans.ts
|
|
@@ -1082,7 +1082,7 @@ function buildSkeletonTriFaces(skeleton, tanAngle, kernel) {
|
|
|
1082
1082
|
* @returns A Result containing the roof Solid, or an error
|
|
1083
1083
|
*/
|
|
1084
1084
|
function roof(w, options) {
|
|
1085
|
-
const angle = (options?.angle ?? 45) *
|
|
1085
|
+
const angle = (options?.angle ?? 45) * require_constants.DEG2RAD;
|
|
1086
1086
|
const tanAngle = Math.tan(angle);
|
|
1087
1087
|
try {
|
|
1088
1088
|
const polygon = extractPolygon(w);
|
package/dist/brepjs.js
CHANGED
|
@@ -4,25 +4,25 @@ import { A as ok, B as unwrapOr, C as fromNullable, D as mapBoth, E as map, F as
|
|
|
4
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-DMFG-piP.js";
|
|
5
5
|
import { n as HASH_CODE_MAX, r as RAD2DEG, t as DEG2RAD } from "./constants-csSEYddm.js";
|
|
6
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-
|
|
8
|
-
import { i as pivotPlane, n as createPlane, o as resolvePlane, r as makePlane, s as translatePlane, t as createNamedPlane } from "./planeOps-
|
|
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-B-PCHgyB.js";
|
|
8
|
+
import { i as pivotPlane, n as createPlane, o as resolvePlane, r as makePlane, s as translatePlane, t as createNamedPlane } from "./planeOps-sTrM3dcQ.js";
|
|
9
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-QGgHStIU.js";
|
|
10
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-Dn4gbNzG.js";
|
|
11
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-gTPomZkK.js";
|
|
12
12
|
import { n as getAtOrThrow, t as firstOrThrow } from "./arrayAccess-tCIbjLs5.js";
|
|
13
13
|
import { n as fill, r as makeFace } from "./surfaceBuilders-Im6Xef27.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-
|
|
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-
|
|
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-
|
|
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-
|
|
18
|
-
import { a as createTypedFinder, i as wireFinder, n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-
|
|
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-
|
|
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-D_DVbfzR.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-DZBVfdNl.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-DltXL-vp.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-w_JU3qA6.js";
|
|
18
|
+
import { a as createTypedFinder, i as wireFinder, n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-CQgRNpa-.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-CNPmD8PK.js";
|
|
20
20
|
import { r as makeCylinder } from "./solidBuilders-CQipZFOw.js";
|
|
21
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-Zc5RWsI4.js";
|
|
22
|
-
import { t as cornerFinder } from "./cornerFinder-
|
|
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-
|
|
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-
|
|
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-
|
|
22
|
+
import { t as cornerFinder } from "./cornerFinder-CNpqIRvK.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-yCZ6ZNQy.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-CoRxbegA.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-CcTs485L.js";
|
|
26
26
|
import { a as updateRoles, i as resolveRef, n as captureHint, o as defaultScorer, r as createRef, t as assignRoles } from "./shapeRefFns-Gv4-NGJD.js";
|
|
27
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";
|
|
28
28
|
//#region \0rolldown/runtime.js
|
|
@@ -1093,7 +1093,7 @@ function buildSkeletonTriFaces(skeleton, tanAngle, kernel) {
|
|
|
1093
1093
|
* @returns A Result containing the roof Solid, or an error
|
|
1094
1094
|
*/
|
|
1095
1095
|
function roof(w, options) {
|
|
1096
|
-
const angle = (options?.angle ?? 45) *
|
|
1096
|
+
const angle = (options?.angle ?? 45) * DEG2RAD;
|
|
1097
1097
|
const tanAngle = Math.tan(angle);
|
|
1098
1098
|
try {
|
|
1099
1099
|
const polygon = extractPolygon(w);
|
package/dist/core.cjs
CHANGED
|
@@ -3,8 +3,8 @@ const require_shapeTypes = require("./shapeTypes-Bfw136X-.cjs");
|
|
|
3
3
|
const require_errors = require("./errors-CXRNVCec.cjs");
|
|
4
4
|
const require_constants = require("./constants-BNP_xnBN.cjs");
|
|
5
5
|
const require_types = require("./types-gLi9wL0N.cjs");
|
|
6
|
-
const require_vecOps = require("./vecOps-
|
|
7
|
-
const require_planeOps = require("./planeOps-
|
|
6
|
+
const require_vecOps = require("./vecOps-CODplJp3.cjs");
|
|
7
|
+
const require_planeOps = require("./planeOps-BJOIbn4K.cjs");
|
|
8
8
|
exports.BrepBugError = require_errors.BrepBugError;
|
|
9
9
|
exports.DEG2RAD = require_constants.DEG2RAD;
|
|
10
10
|
exports.DisposalScope = require_shapeTypes.DisposalScope;
|
package/dist/core.js
CHANGED
|
@@ -2,6 +2,6 @@ import { B as createKernelHandle, C as isOrientedFace, D as manifoldShell, E as
|
|
|
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
3
|
import { n as HASH_CODE_MAX, r as RAD2DEG, t as DEG2RAD } from "./constants-csSEYddm.js";
|
|
4
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-
|
|
6
|
-
import { i as pivotPlane, n as createPlane, o as resolvePlane, s as translatePlane, t as createNamedPlane } from "./planeOps-
|
|
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-B-PCHgyB.js";
|
|
6
|
+
import { i as pivotPlane, n as createPlane, o as resolvePlane, s as translatePlane, t as createNamedPlane } from "./planeOps-sTrM3dcQ.js";
|
|
7
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 };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as DEG2RAD } from "./constants-csSEYddm.js";
|
|
2
2
|
import { n as getAtOrThrow } from "./arrayAccess-tCIbjLs5.js";
|
|
3
|
-
import { _ as samePoint, p as distance2d, u as angle2d } from "./helpers-
|
|
3
|
+
import { _ as samePoint, p as distance2d, u as angle2d } from "./helpers-CQgRNpa-.js";
|
|
4
4
|
//#region src/query/cornerFinder.ts
|
|
5
5
|
var PI_2 = 2 * Math.PI;
|
|
6
6
|
function positiveHalfAngle(angle) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_constants = require("./constants-BNP_xnBN.cjs");
|
|
2
2
|
const require_arrayAccess = require("./arrayAccess-DsnQpdSD.cjs");
|
|
3
|
-
const require_helpers = require("./helpers-
|
|
3
|
+
const require_helpers = require("./helpers-Csx69_Wn.cjs");
|
|
4
4
|
//#region src/query/cornerFinder.ts
|
|
5
5
|
var PI_2 = 2 * Math.PI;
|
|
6
6
|
function positiveHalfAngle(angle) {
|
|
@@ -34,17 +34,17 @@ const require_errors = require("./errors-CXRNVCec.cjs");
|
|
|
34
34
|
const require_faceFns = require("./faceFns-CKL9Us23.cjs");
|
|
35
35
|
const require_constants = require("./constants-BNP_xnBN.cjs");
|
|
36
36
|
const require_types = require("./types-gLi9wL0N.cjs");
|
|
37
|
-
const require_vecOps = require("./vecOps-
|
|
38
|
-
const require_planeOps = require("./planeOps-
|
|
37
|
+
const require_vecOps = require("./vecOps-CODplJp3.cjs");
|
|
38
|
+
const require_planeOps = require("./planeOps-BJOIbn4K.cjs");
|
|
39
39
|
const require_curveFns = require("./curveFns-Bukd9jhv.cjs");
|
|
40
40
|
const require_arrayAccess = require("./arrayAccess-DsnQpdSD.cjs");
|
|
41
41
|
const require_surfaceBuilders = require("./surfaceBuilders-DzTJA3fK.cjs");
|
|
42
|
-
const require_boolean2D = require("./boolean2D-
|
|
43
|
-
const require_helpers = require("./helpers-
|
|
44
|
-
const require_blueprint = require("./blueprint-
|
|
42
|
+
const require_boolean2D = require("./boolean2D-BuF_1i4D.cjs");
|
|
43
|
+
const require_helpers = require("./helpers-Csx69_Wn.cjs");
|
|
44
|
+
const require_blueprint = require("./blueprint-DP00ES4B.cjs");
|
|
45
45
|
const require_solidBuilders = require("./solidBuilders-DI9d6ZIx.cjs");
|
|
46
|
-
const require_cornerFinder = require("./cornerFinder-
|
|
47
|
-
const require_extrudeFns = require("./extrudeFns-
|
|
46
|
+
const require_cornerFinder = require("./cornerFinder-t0r0NiIf.cjs");
|
|
47
|
+
const require_extrudeFns = require("./extrudeFns-BQ9mhxB3.cjs");
|
|
48
48
|
let opentype_js = require("opentype.js");
|
|
49
49
|
opentype_js = __toESM(opentype_js);
|
|
50
50
|
//#region src/2d/lib/stitching.ts
|
|
@@ -3,17 +3,17 @@ import { A as ok, R as unwrap, T as isOk, b as err, d as validationError, h as b
|
|
|
3
3
|
import { M as cast, N as downcast, b as getEdges, c as normalAt, l as outerWire, n as faceCenter } from "./faceFns-DMFG-piP.js";
|
|
4
4
|
import { t as DEG2RAD } from "./constants-csSEYddm.js";
|
|
5
5
|
import { r as toVec3 } from "./types--GD-LVc6.js";
|
|
6
|
-
import { c as vecLength, d as vecNormalize, g as vecSub, h as vecScale, m as vecRotate, r as vecCross } from "./vecOps-
|
|
7
|
-
import { a as planeToWorld, o as resolvePlane } from "./planeOps-
|
|
6
|
+
import { c as vecLength, d as vecNormalize, g as vecSub, h as vecScale, m as vecRotate, r as vecCross } from "./vecOps-B-PCHgyB.js";
|
|
7
|
+
import { a as planeToWorld, o as resolvePlane } from "./planeOps-sTrM3dcQ.js";
|
|
8
8
|
import { m as offsetWire2D } from "./curveFns-Dn4gbNzG.js";
|
|
9
9
|
import { n as getAtOrThrow, r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-tCIbjLs5.js";
|
|
10
10
|
import { c as makeBSplineApproximation, d as makeEllipse, p as makeHelix, r as makeFace, s as assembleWire, t as addHolesInFace, u as makeCircle } from "./surfaceBuilders-Im6Xef27.js";
|
|
11
|
-
import { S as Flatbush, _ as Blueprints, b as make2dOffset, c as roundedRectangleBlueprint, f as Sketch, g as CompoundBlueprint, h as organiseBlueprints, l as BaseSketcher2d, n as fuse2D, r as intersect2D, s as polysidesBlueprint, t as cut2D, u as BlueprintSketcher, v as chamferCurves, x as intersectCurves, y as filletCurves } from "./boolean2D-
|
|
12
|
-
import { _ as samePoint$1, b as subtract2d, c as PRECISION_OFFSET, l as add2d, y as squareDistance2d } from "./helpers-
|
|
13
|
-
import { _ as Curve2D, a as edgeToCurve, c as make2dCircle, d as make2dInerpolatedBSplineCurve, f as make2dSegmentCurve, g as approximateAsSvgCompatibleCurve, i as curvesAsEdgesOnPlane, l as make2dEllipse, o as make2dArcFromCenter, t as Blueprint, v as deserializeCurve2D, y as BoundingBox2d } from "./blueprint-
|
|
11
|
+
import { S as Flatbush, _ as Blueprints, b as make2dOffset, c as roundedRectangleBlueprint, f as Sketch, g as CompoundBlueprint, h as organiseBlueprints, l as BaseSketcher2d, n as fuse2D, r as intersect2D, s as polysidesBlueprint, t as cut2D, u as BlueprintSketcher, v as chamferCurves, x as intersectCurves, y as filletCurves } from "./boolean2D-w_JU3qA6.js";
|
|
12
|
+
import { _ as samePoint$1, b as subtract2d, c as PRECISION_OFFSET, l as add2d, y as squareDistance2d } from "./helpers-CQgRNpa-.js";
|
|
13
|
+
import { _ as Curve2D, a as edgeToCurve, c as make2dCircle, d as make2dInerpolatedBSplineCurve, f as make2dSegmentCurve, g as approximateAsSvgCompatibleCurve, i as curvesAsEdgesOnPlane, l as make2dEllipse, o as make2dArcFromCenter, t as Blueprint, v as deserializeCurve2D, y as BoundingBox2d } from "./blueprint-Q1M0Jh2U.js";
|
|
14
14
|
import { o as makeSolid, t as makeCompound } from "./solidBuilders-CQipZFOw.js";
|
|
15
|
-
import { t as cornerFinder } from "./cornerFinder-
|
|
16
|
-
import { i as complexExtrude, l as twistExtrude, r as revolve, t as extrude } from "./extrudeFns-
|
|
15
|
+
import { t as cornerFinder } from "./cornerFinder-CNpqIRvK.js";
|
|
16
|
+
import { i as complexExtrude, l as twistExtrude, r as revolve, t as extrude } from "./extrudeFns-yCZ6ZNQy.js";
|
|
17
17
|
import opentype from "opentype.js";
|
|
18
18
|
//#region src/2d/lib/stitching.ts
|
|
19
19
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_shapeTypes = require("./shapeTypes-Bfw136X-.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXRNVCec.cjs");
|
|
3
|
-
const require_vecOps = require("./vecOps-
|
|
3
|
+
const require_vecOps = require("./vecOps-CODplJp3.cjs");
|
|
4
4
|
//#region src/operations/extrudeUtils.ts
|
|
5
5
|
/**
|
|
6
6
|
* Build an kernel scaling law from an extrusion profile configuration.
|
|
@@ -114,7 +114,7 @@ function supportExtrude(wire, center, normal, support) {
|
|
|
114
114
|
*/
|
|
115
115
|
function complexExtrude(wire, center, normal, profileShape, shellMode = false) {
|
|
116
116
|
const extrusionLength = require_vecOps.vecLength(normal);
|
|
117
|
-
if (extrusionLength
|
|
117
|
+
if (extrusionLength < 1e-10) return require_errors.err(require_errors.validationError("ZERO_LENGTH_EXTRUSION", "Extrusion vector cannot have zero length"));
|
|
118
118
|
return sweep(wire, makeSpineWire(center, require_vecOps.vecAdd(center, normal)), { law: profileShape ? require_errors.unwrap(buildLawFromProfile(extrusionLength, profileShape)) : null }, shellMode);
|
|
119
119
|
}
|
|
120
120
|
/**
|
|
@@ -133,9 +133,9 @@ function complexExtrude(wire, center, normal, profileShape, shellMode = false) {
|
|
|
133
133
|
* @returns `Result` containing the twisted extruded shape or a shell tuple.
|
|
134
134
|
*/
|
|
135
135
|
function twistExtrude(wire, angleDegrees, center, normal, profileShape, shellMode = false) {
|
|
136
|
-
if (angleDegrees
|
|
136
|
+
if (Math.abs(angleDegrees) < 1e-10) return require_errors.err(require_errors.validationError("ZERO_TWIST_ANGLE", "Twist angle cannot be zero"));
|
|
137
137
|
const extrusionLength = require_vecOps.vecLength(normal);
|
|
138
|
-
if (extrusionLength
|
|
138
|
+
if (extrusionLength < 1e-10) return require_errors.err(require_errors.validationError("ZERO_LENGTH_EXTRUSION", "Extrusion vector cannot have zero length"));
|
|
139
139
|
return sweep(wire, makeSpineWire(center, require_vecOps.vecAdd(center, normal)), {
|
|
140
140
|
auxiliarySpine: makeHelixWire(360 / angleDegrees * extrusionLength, extrusionLength, 1, center, normal),
|
|
141
141
|
law: profileShape ? require_errors.unwrap(buildLawFromProfile(extrusionLength, profileShape)) : null
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { X as getKernel, c as createSolid, h as isShape3D, t as castShape, y as isWire } from "./shapeTypes-Ct7W6h2X.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 } from "./errors-DboJwVCf.js";
|
|
3
|
-
import { c as vecLength, d as vecNormalize, t as vecAdd } from "./vecOps-
|
|
3
|
+
import { c as vecLength, d as vecNormalize, t as vecAdd } from "./vecOps-B-PCHgyB.js";
|
|
4
4
|
//#region src/operations/extrudeUtils.ts
|
|
5
5
|
/**
|
|
6
6
|
* Build an kernel scaling law from an extrusion profile configuration.
|
|
@@ -114,7 +114,7 @@ function supportExtrude(wire, center, normal, support) {
|
|
|
114
114
|
*/
|
|
115
115
|
function complexExtrude(wire, center, normal, profileShape, shellMode = false) {
|
|
116
116
|
const extrusionLength = vecLength(normal);
|
|
117
|
-
if (extrusionLength
|
|
117
|
+
if (extrusionLength < 1e-10) return err(validationError("ZERO_LENGTH_EXTRUSION", "Extrusion vector cannot have zero length"));
|
|
118
118
|
return sweep(wire, makeSpineWire(center, vecAdd(center, normal)), { law: profileShape ? unwrap(buildLawFromProfile(extrusionLength, profileShape)) : null }, shellMode);
|
|
119
119
|
}
|
|
120
120
|
/**
|
|
@@ -133,9 +133,9 @@ function complexExtrude(wire, center, normal, profileShape, shellMode = false) {
|
|
|
133
133
|
* @returns `Result` containing the twisted extruded shape or a shell tuple.
|
|
134
134
|
*/
|
|
135
135
|
function twistExtrude(wire, angleDegrees, center, normal, profileShape, shellMode = false) {
|
|
136
|
-
if (angleDegrees
|
|
136
|
+
if (Math.abs(angleDegrees) < 1e-10) return err(validationError("ZERO_TWIST_ANGLE", "Twist angle cannot be zero"));
|
|
137
137
|
const extrusionLength = vecLength(normal);
|
|
138
|
-
if (extrusionLength
|
|
138
|
+
if (extrusionLength < 1e-10) return err(validationError("ZERO_LENGTH_EXTRUSION", "Extrusion vector cannot have zero length"));
|
|
139
139
|
return sweep(wire, makeSpineWire(center, vecAdd(center, normal)), {
|
|
140
140
|
auxiliarySpine: makeHelixWire(360 / angleDegrees * extrusionLength, extrusionLength, 1, center, normal),
|
|
141
141
|
law: profileShape ? unwrap(buildLawFromProfile(extrusionLength, profileShape)) : null
|
|
@@ -2,7 +2,7 @@ import { X as getKernel, p as isFace } from "./shapeTypes-Ct7W6h2X.js";
|
|
|
2
2
|
import { A as ok, R as unwrap, T as isOk, b as err, h as bug, o as queryError } from "./errors-DboJwVCf.js";
|
|
3
3
|
import { C as getVertices, b as getEdges, c as normalAt, o as getSurfaceType, w as getWires, x as getFaces } from "./faceFns-DMFG-piP.js";
|
|
4
4
|
import { t as DEG2RAD } from "./constants-csSEYddm.js";
|
|
5
|
-
import { a as vecDot, d as vecNormalize } from "./vecOps-
|
|
5
|
+
import { a as vecDot, d as vecNormalize } from "./vecOps-B-PCHgyB.js";
|
|
6
6
|
import { a as isSameShape, n as getHashCode } from "./shapeFns-QGgHStIU.js";
|
|
7
7
|
import { a as curveLength, d as getCurveType, r as curveIsClosed } from "./curveFns-Dn4gbNzG.js";
|
|
8
8
|
import { n as measureArea } from "./measureFns-Zc5RWsI4.js";
|
|
@@ -2,7 +2,7 @@ const require_shapeTypes = require("./shapeTypes-Bfw136X-.cjs");
|
|
|
2
2
|
const require_errors = require("./errors-CXRNVCec.cjs");
|
|
3
3
|
const require_faceFns = require("./faceFns-CKL9Us23.cjs");
|
|
4
4
|
const require_constants = require("./constants-BNP_xnBN.cjs");
|
|
5
|
-
const require_vecOps = require("./vecOps-
|
|
5
|
+
const require_vecOps = require("./vecOps-CODplJp3.cjs");
|
|
6
6
|
const require_shapeFns = require("./shapeFns-DkFzoJav.cjs");
|
|
7
7
|
const require_curveFns = require("./curveFns-Bukd9jhv.cjs");
|
|
8
8
|
const require_measureFns = require("./measureFns-C2SnZLhD.cjs");
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
const require_shapeTypes = require("./shapeTypes-Bfw136X-.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXRNVCec.cjs");
|
|
3
3
|
const require_faceFns = require("./faceFns-CKL9Us23.cjs");
|
|
4
|
-
const require_vecOps = require("./vecOps-
|
|
4
|
+
const require_vecOps = require("./vecOps-CODplJp3.cjs");
|
|
5
5
|
const require_shapeFns = require("./shapeFns-DkFzoJav.cjs");
|
|
6
|
-
const require_booleanFns = require("./booleanFns-
|
|
6
|
+
const require_booleanFns = require("./booleanFns-CQNV8MMq.cjs");
|
|
7
7
|
//#region src/utils/uuid.ts
|
|
8
8
|
/** Generate a v4-style UUID string using `crypto.getRandomValues`. */
|
|
9
9
|
function uuidv() {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { B as createKernelHandle, X as getKernel, t as castShape } from "./shapeTypes-Ct7W6h2X.js";
|
|
2
2
|
import { A as ok, b as err, d as validationError, n as computationError, r as ioError } from "./errors-DboJwVCf.js";
|
|
3
3
|
import { P as fromBREP } from "./faceFns-DMFG-piP.js";
|
|
4
|
-
import { d as vecNormalize, s as vecIsZero } from "./vecOps-
|
|
4
|
+
import { d as vecNormalize, s as vecIsZero } from "./vecOps-B-PCHgyB.js";
|
|
5
5
|
import { s as toBREP } from "./shapeFns-QGgHStIU.js";
|
|
6
|
-
import { a as fuseAll } from "./booleanFns-
|
|
6
|
+
import { a as fuseAll } from "./booleanFns-D_DVbfzR.js";
|
|
7
7
|
//#region src/utils/uuid.ts
|
|
8
8
|
/** Generate a v4-style UUID string using `crypto.getRandomValues`. */
|
|
9
9
|
function uuidv() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { X as getKernel, t as castShape } from "./shapeTypes-Ct7W6h2X.js";
|
|
2
2
|
import { A as ok, b as err, r as ioError, t as BrepErrorCode } from "./errors-DboJwVCf.js";
|
|
3
3
|
import { n as getAtOrThrow } from "./arrayAccess-tCIbjLs5.js";
|
|
4
|
-
import { f as make2dSegmentCurve, m as make2dThreePointArc, s as make2dBezierCurve, t as Blueprint } from "./blueprint-
|
|
4
|
+
import { f as make2dSegmentCurve, m as make2dThreePointArc, s as make2dBezierCurve, t as Blueprint } from "./blueprint-Q1M0Jh2U.js";
|
|
5
5
|
//#region src/io/objExportFns.ts
|
|
6
6
|
/** Read a vec3 from a typed array at the given vertex index. */
|
|
7
7
|
function vec3At(arr, i) {
|
|
@@ -1047,7 +1047,7 @@ function handleArc(args, cursor, isRelative, curves) {
|
|
|
1047
1047
|
}
|
|
1048
1048
|
}
|
|
1049
1049
|
function handleClosePath(cursor, curves) {
|
|
1050
|
-
if (cursor.cx
|
|
1050
|
+
if (Math.abs(cursor.cx - cursor.sx) > 1e-10 || Math.abs(cursor.cy - cursor.sy) > 1e-10) curves.push(make2dSegmentCurve(flipY([cursor.cx, cursor.cy]), flipY([cursor.sx, cursor.sy])));
|
|
1051
1051
|
cursor.cx = cursor.sx;
|
|
1052
1052
|
cursor.cy = cursor.sy;
|
|
1053
1053
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_shapeTypes = require("./shapeTypes-Bfw136X-.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXRNVCec.cjs");
|
|
3
3
|
const require_arrayAccess = require("./arrayAccess-DsnQpdSD.cjs");
|
|
4
|
-
const require_blueprint = require("./blueprint-
|
|
4
|
+
const require_blueprint = require("./blueprint-DP00ES4B.cjs");
|
|
5
5
|
//#region src/io/objExportFns.ts
|
|
6
6
|
/** Read a vec3 from a typed array at the given vertex index. */
|
|
7
7
|
function vec3At(arr, i) {
|
|
@@ -1047,7 +1047,7 @@ function handleArc(args, cursor, isRelative, curves) {
|
|
|
1047
1047
|
}
|
|
1048
1048
|
}
|
|
1049
1049
|
function handleClosePath(cursor, curves) {
|
|
1050
|
-
if (cursor.cx
|
|
1050
|
+
if (Math.abs(cursor.cx - cursor.sx) > 1e-10 || Math.abs(cursor.cy - cursor.sy) > 1e-10) curves.push(require_blueprint.make2dSegmentCurve(flipY([cursor.cx, cursor.cy]), flipY([cursor.sx, cursor.sy])));
|
|
1051
1051
|
cursor.cx = cursor.sx;
|
|
1052
1052
|
cursor.cy = cursor.sy;
|
|
1053
1053
|
}
|
package/dist/io.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_meshFns = require("./meshFns-CO9qVJ24.cjs");
|
|
3
|
-
const require_importFns = require("./importFns-
|
|
3
|
+
const require_importFns = require("./importFns-m2IJXUsB.cjs");
|
|
4
4
|
exports.blueprintToDXF = require_importFns.blueprintToDXF;
|
|
5
5
|
exports.exportDXF = require_importFns.exportDXF;
|
|
6
6
|
exports.exportGlb = require_importFns.exportGlb;
|
package/dist/io.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { n as exportSTEP, r as exportSTL, t as exportIGES } from "./meshFns-gTPomZkK.js";
|
|
2
|
-
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-
|
|
2
|
+
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-CcTs485L.js";
|
|
3
3
|
export { blueprintToDXF, exportDXF, exportGlb, exportGltf, exportIGES, exportOBJ, exportSTEP, exportSTEPConfigured, exportSTL, exportThreeMF, importIGES, importSTEP, importSTL, importSVG, importSVGPathD };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"roofFns.d.ts","sourceRoot":"","sources":["../../src/operations/roofFns.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAQ,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"roofFns.d.ts","sourceRoot":"","sources":["../../src/operations/roofFns.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAQ,MAAM,sBAAsB,CAAC;AAGxE,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAEtE,OAAO,EAAE,KAAK,MAAM,EAAW,MAAM,kBAAkB,CAAC;AAWxD,MAAM,WAAW,WAAW;IAC1B,iDAAiD;IACjD,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB;AAgLD;;;;;;;GAOG;AACH,wBAAgB,IAAI,CAClB,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,GAAG,UAAU,CAAC,SAAS,CAAC,EAChD,OAAO,CAAC,EAAE,WAAW,GACpB,MAAM,CAAC,UAAU,CAAC,CAmEpB"}
|
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-DBSgZGtF.cjs");
|
|
3
|
+
const require_extrudeFns = require("./extrudeFns-BQ9mhxB3.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-DltXL-vp.js";
|
|
2
|
+
import { c as sweep, i as complexExtrude, l as twistExtrude, s as supportExtrude } from "./extrudeFns-yCZ6ZNQy.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,7 +1,7 @@
|
|
|
1
1
|
const require_errors = require("./errors-CXRNVCec.cjs");
|
|
2
2
|
const require_constants = require("./constants-BNP_xnBN.cjs");
|
|
3
3
|
const require_types = require("./types-gLi9wL0N.cjs");
|
|
4
|
-
const require_vecOps = require("./vecOps-
|
|
4
|
+
const require_vecOps = require("./vecOps-CODplJp3.cjs");
|
|
5
5
|
//#region src/core/planeOps.ts
|
|
6
6
|
/**
|
|
7
7
|
* Create a {@link Plane} from an origin, optional X direction, and a normal.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { A as ok, R as unwrap, b as err, d as validationError } from "./errors-DboJwVCf.js";
|
|
2
2
|
import { t as DEG2RAD } from "./constants-csSEYddm.js";
|
|
3
3
|
import { r as toVec3 } from "./types--GD-LVc6.js";
|
|
4
|
-
import { d as vecNormalize, h as vecScale, m as vecRotate, r as vecCross, s as vecIsZero, t as vecAdd } from "./vecOps-
|
|
4
|
+
import { d as vecNormalize, h as vecScale, m as vecRotate, r as vecCross, s as vecIsZero, t as vecAdd } from "./vecOps-B-PCHgyB.js";
|
|
5
5
|
//#region src/core/planeOps.ts
|
|
6
6
|
/**
|
|
7
7
|
* Create a {@link Plane} from an origin, optional X direction, and a normal.
|
|
@@ -857,7 +857,7 @@ function shell(shape, faces, thickness, tolerance = .001, { trackEvolution = tru
|
|
|
857
857
|
function offset(shape, distance, tolerance = 1e-6) {
|
|
858
858
|
const check = validateNotNull(shape, "offset: shape");
|
|
859
859
|
if (require_errors.isErr(check)) return check;
|
|
860
|
-
if (distance
|
|
860
|
+
if (Math.abs(distance) < 1e-10) return require_errors.err(require_errors.validationError("ZERO_OFFSET", "Offset distance cannot be zero"));
|
|
861
861
|
try {
|
|
862
862
|
const inputFaceHashes = require_shapeFns.collectInputFaceHashes([shape]);
|
|
863
863
|
const { shape: resultShape, evolution } = require_shapeTypes.getKernel().offsetWithHistory(shape.wrapped, distance, inputFaceHashes, require_constants.HASH_CODE_MAX, tolerance);
|
|
@@ -886,7 +886,7 @@ function draft(shape, faces, pullDirection, neutralPlane, angle) {
|
|
|
886
886
|
const check = validateNotNull(shape, "draft: shape");
|
|
887
887
|
if (require_errors.isErr(check)) return check;
|
|
888
888
|
if (typeof angle === "number") {
|
|
889
|
-
if (angle
|
|
889
|
+
if (Math.abs(angle) < 1e-10) return require_errors.err(require_errors.validationError(require_errors.BrepErrorCode.DRAFT_INVALID_ANGLE, "Draft angle cannot be zero", void 0, void 0, "Provide a non-zero angle in degrees"));
|
|
890
890
|
if (Math.abs(angle) >= 90) return require_errors.err(require_errors.validationError(require_errors.BrepErrorCode.DRAFT_INVALID_ANGLE, "Draft angle must be between -90 and 90 degrees (exclusive)", void 0, void 0, "Typical draft angles are 1-5 degrees for injection molding"));
|
|
891
891
|
}
|
|
892
892
|
if (faces.length === 0) return require_errors.err(require_errors.validationError(require_errors.BrepErrorCode.DRAFT_NO_FACES, "No faces specified for draft", void 0, void 0, "Select at least one face to apply the draft angle to"));
|
|
@@ -857,7 +857,7 @@ function shell(shape, faces, thickness, tolerance = .001, { trackEvolution = tru
|
|
|
857
857
|
function offset(shape, distance, tolerance = 1e-6) {
|
|
858
858
|
const check = validateNotNull(shape, "offset: shape");
|
|
859
859
|
if (isErr(check)) return check;
|
|
860
|
-
if (distance
|
|
860
|
+
if (Math.abs(distance) < 1e-10) return err(validationError("ZERO_OFFSET", "Offset distance cannot be zero"));
|
|
861
861
|
try {
|
|
862
862
|
const inputFaceHashes = collectInputFaceHashes([shape]);
|
|
863
863
|
const { shape: resultShape, evolution } = getKernel().offsetWithHistory(shape.wrapped, distance, inputFaceHashes, HASH_CODE_MAX, tolerance);
|
|
@@ -886,7 +886,7 @@ function draft(shape, faces, pullDirection, neutralPlane, angle) {
|
|
|
886
886
|
const check = validateNotNull(shape, "draft: shape");
|
|
887
887
|
if (isErr(check)) return check;
|
|
888
888
|
if (typeof angle === "number") {
|
|
889
|
-
if (angle
|
|
889
|
+
if (Math.abs(angle) < 1e-10) return err(validationError(BrepErrorCode.DRAFT_INVALID_ANGLE, "Draft angle cannot be zero", void 0, void 0, "Provide a non-zero angle in degrees"));
|
|
890
890
|
if (Math.abs(angle) >= 90) return err(validationError(BrepErrorCode.DRAFT_INVALID_ANGLE, "Draft angle must be between -90 and 90 degrees (exclusive)", void 0, void 0, "Typical draft angles are 1-5 degrees for injection molding"));
|
|
891
891
|
}
|
|
892
892
|
if (faces.length === 0) return err(validationError(BrepErrorCode.DRAFT_NO_FACES, "No faces specified for draft", void 0, void 0, "Select at least one face to apply the draft angle to"));
|
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-Csx69_Wn.cjs");
|
|
3
|
+
const require_cornerFinder = require("./cornerFinder-t0r0NiIf.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-CQgRNpa-.js";
|
|
2
|
+
import { t as cornerFinder } from "./cornerFinder-CNpqIRvK.js";
|
|
3
3
|
export { cornerFinder, edgeFinder, faceFinder, getSingleFace };
|
package/dist/sketching.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_drawFns = require("./drawFns-
|
|
3
|
-
const require_boolean2D = require("./boolean2D-
|
|
2
|
+
const require_drawFns = require("./drawFns-Bk7kfVmD.cjs");
|
|
3
|
+
const require_boolean2D = require("./boolean2D-BuF_1i4D.cjs");
|
|
4
4
|
//#region src/sketching.ts
|
|
5
5
|
/**
|
|
6
6
|
* brepjs/sketching — Sketcher, Drawing, and sketch-to-shape operations.
|
package/dist/sketching.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as FaceSketcher, f as Sketch, l as BaseSketcher2d, u as BlueprintSketcher } from "./boolean2D-
|
|
2
|
-
import { $ as sketchFaceOffset, A as DrawingPen, B as drawSingleCircle, F as drawParametricFunction, H as drawText, I as drawPointsInterpolation, L as drawPolysides, M as draw, N as drawCircle, P as drawEllipse, Q as sketchEllipse, R as drawRectangle, S as drawProjection, V as drawSingleEllipse, X as polysideInnerRadius, Y as makeBaseBox, Z as sketchCircle, _ as sketchLoft, a as drawingIntersect, at as Sketcher, 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, k as Drawing, l as scaleDrawing, m as compoundSketchRevolve, n as drawingCut, nt as sketchPolysides, o as drawingToSketchOnPlane, ot as Sketches, p as compoundSketchLoft, r as drawingFillet, rt as sketchRectangle, s as mirrorDrawing, st as CompoundSketch, t as drawingChamfer, tt as sketchParametricFunction, u as translateDrawing, v as sketchRevolve, x as drawFaceOutline, y as sketchSweep, z as drawRoundedRectangle } from "./drawFns-
|
|
1
|
+
import { d as FaceSketcher, f as Sketch, l as BaseSketcher2d, u as BlueprintSketcher } from "./boolean2D-w_JU3qA6.js";
|
|
2
|
+
import { $ as sketchFaceOffset, A as DrawingPen, B as drawSingleCircle, F as drawParametricFunction, H as drawText, I as drawPointsInterpolation, L as drawPolysides, M as draw, N as drawCircle, P as drawEllipse, Q as sketchEllipse, R as drawRectangle, S as drawProjection, V as drawSingleEllipse, X as polysideInnerRadius, Y as makeBaseBox, Z as sketchCircle, _ as sketchLoft, a as drawingIntersect, at as Sketcher, 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, k as Drawing, l as scaleDrawing, m as compoundSketchRevolve, n as drawingCut, nt as sketchPolysides, o as drawingToSketchOnPlane, ot as Sketches, p as compoundSketchLoft, r as drawingFillet, rt as sketchRectangle, s as mirrorDrawing, st as CompoundSketch, t as drawingChamfer, tt as sketchParametricFunction, u as translateDrawing, v as sketchRevolve, x as drawFaceOutline, y as sketchSweep, z as drawRoundedRectangle } from "./drawFns-CNPmD8PK.js";
|
|
3
3
|
//#region src/sketching.ts
|
|
4
4
|
/**
|
|
5
5
|
* brepjs/sketching — Sketcher, Drawing, and sketch-to-shape operations.
|
package/dist/topology.cjs
CHANGED
|
@@ -3,8 +3,8 @@ const require_faceFns = require("./faceFns-CKL9Us23.cjs");
|
|
|
3
3
|
const require_shapeFns = require("./shapeFns-DkFzoJav.cjs");
|
|
4
4
|
const require_curveFns = require("./curveFns-Bukd9jhv.cjs");
|
|
5
5
|
const require_meshFns = require("./meshFns-CO9qVJ24.cjs");
|
|
6
|
-
const require_booleanFns = require("./booleanFns-
|
|
7
|
-
const require_primitiveFns = require("./primitiveFns-
|
|
6
|
+
const require_booleanFns = require("./booleanFns-CQNV8MMq.cjs");
|
|
7
|
+
const require_primitiveFns = require("./primitiveFns-CVcoZURM.cjs");
|
|
8
8
|
exports.addHoles = require_primitiveFns.addHoles;
|
|
9
9
|
exports.adjacentFaces = require_primitiveFns.adjacentFaces;
|
|
10
10
|
exports.approximateCurve = require_curveFns.approximateCurve;
|
package/dist/topology.js
CHANGED
|
@@ -2,6 +2,6 @@ import { A as vertexPosition, C as getVertices, D as iterFaces, E as iterEdges,
|
|
|
2
2
|
import { a as isSameShape, i as isEqualShape, n as getHashCode } from "./shapeFns-QGgHStIU.js";
|
|
3
3
|
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-Dn4gbNzG.js";
|
|
4
4
|
import { c as createMeshCache, n as exportSTEP, r as exportSTL, s as clearMeshCache, t as exportIGES } from "./meshFns-gTPomZkK.js";
|
|
5
|
-
import { a as fuseAll, r as cutAll } from "./booleanFns-
|
|
6
|
-
import { $ as getNurbsSurfaceData, A as fixShape, C as threePointArc, D as wireLoop, E as wire, G as chamferWithEvolution, I as solidFromShell, J as fuseWithEvolution, K as cutWithEvolution, M as healFace, N as healSolid, O as autoHeal, P as healWire, Q as getNurbsCurveData, S as tangentArc, T as vertex, U as variableFillet, 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, k as fixSelfIntersection, l as ellipse, 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 } from "./primitiveFns-
|
|
5
|
+
import { a as fuseAll, r as cutAll } from "./booleanFns-D_DVbfzR.js";
|
|
6
|
+
import { $ as getNurbsSurfaceData, A as fixShape, C as threePointArc, D as wireLoop, E as wire, G as chamferWithEvolution, I as solidFromShell, J as fuseWithEvolution, K as cutWithEvolution, M as healFace, N as healSolid, O as autoHeal, P as healWire, Q as getNurbsCurveData, S as tangentArc, T as vertex, U as variableFillet, 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, k as fixSelfIntersection, l as ellipse, 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 } from "./primitiveFns-DZBVfdNl.js";
|
|
7
7
|
export { addHoles, adjacentFaces, approximateCurve, asTopo, autoHeal, bezier, box, bsplineApprox, cast, chamferDistAngle as chamferDistAngleShape, chamferWithEvolution, checkBoolean, circle, classifyPointOnFace, clearMeshCache, compound, cone, createMeshCache, curveEndPoint, curveIsClosed, curveIsPeriodic, curveLength, curvePeriod, curvePointAt, curveStartPoint, curveTangentAt, cutAll, cutWithEvolution, cylinder, fromBREP as deserializeShape, downcast, edgesOfFace, ellipse, ellipseArc, ellipsoid, exportIGES, exportSTEP, exportSTL, face, faceCenter, faceGeomType, faceOrientation, facesOfEdge, filledFace, filletWithEvolution, fixSelfIntersection, fixShape, flipFaceOrientation, flipOrientation, fuseAll, fuseWithEvolution, getBounds, getCurveType, getEdges, getFaces, getHashCode, getNurbsCurveData, getNurbsSurfaceData, getOrientation, getSurfaceType, getVertices, getWires, healFace, healSolid, healWire, helix, innerWires, interpolateCurve, intersectWithEvolution, invalidateShapeCache, isCompSolid, isEqualShape, isSameShape, iterEdges, iterFaces, iterTopo, iterVertices, iterWires, line, normalAt, offsetFace, offsetWire2D, outerWire, pointOnSurface, polygon, positionOnCurve, projectPointOnFace, sewShells, shapeType, sharedEdges, shellWithEvolution, solid, solidFromShell, sphere, subFace, tangentArc, threePointArc, toBufferGeometryData, toGroupedBufferGeometryData, toLineGeometryData, torus, uvBounds, uvCoordinates, variableFillet, vertex, vertexPosition, verticesOfEdge, wire, wireLoop, wiresOfFace };
|
|
@@ -96,7 +96,7 @@ function vecAngle(a, b) {
|
|
|
96
96
|
const dot = vecDot(a, b);
|
|
97
97
|
const lenA = vecLength(a);
|
|
98
98
|
const lenB = vecLength(b);
|
|
99
|
-
if (lenA
|
|
99
|
+
if (lenA < 1e-10 || lenB < 1e-10) return 0;
|
|
100
100
|
const cosAngle = Math.max(-1, Math.min(1, dot / (lenA * lenB)));
|
|
101
101
|
return Math.acos(cosAngle);
|
|
102
102
|
}
|
|
@@ -104,7 +104,7 @@ function vecAngle(a, b) {
|
|
|
104
104
|
function vecProjectToPlane(v, planeOrigin, planeNormal) {
|
|
105
105
|
const relative = vecSub(v, planeOrigin);
|
|
106
106
|
const normalLen = vecLengthSq(planeNormal);
|
|
107
|
-
if (normalLen
|
|
107
|
+
if (normalLen < 1e-20) return v;
|
|
108
108
|
return vecSub(v, vecScale(planeNormal, vecDot(relative, planeNormal) / normalLen));
|
|
109
109
|
}
|
|
110
110
|
/** Rotate vector around an axis by angle (radians) */
|
|
@@ -96,7 +96,7 @@ function vecAngle(a, b) {
|
|
|
96
96
|
const dot = vecDot(a, b);
|
|
97
97
|
const lenA = vecLength(a);
|
|
98
98
|
const lenB = vecLength(b);
|
|
99
|
-
if (lenA
|
|
99
|
+
if (lenA < 1e-10 || lenB < 1e-10) return 0;
|
|
100
100
|
const cosAngle = Math.max(-1, Math.min(1, dot / (lenA * lenB)));
|
|
101
101
|
return Math.acos(cosAngle);
|
|
102
102
|
}
|
|
@@ -104,7 +104,7 @@ function vecAngle(a, b) {
|
|
|
104
104
|
function vecProjectToPlane(v, planeOrigin, planeNormal) {
|
|
105
105
|
const relative = vecSub(v, planeOrigin);
|
|
106
106
|
const normalLen = vecLengthSq(planeNormal);
|
|
107
|
-
if (normalLen
|
|
107
|
+
if (normalLen < 1e-20) return v;
|
|
108
108
|
return vecSub(v, vecScale(planeNormal, vecDot(relative, planeNormal) / normalLen));
|
|
109
109
|
}
|
|
110
110
|
/** Rotate vector around an axis by angle (radians) */
|
package/dist/vectors.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_constants = require("./constants-BNP_xnBN.cjs");
|
|
3
3
|
const require_types = require("./types-gLi9wL0N.cjs");
|
|
4
|
-
const require_vecOps = require("./vecOps-
|
|
5
|
-
const require_planeOps = require("./planeOps-
|
|
4
|
+
const require_vecOps = require("./vecOps-CODplJp3.cjs");
|
|
5
|
+
const require_planeOps = require("./planeOps-BJOIbn4K.cjs");
|
|
6
6
|
exports.DEG2RAD = require_constants.DEG2RAD;
|
|
7
7
|
exports.RAD2DEG = require_constants.RAD2DEG;
|
|
8
8
|
exports.createNamedPlane = require_planeOps.createNamedPlane;
|
package/dist/vectors.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as RAD2DEG, t as DEG2RAD } from "./constants-csSEYddm.js";
|
|
2
2
|
import { n as toVec2, r as toVec3, t as resolveDirection } from "./types--GD-LVc6.js";
|
|
3
|
-
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-
|
|
4
|
-
import { i as pivotPlane, n as createPlane, o as resolvePlane, s as translatePlane, t as createNamedPlane } from "./planeOps-
|
|
3
|
+
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-B-PCHgyB.js";
|
|
4
|
+
import { i as pivotPlane, n as createPlane, o as resolvePlane, s as translatePlane, t as createNamedPlane } from "./planeOps-sTrM3dcQ.js";
|
|
5
5
|
export { DEG2RAD, RAD2DEG, createNamedPlane, createPlane, pivotPlane, resolveDirection, resolvePlane, toVec2, toVec3, translatePlane, vecAdd, vecAngle, vecCross, vecDistance, vecDot, vecEquals, vecIsZero, vecLength, vecLengthSq, vecNegate, vecNormalize, vecProjectToPlane, vecRepr, vecRotate, vecScale, vecSub };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "brepjs",
|
|
3
|
-
"version": "15.2.
|
|
3
|
+
"version": "15.2.6",
|
|
4
4
|
"description": "Web CAD library with pluggable geometry kernel",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cad",
|
|
@@ -219,19 +219,19 @@
|
|
|
219
219
|
"@types/opentype.js": "1.3.9",
|
|
220
220
|
"@vitest/coverage-v8": "4.1.2",
|
|
221
221
|
"brepjs-opencascade": "*",
|
|
222
|
-
"brepkit-wasm": "2.43.
|
|
223
|
-
"eslint": "10.
|
|
222
|
+
"brepkit-wasm": "2.43.6",
|
|
223
|
+
"eslint": "10.2.0",
|
|
224
224
|
"fast-check": "4.6.0",
|
|
225
225
|
"husky": "9.1.7",
|
|
226
|
-
"knip": "6.
|
|
226
|
+
"knip": "6.3.0",
|
|
227
227
|
"lint-staged": "16.4.0",
|
|
228
|
-
"occt-wasm": "1.
|
|
228
|
+
"occt-wasm": "1.5.0",
|
|
229
229
|
"prettier": "3.8.1",
|
|
230
230
|
"size-limit": "12.0.1",
|
|
231
231
|
"typedoc": "0.28.18",
|
|
232
232
|
"typescript": "6.0.2",
|
|
233
|
-
"typescript-eslint": "8.
|
|
234
|
-
"vite": "8.0.
|
|
233
|
+
"typescript-eslint": "8.58.0",
|
|
234
|
+
"vite": "8.0.5",
|
|
235
235
|
"vite-plugin-dts": "4.5.4",
|
|
236
236
|
"vitest": "4.1.2"
|
|
237
237
|
},
|