brepjs 18.33.2 → 18.35.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 +7 -7
- package/dist/2d.js +7 -7
- package/dist/{blueprint-CDjFNsmN.cjs → blueprint-BB_nIqH9.cjs} +7 -7
- package/dist/{blueprint-CNczvCJD.js → blueprint-DmWmhXi4.js} +7 -7
- package/dist/{blueprintFns-DT6oP1MU.js → blueprintFns-B4xOCuT3.js} +3 -3
- package/dist/{blueprintFns-HxHdlOrY.cjs → blueprintFns-C3NplQ86.cjs} +3 -3
- package/dist/{blueprintSketcher-C1zl__qM.cjs → blueprintSketcher-C1C9mJuK.cjs} +4 -4
- package/dist/{blueprintSketcher-BvEwuvyJ.js → blueprintSketcher-DaqbMIfk.js} +4 -4
- package/dist/{boolean2D-BczOZwlF.js → boolean2D-B3DOcj6G.js} +5 -5
- package/dist/{boolean2D-DLV8HNif.cjs → boolean2D-CbChdB3y.cjs} +5 -5
- package/dist/{booleanFns-lDauFalY.js → booleanFns-Byv33KMu.js} +6 -6
- package/dist/{booleanFns-CLCbionN.cjs → booleanFns-X-pT22Jh.cjs} +6 -6
- package/dist/brepjs.cjs +33 -26
- package/dist/brepjs.js +27 -27
- package/dist/{cameraFns-nPL5-xZH.cjs → cameraFns-B9duZ94U.cjs} +3 -3
- package/dist/{cameraFns-Byav4AXt.js → cameraFns-DkUpqMdm.js} +3 -3
- package/dist/core/errors.d.ts +2 -0
- package/dist/core.cjs +3 -3
- package/dist/core.js +3 -3
- package/dist/{cornerFinder-CifMFbIN.js → cornerFinder-4ieWbVIN.js} +1 -1
- package/dist/{cornerFinder-DPlpHmJl.cjs → cornerFinder-BEHY1k0Q.cjs} +1 -1
- package/dist/{curveFns-DbpQH6-9.cjs → curveFns-ChkLRL8a.cjs} +2 -2
- package/dist/{curveFns-Dvtp5oZA.js → curveFns-DHAvRosC.js} +2 -2
- package/dist/{drawFns-BFi1hoid.js → drawFns-D2u7C_7g.js} +14 -14
- package/dist/{drawFns-uS1tM6dz.cjs → drawFns-DzgqLm1w.cjs} +14 -14
- package/dist/{errors-DxoD7zgx.cjs → errors-D9tBO0km.cjs} +2 -0
- package/dist/{errors-BJSTLaDI.js → errors-DOPT3OTg.js} +2 -0
- package/dist/{extrudeFns-CE8C7QRv.js → extrudeFns-WH0yd_Fb.js} +2 -2
- package/dist/{extrudeFns-Bab5Fw_k.cjs → extrudeFns-WYDSlEW8.cjs} +2 -2
- package/dist/{faceFns-B5C-nw1v.cjs → faceFns-DNOsmyRn.cjs} +3 -3
- package/dist/{faceFns-Cfgrt9P9.js → faceFns-Druzi4mz.js} +3 -3
- package/dist/{helpers-C7wSoEZ6.cjs → helpers-BxCilYLb.cjs} +7 -7
- package/dist/{helpers-Cy-JYZot.js → helpers-DXRsnEpy.js} +7 -7
- package/dist/{historyFns-BDy3Iq3O.cjs → historyFns-C9J3s9xB.cjs} +5 -5
- package/dist/{historyFns-qZaNV5QN.js → historyFns-DqY8zLUq.js} +5 -5
- package/dist/{importFns-CJggKtP3.cjs → importFns-CAR9g6W8.cjs} +3 -3
- package/dist/{importFns-B7R0bXrT.js → importFns-D8NOuxmA.js} +3 -3
- package/dist/index.d.ts +2 -2
- package/dist/io.cjs +2 -2
- package/dist/io.js +2 -2
- package/dist/kernel/index.d.ts +3 -4
- package/dist/kernel/manifold/approximations.d.ts +74 -0
- package/dist/kernel/manifold/booleanOps.d.ts +3 -0
- package/dist/kernel/manifold/builderOps.d.ts +3 -0
- package/dist/kernel/manifold/constraintSketchOps.d.ts +3 -0
- package/dist/kernel/manifold/evolutionOps.d.ts +3 -0
- package/dist/kernel/manifold/geometryOps.d.ts +4 -0
- package/dist/kernel/manifold/helpers.d.ts +3 -0
- package/dist/kernel/manifold/ioOps.d.ts +3 -0
- package/dist/kernel/manifold/kernel2dOps.d.ts +3 -0
- package/dist/kernel/manifold/manifoldAdapter.d.ts +9 -0
- package/dist/kernel/manifold/measureOps.d.ts +15 -0
- package/dist/kernel/manifold/meshHandle.d.ts +15 -0
- package/dist/kernel/manifold/meshOps.d.ts +8 -0
- package/dist/kernel/manifold/modifierOps.d.ts +3 -0
- package/dist/kernel/manifold/opGraph.d.ts +35 -0
- package/dist/kernel/manifold/primitiveOps.d.ts +3 -0
- package/dist/kernel/manifold/projectionOps.d.ts +3 -0
- package/dist/kernel/manifold/repairOps.d.ts +3 -0
- package/dist/kernel/manifold/replay.d.ts +11 -0
- package/dist/kernel/manifold/sweepOps.d.ts +3 -0
- package/dist/kernel/manifold/topologyOps.d.ts +3 -0
- package/dist/kernel/manifold/transformOps.d.ts +32 -0
- package/dist/{measureFns-_3tK7mBN.cjs → measureFns-CSbBsOLY.cjs} +4 -4
- package/dist/{measureFns-CcednQHe.js → measureFns-Dg3pLNRE.js} +4 -4
- package/dist/measurement.cjs +1 -1
- package/dist/measurement.js +1 -1
- package/dist/{meshFns-BIuX88EN.js → meshFns-CkzlLwZw.js} +18 -7
- package/dist/{meshFns-6oVWvaGE.cjs → meshFns-yusYccFx.cjs} +18 -7
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/{planeOps-C6wxugvC.cjs → planeOps-DTY92UCh.cjs} +1 -1
- package/dist/{planeOps-CblVcWbn.js → planeOps-YTeuXs80.js} +1 -1
- package/dist/{primitiveFns-B0DKFED_.js → primitiveFns-CbpHBZdf.js} +8 -8
- package/dist/{primitiveFns-72G-cDZo.cjs → primitiveFns-DzGTYy_l.cjs} +8 -8
- package/dist/projection.cjs +1 -1
- package/dist/projection.js +1 -1
- package/dist/query.cjs +2 -2
- package/dist/query.js +2 -2
- package/dist/result.cjs +1 -1
- package/dist/result.js +1 -1
- package/dist/{shapeFns-B1ThqSpi.js → shapeFns-BYKFvtTb.js} +3 -3
- package/dist/{shapeFns-D1LQT1YP.cjs → shapeFns-CSlSyyi1.cjs} +3 -3
- package/dist/shapeRef.cjs +1 -1
- package/dist/shapeRef.js +1 -1
- package/dist/{shapeRefFns-_AmQNqEz.cjs → shapeRefFns-B4xO4AI1.cjs} +4 -4
- package/dist/{shapeRefFns-M9z1C2Te.js → shapeRefFns-UIsEV1jg.js} +4 -4
- package/dist/{shapeTypes-DnYvZd61.js → shapeTypes-D946X6Qx.js} +3630 -327
- package/dist/{shapeTypes-BXXHBHal.cjs → shapeTypes-DRIhPf8A.cjs} +3828 -519
- package/dist/sketching.cjs +3 -3
- package/dist/sketching.js +3 -3
- package/dist/{solidBuilders-C4tUlAlA.js → solidBuilders-2xiE6FDe.js} +3 -3
- package/dist/{solidBuilders-BGzd3NKL.cjs → solidBuilders-8PLYgzL9.cjs} +3 -3
- package/dist/{surfaceBuilders-Di8LHBU7.js → surfaceBuilders-CUFC3tNT.js} +3 -3
- package/dist/{surfaceBuilders-lVyiCPIU.cjs → surfaceBuilders-CZ7u_Xmi.cjs} +3 -3
- package/dist/text.cjs +2 -2
- package/dist/text.js +2 -2
- package/dist/{textBlueprints-hDFeOHnt.cjs → textBlueprints-CZ4MphXu.cjs} +9 -9
- package/dist/{textBlueprints-BtPob4Le.js → textBlueprints-Dv4YWJrA.js} +9 -9
- package/dist/{textMetrics-_u9W8BcO.cjs → textMetrics-BpmNTwLm.cjs} +2 -2
- package/dist/{textMetrics-BAFPvbuw.js → textMetrics-Dvh4HzSZ.js} +2 -2
- package/dist/topology/meshFns.d.ts +0 -5
- package/dist/topology/shapeFns.d.ts +1 -1
- package/dist/topology/topologyQueryFns.d.ts +22 -1
- package/dist/topology.cjs +7 -7
- package/dist/topology.js +7 -7
- package/dist/{topologyQueryFns-mWrJgMdr.js → topologyQueryFns-D5YTf9GW.js} +45 -3
- package/dist/{topologyQueryFns-DTVysRV-.cjs → topologyQueryFns-esX6R5j4.cjs} +80 -2
- package/dist/vectors.cjs +1 -1
- package/dist/vectors.js +1 -1
- package/package.json +9 -1
package/dist/sketching.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_textBlueprints = require("./textBlueprints-
|
|
3
|
-
const require_blueprintSketcher = require("./blueprintSketcher-
|
|
4
|
-
const require_drawFns = require("./drawFns-
|
|
2
|
+
const require_textBlueprints = require("./textBlueprints-CZ4MphXu.cjs");
|
|
3
|
+
const require_blueprintSketcher = require("./blueprintSketcher-C1C9mJuK.cjs");
|
|
4
|
+
const require_drawFns = require("./drawFns-DzgqLm1w.cjs");
|
|
5
5
|
//#region src/sketching.ts
|
|
6
6
|
/**
|
|
7
7
|
* brepjs/sketching — Sketcher, Drawing, and sketch-to-shape operations.
|
package/dist/sketching.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as BaseSketcher2d, t as BlueprintSketcher } from "./blueprintSketcher-
|
|
2
|
-
import { A as sketchEllipse, C as DrawingPen, D as makeBaseBox, E as deserializeDrawing, F as sketchRectangle, I as sketchRoundedRectangle, L as FaceSketcher, M as sketchHelix, N as sketchParametricFunction, O as polysideInnerRadius, P as sketchPolysides, R as Sketcher, S as drawText, T as Drawing, _ as drawPolysides, a as drawingIntersect, b as drawSingleCircle, c as rotateDrawing, d as drawFaceOutline, f as drawProjection, g as drawPointsInterpolation, h as drawParametricFunction, i as drawingFuse, j as sketchFaceOffset, k as sketchCircle, l as scaleDrawing, m as drawEllipse, n as drawingCut, o as drawingToSketchOnPlane, p as drawCircle, r as drawingFillet, s as mirrorDrawing, t as drawingChamfer, u as translateDrawing, v as drawRectangle, w as draw, x as drawSingleEllipse, y as drawRoundedRectangle } from "./drawFns-
|
|
3
|
-
import { a as Sketch, c as compoundSketchLoft, d as sketchFace, f as sketchLoft, h as sketchWires, i as Sketches, l as compoundSketchRevolve, m as sketchSweep, o as compoundSketchExtrude, p as sketchRevolve, s as compoundSketchFace, u as sketchExtrude, v as CompoundSketch } from "./textBlueprints-
|
|
1
|
+
import { n as BaseSketcher2d, t as BlueprintSketcher } from "./blueprintSketcher-DaqbMIfk.js";
|
|
2
|
+
import { A as sketchEllipse, C as DrawingPen, D as makeBaseBox, E as deserializeDrawing, F as sketchRectangle, I as sketchRoundedRectangle, L as FaceSketcher, M as sketchHelix, N as sketchParametricFunction, O as polysideInnerRadius, P as sketchPolysides, R as Sketcher, S as drawText, T as Drawing, _ as drawPolysides, a as drawingIntersect, b as drawSingleCircle, c as rotateDrawing, d as drawFaceOutline, f as drawProjection, g as drawPointsInterpolation, h as drawParametricFunction, i as drawingFuse, j as sketchFaceOffset, k as sketchCircle, l as scaleDrawing, m as drawEllipse, n as drawingCut, o as drawingToSketchOnPlane, p as drawCircle, r as drawingFillet, s as mirrorDrawing, t as drawingChamfer, u as translateDrawing, v as drawRectangle, w as draw, x as drawSingleEllipse, y as drawRoundedRectangle } from "./drawFns-D2u7C_7g.js";
|
|
3
|
+
import { a as Sketch, c as compoundSketchLoft, d as sketchFace, f as sketchLoft, h as sketchWires, i as Sketches, l as compoundSketchRevolve, m as sketchSweep, o as compoundSketchExtrude, p as sketchRevolve, s as compoundSketchFace, u as sketchExtrude, v as CompoundSketch } from "./textBlueprints-Dv4YWJrA.js";
|
|
4
4
|
//#region src/sketching.ts
|
|
5
5
|
/**
|
|
6
6
|
* brepjs/sketching — Sketcher, Drawing, and sketch-to-shape operations.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Z as getKernel, _ as isSolid, c as createSolid, g as isShell, h as isShape3D, i as createCompound, l as createVertex } from "./shapeTypes-
|
|
2
|
-
import { A as ok, R as unwrap, b as err, l as typeCastError, v as andThen } from "./errors-
|
|
3
|
-
import { _ as downcast, g as cast } from "./faceFns-
|
|
1
|
+
import { Z as getKernel, _ as isSolid, c as createSolid, g as isShell, h as isShape3D, i as createCompound, l as createVertex } from "./shapeTypes-D946X6Qx.js";
|
|
2
|
+
import { A as ok, R as unwrap, b as err, l as typeCastError, v as andThen } from "./errors-DOPT3OTg.js";
|
|
3
|
+
import { _ as downcast, g as cast } from "./faceFns-Druzi4mz.js";
|
|
4
4
|
//#region src/topology/shapeUtils.ts
|
|
5
5
|
/**
|
|
6
6
|
* Shape assembly utilities — welding and sewing operations.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_errors = require("./errors-
|
|
3
|
-
const require_faceFns = require("./faceFns-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-DRIhPf8A.cjs");
|
|
2
|
+
const require_errors = require("./errors-D9tBO0km.cjs");
|
|
3
|
+
const require_faceFns = require("./faceFns-DNOsmyRn.cjs");
|
|
4
4
|
//#region src/topology/shapeUtils.ts
|
|
5
5
|
/**
|
|
6
6
|
* Shape assembly utilities — welding and sewing operations.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Z as getKernel, a as createEdge, o as createFace, p as isFace, u as createWire, w as isPlanarFace } from "./shapeTypes-
|
|
2
|
-
import { A as ok, b as err, d as validationError, i as kernelError, v as andThen } from "./errors-
|
|
3
|
-
import { g as cast, l as outerWire } from "./faceFns-
|
|
1
|
+
import { Z as getKernel, a as createEdge, o as createFace, p as isFace, u as createWire, w as isPlanarFace } from "./shapeTypes-D946X6Qx.js";
|
|
2
|
+
import { A as ok, b as err, d as validationError, i as kernelError, v as andThen } from "./errors-DOPT3OTg.js";
|
|
3
|
+
import { g as cast, l as outerWire } from "./faceFns-Druzi4mz.js";
|
|
4
4
|
//#region src/utils/range.ts
|
|
5
5
|
/** Generate an array of integers `[0, 1, …, len - 1]`. */
|
|
6
6
|
function range(len) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_errors = require("./errors-
|
|
3
|
-
const require_faceFns = require("./faceFns-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-DRIhPf8A.cjs");
|
|
2
|
+
const require_errors = require("./errors-D9tBO0km.cjs");
|
|
3
|
+
const require_faceFns = require("./faceFns-DNOsmyRn.cjs");
|
|
4
4
|
//#region src/utils/range.ts
|
|
5
5
|
/** Generate an array of integers `[0, 1, …, len - 1]`. */
|
|
6
6
|
function range(len) {
|
package/dist/text.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_textBlueprints = require("./textBlueprints-
|
|
3
|
-
const require_textMetrics = require("./textMetrics-
|
|
2
|
+
const require_textBlueprints = require("./textBlueprints-CZ4MphXu.cjs");
|
|
3
|
+
const require_textMetrics = require("./textMetrics-BpmNTwLm.cjs");
|
|
4
4
|
exports.fontMetrics = require_textMetrics.fontMetrics;
|
|
5
5
|
exports.getFont = require_textBlueprints.getFont;
|
|
6
6
|
exports.loadFont = require_textBlueprints.loadFont;
|
package/dist/text.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as getFont, r as loadFont, t as textBlueprints } from "./textBlueprints-
|
|
2
|
-
import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-
|
|
1
|
+
import { n as getFont, r as loadFont, t as textBlueprints } from "./textBlueprints-Dv4YWJrA.js";
|
|
2
|
+
import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-Dvh4HzSZ.js";
|
|
3
3
|
export { fontMetrics, getFont, loadFont, sketchText, textBlueprints, textMetrics };
|
|
@@ -29,18 +29,18 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
29
29
|
enumerable: true
|
|
30
30
|
}) : target, mod));
|
|
31
31
|
//#endregion
|
|
32
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
33
|
-
const require_errors = require("./errors-
|
|
32
|
+
const require_shapeTypes = require("./shapeTypes-DRIhPf8A.cjs");
|
|
33
|
+
const require_errors = require("./errors-D9tBO0km.cjs");
|
|
34
34
|
const require_types = require("./types-KjA8tY4Y.cjs");
|
|
35
35
|
const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
|
|
36
|
-
const require_planeOps = require("./planeOps-
|
|
37
|
-
const require_faceFns = require("./faceFns-
|
|
38
|
-
const require_curveFns = require("./curveFns-
|
|
36
|
+
const require_planeOps = require("./planeOps-DTY92UCh.cjs");
|
|
37
|
+
const require_faceFns = require("./faceFns-DNOsmyRn.cjs");
|
|
38
|
+
const require_curveFns = require("./curveFns-ChkLRL8a.cjs");
|
|
39
39
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
40
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
41
|
-
const require_blueprintSketcher = require("./blueprintSketcher-
|
|
42
|
-
const require_solidBuilders = require("./solidBuilders-
|
|
43
|
-
const require_extrudeFns = require("./extrudeFns-
|
|
40
|
+
const require_surfaceBuilders = require("./surfaceBuilders-CZ7u_Xmi.cjs");
|
|
41
|
+
const require_blueprintSketcher = require("./blueprintSketcher-C1C9mJuK.cjs");
|
|
42
|
+
const require_solidBuilders = require("./solidBuilders-8PLYgzL9.cjs");
|
|
43
|
+
const require_extrudeFns = require("./extrudeFns-WYDSlEW8.cjs");
|
|
44
44
|
let opentype_js = require("opentype.js");
|
|
45
45
|
opentype_js = __toESM(opentype_js, 1);
|
|
46
46
|
//#region src/operations/loftFns.ts
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { Z as getKernel, h as isShape3D, o as createFace, p as isFace, t as castShape, u as createWire } from "./shapeTypes-
|
|
2
|
-
import { A as ok, R as unwrap, T as isOk, b as err, d as validationError, h as bug, i as kernelError, l as typeCastError, r as ioError, t as BrepErrorCode } from "./errors-
|
|
1
|
+
import { Z as getKernel, h as isShape3D, o as createFace, p as isFace, t as castShape, u as createWire } from "./shapeTypes-D946X6Qx.js";
|
|
2
|
+
import { A as ok, R as unwrap, T as isOk, b as err, d as validationError, h as bug, i as kernelError, l as typeCastError, r as ioError, t as BrepErrorCode } from "./errors-DOPT3OTg.js";
|
|
3
3
|
import { r as toVec3 } from "./types-D24Y27N0.js";
|
|
4
4
|
import { d as vecNormalize, h as vecScale, r as vecCross } from "./vecOps-SKPRvPH-.js";
|
|
5
|
-
import { n as createPlane } from "./planeOps-
|
|
6
|
-
import { _ as downcast, g as cast } from "./faceFns-
|
|
7
|
-
import { c as curveStartPoint, l as curveTangentAt } from "./curveFns-
|
|
5
|
+
import { n as createPlane } from "./planeOps-YTeuXs80.js";
|
|
6
|
+
import { _ as downcast, g as cast } from "./faceFns-Druzi4mz.js";
|
|
7
|
+
import { c as curveStartPoint, l as curveTangentAt } from "./curveFns-DHAvRosC.js";
|
|
8
8
|
import { n as getAtOrThrow, t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
9
|
-
import { i as makeNewFaceWithinFace, r as makeFace, t as addHolesInFace } from "./surfaceBuilders-
|
|
10
|
-
import { r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-
|
|
11
|
-
import { o as makeSolid, t as makeCompound } from "./solidBuilders-
|
|
12
|
-
import { c as sweep, i as complexExtrude, l as twistExtrude, r as revolve, t as extrude } from "./extrudeFns-
|
|
9
|
+
import { i as makeNewFaceWithinFace, r as makeFace, t as addHolesInFace } from "./surfaceBuilders-CUFC3tNT.js";
|
|
10
|
+
import { r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-DaqbMIfk.js";
|
|
11
|
+
import { o as makeSolid, t as makeCompound } from "./solidBuilders-2xiE6FDe.js";
|
|
12
|
+
import { c as sweep, i as complexExtrude, l as twistExtrude, r as revolve, t as extrude } from "./extrudeFns-WH0yd_Fb.js";
|
|
13
13
|
import opentype from "opentype.js";
|
|
14
14
|
//#region src/operations/loftFns.ts
|
|
15
15
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_textBlueprints = require("./textBlueprints-
|
|
2
|
-
const require_errors = require("./errors-
|
|
1
|
+
const require_textBlueprints = require("./textBlueprints-CZ4MphXu.cjs");
|
|
2
|
+
const require_errors = require("./errors-D9tBO0km.cjs");
|
|
3
3
|
//#region src/text/sketchText.ts
|
|
4
4
|
/**
|
|
5
5
|
* Render text as 3D sketch outlines on a plane.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as ok, b as err, d as validationError, t as BrepErrorCode } from "./errors-
|
|
2
|
-
import { g as wrapSketchData, i as Sketches, n as getFont, t as textBlueprints, v as CompoundSketch } from "./textBlueprints-
|
|
1
|
+
import { A as ok, b as err, d as validationError, t as BrepErrorCode } from "./errors-DOPT3OTg.js";
|
|
2
|
+
import { g as wrapSketchData, i as Sketches, n as getFont, t as textBlueprints, v as CompoundSketch } from "./textBlueprints-Dv4YWJrA.js";
|
|
3
3
|
//#region src/text/sketchText.ts
|
|
4
4
|
/**
|
|
5
5
|
* Render text as 3D sketch outlines on a plane.
|
|
@@ -63,11 +63,6 @@ export declare function mesh(shape: AnyShape<Dimension>, { tolerance, angularTol
|
|
|
63
63
|
export declare function meshEdges(shape: AnyShape<Dimension>, { tolerance, angularTolerance, cache }?: MeshOptions & {
|
|
64
64
|
cache?: boolean;
|
|
65
65
|
}): EdgeMesh;
|
|
66
|
-
/**
|
|
67
|
-
* Export a shape as a STEP file Blob.
|
|
68
|
-
*
|
|
69
|
-
* @returns Ok with a Blob (MIME type `application/STEP`), or Err on failure.
|
|
70
|
-
*/
|
|
71
66
|
export declare function exportSTEP(shape: AnyShape<Dimension>): Result<Blob>;
|
|
72
67
|
/**
|
|
73
68
|
* Export a shape as an STL file Blob.
|
|
@@ -16,6 +16,6 @@ export declare function isEqualShape(a: AnyShape<Dimension>, b: AnyShape<Dimensi
|
|
|
16
16
|
export declare function simplify<T extends AnyShape<Dimension>>(shape: T): Result<T>;
|
|
17
17
|
export { translate, rotate, mirror, scale, resize, applyMatrix, composeTransforms, transformCopy, } from './transformFns.js';
|
|
18
18
|
export type { TransformOp, ComposedTransform } from './transformFns.js';
|
|
19
|
-
export { getEdges, getFaces, getWires, getVertices, iterEdges, iterFaces, iterWires, iterVertices, getBounds, getCachedShapeKind, describe, vertexPosition, invalidateShapeCache, } from './topologyQueryFns.js';
|
|
19
|
+
export { getEdges, getFaces, getWires, getVertices, getSolids, getShells, getCompSolids, iterEdges, iterFaces, iterWires, iterVertices, iterSolids, iterShells, iterCompSolids, getBounds, getCachedShapeKind, describe, vertexPosition, invalidateShapeCache, } from './topologyQueryFns.js';
|
|
20
20
|
export type { Bounds3D, ShapeDescription } from './topologyQueryFns.js';
|
|
21
21
|
export { setShapeOrigin, getFaceOrigins, propagateOriginsFromEvolution, propagateOriginsByHash, } from './metadata/originTrackingFns.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { KernelShape, SurfaceType } from '../kernel/types.js';
|
|
2
|
-
import { AnyShape, Dimension, Edge, Face, Wire, Vertex, ShapeKind } from '../core/shapeTypes.js';
|
|
2
|
+
import { AnyShape, Dimension, Edge, Face, Wire, Vertex, Shell, Solid, CompSolid, ShapeKind } from '../core/shapeTypes.js';
|
|
3
3
|
import { Vec3 } from '../core/types.js';
|
|
4
4
|
/** @internal Cache entry type — exported for originTrackingFns and adjacencyFns. */
|
|
5
5
|
export interface TopoCacheEntry {
|
|
@@ -7,6 +7,9 @@ export interface TopoCacheEntry {
|
|
|
7
7
|
faces?: Face<Dimension>[];
|
|
8
8
|
wires?: Wire<Dimension>[];
|
|
9
9
|
vertices?: Vertex<Dimension>[];
|
|
10
|
+
shells?: Shell[];
|
|
11
|
+
solids?: Solid[];
|
|
12
|
+
compSolids?: CompSolid[];
|
|
10
13
|
faceOrigins?: Map<number, number>;
|
|
11
14
|
bounds?: Bounds3D;
|
|
12
15
|
isValid?: boolean;
|
|
@@ -40,6 +43,18 @@ export declare function getFaces<D extends Dimension>(shape: AnyShape<D>): Face<
|
|
|
40
43
|
export declare function getWires<D extends Dimension>(shape: AnyShape<D>): Wire<D>[];
|
|
41
44
|
/** Get all vertices of a shape as branded Vertex handles. Results are cached per shape. */
|
|
42
45
|
export declare function getVertices<D extends Dimension>(shape: AnyShape<D>): Vertex<D>[];
|
|
46
|
+
/**
|
|
47
|
+
* Get all solids of a shape as branded Solid handles. Results are cached per shape.
|
|
48
|
+
*
|
|
49
|
+
* Booleans (`cut`/`fuse`/`fuseAll`), `chamfer`/`fillet`, and some sweeps return a
|
|
50
|
+
* `Compound` wrapping the solid(s); use this to unwrap them without reaching into
|
|
51
|
+
* the kernel. Returns `[]` for shapes with no solids (wires, bare faces, shells).
|
|
52
|
+
*/
|
|
53
|
+
export declare function getSolids(shape: AnyShape<Dimension>): Solid[];
|
|
54
|
+
/** Get all shells of a shape as branded Shell handles. Results are cached per shape. */
|
|
55
|
+
export declare function getShells(shape: AnyShape<Dimension>): Shell[];
|
|
56
|
+
/** Get all compsolids of a shape as branded CompSolid handles. Results are cached per shape. */
|
|
57
|
+
export declare function getCompSolids(shape: AnyShape<Dimension>): CompSolid[];
|
|
43
58
|
/** Lazily iterate edges of a shape, yielding branded Edge handles one at a time. */
|
|
44
59
|
export declare function iterEdges<D extends Dimension>(shape: AnyShape<D>): Generator<Edge<D>>;
|
|
45
60
|
/** Lazily iterate faces of a shape, yielding branded Face handles one at a time. */
|
|
@@ -48,6 +63,12 @@ export declare function iterFaces<D extends Dimension>(shape: AnyShape<D>): Gene
|
|
|
48
63
|
export declare function iterWires<D extends Dimension>(shape: AnyShape<D>): Generator<Wire<D>>;
|
|
49
64
|
/** Lazily iterate vertices of a shape, yielding branded Vertex handles one at a time. */
|
|
50
65
|
export declare function iterVertices<D extends Dimension>(shape: AnyShape<D>): Generator<Vertex<D>>;
|
|
66
|
+
/** Lazily iterate solids of a shape, yielding branded Solid handles one at a time. */
|
|
67
|
+
export declare function iterSolids(shape: AnyShape<Dimension>): Generator<Solid>;
|
|
68
|
+
/** Lazily iterate shells of a shape, yielding branded Shell handles one at a time. */
|
|
69
|
+
export declare function iterShells(shape: AnyShape<Dimension>): Generator<Shell>;
|
|
70
|
+
/** Lazily iterate compsolids of a shape, yielding branded CompSolid handles one at a time. */
|
|
71
|
+
export declare function iterCompSolids(shape: AnyShape<Dimension>): Generator<CompSolid>;
|
|
51
72
|
/** Bounding box as a plain object. */
|
|
52
73
|
export interface Bounds3D {
|
|
53
74
|
readonly xMin: number;
|
package/dist/topology.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
-
const require_faceFns = require("./faceFns-
|
|
4
|
-
const require_shapeFns = require("./shapeFns-
|
|
5
|
-
const require_curveFns = require("./curveFns-
|
|
6
|
-
const require_meshFns = require("./meshFns-
|
|
7
|
-
const require_booleanFns = require("./booleanFns-
|
|
8
|
-
const require_primitiveFns = require("./primitiveFns-
|
|
2
|
+
const require_topologyQueryFns = require("./topologyQueryFns-esX6R5j4.cjs");
|
|
3
|
+
const require_faceFns = require("./faceFns-DNOsmyRn.cjs");
|
|
4
|
+
const require_shapeFns = require("./shapeFns-CSlSyyi1.cjs");
|
|
5
|
+
const require_curveFns = require("./curveFns-ChkLRL8a.cjs");
|
|
6
|
+
const require_meshFns = require("./meshFns-yusYccFx.cjs");
|
|
7
|
+
const require_booleanFns = require("./booleanFns-X-pT22Jh.cjs");
|
|
8
|
+
const require_primitiveFns = require("./primitiveFns-DzGTYy_l.cjs");
|
|
9
9
|
exports.addHoles = require_primitiveFns.addHoles;
|
|
10
10
|
exports.adjacentFaces = require_primitiveFns.adjacentFaces;
|
|
11
11
|
exports.approximateCurve = require_curveFns.approximateCurve;
|
package/dist/topology.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { _ as downcast, a as flipFaceOrientation, b as iterTopo, c as normalAt, d as projectPointOnFace, g as cast, h as asTopo, i as faceOrientation, 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, v as fromBREP, x as shapeType, y as isCompSolid } from "./faceFns-
|
|
3
|
-
import { a as isSameShape, i as isEqualShape, n as getHashCode } from "./shapeFns-
|
|
4
|
-
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-
|
|
5
|
-
import { c as createMeshCache, n as exportSTEP, r as exportSTL, s as clearMeshCache, t as exportIGES } from "./meshFns-
|
|
6
|
-
import { a as fuseAll, r as cutAll } from "./booleanFns-
|
|
7
|
-
import { $ as fuseAllBisect, 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 cutAllBisect, 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 sharedEdges, b as sphere, c as cylinder, ct as chamferDistAngle, d as ellipsoid, et as getNurbsCurveData, f as face, ft as toLineGeometryData, g as offsetFace, h as line, i as bsplineApprox, it as facesOfEdge, k as fixSelfIntersection, l as ellipse, lt as toBufferGeometryData, m as helix, n as bezier, nt as adjacentFaces, o as compound, ot as verticesOfEdge, p as filledFace, q as filletWithEvolution, r as box, rt as edgesOfFace, s as cone, st as wiresOfFace, t as addHoles, tt as getNurbsSurfaceData, u as ellipseArc, ut as toGroupedBufferGeometryData, v as sewShells, w as torus, x as subFace, y as solid } from "./primitiveFns-
|
|
1
|
+
import { S as vertexPosition, _ as iterFaces, b as iterVertices, c as getFaces, f as getVertices, g as iterEdges, m as invalidateShapeCache, n as getBounds, p as getWires, s as getEdges, x as iterWires } from "./topologyQueryFns-D5YTf9GW.js";
|
|
2
|
+
import { _ as downcast, a as flipFaceOrientation, b as iterTopo, c as normalAt, d as projectPointOnFace, g as cast, h as asTopo, i as faceOrientation, 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, v as fromBREP, x as shapeType, y as isCompSolid } from "./faceFns-Druzi4mz.js";
|
|
3
|
+
import { a as isSameShape, i as isEqualShape, n as getHashCode } from "./shapeFns-BYKFvtTb.js";
|
|
4
|
+
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-DHAvRosC.js";
|
|
5
|
+
import { c as createMeshCache, n as exportSTEP, r as exportSTL, s as clearMeshCache, t as exportIGES } from "./meshFns-CkzlLwZw.js";
|
|
6
|
+
import { a as fuseAll, r as cutAll } from "./booleanFns-Byv33KMu.js";
|
|
7
|
+
import { $ as fuseAllBisect, 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 cutAllBisect, 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 sharedEdges, b as sphere, c as cylinder, ct as chamferDistAngle, d as ellipsoid, et as getNurbsCurveData, f as face, ft as toLineGeometryData, g as offsetFace, h as line, i as bsplineApprox, it as facesOfEdge, k as fixSelfIntersection, l as ellipse, lt as toBufferGeometryData, m as helix, n as bezier, nt as adjacentFaces, o as compound, ot as verticesOfEdge, p as filledFace, q as filletWithEvolution, r as box, rt as edgesOfFace, s as cone, st as wiresOfFace, t as addHoles, tt as getNurbsSurfaceData, u as ellipseArc, ut as toGroupedBufferGeometryData, v as sewShells, w as torus, x as subFace, y as solid } from "./primitiveFns-CbpHBZdf.js";
|
|
8
8
|
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, cutAllBisect, 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, fuseAllBisect, 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 };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { N as getOrQueryType, R as DisposalScope, Y as _usingCtx, Z as getKernel, r as castShapeWithKnownType, t as castShape } from "./shapeTypes-
|
|
2
|
-
import { A as ok, b as err, f as getSuggestionForCode, p as translateKernelError } from "./errors-
|
|
1
|
+
import { N as getOrQueryType, R as DisposalScope, Y as _usingCtx, Z as getKernel, r as castShapeWithKnownType, t as castShape } from "./shapeTypes-D946X6Qx.js";
|
|
2
|
+
import { A as ok, b as err, f as getSuggestionForCode, p as translateKernelError } from "./errors-DOPT3OTg.js";
|
|
3
3
|
//#region src/core/kernelCall.ts
|
|
4
4
|
function buildError(kind, code, message, cause, suggestion) {
|
|
5
5
|
const base = {
|
|
@@ -164,6 +164,36 @@ function getVertices(shape) {
|
|
|
164
164
|
cache.vertices = vertices;
|
|
165
165
|
return vertices;
|
|
166
166
|
}
|
|
167
|
+
/**
|
|
168
|
+
* Get all solids of a shape as branded Solid handles. Results are cached per shape.
|
|
169
|
+
*
|
|
170
|
+
* Booleans (`cut`/`fuse`/`fuseAll`), `chamfer`/`fillet`, and some sweeps return a
|
|
171
|
+
* `Compound` wrapping the solid(s); use this to unwrap them without reaching into
|
|
172
|
+
* the kernel. Returns `[]` for shapes with no solids (wires, bare faces, shells).
|
|
173
|
+
*/
|
|
174
|
+
function getSolids(shape) {
|
|
175
|
+
const cache = getOrCreateCache(shape);
|
|
176
|
+
if (cache.solids) return cache.solids;
|
|
177
|
+
const solids = castSubShapes(shape.wrapped, "solid");
|
|
178
|
+
cache.solids = solids;
|
|
179
|
+
return solids;
|
|
180
|
+
}
|
|
181
|
+
/** Get all shells of a shape as branded Shell handles. Results are cached per shape. */
|
|
182
|
+
function getShells(shape) {
|
|
183
|
+
const cache = getOrCreateCache(shape);
|
|
184
|
+
if (cache.shells) return cache.shells;
|
|
185
|
+
const shells = castSubShapes(shape.wrapped, "shell");
|
|
186
|
+
cache.shells = shells;
|
|
187
|
+
return shells;
|
|
188
|
+
}
|
|
189
|
+
/** Get all compsolids of a shape as branded CompSolid handles. Results are cached per shape. */
|
|
190
|
+
function getCompSolids(shape) {
|
|
191
|
+
const cache = getOrCreateCache(shape);
|
|
192
|
+
if (cache.compSolids) return cache.compSolids;
|
|
193
|
+
const compSolids = castSubShapes(shape.wrapped, "compsolid");
|
|
194
|
+
cache.compSolids = compSolids;
|
|
195
|
+
return compSolids;
|
|
196
|
+
}
|
|
167
197
|
/** Lazily iterate edges of a shape, yielding branded Edge handles one at a time. */
|
|
168
198
|
function* iterEdges(shape) {
|
|
169
199
|
for (const e of getKernel().iterShapes(shape.wrapped, "edge")) yield castShapeWithKnownType(e, "edge");
|
|
@@ -180,6 +210,18 @@ function* iterWires(shape) {
|
|
|
180
210
|
function* iterVertices(shape) {
|
|
181
211
|
for (const v of getKernel().iterShapes(shape.wrapped, "vertex")) yield castShapeWithKnownType(v, "vertex");
|
|
182
212
|
}
|
|
213
|
+
/** Lazily iterate solids of a shape, yielding branded Solid handles one at a time. */
|
|
214
|
+
function* iterSolids(shape) {
|
|
215
|
+
for (const s of getKernel().iterShapes(shape.wrapped, "solid")) yield castShapeWithKnownType(s, "solid");
|
|
216
|
+
}
|
|
217
|
+
/** Lazily iterate shells of a shape, yielding branded Shell handles one at a time. */
|
|
218
|
+
function* iterShells(shape) {
|
|
219
|
+
for (const s of getKernel().iterShapes(shape.wrapped, "shell")) yield castShapeWithKnownType(s, "shell");
|
|
220
|
+
}
|
|
221
|
+
/** Lazily iterate compsolids of a shape, yielding branded CompSolid handles one at a time. */
|
|
222
|
+
function* iterCompSolids(shape) {
|
|
223
|
+
for (const s of getKernel().iterShapes(shape.wrapped, "compsolid")) yield castShapeWithKnownType(s, "compsolid");
|
|
224
|
+
}
|
|
183
225
|
/** Get the axis-aligned bounding box of a shape. Cached per shape. */
|
|
184
226
|
function getBounds(shape) {
|
|
185
227
|
const cache = getOrCreateCache(shape);
|
|
@@ -233,4 +275,4 @@ function vertexPosition(vertex) {
|
|
|
233
275
|
return getKernel().vertexPosition(vertex.wrapped);
|
|
234
276
|
}
|
|
235
277
|
//#endregion
|
|
236
|
-
export { kernelCall as _, getCachedSurfaceType as a,
|
|
278
|
+
export { kernelCall as C, vertexPosition as S, kernelCallScoped as T, iterFaces as _, getCachedSurfaceType as a, iterVertices as b, getFaces as c, getSolids as d, getVertices as f, iterEdges as g, iterCompSolids as h, getCachedIsValid as i, getOrCreateCache as l, invalidateShapeCache as m, getBounds as n, getCompSolids as o, getWires as p, getCacheEntry as r, getEdges as s, describe as t, getShells as u, iterShells as v, kernelCallRaw as w, iterWires as x, iterSolids as y };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
-
const require_errors = require("./errors-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-DRIhPf8A.cjs");
|
|
2
|
+
const require_errors = require("./errors-D9tBO0km.cjs");
|
|
3
3
|
//#region src/core/kernelCall.ts
|
|
4
4
|
function buildError(kind, code, message, cause, suggestion) {
|
|
5
5
|
const base = {
|
|
@@ -164,6 +164,36 @@ function getVertices(shape) {
|
|
|
164
164
|
cache.vertices = vertices;
|
|
165
165
|
return vertices;
|
|
166
166
|
}
|
|
167
|
+
/**
|
|
168
|
+
* Get all solids of a shape as branded Solid handles. Results are cached per shape.
|
|
169
|
+
*
|
|
170
|
+
* Booleans (`cut`/`fuse`/`fuseAll`), `chamfer`/`fillet`, and some sweeps return a
|
|
171
|
+
* `Compound` wrapping the solid(s); use this to unwrap them without reaching into
|
|
172
|
+
* the kernel. Returns `[]` for shapes with no solids (wires, bare faces, shells).
|
|
173
|
+
*/
|
|
174
|
+
function getSolids(shape) {
|
|
175
|
+
const cache = getOrCreateCache(shape);
|
|
176
|
+
if (cache.solids) return cache.solids;
|
|
177
|
+
const solids = castSubShapes(shape.wrapped, "solid");
|
|
178
|
+
cache.solids = solids;
|
|
179
|
+
return solids;
|
|
180
|
+
}
|
|
181
|
+
/** Get all shells of a shape as branded Shell handles. Results are cached per shape. */
|
|
182
|
+
function getShells(shape) {
|
|
183
|
+
const cache = getOrCreateCache(shape);
|
|
184
|
+
if (cache.shells) return cache.shells;
|
|
185
|
+
const shells = castSubShapes(shape.wrapped, "shell");
|
|
186
|
+
cache.shells = shells;
|
|
187
|
+
return shells;
|
|
188
|
+
}
|
|
189
|
+
/** Get all compsolids of a shape as branded CompSolid handles. Results are cached per shape. */
|
|
190
|
+
function getCompSolids(shape) {
|
|
191
|
+
const cache = getOrCreateCache(shape);
|
|
192
|
+
if (cache.compSolids) return cache.compSolids;
|
|
193
|
+
const compSolids = castSubShapes(shape.wrapped, "compsolid");
|
|
194
|
+
cache.compSolids = compSolids;
|
|
195
|
+
return compSolids;
|
|
196
|
+
}
|
|
167
197
|
/** Lazily iterate edges of a shape, yielding branded Edge handles one at a time. */
|
|
168
198
|
function* iterEdges(shape) {
|
|
169
199
|
for (const e of require_shapeTypes.getKernel().iterShapes(shape.wrapped, "edge")) yield require_shapeTypes.castShapeWithKnownType(e, "edge");
|
|
@@ -180,6 +210,18 @@ function* iterWires(shape) {
|
|
|
180
210
|
function* iterVertices(shape) {
|
|
181
211
|
for (const v of require_shapeTypes.getKernel().iterShapes(shape.wrapped, "vertex")) yield require_shapeTypes.castShapeWithKnownType(v, "vertex");
|
|
182
212
|
}
|
|
213
|
+
/** Lazily iterate solids of a shape, yielding branded Solid handles one at a time. */
|
|
214
|
+
function* iterSolids(shape) {
|
|
215
|
+
for (const s of require_shapeTypes.getKernel().iterShapes(shape.wrapped, "solid")) yield require_shapeTypes.castShapeWithKnownType(s, "solid");
|
|
216
|
+
}
|
|
217
|
+
/** Lazily iterate shells of a shape, yielding branded Shell handles one at a time. */
|
|
218
|
+
function* iterShells(shape) {
|
|
219
|
+
for (const s of require_shapeTypes.getKernel().iterShapes(shape.wrapped, "shell")) yield require_shapeTypes.castShapeWithKnownType(s, "shell");
|
|
220
|
+
}
|
|
221
|
+
/** Lazily iterate compsolids of a shape, yielding branded CompSolid handles one at a time. */
|
|
222
|
+
function* iterCompSolids(shape) {
|
|
223
|
+
for (const s of require_shapeTypes.getKernel().iterShapes(shape.wrapped, "compsolid")) yield require_shapeTypes.castShapeWithKnownType(s, "compsolid");
|
|
224
|
+
}
|
|
183
225
|
/** Get the axis-aligned bounding box of a shape. Cached per shape. */
|
|
184
226
|
function getBounds(shape) {
|
|
185
227
|
const cache = getOrCreateCache(shape);
|
|
@@ -263,6 +305,12 @@ Object.defineProperty(exports, "getCachedSurfaceType", {
|
|
|
263
305
|
return getCachedSurfaceType;
|
|
264
306
|
}
|
|
265
307
|
});
|
|
308
|
+
Object.defineProperty(exports, "getCompSolids", {
|
|
309
|
+
enumerable: true,
|
|
310
|
+
get: function() {
|
|
311
|
+
return getCompSolids;
|
|
312
|
+
}
|
|
313
|
+
});
|
|
266
314
|
Object.defineProperty(exports, "getEdges", {
|
|
267
315
|
enumerable: true,
|
|
268
316
|
get: function() {
|
|
@@ -281,6 +329,18 @@ Object.defineProperty(exports, "getOrCreateCache", {
|
|
|
281
329
|
return getOrCreateCache;
|
|
282
330
|
}
|
|
283
331
|
});
|
|
332
|
+
Object.defineProperty(exports, "getShells", {
|
|
333
|
+
enumerable: true,
|
|
334
|
+
get: function() {
|
|
335
|
+
return getShells;
|
|
336
|
+
}
|
|
337
|
+
});
|
|
338
|
+
Object.defineProperty(exports, "getSolids", {
|
|
339
|
+
enumerable: true,
|
|
340
|
+
get: function() {
|
|
341
|
+
return getSolids;
|
|
342
|
+
}
|
|
343
|
+
});
|
|
284
344
|
Object.defineProperty(exports, "getVertices", {
|
|
285
345
|
enumerable: true,
|
|
286
346
|
get: function() {
|
|
@@ -299,6 +359,12 @@ Object.defineProperty(exports, "invalidateShapeCache", {
|
|
|
299
359
|
return invalidateShapeCache;
|
|
300
360
|
}
|
|
301
361
|
});
|
|
362
|
+
Object.defineProperty(exports, "iterCompSolids", {
|
|
363
|
+
enumerable: true,
|
|
364
|
+
get: function() {
|
|
365
|
+
return iterCompSolids;
|
|
366
|
+
}
|
|
367
|
+
});
|
|
302
368
|
Object.defineProperty(exports, "iterEdges", {
|
|
303
369
|
enumerable: true,
|
|
304
370
|
get: function() {
|
|
@@ -311,6 +377,18 @@ Object.defineProperty(exports, "iterFaces", {
|
|
|
311
377
|
return iterFaces;
|
|
312
378
|
}
|
|
313
379
|
});
|
|
380
|
+
Object.defineProperty(exports, "iterShells", {
|
|
381
|
+
enumerable: true,
|
|
382
|
+
get: function() {
|
|
383
|
+
return iterShells;
|
|
384
|
+
}
|
|
385
|
+
});
|
|
386
|
+
Object.defineProperty(exports, "iterSolids", {
|
|
387
|
+
enumerable: true,
|
|
388
|
+
get: function() {
|
|
389
|
+
return iterSolids;
|
|
390
|
+
}
|
|
391
|
+
});
|
|
314
392
|
Object.defineProperty(exports, "iterVertices", {
|
|
315
393
|
enumerable: true,
|
|
316
394
|
get: function() {
|
package/dist/vectors.cjs
CHANGED
|
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
2
2
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
3
3
|
const require_types = require("./types-KjA8tY4Y.cjs");
|
|
4
4
|
const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
|
|
5
|
-
const require_planeOps = require("./planeOps-
|
|
5
|
+
const require_planeOps = require("./planeOps-DTY92UCh.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-ITRzCnCp.js";
|
|
2
2
|
import { n as toVec2, r as toVec3, t as resolveDirection } from "./types-D24Y27N0.js";
|
|
3
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-SKPRvPH-.js";
|
|
4
|
-
import { i as pivotPlane, n as createPlane, o as resolvePlane, s as translatePlane, t as createNamedPlane } from "./planeOps-
|
|
4
|
+
import { i as pivotPlane, n as createPlane, o as resolvePlane, s as translatePlane, t as createNamedPlane } from "./planeOps-YTeuXs80.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": "18.
|
|
3
|
+
"version": "18.35.0",
|
|
4
4
|
"description": "Web CAD library with pluggable geometry kernel",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cad",
|
|
@@ -24,6 +24,9 @@
|
|
|
24
24
|
"workspaces": [
|
|
25
25
|
"packages/brepjs-opencascade",
|
|
26
26
|
"packages/brepjs-bim",
|
|
27
|
+
"packages/brepjs-manifold",
|
|
28
|
+
"packages/brepjs-agent",
|
|
29
|
+
"packages/brepjs-viewer",
|
|
27
30
|
"apps/playground",
|
|
28
31
|
"apps/docs"
|
|
29
32
|
],
|
|
@@ -247,6 +250,7 @@
|
|
|
247
250
|
"@eslint/js": "10.0.1",
|
|
248
251
|
"@size-limit/file": "12.1.0",
|
|
249
252
|
"@types/opentype.js": "1.3.9",
|
|
253
|
+
"@types/react": "19.2.14",
|
|
250
254
|
"@vitest/coverage-v8": "4.1.6",
|
|
251
255
|
"brepjs-opencascade": "*",
|
|
252
256
|
"brepkit-wasm": "2.101.2",
|
|
@@ -269,11 +273,15 @@
|
|
|
269
273
|
"vitest": "4.1.6"
|
|
270
274
|
},
|
|
271
275
|
"peerDependencies": {
|
|
276
|
+
"brepjs-manifold": "^0.1.0",
|
|
272
277
|
"brepjs-opencascade": "^0.5.1 || ^0.6.0 || ^0.7.0 || ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^0.14.0 || ^0.15.0 || ^0.16.0",
|
|
273
278
|
"brepkit-wasm": "^0.10.1 || ^1.0.0 || ^2.0.0",
|
|
274
279
|
"occt-wasm": "^3.0.0"
|
|
275
280
|
},
|
|
276
281
|
"peerDependenciesMeta": {
|
|
282
|
+
"brepjs-manifold": {
|
|
283
|
+
"optional": true
|
|
284
|
+
},
|
|
277
285
|
"brepjs-opencascade": {
|
|
278
286
|
"optional": true
|
|
279
287
|
},
|