brepjs 18.84.0 → 18.85.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/README.md +13 -3
- package/dist/2d/lib/definitions.d.ts +4 -1
- package/dist/2d.cjs +6 -6
- package/dist/2d.js +6 -6
- package/dist/{blueprint-krPp-yxy.js → blueprint-BL2TdtBX.js} +5 -5
- package/dist/{blueprint-TE6QbbrL.cjs → blueprint-KrNFTiyX.cjs} +5 -5
- package/dist/{blueprintFns-Cnx8Pwsc.js → blueprintFns-DCA97w4C.js} +2 -2
- package/dist/{blueprintFns-BHzvNR9P.cjs → blueprintFns-Dp0_BOuL.cjs} +2 -2
- package/dist/{blueprintSketcher-BgQ4HUQS.cjs → blueprintSketcher-ChpPo7tq.cjs} +3 -3
- package/dist/{blueprintSketcher-BgJ92ofq.js → blueprintSketcher-CxFmYBvh.js} +3 -3
- package/dist/{boolean2D-C5RQKxsG.js → boolean2D-CIohnI9l.js} +4 -4
- package/dist/{boolean2D-Bm57seK7.cjs → boolean2D-RC6jXv4x.cjs} +4 -4
- package/dist/brepjs.cjs +40 -26
- package/dist/brepjs.js +45 -31
- package/dist/{cameraFns-Dr6husIP.js → cameraFns-BA7CVtWJ.js} +2 -2
- package/dist/{cameraFns-CyH0eFkv.cjs → cameraFns-IL7qYFaG.cjs} +2 -2
- package/dist/core/kernelBoundary.d.ts +12 -3
- package/dist/core/planeOps.d.ts +4 -1
- package/dist/core/shapeTypeCache.d.ts +8 -2
- package/dist/core/typeDiscriminants.d.ts +1 -0
- package/dist/core.cjs +1 -1
- package/dist/core.js +1 -1
- package/dist/{cornerFinder-CEbdh48G.js → cornerFinder-7M1wdtcY.js} +1 -1
- package/dist/{cornerFinder-DXhDNSVO.cjs → cornerFinder-DKyR_u8g.cjs} +1 -1
- package/dist/{curveFns-ZfGUUd8h.cjs → curveFns-D3k8aHIE.cjs} +1 -1
- package/dist/{curveFns-BMvOjgAe.js → curveFns-DT1yMgBI.js} +1 -1
- package/dist/{drawFns-NN_2dIb7.js → drawFns-C63kOWvC.js} +12 -12
- package/dist/{drawFns-DwxukBbB.cjs → drawFns-C766Umy1.cjs} +12 -12
- package/dist/{faceFns-CfCwtCKM.js → faceFns-CmhEEB-L.js} +2 -2
- package/dist/{faceFns-CEhhzLpI.cjs → faceFns-DSdVqqVP.cjs} +2 -2
- package/dist/{healingFns-4FJFU89Q.cjs → healingFns-B1axWCr3.cjs} +5 -5
- package/dist/{healingFns-Db0sWtJD.js → healingFns-Cxi24K_n.js} +5 -5
- package/dist/{helpers-BMg3VK6f.js → helpers-CKjmUSf0.js} +6 -6
- package/dist/{helpers-BsPWHGEz.cjs → helpers-Cvrmxw4s.cjs} +6 -6
- package/dist/{importFns-DAxR2wFw.js → importFns-CDaNqu4H.js} +2 -2
- package/dist/{importFns-YD2jjXSP.cjs → importFns-D09lb1dB.cjs} +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/io.cjs +2 -2
- package/dist/io.js +2 -2
- package/dist/kernel/brepkit/kernel2dOps.d.ts +1 -1
- package/dist/{loftFns-D4xbMwPh.cjs → loftFns-C664R57e.cjs} +1 -1
- package/dist/{loftFns-BLwuVjwA.js → loftFns-C8Ep9McS.js} +1 -1
- package/dist/{measureFns-Bsu3HKAh.cjs → measureFns-BtPAmRfH.cjs} +3 -3
- package/dist/{measureFns-DcU_ZNtw.js → measureFns-D0e8tGSP.js} +3 -3
- package/dist/measurement/measureCache.d.ts +1 -0
- package/dist/measurement.cjs +1 -1
- package/dist/measurement.js +1 -1
- package/dist/{meshFns-C_r1wsG-.cjs → meshFns-7IXB_Bua.cjs} +3 -3
- package/dist/{meshFns-4yXoFw_7.js → meshFns-CtchqgDR.js} +3 -3
- package/dist/operations/exporters.d.ts +1 -0
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/{primitiveFns-CdBx3Q-K.cjs → primitiveFns-Bdqm8wjI.cjs} +4 -4
- package/dist/{primitiveFns-Cbg94cAE.js → primitiveFns-D7R24hoz.js} +4 -4
- package/dist/projection.cjs +1 -1
- package/dist/projection.js +1 -1
- package/dist/query.cjs +2 -2
- package/dist/query.js +2 -2
- package/dist/{shapeFns-C0K2yQlH.js → shapeFns-B0lN3o3r.js} +2 -2
- package/dist/{shapeFns-C00nTg4m.cjs → shapeFns-CeSEceUG.cjs} +2 -2
- package/dist/shapeRef.cjs +1 -1
- package/dist/shapeRef.js +1 -1
- package/dist/{shapeRefFns-DuGh1xIA.cjs → shapeRefFns-BsX2j-n3.cjs} +4 -4
- package/dist/{shapeRefFns-BEm9-eG3.js → shapeRefFns-C4JSc_jF.js} +4 -4
- package/dist/{shapeTypes-CL5wYLDw.js → shapeTypes-BIcALNFv.js} +50 -4
- package/dist/{shapeTypes-BHoIVN7I.cjs → shapeTypes-DwNTiXjG.cjs} +50 -4
- package/dist/sketching/compoundSketch.d.ts +8 -2
- package/dist/sketching/sketch.d.ts +8 -3
- package/dist/sketching/sketchFns.d.ts +12 -4
- package/dist/sketching/sketches.d.ts +24 -5
- package/dist/sketching.cjs +3 -3
- package/dist/sketching.js +3 -3
- package/dist/{solidBuilders-C73RAr6j.cjs → solidBuilders-B_5FgvuK.cjs} +5 -5
- package/dist/{solidBuilders-Bp_Gf3y_.js → solidBuilders-Bb5_uC7F.js} +5 -5
- package/dist/{surfaceBuilders-DObQZa60.js → surfaceBuilders-BQx3TjMH.js} +2 -2
- package/dist/{surfaceBuilders-7QLWQwje.cjs → surfaceBuilders-DvpxHHIm.cjs} +2 -2
- package/dist/text.cjs +2 -2
- package/dist/text.js +2 -2
- package/dist/{textBlueprints-FGsoRUZ4.cjs → textBlueprints-CKFmYJHD.cjs} +70 -19
- package/dist/{textBlueprints-Dvp_j93V.js → textBlueprints-CU7MHMR8.js} +70 -19
- package/dist/{textMetrics-rFF3uFYC.js → textMetrics-BDTWvvyd.js} +1 -1
- package/dist/{textMetrics-BZbM75gl.cjs → textMetrics-BYHtOFYW.cjs} +1 -1
- package/dist/{threadFns-CYXs_rE1.js → threadFns-BWAL8cAZ.js} +6 -6
- package/dist/{threadFns-BNidejyc.cjs → threadFns-BsRDNoSm.cjs} +6 -6
- package/dist/topology/api.d.ts +4 -0
- package/dist/topology.cjs +8 -8
- package/dist/topology.js +8 -8
- package/dist/{topologyQueryFns-BtyNquQX.js → topologyQueryFns-0BIOC7YH.js} +1 -1
- package/dist/{topologyQueryFns-CJYc4A0j.cjs → topologyQueryFns-a2i0YhGF.cjs} +1 -1
- package/dist/utils/vec2d.d.ts +4 -1
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -38,14 +38,14 @@ const step = unwrap(exportSTEP(part));
|
|
|
38
38
|
|
|
39
39
|
brepjs grew out of the love and care I put into [gridfinitylayouttool.com](https://gridfinitylayouttool.com). I needed parametric CAD in the browser and I'm not a 3D modeler, but I know TypeScript. [OpenSCAD](https://openscad.org/) nailed code-first CAD but lives outside the JS ecosystem. [replicad](https://replicad.xyz/) proved OpenCascade works in JS but I kept hitting performance walls and fighting the API.
|
|
40
40
|
|
|
41
|
-
Neither had the type safety I wanted, so brepjs leans hard on it: branded types, `Result<T,E>`, phantom types that prove invariants at compile time. If it compiles, the geometry is valid.
|
|
41
|
+
Neither had the type safety I wanted, so brepjs leans hard on it: branded types, `Result<T,E>`, phantom types that prove invariants at compile time. If it compiles, the geometry is valid. It's strongest at exact, manufacturable geometry — precise booleans, fillets, chamfers and shells; real volumes, areas and clearances; watertight solids that round-trip through STEP — from a single part to a full assembly (enclosures, brackets, fixtures, gridfinity bins, machined and molded parts). It isn't built for organic sculpting or dense lattices; that's what field-based (implicit/voxel) modeling is for.
|
|
42
42
|
|
|
43
43
|
## Scope
|
|
44
44
|
|
|
45
45
|
To set expectations, this project deliberately does not:
|
|
46
46
|
|
|
47
47
|
- **Render or display geometry**: brepjs produces shape data; pass mesh output to Three.js, Babylon.js, or raw WebGL for rendering.
|
|
48
|
-
- **Support organic or sculpting workflows**:
|
|
48
|
+
- **Support organic or sculpting workflows**: brepjs models exact mechanical solids — parts and assemblies; freeform/organic sculpting and dense lattices are out of scope (that's field-based implicit/voxel territory).
|
|
49
49
|
- **Output SVG or 2D files**: 2D drawing primitives exist solely as an intermediate step toward extruded 3D solids, not as a standalone 2D output format.
|
|
50
50
|
- **Run server-side (SSR)**: WASM requires a browser or Node.js environment with WASM support; server-side rendering frameworks (Next.js, Nuxt, Remix) need a client-only import.
|
|
51
51
|
- **Provide a GUI**: brepjs is a pure programmatic API; there is no visual editor, viewport, or file picker.
|
|
@@ -105,7 +105,7 @@ Imports flow downward only. Boundaries are enforced in CI.
|
|
|
105
105
|
|
|
106
106
|
## Authoring CAD with AI (brepjs-verify)
|
|
107
107
|
|
|
108
|
-
[`brepjs-verify`](https://www.npmjs.com/package/brepjs-verify) helps an AI agent (or you) author
|
|
108
|
+
[`brepjs-verify`](https://www.npmjs.com/package/brepjs-verify) helps an AI agent (or you) author CAD in brepjs and **prove it is correct** before handing it off. An LLM can't see geometry, so it writes a `.brep.ts` part, runs it on a real kernel, and reads a deterministic report instead of guessing from how the code reads. It ships as two cooperating pieces: a **Claude Code skill** (the authoring loop) and a **verification CLI** (validity + measured dimensions + multi-view snapshots + STEP export).
|
|
109
109
|
|
|
110
110
|
Install both; they ride on two rails:
|
|
111
111
|
|
|
@@ -141,6 +141,16 @@ The command exits non-zero unless the report is `ok` (valid **and** every declar
|
|
|
141
141
|
|
|
142
142
|
See [CONTRIBUTING.md](./CONTRIBUTING.md) for development setup and guidelines.
|
|
143
143
|
|
|
144
|
+
## Acknowledgements
|
|
145
|
+
|
|
146
|
+
brepjs.dev and the playground are hosted on [Vercel](https://vercel.com) through its Open Source Program.
|
|
147
|
+
|
|
148
|
+
<div align="center">
|
|
149
|
+
<a href="https://vercel.com/open-source-program">
|
|
150
|
+
<img alt="Vercel OSS Program" src="https://vercel.com/oss/program-badge-2026.svg" />
|
|
151
|
+
</a>
|
|
152
|
+
</div>
|
|
153
|
+
|
|
144
154
|
## License
|
|
145
155
|
|
|
146
156
|
[Apache-2.0](./LICENSE)
|
|
@@ -5,5 +5,8 @@ export type { Point2D } from '../../utils/vec2d.js';
|
|
|
5
5
|
export declare function isPoint2D(point: unknown): point is Point2D;
|
|
6
6
|
/** A 2x2 matrix represented as two row tuples. */
|
|
7
7
|
export type Matrix2X2 = [[number, number], [number, number]];
|
|
8
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* Type guard that checks whether a value is a `Matrix2X2`.
|
|
10
|
+
* @testOnly Exercised by tests/definitions.test.ts.
|
|
11
|
+
*/
|
|
9
12
|
export declare function isMatrix2X2(matrix: unknown): matrix is Matrix2X2;
|
package/dist/2d.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
+
const require_shapeTypes = require("./shapeTypes-DwNTiXjG.cjs");
|
|
3
3
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
4
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
5
|
-
const require_blueprintSketcher = require("./blueprintSketcher-
|
|
6
|
-
const require_blueprint = require("./blueprint-
|
|
7
|
-
const require_boolean2D = require("./boolean2D-
|
|
8
|
-
const require_blueprintFns = require("./blueprintFns-
|
|
4
|
+
const require_topologyQueryFns = require("./topologyQueryFns-a2i0YhGF.cjs");
|
|
5
|
+
const require_blueprintSketcher = require("./blueprintSketcher-ChpPo7tq.cjs");
|
|
6
|
+
const require_blueprint = require("./blueprint-KrNFTiyX.cjs");
|
|
7
|
+
const require_boolean2D = require("./boolean2D-RC6jXv4x.cjs");
|
|
8
|
+
const require_blueprintFns = require("./blueprintFns-Dp0_BOuL.cjs");
|
|
9
9
|
//#region src/core/curve2dHandle.ts
|
|
10
10
|
/**
|
|
11
11
|
* Wrap a raw kernel 2D curve handle with brand + disposal tracking.
|
package/dist/2d.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { B as createKernelHandle, Q as getKernel2D, a as createEdge } from "./shapeTypes-
|
|
1
|
+
import { B as createKernelHandle, Q as getKernel2D, a as createEdge } from "./shapeTypes-BIcALNFv.js";
|
|
2
2
|
import { A as ok, b as err, d as validationError, t as BrepErrorCode } from "./errors-DNWJsfVU.js";
|
|
3
|
-
import { w as kernelCallRaw } from "./topologyQueryFns-
|
|
4
|
-
import { a as Blueprints, i as CompoundBlueprint, r as organiseBlueprints } from "./blueprintSketcher-
|
|
5
|
-
import { _ as Curve2D, t as Blueprint, y as BoundingBox2d } from "./blueprint-
|
|
6
|
-
import { a as fuseBlueprints, c as roundedRectangleBlueprint, i as cutBlueprints, n as fuse2D, o as intersectBlueprints, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-
|
|
7
|
-
import { S as reverseCurve, _ as curve2dIsOnCurve, a as isInside2D, b as curve2dSplitAt, c as scale2D, d as stretch2D, f as toSVGPathD, g as curve2dFirstPoint, h as curve2dDistanceFrom, i as getOrientation2D, l as sketchOnFace2D, m as curve2dBoundingBox, o as mirror2D, p as translate2D, r as getBounds2D, s as rotate2D, t as createBlueprint, u as sketchOnPlane2D, v as curve2dLastPoint, x as curve2dTangentAt, y as curve2dParameter } from "./blueprintFns-
|
|
3
|
+
import { w as kernelCallRaw } from "./topologyQueryFns-0BIOC7YH.js";
|
|
4
|
+
import { a as Blueprints, i as CompoundBlueprint, r as organiseBlueprints } from "./blueprintSketcher-CxFmYBvh.js";
|
|
5
|
+
import { _ as Curve2D, t as Blueprint, y as BoundingBox2d } from "./blueprint-BL2TdtBX.js";
|
|
6
|
+
import { a as fuseBlueprints, c as roundedRectangleBlueprint, i as cutBlueprints, n as fuse2D, o as intersectBlueprints, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-CIohnI9l.js";
|
|
7
|
+
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-DCA97w4C.js";
|
|
8
8
|
//#region src/core/curve2dHandle.ts
|
|
9
9
|
/**
|
|
10
10
|
* Wrap a raw kernel 2D curve handle with brand + disposal tracking.
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { G as unregisterFromCleanup, Q as getKernel2D, U as registerForCleanup, Z as getKernel, a as createEdge, u as createWire } from "./shapeTypes-
|
|
1
|
+
import { G as unregisterFromCleanup, Q as getKernel2D, U as registerForCleanup, Z as getKernel, a as createEdge, u as createWire } from "./shapeTypes-BIcALNFv.js";
|
|
2
2
|
import { n as wasmIndex } from "./vec3-Dpha8d5k.js";
|
|
3
3
|
import { A as ok, R as unwrap, b as err, d as validationError, h as bug, n as computationError } from "./errors-DNWJsfVU.js";
|
|
4
4
|
import { r as RAD2DEG, t as DEG2RAD } from "./constants-ITRzCnCp.js";
|
|
5
5
|
import { r as toVec3 } from "./types-D24Y27N0.js";
|
|
6
6
|
import { r as makePlane } from "./planeOps-DSjjtrjg.js";
|
|
7
|
-
import { _ as cast, h as uvCoordinates, i as faceGeomType, m as uvBounds, r as faceCenter } from "./faceFns-
|
|
8
|
-
import { p as getOrientation } from "./curveFns-
|
|
7
|
+
import { _ as cast, h as uvCoordinates, i as faceGeomType, m as uvBounds, r as faceCenter } from "./faceFns-CmhEEB-L.js";
|
|
8
|
+
import { p as getOrientation } from "./curveFns-DT1yMgBI.js";
|
|
9
9
|
import { n as getAtOrThrow, r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
10
|
-
import { r as makeFace } from "./surfaceBuilders-
|
|
11
|
-
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 { r as makeFace } from "./surfaceBuilders-BQx3TjMH.js";
|
|
11
|
+
import { _ as samePoint, b as subtract2d, l as add2d, o as normalize2d, p as distance2d, t as getSingleFace, v as scalarMultiply2d } from "./helpers-CKjmUSf0.js";
|
|
12
12
|
//#region src/2d/lib/definitions.ts
|
|
13
13
|
/** Type guard that checks whether a value is a `Point2D`. */
|
|
14
14
|
function isPoint2D(point) {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-DwNTiXjG.cjs");
|
|
2
2
|
const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
|
|
3
3
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
4
4
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
5
5
|
const require_types = require("./types-KjA8tY4Y.cjs");
|
|
6
6
|
const require_planeOps = require("./planeOps-BA4HfgQu.cjs");
|
|
7
|
-
const require_faceFns = require("./faceFns-
|
|
8
|
-
const require_curveFns = require("./curveFns-
|
|
7
|
+
const require_faceFns = require("./faceFns-DSdVqqVP.cjs");
|
|
8
|
+
const require_curveFns = require("./curveFns-D3k8aHIE.cjs");
|
|
9
9
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
10
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
11
|
-
const require_helpers = require("./helpers-
|
|
10
|
+
const require_surfaceBuilders = require("./surfaceBuilders-DvpxHHIm.cjs");
|
|
11
|
+
const require_helpers = require("./helpers-Cvrmxw4s.cjs");
|
|
12
12
|
//#region src/2d/lib/definitions.ts
|
|
13
13
|
/** Type guard that checks whether a value is a `Point2D`. */
|
|
14
14
|
function isPoint2D(point) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { A as ok, b as err, d as validationError, t as BrepErrorCode } from "./errors-DNWJsfVU.js";
|
|
2
|
-
import { i as CompoundBlueprint } from "./blueprintSketcher-
|
|
3
|
-
import { t as Blueprint } from "./blueprint-
|
|
2
|
+
import { i as CompoundBlueprint } from "./blueprintSketcher-CxFmYBvh.js";
|
|
3
|
+
import { t as Blueprint } from "./blueprint-BL2TdtBX.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-CXJtc4I7.cjs");
|
|
2
|
-
const require_blueprintSketcher = require("./blueprintSketcher-
|
|
3
|
-
const require_blueprint = require("./blueprint-
|
|
2
|
+
const require_blueprintSketcher = require("./blueprintSketcher-ChpPo7tq.cjs");
|
|
3
|
+
const require_blueprint = require("./blueprint-KrNFTiyX.cjs");
|
|
4
4
|
//#region src/2d/lib/curve2dFns.ts
|
|
5
5
|
/**
|
|
6
6
|
* Return a reversed copy of the curve (non-mutating).
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-DwNTiXjG.cjs");
|
|
2
2
|
const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
|
|
3
3
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
4
4
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
5
5
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
6
|
-
const require_helpers = require("./helpers-
|
|
7
|
-
const require_blueprint = require("./blueprint-
|
|
6
|
+
const require_helpers = require("./helpers-Cvrmxw4s.cjs");
|
|
7
|
+
const require_blueprint = require("./blueprint-KrNFTiyX.cjs");
|
|
8
8
|
//#region node_modules/flatqueue/index.js
|
|
9
9
|
/**
|
|
10
10
|
* @typedef {Float64ArrayConstructor | Float32ArrayConstructor |
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Q as getKernel2D, Z as getKernel } from "./shapeTypes-
|
|
1
|
+
import { Q as getKernel2D, Z as getKernel } from "./shapeTypes-BIcALNFv.js";
|
|
2
2
|
import { n as wasmIndex } from "./vec3-Dpha8d5k.js";
|
|
3
3
|
import { A as ok, R as unwrap, T as isOk, b as err, h as bug, n as computationError, s as safeIndex } from "./errors-DNWJsfVU.js";
|
|
4
4
|
import { r as RAD2DEG, t as DEG2RAD } from "./constants-ITRzCnCp.js";
|
|
5
5
|
import { t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
6
|
-
import { _ as samePoint, 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, v as scalarMultiply2d } from "./helpers-
|
|
7
|
-
import { _ as Curve2D, 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-
|
|
6
|
+
import { _ as samePoint, 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, v as scalarMultiply2d } from "./helpers-CKjmUSf0.js";
|
|
7
|
+
import { _ as Curve2D, 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-BL2TdtBX.js";
|
|
8
8
|
//#region node_modules/flatqueue/index.js
|
|
9
9
|
/**
|
|
10
10
|
* @typedef {Float64ArrayConstructor | Float32ArrayConstructor |
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { n as wasmIndex } from "./vec3-Dpha8d5k.js";
|
|
2
2
|
import { R as unwrap, h as bug, s as safeIndex } from "./errors-DNWJsfVU.js";
|
|
3
3
|
import { r as lastOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
4
|
-
import { v as zip } from "./surfaceBuilders-
|
|
5
|
-
import { a as Blueprints, i as CompoundBlueprint, l as intersectCurves, r as organiseBlueprints, t as BlueprintSketcher, u as Flatbush } from "./blueprintSketcher-
|
|
6
|
-
import { _ as samePoint$1, b as subtract2d, f as crossProduct2d, s as PRECISION_INTERSECTION } from "./helpers-
|
|
7
|
-
import { b as removeDuplicatePoints, f as make2dSegmentCurve, t as Blueprint } from "./blueprint-
|
|
4
|
+
import { v as zip } from "./surfaceBuilders-BQx3TjMH.js";
|
|
5
|
+
import { a as Blueprints, i as CompoundBlueprint, l as intersectCurves, r as organiseBlueprints, t as BlueprintSketcher, u as Flatbush } from "./blueprintSketcher-CxFmYBvh.js";
|
|
6
|
+
import { _ as samePoint$1, b as subtract2d, f as crossProduct2d, s as PRECISION_INTERSECTION } from "./helpers-CKjmUSf0.js";
|
|
7
|
+
import { b as removeDuplicatePoints, f as make2dSegmentCurve, t as Blueprint } from "./blueprint-BL2TdtBX.js";
|
|
8
8
|
//#region src/2d/blueprints/cannedBlueprints.ts
|
|
9
9
|
/**
|
|
10
10
|
* Create a regular polygon blueprint inscribed in a circle of the given radius.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
3
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
4
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
5
|
-
const require_blueprintSketcher = require("./blueprintSketcher-
|
|
6
|
-
const require_helpers = require("./helpers-
|
|
7
|
-
const require_blueprint = require("./blueprint-
|
|
4
|
+
const require_surfaceBuilders = require("./surfaceBuilders-DvpxHHIm.cjs");
|
|
5
|
+
const require_blueprintSketcher = require("./blueprintSketcher-ChpPo7tq.cjs");
|
|
6
|
+
const require_helpers = require("./helpers-Cvrmxw4s.cjs");
|
|
7
|
+
const require_blueprint = require("./blueprint-KrNFTiyX.cjs");
|
|
8
8
|
//#region src/2d/blueprints/cannedBlueprints.ts
|
|
9
9
|
/**
|
|
10
10
|
* Create a regular polygon blueprint inscribed in a circle of the given radius.
|
package/dist/brepjs.cjs
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_textBlueprints = require("./textBlueprints-
|
|
3
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
+
const require_textBlueprints = require("./textBlueprints-CKFmYJHD.cjs");
|
|
3
|
+
const require_shapeTypes = require("./shapeTypes-DwNTiXjG.cjs");
|
|
4
4
|
const require_occtWasmAdapter = require("./occtWasmAdapter-Bv2OTOX9.cjs");
|
|
5
5
|
const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
|
|
6
6
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
7
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
7
|
+
const require_topologyQueryFns = require("./topologyQueryFns-a2i0YhGF.cjs");
|
|
8
8
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
9
9
|
const require_types = require("./types-KjA8tY4Y.cjs");
|
|
10
10
|
const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
|
|
11
11
|
const require_planeOps = require("./planeOps-BA4HfgQu.cjs");
|
|
12
|
-
const require_faceFns = require("./faceFns-
|
|
13
|
-
const require_shapeFns = require("./shapeFns-
|
|
14
|
-
const require_curveFns = require("./curveFns-
|
|
15
|
-
const require_meshFns = require("./meshFns-
|
|
12
|
+
const require_faceFns = require("./faceFns-DSdVqqVP.cjs");
|
|
13
|
+
const require_shapeFns = require("./shapeFns-CeSEceUG.cjs");
|
|
14
|
+
const require_curveFns = require("./curveFns-D3k8aHIE.cjs");
|
|
15
|
+
const require_meshFns = require("./meshFns-7IXB_Bua.cjs");
|
|
16
16
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
17
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
18
|
-
const require_solidBuilders = require("./solidBuilders-
|
|
19
|
-
const require_healingFns = require("./healingFns-
|
|
20
|
-
const require_threadFns = require("./threadFns-
|
|
21
|
-
const require_blueprintSketcher = require("./blueprintSketcher-
|
|
22
|
-
const require_helpers = require("./helpers-
|
|
23
|
-
const require_drawFns = require("./drawFns-
|
|
24
|
-
const require_measureFns = require("./measureFns-
|
|
25
|
-
const require_cornerFinder = require("./cornerFinder-
|
|
26
|
-
const require_boolean2D = require("./boolean2D-
|
|
27
|
-
const require_blueprintFns = require("./blueprintFns-
|
|
28
|
-
const require_importFns = require("./importFns-
|
|
29
|
-
const require_loftFns = require("./loftFns-
|
|
30
|
-
const require_cameraFns = require("./cameraFns-
|
|
31
|
-
const require_textMetrics = require("./textMetrics-
|
|
32
|
-
const require_shapeRefFns = require("./shapeRefFns-
|
|
17
|
+
const require_surfaceBuilders = require("./surfaceBuilders-DvpxHHIm.cjs");
|
|
18
|
+
const require_solidBuilders = require("./solidBuilders-B_5FgvuK.cjs");
|
|
19
|
+
const require_healingFns = require("./healingFns-B1axWCr3.cjs");
|
|
20
|
+
const require_threadFns = require("./threadFns-BsRDNoSm.cjs");
|
|
21
|
+
const require_blueprintSketcher = require("./blueprintSketcher-ChpPo7tq.cjs");
|
|
22
|
+
const require_helpers = require("./helpers-Cvrmxw4s.cjs");
|
|
23
|
+
const require_drawFns = require("./drawFns-C766Umy1.cjs");
|
|
24
|
+
const require_measureFns = require("./measureFns-BtPAmRfH.cjs");
|
|
25
|
+
const require_cornerFinder = require("./cornerFinder-DKyR_u8g.cjs");
|
|
26
|
+
const require_boolean2D = require("./boolean2D-RC6jXv4x.cjs");
|
|
27
|
+
const require_blueprintFns = require("./blueprintFns-Dp0_BOuL.cjs");
|
|
28
|
+
const require_importFns = require("./importFns-D09lb1dB.cjs");
|
|
29
|
+
const require_loftFns = require("./loftFns-C664R57e.cjs");
|
|
30
|
+
const require_cameraFns = require("./cameraFns-IL7qYFaG.cjs");
|
|
31
|
+
const require_textMetrics = require("./textMetrics-BYHtOFYW.cjs");
|
|
32
|
+
const require_shapeRefFns = require("./shapeRefFns-BsX2j-n3.cjs");
|
|
33
33
|
const require_workerHandler = require("./workerHandler-CdlOTwJg.cjs");
|
|
34
|
-
const require_primitiveFns = require("./primitiveFns-
|
|
34
|
+
const require_primitiveFns = require("./primitiveFns-Bdqm8wjI.cjs");
|
|
35
35
|
//#region src/topology/shapeBooleans.ts
|
|
36
36
|
var BOPAlgo_GlueShift = 1;
|
|
37
37
|
var BOPAlgo_GlueFull = 2;
|
|
@@ -3354,6 +3354,20 @@ function cut(base, tool, options) {
|
|
|
3354
3354
|
unsafe: true
|
|
3355
3355
|
});
|
|
3356
3356
|
}
|
|
3357
|
+
/** Fuse many 3D shapes (boolean union) in a single operation. */
|
|
3358
|
+
function fuseAll(shapes, options) {
|
|
3359
|
+
return require_solidBuilders.fuseAll(shapes.map((s) => resolve(s)), {
|
|
3360
|
+
...options,
|
|
3361
|
+
unsafe: true
|
|
3362
|
+
});
|
|
3363
|
+
}
|
|
3364
|
+
/** Cut many tool shapes from a base shape (boolean subtraction) in a single operation. */
|
|
3365
|
+
function cutAll(base, tools, options) {
|
|
3366
|
+
return require_solidBuilders.cutAll(resolve(base), tools.map((s) => resolve(s)), {
|
|
3367
|
+
...options,
|
|
3368
|
+
unsafe: true
|
|
3369
|
+
});
|
|
3370
|
+
}
|
|
3357
3371
|
/** Compute the intersection of two shapes (boolean common). */
|
|
3358
3372
|
function intersect(a, b, options) {
|
|
3359
3373
|
return require_solidBuilders.intersect(resolve(a), resolve(b), {
|
|
@@ -6594,7 +6608,7 @@ exports.curveStartPoint = require_curveFns.curveStartPoint;
|
|
|
6594
6608
|
exports.curveTangentAt = require_curveFns.curveTangentAt;
|
|
6595
6609
|
exports.cut = cut;
|
|
6596
6610
|
exports.cut2D = require_boolean2D.cut2D;
|
|
6597
|
-
exports.cutAll =
|
|
6611
|
+
exports.cutAll = cutAll;
|
|
6598
6612
|
exports.cutAllBisect = require_healingFns.cutAllBisect;
|
|
6599
6613
|
exports.cutBlueprints = require_boolean2D.cutBlueprints;
|
|
6600
6614
|
exports.cutWithEvolution = require_healingFns.cutWithEvolution;
|
|
@@ -6682,7 +6696,7 @@ exports.fromKernelVec = fromKernelVec;
|
|
|
6682
6696
|
exports.fromNullable = require_errors.fromNullable;
|
|
6683
6697
|
exports.fuse = fuse;
|
|
6684
6698
|
exports.fuse2D = require_boolean2D.fuse2D;
|
|
6685
|
-
exports.fuseAll =
|
|
6699
|
+
exports.fuseAll = fuseAll;
|
|
6686
6700
|
exports.fuseAllBisect = require_healingFns.fuseAllBisect;
|
|
6687
6701
|
exports.fuseBlueprints = require_boolean2D.fuseBlueprints;
|
|
6688
6702
|
exports.fuseWithEvolution = require_healingFns.fuseWithEvolution;
|
package/dist/brepjs.js
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { $ as getKernelCapabilities, A as planarWire, B as createKernelHandle, C as isOrientedFace, D as manifoldShell, E as isValidSolid, F as as3D, H as isLive, I as is2D, J as withScopeResultAsync, K as withScope, L as is3D, M as getShapeKind, O as orientedFace, P as as2D, R as DisposalScope, S as isManifoldShell, T as isPlanarWire, V as getDisposalStats, W as resetDisposalStats, X as getActiveKernelId, Y as _usingCtx, Z as getKernel, _ as isSolid, a as createEdge, at as registerKernel, b as closedWire, c as createSolid, ct as withQuality, d as isCompound, dt as supportsProjection, et as getKernelTier, f as isEdge, ft as BrepkitAdapter, g as isShell, h as isShape3D, ht as currentQuality, i as createCompound, it as prewarm, j as validSolid, k as planarFace, l as createVertex, lt as withTier, m as isShape1D, mt as resetPerformanceStats, n as castShape3D, nt as initFromManifold, o as createFace, ot as registerKernelTier, p as isFace, pt as getPerformanceStats, q as withScopeResult, rt as initFromOC, s as createShell, st as withKernel, t as castShape, tt as init, u as createWire, ut as supportsConstraintSketch, v as isVertex, w as isPlanarFace, x as isClosedWire, y as isWire, z as createHandle } from "./shapeTypes-
|
|
1
|
+
import { $ as getKernelCapabilities, A as planarWire, B as createKernelHandle, C as isOrientedFace, D as manifoldShell, E as isValidSolid, F as as3D, H as isLive, I as is2D, J as withScopeResultAsync, K as withScope, L as is3D, M as getShapeKind, O as orientedFace, P as as2D, R as DisposalScope, S as isManifoldShell, T as isPlanarWire, V as getDisposalStats, W as resetDisposalStats, X as getActiveKernelId, Y as _usingCtx, Z as getKernel, _ as isSolid, a as createEdge, at as registerKernel, b as closedWire, c as createSolid, ct as withQuality, d as isCompound, dt as supportsProjection, et as getKernelTier, f as isEdge, ft as BrepkitAdapter, g as isShell, h as isShape3D, ht as currentQuality, i as createCompound, it as prewarm, j as validSolid, k as planarFace, l as createVertex, lt as withTier, m as isShape1D, mt as resetPerformanceStats, n as castShape3D, nt as initFromManifold, o as createFace, ot as registerKernelTier, p as isFace, pt as getPerformanceStats, q as withScopeResult, rt as initFromOC, s as createShell, st as withKernel, t as castShape, tt as init, u as createWire, ut as supportsConstraintSketch, v as isVertex, w as isPlanarFace, x as isClosedWire, y as isWire, z as createHandle } from "./shapeTypes-BIcALNFv.js";
|
|
2
2
|
import { E as EXACT_BREP_CAPABILITIES, T as DEFAULT_CAPABILITIES, t as OcctWasmAdapter } from "./occtWasmAdapter-D7mOxU0Q.js";
|
|
3
3
|
import { n as wasmIndex } from "./vec3-Dpha8d5k.js";
|
|
4
4
|
import { A as ok, B as unwrapOr, C as fromNullable, D as mapBoth, E as map, F as tapErr, H as zip, I as tryCatch, L as tryCatchAsync, M as orElse, N as pipeline, O as mapErr, P as tap, R as unwrap, S as flatten, T as isOk, V as unwrapOrElse, _ as all, a as moduleInitError, b as err, c as sketcherStateError, d as validationError, g as OK, h as bug, i as kernelError, j as or, k as match, l as typeCastError, m as BrepBugError, n as computationError, o as queryError, r as ioError, t as BrepErrorCode, u as unsupportedError, v as andThen, w as isErr, x as flatMap, y as collect, z as unwrapErr } from "./errors-DNWJsfVU.js";
|
|
5
|
-
import { C as kernelCall, S as vertexPosition, T as kernelCallScoped, _ as iterFaces, a as getCachedSurfaceType, b as iterVertices, c as getFaces, d as getSolids, f as getVertices, g as iterEdges, h as iterCompSolids, m as invalidateShapeCache, n as getBounds, o as getCompSolids, p as getWires, s as getEdges, t as describe$1, u as getShells, v as iterShells, w as kernelCallRaw, x as iterWires, y as iterSolids } from "./topologyQueryFns-
|
|
5
|
+
import { C as kernelCall, S as vertexPosition, T as kernelCallScoped, _ as iterFaces, a as getCachedSurfaceType, b as iterVertices, c as getFaces, d as getSolids, f as getVertices, g as iterEdges, h as iterCompSolids, m as invalidateShapeCache, n as getBounds, o as getCompSolids, p as getWires, s as getEdges, t as describe$1, u as getShells, v as iterShells, w as kernelCallRaw, x as iterWires, y as iterSolids } from "./topologyQueryFns-0BIOC7YH.js";
|
|
6
6
|
import { n as HASH_CODE_MAX, r as RAD2DEG, t as DEG2RAD } from "./constants-ITRzCnCp.js";
|
|
7
7
|
import { n as toVec2, r as toVec3, t as resolveDirection } from "./types-D24Y27N0.js";
|
|
8
8
|
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";
|
|
9
9
|
import { i as pivotPlane, n as createPlane, o as resolvePlane, r as makePlane, s as translatePlane, t as createNamedPlane } from "./planeOps-DSjjtrjg.js";
|
|
10
|
-
import { S as shapeType, _ as cast, a as faceOrientation, b as isCompSolid, c as innerWires, d as pointOnSurface, f as projectPointOnFace, g as asTopo, h as uvCoordinates, i as faceGeomType, l as normalAt, m as uvBounds, n as faceAxis, o as flipFaceOrientation, p as removeHolesFromFace, r as faceCenter, s as getSurfaceType, t as classifyPointOnFace, u as outerWire, v as downcast, x as iterTopo, y as fromBREP } from "./faceFns-
|
|
11
|
-
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$2, h as translate$2, i as isEqualShape, k as setShapeOrigin, l as composeTransforms, m as transformCopy$1, n as getHashCode, o as simplify$1, p as scale$3, r as isEmpty$2, s as toBREP$1, t as clone$1, u as mirror$2, w as getFaceTags, x as getFaceColor, y as colorFaces } from "./shapeFns-
|
|
12
|
-
import { a as curveIsPeriodic, c as curvePointAt, d as flipOrientation, f as getCurveType, h as offsetWire2D, i as curveIsClosed, l as curveStartPoint, m as interpolateCurve, n as curveAxis, o as curveLength, p as getOrientation, r as curveEndPoint, s as curvePeriod, t as approximateCurve, u as curveTangentAt } from "./curveFns-
|
|
13
|
-
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-
|
|
10
|
+
import { S as shapeType, _ as cast, a as faceOrientation, b as isCompSolid, c as innerWires, d as pointOnSurface, f as projectPointOnFace, g as asTopo, h as uvCoordinates, i as faceGeomType, l as normalAt, m as uvBounds, n as faceAxis, o as flipFaceOrientation, p as removeHolesFromFace, r as faceCenter, s as getSurfaceType, t as classifyPointOnFace, u as outerWire, v as downcast, x as iterTopo, y as fromBREP } from "./faceFns-CmhEEB-L.js";
|
|
11
|
+
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$2, h as translate$2, i as isEqualShape, k as setShapeOrigin, l as composeTransforms, m as transformCopy$1, n as getHashCode, o as simplify$1, p as scale$3, r as isEmpty$2, s as toBREP$1, t as clone$1, u as mirror$2, w as getFaceTags, x as getFaceColor, y as colorFaces } from "./shapeFns-B0lN3o3r.js";
|
|
12
|
+
import { a as curveIsPeriodic, c as curvePointAt, d as flipOrientation, f as getCurveType, h as offsetWire2D, i as curveIsClosed, l as curveStartPoint, m as interpolateCurve, n as curveAxis, o as curveLength, p as getOrientation, r as curveEndPoint, s as curvePeriod, t as approximateCurve, u as curveTangentAt } from "./curveFns-DT1yMgBI.js";
|
|
13
|
+
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-CtchqgDR.js";
|
|
14
14
|
import { n as getAtOrThrow, r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
15
|
-
import { _ as makeThreePointArc, d as makeCircle, h as makeLine, l as makeBSplineInterpolation, n as fill, r as makeFace, s as assembleWire } from "./surfaceBuilders-
|
|
16
|
-
import { _ as section$1, b as split$1, d as booleanPipeline, f as cut$2, g as intersect$2, h as fuseAll, m as fuse$2, p as cutAll, r as makeCylinder, v as sectionToFace$1, y as slice$1 } from "./solidBuilders-
|
|
17
|
-
import { A as edgesOfFace, C as shellWithEvolution, D as getNurbsCurveData, E as fuseAllBisect, F as chamferDistAngle, I as toBufferGeometryData, L as toGroupedBufferGeometryData, M as sharedEdges, N as verticesOfEdge, O as getNurbsSurfaceData, P as wiresOfFace, R as toLODGeometryData, S as intersectWithEvolution, T as cutAllBisect, _ as positionOnCurve, a as healFace, b as filletWithEvolution, c as isValid$1, d as draft$1, f as fillet$1, g as variableFillet, h as thicken$1, i as heal$1, j as facesOfEdge, k as adjacentFaces, l as solidFromShell, m as shell$1, n as fixSelfIntersection, o as healSolid, p as offset$1, r as fixShape, s as healWire, t as autoHeal, u as chamfer$1, v as chamferWithEvolution, w as checkBoolean, x as fuseWithEvolution, y as cutWithEvolution, z as toLineGeometryData } from "./healingFns-
|
|
18
|
-
import { A as setJointValue, B as findNode, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, F as quatRotate, H as updateNode, I as addChild, J as createAssembly, K as linearPattern, L as collectShapes, M as sphericalJoint, N as quatFromAxisAngle, O as prismaticJoint, P as quatFromTo, R as countNodes, S as addJoint, T as jointTransform, U as walkAssembly, V as removeChild, W as circularPattern, _ as exportURDF, a as deserializeHistory, b as inverseKinematics, c as modifyStep, d as replayFrom, f as replayHistory, g as undoLast, h as stepsFrom, i as createRegistry, j as setJointValues, k as revoluteJoint, l as registerOperation, m as stepCount, n as addStep, o as findStep, p as serializeHistory, q as exportAssemblySTEP, r as createHistory, s as getShape, t as thread, u as registerShape, v as importURDF, w as forwardKinematics, x as jointTrajectory, y as jointsFromDH, z as createAssemblyNode } from "./threadFns-
|
|
19
|
-
import { n as BaseSketcher2d, r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-
|
|
20
|
-
import { a as createTypedFinder, i as wireFinder, n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-
|
|
21
|
-
import { A as sketchEllipse, 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, _ 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-
|
|
22
|
-
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-
|
|
23
|
-
import { t as cornerFinder } from "./cornerFinder-
|
|
24
|
-
import { a as fuseBlueprints, c as roundedRectangleBlueprint, i as cutBlueprints, n as fuse2D, o as intersectBlueprints, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-
|
|
25
|
-
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-
|
|
26
|
-
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-
|
|
27
|
-
import { a as revolve$1, c as multiSectionSweep, d as twistExtrude, i as extrudeAll, l as supportExtrude, n as loftAll, o as complexExtrude, r as extrude$1, s as guidedSweep, t as loft$1, u as sweep$1 } from "./loftFns-
|
|
28
|
-
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, n as getFont, o as compoundSketchExtrude, p as sketchRevolve, r as loadFont, s as compoundSketchFace, t as textBlueprints, u as sketchExtrude, v as CompoundSketch } from "./textBlueprints-
|
|
29
|
-
import { a as makeProjectedEdges, i as projectEdges, n as cameraLookAt, r as createCamera, s as isProjectionPlane, t as cameraFromPlane } from "./cameraFns-
|
|
30
|
-
import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-
|
|
31
|
-
import { a as updateRoles, i as resolveRef, n as captureHint, o as defaultScorer, r as createRef, t as assignRoles } from "./shapeRefFns-
|
|
15
|
+
import { _ as makeThreePointArc, d as makeCircle, h as makeLine, l as makeBSplineInterpolation, n as fill, r as makeFace, s as assembleWire } from "./surfaceBuilders-BQx3TjMH.js";
|
|
16
|
+
import { _ as section$1, b as split$1, d as booleanPipeline, f as cut$2, g as intersect$2, h as fuseAll$2, m as fuse$2, p as cutAll$2, r as makeCylinder, v as sectionToFace$1, y as slice$1 } from "./solidBuilders-Bb5_uC7F.js";
|
|
17
|
+
import { A as edgesOfFace, C as shellWithEvolution, D as getNurbsCurveData, E as fuseAllBisect, F as chamferDistAngle, I as toBufferGeometryData, L as toGroupedBufferGeometryData, M as sharedEdges, N as verticesOfEdge, O as getNurbsSurfaceData, P as wiresOfFace, R as toLODGeometryData, S as intersectWithEvolution, T as cutAllBisect, _ as positionOnCurve, a as healFace, b as filletWithEvolution, c as isValid$1, d as draft$1, f as fillet$1, g as variableFillet, h as thicken$1, i as heal$1, j as facesOfEdge, k as adjacentFaces, l as solidFromShell, m as shell$1, n as fixSelfIntersection, o as healSolid, p as offset$1, r as fixShape, s as healWire, t as autoHeal, u as chamfer$1, v as chamferWithEvolution, w as checkBoolean, x as fuseWithEvolution, y as cutWithEvolution, z as toLineGeometryData } from "./healingFns-Cxi24K_n.js";
|
|
18
|
+
import { A as setJointValue, B as findNode, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, F as quatRotate, H as updateNode, I as addChild, J as createAssembly, K as linearPattern, L as collectShapes, M as sphericalJoint, N as quatFromAxisAngle, O as prismaticJoint, P as quatFromTo, R as countNodes, S as addJoint, T as jointTransform, U as walkAssembly, V as removeChild, W as circularPattern, _ as exportURDF, a as deserializeHistory, b as inverseKinematics, c as modifyStep, d as replayFrom, f as replayHistory, g as undoLast, h as stepsFrom, i as createRegistry, j as setJointValues, k as revoluteJoint, l as registerOperation, m as stepCount, n as addStep, o as findStep, p as serializeHistory, q as exportAssemblySTEP, r as createHistory, s as getShape, t as thread, u as registerShape, v as importURDF, w as forwardKinematics, x as jointTrajectory, y as jointsFromDH, z as createAssemblyNode } from "./threadFns-BWAL8cAZ.js";
|
|
19
|
+
import { n as BaseSketcher2d, r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-CxFmYBvh.js";
|
|
20
|
+
import { a as createTypedFinder, i as wireFinder, n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-CKjmUSf0.js";
|
|
21
|
+
import { A as sketchEllipse, 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, _ 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-C63kOWvC.js";
|
|
22
|
+
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-D0e8tGSP.js";
|
|
23
|
+
import { t as cornerFinder } from "./cornerFinder-7M1wdtcY.js";
|
|
24
|
+
import { a as fuseBlueprints, c as roundedRectangleBlueprint, i as cutBlueprints, n as fuse2D, o as intersectBlueprints, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-CIohnI9l.js";
|
|
25
|
+
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-DCA97w4C.js";
|
|
26
|
+
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-CDaNqu4H.js";
|
|
27
|
+
import { a as revolve$1, c as multiSectionSweep, d as twistExtrude, i as extrudeAll, l as supportExtrude, n as loftAll, o as complexExtrude, r as extrude$1, s as guidedSweep, t as loft$1, u as sweep$1 } from "./loftFns-C8Ep9McS.js";
|
|
28
|
+
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, n as getFont, o as compoundSketchExtrude, p as sketchRevolve, r as loadFont, s as compoundSketchFace, t as textBlueprints, u as sketchExtrude, v as CompoundSketch } from "./textBlueprints-CU7MHMR8.js";
|
|
29
|
+
import { a as makeProjectedEdges, i as projectEdges, n as cameraLookAt, r as createCamera, s as isProjectionPlane, t as cameraFromPlane } from "./cameraFns-BA7CVtWJ.js";
|
|
30
|
+
import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-BDTWvvyd.js";
|
|
31
|
+
import { a as updateRoles, i as resolveRef, n as captureHint, o as defaultScorer, r as createRef, t as assignRoles } from "./shapeRefFns-C4JSc_jF.js";
|
|
32
32
|
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-CFetYgIm.js";
|
|
33
|
-
import { C as threePointArc, D as wireLoop, E as wire, S as tangentArc, T as vertex, _ as polygon, a as circle, b as sphere$1, c as cylinder, d as ellipsoid, f as face, g as offsetFace, h as line, i as bsplineApprox, l as ellipse, m as helix, n as bezier, o as compound, p as filledFace, r as box, s as cone, t as addHoles, u as ellipseArc, v as sewShells, w as torus$1, x as subFace, y as solid } from "./primitiveFns-
|
|
33
|
+
import { C as threePointArc, D as wireLoop, E as wire, S as tangentArc, T as vertex, _ as polygon, a as circle, b as sphere$1, c as cylinder, d as ellipsoid, f as face, g as offsetFace, h as line, i as bsplineApprox, l as ellipse, m as helix, n as bezier, o as compound, p as filledFace, r as box, s as cone, t as addHoles, u as ellipseArc, v as sewShells, w as torus$1, x as subFace, y as solid } from "./primitiveFns-D7R24hoz.js";
|
|
34
34
|
//#region \0rolldown/runtime.js
|
|
35
35
|
var __defProp = Object.defineProperty;
|
|
36
36
|
var __exportAll = (all, no_symbols) => {
|
|
@@ -3365,6 +3365,20 @@ function cut(base, tool, options) {
|
|
|
3365
3365
|
unsafe: true
|
|
3366
3366
|
});
|
|
3367
3367
|
}
|
|
3368
|
+
/** Fuse many 3D shapes (boolean union) in a single operation. */
|
|
3369
|
+
function fuseAll(shapes, options) {
|
|
3370
|
+
return fuseAll$2(shapes.map((s) => resolve(s)), {
|
|
3371
|
+
...options,
|
|
3372
|
+
unsafe: true
|
|
3373
|
+
});
|
|
3374
|
+
}
|
|
3375
|
+
/** Cut many tool shapes from a base shape (boolean subtraction) in a single operation. */
|
|
3376
|
+
function cutAll(base, tools, options) {
|
|
3377
|
+
return cutAll$2(resolve(base), tools.map((s) => resolve(s)), {
|
|
3378
|
+
...options,
|
|
3379
|
+
unsafe: true
|
|
3380
|
+
});
|
|
3381
|
+
}
|
|
3368
3382
|
/** Compute the intersection of two shapes (boolean common). */
|
|
3369
3383
|
function intersect(a, b, options) {
|
|
3370
3384
|
return intersect$2(resolve(a), resolve(b), {
|
|
@@ -3755,7 +3769,7 @@ function rectangularPattern(shape, options) {
|
|
|
3755
3769
|
];
|
|
3756
3770
|
copies.push(translate$2(s, offset));
|
|
3757
3771
|
}
|
|
3758
|
-
return fuseAll(copies, { unsafe: true });
|
|
3772
|
+
return fuseAll$2(copies, { unsafe: true });
|
|
3759
3773
|
}
|
|
3760
3774
|
//#endregion
|
|
3761
3775
|
//#region src/topology/wrapperFns.ts
|
|
@@ -3872,11 +3886,11 @@ function create3DBooleans(val) {
|
|
|
3872
3886
|
...opts,
|
|
3873
3887
|
unsafe: true
|
|
3874
3888
|
}))),
|
|
3875
|
-
fuseAll: (tools, opts) => wrap3D(trustAsT(unwrapOrThrow(fuseAll([val, ...tools.map(resolve)], {
|
|
3889
|
+
fuseAll: (tools, opts) => wrap3D(trustAsT(unwrapOrThrow(fuseAll$2([val, ...tools.map(resolve)], {
|
|
3876
3890
|
...opts,
|
|
3877
3891
|
unsafe: true
|
|
3878
3892
|
})))),
|
|
3879
|
-
cutAll: (tools, opts) => wrap3D(trustAsT(unwrapOrThrow(cutAll(val, tools, {
|
|
3893
|
+
cutAll: (tools, opts) => wrap3D(trustAsT(unwrapOrThrow(cutAll$2(val, tools, {
|
|
3880
3894
|
...opts,
|
|
3881
3895
|
unsafe: true
|
|
3882
3896
|
})))),
|
|
@@ -4664,10 +4678,10 @@ var booleans_exports = /* @__PURE__ */ __exportAll({
|
|
|
4664
4678
|
checkBoolean: () => checkBoolean,
|
|
4665
4679
|
convexHull: () => convexHull,
|
|
4666
4680
|
cut: () => cut,
|
|
4667
|
-
cutAll: () => cutAll,
|
|
4681
|
+
cutAll: () => cutAll$2,
|
|
4668
4682
|
cutAllBisect: () => cutAllBisect,
|
|
4669
4683
|
fuse: () => fuse,
|
|
4670
|
-
fuseAll: () => fuseAll,
|
|
4684
|
+
fuseAll: () => fuseAll$2,
|
|
4671
4685
|
fuseAllBisect: () => fuseAllBisect,
|
|
4672
4686
|
hull: () => hull,
|
|
4673
4687
|
intersect: () => intersect,
|
|
@@ -5487,7 +5501,7 @@ function evalFuseAll(node, ctx) {
|
|
|
5487
5501
|
if (non.length === 1 && non[0]) return ctx.evalNode(non[0]);
|
|
5488
5502
|
const resolved = resolveAll(ctx, non, "FuseAll.operand");
|
|
5489
5503
|
if (!resolved.ok) return resolved;
|
|
5490
|
-
return fuseAll(resolved.value, boolOptions(node, ctx));
|
|
5504
|
+
return fuseAll$2(resolved.value, boolOptions(node, ctx));
|
|
5491
5505
|
}
|
|
5492
5506
|
function evalCutAll(node, ctx) {
|
|
5493
5507
|
if (node.base.kind === "Empty") return emptyResult$1("CutAll");
|
|
@@ -5497,7 +5511,7 @@ function evalCutAll(node, ctx) {
|
|
|
5497
5511
|
if (!base.ok) return base;
|
|
5498
5512
|
const resolved = resolveAll(ctx, tools, "CutAll.tool");
|
|
5499
5513
|
if (!resolved.ok) return resolved;
|
|
5500
|
-
return cutAll(base.value, resolved.value, boolOptions(node, ctx));
|
|
5514
|
+
return cutAll$2(base.value, resolved.value, boolOptions(node, ctx));
|
|
5501
5515
|
}
|
|
5502
5516
|
//#endregion
|
|
5503
5517
|
//#region src/csg/evaluators/transforms.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Z as getKernel, t as castShape } from "./shapeTypes-
|
|
1
|
+
import { Z as getKernel, t as castShape } from "./shapeTypes-BIcALNFv.js";
|
|
2
2
|
import { A as ok, b as err, d as validationError } from "./errors-DNWJsfVU.js";
|
|
3
|
-
import { s as getEdges } from "./topologyQueryFns-
|
|
3
|
+
import { s as getEdges } from "./topologyQueryFns-0BIOC7YH.js";
|
|
4
4
|
import { c as vecLength, d as vecNormalize, g as vecSub, r as vecCross } from "./vecOps-SKPRvPH-.js";
|
|
5
5
|
//#region src/projection/projectionPlanes.ts
|
|
6
6
|
/** Lookup table mapping each {@link ProjectionPlane} to its camera configuration. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-DwNTiXjG.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-a2i0YhGF.cjs");
|
|
4
4
|
const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
|
|
5
5
|
//#region src/projection/projectionPlanes.ts
|
|
6
6
|
/** Lookup table mapping each {@link ProjectionPlane} to its camera configuration. */
|
|
@@ -18,10 +18,19 @@ export declare function withKernelVec<T>(v: Vec3, fn: (ocVec: KernelType) => T):
|
|
|
18
18
|
export declare function withKernelPnt<T>(v: Vec3, fn: (ocPnt: KernelType) => T): T;
|
|
19
19
|
/** Execute fn with a temporary kernel 3D direction, auto-deleted after. */
|
|
20
20
|
export declare function withKernelDir<T>(v: Vec3, fn: (ocDir: KernelType) => T): T;
|
|
21
|
-
/**
|
|
21
|
+
/**
|
|
22
|
+
* Create a kernel 3D axis-1 from point and direction. Caller must delete.
|
|
23
|
+
* @testOnly Exercised by tests/occtBoundary.test.ts.
|
|
24
|
+
*/
|
|
22
25
|
export declare function makeKernelAx1(center: Vec3, dir: Vec3): KernelType;
|
|
23
|
-
/**
|
|
26
|
+
/**
|
|
27
|
+
* Create a kernel 3D axis-2 from origin and z direction (+optional x direction). Caller must delete.
|
|
28
|
+
* @testOnly Exercised by tests/occtBoundary.test.ts.
|
|
29
|
+
*/
|
|
24
30
|
export declare function makeKernelAx2(origin: Vec3, zDir: Vec3, xDir?: Vec3): KernelType;
|
|
25
|
-
/**
|
|
31
|
+
/**
|
|
32
|
+
* Create a kernel 3D axis-3 from origin, z direction, and optional x direction. Caller must delete.
|
|
33
|
+
* @testOnly Exercised by tests/occtBoundary.test.ts.
|
|
34
|
+
*/
|
|
26
35
|
export declare function makeKernelAx3(origin: Vec3, zDir: Vec3, xDir?: Vec3): KernelType;
|
|
27
36
|
export {};
|
package/dist/core/planeOps.d.ts
CHANGED
|
@@ -42,7 +42,10 @@ declare function makePlane(plane?: PlaneName, origin?: PointInput | number): Pla
|
|
|
42
42
|
export { makePlane };
|
|
43
43
|
/** Convert 2D local coordinates to 3D world coordinates on the plane. */
|
|
44
44
|
export declare function planeToWorld(plane: Plane, local: Vec2): Vec3;
|
|
45
|
-
/**
|
|
45
|
+
/**
|
|
46
|
+
* Convert 3D world coordinates to 2D local coordinates on the plane.
|
|
47
|
+
* @testOnly Exercised by tests/planeOps.test.ts.
|
|
48
|
+
*/
|
|
46
49
|
export declare function planeToLocal(plane: Plane, world: Vec3): Vec2;
|
|
47
50
|
/** Translate a plane by a vector. */
|
|
48
51
|
export declare function translatePlane(plane: Plane, offset: Vec3): Plane;
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import { KernelShape, ShapeType } from '../kernel/types.js';
|
|
2
2
|
import { KernelAdapter } from '../kernel/interfaces/index.js';
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* Get the cached type for a shape, or undefined if not cached.
|
|
5
|
+
* @testOnly Exercised by tests/shapeTypeCache.test.ts.
|
|
6
|
+
*/
|
|
4
7
|
export declare function getCachedType(shape: KernelShape): ShapeType | undefined;
|
|
5
8
|
/** Store a type for a shape. */
|
|
6
9
|
export declare function setCachedType(shape: KernelShape, type: ShapeType): void;
|
|
7
|
-
/**
|
|
10
|
+
/**
|
|
11
|
+
* Check if a shape has a cached type.
|
|
12
|
+
* @testOnly Exercised by tests/shapeTypeCache.test.ts.
|
|
13
|
+
*/
|
|
8
14
|
export declare function hasCachedType(shape: KernelShape): boolean;
|
|
9
15
|
/**
|
|
10
16
|
* Get the type from cache, or query the kernel and cache the result.
|
|
@@ -7,6 +7,7 @@ export type CurveType = 'LINE' | 'CIRCLE' | 'ELLIPSE' | 'HYPERBOLA' | 'PARABOLA'
|
|
|
7
7
|
* Map a kernel curve type enum value to its string discriminant.
|
|
8
8
|
*
|
|
9
9
|
* @returns `Ok<CurveType>` on success, or `Err` if the enum value is unrecognised.
|
|
10
|
+
* @testOnly Exercised by tests/typeDiscriminants.test.ts.
|
|
10
11
|
*/
|
|
11
12
|
export declare const findCurveType: (type: number | {
|
|
12
13
|
value: number;
|
package/dist/core.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
2
|
+
const require_shapeTypes = require("./shapeTypes-DwNTiXjG.cjs");
|
|
3
3
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
4
4
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
5
5
|
const require_types = require("./types-KjA8tY4Y.cjs");
|
package/dist/core.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as createKernelHandle, C as isOrientedFace, D as manifoldShell, E as isValidSolid, H as isLive, I as is2D, J as withScopeResultAsync, K as withScope, L as is3D, M as getShapeKind, O as orientedFace, R as DisposalScope, S as isManifoldShell, _ as isSolid, b as closedWire, d as isCompound, f as isEdge, g as isShell, h as isShape3D, j as validSolid, m as isShape1D, p as isFace, q as withScopeResult, t as castShape, v as isVertex, x as isClosedWire, y as isWire, z as createHandle } from "./shapeTypes-
|
|
1
|
+
import { B as createKernelHandle, C as isOrientedFace, D as manifoldShell, E as isValidSolid, H as isLive, I as is2D, J as withScopeResultAsync, K as withScope, L as is3D, M as getShapeKind, O as orientedFace, R as DisposalScope, S as isManifoldShell, _ as isSolid, b as closedWire, d as isCompound, f as isEdge, g as isShell, h as isShape3D, j as validSolid, m as isShape1D, p as isFace, q as withScopeResult, t as castShape, v as isVertex, x as isClosedWire, y as isWire, z as createHandle } from "./shapeTypes-BIcALNFv.js";
|
|
2
2
|
import { A as ok, B as unwrapOr, E as map, I as tryCatch, L as tryCatchAsync, O as mapErr, R as unwrap, T as isOk, V as unwrapOrElse, a as moduleInitError, b as err, c as sketcherStateError, d as validationError, g as OK, h as bug, i as kernelError, k as match, l as typeCastError, m as BrepBugError, n as computationError, o as queryError, r as ioError, u as unsupportedError, v as andThen, w as isErr, x as flatMap, y as collect, z as unwrapErr } from "./errors-DNWJsfVU.js";
|
|
3
3
|
import { n as HASH_CODE_MAX, r as RAD2DEG, t as DEG2RAD } from "./constants-ITRzCnCp.js";
|
|
4
4
|
import { n as toVec2, r as toVec3, t as resolveDirection } from "./types-D24Y27N0.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as DEG2RAD } from "./constants-ITRzCnCp.js";
|
|
2
2
|
import { n as getAtOrThrow } from "./arrayAccess-DrUGPADn.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-CKjmUSf0.js";
|
|
4
4
|
//#region src/query/cornerFinder.ts
|
|
5
5
|
var PI_2 = 2 * Math.PI;
|
|
6
6
|
function positiveHalfAngle(angle) {
|