brepjs 13.0.0 → 13.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/2d.cjs +3 -3
- package/dist/2d.js +3 -3
- package/dist/{arrayAccess-CccV7jov.js → arrayAccess-Dps31ERU.js} +3 -3
- package/dist/{arrayAccess-BF8Hm4-H.cjs → arrayAccess-peFKE9Ob.cjs} +3 -3
- package/dist/{blueprint-mSGgCL3V.js → blueprint-DYCdRlW5.js} +8 -8
- package/dist/{blueprint-BP3P8Ado.cjs → blueprint-PLJan-W5.cjs} +8 -8
- package/dist/{blueprintFns-BQ-MP_Vy.cjs → blueprintFns-Bsx25BG7.cjs} +3 -3
- package/dist/{blueprintFns-DWFkjbDT.js → blueprintFns-eWh7NpZx.js} +3 -3
- package/dist/{boolean2D-Cqfwz60G.js → boolean2D-52qVCooY.js} +10 -10
- package/dist/{boolean2D-D76Hc7Wx.cjs → boolean2D-CtB21ajK.cjs} +10 -10
- package/dist/{booleanFns-CYPXeNVN.cjs → booleanFns-BrptUFkP.cjs} +25 -13
- package/dist/{booleanFns-B79ALtKn.js → booleanFns-iM6UPb8e.js} +25 -13
- package/dist/brepjs.cjs +43 -311
- package/dist/brepjs.js +23 -306
- package/dist/core/errors.d.ts +7 -0
- package/dist/core/errors.d.ts.map +1 -1
- package/dist/core.cjs +3 -3
- package/dist/core.js +3 -3
- package/dist/{cornerFinder-BSwshSGB.js → cornerFinder-C7aDyYLJ.js} +2 -2
- package/dist/{cornerFinder-sg0JNgux.cjs → cornerFinder-SF-xmMO1.cjs} +2 -2
- package/dist/{curveFns-D_s3LdNT.js → curveFns-C-jU1_Y_.js} +2 -2
- package/dist/{curveFns-CJjkUGyW.cjs → curveFns-ywh7Ctyk.cjs} +2 -2
- package/dist/{drawFns-oyqai_HD.js → drawFns-D-0p86Lf.js} +13 -13
- package/dist/{drawFns-0CYuQn0J.cjs → drawFns-DknEB-Qs.cjs} +13 -13
- package/dist/{errors-B1fl3mAU.js → errors-B_T0aMQF.js} +7 -0
- package/dist/{errors-C85KVJr-.cjs → errors-DupKEMqI.cjs} +7 -0
- package/dist/{extrudeFns-0kBZvqJz.cjs → extrudeFns-CGCIbydL.cjs} +2 -2
- package/dist/{extrudeFns-lDvV4ir2.js → extrudeFns-LsH1rDMa.js} +2 -2
- package/dist/{faceFns-8BurpAGN.cjs → faceFns-8dGb8q3J.cjs} +2 -2
- package/dist/{faceFns-Bne5RIvn.js → faceFns-EnGcKFAr.js} +2 -2
- package/dist/{helpers-CxexSe1n.js → helpers-Rf0vhX6I.js} +6 -6
- package/dist/{helpers-D8DIMw2U.cjs → helpers-pQpV9Mwh.cjs} +6 -6
- package/dist/{historyFns-BTeasREV.js → historyFns-XkjLAQyu.js} +5 -5
- package/dist/{historyFns-BAzQr6EP.cjs → historyFns-lNalnOdR.cjs} +5 -5
- package/dist/{importFns-D__wN_Pq.cjs → importFns-BSH9cGIp.cjs} +36 -4
- package/dist/{importFns-clldr3EF.js → importFns-Bgs-FYAP.js} +31 -5
- package/dist/index.d.ts +8 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/io/stepConfigFns.d.ts +27 -0
- package/dist/io/stepConfigFns.d.ts.map +1 -0
- package/dist/io.cjs +3 -2
- package/dist/io.d.ts +1 -0
- package/dist/io.d.ts.map +1 -1
- package/dist/io.js +3 -3
- package/dist/kernel/brepkit/booleanOps.d.ts +7 -1
- package/dist/kernel/brepkit/booleanOps.d.ts.map +1 -1
- package/dist/kernel/brepkit/brepkitAdapter.d.ts +5 -4
- package/dist/kernel/brepkit/brepkitAdapter.d.ts.map +1 -1
- package/dist/kernel/brepkit/evolutionOps.d.ts +4 -4
- package/dist/kernel/brepkit/evolutionOps.d.ts.map +1 -1
- package/dist/kernel/interfaces/booleanOps.d.ts +3 -1
- package/dist/kernel/interfaces/booleanOps.d.ts.map +1 -1
- package/dist/kernel/interfaces/evolutionOps.d.ts +4 -4
- package/dist/kernel/interfaces/evolutionOps.d.ts.map +1 -1
- package/dist/kernel/occt/booleanOps.d.ts +7 -1
- package/dist/kernel/occt/booleanOps.d.ts.map +1 -1
- package/dist/kernel/occt/defaultAdapter.d.ts +5 -4
- package/dist/kernel/occt/defaultAdapter.d.ts.map +1 -1
- package/dist/kernel/occt/evolutionOps.d.ts +2 -2
- package/dist/kernel/occt/evolutionOps.d.ts.map +1 -1
- package/dist/kernel/occt/historyOps.d.ts +4 -4
- package/dist/kernel/occt/historyOps.d.ts.map +1 -1
- package/dist/kernel/occt/wasmTypes/occtBuilders.d.ts +4 -0
- package/dist/kernel/occt/wasmTypes/occtBuilders.d.ts.map +1 -1
- package/dist/kernel/types.d.ts +30 -0
- package/dist/kernel/types.d.ts.map +1 -1
- package/dist/{measureFns-DrMZGJ6r.cjs → measureFns-CFdHa_fj.cjs} +3 -3
- package/dist/{measureFns-C4WqH4OT.js → measureFns-D7J6qUY_.js} +3 -3
- package/dist/measurement.cjs +1 -1
- package/dist/measurement.js +1 -1
- package/dist/{meshFns-DvOM43vV.cjs → meshFns-2XnDXgIh.cjs} +3 -3
- package/dist/{meshFns--M5PTyHG.js → meshFns-B7uklc4M.js} +3 -3
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/{planeOps-DPintPbl.js → planeOps-BuBXTLBr.js} +1 -1
- package/dist/{planeOps-DdkIuVjk.cjs → planeOps-cTxDywpG.cjs} +1 -1
- package/dist/primitiveFns-CASk8g16.js +1452 -0
- package/dist/primitiveFns-DKtvEA0i.cjs +1817 -0
- package/dist/query.cjs +2 -2
- package/dist/query.js +2 -2
- package/dist/result.cjs +1 -1
- package/dist/result.js +1 -1
- package/dist/{shapeTypes-GmE4D5Q_.cjs → shapeTypes-CElaawp7.cjs} +114 -9
- package/dist/{shapeTypes-D38b_BKF.js → shapeTypes-CYb8Byqj.js} +114 -9
- package/dist/sketching.cjs +2 -2
- package/dist/sketching.js +2 -2
- package/dist/{solidBuilders-FaTmd_PS.js → solidBuilders-ClJxiUa3.js} +3 -3
- package/dist/{solidBuilders-BqU0oT2q.cjs → solidBuilders-Cs4XyL58.cjs} +3 -3
- package/dist/{surfaceBuilders-DiCVk_Un.js → surfaceBuilders-DnGdDW8i.js} +3 -3
- package/dist/{surfaceBuilders-BzDQQ4EG.cjs → surfaceBuilders-ZUTb3z6i.cjs} +3 -3
- package/dist/topology/booleanDiagnosticFns.d.ts +18 -0
- package/dist/topology/booleanDiagnosticFns.d.ts.map +1 -0
- package/dist/topology/booleanFns.d.ts.map +1 -1
- package/dist/topology/evolutionFns.d.ts +71 -0
- package/dist/topology/evolutionFns.d.ts.map +1 -0
- package/dist/topology/healingFns.d.ts +17 -0
- package/dist/topology/healingFns.d.ts.map +1 -1
- package/dist/topology/modifierFns.d.ts +15 -0
- package/dist/topology/modifierFns.d.ts.map +1 -1
- package/dist/topology/positionFns.d.ts +15 -0
- package/dist/topology/positionFns.d.ts.map +1 -0
- package/dist/topology.cjs +18 -6
- package/dist/topology.d.ts +6 -1
- package/dist/topology.d.ts.map +1 -1
- package/dist/topology.js +7 -7
- package/dist/vectors.cjs +1 -1
- package/dist/vectors.js +1 -1
- package/package.json +1 -1
- package/dist/primitiveFns-BXufrcii.cjs +0 -1063
- package/dist/primitiveFns-u3Bbdvlw.js +0 -806
package/dist/2d.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_boolean2D = require("./boolean2D-
|
|
3
|
-
const require_blueprint = require("./blueprint-
|
|
4
|
-
const require_blueprintFns = require("./blueprintFns-
|
|
2
|
+
const require_boolean2D = require("./boolean2D-CtB21ajK.cjs");
|
|
3
|
+
const require_blueprint = require("./blueprint-PLJan-W5.cjs");
|
|
4
|
+
const require_blueprintFns = require("./blueprintFns-Bsx25BG7.cjs");
|
|
5
5
|
exports.Blueprint = require_blueprint.Blueprint;
|
|
6
6
|
exports.Blueprints = require_boolean2D.Blueprints;
|
|
7
7
|
exports.BoundingBox2d = require_blueprint.BoundingBox2d;
|
package/dist/2d.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as fuseBlueprints, c as roundedRectangleBlueprint, g as Blueprints, h as CompoundBlueprint, i as cutBlueprints, m as organiseBlueprints, n as fuse2D, o as intersectBlueprints, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-
|
|
2
|
-
import { _ as Curve2D, t as Blueprint, y as BoundingBox2d } from "./blueprint-
|
|
3
|
-
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-
|
|
1
|
+
import { a as fuseBlueprints, c as roundedRectangleBlueprint, g as Blueprints, h as CompoundBlueprint, i as cutBlueprints, m as organiseBlueprints, n as fuse2D, o as intersectBlueprints, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-52qVCooY.js";
|
|
2
|
+
import { _ as Curve2D, t as Blueprint, y as BoundingBox2d } from "./blueprint-DYCdRlW5.js";
|
|
3
|
+
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-eWh7NpZx.js";
|
|
4
4
|
export { Blueprint, Blueprints, BoundingBox2d, CompoundBlueprint, Curve2D, createBlueprint, curve2dBoundingBox, curve2dDistanceFrom, curve2dFirstPoint, curve2dIsOnCurve, curve2dLastPoint, curve2dParameter, curve2dSplitAt, curve2dTangentAt, cut2D, cutBlueprints, fuse2D, fuseBlueprints, getBounds2D, getOrientation2D, intersect2D, intersectBlueprints, isInside2D, mirror2D, organiseBlueprints, polysidesBlueprint, reverseCurve, rotate2D, roundedRectangleBlueprint, scale2D, sketchOnFace2D, sketchOnPlane2D, stretch2D, toSVGPathD, translate2D };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Y as getKernel, r as castShapeWithKnownType, t as castShape } from "./shapeTypes-
|
|
2
|
-
import { L as unwrap, d as validationError, k as ok, t as BrepErrorCode, y as err } from "./errors-
|
|
1
|
+
import { Y as getKernel, r as castShapeWithKnownType, t as castShape } from "./shapeTypes-CYb8Byqj.js";
|
|
2
|
+
import { L as unwrap, d as validationError, k as ok, t as BrepErrorCode, y as err } from "./errors-B_T0aMQF.js";
|
|
3
3
|
import { _ as DEG2RAD, v as HASH_CODE_MAX } from "./vecOps-B9-MTeC8.js";
|
|
4
|
-
import { _ as downcast } from "./faceFns-
|
|
4
|
+
import { _ as downcast } from "./faceFns-EnGcKFAr.js";
|
|
5
5
|
//#region src/topology/topologyQueryFns.ts
|
|
6
6
|
/**
|
|
7
7
|
* Topology query functions — extract sub-shapes, compute bounds, and
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_errors = require("./errors-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-CElaawp7.cjs");
|
|
2
|
+
const require_errors = require("./errors-DupKEMqI.cjs");
|
|
3
3
|
const require_vecOps = require("./vecOps-4iBMiet9.cjs");
|
|
4
|
-
const require_faceFns = require("./faceFns-
|
|
4
|
+
const require_faceFns = require("./faceFns-8dGb8q3J.cjs");
|
|
5
5
|
//#region src/topology/topologyQueryFns.ts
|
|
6
6
|
/**
|
|
7
7
|
* Topology query functions — extract sub-shapes, compute bounds, and
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { H as registerForCleanup, W as unregisterFromCleanup, X as getKernel2D, Y as getKernel, a as createEdge, u as createWire } from "./shapeTypes-
|
|
2
|
-
import { L as unwrap, d as validationError, k as ok, m as bug, n as computationError, y as err } from "./errors-
|
|
1
|
+
import { H as registerForCleanup, W as unregisterFromCleanup, X as getKernel2D, Y as getKernel, a as createEdge, u as createWire } from "./shapeTypes-CYb8Byqj.js";
|
|
2
|
+
import { L as unwrap, d as validationError, k as ok, m as bug, n as computationError, y as err } from "./errors-B_T0aMQF.js";
|
|
3
3
|
import { _ as DEG2RAD, y as RAD2DEG } from "./vecOps-B9-MTeC8.js";
|
|
4
4
|
import { r as toVec3 } from "./types-Bb4KK_iG.js";
|
|
5
|
-
import { r as makePlane } from "./planeOps-
|
|
6
|
-
import { g as cast, m as uvCoordinates, n as faceCenter, p as uvBounds, r as faceGeomType } from "./faceFns-
|
|
7
|
-
import { n as getAtOrThrow, r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-
|
|
8
|
-
import { f as getOrientation } from "./curveFns-
|
|
9
|
-
import { r as makeFace } from "./surfaceBuilders-
|
|
10
|
-
import { _ as samePoint, b as subtract2d, l as add2d, o as normalize2d, p as distance2d, t as getSingleFace, v as scalarMultiply2d } from "./helpers-
|
|
5
|
+
import { r as makePlane } from "./planeOps-BuBXTLBr.js";
|
|
6
|
+
import { g as cast, m as uvCoordinates, n as faceCenter, p as uvBounds, r as faceGeomType } from "./faceFns-EnGcKFAr.js";
|
|
7
|
+
import { n as getAtOrThrow, r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-Dps31ERU.js";
|
|
8
|
+
import { f as getOrientation } from "./curveFns-C-jU1_Y_.js";
|
|
9
|
+
import { r as makeFace } from "./surfaceBuilders-DnGdDW8i.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-Rf0vhX6I.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,13 +1,13 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_errors = require("./errors-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-CElaawp7.cjs");
|
|
2
|
+
const require_errors = require("./errors-DupKEMqI.cjs");
|
|
3
3
|
const require_vecOps = require("./vecOps-4iBMiet9.cjs");
|
|
4
4
|
const require_types = require("./types-BD-VVaWB.cjs");
|
|
5
|
-
const require_planeOps = require("./planeOps-
|
|
6
|
-
const require_faceFns = require("./faceFns-
|
|
7
|
-
const require_arrayAccess = require("./arrayAccess-
|
|
8
|
-
const require_curveFns = require("./curveFns-
|
|
9
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
10
|
-
const require_helpers = require("./helpers-
|
|
5
|
+
const require_planeOps = require("./planeOps-cTxDywpG.cjs");
|
|
6
|
+
const require_faceFns = require("./faceFns-8dGb8q3J.cjs");
|
|
7
|
+
const require_arrayAccess = require("./arrayAccess-peFKE9Ob.cjs");
|
|
8
|
+
const require_curveFns = require("./curveFns-ywh7Ctyk.cjs");
|
|
9
|
+
const require_surfaceBuilders = require("./surfaceBuilders-ZUTb3z6i.cjs");
|
|
10
|
+
const require_helpers = require("./helpers-pQpV9Mwh.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) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_errors = require("./errors-
|
|
2
|
-
const require_boolean2D = require("./boolean2D-
|
|
3
|
-
const require_blueprint = require("./blueprint-
|
|
1
|
+
const require_errors = require("./errors-DupKEMqI.cjs");
|
|
2
|
+
const require_boolean2D = require("./boolean2D-CtB21ajK.cjs");
|
|
3
|
+
const require_blueprint = require("./blueprint-PLJan-W5.cjs");
|
|
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
|
-
import { d as validationError, k as ok, t as BrepErrorCode, y as err } from "./errors-
|
|
2
|
-
import { h as CompoundBlueprint } from "./boolean2D-
|
|
3
|
-
import { t as Blueprint } from "./blueprint-
|
|
1
|
+
import { d as validationError, k as ok, t as BrepErrorCode, y as err } from "./errors-B_T0aMQF.js";
|
|
2
|
+
import { h as CompoundBlueprint } from "./boolean2D-52qVCooY.js";
|
|
3
|
+
import { t as Blueprint } from "./blueprint-DYCdRlW5.js";
|
|
4
4
|
//#region src/2d/lib/curve2dFns.ts
|
|
5
5
|
/**
|
|
6
6
|
* Return a reversed copy of the curve (non-mutating).
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { J as _usingCtx, L as DisposalScope, X as getKernel2D, Y as getKernel, a as createEdge, h as isShape3D, o as createFace, t as castShape, u as createWire } from "./shapeTypes-
|
|
2
|
-
import { L as unwrap, d as validationError, i as kernelError, k as ok, l as typeCastError, m as bug, n as computationError, s as safeIndex, w as isOk, y as err } from "./errors-
|
|
1
|
+
import { J as _usingCtx, L as DisposalScope, X as getKernel2D, Y as getKernel, a as createEdge, h as isShape3D, o as createFace, t as castShape, u as createWire } from "./shapeTypes-CYb8Byqj.js";
|
|
2
|
+
import { L as unwrap, d as validationError, i as kernelError, k as ok, l as typeCastError, m as bug, n as computationError, s as safeIndex, w as isOk, y as err } from "./errors-B_T0aMQF.js";
|
|
3
3
|
import { _ as DEG2RAD, d as vecNormalize, h as vecScale, r as vecCross, y as RAD2DEG } from "./vecOps-B9-MTeC8.js";
|
|
4
4
|
import { r as toVec3 } from "./types-Bb4KK_iG.js";
|
|
5
|
-
import { n as createPlane } from "./planeOps-
|
|
6
|
-
import { _ as downcast, c as normalAt, p as uvBounds, u as pointOnSurface } from "./faceFns-
|
|
7
|
-
import { r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-
|
|
8
|
-
import { c as curveStartPoint, l as curveTangentAt, r as curveIsClosed } from "./curveFns-
|
|
9
|
-
import { _ as zip, i as makeNewFaceWithinFace, r as makeFace, s as assembleWire } from "./surfaceBuilders-
|
|
10
|
-
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-
|
|
11
|
-
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-
|
|
12
|
-
import { c as twistExtrude, n as revolve, r as complexExtrude, s as sweep, t as extrude } from "./extrudeFns-
|
|
5
|
+
import { n as createPlane } from "./planeOps-BuBXTLBr.js";
|
|
6
|
+
import { _ as downcast, c as normalAt, p as uvBounds, u as pointOnSurface } from "./faceFns-EnGcKFAr.js";
|
|
7
|
+
import { r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-Dps31ERU.js";
|
|
8
|
+
import { c as curveStartPoint, l as curveTangentAt, r as curveIsClosed } from "./curveFns-C-jU1_Y_.js";
|
|
9
|
+
import { _ as zip, i as makeNewFaceWithinFace, r as makeFace, s as assembleWire } from "./surfaceBuilders-DnGdDW8i.js";
|
|
10
|
+
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-Rf0vhX6I.js";
|
|
11
|
+
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-DYCdRlW5.js";
|
|
12
|
+
import { c as twistExtrude, n as revolve, r as complexExtrude, s as sweep, t as extrude } from "./extrudeFns-LsH1rDMa.js";
|
|
13
13
|
//#region node_modules/flatqueue/index.js
|
|
14
14
|
/** @template T */
|
|
15
15
|
var FlatQueue = class {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_errors = require("./errors-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-CElaawp7.cjs");
|
|
2
|
+
const require_errors = require("./errors-DupKEMqI.cjs");
|
|
3
3
|
const require_vecOps = require("./vecOps-4iBMiet9.cjs");
|
|
4
4
|
const require_types = require("./types-BD-VVaWB.cjs");
|
|
5
|
-
const require_planeOps = require("./planeOps-
|
|
6
|
-
const require_faceFns = require("./faceFns-
|
|
7
|
-
const require_arrayAccess = require("./arrayAccess-
|
|
8
|
-
const require_curveFns = require("./curveFns-
|
|
9
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
10
|
-
const require_helpers = require("./helpers-
|
|
11
|
-
const require_blueprint = require("./blueprint-
|
|
12
|
-
const require_extrudeFns = require("./extrudeFns-
|
|
5
|
+
const require_planeOps = require("./planeOps-cTxDywpG.cjs");
|
|
6
|
+
const require_faceFns = require("./faceFns-8dGb8q3J.cjs");
|
|
7
|
+
const require_arrayAccess = require("./arrayAccess-peFKE9Ob.cjs");
|
|
8
|
+
const require_curveFns = require("./curveFns-ywh7Ctyk.cjs");
|
|
9
|
+
const require_surfaceBuilders = require("./surfaceBuilders-ZUTb3z6i.cjs");
|
|
10
|
+
const require_helpers = require("./helpers-pQpV9Mwh.cjs");
|
|
11
|
+
const require_blueprint = require("./blueprint-PLJan-W5.cjs");
|
|
12
|
+
const require_extrudeFns = require("./extrudeFns-CGCIbydL.cjs");
|
|
13
13
|
//#region node_modules/flatqueue/index.js
|
|
14
14
|
/** @template T */
|
|
15
15
|
var FlatQueue = class {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_errors = require("./errors-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-CElaawp7.cjs");
|
|
2
|
+
const require_errors = require("./errors-DupKEMqI.cjs");
|
|
3
3
|
const require_vecOps = require("./vecOps-4iBMiet9.cjs");
|
|
4
|
-
const require_planeOps = require("./planeOps-
|
|
5
|
-
const require_arrayAccess = require("./arrayAccess-
|
|
6
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
4
|
+
const require_planeOps = require("./planeOps-cTxDywpG.cjs");
|
|
5
|
+
const require_arrayAccess = require("./arrayAccess-peFKE9Ob.cjs");
|
|
6
|
+
const require_surfaceBuilders = require("./surfaceBuilders-ZUTb3z6i.cjs");
|
|
7
7
|
//#region src/topology/booleanFns.ts
|
|
8
8
|
/**
|
|
9
9
|
* Boolean and compound operations — functional replacements for _3DShape boolean methods.
|
|
@@ -13,7 +13,7 @@ function validateShape3D(shape, label) {
|
|
|
13
13
|
if (require_shapeTypes.getKernel().isNull(shape.wrapped)) return require_errors.err(require_errors.validationError(require_errors.BrepErrorCode.NULL_SHAPE_INPUT, `${label} is a null shape`));
|
|
14
14
|
return require_errors.ok(void 0);
|
|
15
15
|
}
|
|
16
|
-
function castToShape3D(shape, errorCode, errorMsg, suggestion) {
|
|
16
|
+
function castToShape3D(shape, errorCode, errorMsg, suggestion, diagnostics) {
|
|
17
17
|
const wrapped = require_shapeTypes.castShape(shape);
|
|
18
18
|
if (!require_shapeTypes.isShape3D(wrapped)) {
|
|
19
19
|
const shapeType = shape.ShapeType();
|
|
@@ -29,7 +29,7 @@ function castToShape3D(shape, errorCode, errorMsg, suggestion) {
|
|
|
29
29
|
"SHAPE"
|
|
30
30
|
][shapeType] ?? `UNKNOWN(${shapeType})`;
|
|
31
31
|
wrapped[Symbol.dispose]();
|
|
32
|
-
return require_errors.err(require_errors.typeCastError(errorCode, `${errorMsg}. Got ${typeName} instead.`, void 0, void 0, suggestion));
|
|
32
|
+
return require_errors.err(require_errors.typeCastError(errorCode, `${errorMsg}. Got ${typeName} instead.`, void 0, diagnostics ? { diagnostics } : void 0, suggestion));
|
|
33
33
|
}
|
|
34
34
|
return require_errors.ok(wrapped);
|
|
35
35
|
}
|
|
@@ -40,12 +40,16 @@ function fuse(a, b, { optimisation = "none", simplify = false, signal, fuzzyValu
|
|
|
40
40
|
const checkB = validateShape3D(b, "fuse: second operand");
|
|
41
41
|
if (require_errors.isErr(checkB)) return checkB;
|
|
42
42
|
const inputFaceHashes = require_arrayAccess.collectInputFaceHashes([a, b]);
|
|
43
|
-
const { shape: resultShape, evolution } = require_shapeTypes.getKernel().fuseWithHistory(a.wrapped, b.wrapped, inputFaceHashes, require_vecOps.HASH_CODE_MAX, {
|
|
43
|
+
const { shape: resultShape, evolution, diagnostics } = require_shapeTypes.getKernel().fuseWithHistory(a.wrapped, b.wrapped, inputFaceHashes, require_vecOps.HASH_CODE_MAX, {
|
|
44
44
|
optimisation,
|
|
45
45
|
simplify,
|
|
46
46
|
fuzzyValue
|
|
47
47
|
});
|
|
48
|
-
|
|
48
|
+
if (diagnostics.hasErrors) {
|
|
49
|
+
require_shapeTypes.getKernel().dispose(resultShape);
|
|
50
|
+
return require_errors.err(require_errors.kernelError(require_errors.BrepErrorCode.BOOLEAN_HAS_ERRORS, "Boolean operation reported internal errors. The result may be invalid.", void 0, { diagnostics }, "Use checkBoolean() to pre-validate operands, or try autoHeal() on inputs."));
|
|
51
|
+
}
|
|
52
|
+
const fuseResult = castToShape3D(resultShape, "FUSE_NOT_3D", "Fuse did not produce a 3D shape", "Common causes: overlapping coplanar faces, zero-thickness geometry, or non-manifold input. Try autoHeal() on inputs first.", diagnostics);
|
|
49
53
|
if (fuseResult.ok) require_arrayAccess.propagateAllMetadata(evolution, [a, b], fuseResult.value);
|
|
50
54
|
return fuseResult;
|
|
51
55
|
}
|
|
@@ -56,12 +60,16 @@ function cut(base, tool, { optimisation = "none", simplify = false, signal, fuzz
|
|
|
56
60
|
const checkTool = validateShape3D(tool, "cut: tool");
|
|
57
61
|
if (require_errors.isErr(checkTool)) return checkTool;
|
|
58
62
|
const inputFaceHashes = require_arrayAccess.collectInputFaceHashes([base, tool]);
|
|
59
|
-
const { shape: resultShape, evolution } = require_shapeTypes.getKernel().cutWithHistory(base.wrapped, tool.wrapped, inputFaceHashes, require_vecOps.HASH_CODE_MAX, {
|
|
63
|
+
const { shape: resultShape, evolution, diagnostics } = require_shapeTypes.getKernel().cutWithHistory(base.wrapped, tool.wrapped, inputFaceHashes, require_vecOps.HASH_CODE_MAX, {
|
|
60
64
|
optimisation,
|
|
61
65
|
simplify,
|
|
62
66
|
fuzzyValue
|
|
63
67
|
});
|
|
64
|
-
|
|
68
|
+
if (diagnostics.hasErrors) {
|
|
69
|
+
require_shapeTypes.getKernel().dispose(resultShape);
|
|
70
|
+
return require_errors.err(require_errors.kernelError(require_errors.BrepErrorCode.BOOLEAN_HAS_ERRORS, "Boolean operation reported internal errors. The result may be invalid.", void 0, { diagnostics }, "Use checkBoolean() to pre-validate operands, or try autoHeal() on inputs."));
|
|
71
|
+
}
|
|
72
|
+
const cutResult = castToShape3D(resultShape, "CUT_NOT_3D", "Cut did not produce a 3D shape", "Common causes: tool does not fully intersect the base, or produces a zero-thickness sliver. Ensure the tool extends through the shape.", diagnostics);
|
|
65
73
|
if (cutResult.ok) require_arrayAccess.propagateAllMetadata(evolution, [base, tool], cutResult.value);
|
|
66
74
|
return cutResult;
|
|
67
75
|
}
|
|
@@ -72,11 +80,15 @@ function intersect(a, b, { simplify = false, signal, fuzzyValue, unsafe: _unsafe
|
|
|
72
80
|
const checkB = validateShape3D(b, "intersect: second operand");
|
|
73
81
|
if (require_errors.isErr(checkB)) return checkB;
|
|
74
82
|
const inputFaceHashes = require_arrayAccess.collectInputFaceHashes([a, b]);
|
|
75
|
-
const { shape: resultShape, evolution } = require_shapeTypes.getKernel().intersectWithHistory(a.wrapped, b.wrapped, inputFaceHashes, require_vecOps.HASH_CODE_MAX, {
|
|
83
|
+
const { shape: resultShape, evolution, diagnostics } = require_shapeTypes.getKernel().intersectWithHistory(a.wrapped, b.wrapped, inputFaceHashes, require_vecOps.HASH_CODE_MAX, {
|
|
76
84
|
simplify,
|
|
77
85
|
fuzzyValue
|
|
78
86
|
});
|
|
79
|
-
|
|
87
|
+
if (diagnostics.hasErrors) {
|
|
88
|
+
require_shapeTypes.getKernel().dispose(resultShape);
|
|
89
|
+
return require_errors.err(require_errors.kernelError(require_errors.BrepErrorCode.BOOLEAN_HAS_ERRORS, "Boolean operation reported internal errors. The result may be invalid.", void 0, { diagnostics }, "Use checkBoolean() to pre-validate operands, or try autoHeal() on inputs."));
|
|
90
|
+
}
|
|
91
|
+
const intResult = castToShape3D(resultShape, "INTERSECT_NOT_3D", "Intersect did not produce a 3D shape", "Shapes may not overlap. Verify they share a common volume before intersecting.", diagnostics);
|
|
80
92
|
if (intResult.ok) require_arrayAccess.propagateAllMetadata(evolution, [a, b], intResult.value);
|
|
81
93
|
return intResult;
|
|
82
94
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Y as getKernel, h as isShape3D, t as castShape } from "./shapeTypes-
|
|
2
|
-
import { C as isErr, L as unwrap, d as validationError, i as kernelError, k as ok, l as typeCastError, t as BrepErrorCode, y as err } from "./errors-
|
|
1
|
+
import { Y as getKernel, h as isShape3D, t as castShape } from "./shapeTypes-CYb8Byqj.js";
|
|
2
|
+
import { C as isErr, L as unwrap, d as validationError, i as kernelError, k as ok, l as typeCastError, t as BrepErrorCode, y as err } from "./errors-B_T0aMQF.js";
|
|
3
3
|
import { h as vecScale, t as vecAdd, v as HASH_CODE_MAX } from "./vecOps-B9-MTeC8.js";
|
|
4
|
-
import { o as resolvePlane } from "./planeOps-
|
|
5
|
-
import { F as getEdges, R as getVertices, b as propagateAllMetadata, n as getAtOrThrow, t as firstOrThrow, x as propagateMetadataByHash, y as collectInputFaceHashes, z as getWires } from "./arrayAccess-
|
|
6
|
-
import { r as makeFace } from "./surfaceBuilders-
|
|
4
|
+
import { o as resolvePlane } from "./planeOps-BuBXTLBr.js";
|
|
5
|
+
import { F as getEdges, R as getVertices, b as propagateAllMetadata, n as getAtOrThrow, t as firstOrThrow, x as propagateMetadataByHash, y as collectInputFaceHashes, z as getWires } from "./arrayAccess-Dps31ERU.js";
|
|
6
|
+
import { r as makeFace } from "./surfaceBuilders-DnGdDW8i.js";
|
|
7
7
|
//#region src/topology/booleanFns.ts
|
|
8
8
|
/**
|
|
9
9
|
* Boolean and compound operations — functional replacements for _3DShape boolean methods.
|
|
@@ -13,7 +13,7 @@ function validateShape3D(shape, label) {
|
|
|
13
13
|
if (getKernel().isNull(shape.wrapped)) return err(validationError(BrepErrorCode.NULL_SHAPE_INPUT, `${label} is a null shape`));
|
|
14
14
|
return ok(void 0);
|
|
15
15
|
}
|
|
16
|
-
function castToShape3D(shape, errorCode, errorMsg, suggestion) {
|
|
16
|
+
function castToShape3D(shape, errorCode, errorMsg, suggestion, diagnostics) {
|
|
17
17
|
const wrapped = castShape(shape);
|
|
18
18
|
if (!isShape3D(wrapped)) {
|
|
19
19
|
const shapeType = shape.ShapeType();
|
|
@@ -29,7 +29,7 @@ function castToShape3D(shape, errorCode, errorMsg, suggestion) {
|
|
|
29
29
|
"SHAPE"
|
|
30
30
|
][shapeType] ?? `UNKNOWN(${shapeType})`;
|
|
31
31
|
wrapped[Symbol.dispose]();
|
|
32
|
-
return err(typeCastError(errorCode, `${errorMsg}. Got ${typeName} instead.`, void 0, void 0, suggestion));
|
|
32
|
+
return err(typeCastError(errorCode, `${errorMsg}. Got ${typeName} instead.`, void 0, diagnostics ? { diagnostics } : void 0, suggestion));
|
|
33
33
|
}
|
|
34
34
|
return ok(wrapped);
|
|
35
35
|
}
|
|
@@ -40,12 +40,16 @@ function fuse(a, b, { optimisation = "none", simplify = false, signal, fuzzyValu
|
|
|
40
40
|
const checkB = validateShape3D(b, "fuse: second operand");
|
|
41
41
|
if (isErr(checkB)) return checkB;
|
|
42
42
|
const inputFaceHashes = collectInputFaceHashes([a, b]);
|
|
43
|
-
const { shape: resultShape, evolution } = getKernel().fuseWithHistory(a.wrapped, b.wrapped, inputFaceHashes, HASH_CODE_MAX, {
|
|
43
|
+
const { shape: resultShape, evolution, diagnostics } = getKernel().fuseWithHistory(a.wrapped, b.wrapped, inputFaceHashes, HASH_CODE_MAX, {
|
|
44
44
|
optimisation,
|
|
45
45
|
simplify,
|
|
46
46
|
fuzzyValue
|
|
47
47
|
});
|
|
48
|
-
|
|
48
|
+
if (diagnostics.hasErrors) {
|
|
49
|
+
getKernel().dispose(resultShape);
|
|
50
|
+
return err(kernelError(BrepErrorCode.BOOLEAN_HAS_ERRORS, "Boolean operation reported internal errors. The result may be invalid.", void 0, { diagnostics }, "Use checkBoolean() to pre-validate operands, or try autoHeal() on inputs."));
|
|
51
|
+
}
|
|
52
|
+
const fuseResult = castToShape3D(resultShape, "FUSE_NOT_3D", "Fuse did not produce a 3D shape", "Common causes: overlapping coplanar faces, zero-thickness geometry, or non-manifold input. Try autoHeal() on inputs first.", diagnostics);
|
|
49
53
|
if (fuseResult.ok) propagateAllMetadata(evolution, [a, b], fuseResult.value);
|
|
50
54
|
return fuseResult;
|
|
51
55
|
}
|
|
@@ -56,12 +60,16 @@ function cut(base, tool, { optimisation = "none", simplify = false, signal, fuzz
|
|
|
56
60
|
const checkTool = validateShape3D(tool, "cut: tool");
|
|
57
61
|
if (isErr(checkTool)) return checkTool;
|
|
58
62
|
const inputFaceHashes = collectInputFaceHashes([base, tool]);
|
|
59
|
-
const { shape: resultShape, evolution } = getKernel().cutWithHistory(base.wrapped, tool.wrapped, inputFaceHashes, HASH_CODE_MAX, {
|
|
63
|
+
const { shape: resultShape, evolution, diagnostics } = getKernel().cutWithHistory(base.wrapped, tool.wrapped, inputFaceHashes, HASH_CODE_MAX, {
|
|
60
64
|
optimisation,
|
|
61
65
|
simplify,
|
|
62
66
|
fuzzyValue
|
|
63
67
|
});
|
|
64
|
-
|
|
68
|
+
if (diagnostics.hasErrors) {
|
|
69
|
+
getKernel().dispose(resultShape);
|
|
70
|
+
return err(kernelError(BrepErrorCode.BOOLEAN_HAS_ERRORS, "Boolean operation reported internal errors. The result may be invalid.", void 0, { diagnostics }, "Use checkBoolean() to pre-validate operands, or try autoHeal() on inputs."));
|
|
71
|
+
}
|
|
72
|
+
const cutResult = castToShape3D(resultShape, "CUT_NOT_3D", "Cut did not produce a 3D shape", "Common causes: tool does not fully intersect the base, or produces a zero-thickness sliver. Ensure the tool extends through the shape.", diagnostics);
|
|
65
73
|
if (cutResult.ok) propagateAllMetadata(evolution, [base, tool], cutResult.value);
|
|
66
74
|
return cutResult;
|
|
67
75
|
}
|
|
@@ -72,11 +80,15 @@ function intersect(a, b, { simplify = false, signal, fuzzyValue, unsafe: _unsafe
|
|
|
72
80
|
const checkB = validateShape3D(b, "intersect: second operand");
|
|
73
81
|
if (isErr(checkB)) return checkB;
|
|
74
82
|
const inputFaceHashes = collectInputFaceHashes([a, b]);
|
|
75
|
-
const { shape: resultShape, evolution } = getKernel().intersectWithHistory(a.wrapped, b.wrapped, inputFaceHashes, HASH_CODE_MAX, {
|
|
83
|
+
const { shape: resultShape, evolution, diagnostics } = getKernel().intersectWithHistory(a.wrapped, b.wrapped, inputFaceHashes, HASH_CODE_MAX, {
|
|
76
84
|
simplify,
|
|
77
85
|
fuzzyValue
|
|
78
86
|
});
|
|
79
|
-
|
|
87
|
+
if (diagnostics.hasErrors) {
|
|
88
|
+
getKernel().dispose(resultShape);
|
|
89
|
+
return err(kernelError(BrepErrorCode.BOOLEAN_HAS_ERRORS, "Boolean operation reported internal errors. The result may be invalid.", void 0, { diagnostics }, "Use checkBoolean() to pre-validate operands, or try autoHeal() on inputs."));
|
|
90
|
+
}
|
|
91
|
+
const intResult = castToShape3D(resultShape, "INTERSECT_NOT_3D", "Intersect did not produce a 3D shape", "Shapes may not overlap. Verify they share a common volume before intersecting.", diagnostics);
|
|
80
92
|
if (intResult.ok) propagateAllMetadata(evolution, [a, b], intResult.value);
|
|
81
93
|
return intResult;
|
|
82
94
|
}
|