brepjs 20.12.0 → 20.12.2
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 +32 -19
- package/dist/2d.cjs +4 -4
- package/dist/2d.js +4 -4
- package/dist/{blueprint-CN5dNZ1h.js → blueprint-CLgJoNt5.js} +3 -3
- package/dist/{blueprint-CHBjfXQO.cjs → blueprint-p1SmFAfl.cjs} +3 -3
- package/dist/{blueprintFns--26Mr3Lm.js → blueprintFns-D4wl5Fft.js} +2 -2
- package/dist/{blueprintFns-DOdzDcPX.cjs → blueprintFns-DU8_o9zy.cjs} +2 -2
- package/dist/{blueprintSketcher-CG4H8A6M.cjs → blueprintSketcher-BTJqAd7E.cjs} +2 -2
- package/dist/{blueprintSketcher-CQPC4SEF.js → blueprintSketcher-CmR6Mi91.js} +2 -2
- package/dist/{boolean2D-tR_2N_Vy.js → boolean2D-C3bLz5i0.js} +4 -4
- package/dist/{boolean2D-DjJogOY-.cjs → boolean2D-CEPQF4LP.cjs} +4 -4
- package/dist/brepjs.cjs +19 -19
- package/dist/brepjs.js +19 -19
- package/dist/{cornerFinder-Bg67ivza.cjs → cornerFinder-BToeCt6c.cjs} +1 -1
- package/dist/{cornerFinder-utEooGH7.js → cornerFinder-CBjvTijF.js} +1 -1
- package/dist/{drawFns-C_YnK4Ar.cjs → drawFns-BOyA7iOt.cjs} +8 -8
- package/dist/{drawFns-D6YK0JbH.js → drawFns-DzqPMBHE.js} +8 -8
- package/dist/{faceFns-CdUF0JOe.cjs → faceFns-C6fYNgZl.cjs} +7 -3
- package/dist/{faceFns-Ciq7lYTa.js → faceFns-DEDlLMcn.js} +8 -4
- package/dist/{healingFns-CrUTSyyK.cjs → healingFns-383ByJpH.cjs} +2 -2
- package/dist/{healingFns-Dchd7dm5.js → healingFns-CJIIjQKh.js} +2 -2
- package/dist/{helpers-GZyqAK5c.cjs → helpers-DxoCOnD_.cjs} +2 -2
- package/dist/{helpers-CBXclBes.js → helpers-i26hsY3T.js} +2 -2
- package/dist/{importFns-CcPhunG6.js → importFns-Bz4sXl93.js} +1 -1
- package/dist/{importFns-C3LbWc6X.cjs → importFns-Fr6WPpl2.cjs} +1 -1
- package/dist/io.cjs +1 -1
- package/dist/io.js +1 -1
- package/dist/{measureFns-DukwjzUl.js → measureFns-BuxKO1GV.js} +1 -1
- package/dist/{measureFns-Cyjpl2Kl.cjs → measureFns-Ed7LXAhG.cjs} +1 -1
- package/dist/measurement.cjs +2 -2
- package/dist/measurement.js +2 -2
- package/dist/operations.cjs +1 -1
- package/dist/operations.js +1 -1
- package/dist/{primitiveFns-Vf_2qORp.js → primitiveFns-DrEUKZvX.js} +2 -2
- package/dist/{primitiveFns-eE9jyVCs.cjs → primitiveFns-wOdKnYBs.cjs} +2 -2
- package/dist/{principalBoxFns-ClynMQMo.js → principalBoxFns-C0UzVmfC.js} +1 -1
- package/dist/{principalBoxFns-uZrBoGLA.cjs → principalBoxFns-D8rqqCl2.cjs} +1 -1
- package/dist/query.cjs +2 -2
- package/dist/query.js +2 -2
- package/dist/{refResolveFns-BvQkLKLw.js → refResolveFns-BqcjC50D.js} +2 -2
- package/dist/{refResolveFns-awGNYa3x.cjs → refResolveFns-C23E6pcj.cjs} +2 -2
- package/dist/shapeRef.cjs +1 -1
- package/dist/shapeRef.js +1 -1
- package/dist/sketching.cjs +3 -3
- package/dist/sketching.js +3 -3
- package/dist/{solidBuilders-DKNxcpSB.js → solidBuilders-CAiqZrAE.js} +2 -2
- package/dist/{solidBuilders-fzrTygbj.cjs → solidBuilders-DYumkmVa.cjs} +2 -2
- package/dist/{surfaceBuilders-B1Ikcte3.js → surfaceBuilders-CW6cUdk9.js} +1 -1
- package/dist/{surfaceBuilders-DFqsIPkm.cjs → surfaceBuilders-o3H-x6Ca.cjs} +1 -1
- package/dist/text.cjs +2 -2
- package/dist/text.js +2 -2
- package/dist/{textBlueprints-TLU7rjuN.js → textBlueprints-BE9fvro-.js} +4 -4
- package/dist/{textBlueprints-C38JfUeN.cjs → textBlueprints-BSU9_W8u.cjs} +4 -4
- package/dist/{textMetrics-r9ldmBb5.cjs → textMetrics-BHunx03s.cjs} +1 -1
- package/dist/{textMetrics-CEnX8GBe.js → textMetrics-DBqFVzjh.js} +1 -1
- package/dist/{threadFns-eDV-yg06.js → threadFns-DViBlfHh.js} +4 -4
- package/dist/{threadFns-BzxB-0i5.cjs → threadFns-DckgA8OY.cjs} +4 -4
- package/dist/topology/apiTypes.d.ts +4 -2
- package/dist/topology/cast.d.ts +6 -3
- package/dist/topology.cjs +4 -4
- package/dist/topology.d.ts +1 -1
- package/dist/topology.js +4 -4
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# brepjs
|
|
4
4
|
|
|
5
|
-
CAD
|
|
5
|
+
Exact B-Rep CAD in TypeScript, built so AI agents can write parts and check them.
|
|
6
6
|
|
|
7
7
|
[](https://www.npmjs.com/package/brepjs)
|
|
8
8
|
[](https://github.com/andymai/brepjs/actions/workflows/ci.yml)
|
|
@@ -10,13 +10,26 @@ CAD modeling for JavaScript.
|
|
|
10
10
|
[](https://github.com/andymai/brepjs/commits/main)
|
|
11
11
|
[](./LICENSE)
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
https://github.com/user-attachments/assets/a8dce262-2a86-4db2-8956-9d8ca8adcae4
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
</div>
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
In this real session, a coding agent (Claude Code) reads the official Raspberry Pi 5 drawing, writes the case as a brepjs part, gets an error back from `brep verify`, fixes it, and adds a fan mount on request. The exported STEP opens in FreeCAD. [Watch the narrated version](https://youtu.be/n8Cbg345NRI).
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
Parts are plain TypeScript files and the checker is a CLI, so it isn't tied to one agent:
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
npm i -D brepjs brepjs-cad occt-wasm
|
|
23
|
+
npx brep verify part.brep.ts
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
MCP clients can use the `brep-mcp` server instead, and Claude Code users can install the authoring skills as a plugin: `/plugin marketplace add andymai/brepjs`, then `/plugin install brepjs@brepjs`.
|
|
27
|
+
|
|
28
|
+
An agent rebuilt the 46 parts in our example gallery from their descriptions, and all 46 passed verify. [How we measured it](https://brepjs.dev/agent/eval).
|
|
29
|
+
|
|
30
|
+
## Or write it yourself
|
|
31
|
+
|
|
32
|
+
**[▶ Try the live playground](https://brepjs.dev/playground)** · **[Getting Started](./docs/getting-started.md)** · **[Cheat Sheet](./docs/cheat-sheet.md)** · **[Docs](https://brepjs.dev/)**
|
|
20
33
|
|
|
21
34
|
Shapes are exact mathematical boundaries (not triangle meshes), so booleans are precise, measurements are real, and you can export to STEP. TypeScript types prove the geometry is valid at compile time.
|
|
22
35
|
|
|
@@ -40,20 +53,6 @@ brepjs grew out of the love and care I put into [gridfinitylayouttool.com](https
|
|
|
40
53
|
|
|
41
54
|
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
55
|
|
|
43
|
-
## Scope
|
|
44
|
-
|
|
45
|
-
To set expectations, this project deliberately does not:
|
|
46
|
-
|
|
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**: 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
|
-
- **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
|
-
- **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
|
-
- **Provide a GUI**: brepjs is a pure programmatic API; there is no visual editor, viewport, or file picker.
|
|
52
|
-
|
|
53
|
-
## Status
|
|
54
|
-
|
|
55
|
-
[occt-wasm](https://github.com/andymai/occt-wasm) (OpenCascade compiled to WebAssembly) is the default kernel. [brepkit](https://github.com/andymai/brepkit), a Rust-based kernel, is in active development as a faster replacement but not yet ready for production use. The kernel abstraction layer means switching is a one-line change. See [benchmarks](./benchmarks/results/latest.md) for performance comparisons.
|
|
56
|
-
|
|
57
56
|
## Install
|
|
58
57
|
|
|
59
58
|
```bash
|
|
@@ -106,6 +105,20 @@ Layer 0 kernel/, utils/ WASM bindings
|
|
|
106
105
|
|
|
107
106
|
Imports flow downward only. Boundaries are enforced in CI.
|
|
108
107
|
|
|
108
|
+
## Scope
|
|
109
|
+
|
|
110
|
+
To set expectations, this project deliberately does not:
|
|
111
|
+
|
|
112
|
+
- **Render or display geometry**: brepjs produces shape data; pass mesh output to Three.js, Babylon.js, or raw WebGL for rendering.
|
|
113
|
+
- **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).
|
|
114
|
+
- **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.
|
|
115
|
+
- **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.
|
|
116
|
+
- **Provide a GUI**: brepjs is a pure programmatic API; there is no visual editor, viewport, or file picker.
|
|
117
|
+
|
|
118
|
+
## Status
|
|
119
|
+
|
|
120
|
+
[occt-wasm](https://github.com/andymai/occt-wasm) (OpenCascade compiled to WebAssembly) is the default kernel. [brepkit](https://github.com/andymai/brepkit), a Rust-based kernel, is in active development as a faster replacement but not yet ready for production use. The kernel abstraction layer means switching is a one-line change. See [benchmarks](./benchmarks/results/latest.md) for performance comparisons.
|
|
121
|
+
|
|
109
122
|
## Authoring CAD with AI (brepjs-cad)
|
|
110
123
|
|
|
111
124
|
[`brepjs-cad`](https://www.npmjs.com/package/brepjs-cad) 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).
|
package/dist/2d.cjs
CHANGED
|
@@ -2,10 +2,10 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
2
2
|
const require_shapeTypes = require("./shapeTypes-HDVHzNk1.cjs");
|
|
3
3
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
4
4
|
const require_topologyQueryFns = require("./topologyQueryFns-gyva7bvF.cjs");
|
|
5
|
-
const require_blueprintSketcher = require("./blueprintSketcher-
|
|
6
|
-
const require_blueprint = require("./blueprint-
|
|
7
|
-
const require_boolean2D = require("./boolean2D-
|
|
8
|
-
const require_blueprintFns = require("./blueprintFns-
|
|
5
|
+
const require_blueprintSketcher = require("./blueprintSketcher-BTJqAd7E.cjs");
|
|
6
|
+
const require_blueprint = require("./blueprint-p1SmFAfl.cjs");
|
|
7
|
+
const require_boolean2D = require("./boolean2D-CEPQF4LP.cjs");
|
|
8
|
+
const require_blueprintFns = require("./blueprintFns-DU8_o9zy.cjs");
|
|
9
9
|
// 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
1
|
import { F as createKernelHandle, J as getKernel2D, c as createEdge } from "./shapeTypes-Db3yAgTO.js";
|
|
2
2
|
import { E as ok, d as validationError, g as err, t as BrepErrorCode } from "./errors-BTccWbtE.js";
|
|
3
3
|
import { E as kernelCallRaw } from "./topologyQueryFns-DKNVBMuN.js";
|
|
4
|
-
import { a as Blueprints, i as CompoundBlueprint, r as organiseBlueprints } from "./blueprintSketcher-
|
|
5
|
-
import { t as Blueprint, v as Curve2D, x 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
|
|
4
|
+
import { a as Blueprints, i as CompoundBlueprint, r as organiseBlueprints } from "./blueprintSketcher-CmR6Mi91.js";
|
|
5
|
+
import { t as Blueprint, v as Curve2D, x as BoundingBox2d } from "./blueprint-CLgJoNt5.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-C3bLz5i0.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-D4wl5Fft.js";
|
|
8
8
|
// src/core/curve2dHandle.ts
|
|
9
9
|
/**
|
|
10
10
|
* Wrap a raw kernel 2D curve handle with brand + disposal tracking.
|
|
@@ -4,11 +4,11 @@ import { E as ok, P as unwrap, d as validationError, g as err, n as computationE
|
|
|
4
4
|
import { r as RAD2DEG, t as DEG2RAD } from "./constants-iraOnb2p.js";
|
|
5
5
|
import { r as toVec3 } from "./types-CKXsIm9-.js";
|
|
6
6
|
import { r as makePlane } from "./planeOps-D3yDuMux.js";
|
|
7
|
-
import { _ as cast, h as uvCoordinates, i as faceGeomType, m as uvBounds, r as faceCenter } from "./faceFns-
|
|
7
|
+
import { _ as cast, h as uvCoordinates, i as faceGeomType, m as uvBounds, r as faceCenter } from "./faceFns-DEDlLMcn.js";
|
|
8
8
|
import { p as getOrientation } from "./curveFns-AMqd_WaO.js";
|
|
9
9
|
import { n as getAtOrThrow, r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-BpgouNir.js";
|
|
10
|
-
import { r as makeFace } from "./surfaceBuilders-
|
|
11
|
-
import { l as add2d, m as normalize2d$1, p as distance2d, t as getSingleFace, v as samePoint, x as subtract2d, y as scalarMultiply2d } from "./helpers-
|
|
10
|
+
import { r as makeFace } from "./surfaceBuilders-CW6cUdk9.js";
|
|
11
|
+
import { l as add2d, m as normalize2d$1, p as distance2d, t as getSingleFace, v as samePoint, x as subtract2d, y as scalarMultiply2d } from "./helpers-i26hsY3T.js";
|
|
12
12
|
// src/2d/lib/definitions.ts
|
|
13
13
|
/** Type guard that checks whether a value is a `Point2D`. */
|
|
14
14
|
function isPoint2D(point) {
|
|
@@ -4,11 +4,11 @@ const require_errors = require("./errors-O_blYTWT.cjs");
|
|
|
4
4
|
const require_constants = require("./constants-oee0S_x6.cjs");
|
|
5
5
|
const require_types = require("./types-CjF9Rofr.cjs");
|
|
6
6
|
const require_planeOps = require("./planeOps-DZfLToKZ.cjs");
|
|
7
|
-
const require_faceFns = require("./faceFns-
|
|
7
|
+
const require_faceFns = require("./faceFns-C6fYNgZl.cjs");
|
|
8
8
|
const require_curveFns = require("./curveFns-CMiP40Ko.cjs");
|
|
9
9
|
const require_arrayAccess = require("./arrayAccess-DpJYARwv.cjs");
|
|
10
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
11
|
-
const require_helpers = require("./helpers-
|
|
10
|
+
const require_surfaceBuilders = require("./surfaceBuilders-o3H-x6Ca.cjs");
|
|
11
|
+
const require_helpers = require("./helpers-DxoCOnD_.cjs");
|
|
12
12
|
// 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 { E as ok, d as validationError, g as err, t as BrepErrorCode } from "./errors-BTccWbtE.js";
|
|
2
|
-
import { i as CompoundBlueprint } from "./blueprintSketcher-
|
|
3
|
-
import { t as Blueprint } from "./blueprint-
|
|
2
|
+
import { i as CompoundBlueprint } from "./blueprintSketcher-CmR6Mi91.js";
|
|
3
|
+
import { t as Blueprint } from "./blueprint-CLgJoNt5.js";
|
|
4
4
|
// 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-O_blYTWT.cjs");
|
|
2
|
-
const require_blueprintSketcher = require("./blueprintSketcher-
|
|
3
|
-
const require_blueprint = require("./blueprint-
|
|
2
|
+
const require_blueprintSketcher = require("./blueprintSketcher-BTJqAd7E.cjs");
|
|
3
|
+
const require_blueprint = require("./blueprint-p1SmFAfl.cjs");
|
|
4
4
|
// src/2d/lib/curve2dFns.ts
|
|
5
5
|
/**
|
|
6
6
|
* Return a reversed copy of the curve (non-mutating).
|
|
@@ -3,8 +3,8 @@ const require_bug = require("./bug-CBcpIPuf.cjs");
|
|
|
3
3
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
4
4
|
const require_constants = require("./constants-oee0S_x6.cjs");
|
|
5
5
|
const require_arrayAccess = require("./arrayAccess-DpJYARwv.cjs");
|
|
6
|
-
const require_helpers = require("./helpers-
|
|
7
|
-
const require_blueprint = require("./blueprint-
|
|
6
|
+
const require_helpers = require("./helpers-DxoCOnD_.cjs");
|
|
7
|
+
const require_blueprint = require("./blueprint-p1SmFAfl.cjs");
|
|
8
8
|
// node_modules/flatqueue/index.js
|
|
9
9
|
/**
|
|
10
10
|
* @typedef {Float64ArrayConstructor | Float32ArrayConstructor |
|
|
@@ -3,8 +3,8 @@ import { i as wasmIndex, n as bug } from "./bug-ClMTAJhe.js";
|
|
|
3
3
|
import { E as ok, P as unwrap, g as err, n as computationError, s as safeIndex, x as isOk } from "./errors-BTccWbtE.js";
|
|
4
4
|
import { r as RAD2DEG, t as DEG2RAD } from "./constants-iraOnb2p.js";
|
|
5
5
|
import { t as firstOrThrow } from "./arrayAccess-BpgouNir.js";
|
|
6
|
-
import { _ as rotate2d, d as cartesianToPolar, f as crossProduct2d, g as polarToCartesian, h as polarAngle2d, l as add2d, p as distance2d, v as samePoint, x as subtract2d, y as scalarMultiply2d } from "./helpers-
|
|
7
|
-
import { C as isPoint2D, b as normalize2d, c as make2dBezierCurve, d as make2dEllipseArc, g as approximateAsBSpline, h as make2dThreePointArc, l as make2dCircle, m as make2dTangentArc, n as asSVG, p as make2dSegmentCurve, r as viewbox, s as make2dArcFromCenter, t as Blueprint, v as Curve2D, x as BoundingBox2d } from "./blueprint-
|
|
6
|
+
import { _ as rotate2d, d as cartesianToPolar, f as crossProduct2d, g as polarToCartesian, h as polarAngle2d, l as add2d, p as distance2d, v as samePoint, x as subtract2d, y as scalarMultiply2d } from "./helpers-i26hsY3T.js";
|
|
7
|
+
import { C as isPoint2D, b as normalize2d, c as make2dBezierCurve, d as make2dEllipseArc, g as approximateAsBSpline, h as make2dThreePointArc, l as make2dCircle, m as make2dTangentArc, n as asSVG, p as make2dSegmentCurve, r as viewbox, s as make2dArcFromCenter, t as Blueprint, v as Curve2D, x as BoundingBox2d } from "./blueprint-CLgJoNt5.js";
|
|
8
8
|
// node_modules/flatqueue/index.js
|
|
9
9
|
/**
|
|
10
10
|
* @typedef {Float64ArrayConstructor | Float32ArrayConstructor |
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { i as wasmIndex, n as bug } from "./bug-ClMTAJhe.js";
|
|
2
2
|
import { P as unwrap, s as safeIndex } from "./errors-BTccWbtE.js";
|
|
3
3
|
import { r as lastOrThrow } from "./arrayAccess-BpgouNir.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 { f as crossProduct2d, o as PRECISION_INTERSECTION, v as samePoint$1, x as subtract2d } from "./helpers-
|
|
7
|
-
import { S as removeDuplicatePoints, p as make2dSegmentCurve, t as Blueprint } from "./blueprint-
|
|
4
|
+
import { v as zip } from "./surfaceBuilders-CW6cUdk9.js";
|
|
5
|
+
import { a as Blueprints, i as CompoundBlueprint, l as intersectCurves, r as organiseBlueprints, t as BlueprintSketcher, u as Flatbush } from "./blueprintSketcher-CmR6Mi91.js";
|
|
6
|
+
import { f as crossProduct2d, o as PRECISION_INTERSECTION, v as samePoint$1, x as subtract2d } from "./helpers-i26hsY3T.js";
|
|
7
|
+
import { S as removeDuplicatePoints, p as make2dSegmentCurve, t as Blueprint } from "./blueprint-CLgJoNt5.js";
|
|
8
8
|
// 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_bug = require("./bug-CBcpIPuf.cjs");
|
|
2
2
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
3
3
|
const require_arrayAccess = require("./arrayAccess-DpJYARwv.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-o3H-x6Ca.cjs");
|
|
5
|
+
const require_blueprintSketcher = require("./blueprintSketcher-BTJqAd7E.cjs");
|
|
6
|
+
const require_helpers = require("./helpers-DxoCOnD_.cjs");
|
|
7
|
+
const require_blueprint = require("./blueprint-p1SmFAfl.cjs");
|
|
8
8
|
// 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
|
@@ -10,33 +10,33 @@ const require_constants = require("./constants-oee0S_x6.cjs");
|
|
|
10
10
|
const require_types = require("./types-CjF9Rofr.cjs");
|
|
11
11
|
const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
|
|
12
12
|
const require_planeOps = require("./planeOps-DZfLToKZ.cjs");
|
|
13
|
-
const require_faceFns = require("./faceFns-
|
|
13
|
+
const require_faceFns = require("./faceFns-C6fYNgZl.cjs");
|
|
14
14
|
const require_originTrackingFns = require("./originTrackingFns-BRJ2PZ8J.cjs");
|
|
15
|
-
const require_solidBuilders = require("./solidBuilders-
|
|
16
|
-
const require_primitiveFns = require("./primitiveFns-
|
|
15
|
+
const require_solidBuilders = require("./solidBuilders-DYumkmVa.cjs");
|
|
16
|
+
const require_primitiveFns = require("./primitiveFns-wOdKnYBs.cjs");
|
|
17
17
|
const require_shapeFns = require("./shapeFns-CHFmX5HQ.cjs");
|
|
18
18
|
const require_curveFns = require("./curveFns-CMiP40Ko.cjs");
|
|
19
19
|
const require_meshFns = require("./meshFns-BNrdUhgG.cjs");
|
|
20
20
|
const require_arrayAccess = require("./arrayAccess-DpJYARwv.cjs");
|
|
21
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
22
|
-
const require_healingFns = require("./healingFns-
|
|
23
|
-
const require_threadFns = require("./threadFns-
|
|
24
|
-
const require_blueprintSketcher = require("./blueprintSketcher-
|
|
25
|
-
const require_helpers = require("./helpers-
|
|
26
|
-
const require_blueprint = require("./blueprint-
|
|
27
|
-
const require_drawFns = require("./drawFns-
|
|
28
|
-
const require_measureFns = require("./measureFns-
|
|
29
|
-
const require_cornerFinder = require("./cornerFinder-
|
|
30
|
-
const require_boolean2D = require("./boolean2D-
|
|
31
|
-
const require_blueprintFns = require("./blueprintFns-
|
|
32
|
-
const require_importFns = require("./importFns-
|
|
33
|
-
const require_textBlueprints = require("./textBlueprints-
|
|
21
|
+
const require_surfaceBuilders = require("./surfaceBuilders-o3H-x6Ca.cjs");
|
|
22
|
+
const require_healingFns = require("./healingFns-383ByJpH.cjs");
|
|
23
|
+
const require_threadFns = require("./threadFns-DckgA8OY.cjs");
|
|
24
|
+
const require_blueprintSketcher = require("./blueprintSketcher-BTJqAd7E.cjs");
|
|
25
|
+
const require_helpers = require("./helpers-DxoCOnD_.cjs");
|
|
26
|
+
const require_blueprint = require("./blueprint-p1SmFAfl.cjs");
|
|
27
|
+
const require_drawFns = require("./drawFns-BOyA7iOt.cjs");
|
|
28
|
+
const require_measureFns = require("./measureFns-Ed7LXAhG.cjs");
|
|
29
|
+
const require_cornerFinder = require("./cornerFinder-BToeCt6c.cjs");
|
|
30
|
+
const require_boolean2D = require("./boolean2D-CEPQF4LP.cjs");
|
|
31
|
+
const require_blueprintFns = require("./blueprintFns-DU8_o9zy.cjs");
|
|
32
|
+
const require_importFns = require("./importFns-Fr6WPpl2.cjs");
|
|
33
|
+
const require_textBlueprints = require("./textBlueprints-BSU9_W8u.cjs");
|
|
34
34
|
const require_loftFns = require("./loftFns-BsFinbgs.cjs");
|
|
35
|
-
const require_refResolveFns = require("./refResolveFns-
|
|
35
|
+
const require_refResolveFns = require("./refResolveFns-C23E6pcj.cjs");
|
|
36
36
|
const require_adjacencyFns = require("./adjacencyFns-Cibtcqdl.cjs");
|
|
37
37
|
const require_cameraFns = require("./cameraFns-CUX8VNKT.cjs");
|
|
38
|
-
const require_textMetrics = require("./textMetrics-
|
|
39
|
-
const require_principalBoxFns = require("./principalBoxFns-
|
|
38
|
+
const require_textMetrics = require("./textMetrics-BHunx03s.cjs");
|
|
39
|
+
const require_principalBoxFns = require("./principalBoxFns-D8rqqCl2.cjs");
|
|
40
40
|
const require_workerPool = require("./workerPool-D5tiNXrI.cjs");
|
|
41
41
|
// src/kernel/types.ts
|
|
42
42
|
/** Check if the kernel supports hidden-line-removal projection. */
|
package/dist/brepjs.js
CHANGED
|
@@ -8,33 +8,33 @@ import { n as HASH_CODE_MAX, r as RAD2DEG, t as DEG2RAD } from "./constants-iraO
|
|
|
8
8
|
import { n as toVec2, r as toVec3, t as resolveDirection } from "./types-CKXsIm9-.js";
|
|
9
9
|
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-S-m9H_fe.js";
|
|
10
10
|
import { i as pivotPlane, n as createPlane, o as resolvePlane, r as makePlane, s as translatePlane, t as createNamedPlane } from "./planeOps-D3yDuMux.js";
|
|
11
|
-
import { C as shapeType, S as iterTopo, _ as cast, a as faceOrientation, b as fromBREP, 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, x as isCompSolid, y as downcast } from "./faceFns-
|
|
11
|
+
import { C as shapeType, S as iterTopo, _ as cast, a as faceOrientation, b as fromBREP, 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, x as isCompSolid, y as downcast } from "./faceFns-DEDlLMcn.js";
|
|
12
12
|
import { i as setShapeOrigin, t as getFaceOrigins } from "./originTrackingFns-BqlxFeWq.js";
|
|
13
|
-
import { A as parseColor, D as colorShape, E as colorFaces, F as tagFaces, M as getFaceTags, N as getTagMetadata, O as getFaceColor, P as setTagMetadata, S as hasAnyMetadata, T as propagateMetadataThroughRelocation, _ as section$1, b as split$1, d as booleanPipeline, f as cut$2, g as intersect$2, h as fuseAll$2, j as findFacesByTag, k as getShapeColor, m as fuse$2, p as cutAll$2, r as makeCylinder, t as makeCompound, v as sectionToFace$1, y as slice$1 } from "./solidBuilders-
|
|
14
|
-
import { A as locate$1, C as threePointArc, D as wireLoop, E as wire, F as transformCopy$1, I as translate$2, M as resize, N as rotate$2, O as applyMatrix$1, P as scale$3, 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, j as mirror$2, k as composeTransforms, 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-
|
|
13
|
+
import { A as parseColor, D as colorShape, E as colorFaces, F as tagFaces, M as getFaceTags, N as getTagMetadata, O as getFaceColor, P as setTagMetadata, S as hasAnyMetadata, T as propagateMetadataThroughRelocation, _ as section$1, b as split$1, d as booleanPipeline, f as cut$2, g as intersect$2, h as fuseAll$2, j as findFacesByTag, k as getShapeColor, m as fuse$2, p as cutAll$2, r as makeCylinder, t as makeCompound, v as sectionToFace$1, y as slice$1 } from "./solidBuilders-CAiqZrAE.js";
|
|
14
|
+
import { A as locate$1, C as threePointArc, D as wireLoop, E as wire, F as transformCopy$1, I as translate$2, M as resize, N as rotate$2, O as applyMatrix$1, P as scale$3, 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, j as mirror$2, k as composeTransforms, 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-DrEUKZvX.js";
|
|
15
15
|
import { a as isSameShape, i as isEqualShape, n as getHashCode, o as simplify$1, r as isEmpty$2, s as toBREP$1, t as clone$1 } from "./shapeFns-D7DcPxfx.js";
|
|
16
16
|
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-AMqd_WaO.js";
|
|
17
17
|
import { a as meshEdges$1, c as meshMultiLOD, d as clearMeshCache, f as createMeshCache, i as mesh$1, l as scaleDefaultTolerance, n as exportSTEP, o as meshLODs, r as exportSTL, s as meshLODsProgressive, t as exportIGES, u as buildMeshCacheKey } from "./meshFns-LytwBtBQ.js";
|
|
18
18
|
import { n as getAtOrThrow, r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-BpgouNir.js";
|
|
19
|
-
import { _ as makeThreePointArc, d as makeCircle, h as makeLine, l as makeBSplineInterpolation, n as fill, p as makeEllipseArc, r as makeFace, s as assembleWire, u as makeBezierCurve } from "./surfaceBuilders-
|
|
20
|
-
import { A as variableFillet, C as chamfer$2, D as removeFaces$1, E as offset$1, F as toLineGeometryData, M as toGroupedBufferGeometryData, N as toLODGeometryData, O as shell$2, P as toLODGeometryLevels, S as chamferDistAngle, T as fillet$2, _ as checkBoolean, a as healFace, b as getNurbsCurveData, c as isValid$1, d as chamferWithEvolution, f as cutWithEvolution, g as shellWithEvolution, h as intersectWithEvolution, i as heal$1, j as toBufferGeometryData, k as thicken$1, l as solidFromShell, m as fuseWithEvolution, n as fixSelfIntersection, o as healSolid, p as filletWithEvolution, r as fixShape, s as healWire, t as autoHeal, u as positionOnCurve, v as cutAllBisect, w as draft$1, x as getNurbsSurfaceData, y as fuseAllBisect } from "./healingFns-
|
|
21
|
-
import { A as setJointValue, B as walkAssembly, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, F as countNodes, G as quatFromAxisAngle, H as circularPattern, I as createAssemblyNode, J as quatRotate, K as quatFromTo, L as findNode, M as sphericalJoint, N as addChild, O as prismaticJoint, P as collectShapes, R as removeChild, S as addJoint, T as jointTransform, U as gridPattern, V as exportAssemblySTEP, W as linearPattern, Y as createAssembly, _ 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 quatMultiply, 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 updateNode } from "./threadFns-
|
|
22
|
-
import { n as BaseSketcher2d, r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-
|
|
23
|
-
import { a as createTypedFinder, i as wireFinder, n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-
|
|
24
|
-
import { _ as approximateAsSvgCompatibleCurve, o as ellipseArcFlags } from "./blueprint-
|
|
25
|
-
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-
|
|
26
|
-
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-
|
|
27
|
-
import { t as cornerFinder } from "./cornerFinder-
|
|
28
|
-
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-
|
|
29
|
-
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
|
|
30
|
-
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-
|
|
31
|
-
import { S as revolve$2, a as Sketches, b as extrude$2, c as compoundSketchFace, d as sketchExtrude, f as sketchFace, g as sketchWires, h as sketchSweep, i as setFallbackFont, l as compoundSketchLoft, m as sketchRevolve, n as getFont, o as Sketch, p as sketchLoft, r as loadFont, s as compoundSketchExtrude, t as textBlueprints, u as compoundSketchRevolve, x as extrudeAll, y as CompoundSketch } from "./textBlueprints-
|
|
19
|
+
import { _ as makeThreePointArc, d as makeCircle, h as makeLine, l as makeBSplineInterpolation, n as fill, p as makeEllipseArc, r as makeFace, s as assembleWire, u as makeBezierCurve } from "./surfaceBuilders-CW6cUdk9.js";
|
|
20
|
+
import { A as variableFillet, C as chamfer$2, D as removeFaces$1, E as offset$1, F as toLineGeometryData, M as toGroupedBufferGeometryData, N as toLODGeometryData, O as shell$2, P as toLODGeometryLevels, S as chamferDistAngle, T as fillet$2, _ as checkBoolean, a as healFace, b as getNurbsCurveData, c as isValid$1, d as chamferWithEvolution, f as cutWithEvolution, g as shellWithEvolution, h as intersectWithEvolution, i as heal$1, j as toBufferGeometryData, k as thicken$1, l as solidFromShell, m as fuseWithEvolution, n as fixSelfIntersection, o as healSolid, p as filletWithEvolution, r as fixShape, s as healWire, t as autoHeal, u as positionOnCurve, v as cutAllBisect, w as draft$1, x as getNurbsSurfaceData, y as fuseAllBisect } from "./healingFns-CJIIjQKh.js";
|
|
21
|
+
import { A as setJointValue, B as walkAssembly, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, F as countNodes, G as quatFromAxisAngle, H as circularPattern, I as createAssemblyNode, J as quatRotate, K as quatFromTo, L as findNode, M as sphericalJoint, N as addChild, O as prismaticJoint, P as collectShapes, R as removeChild, S as addJoint, T as jointTransform, U as gridPattern, V as exportAssemblySTEP, W as linearPattern, Y as createAssembly, _ 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 quatMultiply, 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 updateNode } from "./threadFns-DViBlfHh.js";
|
|
22
|
+
import { n as BaseSketcher2d, r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-CmR6Mi91.js";
|
|
23
|
+
import { a as createTypedFinder, i as wireFinder, n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-i26hsY3T.js";
|
|
24
|
+
import { _ as approximateAsSvgCompatibleCurve, o as ellipseArcFlags } from "./blueprint-CLgJoNt5.js";
|
|
25
|
+
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-DzqPMBHE.js";
|
|
26
|
+
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-BuxKO1GV.js";
|
|
27
|
+
import { t as cornerFinder } from "./cornerFinder-CBjvTijF.js";
|
|
28
|
+
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-C3bLz5i0.js";
|
|
29
|
+
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-D4wl5Fft.js";
|
|
30
|
+
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-Bz4sXl93.js";
|
|
31
|
+
import { S as revolve$2, a as Sketches, b as extrude$2, c as compoundSketchFace, d as sketchExtrude, f as sketchFace, g as sketchWires, h as sketchSweep, i as setFallbackFont, l as compoundSketchLoft, m as sketchRevolve, n as getFont, o as Sketch, p as sketchLoft, r as loadFont, s as compoundSketchExtrude, t as textBlueprints, u as compoundSketchRevolve, x as extrudeAll, y as CompoundSketch } from "./textBlueprints-BE9fvro-.js";
|
|
32
32
|
import { a as multiSectionSweep, c as twistExtrude, i as guidedSweep, n as loftAll, o as supportExtrude, r as complexExtrude, s as sweep$1, t as loft$2 } from "./loftFns-pMh0ET-J.js";
|
|
33
|
-
import { _ as createRef, a as isVertexRef, b as defaultScorer, c as resolveRefParams, d as createVertexRef, f as resolveVertexRef, g as captureHint, h as assignRoles, i as isLineageRef, l as createDerivedFaceRef, m as resolveEdgeRef, n as isEdgeRef, o as resolveLineageRef, p as createEdgeRef, r as isFaceRef, s as resolveRefIn, t as isDerivedFaceRef, u as resolveDerivedFaceRef, v as resolveRef, y as updateRoles } from "./refResolveFns-
|
|
33
|
+
import { _ as createRef, a as isVertexRef, b as defaultScorer, c as resolveRefParams, d as createVertexRef, f as resolveVertexRef, g as captureHint, h as assignRoles, i as isLineageRef, l as createDerivedFaceRef, m as resolveEdgeRef, n as isEdgeRef, o as resolveLineageRef, p as createEdgeRef, r as isFaceRef, s as resolveRefIn, t as isDerivedFaceRef, u as resolveDerivedFaceRef, v as resolveRef, y as updateRoles } from "./refResolveFns-BqcjC50D.js";
|
|
34
34
|
import { a as facesOfVertex, c as verticesOfFace, i as facesOfEdge, l as wiresOfFace, n as adjacentFaces, o as sharedEdges, r as edgesOfFace, s as verticesOfEdge } from "./adjacencyFns-C0YD3Zrp.js";
|
|
35
35
|
import { a as makeProjectedEdges, i as projectEdges, n as cameraLookAt, r as createCamera, s as isProjectionPlane, t as cameraFromPlane } from "./cameraFns-xUCRxpsa.js";
|
|
36
|
-
import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-
|
|
37
|
-
import { t as principalBoundingBox } from "./principalBoxFns-
|
|
36
|
+
import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-DBqFVzjh.js";
|
|
37
|
+
import { t as principalBoundingBox } from "./principalBoxFns-C0UzVmfC.js";
|
|
38
38
|
import { _ as isSuccessResponse, a as createWorkerClient, c as enqueueTask, d as rejectAll, f as isBatchRequest, g as isOperationRequest, h as isInitRequest, i as registerHandler, l as isEmpty$1, m as isErrorResponse, n as createOperationRegistry, o as createTaskQueue, p as isDisposeRequest, r as createWorkerHandler, s as dequeueTask, t as createWorkerPool, u as pendingCount } from "./workerPool-Bc5hmJc4.js";
|
|
39
39
|
// \0rolldown/runtime.js
|
|
40
40
|
var __defProp = Object.defineProperty;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_constants = require("./constants-oee0S_x6.cjs");
|
|
2
2
|
const require_arrayAccess = require("./arrayAccess-DpJYARwv.cjs");
|
|
3
|
-
const require_helpers = require("./helpers-
|
|
3
|
+
const require_helpers = require("./helpers-DxoCOnD_.cjs");
|
|
4
4
|
// src/query/cornerFinder.ts
|
|
5
5
|
var PI_2 = 2 * Math.PI;
|
|
6
6
|
function positiveHalfAngle(angle) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as DEG2RAD } from "./constants-iraOnb2p.js";
|
|
2
2
|
import { n as getAtOrThrow } from "./arrayAccess-BpgouNir.js";
|
|
3
|
-
import { p as distance2d, u as angle2d, v as samePoint } from "./helpers-
|
|
3
|
+
import { p as distance2d, u as angle2d, v as samePoint } from "./helpers-i26hsY3T.js";
|
|
4
4
|
// src/query/cornerFinder.ts
|
|
5
5
|
var PI_2 = 2 * Math.PI;
|
|
6
6
|
function positiveHalfAngle(angle) {
|
|
@@ -6,16 +6,16 @@ const require_constants = require("./constants-oee0S_x6.cjs");
|
|
|
6
6
|
const require_types = require("./types-CjF9Rofr.cjs");
|
|
7
7
|
const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
|
|
8
8
|
const require_planeOps = require("./planeOps-DZfLToKZ.cjs");
|
|
9
|
-
const require_faceFns = require("./faceFns-
|
|
9
|
+
const require_faceFns = require("./faceFns-C6fYNgZl.cjs");
|
|
10
10
|
const require_curveFns = require("./curveFns-CMiP40Ko.cjs");
|
|
11
11
|
const require_arrayAccess = require("./arrayAccess-DpJYARwv.cjs");
|
|
12
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
13
|
-
const require_blueprintSketcher = require("./blueprintSketcher-
|
|
14
|
-
const require_helpers = require("./helpers-
|
|
15
|
-
const require_blueprint = require("./blueprint-
|
|
16
|
-
const require_cornerFinder = require("./cornerFinder-
|
|
17
|
-
const require_boolean2D = require("./boolean2D-
|
|
18
|
-
const require_textBlueprints = require("./textBlueprints-
|
|
12
|
+
const require_surfaceBuilders = require("./surfaceBuilders-o3H-x6Ca.cjs");
|
|
13
|
+
const require_blueprintSketcher = require("./blueprintSketcher-BTJqAd7E.cjs");
|
|
14
|
+
const require_helpers = require("./helpers-DxoCOnD_.cjs");
|
|
15
|
+
const require_blueprint = require("./blueprint-p1SmFAfl.cjs");
|
|
16
|
+
const require_cornerFinder = require("./cornerFinder-BToeCt6c.cjs");
|
|
17
|
+
const require_boolean2D = require("./boolean2D-CEPQF4LP.cjs");
|
|
18
|
+
const require_textBlueprints = require("./textBlueprints-BSU9_W8u.cjs");
|
|
19
19
|
const require_cameraFns = require("./cameraFns-CUX8VNKT.cjs");
|
|
20
20
|
// src/2d/lib/stitching.ts
|
|
21
21
|
/**
|
|
@@ -6,16 +6,16 @@ import { t as DEG2RAD } from "./constants-iraOnb2p.js";
|
|
|
6
6
|
import { r as toVec3 } from "./types-CKXsIm9-.js";
|
|
7
7
|
import { d as vecNormalize, g as vecSub, h as vecScale, m as vecRotate, r as vecCross } from "./vecOps-S-m9H_fe.js";
|
|
8
8
|
import { a as planeToWorld, o as resolvePlane } from "./planeOps-D3yDuMux.js";
|
|
9
|
-
import { d as pointOnSurface, l as normalAt, m as uvBounds, r as faceCenter, u as outerWire, v as copyShape, y as downcast } from "./faceFns-
|
|
9
|
+
import { d as pointOnSurface, l as normalAt, m as uvBounds, r as faceCenter, u as outerWire, v as copyShape, y as downcast } from "./faceFns-DEDlLMcn.js";
|
|
10
10
|
import { h as offsetWire2D, i as curveIsClosed, l as curveStartPoint } from "./curveFns-AMqd_WaO.js";
|
|
11
11
|
import { n as getAtOrThrow, r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-BpgouNir.js";
|
|
12
|
-
import { c as makeBSplineApproximation, d as makeCircle, f as makeEllipse, m as makeHelix, r as makeFace, s as assembleWire } from "./surfaceBuilders-
|
|
13
|
-
import { a as Blueprints, c as make2dOffset, i as CompoundBlueprint, l as intersectCurves, n as BaseSketcher2d, o as chamferCurves, s as filletCurves, u as Flatbush } from "./blueprintSketcher-
|
|
14
|
-
import { b as squareDistance2d, l as add2d, s as PRECISION_OFFSET, v as samePoint$1, x as subtract2d } from "./helpers-
|
|
15
|
-
import { _ as approximateAsSvgCompatibleCurve, a as edgeToCurve, f as make2dInerpolatedBSplineCurve, i as curvesAsEdgesOnPlane, l as make2dCircle, p as make2dSegmentCurve, s as make2dArcFromCenter, t as Blueprint, u as make2dEllipse, v as Curve2D, x as BoundingBox2d, y as deserializeCurve2D } from "./blueprint-
|
|
16
|
-
import { t as cornerFinder } from "./cornerFinder-
|
|
17
|
-
import { c as roundedRectangleBlueprint, n as fuse2D, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-
|
|
18
|
-
import { _ as wrapSketchData, a as Sketches, o as Sketch, t as textBlueprints, v as wrapSketchDataArray } from "./textBlueprints-
|
|
12
|
+
import { c as makeBSplineApproximation, d as makeCircle, f as makeEllipse, m as makeHelix, r as makeFace, s as assembleWire } from "./surfaceBuilders-CW6cUdk9.js";
|
|
13
|
+
import { a as Blueprints, c as make2dOffset, i as CompoundBlueprint, l as intersectCurves, n as BaseSketcher2d, o as chamferCurves, s as filletCurves, u as Flatbush } from "./blueprintSketcher-CmR6Mi91.js";
|
|
14
|
+
import { b as squareDistance2d, l as add2d, s as PRECISION_OFFSET, v as samePoint$1, x as subtract2d } from "./helpers-i26hsY3T.js";
|
|
15
|
+
import { _ as approximateAsSvgCompatibleCurve, a as edgeToCurve, f as make2dInerpolatedBSplineCurve, i as curvesAsEdgesOnPlane, l as make2dCircle, p as make2dSegmentCurve, s as make2dArcFromCenter, t as Blueprint, u as make2dEllipse, v as Curve2D, x as BoundingBox2d, y as deserializeCurve2D } from "./blueprint-CLgJoNt5.js";
|
|
16
|
+
import { t as cornerFinder } from "./cornerFinder-CBjvTijF.js";
|
|
17
|
+
import { c as roundedRectangleBlueprint, n as fuse2D, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-C3bLz5i0.js";
|
|
18
|
+
import { _ as wrapSketchData, a as Sketches, o as Sketch, t as textBlueprints, v as wrapSketchDataArray } from "./textBlueprints-BE9fvro-.js";
|
|
19
19
|
import { i as projectEdges, t as cameraFromPlane } from "./cameraFns-xUCRxpsa.js";
|
|
20
20
|
// src/2d/lib/stitching.ts
|
|
21
21
|
/**
|
|
@@ -38,10 +38,14 @@ var iterTopo = function* iterTopo(shape, topo) {
|
|
|
38
38
|
const shapes = require_shapeTypes.getKernel().iterShapes(shape, TOPO_TO_SHAPE_TYPE[topo]);
|
|
39
39
|
for (const s of shapes) yield s;
|
|
40
40
|
};
|
|
41
|
-
/**
|
|
41
|
+
/**
|
|
42
|
+
* Get the topological type of a shape (`'solid'`, `'face'`, ...), returning Err for null
|
|
43
|
+
* shapes. Accepts a branded shape or its raw kernel handle (`shape.wrapped`).
|
|
44
|
+
*/
|
|
42
45
|
var shapeType = (shape) => {
|
|
43
|
-
|
|
44
|
-
return require_errors.
|
|
46
|
+
const raw = shape !== null && typeof shape === "object" && "wrapped" in shape ? shape.wrapped : shape;
|
|
47
|
+
if (require_shapeTypes.getKernel().isNull(raw)) return require_errors.err(require_errors.typeCastError("NULL_SHAPE", "This shape has no type, it is null"));
|
|
48
|
+
return require_errors.ok(require_shapeTypes.getOrQueryType(require_shapeTypes.getKernel(), raw));
|
|
45
49
|
};
|
|
46
50
|
/**
|
|
47
51
|
* Downcast a generic KernelShape to its concrete kernel type (e.g., kernel topology_Face).
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as castShape, q as getKernel } from "./shapeTypes-Db3yAgTO.js";
|
|
1
|
+
import { O as getOrQueryType, i as castShape, q as getKernel } from "./shapeTypes-Db3yAgTO.js";
|
|
2
2
|
import { E as ok, P as unwrap, g as err, l as typeCastError } from "./errors-BTccWbtE.js";
|
|
3
3
|
import { a as getCachedSurfaceType } from "./topologyQueryFns-DKNVBMuN.js";
|
|
4
4
|
import { r as toVec3 } from "./types-CKXsIm9-.js";
|
|
@@ -38,10 +38,14 @@ var iterTopo = function* iterTopo(shape, topo) {
|
|
|
38
38
|
const shapes = getKernel().iterShapes(shape, TOPO_TO_SHAPE_TYPE[topo]);
|
|
39
39
|
for (const s of shapes) yield s;
|
|
40
40
|
};
|
|
41
|
-
/**
|
|
41
|
+
/**
|
|
42
|
+
* Get the topological type of a shape (`'solid'`, `'face'`, ...), returning Err for null
|
|
43
|
+
* shapes. Accepts a branded shape or its raw kernel handle (`shape.wrapped`).
|
|
44
|
+
*/
|
|
42
45
|
var shapeType = (shape) => {
|
|
43
|
-
|
|
44
|
-
|
|
46
|
+
const raw = shape !== null && typeof shape === "object" && "wrapped" in shape ? shape.wrapped : shape;
|
|
47
|
+
if (getKernel().isNull(raw)) return err(typeCastError("NULL_SHAPE", "This shape has no type, it is null"));
|
|
48
|
+
return ok(getOrQueryType(getKernel(), raw));
|
|
45
49
|
};
|
|
46
50
|
/**
|
|
47
51
|
* Downcast a generic KernelShape to its concrete kernel type (e.g., kernel topology_Face).
|
|
@@ -3,8 +3,8 @@ const require_occtWasmAdapter = require("./occtWasmAdapter-D1EXktNq.cjs");
|
|
|
3
3
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
4
4
|
const require_topologyQueryFns = require("./topologyQueryFns-gyva7bvF.cjs");
|
|
5
5
|
const require_constants = require("./constants-oee0S_x6.cjs");
|
|
6
|
-
const require_faceFns = require("./faceFns-
|
|
7
|
-
const require_solidBuilders = require("./solidBuilders-
|
|
6
|
+
const require_faceFns = require("./faceFns-C6fYNgZl.cjs");
|
|
7
|
+
const require_solidBuilders = require("./solidBuilders-DYumkmVa.cjs");
|
|
8
8
|
const require_arrayAccess = require("./arrayAccess-DpJYARwv.cjs");
|
|
9
9
|
// src/topology/threeHelpers.ts
|
|
10
10
|
/**
|
|
@@ -3,8 +3,8 @@ import { k as isUnsupportedKernelOperationError, n as faultyEdgeIndexesOf } from
|
|
|
3
3
|
import { E as ok, b as isErr, d as validationError, g as err, i as kernelError, l as typeCastError, t as BrepErrorCode, u as unsupportedError, x as isOk } from "./errors-BTccWbtE.js";
|
|
4
4
|
import { C as subShapeHashes, O as getSuggestionForCode, c as getFaces, i as getCachedIsValid, m as invalidateShapeCache, p as getWires, s as getEdges } from "./topologyQueryFns-DKNVBMuN.js";
|
|
5
5
|
import { n as HASH_CODE_MAX } from "./constants-iraOnb2p.js";
|
|
6
|
-
import { y as downcast } from "./faceFns-
|
|
7
|
-
import { C as propagateAllMetadata, f as cut, h as fuseAll, m as fuse, p as cutAll, w as propagateMetadataByHash, x as collectInputFaceHashes } from "./solidBuilders-
|
|
6
|
+
import { y as downcast } from "./faceFns-DEDlLMcn.js";
|
|
7
|
+
import { C as propagateAllMetadata, f as cut, h as fuseAll, m as fuse, p as cutAll, w as propagateMetadataByHash, x as collectInputFaceHashes } from "./solidBuilders-CAiqZrAE.js";
|
|
8
8
|
import { t as firstOrThrow } from "./arrayAccess-BpgouNir.js";
|
|
9
9
|
// src/topology/threeHelpers.ts
|
|
10
10
|
/**
|
|
@@ -3,10 +3,10 @@ const require_errors = require("./errors-O_blYTWT.cjs");
|
|
|
3
3
|
const require_topologyQueryFns = require("./topologyQueryFns-gyva7bvF.cjs");
|
|
4
4
|
const require_constants = require("./constants-oee0S_x6.cjs");
|
|
5
5
|
const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
|
|
6
|
-
const require_faceFns = require("./faceFns-
|
|
6
|
+
const require_faceFns = require("./faceFns-C6fYNgZl.cjs");
|
|
7
7
|
const require_shapeFns = require("./shapeFns-CHFmX5HQ.cjs");
|
|
8
8
|
const require_curveFns = require("./curveFns-CMiP40Ko.cjs");
|
|
9
|
-
const require_measureFns = require("./measureFns-
|
|
9
|
+
const require_measureFns = require("./measureFns-Ed7LXAhG.cjs");
|
|
10
10
|
// src/utils/vec2d.ts
|
|
11
11
|
/** Precision for curve intersection and parameter operations. */
|
|
12
12
|
var PRECISION_INTERSECTION = 1e-9;
|
|
@@ -3,10 +3,10 @@ import { E as ok, g as err, o as queryError, x as isOk } from "./errors-BTccWbtE
|
|
|
3
3
|
import { c as getFaces, f as getVertices, p as getWires, s as getEdges } from "./topologyQueryFns-DKNVBMuN.js";
|
|
4
4
|
import { t as DEG2RAD } from "./constants-iraOnb2p.js";
|
|
5
5
|
import { a as vecDot, d as vecNormalize } from "./vecOps-S-m9H_fe.js";
|
|
6
|
-
import { l as normalAt, s as getSurfaceType } from "./faceFns-
|
|
6
|
+
import { l as normalAt, s as getSurfaceType } from "./faceFns-DEDlLMcn.js";
|
|
7
7
|
import { a as isSameShape, n as getHashCode } from "./shapeFns-D7DcPxfx.js";
|
|
8
8
|
import { f as getCurveType, i as curveIsClosed, o as curveLength } from "./curveFns-AMqd_WaO.js";
|
|
9
|
-
import { n as measureArea } from "./measureFns-
|
|
9
|
+
import { n as measureArea } from "./measureFns-BuxKO1GV.js";
|
|
10
10
|
// src/utils/vec2d.ts
|
|
11
11
|
/** Precision for curve intersection and parameter operations. */
|
|
12
12
|
var PRECISION_INTERSECTION = 1e-9;
|
|
@@ -2,7 +2,7 @@ import { n as castResultShape, q as getKernel } from "./shapeTypes-Db3yAgTO.js";
|
|
|
2
2
|
import { i as wasmIndex, r as vec3At$1 } from "./bug-ClMTAJhe.js";
|
|
3
3
|
import { E as ok, g as err, r as ioError, t as BrepErrorCode } from "./errors-BTccWbtE.js";
|
|
4
4
|
import { n as getAtOrThrow } from "./arrayAccess-BpgouNir.js";
|
|
5
|
-
import { c as make2dBezierCurve, h as make2dThreePointArc, p as make2dSegmentCurve, t as Blueprint } from "./blueprint-
|
|
5
|
+
import { c as make2dBezierCurve, h as make2dThreePointArc, p as make2dSegmentCurve, t as Blueprint } from "./blueprint-CLgJoNt5.js";
|
|
6
6
|
// src/io/objExportFns.ts
|
|
7
7
|
/** Read a vec3 from a typed array at the given vertex index. */
|
|
8
8
|
function vec3At(arr, i) {
|
|
@@ -2,7 +2,7 @@ const require_shapeTypes = require("./shapeTypes-HDVHzNk1.cjs");
|
|
|
2
2
|
const require_bug = require("./bug-CBcpIPuf.cjs");
|
|
3
3
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
4
4
|
const require_arrayAccess = require("./arrayAccess-DpJYARwv.cjs");
|
|
5
|
-
const require_blueprint = require("./blueprint-
|
|
5
|
+
const require_blueprint = require("./blueprint-p1SmFAfl.cjs");
|
|
6
6
|
// src/io/objExportFns.ts
|
|
7
7
|
/** Read a vec3 from a typed array at the given vertex index. */
|
|
8
8
|
function vec3At(arr, i) {
|
package/dist/io.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_meshFns = require("./meshFns-BNrdUhgG.cjs");
|
|
3
|
-
const require_importFns = require("./importFns-
|
|
3
|
+
const require_importFns = require("./importFns-Fr6WPpl2.cjs");
|
|
4
4
|
exports.blueprintToDXF = require_importFns.blueprintToDXF;
|
|
5
5
|
exports.exportDXF = require_importFns.exportDXF;
|
|
6
6
|
exports.exportGlb = require_importFns.exportGlb;
|
package/dist/io.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { n as exportSTEP, r as exportSTL, t as exportIGES } from "./meshFns-LytwBtBQ.js";
|
|
2
|
-
import { a as importSVG, c as blueprintToDXF, d as exportGltf, f as exportOBJ, i as exportSTEPConfigured, l as exportDXF, n as importSTEP, o as importSVGPathD, r as importSTL, s as exportThreeMF, t as importIGES, u as exportGlb } from "./importFns-
|
|
2
|
+
import { a as importSVG, c as blueprintToDXF, d as exportGltf, f as exportOBJ, i as exportSTEPConfigured, l as exportDXF, n as importSTEP, o as importSVGPathD, r as importSTL, s as exportThreeMF, t as importIGES, u as exportGlb } from "./importFns-Bz4sXl93.js";
|
|
3
3
|
export { blueprintToDXF, exportDXF, exportGlb, exportGltf, exportIGES, exportOBJ, exportSTEP, exportSTEPConfigured, exportSTL, exportThreeMF, importIGES, importSTEP, importSTL, importSVG, importSVGPathD };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { q as getKernel } from "./shapeTypes-Db3yAgTO.js";
|
|
2
2
|
import { E as ok, d as validationError, g as err, t as BrepErrorCode } from "./errors-BTccWbtE.js";
|
|
3
3
|
import { E as kernelCallRaw } from "./topologyQueryFns-DKNVBMuN.js";
|
|
4
|
-
import { m as uvBounds } from "./faceFns-
|
|
4
|
+
import { m as uvBounds } from "./faceFns-DEDlLMcn.js";
|
|
5
5
|
// src/measurement/measureCache.ts
|
|
6
6
|
var cache = /* @__PURE__ */ new WeakMap();
|
|
7
7
|
function getCachedMeasurement(shape, key) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_shapeTypes = require("./shapeTypes-HDVHzNk1.cjs");
|
|
2
2
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
3
3
|
const require_topologyQueryFns = require("./topologyQueryFns-gyva7bvF.cjs");
|
|
4
|
-
const require_faceFns = require("./faceFns-
|
|
4
|
+
const require_faceFns = require("./faceFns-C6fYNgZl.cjs");
|
|
5
5
|
// src/measurement/measureCache.ts
|
|
6
6
|
var cache = /* @__PURE__ */ new WeakMap();
|
|
7
7
|
function getCachedMeasurement(shape, key) {
|
package/dist/measurement.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_measureFns = require("./measureFns-
|
|
3
|
-
const require_principalBoxFns = require("./principalBoxFns-
|
|
2
|
+
const require_measureFns = require("./measureFns-Ed7LXAhG.cjs");
|
|
3
|
+
const require_principalBoxFns = require("./principalBoxFns-D8rqqCl2.cjs");
|
|
4
4
|
exports.createDistanceQuery = require_measureFns.createDistanceQuery;
|
|
5
5
|
exports.measureArea = require_measureFns.measureArea;
|
|
6
6
|
exports.measureDistance = require_measureFns.measureDistance;
|
package/dist/measurement.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as measureDistance, c as measureLinearProps, d as measureVolumeProps, l as measureSurfaceProps, n as measureArea, o as measureDistanceProps, s as measureLength, t as createDistanceQuery, u as measureVolume } from "./measureFns-
|
|
2
|
-
import { t as principalBoundingBox } from "./principalBoxFns-
|
|
1
|
+
import { a as measureDistance, c as measureLinearProps, d as measureVolumeProps, l as measureSurfaceProps, n as measureArea, o as measureDistanceProps, s as measureLength, t as createDistanceQuery, u as measureVolume } from "./measureFns-BuxKO1GV.js";
|
|
2
|
+
import { t as principalBoundingBox } from "./principalBoxFns-C0UzVmfC.js";
|
|
3
3
|
export { createDistanceQuery, measureArea, measureDistance, measureDistanceProps, measureLength, measureLinearProps, measureSurfaceProps, measureVolume, measureVolumeProps, principalBoundingBox };
|
package/dist/operations.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_threadFns = require("./threadFns-
|
|
2
|
+
const require_threadFns = require("./threadFns-DckgA8OY.cjs");
|
|
3
3
|
const require_loftFns = require("./loftFns-BsFinbgs.cjs");
|
|
4
4
|
exports.addChild = require_threadFns.addChild;
|
|
5
5
|
exports.addJoint = require_threadFns.addJoint;
|
package/dist/operations.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { A as setJointValue, B as walkAssembly, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, F as countNodes, H as circularPattern, I as createAssemblyNode, L as findNode, M as sphericalJoint, N as addChild, O as prismaticJoint, P as collectShapes, R as removeChild, S as addJoint, T as jointTransform, U as gridPattern, V as exportAssemblySTEP, W as linearPattern, Y as createAssembly, _ as exportURDF, 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, 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 updateNode } from "./threadFns-
|
|
1
|
+
import { A as setJointValue, B as walkAssembly, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, F as countNodes, H as circularPattern, I as createAssemblyNode, L as findNode, M as sphericalJoint, N as addChild, O as prismaticJoint, P as collectShapes, R as removeChild, S as addJoint, T as jointTransform, U as gridPattern, V as exportAssemblySTEP, W as linearPattern, Y as createAssembly, _ as exportURDF, 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, 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 updateNode } from "./threadFns-DViBlfHh.js";
|
|
2
2
|
import { c as twistExtrude, o as supportExtrude, r as complexExtrude, s as sweep } from "./loftFns-pMh0ET-J.js";
|
|
3
3
|
export { addChild, addJoint, addStep, circularPattern, collectShapes, complexExtrude, countNodes, createAssembly, createAssemblyNode, createHistory, createRegistry, cylindricalJoint, exportAssemblySTEP, exportURDF, findNode, findStep, forwardKinematics, getShape as getHistoryShape, gridPattern, importURDF, inverseKinematics, jointTrajectory, jointTransform, jointsFromDH, linearPattern, mechanismDOF, modifyStep, planarJoint, prismaticJoint, registerOperation, registerShape, removeChild, replayFrom, replayHistory, revoluteJoint, setJointValue, setJointValues, sphericalJoint, stepCount, stepsFrom, supportExtrude, sweep, thread, twistExtrude, undoLast, updateNode, walkAssembly };
|
|
@@ -2,8 +2,8 @@ import { E as GeometryCleanupError, G as _usingCtx, d as createSolid, n as castR
|
|
|
2
2
|
import { E as ok, d as validationError, g as err, m as andThen, t as BrepErrorCode } from "./errors-BTccWbtE.js";
|
|
3
3
|
import { n as isClosedWire } from "./validityTypes-BmqE7KfX.js";
|
|
4
4
|
import { n as HASH_CODE_MAX, t as DEG2RAD } from "./constants-iraOnb2p.js";
|
|
5
|
-
import { C as propagateAllMetadata, S as hasAnyMetadata, T as propagateMetadataThroughRelocation, a as makeOffset, c as makeTorus, i as makeEllipsoid, l as makeVertex, n as makeCone, o as makeSolid, r as makeCylinder, s as makeSphere, t as makeCompound, u as weldShellsAndFaces, w as propagateMetadataByHash, x as collectInputFaceHashes } from "./solidBuilders-
|
|
6
|
-
import { _ as makeThreePointArc, a as makeNonPlanarFace, c as makeBSplineApproximation, d as makeCircle, f as makeEllipse, g as makeTangentArc, h as makeLine, i as makeNewFaceWithinFace, m as makeHelix, o as makePolygon, p as makeEllipseArc, r as makeFace, s as assembleWire, t as addHolesInFace, u as makeBezierCurve } from "./surfaceBuilders-
|
|
5
|
+
import { C as propagateAllMetadata, S as hasAnyMetadata, T as propagateMetadataThroughRelocation, a as makeOffset, c as makeTorus, i as makeEllipsoid, l as makeVertex, n as makeCone, o as makeSolid, r as makeCylinder, s as makeSphere, t as makeCompound, u as weldShellsAndFaces, w as propagateMetadataByHash, x as collectInputFaceHashes } from "./solidBuilders-CAiqZrAE.js";
|
|
6
|
+
import { _ as makeThreePointArc, a as makeNonPlanarFace, c as makeBSplineApproximation, d as makeCircle, f as makeEllipse, g as makeTangentArc, h as makeLine, i as makeNewFaceWithinFace, m as makeHelix, o as makePolygon, p as makeEllipseArc, r as makeFace, s as assembleWire, t as addHolesInFace, u as makeBezierCurve } from "./surfaceBuilders-CW6cUdk9.js";
|
|
7
7
|
// src/topology/transformFns.ts
|
|
8
8
|
/**
|
|
9
9
|
* Immutable shape transforms — translate, rotate, scale, mirror, applyMatrix.
|
|
@@ -2,8 +2,8 @@ const require_shapeTypes = require("./shapeTypes-HDVHzNk1.cjs");
|
|
|
2
2
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
3
3
|
const require_validityTypes = require("./validityTypes-CwMwVFdY.cjs");
|
|
4
4
|
const require_constants = require("./constants-oee0S_x6.cjs");
|
|
5
|
-
const require_solidBuilders = require("./solidBuilders-
|
|
6
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
5
|
+
const require_solidBuilders = require("./solidBuilders-DYumkmVa.cjs");
|
|
6
|
+
const require_surfaceBuilders = require("./surfaceBuilders-o3H-x6Ca.cjs");
|
|
7
7
|
// src/topology/transformFns.ts
|
|
8
8
|
/**
|
|
9
9
|
* Immutable shape transforms — translate, rotate, scale, mirror, applyMatrix.
|
|
@@ -3,7 +3,7 @@ import { i as wasmIndex } from "./bug-ClMTAJhe.js";
|
|
|
3
3
|
import { E as ok, d as validationError, g as err, t as BrepErrorCode, u as unsupportedError } from "./errors-BTccWbtE.js";
|
|
4
4
|
import { E as kernelCallRaw, S as subShapeCount } from "./topologyQueryFns-DKNVBMuN.js";
|
|
5
5
|
import { r as vecCross } from "./vecOps-S-m9H_fe.js";
|
|
6
|
-
import { f as getCachedMeasurement, p as setCachedMeasurement } from "./measureFns-
|
|
6
|
+
import { f as getCachedMeasurement, p as setCachedMeasurement } from "./measureFns-BuxKO1GV.js";
|
|
7
7
|
// src/measurement/principalBoxFns.ts
|
|
8
8
|
/**
|
|
9
9
|
* Principal-axes bounding box: a solid's extent measured in the frame of its
|
|
@@ -3,7 +3,7 @@ const require_bug = require("./bug-CBcpIPuf.cjs");
|
|
|
3
3
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
4
4
|
const require_topologyQueryFns = require("./topologyQueryFns-gyva7bvF.cjs");
|
|
5
5
|
const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
|
|
6
|
-
const require_measureFns = require("./measureFns-
|
|
6
|
+
const require_measureFns = require("./measureFns-Ed7LXAhG.cjs");
|
|
7
7
|
// src/measurement/principalBoxFns.ts
|
|
8
8
|
/**
|
|
9
9
|
* Principal-axes bounding box: a solid's extent measured in the frame of its
|
package/dist/query.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_helpers = require("./helpers-
|
|
3
|
-
const require_cornerFinder = require("./cornerFinder-
|
|
2
|
+
const require_helpers = require("./helpers-DxoCOnD_.cjs");
|
|
3
|
+
const require_cornerFinder = require("./cornerFinder-BToeCt6c.cjs");
|
|
4
4
|
exports.cornerFinder = require_cornerFinder.cornerFinder;
|
|
5
5
|
exports.edgeFinder = require_helpers.edgeFinder;
|
|
6
6
|
exports.faceFinder = require_helpers.faceFinder;
|
package/dist/query.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-
|
|
2
|
-
import { t as cornerFinder } from "./cornerFinder-
|
|
1
|
+
import { n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-i26hsY3T.js";
|
|
2
|
+
import { t as cornerFinder } from "./cornerFinder-CBjvTijF.js";
|
|
3
3
|
export { cornerFinder, edgeFinder, faceFinder, getSingleFace };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { g as disposeTransientSubShape, o as castShapeWithKnownType, q as getKernel } from "./shapeTypes-Db3yAgTO.js";
|
|
2
2
|
import { c as getFaces, w as vertexPosition } from "./topologyQueryFns-DKNVBMuN.js";
|
|
3
|
-
import { i as faceGeomType, l as normalAt, r as faceCenter } from "./faceFns-
|
|
3
|
+
import { i as faceGeomType, l as normalAt, r as faceCenter } from "./faceFns-DEDlLMcn.js";
|
|
4
4
|
import { t as getFaceRoles } from "./faceRoleFns-BPxzQF-n.js";
|
|
5
5
|
import { n as getHashCode } from "./shapeFns-D7DcPxfx.js";
|
|
6
|
-
import { n as measureArea, s as measureLength } from "./measureFns-
|
|
6
|
+
import { n as measureArea, s as measureLength } from "./measureFns-BuxKO1GV.js";
|
|
7
7
|
import { a as facesOfVertex, c as verticesOfFace, i as facesOfEdge, o as sharedEdges, s as verticesOfEdge, t as adjacentFaceHashes } from "./adjacencyFns-C0YD3Zrp.js";
|
|
8
8
|
// src/topology/shapeRef/scoring.ts
|
|
9
9
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
const require_shapeTypes = require("./shapeTypes-HDVHzNk1.cjs");
|
|
2
2
|
const require_topologyQueryFns = require("./topologyQueryFns-gyva7bvF.cjs");
|
|
3
|
-
const require_faceFns = require("./faceFns-
|
|
3
|
+
const require_faceFns = require("./faceFns-C6fYNgZl.cjs");
|
|
4
4
|
const require_faceRoleFns = require("./faceRoleFns-Db5bYj4Q.cjs");
|
|
5
5
|
const require_shapeFns = require("./shapeFns-CHFmX5HQ.cjs");
|
|
6
|
-
const require_measureFns = require("./measureFns-
|
|
6
|
+
const require_measureFns = require("./measureFns-Ed7LXAhG.cjs");
|
|
7
7
|
const require_adjacencyFns = require("./adjacencyFns-Cibtcqdl.cjs");
|
|
8
8
|
// src/topology/shapeRef/scoring.ts
|
|
9
9
|
/**
|
package/dist/shapeRef.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_refResolveFns = require("./refResolveFns-
|
|
2
|
+
const require_refResolveFns = require("./refResolveFns-C23E6pcj.cjs");
|
|
3
3
|
exports.assignRoles = require_refResolveFns.assignRoles;
|
|
4
4
|
exports.captureHint = require_refResolveFns.captureHint;
|
|
5
5
|
exports.createDerivedFaceRef = require_refResolveFns.createDerivedFaceRef;
|
package/dist/shapeRef.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { h as assignRoles, g as captureHint, l as createDerivedFaceRef, p as createEdgeRef, _ as createRef, d as createVertexRef, b as defaultScorer, t as isDerivedFaceRef, n as isEdgeRef, r as isFaceRef, i as isLineageRef, a as isVertexRef, u as resolveDerivedFaceRef, m as resolveEdgeRef, o as resolveLineageRef, v as resolveRef, s as resolveRefIn, c as resolveRefParams, f as resolveVertexRef, y as updateRoles } from "./refResolveFns-
|
|
1
|
+
export { h as assignRoles, g as captureHint, l as createDerivedFaceRef, p as createEdgeRef, _ as createRef, d as createVertexRef, b as defaultScorer, t as isDerivedFaceRef, n as isEdgeRef, r as isFaceRef, i as isLineageRef, a as isVertexRef, u as resolveDerivedFaceRef, m as resolveEdgeRef, o as resolveLineageRef, v as resolveRef, s as resolveRefIn, c as resolveRefParams, f as resolveVertexRef, y as updateRoles } from "./refResolveFns-BqcjC50D.js";
|
package/dist/sketching.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_blueprintSketcher = require("./blueprintSketcher-
|
|
3
|
-
const require_drawFns = require("./drawFns-
|
|
4
|
-
const require_textBlueprints = require("./textBlueprints-
|
|
2
|
+
const require_blueprintSketcher = require("./blueprintSketcher-BTJqAd7E.cjs");
|
|
3
|
+
const require_drawFns = require("./drawFns-BOyA7iOt.cjs");
|
|
4
|
+
const require_textBlueprints = require("./textBlueprints-BSU9_W8u.cjs");
|
|
5
5
|
// 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 Sketches, c as compoundSketchFace, d as sketchExtrude, f as sketchFace, g as sketchWires, h as sketchSweep, l as compoundSketchLoft, m as sketchRevolve, o as Sketch, p as sketchLoft, s as compoundSketchExtrude, u as compoundSketchRevolve, y as CompoundSketch } from "./textBlueprints-
|
|
1
|
+
import { n as BaseSketcher2d, t as BlueprintSketcher } from "./blueprintSketcher-CmR6Mi91.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-DzqPMBHE.js";
|
|
3
|
+
import { a as Sketches, c as compoundSketchFace, d as sketchExtrude, f as sketchFace, g as sketchWires, h as sketchSweep, l as compoundSketchLoft, m as sketchRevolve, o as Sketch, p as sketchLoft, s as compoundSketchExtrude, u as compoundSketchRevolve, y as CompoundSketch } from "./textBlueprints-BE9fvro-.js";
|
|
4
4
|
// src/sketching.ts
|
|
5
5
|
/**
|
|
6
6
|
* brepjs/sketching — Sketcher, Drawing, and sketch-to-shape operations.
|
|
@@ -4,11 +4,11 @@ import { C as subShapeHashes, c as getFaces, f as getVertices, p as getWires, s
|
|
|
4
4
|
import { n as HASH_CODE_MAX } from "./constants-iraOnb2p.js";
|
|
5
5
|
import { a as vecDot, g as vecSub, h as vecScale, t as vecAdd } from "./vecOps-S-m9H_fe.js";
|
|
6
6
|
import { o as resolvePlane } from "./planeOps-D3yDuMux.js";
|
|
7
|
-
import { _ as cast, y as downcast } from "./faceFns-
|
|
7
|
+
import { _ as cast, y as downcast } from "./faceFns-DEDlLMcn.js";
|
|
8
8
|
import { n as propagateOriginsByHash, r as propagateOriginsFromEvolution, t as getFaceOrigins } from "./originTrackingFns-BqlxFeWq.js";
|
|
9
9
|
import { n as hasFaceRoles, r as propagateFaceRolesFromEvolution } from "./faceRoleFns-BPxzQF-n.js";
|
|
10
10
|
import { n as getAtOrThrow, t as firstOrThrow } from "./arrayAccess-BpgouNir.js";
|
|
11
|
-
import { r as makeFace } from "./surfaceBuilders-
|
|
11
|
+
import { r as makeFace } from "./surfaceBuilders-CW6cUdk9.js";
|
|
12
12
|
// src/topology/metadata/faceTagFns.ts
|
|
13
13
|
var shapeTagStore = /* @__PURE__ */ new WeakMap();
|
|
14
14
|
var tagMetadataStore = /* @__PURE__ */ new WeakMap();
|
|
@@ -4,11 +4,11 @@ const require_topologyQueryFns = require("./topologyQueryFns-gyva7bvF.cjs");
|
|
|
4
4
|
const require_constants = require("./constants-oee0S_x6.cjs");
|
|
5
5
|
const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
|
|
6
6
|
const require_planeOps = require("./planeOps-DZfLToKZ.cjs");
|
|
7
|
-
const require_faceFns = require("./faceFns-
|
|
7
|
+
const require_faceFns = require("./faceFns-C6fYNgZl.cjs");
|
|
8
8
|
const require_originTrackingFns = require("./originTrackingFns-BRJ2PZ8J.cjs");
|
|
9
9
|
const require_faceRoleFns = require("./faceRoleFns-Db5bYj4Q.cjs");
|
|
10
10
|
const require_arrayAccess = require("./arrayAccess-DpJYARwv.cjs");
|
|
11
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
11
|
+
const require_surfaceBuilders = require("./surfaceBuilders-o3H-x6Ca.cjs");
|
|
12
12
|
// src/topology/metadata/faceTagFns.ts
|
|
13
13
|
var shapeTagStore = /* @__PURE__ */ new WeakMap();
|
|
14
14
|
var tagMetadataStore = /* @__PURE__ */ new WeakMap();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { G as _usingCtx, N as DisposalScope, c as createEdge, l as createFace, p as createWire, q as getKernel, y as isFace } from "./shapeTypes-Db3yAgTO.js";
|
|
2
2
|
import { E as ok, d as validationError, g as err, i as kernelError, m as andThen } from "./errors-BTccWbtE.js";
|
|
3
3
|
import { a as isPlanarFace } from "./validityTypes-BmqE7KfX.js";
|
|
4
|
-
import { _ as cast, u as outerWire } from "./faceFns-
|
|
4
|
+
import { _ as cast, u as outerWire } from "./faceFns-DEDlLMcn.js";
|
|
5
5
|
// src/utils/range.ts
|
|
6
6
|
/** Generate an array of integers `[0, 1, …, len - 1]`. */
|
|
7
7
|
function range(len) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_shapeTypes = require("./shapeTypes-HDVHzNk1.cjs");
|
|
2
2
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
3
3
|
const require_validityTypes = require("./validityTypes-CwMwVFdY.cjs");
|
|
4
|
-
const require_faceFns = require("./faceFns-
|
|
4
|
+
const require_faceFns = require("./faceFns-C6fYNgZl.cjs");
|
|
5
5
|
// src/utils/range.ts
|
|
6
6
|
/** Generate an array of integers `[0, 1, …, len - 1]`. */
|
|
7
7
|
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-BSU9_W8u.cjs");
|
|
3
|
+
const require_textMetrics = require("./textMetrics-BHunx03s.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 { i as setFallbackFont, 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 { i as setFallbackFont, n as getFont, r as loadFont, t as textBlueprints } from "./textBlueprints-BE9fvro-.js";
|
|
2
|
+
import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-DBqFVzjh.js";
|
|
3
3
|
export { fontMetrics, getFont, loadFont, setFallbackFont, sketchText, textBlueprints, textMetrics };
|
|
@@ -5,13 +5,13 @@ import { n as HASH_CODE_MAX } from "./constants-iraOnb2p.js";
|
|
|
5
5
|
import { r as toVec3 } from "./types-CKXsIm9-.js";
|
|
6
6
|
import { c as vecLength, d as vecNormalize, h as vecScale, i as vecDistance, r as vecCross, t as vecAdd } from "./vecOps-S-m9H_fe.js";
|
|
7
7
|
import { n as createPlane } from "./planeOps-D3yDuMux.js";
|
|
8
|
-
import { v as copyShape } from "./faceFns-
|
|
9
|
-
import { o as makeSolid, p as cutAll, t as makeCompound } from "./solidBuilders-
|
|
8
|
+
import { v as copyShape } from "./faceFns-DEDlLMcn.js";
|
|
9
|
+
import { o as makeSolid, p as cutAll, t as makeCompound } from "./solidBuilders-CAiqZrAE.js";
|
|
10
10
|
import { i as setFaceRoles } from "./faceRoleFns-BPxzQF-n.js";
|
|
11
11
|
import { l as curveStartPoint, u as curveTangentAt } from "./curveFns-AMqd_WaO.js";
|
|
12
12
|
import { n as getAtOrThrow, t as firstOrThrow } from "./arrayAccess-BpgouNir.js";
|
|
13
|
-
import { i as makeNewFaceWithinFace, r as makeFace, t as addHolesInFace } from "./surfaceBuilders-
|
|
14
|
-
import { r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-
|
|
13
|
+
import { i as makeNewFaceWithinFace, r as makeFace, t as addHolesInFace } from "./surfaceBuilders-CW6cUdk9.js";
|
|
14
|
+
import { r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-CmR6Mi91.js";
|
|
15
15
|
import { c as twistExtrude, r as complexExtrude, s as sweep, t as loft } from "./loftFns-pMh0ET-J.js";
|
|
16
16
|
import opentype from "opentype.js";
|
|
17
17
|
// src/topology/shapeRef/extrudeRoleFns.ts
|
|
@@ -6,13 +6,13 @@ const require_constants = require("./constants-oee0S_x6.cjs");
|
|
|
6
6
|
const require_types = require("./types-CjF9Rofr.cjs");
|
|
7
7
|
const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
|
|
8
8
|
const require_planeOps = require("./planeOps-DZfLToKZ.cjs");
|
|
9
|
-
const require_faceFns = require("./faceFns-
|
|
10
|
-
const require_solidBuilders = require("./solidBuilders-
|
|
9
|
+
const require_faceFns = require("./faceFns-C6fYNgZl.cjs");
|
|
10
|
+
const require_solidBuilders = require("./solidBuilders-DYumkmVa.cjs");
|
|
11
11
|
const require_faceRoleFns = require("./faceRoleFns-Db5bYj4Q.cjs");
|
|
12
12
|
const require_curveFns = require("./curveFns-CMiP40Ko.cjs");
|
|
13
13
|
const require_arrayAccess = require("./arrayAccess-DpJYARwv.cjs");
|
|
14
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
15
|
-
const require_blueprintSketcher = require("./blueprintSketcher-
|
|
14
|
+
const require_surfaceBuilders = require("./surfaceBuilders-o3H-x6Ca.cjs");
|
|
15
|
+
const require_blueprintSketcher = require("./blueprintSketcher-BTJqAd7E.cjs");
|
|
16
16
|
const require_loftFns = require("./loftFns-BsFinbgs.cjs");
|
|
17
17
|
let opentype_js = require("opentype.js");
|
|
18
18
|
opentype_js = require_rolldown_runtime.__toESM(opentype_js, 1);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
2
|
-
const require_textBlueprints = require("./textBlueprints-
|
|
2
|
+
const require_textBlueprints = require("./textBlueprints-BSU9_W8u.cjs");
|
|
3
3
|
// src/text/sketchText.ts
|
|
4
4
|
/**
|
|
5
5
|
* Render text as 3D sketch outlines on a plane.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { E as ok, d as validationError, g as err, t as BrepErrorCode } from "./errors-BTccWbtE.js";
|
|
2
|
-
import { _ as wrapSketchData, a as Sketches, n as getFont, t as textBlueprints, y as CompoundSketch } from "./textBlueprints-
|
|
2
|
+
import { _ as wrapSketchData, a as Sketches, n as getFont, t as textBlueprints, y as CompoundSketch } from "./textBlueprints-BE9fvro-.js";
|
|
3
3
|
// src/text/sketchText.ts
|
|
4
4
|
/**
|
|
5
5
|
* Render text as 3D sketch outlines on a plane.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { F as createKernelHandle, G as _usingCtx, N as DisposalScope, n as castResultShape, q as getKernel, x as isShape3D } from "./shapeTypes-Db3yAgTO.js";
|
|
2
2
|
import { E as ok, d as validationError, g as err, n as computationError, r as ioError, t as BrepErrorCode, x as isOk } from "./errors-BTccWbtE.js";
|
|
3
3
|
import { d as vecNormalize, s as vecIsZero } from "./vecOps-S-m9H_fe.js";
|
|
4
|
-
import { b as fromBREP } from "./faceFns-
|
|
5
|
-
import { h as fuseAll } from "./solidBuilders-
|
|
6
|
-
import { E as wire, h as line } from "./primitiveFns-
|
|
4
|
+
import { b as fromBREP } from "./faceFns-DEDlLMcn.js";
|
|
5
|
+
import { h as fuseAll } from "./solidBuilders-CAiqZrAE.js";
|
|
6
|
+
import { E as wire, h as line } from "./primitiveFns-DrEUKZvX.js";
|
|
7
7
|
import { s as toBREP } from "./shapeFns-D7DcPxfx.js";
|
|
8
8
|
import { t as loft } from "./loftFns-pMh0ET-J.js";
|
|
9
|
-
import { c as resolveRefParams } from "./refResolveFns-
|
|
9
|
+
import { c as resolveRefParams } from "./refResolveFns-BqcjC50D.js";
|
|
10
10
|
// src/utils/uuid.ts
|
|
11
11
|
/** Generate a v4-style UUID string using `crypto.getRandomValues`. */
|
|
12
12
|
function uuidv() {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
const require_shapeTypes = require("./shapeTypes-HDVHzNk1.cjs");
|
|
2
2
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
3
3
|
const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
|
|
4
|
-
const require_faceFns = require("./faceFns-
|
|
5
|
-
const require_solidBuilders = require("./solidBuilders-
|
|
6
|
-
const require_primitiveFns = require("./primitiveFns-
|
|
4
|
+
const require_faceFns = require("./faceFns-C6fYNgZl.cjs");
|
|
5
|
+
const require_solidBuilders = require("./solidBuilders-DYumkmVa.cjs");
|
|
6
|
+
const require_primitiveFns = require("./primitiveFns-wOdKnYBs.cjs");
|
|
7
7
|
const require_shapeFns = require("./shapeFns-CHFmX5HQ.cjs");
|
|
8
8
|
const require_loftFns = require("./loftFns-BsFinbgs.cjs");
|
|
9
|
-
const require_refResolveFns = require("./refResolveFns-
|
|
9
|
+
const require_refResolveFns = require("./refResolveFns-C23E6pcj.cjs");
|
|
10
10
|
// src/utils/uuid.ts
|
|
11
11
|
/** Generate a v4-style UUID string using `crypto.getRandomValues`. */
|
|
12
12
|
function uuidv() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Vec2, Vec3 } from '../core/types.js';
|
|
2
2
|
import { AnyShape, Dimension, Edge, Face, Wire, Shape3D } from '../core/shapeTypes.js';
|
|
3
|
-
import { ShapeFinder } from '../query/finderFns.js';
|
|
3
|
+
import { EdgeFinderFn, FaceFinderFn, ShapeFinder } from '../query/finderFns.js';
|
|
4
4
|
/**
|
|
5
5
|
* Structural type matching a Drawing's wire-producing interface.
|
|
6
6
|
* Used in place of importing the actual Drawing class to avoid
|
|
@@ -11,8 +11,9 @@ export interface DrawingLike {
|
|
|
11
11
|
wire: Wire;
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
|
+
type FinderFor<T extends AnyShape<Dimension>> = T extends Edge ? EdgeFinderFn : T extends Face ? FaceFinderFn : ShapeFinder<T>;
|
|
14
15
|
/** Callback that configures a shape finder for inline use in modifiers. */
|
|
15
|
-
export type FinderFn<T extends AnyShape<Dimension>> = (finder:
|
|
16
|
+
export type FinderFn<T extends AnyShape<Dimension>> = (finder: FinderFor<T>) => ShapeFinder<T>;
|
|
16
17
|
/**
|
|
17
18
|
* Fillet radius specification.
|
|
18
19
|
*
|
|
@@ -126,3 +127,4 @@ export type Shapeable<T extends AnyShape<Dimension>> = T | WrappedMarker<T>;
|
|
|
126
127
|
export declare function resolve<T extends AnyShape<Dimension>>(s: Shapeable<T>): T;
|
|
127
128
|
/** Extract the raw branded 3D shape from a Shapeable<Shape3D>. */
|
|
128
129
|
export declare function resolve3D(s: Shapeable<Shape3D>): Shape3D;
|
|
130
|
+
export {};
|
package/dist/topology/cast.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { KernelShape, KernelType } from '../kernel/types.js';
|
|
1
|
+
import { KernelShape, KernelType, ShapeType } from '../kernel/types.js';
|
|
2
2
|
import { AnyShape, CompSolid, Dimension } from '../core/shapeTypes.js';
|
|
3
3
|
import { Result } from '../core/result.js';
|
|
4
4
|
/** String literal identifying a topological entity type for TopExp_Explorer iteration. */
|
|
@@ -8,8 +8,11 @@ export type GenericTopo = KernelShape;
|
|
|
8
8
|
/** Convert a TopoEntity string to its kernel TopAbs_ShapeEnum value. */
|
|
9
9
|
export declare const asTopo: (entity: TopoEntity) => KernelType;
|
|
10
10
|
export declare const iterTopo: (shape: KernelShape, topo: TopoEntity) => IterableIterator<KernelShape>;
|
|
11
|
-
/**
|
|
12
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Get the topological type of a shape (`'solid'`, `'face'`, ...), returning Err for null
|
|
13
|
+
* shapes. Accepts a branded shape or its raw kernel handle (`shape.wrapped`).
|
|
14
|
+
*/
|
|
15
|
+
export declare const shapeType: (shape: KernelShape) => Result<ShapeType>;
|
|
13
16
|
/**
|
|
14
17
|
* Downcast a generic KernelShape to its concrete kernel type (e.g., kernel topology_Face).
|
|
15
18
|
*
|
package/dist/topology.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_topologyQueryFns = require("./topologyQueryFns-gyva7bvF.cjs");
|
|
3
|
-
const require_faceFns = require("./faceFns-
|
|
4
|
-
const require_solidBuilders = require("./solidBuilders-
|
|
5
|
-
const require_primitiveFns = require("./primitiveFns-
|
|
3
|
+
const require_faceFns = require("./faceFns-C6fYNgZl.cjs");
|
|
4
|
+
const require_solidBuilders = require("./solidBuilders-DYumkmVa.cjs");
|
|
5
|
+
const require_primitiveFns = require("./primitiveFns-wOdKnYBs.cjs");
|
|
6
6
|
const require_shapeFns = require("./shapeFns-CHFmX5HQ.cjs");
|
|
7
7
|
const require_curveFns = require("./curveFns-CMiP40Ko.cjs");
|
|
8
8
|
const require_meshFns = require("./meshFns-BNrdUhgG.cjs");
|
|
9
|
-
const require_healingFns = require("./healingFns-
|
|
9
|
+
const require_healingFns = require("./healingFns-383ByJpH.cjs");
|
|
10
10
|
const require_adjacencyFns = require("./adjacencyFns-Cibtcqdl.cjs");
|
|
11
11
|
exports.addHoles = require_primitiveFns.addHoles;
|
|
12
12
|
exports.adjacentFaces = require_adjacencyFns.adjacentFaces;
|
package/dist/topology.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @example
|
|
5
5
|
* ```typescript
|
|
6
|
-
* import { box,
|
|
6
|
+
* import { box, fuseAll, variableFillet } from 'brepjs/topology';
|
|
7
7
|
* ```
|
|
8
8
|
*/
|
|
9
9
|
export { getHashCode, isSameShape, isEqualShape, getEdges, getFaces, getWires, getVertices, iterEdges, iterFaces, iterWires, iterVertices, getBounds, vertexPosition, invalidateShapeCache, type Bounds3D, type ShapeDescription, } from './topology/shapeFns.js';
|
package/dist/topology.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { _ 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, w as vertexPosition, x as iterWires } from "./topologyQueryFns-DKNVBMuN.js";
|
|
2
|
-
import { C as shapeType, S as iterTopo, _ as cast, a as faceOrientation, b as fromBREP, 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, r as faceCenter, s as getSurfaceType, t as classifyPointOnFace, u as outerWire, x as isCompSolid, y as downcast } from "./faceFns-
|
|
3
|
-
import { h as fuseAll, p as cutAll } from "./solidBuilders-
|
|
4
|
-
import { C as threePointArc, D as wireLoop, E as wire, S as tangentArc, T as vertex, _ as polygon, a as circle, b as sphere, 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, x as subFace, y as solid } from "./primitiveFns-
|
|
2
|
+
import { C as shapeType, S as iterTopo, _ as cast, a as faceOrientation, b as fromBREP, 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, r as faceCenter, s as getSurfaceType, t as classifyPointOnFace, u as outerWire, x as isCompSolid, y as downcast } from "./faceFns-DEDlLMcn.js";
|
|
3
|
+
import { h as fuseAll, p as cutAll } from "./solidBuilders-CAiqZrAE.js";
|
|
4
|
+
import { C as threePointArc, D as wireLoop, E as wire, S as tangentArc, T as vertex, _ as polygon, a as circle, b as sphere, 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, x as subFace, y as solid } from "./primitiveFns-DrEUKZvX.js";
|
|
5
5
|
import { a as isSameShape, i as isEqualShape, n as getHashCode } from "./shapeFns-D7DcPxfx.js";
|
|
6
6
|
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-AMqd_WaO.js";
|
|
7
7
|
import { d as clearMeshCache, f as createMeshCache, n as exportSTEP, r as exportSTL, t as exportIGES } from "./meshFns-LytwBtBQ.js";
|
|
8
|
-
import { A as variableFillet, F as toLineGeometryData, M as toGroupedBufferGeometryData, S as chamferDistAngle, _ as checkBoolean, a as healFace, b as getNurbsCurveData, d as chamferWithEvolution, f as cutWithEvolution, g as shellWithEvolution, h as intersectWithEvolution, j as toBufferGeometryData, l as solidFromShell, m as fuseWithEvolution, n as fixSelfIntersection, o as healSolid, p as filletWithEvolution, r as fixShape, s as healWire, t as autoHeal, u as positionOnCurve, v as cutAllBisect, x as getNurbsSurfaceData, y as fuseAllBisect } from "./healingFns-
|
|
8
|
+
import { A as variableFillet, F as toLineGeometryData, M as toGroupedBufferGeometryData, S as chamferDistAngle, _ as checkBoolean, a as healFace, b as getNurbsCurveData, d as chamferWithEvolution, f as cutWithEvolution, g as shellWithEvolution, h as intersectWithEvolution, j as toBufferGeometryData, l as solidFromShell, m as fuseWithEvolution, n as fixSelfIntersection, o as healSolid, p as filletWithEvolution, r as fixShape, s as healWire, t as autoHeal, u as positionOnCurve, v as cutAllBisect, x as getNurbsSurfaceData, y as fuseAllBisect } from "./healingFns-CJIIjQKh.js";
|
|
9
9
|
import { i as facesOfEdge, l as wiresOfFace, n as adjacentFaces, o as sharedEdges, r as edgesOfFace, s as verticesOfEdge } from "./adjacencyFns-C0YD3Zrp.js";
|
|
10
10
|
export { addHoles, adjacentFaces, approximateCurve, asTopo, autoHeal, bezier, box, bsplineApprox, cast, chamferDistAngle as chamferDistAngleShape, chamferWithEvolution, checkBoolean, circle, classifyPointOnFace, clearMeshCache, compound, cone, createMeshCache, curveAxis, curveEndPoint, curveIsClosed, curveIsPeriodic, curveLength, curvePeriod, curvePointAt, curveStartPoint, curveTangentAt, cutAll, cutAllBisect, cutWithEvolution, cylinder, fromBREP as deserializeShape, downcast, edgesOfFace, ellipse, ellipseArc, ellipsoid, exportIGES, exportSTEP, exportSTL, face, faceAxis, 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 };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "brepjs",
|
|
3
|
-
"version": "20.12.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "20.12.2",
|
|
4
|
+
"description": "Exact B-Rep CAD in TypeScript on OpenCascade WebAssembly, with a pluggable geometry kernel",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cad",
|
|
7
7
|
"geometry-kernel",
|