brepjs 8.7.4 → 8.7.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -18
- package/dist/2d.cjs +2 -2
- package/dist/2d.js +3 -3
- package/dist/{Blueprint-Cmh8lKc4.js → Blueprint-BihoXiSm.js} +7 -7
- package/dist/{Blueprint-BcbOBF-9.cjs → Blueprint-DEhjUTv4.cjs} +7 -7
- package/dist/{boolean2D-D94Axs3i.js → boolean2D-B7MAHWWy.js} +9 -9
- package/dist/{boolean2D-CqacqjME.cjs → boolean2D-BMw-2GRS.cjs} +9 -9
- package/dist/{booleanFns-NtKxkiXn.cjs → booleanFns-BOrYk5DW.cjs} +9 -5
- package/dist/{booleanFns-DdjtpcM6.js → booleanFns-CxU6z_LD.js} +9 -5
- package/dist/brepjs.cjs +18 -18
- package/dist/brepjs.js +31 -31
- package/dist/core.cjs +3 -3
- package/dist/core.js +3 -3
- package/dist/{cornerFinder-BBOYfsXl.js → cornerFinder-Dh6RKiNy.js} +1 -1
- package/dist/{cornerFinder-Bqy8Lw2p.cjs → cornerFinder-DilC5fiE.cjs} +1 -1
- package/dist/{curveFns-B85Glnfo.js → curveFns-BJG6oqMt.js} +2 -2
- package/dist/{curveFns-BXCbASW-.cjs → curveFns-BT8cTVDA.cjs} +2 -2
- package/dist/{drawFns-CAmFEqd1.cjs → drawFns-DcEDgZzq.cjs} +12 -12
- package/dist/{drawFns-B-gJ2WUc.js → drawFns-aKd56G2a.js} +12 -12
- package/dist/{faceFns-DcndPHWm.cjs → faceFns-B8fGirMy.cjs} +2 -2
- package/dist/{faceFns-CltrEfOo.js → faceFns-C8ye0H_K.js} +2 -2
- package/dist/{helpers-SksQIreB.js → helpers-8QToWU3Q.js} +5 -5
- package/dist/{helpers-CC21GeAr.cjs → helpers-MiJaYJMA.cjs} +5 -5
- package/dist/io.cjs +12 -10
- package/dist/io.js +12 -10
- package/dist/kernel/booleanOps.d.ts.map +1 -1
- package/dist/{loft-CJMPx1NQ.js → loft-C810lPN5.js} +4 -4
- package/dist/{loft-BcyyvWCj.cjs → loft-DCEZpu53.cjs} +4 -4
- package/dist/measurement/measureCache.d.ts +11 -0
- package/dist/measurement/measureCache.d.ts.map +1 -0
- package/dist/measurement/measureFns.d.ts.map +1 -1
- package/dist/{measurement-DU3ry-0Q.cjs → measurement-BFotSPr0.cjs} +30 -6
- package/dist/{measurement-ByOztLxb.js → measurement-BT2jlvKC.js} +30 -6
- package/dist/measurement.cjs +1 -1
- package/dist/measurement.js +1 -1
- package/dist/{meshFns-DawUwI3W.cjs → meshFns-CxYud6A4.cjs} +3 -3
- package/dist/{meshFns-D2gLyLFt.js → meshFns-DPbSUo0q.js} +3 -3
- package/dist/{occtBoundary-DH2VO-rq.cjs → occtBoundary-ChEJsbOT.cjs} +6 -0
- package/dist/{occtBoundary-CWzWqBCm.js → occtBoundary-DC1yVJex.js} +6 -0
- package/dist/{operations-CdELWxgv.cjs → operations-CckDdRJ0.cjs} +5 -5
- package/dist/{operations-DiXo_4t9.js → operations-IFpeXZme.js} +5 -5
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/query.cjs +5 -5
- package/dist/query.js +6 -6
- package/dist/{shapeFns-4ioRrhih.js → shapeFns-BTnqah-6.js} +3 -3
- package/dist/{shapeFns-3RYtsUVY.cjs → shapeFns-CQWvvjmd.cjs} +3 -3
- package/dist/{shapeTypes-D0vfRxWb.js → shapeTypes-BVd0rRNe.js} +1 -1
- package/dist/{shapeTypes-CMjrTv36.cjs → shapeTypes-MK0PKst9.cjs} +1 -1
- package/dist/sketching.cjs +2 -2
- package/dist/sketching.js +2 -2
- package/dist/{surfaceBuilders-Xx9DRRxs.cjs → surfaceBuilders-5Ci2Du77.cjs} +4 -4
- package/dist/{surfaceBuilders-B7Jxob8g.js → surfaceBuilders-nuWe3gns.js} +4 -4
- package/dist/topology/booleanFns.d.ts.map +1 -1
- package/dist/topology/meshFns.d.ts +1 -1
- package/dist/topology/meshFns.d.ts.map +1 -1
- package/dist/{topology-D-nGjCzV.cjs → topology-C06jndeV.cjs} +8 -8
- package/dist/{topology-DRP9zreU.js → topology-P-u0NDwX.js} +8 -8
- package/dist/topology.cjs +6 -6
- package/dist/topology.js +6 -6
- package/dist/{vectors-CZV4ZrTz.js → vectors-Dp17lKnm.js} +1 -1
- package/dist/{vectors-DwFeX0Ja.cjs → vectors-DrAMMsHl.cjs} +1 -1
- package/dist/vectors.cjs +2 -2
- package/dist/vectors.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -45,11 +45,13 @@ initFromOC(oc);
|
|
|
45
45
|
|
|
46
46
|
## Features
|
|
47
47
|
|
|
48
|
-
**Modeling** — `box`, `cylinder`, `sphere`, `cone`, `torus`, `ellipsoid` plus `extrude`, `revolve`, `loft`, `sweep` from 2D sketches
|
|
48
|
+
**Modeling** — `box`, `cylinder`, `sphere`, `cone`, `torus`, `ellipsoid`, `polyhedron` plus `extrude`, `revolve`, `loft`, `sweep` from 2D sketches
|
|
49
49
|
|
|
50
50
|
**Booleans** — `fuse`, `cut`, `intersect`, `section`, `split`, `slice` with batch variants `fuseAll`, `cutAll`
|
|
51
51
|
|
|
52
|
-
**Modifiers** — `fillet`, `chamfer`, `shell`, `offset`, `thicken`
|
|
52
|
+
**Modifiers** — `fillet`, `chamfer`, `shell`, `offset`, `thicken`, `resize`. Accepts `ShapeFinder` directly
|
|
53
|
+
|
|
54
|
+
**Transforms** — `translate`, `rotate`, `mirror`, `scale`, `applyMatrix`, `composeTransforms`, `transformCopy`
|
|
53
55
|
|
|
54
56
|
**Sketching** — `draw`, `drawRectangle`, `drawCircle`, `Sketcher`, `sketchCircle`, `sketchHelix` for 2D-to-3D workflows
|
|
55
57
|
|
|
@@ -57,17 +59,23 @@ initFromOC(oc);
|
|
|
57
59
|
|
|
58
60
|
**Measurement** — `measureVolume`, `measureArea`, `measureLength`, `measureDistance`, `checkInterference`
|
|
59
61
|
|
|
60
|
-
**Import/Export** — STEP, STL,
|
|
62
|
+
**Import/Export** — STEP, STL, glTF/GLB, DXF (import + export), 3MF, OBJ, SVG (import). Assembly export with colors and names via `exportAssemblySTEP`
|
|
63
|
+
|
|
64
|
+
**Advanced Geometry** — `hull`, `minkowski`, `fill`, `roof`, `surfaceFromGrid`
|
|
65
|
+
|
|
66
|
+
**Colors** — Per-shape colors that propagate through booleans and modifiers
|
|
61
67
|
|
|
62
68
|
**Rendering** — `mesh` and `toBufferGeometryData` for Three.js / WebGL integration
|
|
63
69
|
|
|
64
|
-
**Text** — `loadFont`, `drawText`, `sketchText`
|
|
70
|
+
**Text** — `loadFont`, `drawText`, `sketchText`, `textMetrics`
|
|
65
71
|
|
|
66
72
|
**Healing** — `autoHeal`, `healSolid`, `healFace`, `isValid` for fixing imported geometry
|
|
67
73
|
|
|
68
74
|
**Patterns** — `linearPattern`, `circularPattern` for arraying shapes
|
|
69
75
|
|
|
70
|
-
**Assemblies** — `createAssemblyNode`, `addChild`, `walkAssembly`, `collectShapes
|
|
76
|
+
**Assemblies** — `createAssemblyNode`, `addChild`, `walkAssembly`, `collectShapes`, assembly mates
|
|
77
|
+
|
|
78
|
+
**Face Tracking** — Face origin tracking and face tags across boolean operations
|
|
71
79
|
|
|
72
80
|
**Workers** — `createWorkerClient`, `createWorkerHandler` for off-main-thread operations
|
|
73
81
|
|
|
@@ -270,20 +278,16 @@ for (const width of [30, 40, 50, 60]) {
|
|
|
270
278
|
## Examples
|
|
271
279
|
|
|
272
280
|
```bash
|
|
273
|
-
npm run example examples/
|
|
281
|
+
npm run example examples/mounting-block.ts
|
|
274
282
|
```
|
|
275
283
|
|
|
276
|
-
| Example
|
|
277
|
-
|
|
|
278
|
-
| [
|
|
279
|
-
| [
|
|
280
|
-
| [
|
|
281
|
-
| [
|
|
282
|
-
| [
|
|
283
|
-
| [threejs-rendering.ts](./examples/threejs-rendering.ts) | Generate mesh data for Three.js |
|
|
284
|
-
| [browser-viewer.ts](./examples/browser-viewer.ts) | Standalone HTML viewer with orbit controls |
|
|
285
|
-
| [import-export.ts](./examples/import-export.ts) | Load, modify, and re-export STEP files |
|
|
286
|
-
| [text-engraving.ts](./examples/text-engraving.ts) | Engrave text on a solid shape |
|
|
284
|
+
| Example | Level | What it does |
|
|
285
|
+
| ----------------------------------------------------- | ------------ | -------------------------------------------------------------- |
|
|
286
|
+
| [mounting-block.ts](./examples/mounting-block.ts) | Beginner | Game die with filleted edges and `cutAll` dot indentations |
|
|
287
|
+
| [shelf-bracket.ts](./examples/shelf-bracket.ts) | Intermediate | Spur gear with `rotate` patterning and `fuseAll` teeth |
|
|
288
|
+
| [pen-cup.ts](./examples/pen-cup.ts) | Intermediate | Hollowed container using `shell` and `faceFinder` |
|
|
289
|
+
| [lofted-vase.ts](./examples/lofted-vase.ts) | Advanced | Multi-section `loft` through circular profiles, then shelled |
|
|
290
|
+
| [compartment-tray.ts](./examples/compartment-tray.ts) | Advanced | Storage tray with dividers: `fuseAll` → `intersect` → `cutAll` |
|
|
287
291
|
|
|
288
292
|
## Imports
|
|
289
293
|
|
|
@@ -300,8 +304,11 @@ import { box, fuse, fillet } from 'brepjs/topology';
|
|
|
300
304
|
import { importSTEP, exportSTEP } from 'brepjs/io';
|
|
301
305
|
import { measureVolume } from 'brepjs/measurement';
|
|
302
306
|
import { edgeFinder, faceFinder } from 'brepjs/query';
|
|
303
|
-
import { sketchCircle, draw } from 'brepjs/sketching';
|
|
307
|
+
import { sketchCircle, draw, drawRectangle, drawCircle } from 'brepjs/sketching';
|
|
304
308
|
import { createAssemblyNode } from 'brepjs/operations';
|
|
309
|
+
import { createWorkerClient } from 'brepjs/worker';
|
|
310
|
+
import { Result, isOk, unwrap } from 'brepjs/result';
|
|
311
|
+
import { toVec3, vecAdd, vecNormalize } from 'brepjs/vectors';
|
|
305
312
|
```
|
|
306
313
|
|
|
307
314
|
## Error Handling
|
|
@@ -333,9 +340,11 @@ Layer 0 kernel/, utils/ WASM bindings
|
|
|
333
340
|
## Documentation
|
|
334
341
|
|
|
335
342
|
- [API Reference](https://andymai.github.io/brepjs/) — Searchable TypeDoc reference
|
|
343
|
+
- [Zero to Shape](./docs/zero-to-shape.md) — First shape in 60 seconds
|
|
336
344
|
- [Getting Started](./docs/getting-started.md) — Install to first part
|
|
337
345
|
- [B-Rep Concepts](./docs/concepts.md) — Vertices, edges, faces, solids
|
|
338
346
|
- [Cheat Sheet](./docs/cheat-sheet.md) — Single-page reference for common operations
|
|
347
|
+
- [Cookbook](./docs/cookbook.md) — Practical recipes for common CAD workflows
|
|
339
348
|
- [Which API?](./docs/which-api.md) — Sketcher vs functional vs Drawing
|
|
340
349
|
- [Function Lookup](./docs/function-lookup.md) — Alphabetical index of every export
|
|
341
350
|
- [Memory Management](./docs/memory-management.md) — Resource cleanup patterns
|
package/dist/2d.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const Blueprint = require("./Blueprint-
|
|
4
|
-
const boolean2D = require("./boolean2D-
|
|
3
|
+
const Blueprint = require("./Blueprint-DEhjUTv4.cjs");
|
|
4
|
+
const boolean2D = require("./boolean2D-BMw-2GRS.cjs");
|
|
5
5
|
function reverseCurve(curve) {
|
|
6
6
|
const cloned = curve.clone();
|
|
7
7
|
cloned.reverse();
|
package/dist/2d.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { B as Blueprint } from "./Blueprint-
|
|
2
|
-
import { d, C, r } from "./Blueprint-
|
|
3
|
-
import { e, C as C2, f, l, g, n, k, q, o, p, r as r2 } from "./boolean2D-
|
|
1
|
+
import { B as Blueprint } from "./Blueprint-BihoXiSm.js";
|
|
2
|
+
import { d, C, r } from "./Blueprint-BihoXiSm.js";
|
|
3
|
+
import { e, C as C2, f, l, g, n, k, q, o, p, r as r2 } from "./boolean2D-B7MAHWWy.js";
|
|
4
4
|
function reverseCurve(curve) {
|
|
5
5
|
const cloned = curve.clone();
|
|
6
6
|
cloned.reverse();
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { r as resolvePlane } from "./vectors-
|
|
2
|
-
import { g as getKernel, a as toVec3, c as makeOcAx2 } from "./occtBoundary-
|
|
3
|
-
import { r as localGC, v as registerForCleanup, x as unregisterFromCleanup, n as gcWithScope, p as createEdge, o as createWire } from "./shapeTypes-
|
|
4
|
-
import { u as uvBounds, f as faceGeomType, e as faceCenter, h as uvCoordinates, c as cast } from "./faceFns-
|
|
5
|
-
import { f as findCurveType, g as getOrientation } from "./curveFns-
|
|
1
|
+
import { r as resolvePlane } from "./vectors-Dp17lKnm.js";
|
|
2
|
+
import { g as getKernel, a as toVec3, c as makeOcAx2 } from "./occtBoundary-DC1yVJex.js";
|
|
3
|
+
import { r as localGC, v as registerForCleanup, x as unregisterFromCleanup, n as gcWithScope, p as createEdge, o as createWire } from "./shapeTypes-BVd0rRNe.js";
|
|
4
|
+
import { u as uvBounds, f as faceGeomType, e as faceCenter, h as uvCoordinates, c as cast } from "./faceFns-C8ye0H_K.js";
|
|
5
|
+
import { f as findCurveType, g as getOrientation } from "./curveFns-BJG6oqMt.js";
|
|
6
6
|
import { u as unwrap, l as ok, e as err, b as computationError, x as validationError } from "./errors-Coh_5_19.js";
|
|
7
|
-
import { z as zip, m as makeFace } from "./surfaceBuilders-
|
|
8
|
-
import { d as distance2d, s as samePoint, b as scalarMultiply2d, c as add2d, n as normalize2d, e as subtract2d, g as getSingleFace } from "./helpers-
|
|
7
|
+
import { z as zip, m as makeFace } from "./surfaceBuilders-nuWe3gns.js";
|
|
8
|
+
import { d as distance2d, s as samePoint, b as scalarMultiply2d, c as add2d, n as normalize2d, e as subtract2d, g as getSingleFace } from "./helpers-8QToWU3Q.js";
|
|
9
9
|
import { R as RAD2DEG, D as DEG2RAD } from "./vecOps-ZDdZWbwT.js";
|
|
10
10
|
import { bug } from "./result.js";
|
|
11
11
|
function makePlane(plane, origin) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const vectors = require("./vectors-
|
|
3
|
-
const occtBoundary = require("./occtBoundary-
|
|
4
|
-
const shapeTypes = require("./shapeTypes-
|
|
5
|
-
const faceFns = require("./faceFns-
|
|
6
|
-
const curveFns = require("./curveFns-
|
|
2
|
+
const vectors = require("./vectors-DrAMMsHl.cjs");
|
|
3
|
+
const occtBoundary = require("./occtBoundary-ChEJsbOT.cjs");
|
|
4
|
+
const shapeTypes = require("./shapeTypes-MK0PKst9.cjs");
|
|
5
|
+
const faceFns = require("./faceFns-B8fGirMy.cjs");
|
|
6
|
+
const curveFns = require("./curveFns-BT8cTVDA.cjs");
|
|
7
7
|
const errors = require("./errors-eRQu29oc.cjs");
|
|
8
|
-
const surfaceBuilders = require("./surfaceBuilders-
|
|
9
|
-
const helpers = require("./helpers-
|
|
8
|
+
const surfaceBuilders = require("./surfaceBuilders-5Ci2Du77.cjs");
|
|
9
|
+
const helpers = require("./helpers-MiJaYJMA.cjs");
|
|
10
10
|
const vecOps = require("./vecOps-CjRL1jau.cjs");
|
|
11
11
|
const result = require("./result.cjs");
|
|
12
12
|
function makePlane(plane, origin) {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { a as createPlane } from "./vectors-
|
|
1
|
+
import { a as createPlane } from "./vectors-Dp17lKnm.js";
|
|
2
2
|
import { l as ok, e as err, b as computationError, u as unwrap, g as isOk } from "./errors-Coh_5_19.js";
|
|
3
|
-
import { d as downcast, u as uvBounds, p as pointOnSurface, n as normalAt } from "./faceFns-
|
|
4
|
-
import { g as getKernel, a as toVec3 } from "./occtBoundary-
|
|
3
|
+
import { d as downcast, u as uvBounds, p as pointOnSurface, n as normalAt } from "./faceFns-C8ye0H_K.js";
|
|
4
|
+
import { g as getKernel, a as toVec3 } from "./occtBoundary-DC1yVJex.js";
|
|
5
5
|
import { n as vecScale, j as vecNormalize, b as vecCross, D as DEG2RAD, R as RAD2DEG } from "./vecOps-ZDdZWbwT.js";
|
|
6
|
-
import { r as revolution, c as complexExtrude, t as twistExtrude, b as basicFaceExtrusion, g as genericSweep, l as loft } from "./loft-
|
|
7
|
-
import { n as gcWithScope, q as createFace, o as createWire, r as localGC, p as createEdge } from "./shapeTypes-
|
|
8
|
-
import { d as curveStartPoint, c as curveTangentAt, e as curveIsClosed } from "./curveFns-
|
|
9
|
-
import { m as makeFace, l as makeNewFaceWithinFace, b as assembleWire, z as zip } from "./surfaceBuilders-
|
|
6
|
+
import { r as revolution, c as complexExtrude, t as twistExtrude, b as basicFaceExtrusion, g as genericSweep, l as loft } from "./loft-C810lPN5.js";
|
|
7
|
+
import { n as gcWithScope, q as createFace, o as createWire, r as localGC, p as createEdge } from "./shapeTypes-BVd0rRNe.js";
|
|
8
|
+
import { d as curveStartPoint, c as curveTangentAt, e as curveIsClosed } from "./curveFns-BJG6oqMt.js";
|
|
9
|
+
import { m as makeFace, l as makeNewFaceWithinFace, b as assembleWire, z as zip } from "./surfaceBuilders-nuWe3gns.js";
|
|
10
10
|
import { bug } from "./result.js";
|
|
11
|
-
import { s as samePoint$1, n as normalize2d, e as subtract2d, c as add2d, i as crossProduct2d, b as scalarMultiply2d, f as polarToCartesian, r as rotate2d, j as cartesianToPolar, d as distance2d, p as polarAngle2d, k as PRECISION_INTERSECTION } from "./helpers-
|
|
12
|
-
import { C as Curve2D, a as make2dSegmentCurve, j as approximateAsBSpline, b as make2dArcFromCenter, k as isPoint2D, g as make2dCircle, l as make2dThreePointArc, d as BoundingBox2d, v as viewbox, n as asSVG, B as Blueprint, o as make2dEllipseArc, p as make2dTangentArc, q as make2dBezierCurve, r as axis2d, s as removeDuplicatePoints } from "./Blueprint-
|
|
11
|
+
import { s as samePoint$1, n as normalize2d, e as subtract2d, c as add2d, i as crossProduct2d, b as scalarMultiply2d, f as polarToCartesian, r as rotate2d, j as cartesianToPolar, d as distance2d, p as polarAngle2d, k as PRECISION_INTERSECTION } from "./helpers-8QToWU3Q.js";
|
|
12
|
+
import { C as Curve2D, a as make2dSegmentCurve, j as approximateAsBSpline, b as make2dArcFromCenter, k as isPoint2D, g as make2dCircle, l as make2dThreePointArc, d as BoundingBox2d, v as viewbox, n as asSVG, B as Blueprint, o as make2dEllipseArc, p as make2dTangentArc, q as make2dBezierCurve, r as axis2d, s as removeDuplicatePoints } from "./Blueprint-BihoXiSm.js";
|
|
13
13
|
function* pointsIteration(intersector) {
|
|
14
14
|
const nPoints = intersector.NbPoints();
|
|
15
15
|
if (!nPoints) return;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const vectors = require("./vectors-
|
|
2
|
+
const vectors = require("./vectors-DrAMMsHl.cjs");
|
|
3
3
|
const errors = require("./errors-eRQu29oc.cjs");
|
|
4
|
-
const faceFns = require("./faceFns-
|
|
5
|
-
const occtBoundary = require("./occtBoundary-
|
|
4
|
+
const faceFns = require("./faceFns-B8fGirMy.cjs");
|
|
5
|
+
const occtBoundary = require("./occtBoundary-ChEJsbOT.cjs");
|
|
6
6
|
const vecOps = require("./vecOps-CjRL1jau.cjs");
|
|
7
|
-
const loft = require("./loft-
|
|
8
|
-
const shapeTypes = require("./shapeTypes-
|
|
9
|
-
const curveFns = require("./curveFns-
|
|
10
|
-
const surfaceBuilders = require("./surfaceBuilders-
|
|
7
|
+
const loft = require("./loft-DCEZpu53.cjs");
|
|
8
|
+
const shapeTypes = require("./shapeTypes-MK0PKst9.cjs");
|
|
9
|
+
const curveFns = require("./curveFns-BT8cTVDA.cjs");
|
|
10
|
+
const surfaceBuilders = require("./surfaceBuilders-5Ci2Du77.cjs");
|
|
11
11
|
const result = require("./result.cjs");
|
|
12
|
-
const helpers = require("./helpers-
|
|
13
|
-
const Blueprint = require("./Blueprint-
|
|
12
|
+
const helpers = require("./helpers-MiJaYJMA.cjs");
|
|
13
|
+
const Blueprint = require("./Blueprint-DEhjUTv4.cjs");
|
|
14
14
|
function* pointsIteration(intersector) {
|
|
15
15
|
const nPoints = intersector.NbPoints();
|
|
16
16
|
if (!nPoints) return;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const occtBoundary = require("./occtBoundary-
|
|
3
|
-
const shapeTypes = require("./shapeTypes-
|
|
2
|
+
const occtBoundary = require("./occtBoundary-ChEJsbOT.cjs");
|
|
3
|
+
const shapeTypes = require("./shapeTypes-MK0PKst9.cjs");
|
|
4
4
|
const errors = require("./errors-eRQu29oc.cjs");
|
|
5
|
-
const vectors = require("./vectors-
|
|
5
|
+
const vectors = require("./vectors-DrAMMsHl.cjs");
|
|
6
6
|
const vecOps = require("./vecOps-CjRL1jau.cjs");
|
|
7
|
-
const shapeFns = require("./shapeFns-
|
|
8
|
-
const surfaceBuilders = require("./surfaceBuilders-
|
|
7
|
+
const shapeFns = require("./shapeFns-CQWvvjmd.cjs");
|
|
8
|
+
const surfaceBuilders = require("./surfaceBuilders-5Ci2Du77.cjs");
|
|
9
9
|
function applyGlue(op, optimisation) {
|
|
10
10
|
const oc = occtBoundary.getKernel().oc;
|
|
11
11
|
if (optimisation === "commonFace") {
|
|
@@ -269,6 +269,7 @@ function fuse(a, b, { optimisation = "none", simplify = false, signal } = {}) {
|
|
|
269
269
|
const progress = r(new oc.Message_ProgressRange_1());
|
|
270
270
|
const fuseOp = r(new oc.BRepAlgoAPI_Fuse_3(a.wrapped, b.wrapped, progress));
|
|
271
271
|
applyGlue(fuseOp, optimisation);
|
|
272
|
+
fuseOp.SetRunParallel(true);
|
|
272
273
|
fuseOp.Build(progress);
|
|
273
274
|
if (simplify) fuseOp.SimplifyResult(true, true, 1e-3);
|
|
274
275
|
const fuseResult = castToShape3D(
|
|
@@ -294,6 +295,7 @@ function cut(base, tool, { optimisation = "none", simplify = false, signal } = {
|
|
|
294
295
|
const progress = r(new oc.Message_ProgressRange_1());
|
|
295
296
|
const cutOp = r(new oc.BRepAlgoAPI_Cut_3(base.wrapped, tool.wrapped, progress));
|
|
296
297
|
applyGlue(cutOp, optimisation);
|
|
298
|
+
cutOp.SetRunParallel(true);
|
|
297
299
|
cutOp.Build(progress);
|
|
298
300
|
if (simplify) cutOp.SimplifyResult(true, true, 1e-3);
|
|
299
301
|
const cutResult = castToShape3D(cutOp.Shape(), "CUT_NOT_3D", "Cut did not produce a 3D shape");
|
|
@@ -314,6 +316,7 @@ function intersect(a, b, { simplify = false, signal } = {}) {
|
|
|
314
316
|
const r = shapeTypes.gcWithScope();
|
|
315
317
|
const progress = r(new oc.Message_ProgressRange_1());
|
|
316
318
|
const intOp = r(new oc.BRepAlgoAPI_Common_3(a.wrapped, b.wrapped, progress));
|
|
319
|
+
intOp.SetRunParallel(true);
|
|
317
320
|
intOp.Build(progress);
|
|
318
321
|
if (simplify) intOp.SimplifyResult(true, true, 1e-3);
|
|
319
322
|
const intResult = castToShape3D(
|
|
@@ -391,6 +394,7 @@ function cutAll(base, tools, { optimisation = "none", simplify = false, signal }
|
|
|
391
394
|
const progress = r(new oc.Message_ProgressRange_1());
|
|
392
395
|
const cutOp = r(new oc.BRepAlgoAPI_Cut_3(base.wrapped, toolCompound, progress));
|
|
393
396
|
applyGlue(cutOp, optimisation);
|
|
397
|
+
cutOp.SetRunParallel(true);
|
|
394
398
|
cutOp.Build(progress);
|
|
395
399
|
if (simplify) cutOp.SimplifyResult(true, true, 1e-3);
|
|
396
400
|
const cutAllResult = castToShape3D(
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { g as getKernel } from "./occtBoundary-
|
|
2
|
-
import { n as gcWithScope, c as castShape, h as isShape3D } from "./shapeTypes-
|
|
1
|
+
import { g as getKernel } from "./occtBoundary-DC1yVJex.js";
|
|
2
|
+
import { n as gcWithScope, c as castShape, h as isShape3D } from "./shapeTypes-BVd0rRNe.js";
|
|
3
3
|
import { l as ok, d as isErr, e as err, x as validationError, B as BrepErrorCode, p as typeCastError, o as occtError } from "./errors-Coh_5_19.js";
|
|
4
|
-
import { r as resolvePlane } from "./vectors-
|
|
4
|
+
import { r as resolvePlane } from "./vectors-Dp17lKnm.js";
|
|
5
5
|
import { H as HASH_CODE_MAX, n as vecScale, v as vecAdd } from "./vecOps-ZDdZWbwT.js";
|
|
6
|
-
import { a as getFaces, p as propagateOrigins, b as propagateOriginsByHash, c as getWires, d as getEdges } from "./shapeFns-
|
|
7
|
-
import { m as makeFace } from "./surfaceBuilders-
|
|
6
|
+
import { a as getFaces, p as propagateOrigins, b as propagateOriginsByHash, c as getWires, d as getEdges } from "./shapeFns-BTnqah-6.js";
|
|
7
|
+
import { m as makeFace } from "./surfaceBuilders-nuWe3gns.js";
|
|
8
8
|
function applyGlue(op, optimisation) {
|
|
9
9
|
const oc = getKernel().oc;
|
|
10
10
|
if (optimisation === "commonFace") {
|
|
@@ -268,6 +268,7 @@ function fuse(a, b, { optimisation = "none", simplify = false, signal } = {}) {
|
|
|
268
268
|
const progress = r(new oc.Message_ProgressRange_1());
|
|
269
269
|
const fuseOp = r(new oc.BRepAlgoAPI_Fuse_3(a.wrapped, b.wrapped, progress));
|
|
270
270
|
applyGlue(fuseOp, optimisation);
|
|
271
|
+
fuseOp.SetRunParallel(true);
|
|
271
272
|
fuseOp.Build(progress);
|
|
272
273
|
if (simplify) fuseOp.SimplifyResult(true, true, 1e-3);
|
|
273
274
|
const fuseResult = castToShape3D(
|
|
@@ -293,6 +294,7 @@ function cut(base, tool, { optimisation = "none", simplify = false, signal } = {
|
|
|
293
294
|
const progress = r(new oc.Message_ProgressRange_1());
|
|
294
295
|
const cutOp = r(new oc.BRepAlgoAPI_Cut_3(base.wrapped, tool.wrapped, progress));
|
|
295
296
|
applyGlue(cutOp, optimisation);
|
|
297
|
+
cutOp.SetRunParallel(true);
|
|
296
298
|
cutOp.Build(progress);
|
|
297
299
|
if (simplify) cutOp.SimplifyResult(true, true, 1e-3);
|
|
298
300
|
const cutResult = castToShape3D(cutOp.Shape(), "CUT_NOT_3D", "Cut did not produce a 3D shape");
|
|
@@ -313,6 +315,7 @@ function intersect(a, b, { simplify = false, signal } = {}) {
|
|
|
313
315
|
const r = gcWithScope();
|
|
314
316
|
const progress = r(new oc.Message_ProgressRange_1());
|
|
315
317
|
const intOp = r(new oc.BRepAlgoAPI_Common_3(a.wrapped, b.wrapped, progress));
|
|
318
|
+
intOp.SetRunParallel(true);
|
|
316
319
|
intOp.Build(progress);
|
|
317
320
|
if (simplify) intOp.SimplifyResult(true, true, 1e-3);
|
|
318
321
|
const intResult = castToShape3D(
|
|
@@ -390,6 +393,7 @@ function cutAll(base, tools, { optimisation = "none", simplify = false, signal }
|
|
|
390
393
|
const progress = r(new oc.Message_ProgressRange_1());
|
|
391
394
|
const cutOp = r(new oc.BRepAlgoAPI_Cut_3(base.wrapped, toolCompound, progress));
|
|
392
395
|
applyGlue(cutOp, optimisation);
|
|
396
|
+
cutOp.SetRunParallel(true);
|
|
393
397
|
cutOp.Build(progress);
|
|
394
398
|
if (simplify) cutOp.SimplifyResult(true, true, 1e-3);
|
|
395
399
|
const cutAllResult = castToShape3D(
|
package/dist/brepjs.cjs
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const occtBoundary = require("./occtBoundary-
|
|
3
|
+
const occtBoundary = require("./occtBoundary-ChEJsbOT.cjs");
|
|
4
4
|
const errors = require("./errors-eRQu29oc.cjs");
|
|
5
|
-
const shapeTypes = require("./shapeTypes-
|
|
5
|
+
const shapeTypes = require("./shapeTypes-MK0PKst9.cjs");
|
|
6
6
|
const vecOps = require("./vecOps-CjRL1jau.cjs");
|
|
7
|
-
const Blueprint = require("./Blueprint-
|
|
8
|
-
const curveFns = require("./curveFns-
|
|
9
|
-
const loft$2 = require("./loft-
|
|
10
|
-
const operations = require("./operations-
|
|
11
|
-
const boolean2D = require("./boolean2D-
|
|
7
|
+
const Blueprint = require("./Blueprint-DEhjUTv4.cjs");
|
|
8
|
+
const curveFns = require("./curveFns-BT8cTVDA.cjs");
|
|
9
|
+
const loft$2 = require("./loft-DCEZpu53.cjs");
|
|
10
|
+
const operations = require("./operations-CckDdRJ0.cjs");
|
|
11
|
+
const boolean2D = require("./boolean2D-BMw-2GRS.cjs");
|
|
12
12
|
const _2d = require("./2d.cjs");
|
|
13
|
-
const helpers = require("./helpers-
|
|
13
|
+
const helpers = require("./helpers-MiJaYJMA.cjs");
|
|
14
14
|
const io = require("./io.cjs");
|
|
15
|
-
const drawFns = require("./drawFns-
|
|
16
|
-
const vectors = require("./vectors-
|
|
17
|
-
const shapeFns = require("./shapeFns-
|
|
18
|
-
const booleanFns = require("./booleanFns-
|
|
19
|
-
const topology = require("./topology-
|
|
20
|
-
const faceFns = require("./faceFns-
|
|
21
|
-
const meshFns = require("./meshFns-
|
|
22
|
-
const measurement = require("./measurement-
|
|
23
|
-
const surfaceBuilders = require("./surfaceBuilders-
|
|
15
|
+
const drawFns = require("./drawFns-DcEDgZzq.cjs");
|
|
16
|
+
const vectors = require("./vectors-DrAMMsHl.cjs");
|
|
17
|
+
const shapeFns = require("./shapeFns-CQWvvjmd.cjs");
|
|
18
|
+
const booleanFns = require("./booleanFns-BOrYk5DW.cjs");
|
|
19
|
+
const topology = require("./topology-C06jndeV.cjs");
|
|
20
|
+
const faceFns = require("./faceFns-B8fGirMy.cjs");
|
|
21
|
+
const meshFns = require("./meshFns-CxYud6A4.cjs");
|
|
22
|
+
const measurement = require("./measurement-BFotSPr0.cjs");
|
|
23
|
+
const surfaceBuilders = require("./surfaceBuilders-5Ci2Du77.cjs");
|
|
24
24
|
const query = require("./query.cjs");
|
|
25
25
|
const result = require("./result.cjs");
|
|
26
|
-
const cornerFinder = require("./cornerFinder-
|
|
26
|
+
const cornerFinder = require("./cornerFinder-DilC5fiE.cjs");
|
|
27
27
|
const worker = require("./worker.cjs");
|
|
28
28
|
const errorFactories = {
|
|
29
29
|
OCCT_OPERATION: (code, message, cause) => ({ kind: "OCCT_OPERATION", code, message, cause }),
|
package/dist/brepjs.js
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { g as getKernel, d as toOcPnt, a as toVec3 } from "./occtBoundary-
|
|
2
|
-
import { f, h, i, j, r, b, t, w, k, l } from "./occtBoundary-
|
|
1
|
+
import { g as getKernel, d as toOcPnt, a as toVec3 } from "./occtBoundary-DC1yVJex.js";
|
|
2
|
+
import { f, h, i, j, r, b, t, w, k, l } from "./occtBoundary-DC1yVJex.js";
|
|
3
3
|
import { l as ok, y as translateOcctError, e as err, q as queryError, x as validationError, B as BrepErrorCode, o as occtError, i as ioError, d as isErr, p as typeCastError, u as unwrap } from "./errors-Coh_5_19.js";
|
|
4
4
|
import { O, a, c, b as b2, f as f2, g, m, h as h2, j as j2, k as k2, z, s, t as t2, n, r as r2, v, w as w2 } from "./errors-Coh_5_19.js";
|
|
5
|
-
import { c as castShape, e as isFace, j as isShell, k as isSolid, h as isShape3D, n as gcWithScope, u as createSolid, o as createWire, d as isEdge, m as isWire } from "./shapeTypes-
|
|
6
|
-
import { D, s as s2, p, q, a as a2, b as b3, y, t as t3, z as z2, g as g2, i as i2, f as f3, l as l2, r as r3, w as w3 } from "./shapeTypes-
|
|
5
|
+
import { c as castShape, e as isFace, j as isShell, k as isSolid, h as isShape3D, n as gcWithScope, u as createSolid, o as createWire, d as isEdge, m as isWire } from "./shapeTypes-BVd0rRNe.js";
|
|
6
|
+
import { D, s as s2, p, q, a as a2, b as b3, y, t as t3, z as z2, g as g2, i as i2, f as f3, l as l2, r as r3, w as w3 } from "./shapeTypes-BVd0rRNe.js";
|
|
7
7
|
import { c as vecDistance, D as DEG2RAD, n as vecScale, j as vecNormalize, f as vecIsZero } from "./vecOps-ZDdZWbwT.js";
|
|
8
8
|
import { H, R, v as v2, a as a3, b as b4, d, e, g as g3, h as h3, i as i3, k as k3, l as l3, m as m2, o } from "./vecOps-ZDdZWbwT.js";
|
|
9
|
-
import { B, d as d2, C, r as r4, t as t4 } from "./Blueprint-
|
|
10
|
-
import { e as curveIsClosed, d as curveStartPoint, c as curveTangentAt, h as curvePointAt, a as curveEndPoint, i as curveLength } from "./curveFns-
|
|
11
|
-
import { j as j3, k as k4, l as l4, f as f4, m as m3, b as b5, g as g4, n as n2, o as o2 } from "./curveFns-
|
|
12
|
-
import { m as makeCompound, d as makeCone, e as makeCylinder, f as makeEllipsoid, h as makeOffset, w as weldShellsAndFaces, a as makeSolid, i as makeSphere, j as makeTorus, k as makeVertex } from "./loft-
|
|
13
|
-
import { b as b6, g as g5, r as r5 } from "./loft-
|
|
14
|
-
import { w as walkAssembly, e as extrude$1, r as revolve$1, s as sweep, c as circularPattern, l as linearPattern } from "./operations-
|
|
15
|
-
import { a as a4, b as b7, d as d3, f as f5, g as g6, h as h4, i as i4, j as j4, k as k5, m as m4, n as n3, o as o3, p as p2, q as q2, t as t5, u, v as v3, x, y as y2, z as z3, A, B as B2, C as C2, D as D2, E } from "./operations-
|
|
16
|
-
import { B as B3, a as a5, e as e2, C as C3, F, S, f as f6, l as l5, g as g7, n as n4, k as k6, q as q3, o as o4, p as p3, r as r6 } from "./boolean2D-
|
|
9
|
+
import { B, d as d2, C, r as r4, t as t4 } from "./Blueprint-BihoXiSm.js";
|
|
10
|
+
import { e as curveIsClosed, d as curveStartPoint, c as curveTangentAt, h as curvePointAt, a as curveEndPoint, i as curveLength } from "./curveFns-BJG6oqMt.js";
|
|
11
|
+
import { j as j3, k as k4, l as l4, f as f4, m as m3, b as b5, g as g4, n as n2, o as o2 } from "./curveFns-BJG6oqMt.js";
|
|
12
|
+
import { m as makeCompound, d as makeCone, e as makeCylinder, f as makeEllipsoid, h as makeOffset, w as weldShellsAndFaces, a as makeSolid, i as makeSphere, j as makeTorus, k as makeVertex } from "./loft-C810lPN5.js";
|
|
13
|
+
import { b as b6, g as g5, r as r5 } from "./loft-C810lPN5.js";
|
|
14
|
+
import { w as walkAssembly, e as extrude$1, r as revolve$1, s as sweep, c as circularPattern, l as linearPattern } from "./operations-IFpeXZme.js";
|
|
15
|
+
import { a as a4, b as b7, d as d3, f as f5, g as g6, h as h4, i as i4, j as j4, k as k5, m as m4, n as n3, o as o3, p as p2, q as q2, t as t5, u, v as v3, x, y as y2, z as z3, A, B as B2, C as C2, D as D2, E } from "./operations-IFpeXZme.js";
|
|
16
|
+
import { B as B3, a as a5, e as e2, C as C3, F, S, f as f6, l as l5, g as g7, n as n4, k as k6, q as q3, o as o4, p as p3, r as r6 } from "./boolean2D-B7MAHWWy.js";
|
|
17
17
|
import { createBlueprint, curve2dBoundingBox, curve2dDistanceFrom, curve2dFirstPoint, curve2dIsOnCurve, curve2dLastPoint, curve2dParameter, curve2dSplitAt, curve2dTangentAt, getBounds2D, getOrientation2D, isInside2D, mirror2D, reverseCurve, rotate2D, scale2D, sketch2DOnFace, sketch2DOnPlane, stretch2D, toSVGPathD, translate2D } from "./2d.js";
|
|
18
|
-
import { l as createTypedFinder, m as faceFinder } from "./helpers-
|
|
19
|
-
import { g as g8 } from "./helpers-
|
|
18
|
+
import { l as createTypedFinder, m as faceFinder } from "./helpers-8QToWU3Q.js";
|
|
19
|
+
import { g as g8 } from "./helpers-8QToWU3Q.js";
|
|
20
20
|
import { blueprintToDXF, exportDXF, exportGlb, exportGltf, exportOBJ, exportThreeMF, importIGES, importSTEP, importSTL, importSVG, importSVGPathD } from "./io.js";
|
|
21
|
-
import { C as C4, D as D3, a as a6, S as S2, b as b8, X, Y, c as c2, d as d4, e as e3, f as f7, Z, g as g9, h as h5, i as i5, j as j5, k as k7, l as l6, m as m5, n as n5, o as o5, p as p4, q as q4, r as r7, s as s3, t as t6, u as u2, v as v4, w as w4, x as x2, y as y3, z as z4, _, $, a0, a1, A as A2, a2 as a22, B as B4, E as E2, a3 as a32, F as F2, G, H as H2, I, J, K, L, M, N, O as O2, P, Q, R as R2, T, U, a4 as a42, V, a5 as a52, a6 as a62, W } from "./drawFns-
|
|
22
|
-
import { c as c3, a as a7, p as p5, r as r8, t as t7 } from "./vectors-
|
|
23
|
-
import { v as vertexPosition, a as getFaces, f as getVertices, d as getEdges, t as translate$1, p as propagateOrigins, h as applyMatrix$1, j as clone$1, k as describe$1, l as isEmpty$1, m as mirror$1, r as rotate$1, s as scale$1, n as simplify$1, o as toBREP$1, q as transformCopy$1, u as getBounds, c as getWires } from "./shapeFns-
|
|
24
|
-
import { w as w5, g as g10, e as e4, x as x3, i as i6, y as y4, z as z5, A as A3, B as B5, C as C5, D as D4 } from "./shapeFns-
|
|
25
|
-
import { p as propagateFaceTags, a as propagateColors, c as cut$1, f as fuse$1, i as intersect$1, s as section$1, b as sectionToFace$1, d as slice$1, e as split$1, g as fuseAll, h as cutAll } from "./booleanFns-
|
|
26
|
-
import { j as j6, k as k8, l as l7, m as m6, n as n6, o as o6, q as q5, r as r9, t as t8, u as u3 } from "./booleanFns-
|
|
27
|
-
import { c as chamferDistAngle, h as heal$1, i as isValid$1 } from "./topology-
|
|
28
|
-
import { a as a8, b as b9, e as e5, f as f8, d as d5, g as g11, j as j7, s as s4, t as t9, k as k9, l as l8, v as v5, w as w6 } from "./topology-
|
|
29
|
-
import { i as iterTopo, e as faceCenter, n as normalAt, j as fromBREP$1, k as innerWires, o as outerWire, g as getSurfaceType } from "./faceFns-
|
|
30
|
-
import { l as l9, c as c4, m as m7, d as d6, f as f9, q as q6, r as r10, s as s5, p as p6, t as t10, v as v6, u as u4, h as h6 } from "./faceFns-
|
|
31
|
-
import { m as mesh$1, a as meshEdges$1 } from "./meshFns-
|
|
32
|
-
import { c as c5, b as b10, e as e6, d as d7, f as f10 } from "./meshFns-
|
|
33
|
-
import { m as measureArea, a as measureSurfaceProps, b as measureVolumeProps, c as measureVolume } from "./measurement-
|
|
34
|
-
import { d as d8, e as e7, f as f11, g as g12, h as h7, i as i7 } from "./measurement-
|
|
35
|
-
import { h as addHolesInFace, g as makeBezierCurve, k as makeBSplineApproximation, i as makeCircle, j as makeEllipse, f as makeEllipseArc, m as makeFace, n as makeNonPlanarFace, c as makeHelix, a as makeLine, o as makePolygon, l as makeNewFaceWithinFace, e as makeTangentArc, d as makeThreePointArc, b as assembleWire } from "./surfaceBuilders-
|
|
36
|
-
import { p as p7 } from "./surfaceBuilders-
|
|
21
|
+
import { C as C4, D as D3, a as a6, S as S2, b as b8, X, Y, c as c2, d as d4, e as e3, f as f7, Z, g as g9, h as h5, i as i5, j as j5, k as k7, l as l6, m as m5, n as n5, o as o5, p as p4, q as q4, r as r7, s as s3, t as t6, u as u2, v as v4, w as w4, x as x2, y as y3, z as z4, _, $, a0, a1, A as A2, a2 as a22, B as B4, E as E2, a3 as a32, F as F2, G, H as H2, I, J, K, L, M, N, O as O2, P, Q, R as R2, T, U, a4 as a42, V, a5 as a52, a6 as a62, W } from "./drawFns-aKd56G2a.js";
|
|
22
|
+
import { c as c3, a as a7, p as p5, r as r8, t as t7 } from "./vectors-Dp17lKnm.js";
|
|
23
|
+
import { v as vertexPosition, a as getFaces, f as getVertices, d as getEdges, t as translate$1, p as propagateOrigins, h as applyMatrix$1, j as clone$1, k as describe$1, l as isEmpty$1, m as mirror$1, r as rotate$1, s as scale$1, n as simplify$1, o as toBREP$1, q as transformCopy$1, u as getBounds, c as getWires } from "./shapeFns-BTnqah-6.js";
|
|
24
|
+
import { w as w5, g as g10, e as e4, x as x3, i as i6, y as y4, z as z5, A as A3, B as B5, C as C5, D as D4 } from "./shapeFns-BTnqah-6.js";
|
|
25
|
+
import { p as propagateFaceTags, a as propagateColors, c as cut$1, f as fuse$1, i as intersect$1, s as section$1, b as sectionToFace$1, d as slice$1, e as split$1, g as fuseAll, h as cutAll } from "./booleanFns-CxU6z_LD.js";
|
|
26
|
+
import { j as j6, k as k8, l as l7, m as m6, n as n6, o as o6, q as q5, r as r9, t as t8, u as u3 } from "./booleanFns-CxU6z_LD.js";
|
|
27
|
+
import { c as chamferDistAngle, h as heal$1, i as isValid$1 } from "./topology-P-u0NDwX.js";
|
|
28
|
+
import { a as a8, b as b9, e as e5, f as f8, d as d5, g as g11, j as j7, s as s4, t as t9, k as k9, l as l8, v as v5, w as w6 } from "./topology-P-u0NDwX.js";
|
|
29
|
+
import { i as iterTopo, e as faceCenter, n as normalAt, j as fromBREP$1, k as innerWires, o as outerWire, g as getSurfaceType } from "./faceFns-C8ye0H_K.js";
|
|
30
|
+
import { l as l9, c as c4, m as m7, d as d6, f as f9, q as q6, r as r10, s as s5, p as p6, t as t10, v as v6, u as u4, h as h6 } from "./faceFns-C8ye0H_K.js";
|
|
31
|
+
import { m as mesh$1, a as meshEdges$1 } from "./meshFns-DPbSUo0q.js";
|
|
32
|
+
import { c as c5, b as b10, e as e6, d as d7, f as f10 } from "./meshFns-DPbSUo0q.js";
|
|
33
|
+
import { m as measureArea, a as measureSurfaceProps, b as measureVolumeProps, c as measureVolume } from "./measurement-BT2jlvKC.js";
|
|
34
|
+
import { d as d8, e as e7, f as f11, g as g12, h as h7, i as i7 } from "./measurement-BT2jlvKC.js";
|
|
35
|
+
import { h as addHolesInFace, g as makeBezierCurve, k as makeBSplineApproximation, i as makeCircle, j as makeEllipse, f as makeEllipseArc, m as makeFace, n as makeNonPlanarFace, c as makeHelix, a as makeLine, o as makePolygon, l as makeNewFaceWithinFace, e as makeTangentArc, d as makeThreePointArc, b as assembleWire } from "./surfaceBuilders-nuWe3gns.js";
|
|
36
|
+
import { p as p7 } from "./surfaceBuilders-nuWe3gns.js";
|
|
37
37
|
import { edgeFinder } from "./query.js";
|
|
38
38
|
import { BrepBugError, bug } from "./result.js";
|
|
39
|
-
import { c as c6 } from "./cornerFinder-
|
|
39
|
+
import { c as c6 } from "./cornerFinder-Dh6RKiNy.js";
|
|
40
40
|
import { createOperationRegistry, createTaskQueue, createWorkerClient, createWorkerHandler, dequeueTask, enqueueTask, isDisposeRequest, isErrorResponse, isInitRequest, isOperationRequest, isQueueEmpty, isSuccessResponse, pendingCount, registerHandler, rejectAll } from "./worker.js";
|
|
41
41
|
const errorFactories = {
|
|
42
42
|
OCCT_OPERATION: (code, message, cause) => ({ kind: "OCCT_OPERATION", code, message, cause }),
|
package/dist/core.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const occtBoundary = require("./occtBoundary-
|
|
3
|
+
const occtBoundary = require("./occtBoundary-ChEJsbOT.cjs");
|
|
4
4
|
const vecOps = require("./vecOps-CjRL1jau.cjs");
|
|
5
5
|
const errors = require("./errors-eRQu29oc.cjs");
|
|
6
|
-
const vectors = require("./vectors-
|
|
7
|
-
const shapeTypes = require("./shapeTypes-
|
|
6
|
+
const vectors = require("./vectors-DrAMMsHl.cjs");
|
|
7
|
+
const shapeTypes = require("./shapeTypes-MK0PKst9.cjs");
|
|
8
8
|
const result = require("./result.cjs");
|
|
9
9
|
exports.resolveDirection = occtBoundary.resolveDirection;
|
|
10
10
|
exports.toVec2 = occtBoundary.toVec2;
|
package/dist/core.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { r, t, a } from "./occtBoundary-
|
|
1
|
+
import { r, t, a } from "./occtBoundary-DC1yVJex.js";
|
|
2
2
|
import { D, H, R, v, a as a2, b, c, d, e, f, g, h, i, j, k, l, m, n, o } from "./vecOps-ZDdZWbwT.js";
|
|
3
3
|
import { O, a as a3, c as c2, b as b2, e as e2, f as f2, i as i2, d as d2, g as g2, m as m2, h as h2, j as j2, k as k2, o as o2, l as l2, q, s, t as t2, n as n2, p, u, r as r2, v as v2, w, x } from "./errors-Coh_5_19.js";
|
|
4
|
-
import { c as c3, a as a4, p as p2, r as r3, t as t3 } from "./vectors-
|
|
5
|
-
import { D as D2, c as c4, a as a5, b as b3, g as g3, i as i3, d as d3, e as e3, f as f3, h as h3, j as j3, k as k3, l as l3, m as m3, w as w2 } from "./shapeTypes-
|
|
4
|
+
import { c as c3, a as a4, p as p2, r as r3, t as t3 } from "./vectors-Dp17lKnm.js";
|
|
5
|
+
import { D as D2, c as c4, a as a5, b as b3, g as g3, i as i3, d as d3, e as e3, f as f3, h as h3, j as j3, k as k3, l as l3, m as m3, w as w2 } from "./shapeTypes-BVd0rRNe.js";
|
|
6
6
|
import { BrepBugError, bug } from "./result.js";
|
|
7
7
|
export {
|
|
8
8
|
BrepBugError,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as angle2d, s as samePoint, d as distance2d } from "./helpers-
|
|
1
|
+
import { a as angle2d, s as samePoint, d as distance2d } from "./helpers-8QToWU3Q.js";
|
|
2
2
|
import { D as DEG2RAD } from "./vecOps-ZDdZWbwT.js";
|
|
3
3
|
const PI_2 = 2 * Math.PI;
|
|
4
4
|
function positiveHalfAngle(angle) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { g as getKernel } from "./occtBoundary-
|
|
2
|
-
import { c as castShape, d as isEdge, m as isWire, n as gcWithScope } from "./shapeTypes-
|
|
1
|
+
import { g as getKernel } from "./occtBoundary-DC1yVJex.js";
|
|
2
|
+
import { c as castShape, d as isEdge, m as isWire, n as gcWithScope } from "./shapeTypes-BVd0rRNe.js";
|
|
3
3
|
import { e as err, p as typeCastError, l as ok, u as unwrap } from "./errors-Coh_5_19.js";
|
|
4
4
|
let CURVE_TYPES_MAP = null;
|
|
5
5
|
const getCurveTypesMap = (refresh) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const occtBoundary = require("./occtBoundary-
|
|
3
|
-
const shapeTypes = require("./shapeTypes-
|
|
2
|
+
const occtBoundary = require("./occtBoundary-ChEJsbOT.cjs");
|
|
3
|
+
const shapeTypes = require("./shapeTypes-MK0PKst9.cjs");
|
|
4
4
|
const errors = require("./errors-eRQu29oc.cjs");
|
|
5
5
|
let CURVE_TYPES_MAP = null;
|
|
6
6
|
const getCurveTypesMap = (refresh) => {
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const errors = require("./errors-eRQu29oc.cjs");
|
|
3
|
-
const vectors = require("./vectors-
|
|
4
|
-
const occtBoundary = require("./occtBoundary-
|
|
3
|
+
const vectors = require("./vectors-DrAMMsHl.cjs");
|
|
4
|
+
const occtBoundary = require("./occtBoundary-ChEJsbOT.cjs");
|
|
5
5
|
const vecOps = require("./vecOps-CjRL1jau.cjs");
|
|
6
|
-
const boolean2D = require("./boolean2D-
|
|
7
|
-
const faceFns = require("./faceFns-
|
|
8
|
-
const curveFns = require("./curveFns-
|
|
9
|
-
const surfaceBuilders = require("./surfaceBuilders-
|
|
10
|
-
const shapeTypes = require("./shapeTypes-
|
|
11
|
-
const Blueprint = require("./Blueprint-
|
|
6
|
+
const boolean2D = require("./boolean2D-BMw-2GRS.cjs");
|
|
7
|
+
const faceFns = require("./faceFns-B8fGirMy.cjs");
|
|
8
|
+
const curveFns = require("./curveFns-BT8cTVDA.cjs");
|
|
9
|
+
const surfaceBuilders = require("./surfaceBuilders-5Ci2Du77.cjs");
|
|
10
|
+
const shapeTypes = require("./shapeTypes-MK0PKst9.cjs");
|
|
11
|
+
const Blueprint = require("./Blueprint-DEhjUTv4.cjs");
|
|
12
12
|
const result = require("./result.cjs");
|
|
13
|
-
const helpers = require("./helpers-
|
|
14
|
-
const shapeFns = require("./shapeFns-
|
|
15
|
-
const loft = require("./loft-
|
|
13
|
+
const helpers = require("./helpers-MiJaYJMA.cjs");
|
|
14
|
+
const shapeFns = require("./shapeFns-CQWvvjmd.cjs");
|
|
15
|
+
const loft = require("./loft-DCEZpu53.cjs");
|
|
16
16
|
const opentype = require("opentype.js");
|
|
17
|
-
const cornerFinder = require("./cornerFinder-
|
|
17
|
+
const cornerFinder = require("./cornerFinder-DilC5fiE.cjs");
|
|
18
18
|
const stitchCurves = (curves, precision = 1e-7) => {
|
|
19
19
|
const startPoints = new boolean2D.Flatbush(curves.length);
|
|
20
20
|
curves.forEach((c) => {
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { u as unwrap, g as isOk, e as err, x as validationError, l as ok } from "./errors-Coh_5_19.js";
|
|
2
|
-
import { r as resolvePlane, b as planeToWorld, d as planeToLocal } from "./vectors-
|
|
3
|
-
import { g as getKernel, a as toVec3, c as makeOcAx2 } from "./occtBoundary-
|
|
2
|
+
import { r as resolvePlane, b as planeToWorld, d as planeToLocal } from "./vectors-Dp17lKnm.js";
|
|
3
|
+
import { g as getKernel, a as toVec3, c as makeOcAx2 } from "./occtBoundary-DC1yVJex.js";
|
|
4
4
|
import { n as vecScale, j as vecNormalize, v as vecAdd, o as vecSub, b as vecCross, m as vecRotate, R as RAD2DEG, g as vecLength, e as vecEquals, D as DEG2RAD } from "./vecOps-ZDdZWbwT.js";
|
|
5
|
-
import { b as Flatbush, c as convertSvgEllipseParams, d as defaultsSplineOptions, S as Sketch, r as roundedRectangleBlueprint, e as Blueprints, C as CompoundBlueprint, f as cut2D, i as intersectCurves, g as fuse2D, m as make2dOffset, h as filletCurves, j as chamferCurves, o as organiseBlueprints, a as BlueprintSketcher, k as intersect2D, B as BaseSketcher2d, p as polysidesBlueprint } from "./boolean2D-
|
|
6
|
-
import { d as downcast, c as cast, e as faceCenter, n as normalAt, o as outerWire } from "./faceFns-
|
|
7
|
-
import { c as curveTangentAt, a as curveEndPoint, b as getCurveType, o as offsetWire2D } from "./curveFns-
|
|
8
|
-
import { a as makeLine, d as makeThreePointArc, e as makeTangentArc, f as makeEllipseArc, g as makeBezierCurve, b as assembleWire, h as addHolesInFace, m as makeFace, i as makeCircle, j as makeEllipse, c as makeHelix, k as makeBSplineApproximation } from "./surfaceBuilders-
|
|
9
|
-
import { o as createWire, r as localGC, q as createFace, e as isFace, n as gcWithScope, c as castShape } from "./shapeTypes-
|
|
10
|
-
import { m as mirror, B as Blueprint, C as Curve2D, a as make2dSegmentCurve, b as make2dArcFromCenter, c as approximateAsSvgCompatibleCurve, d as BoundingBox2d, e as edgeToCurve, f as make2dInerpolatedBSplineCurve, g as make2dCircle, h as make2dEllipse, i as deserializeCurve2D } from "./Blueprint-
|
|
5
|
+
import { b as Flatbush, c as convertSvgEllipseParams, d as defaultsSplineOptions, S as Sketch, r as roundedRectangleBlueprint, e as Blueprints, C as CompoundBlueprint, f as cut2D, i as intersectCurves, g as fuse2D, m as make2dOffset, h as filletCurves, j as chamferCurves, o as organiseBlueprints, a as BlueprintSketcher, k as intersect2D, B as BaseSketcher2d, p as polysidesBlueprint } from "./boolean2D-B7MAHWWy.js";
|
|
6
|
+
import { d as downcast, c as cast, e as faceCenter, n as normalAt, o as outerWire } from "./faceFns-C8ye0H_K.js";
|
|
7
|
+
import { c as curveTangentAt, a as curveEndPoint, b as getCurveType, o as offsetWire2D } from "./curveFns-BJG6oqMt.js";
|
|
8
|
+
import { a as makeLine, d as makeThreePointArc, e as makeTangentArc, f as makeEllipseArc, g as makeBezierCurve, b as assembleWire, h as addHolesInFace, m as makeFace, i as makeCircle, j as makeEllipse, c as makeHelix, k as makeBSplineApproximation } from "./surfaceBuilders-nuWe3gns.js";
|
|
9
|
+
import { o as createWire, r as localGC, q as createFace, e as isFace, n as gcWithScope, c as castShape } from "./shapeTypes-BVd0rRNe.js";
|
|
10
|
+
import { m as mirror, B as Blueprint, C as Curve2D, a as make2dSegmentCurve, b as make2dArcFromCenter, c as approximateAsSvgCompatibleCurve, d as BoundingBox2d, e as edgeToCurve, f as make2dInerpolatedBSplineCurve, g as make2dCircle, h as make2dEllipse, i as deserializeCurve2D } from "./Blueprint-BihoXiSm.js";
|
|
11
11
|
import { bug } from "./result.js";
|
|
12
|
-
import { d as distance2d, p as polarAngle2d, f as polarToCartesian, P as PRECISION_OFFSET, h as squareDistance2d, s as samePoint$1, e as subtract2d, c as add2d } from "./helpers-
|
|
13
|
-
import { d as getEdges } from "./shapeFns-
|
|
14
|
-
import { m as makeCompound, b as basicFaceExtrusion, r as revolution, a as makeSolid, c as complexExtrude, t as twistExtrude } from "./loft-
|
|
12
|
+
import { d as distance2d, p as polarAngle2d, f as polarToCartesian, P as PRECISION_OFFSET, h as squareDistance2d, s as samePoint$1, e as subtract2d, c as add2d } from "./helpers-8QToWU3Q.js";
|
|
13
|
+
import { d as getEdges } from "./shapeFns-BTnqah-6.js";
|
|
14
|
+
import { m as makeCompound, b as basicFaceExtrusion, r as revolution, a as makeSolid, c as complexExtrude, t as twistExtrude } from "./loft-C810lPN5.js";
|
|
15
15
|
import opentype from "opentype.js";
|
|
16
|
-
import { c as cornerFinder } from "./cornerFinder-
|
|
16
|
+
import { c as cornerFinder } from "./cornerFinder-Dh6RKiNy.js";
|
|
17
17
|
const stitchCurves = (curves, precision = 1e-7) => {
|
|
18
18
|
const startPoints = new Flatbush(curves.length);
|
|
19
19
|
curves.forEach((c) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const occtBoundary = require("./occtBoundary-
|
|
3
|
-
const shapeTypes = require("./shapeTypes-
|
|
2
|
+
const occtBoundary = require("./occtBoundary-ChEJsbOT.cjs");
|
|
3
|
+
const shapeTypes = require("./shapeTypes-MK0PKst9.cjs");
|
|
4
4
|
const errors = require("./errors-eRQu29oc.cjs");
|
|
5
5
|
let _topoMap = null;
|
|
6
6
|
const asTopo = (entity) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { g as getKernel, a as toVec3, d as toOcPnt } from "./occtBoundary-
|
|
2
|
-
import { c as castShape, h as isShape3D$1, m as isWire$1, n as gcWithScope } from "./shapeTypes-
|
|
1
|
+
import { g as getKernel, a as toVec3, d as toOcPnt } from "./occtBoundary-DC1yVJex.js";
|
|
2
|
+
import { c as castShape, h as isShape3D$1, m as isWire$1, n as gcWithScope } from "./shapeTypes-BVd0rRNe.js";
|
|
3
3
|
import { e as err, p as typeCastError, l as ok, a as andThen, u as unwrap } from "./errors-Coh_5_19.js";
|
|
4
4
|
let _topoMap = null;
|
|
5
5
|
const asTopo = (entity) => {
|