brepjs 18.75.1 → 18.76.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -22
- package/dist/2d.cjs +4 -4
- package/dist/2d.js +4 -4
- package/dist/{blueprint-DiaBfB57.cjs → blueprint-BHyTsY5E.cjs} +2 -2
- package/dist/{blueprint-OgMkiq7a.js → blueprint-DuT3LJGx.js} +2 -2
- package/dist/{blueprintFns-uYr43qo4.cjs → blueprintFns-dPHJgrqC.cjs} +2 -2
- package/dist/{blueprintFns-C3EQ12Ix.js → blueprintFns-qaEV4X2R.js} +2 -2
- package/dist/{blueprintSketcher-Bp3oMzVW.js → blueprintSketcher-IY1gJ613.js} +2 -2
- package/dist/{blueprintSketcher-CZqT7_gf.cjs → blueprintSketcher-Th4H1tao.cjs} +2 -2
- package/dist/{boolean2D-4fXjKx5f.cjs → boolean2D-BGK18W_l.cjs} +3 -3
- package/dist/{boolean2D-DXti_c7k.js → boolean2D-DUDg_dMv.js} +3 -3
- package/dist/brepjs.cjs +17 -10
- package/dist/brepjs.js +17 -11
- package/dist/{cornerFinder-CAoT1uIs.cjs → cornerFinder-CxqA_AYe.cjs} +1 -1
- package/dist/{cornerFinder-CmXx269_.js → cornerFinder-DamaTij5.js} +1 -1
- package/dist/{curveFns-DQlllRhs.cjs → curveFns-B8UdENpg.cjs} +64 -0
- package/dist/{curveFns-C7t4yHtQ.js → curveFns-CwOY58kC.js} +59 -1
- package/dist/{drawFns-SddAG_uY.cjs → drawFns-BwfhGs8Z.cjs} +7 -7
- package/dist/{drawFns-B7l3h4FX.js → drawFns-CcR9_01X.js} +7 -7
- package/dist/{helpers-CRBTGZO7.cjs → helpers-90SKWHEY.cjs} +1 -1
- package/dist/{helpers-CYSAsvRe.js → helpers-DsaGpuUh.js} +1 -1
- package/dist/{importFns-eHSyuIJF.js → importFns-B02-HKco.js} +1 -1
- package/dist/{importFns-BY0rgGAN.cjs → importFns-CXH2OmJ6.cjs} +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/io.cjs +1 -1
- package/dist/io.js +1 -1
- package/dist/query.cjs +2 -2
- package/dist/query.js +2 -2
- package/dist/sketching.cjs +3 -3
- package/dist/sketching.js +3 -3
- package/dist/text.cjs +2 -2
- package/dist/text.js +2 -2
- package/dist/{textBlueprints-BxbCj29U.cjs → textBlueprints-8lNMcsUv.cjs} +2 -2
- package/dist/{textBlueprints-C9ne8G24.js → textBlueprints-C_ThSDVg.js} +2 -2
- package/dist/{textMetrics-DRfvY1yT.cjs → textMetrics-Bn5VPcTV.cjs} +1 -1
- package/dist/{textMetrics-Ddpxhy0z.js → textMetrics-CxdhimFF.js} +1 -1
- package/dist/topology/curveFns.d.ts +12 -0
- package/dist/topology/index.d.ts +1 -1
- package/dist/topology.cjs +2 -1
- package/dist/topology.d.ts +1 -1
- package/dist/topology.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ CAD modeling for JavaScript.
|
|
|
10
10
|
[](https://github.com/andymai/brepjs/commits/main)
|
|
11
11
|
[](./LICENSE)
|
|
12
12
|
|
|
13
|
-
**[▶ Try the live playground](https://brepjs.dev/playground)
|
|
13
|
+
**[▶ Try the live playground](https://brepjs.dev/playground)**: write code, watch the solid render, and export STEP, all in your browser.
|
|
14
14
|
|
|
15
15
|
**[Getting Started](./docs/getting-started.md)** · **[Cheat Sheet](./docs/cheat-sheet.md)** · **[Docs](https://brepjs.dev/)**
|
|
16
16
|
|
|
@@ -18,7 +18,7 @@ CAD modeling for JavaScript.
|
|
|
18
18
|
|
|
19
19
|
</div>
|
|
20
20
|
|
|
21
|
-
Shapes are exact mathematical boundaries
|
|
21
|
+
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
22
|
|
|
23
23
|
```typescript
|
|
24
24
|
// Drill a hole, fillet the vertical edges, export to STEP
|
|
@@ -44,11 +44,11 @@ Neither had the type safety I wanted, so brepjs leans hard on it: branded types,
|
|
|
44
44
|
|
|
45
45
|
To set expectations, this project deliberately does not:
|
|
46
46
|
|
|
47
|
-
- **Render or display geometry
|
|
48
|
-
- **Support organic or sculpting workflows
|
|
49
|
-
- **Output SVG or 2D files
|
|
50
|
-
- **Run server-side (SSR)
|
|
51
|
-
- **Provide a GUI
|
|
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**: the API is built for parametric parts (enclosures, brackets, fixtures); freeform sculpting is out of scope.
|
|
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
52
|
|
|
53
53
|
## Status
|
|
54
54
|
|
|
@@ -78,17 +78,17 @@ registerKernel('occt-wasm', OcctWasmAdapter.fromKernel(kernel));
|
|
|
78
78
|
|
|
79
79
|
The chapter-based guide is the recommended starting point:
|
|
80
80
|
|
|
81
|
-
- **[Why brepjs](https://brepjs.dev/introduction/why-brepjs)
|
|
82
|
-
- **[Install & Initialize](https://brepjs.dev/getting-started/install)
|
|
83
|
-
- **[Your First Solid](https://brepjs.dev/getting-started/first-solid)
|
|
84
|
-
- **[Cheat Sheet](https://brepjs.dev/getting-started/cheat-sheet)
|
|
85
|
-
- **[Core Concepts](https://brepjs.dev/concepts/brep-vs-mesh)
|
|
86
|
-
- **[Common Tasks](https://brepjs.dev/tasks/booleans)
|
|
87
|
-
- **[Three.js Integration](https://brepjs.dev/integration/threejs)
|
|
88
|
-
- **[Migration](https://brepjs.dev/migration/replicad)
|
|
89
|
-
- **[Extending brepjs](https://brepjs.dev/extending/architecture)
|
|
90
|
-
- **[Reference](https://brepjs.dev/reference/glossary)
|
|
91
|
-
- **[API Reference (TypeDoc)](https://andymai.github.io/brepjs/)
|
|
81
|
+
- **[Why brepjs](https://brepjs.dev/introduction/why-brepjs)**: what makes it different, who it's for
|
|
82
|
+
- **[Install & Initialize](https://brepjs.dev/getting-started/install)**: three init styles, bundler notes
|
|
83
|
+
- **[Your First Solid](https://brepjs.dev/getting-started/first-solid)**: the canonical drill-fillet-export workflow
|
|
84
|
+
- **[Cheat Sheet](https://brepjs.dev/getting-started/cheat-sheet)**: single-page reference
|
|
85
|
+
- **[Core Concepts](https://brepjs.dev/concepts/brep-vs-mesh)**: B-Rep, topology, types, kernels, tolerance
|
|
86
|
+
- **[Common Tasks](https://brepjs.dev/tasks/booleans)**: booleans, fillets, sketching, lofts, sweeps, finders, measurement, IO
|
|
87
|
+
- **[Three.js Integration](https://brepjs.dev/integration/threejs)**: meshing and rendering
|
|
88
|
+
- **[Migration](https://brepjs.dev/migration/replicad)**: coming from Replicad, OpenSCAD, or Three.js
|
|
89
|
+
- **[Extending brepjs](https://brepjs.dev/extending/architecture)**: custom kernels, custom operations, architecture
|
|
90
|
+
- **[Reference](https://brepjs.dev/reference/glossary)**: glossary, function lookup, error codes, ADRs
|
|
91
|
+
- **[API Reference (TypeDoc)](https://andymai.github.io/brepjs/)**: searchable type-level reference
|
|
92
92
|
|
|
93
93
|
Legacy single-page docs in [./docs/](./docs/) remain available; the chapter site is the canonical location going forward.
|
|
94
94
|
|
|
@@ -105,16 +105,16 @@ Imports flow downward only. Boundaries are enforced in CI.
|
|
|
105
105
|
|
|
106
106
|
## Authoring CAD with AI (brepjs-verify)
|
|
107
107
|
|
|
108
|
-
[`brepjs-verify`](https://www.npmjs.com/package/brepjs-verify) helps an AI agent (or you) author parametric CAD in brepjs and **prove it is correct** before handing it off. An LLM can't see geometry
|
|
108
|
+
[`brepjs-verify`](https://www.npmjs.com/package/brepjs-verify) helps an AI agent (or you) author parametric CAD in brepjs and **prove it is correct** before handing it off. An LLM can't see geometry, so it writes a `.brep.ts` part, runs it on a real kernel, and reads a deterministic report instead of guessing from how the code reads. It ships as two cooperating pieces: a **Claude Code skill** (the authoring loop) and a **verification CLI** (validity + measured dimensions + multi-view snapshots + STEP export).
|
|
109
109
|
|
|
110
|
-
Install both
|
|
110
|
+
Install both; they ride on two rails:
|
|
111
111
|
|
|
112
112
|
```bash
|
|
113
|
-
# 1. The skill
|
|
113
|
+
# 1. The skill - Claude Code plugin (delivered via this repo's marketplace)
|
|
114
114
|
/plugin marketplace add andymai/brepjs
|
|
115
115
|
/plugin install brepjs-verify@brepjs
|
|
116
116
|
|
|
117
|
-
# 2. The runtime
|
|
117
|
+
# 2. The runtime - the CLI the skill drives
|
|
118
118
|
npm i -D brepjs-verify
|
|
119
119
|
```
|
|
120
120
|
|
package/dist/2d.cjs
CHANGED
|
@@ -2,10 +2,10 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
2
2
|
const require_shapeTypes = require("./shapeTypes-C4cMKLoj.cjs");
|
|
3
3
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
4
4
|
const require_topologyQueryFns = require("./topologyQueryFns-Bj5wpC75.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-Th4H1tao.cjs");
|
|
6
|
+
const require_blueprint = require("./blueprint-BHyTsY5E.cjs");
|
|
7
|
+
const require_boolean2D = require("./boolean2D-BGK18W_l.cjs");
|
|
8
|
+
const require_blueprintFns = require("./blueprintFns-dPHJgrqC.cjs");
|
|
9
9
|
//#region src/core/curve2dHandle.ts
|
|
10
10
|
/**
|
|
11
11
|
* Wrap a raw kernel 2D curve handle with brand + disposal tracking.
|
package/dist/2d.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { B as createKernelHandle, Q as getKernel2D, a as createEdge } from "./shapeTypes-VCBsDI43.js";
|
|
2
2
|
import { A as ok, b as err, d as validationError, t as BrepErrorCode } from "./errors-DNWJsfVU.js";
|
|
3
3
|
import { w as kernelCallRaw } from "./topologyQueryFns-BtfhAVY2.js";
|
|
4
|
-
import { a as Blueprints, i as CompoundBlueprint, r as organiseBlueprints } from "./blueprintSketcher-
|
|
5
|
-
import { _ as Curve2D, t as Blueprint, y as BoundingBox2d } from "./blueprint-
|
|
6
|
-
import { a as fuseBlueprints, c as roundedRectangleBlueprint, i as cutBlueprints, n as fuse2D, o as intersectBlueprints, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-
|
|
7
|
-
import { S as reverseCurve, _ as curve2dIsOnCurve, a as isInside2D, b as curve2dSplitAt, c as scale2D, d as stretch2D, f as toSVGPathD, g as curve2dFirstPoint, h as curve2dDistanceFrom, i as getOrientation2D, l as sketchOnFace2D, m as curve2dBoundingBox, o as mirror2D, p as translate2D, r as getBounds2D, s as rotate2D, t as createBlueprint, u as sketchOnPlane2D, v as curve2dLastPoint, x as curve2dTangentAt, y as curve2dParameter } from "./blueprintFns-
|
|
4
|
+
import { a as Blueprints, i as CompoundBlueprint, r as organiseBlueprints } from "./blueprintSketcher-IY1gJ613.js";
|
|
5
|
+
import { _ as Curve2D, t as Blueprint, y as BoundingBox2d } from "./blueprint-DuT3LJGx.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-DUDg_dMv.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-qaEV4X2R.js";
|
|
8
8
|
//#region src/core/curve2dHandle.ts
|
|
9
9
|
/**
|
|
10
10
|
* Wrap a raw kernel 2D curve handle with brand + disposal tracking.
|
|
@@ -5,10 +5,10 @@ const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
|
5
5
|
const require_types = require("./types-KjA8tY4Y.cjs");
|
|
6
6
|
const require_planeOps = require("./planeOps-BA4HfgQu.cjs");
|
|
7
7
|
const require_faceFns = require("./faceFns-CZvemlPW.cjs");
|
|
8
|
-
const require_curveFns = require("./curveFns-
|
|
8
|
+
const require_curveFns = require("./curveFns-B8UdENpg.cjs");
|
|
9
9
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
10
10
|
const require_surfaceBuilders = require("./surfaceBuilders-QK_Cnn_u.cjs");
|
|
11
|
-
const require_helpers = require("./helpers-
|
|
11
|
+
const require_helpers = require("./helpers-90SKWHEY.cjs");
|
|
12
12
|
//#region src/2d/lib/definitions.ts
|
|
13
13
|
/** Type guard that checks whether a value is a `Point2D`. */
|
|
14
14
|
function isPoint2D(point) {
|
|
@@ -5,10 +5,10 @@ import { r as RAD2DEG, t as DEG2RAD } from "./constants-ITRzCnCp.js";
|
|
|
5
5
|
import { r as toVec3 } from "./types-D24Y27N0.js";
|
|
6
6
|
import { r as makePlane } from "./planeOps-DSjjtrjg.js";
|
|
7
7
|
import { _ as cast, h as uvCoordinates, i as faceGeomType, m as uvBounds, r as faceCenter } from "./faceFns-BJ0mbRh5.js";
|
|
8
|
-
import {
|
|
8
|
+
import { p as getOrientation } from "./curveFns-CwOY58kC.js";
|
|
9
9
|
import { n as getAtOrThrow, r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
10
10
|
import { r as makeFace } from "./surfaceBuilders-DllH3kXs.js";
|
|
11
|
-
import { _ as samePoint, b as subtract2d, l as add2d, o as normalize2d, p as distance2d, t as getSingleFace, v as scalarMultiply2d } from "./helpers-
|
|
11
|
+
import { _ as samePoint, b as subtract2d, l as add2d, o as normalize2d, p as distance2d, t as getSingleFace, v as scalarMultiply2d } from "./helpers-DsaGpuUh.js";
|
|
12
12
|
//#region src/2d/lib/definitions.ts
|
|
13
13
|
/** Type guard that checks whether a value is a `Point2D`. */
|
|
14
14
|
function isPoint2D(point) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
2
|
-
const require_blueprintSketcher = require("./blueprintSketcher-
|
|
3
|
-
const require_blueprint = require("./blueprint-
|
|
2
|
+
const require_blueprintSketcher = require("./blueprintSketcher-Th4H1tao.cjs");
|
|
3
|
+
const require_blueprint = require("./blueprint-BHyTsY5E.cjs");
|
|
4
4
|
//#region src/2d/lib/curve2dFns.ts
|
|
5
5
|
/**
|
|
6
6
|
* Return a reversed copy of the curve (non-mutating).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { A as ok, b as err, d as validationError, t as BrepErrorCode } from "./errors-DNWJsfVU.js";
|
|
2
|
-
import { i as CompoundBlueprint } from "./blueprintSketcher-
|
|
3
|
-
import { t as Blueprint } from "./blueprint-
|
|
2
|
+
import { i as CompoundBlueprint } from "./blueprintSketcher-IY1gJ613.js";
|
|
3
|
+
import { t as Blueprint } from "./blueprint-DuT3LJGx.js";
|
|
4
4
|
//#region src/2d/lib/curve2dFns.ts
|
|
5
5
|
/**
|
|
6
6
|
* Return a reversed copy of the curve (non-mutating).
|
|
@@ -3,8 +3,8 @@ import { n as wasmIndex } from "./vec3-Dpha8d5k.js";
|
|
|
3
3
|
import { A as ok, R as unwrap, T as isOk, b as err, h as bug, n as computationError, s as safeIndex } from "./errors-DNWJsfVU.js";
|
|
4
4
|
import { r as RAD2DEG, t as DEG2RAD } from "./constants-ITRzCnCp.js";
|
|
5
5
|
import { t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
6
|
-
import { _ as samePoint, b as subtract2d, d as cartesianToPolar, f as crossProduct2d, g as rotate2d, h as polarToCartesian, l as add2d, m as polarAngle2d, o as normalize2d, p as distance2d, v as scalarMultiply2d } from "./helpers-
|
|
7
|
-
import { _ as Curve2D, c as make2dCircle, f as make2dSegmentCurve, h as approximateAsBSpline, m as make2dThreePointArc, n as asSVG, o as make2dArcFromCenter, p as make2dTangentArc, r as viewbox, s as make2dBezierCurve, t as Blueprint, u as make2dEllipseArc, x as isPoint2D, y as BoundingBox2d } from "./blueprint-
|
|
6
|
+
import { _ as samePoint, b as subtract2d, d as cartesianToPolar, f as crossProduct2d, g as rotate2d, h as polarToCartesian, l as add2d, m as polarAngle2d, o as normalize2d, p as distance2d, v as scalarMultiply2d } from "./helpers-DsaGpuUh.js";
|
|
7
|
+
import { _ as Curve2D, c as make2dCircle, f as make2dSegmentCurve, h as approximateAsBSpline, m as make2dThreePointArc, n as asSVG, o as make2dArcFromCenter, p as make2dTangentArc, r as viewbox, s as make2dBezierCurve, t as Blueprint, u as make2dEllipseArc, x as isPoint2D, y as BoundingBox2d } from "./blueprint-DuT3LJGx.js";
|
|
8
8
|
//#region node_modules/flatqueue/index.js
|
|
9
9
|
/** @template T */
|
|
10
10
|
var FlatQueue = class {
|
|
@@ -3,8 +3,8 @@ const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
|
|
|
3
3
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
4
4
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
5
5
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
6
|
-
const require_helpers = require("./helpers-
|
|
7
|
-
const require_blueprint = require("./blueprint-
|
|
6
|
+
const require_helpers = require("./helpers-90SKWHEY.cjs");
|
|
7
|
+
const require_blueprint = require("./blueprint-BHyTsY5E.cjs");
|
|
8
8
|
//#region node_modules/flatqueue/index.js
|
|
9
9
|
/** @template T */
|
|
10
10
|
var FlatQueue = class {
|
|
@@ -2,9 +2,9 @@ const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
|
|
|
2
2
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
3
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
4
4
|
const require_surfaceBuilders = require("./surfaceBuilders-QK_Cnn_u.cjs");
|
|
5
|
-
const require_blueprintSketcher = require("./blueprintSketcher-
|
|
6
|
-
const require_helpers = require("./helpers-
|
|
7
|
-
const require_blueprint = require("./blueprint-
|
|
5
|
+
const require_blueprintSketcher = require("./blueprintSketcher-Th4H1tao.cjs");
|
|
6
|
+
const require_helpers = require("./helpers-90SKWHEY.cjs");
|
|
7
|
+
const require_blueprint = require("./blueprint-BHyTsY5E.cjs");
|
|
8
8
|
//#region src/2d/blueprints/cannedBlueprints.ts
|
|
9
9
|
/**
|
|
10
10
|
* Create a regular polygon blueprint inscribed in a circle of the given radius.
|
|
@@ -2,9 +2,9 @@ import { n as wasmIndex } from "./vec3-Dpha8d5k.js";
|
|
|
2
2
|
import { R as unwrap, h as bug, s as safeIndex } from "./errors-DNWJsfVU.js";
|
|
3
3
|
import { r as lastOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
4
4
|
import { v as zip } from "./surfaceBuilders-DllH3kXs.js";
|
|
5
|
-
import { a as Blueprints, i as CompoundBlueprint, l as intersectCurves, r as organiseBlueprints, t as BlueprintSketcher, u as Flatbush } from "./blueprintSketcher-
|
|
6
|
-
import { _ as samePoint$1, b as subtract2d, f as crossProduct2d, s as PRECISION_INTERSECTION } from "./helpers-
|
|
7
|
-
import { b as removeDuplicatePoints, f as make2dSegmentCurve, t as Blueprint } from "./blueprint-
|
|
5
|
+
import { a as Blueprints, i as CompoundBlueprint, l as intersectCurves, r as organiseBlueprints, t as BlueprintSketcher, u as Flatbush } from "./blueprintSketcher-IY1gJ613.js";
|
|
6
|
+
import { _ as samePoint$1, b as subtract2d, f as crossProduct2d, s as PRECISION_INTERSECTION } from "./helpers-DsaGpuUh.js";
|
|
7
|
+
import { b as removeDuplicatePoints, f as make2dSegmentCurve, t as Blueprint } from "./blueprint-DuT3LJGx.js";
|
|
8
8
|
//#region src/2d/blueprints/cannedBlueprints.ts
|
|
9
9
|
/**
|
|
10
10
|
* Create a regular polygon blueprint inscribed in a circle of the given radius.
|
package/dist/brepjs.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_textBlueprints = require("./textBlueprints-
|
|
2
|
+
const require_textBlueprints = require("./textBlueprints-8lNMcsUv.cjs");
|
|
3
3
|
const require_shapeTypes = require("./shapeTypes-C4cMKLoj.cjs");
|
|
4
4
|
const require_occtWasmAdapter = require("./occtWasmAdapter-DdghAlnN.cjs");
|
|
5
5
|
const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
|
|
@@ -11,25 +11,25 @@ const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
|
|
|
11
11
|
const require_planeOps = require("./planeOps-BA4HfgQu.cjs");
|
|
12
12
|
const require_faceFns = require("./faceFns-CZvemlPW.cjs");
|
|
13
13
|
const require_shapeFns = require("./shapeFns-CQmd2W5F.cjs");
|
|
14
|
-
const require_curveFns = require("./curveFns-
|
|
14
|
+
const require_curveFns = require("./curveFns-B8UdENpg.cjs");
|
|
15
15
|
const require_meshFns = require("./meshFns-CvmTzMPL.cjs");
|
|
16
16
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
17
17
|
const require_surfaceBuilders = require("./surfaceBuilders-QK_Cnn_u.cjs");
|
|
18
18
|
const require_booleanFns = require("./booleanFns-DxnTjP19.cjs");
|
|
19
19
|
const require_primitiveFns = require("./primitiveFns-FudrSXrp.cjs");
|
|
20
20
|
const require_historyFns = require("./historyFns-xUNAdUYV.cjs");
|
|
21
|
-
const require_blueprintSketcher = require("./blueprintSketcher-
|
|
22
|
-
const require_helpers = require("./helpers-
|
|
23
|
-
const require_drawFns = require("./drawFns-
|
|
21
|
+
const require_blueprintSketcher = require("./blueprintSketcher-Th4H1tao.cjs");
|
|
22
|
+
const require_helpers = require("./helpers-90SKWHEY.cjs");
|
|
23
|
+
const require_drawFns = require("./drawFns-BwfhGs8Z.cjs");
|
|
24
24
|
const require_solidBuilders = require("./solidBuilders-B0Hzin8a.cjs");
|
|
25
25
|
const require_measureFns = require("./measureFns-CRS3U8gj.cjs");
|
|
26
|
-
const require_cornerFinder = require("./cornerFinder-
|
|
27
|
-
const require_boolean2D = require("./boolean2D-
|
|
28
|
-
const require_blueprintFns = require("./blueprintFns-
|
|
29
|
-
const require_importFns = require("./importFns-
|
|
26
|
+
const require_cornerFinder = require("./cornerFinder-CxqA_AYe.cjs");
|
|
27
|
+
const require_boolean2D = require("./boolean2D-BGK18W_l.cjs");
|
|
28
|
+
const require_blueprintFns = require("./blueprintFns-dPHJgrqC.cjs");
|
|
29
|
+
const require_importFns = require("./importFns-CXH2OmJ6.cjs");
|
|
30
30
|
const require_extrudeFns = require("./extrudeFns-b7JHaMsv.cjs");
|
|
31
31
|
const require_cameraFns = require("./cameraFns-G2lc5c9M.cjs");
|
|
32
|
-
const require_textMetrics = require("./textMetrics-
|
|
32
|
+
const require_textMetrics = require("./textMetrics-Bn5VPcTV.cjs");
|
|
33
33
|
const require_shapeRefFns = require("./shapeRefFns-DoPplxoN.cjs");
|
|
34
34
|
const require_workerHandler = require("./workerHandler-CdlOTwJg.cjs");
|
|
35
35
|
//#region src/topology/shapeBooleans.ts
|
|
@@ -2492,6 +2492,12 @@ function extractEntity(mate) {
|
|
|
2492
2492
|
origin: require_curveFns.curveStartPoint(mate.edge),
|
|
2493
2493
|
direction: require_curveFns.curveTangentAt(mate.edge)
|
|
2494
2494
|
};
|
|
2495
|
+
const axis = require_curveFns.curveAxis(mate.edge);
|
|
2496
|
+
if (axis) return {
|
|
2497
|
+
type: "axis",
|
|
2498
|
+
origin: axis.origin,
|
|
2499
|
+
direction: axis.direction
|
|
2500
|
+
};
|
|
2495
2501
|
return null;
|
|
2496
2502
|
}
|
|
2497
2503
|
if (mate.point) return {
|
|
@@ -6704,6 +6710,7 @@ exports.curve2dLastPoint = require_blueprintFns.curve2dLastPoint;
|
|
|
6704
6710
|
exports.curve2dParameter = require_blueprintFns.curve2dParameter;
|
|
6705
6711
|
exports.curve2dSplitAt = require_blueprintFns.curve2dSplitAt;
|
|
6706
6712
|
exports.curve2dTangentAt = require_blueprintFns.curve2dTangentAt;
|
|
6713
|
+
exports.curveAxis = require_curveFns.curveAxis;
|
|
6707
6714
|
exports.curveEndPoint = require_curveFns.curveEndPoint;
|
|
6708
6715
|
exports.curveIsClosed = require_curveFns.curveIsClosed;
|
|
6709
6716
|
exports.curveIsPeriodic = require_curveFns.curveIsPeriodic;
|
package/dist/brepjs.js
CHANGED
|
@@ -9,26 +9,26 @@ import { a as vecDot, c as vecLength, d as vecNormalize, f as vecProjectToPlane,
|
|
|
9
9
|
import { i as pivotPlane, n as createPlane, o as resolvePlane, r as makePlane, s as translatePlane, t as createNamedPlane } from "./planeOps-DSjjtrjg.js";
|
|
10
10
|
import { S as shapeType, _ as cast, a as faceOrientation, b as isCompSolid, c as innerWires, d as pointOnSurface, f as projectPointOnFace, g as asTopo, h as uvCoordinates, i as faceGeomType, l as normalAt, m as uvBounds, n as faceAxis, o as flipFaceOrientation, p as removeHolesFromFace, r as faceCenter, s as getSurfaceType, t as classifyPointOnFace, u as outerWire, v as downcast, x as iterTopo, y as fromBREP } from "./faceFns-BJ0mbRh5.js";
|
|
11
11
|
import { C as findFacesByTag, D as tagFaces, E as setTagMetadata, O as getFaceOrigins, S as getShapeColor, T as getTagMetadata, a as isSameShape, b as colorShape, c as applyMatrix$1, d as resize, f as rotate$2, h as translate$2, i as isEqualShape, k as setShapeOrigin, l as composeTransforms, m as transformCopy$1, n as getHashCode, o as simplify$1, p as scale$3, r as isEmpty$2, s as toBREP$1, t as clone$1, u as mirror$2, w as getFaceTags, x as getFaceColor, y as colorFaces } from "./shapeFns-CQRGTifg.js";
|
|
12
|
-
import { a as
|
|
12
|
+
import { a as curveIsPeriodic, c as curvePointAt, d as flipOrientation, f as getCurveType, h as offsetWire2D, i as curveIsClosed, l as curveStartPoint, m as interpolateCurve, n as curveAxis, o as curveLength, p as getOrientation, r as curveEndPoint, s as curvePeriod, t as approximateCurve, u as curveTangentAt } from "./curveFns-CwOY58kC.js";
|
|
13
13
|
import { a as meshEdges$1, c as createMeshCache, i as mesh$1, n as exportSTEP, o as meshMultiLOD, r as exportSTL, s as clearMeshCache, t as exportIGES } from "./meshFns-CLQL2D95.js";
|
|
14
14
|
import { n as getAtOrThrow, r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
15
15
|
import { _ as makeThreePointArc, d as makeCircle, h as makeLine, l as makeBSplineInterpolation, n as fill, r as makeFace, s as assembleWire } from "./surfaceBuilders-DllH3kXs.js";
|
|
16
16
|
import { a as fuseAll, c as sectionToFace$1, i as fuse$2, l as slice$1, n as cut$2, o as intersect$2, r as cutAll, s as section$1, t as booleanPipeline, u as split$1 } from "./booleanFns-Cu-J1THp.js";
|
|
17
17
|
import { $ as fuseAllBisect, A as fixShape, B as offset$1, C as threePointArc, D as wireLoop, E as wire, F as isValid$1, G as chamferWithEvolution, H as thicken$1, I as solidFromShell, J as fuseWithEvolution, K as cutWithEvolution, L as chamfer$1, M as healFace, N as healSolid, O as autoHeal, P as healWire, Q as cutAllBisect, R as draft$1, S as tangentArc, T as vertex, U as variableFillet, V as shell$1, W as positionOnCurve, X as shellWithEvolution, Y as intersectWithEvolution, Z as checkBoolean, _ as polygon, a as circle, at as sharedEdges, b as sphere$1, c as cylinder, ct as chamferDistAngle, d as ellipsoid, dt as toLODGeometryData, et as getNurbsCurveData, f as face, ft as toLineGeometryData, g as offsetFace, h as line, i as bsplineApprox, it as facesOfEdge, j as heal$1, k as fixSelfIntersection, l as ellipse, lt as toBufferGeometryData, m as helix, n as bezier, nt as adjacentFaces, o as compound, ot as verticesOfEdge, p as filledFace, q as filletWithEvolution, r as box, rt as edgesOfFace, s as cone, st as wiresOfFace, t as addHoles, tt as getNurbsSurfaceData, u as ellipseArc, ut as toGroupedBufferGeometryData, v as sewShells, w as torus$1, x as subFace, y as solid, z as fillet$1 } from "./primitiveFns-B6Q6lx9-.js";
|
|
18
18
|
import { C as walkAssembly, D as exportAssemblySTEP, E as linearPattern, O as createAssembly, S as updateNode, _ as collectShapes, a as findStep, b as findNode, c as registerOperation, d as replayHistory, f as serializeHistory, g as addChild, h as undoLast, i as deserializeHistory, l as registerShape, m as stepsFrom, n as createHistory, o as getShape, p as stepCount, r as createRegistry, s as modifyStep, t as addStep, u as replayFrom, v as countNodes, w as circularPattern, x as removeChild, y as createAssemblyNode } from "./historyFns-BV5sQxft.js";
|
|
19
|
-
import { n as BaseSketcher2d, r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-
|
|
20
|
-
import { a as createTypedFinder, i as wireFinder, n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-
|
|
21
|
-
import { A as sketchEllipse, D as makeBaseBox, E as deserializeDrawing, F as sketchRectangle, I as sketchRoundedRectangle, L as FaceSketcher, M as sketchHelix, N as sketchParametricFunction, O as polysideInnerRadius, P as sketchPolysides, R as Sketcher, S as drawText, _ as drawPolysides, a as drawingIntersect, b as drawSingleCircle, c as rotateDrawing, d as drawFaceOutline, f as drawProjection, g as drawPointsInterpolation, h as drawParametricFunction, i as drawingFuse, j as sketchFaceOffset, k as sketchCircle, l as scaleDrawing, m as drawEllipse, n as drawingCut, o as drawingToSketchOnPlane, p as drawCircle, r as drawingFillet, s as mirrorDrawing, t as drawingChamfer, u as translateDrawing, v as drawRectangle, w as draw, x as drawSingleEllipse, y as drawRoundedRectangle } from "./drawFns-
|
|
19
|
+
import { n as BaseSketcher2d, r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-IY1gJ613.js";
|
|
20
|
+
import { a as createTypedFinder, i as wireFinder, n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-DsaGpuUh.js";
|
|
21
|
+
import { A as sketchEllipse, D as makeBaseBox, E as deserializeDrawing, F as sketchRectangle, I as sketchRoundedRectangle, L as FaceSketcher, M as sketchHelix, N as sketchParametricFunction, O as polysideInnerRadius, P as sketchPolysides, R as Sketcher, S as drawText, _ as drawPolysides, a as drawingIntersect, b as drawSingleCircle, c as rotateDrawing, d as drawFaceOutline, f as drawProjection, g as drawPointsInterpolation, h as drawParametricFunction, i as drawingFuse, j as sketchFaceOffset, k as sketchCircle, l as scaleDrawing, m as drawEllipse, n as drawingCut, o as drawingToSketchOnPlane, p as drawCircle, r as drawingFillet, s as mirrorDrawing, t as drawingChamfer, u as translateDrawing, v as drawRectangle, w as draw, x as drawSingleEllipse, y as drawRoundedRectangle } from "./drawFns-CcR9_01X.js";
|
|
22
22
|
import { r as makeCylinder } from "./solidBuilders-DBsHetmI.js";
|
|
23
23
|
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-DYeTPyHr.js";
|
|
24
|
-
import { t as cornerFinder } from "./cornerFinder-
|
|
25
|
-
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-
|
|
26
|
-
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-
|
|
27
|
-
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-
|
|
24
|
+
import { t as cornerFinder } from "./cornerFinder-DamaTij5.js";
|
|
25
|
+
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-DUDg_dMv.js";
|
|
26
|
+
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-qaEV4X2R.js";
|
|
27
|
+
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-B02-HKco.js";
|
|
28
28
|
import { a as guidedSweep, c as sweep$1, i as complexExtrude, l as twistExtrude, n as extrudeAll, o as multiSectionSweep, r as revolve$1, s as supportExtrude, t as extrude$1 } from "./extrudeFns-msxcCUm2.js";
|
|
29
|
-
import { a as Sketch, b as loftAll, c as compoundSketchLoft, d as sketchFace, f as sketchLoft, h as sketchWires, i as Sketches, l as compoundSketchRevolve, m as sketchSweep, n as getFont, o as compoundSketchExtrude, p as sketchRevolve, r as loadFont, s as compoundSketchFace, t as textBlueprints, u as sketchExtrude, v as CompoundSketch, y as loft$1 } from "./textBlueprints-
|
|
29
|
+
import { a as Sketch, b as loftAll, c as compoundSketchLoft, d as sketchFace, f as sketchLoft, h as sketchWires, i as Sketches, l as compoundSketchRevolve, m as sketchSweep, n as getFont, o as compoundSketchExtrude, p as sketchRevolve, r as loadFont, s as compoundSketchFace, t as textBlueprints, u as sketchExtrude, v as CompoundSketch, y as loft$1 } from "./textBlueprints-C_ThSDVg.js";
|
|
30
30
|
import { a as makeProjectedEdges, i as projectEdges, n as cameraLookAt, r as createCamera, s as isProjectionPlane, t as cameraFromPlane } from "./cameraFns-Ctxe8ev-.js";
|
|
31
|
-
import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-
|
|
31
|
+
import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-CxdhimFF.js";
|
|
32
32
|
import { a as updateRoles, i as resolveRef, n as captureHint, o as defaultScorer, r as createRef, t as assignRoles } from "./shapeRefFns-DvIvS0do.js";
|
|
33
33
|
import { a as createTaskQueue, c as isEmpty$1, d as isDisposeRequest, f as isErrorResponse, h as isSuccessResponse, i as createWorkerClient, l as pendingCount, m as isOperationRequest, n as createWorkerHandler, o as dequeueTask, p as isInitRequest, r as registerHandler, s as enqueueTask, t as createOperationRegistry, u as rejectAll } from "./workerHandler-CFetYgIm.js";
|
|
34
34
|
//#region \0rolldown/runtime.js
|
|
@@ -2503,6 +2503,12 @@ function extractEntity(mate) {
|
|
|
2503
2503
|
origin: curveStartPoint(mate.edge),
|
|
2504
2504
|
direction: curveTangentAt(mate.edge)
|
|
2505
2505
|
};
|
|
2506
|
+
const axis = curveAxis(mate.edge);
|
|
2507
|
+
if (axis) return {
|
|
2508
|
+
type: "axis",
|
|
2509
|
+
origin: axis.origin,
|
|
2510
|
+
direction: axis.direction
|
|
2511
|
+
};
|
|
2506
2512
|
return null;
|
|
2507
2513
|
}
|
|
2508
2514
|
if (mate.point) return {
|
|
@@ -6578,4 +6584,4 @@ var csg_exports = /* @__PURE__ */ __exportAll({
|
|
|
6578
6584
|
withEvaluator: () => withEvaluator
|
|
6579
6585
|
});
|
|
6580
6586
|
//#endregion
|
|
6581
|
-
export { BaseSketcher2d, BlueprintSketcher, BrepBugError, BrepErrorCode, BrepWrapperError, BrepkitAdapter, CompoundSketch, DEFAULT_CAPABILITIES, DEG2RAD, DisposalScope, EXACT_BREP_CAPABILITIES, FaceSketcher, HASH_CODE_MAX, OK, OcctWasmAdapter, RAD2DEG, Sketch, Sketcher, Sketches, addChild, addHoles, addJoint, addMate, addStep, adjacentFaces, all, andThen, applyGlue, applyMatrix, approximateCurve, as2D, as3D, asTopo, assignRoles, autoHeal, bezier, blueprintToDXF, booleanPipeline, booleans_exports as booleans, boss, box, bsplineApprox, bug, cameraFromPlane, cameraLookAt, captureHint, cast, castShape, castShape3D, chamfer, chamferDistAngle as chamferDistAngleShape, chamferWithEvolution, checkAllInterferences, checkBoolean, checkInterference, circle, circularPattern, classifyPointOnFace, clearMeshCache, clone, closedWire, collect, collectShapes, colorFaces, colorShape, complexExtrude, composeTransforms, compound, compoundSketchExtrude, compoundSketchFace, compoundSketchLoft, compoundSketchRevolve, computationError, computeStraightSkeleton, cone, construction_exports as construction, convexHull, cornerFinder, countNodes, createAssembly, createAssemblyNode, createBlueprint, createCamera, createCompound, createCompoundBlueprint, createDistanceQuery, createEdge, createFace, createHandle, createHistory, createKernelHandle, createMeshCache, createNamedPlane, createOperationRegistry, createPlane, createRef, createRegistry, createShell, createSolid, createTaskQueue, createVertex, createWire, createWorkerClient, createWorkerHandler, csg_exports as csg, currentQuality, curve2dBoundingBox, curve2dDistanceFrom, curve2dFirstPoint, curve2dIsOnCurve, curve2dLastPoint, curve2dParameter, curve2dSplitAt, curve2dTangentAt, curveEndPoint, curveIsClosed, curveIsPeriodic, curveLength, curvePeriod, curvePointAt, curveStartPoint, curveTangentAt, cut, cut2D, cutAll, cutAllBisect, cutBlueprints, cutWithEvolution, cylinder, defaultScorer, dequeueTask, describe, deserializeDrawing, deserializeHistory, fromBREP as deserializeShape, downcast, draft, draw, drawCircle, drawEllipse, drawFaceOutline, drawParametricFunction, drawPointsInterpolation, drawPolysides, drawProjection, drawRectangle, drawRoundedRectangle, drawSingleCircle, drawSingleEllipse, drawText, drawingChamfer, drawingCut, drawingFillet, drawingFuse, drawingIntersect, drawingToSketchOnPlane, drill, edgeFinder, edgesOfFace, ellipse, ellipseArc, ellipsoid, enqueueTask, err, exportAssemblySTEP, exportDXF, exportGlb, exportGltf, exportIGES, exportOBJ, exportSTEP, exportSTEPConfigured, exportSTL, exportThreeMF, extrude, extrudeAll, face, faceAxis, faceCenter, faceFinder, faceGeomType, faceOrientation, facesOfEdge, fieldBoolean, fieldContour, fieldOffset, fieldReinit, fieldShell, fill, filledFace, fillet, filletWithEvolution, findFacesByTag, findNode, findStep, fixSelfIntersection, fixShape, flatMap, flatten, flipFaceOrientation, flipOrientation, fontMetrics, forwardKinematics, fromBREP$1 as fromBREP, fromKernelDir, fromKernelPnt, fromKernelVec, fromNullable, fuse, fuse2D, fuseAll, fuseAllBisect, fuseBlueprints, fuseWithEvolution, gearGeometry, getActiveVoxelId, getBounds, getBounds2D, getCompSolids, getCurveType, getDisposalStats, getEdges, getFaceColor, getFaceOrigins, getFaceTags, getFaces, getFont, getHashCode, getShape as getHistoryShape, getKernel, getKernelCapabilities, getKernelTier, getNurbsCurveData, getNurbsSurfaceData, getOrientation, getOrientation2D, getPerformanceStats, getShapeColor, getShapeKind, getShells, getSingleFace, getSolids, getSurfaceType, getTagMetadata, getVertices, getVoxel, getWires, guidedSweep, heal, healFace, healSolid, healWire, helix, hull, importDXF, importGLB, importIGES, importOBJ, importSTEP, importSTL, importSVG, importSVGPathD, importThreeMF, init, initFromManifold, initFromOC, initVoxel, innerWires, interpolateCurve, intersect, intersect2D, intersectBlueprints, intersectWithEvolution, invalidateShapeCache, ioNs_exports as io, ioError, is2D, is3D, isChamferRadius, isClosedWire, isCompSolid, isCompound, isDisposeRequest, isEdge, isEmpty, isEqualShape, isErr, isErrorResponse, isFace, isFilletRadius, isInitRequest, isInside2D, isLive, isManifoldShell, isNumber, isOk, isOperationRequest, isOrientedFace, isPlanarFace, isPlanarWire, isProjectionPlane, isEmpty$1 as isQueueEmpty, isSameShape, isShape1D, isShape3D, isShell, isSolid, isSuccessResponse, isValid, isValidSolid, isVertex, isWire, iterCompSolids, iterEdges, iterFaces, iterShells, iterSolids, iterTopo, iterVertices, iterWires, jointTransform, kernelCall, kernelCallRaw, kernelCallScoped, kernelError, latticeInfill, latticeInfillShape, line, linearPattern, loadFont, loft, loftAll, makeBaseBox, makeExternalGear, makeInternalGear, makePlane, makePlanetaryGear, makeProjectedEdges, manifoldShell, map, mapBoth, mapErr, match, measureArea, measureCurvatureAt, measureCurvatureAtMid, measureDistance, measureDistanceProps, measureLength, measureLinearProps, measureSurfaceProps, measureVolume, measureVolumeProps, measurement_exports as measurement, mechanismDOF, mesh, meshEdges, meshMultiLOD, minkowski, mirror, mirror2D, mirrorDrawing, mirrorJoin, modifiers_exports as modifiers, modifyStep, moduleInitError, multiSectionSweep, normalAt, offset, offsetFace, offsetMesh, offsetShape, offsetWire2D, ok, or, orElse, organiseBlueprints, orientedFace, outerWire, patterns_exports as patterns, pendingCount, pipeline, pivotPlane, planarFace, planarWire, planetPlacements, pocket, pointOnSurface, pointsInside, polygon, polyhedron, polysideInnerRadius, polysidesBlueprint, positionOnCurve, prewarm, primitives_exports as primitives, prismaticJoint, projectEdges, projectPointOnFace, query_exports as query, queryError, rectangularPattern, registerHandler, registerKernel, registerKernelTier, registerOperation, registerShape, registerVoxel, rejectAll, removeChild, removeHolesFromFace, repairMesh, replayFrom, replayHistory, resetDisposalStats, resetPerformanceStats, resize, resolve, resolve3D, resolveDirection, resolvePlane, resolveRef, reverseCurve, revoluteJoint, revolve, roof, rotate, rotate2D, rotateDrawing, roundedRectangleBlueprint, scale, scale2D, scaleDrawing, box$1 as sdfBox, capsule as sdfCapsule, cone$1 as sdfCone, cylinder$1 as sdfCylinder, fieldAxialRamp as sdfFieldAxialRamp, fieldClamp as sdfFieldClamp, fieldConst as sdfFieldConst, fieldFromSdf as sdfFieldFromSdf, fieldRadialRamp as sdfFieldRadialRamp, lattice as sdfLattice, plane as sdfPlane, roundedBox as sdfRoundedBox, sphere as sdfSphere, strutLattice as sdfStrutLattice, sweep as sdfSweep, torus as sdfTorus, section, sectionToFace, serializeHistory, setJointValue, setShapeOrigin, setTagMetadata, sewShells, shape, shapeToMeshInput, shapeType, sharedEdges, shell, shellMesh, shellShape, shellWithEvolution, simplify, sketchCircle, sketchEllipse, sketchExtrude, sketchFace, sketchFaceOffset, sketchHelix, sketchLoft, sketchOnFace2D, sketchOnPlane2D, sketchParametricFunction, sketchPolysides, sketchRectangle, sketchRevolve, sketchRoundedRectangle, sketchSweep, sketchText, sketchWires, sketcherStateError, slice, solid, solidFromShell, solveAssembly, sphere$1 as sphere, split, stepCount, stepsFrom, stretch2D, subFace, supportExtrude, supportsConstraintSketch, supportsProjection, surfaceFromGrid, surfaceFromImage, sweep$1 as sweep, tagFaces, tangentArc, tap, tapErr, textBlueprints, textMetrics, thicken, threePointArc, toBREP, toBufferGeometryData, toGroupedBufferGeometryData, toKernelVec, toLODGeometryData, toLineGeometryData, toSVGPathD, toVec2, toVec3, torus$1 as torus, tpmsLattice, transformCopy, transforms_exports as transforms, translate, translate2D, translateDrawing, translatePlane, tryCatch, tryCatchAsync, twistExtrude, typeCastError, undoLast, unsupportedError, unwrap, unwrapErr, unwrapOr, unwrapOrElse, updateNode, updateRoles, uvBounds, uvCoordinates, validSolid, validatePlanetary, validationError, variableFillet, vecAdd, vecAngle, vecCross, vecDistance, vecDot, vecEquals, vecIsZero, vecLength, vecLengthSq, vecNegate, vecNormalize, vecProjectToPlane, vecRepr, vecRotate, vecScale, vecSub, vertex, vertexFinder, vertexPosition, verticesOfEdge, voxelBoolean, voxelBooleanField, voxelBooleanFieldShapes, voxelBooleanShapes, voxelField, voxelFieldFromShape, walkAssembly, windingNumbers, wire, wireFinder, wireLoop, wiresOfFace, withKernel, withKernelDir, withKernelPnt, withKernelVec, withQuality, withScope, withScopeResult, withScopeResultAsync, withTier, zip as zipResults };
|
|
6587
|
+
export { BaseSketcher2d, BlueprintSketcher, BrepBugError, BrepErrorCode, BrepWrapperError, BrepkitAdapter, CompoundSketch, DEFAULT_CAPABILITIES, DEG2RAD, DisposalScope, EXACT_BREP_CAPABILITIES, FaceSketcher, HASH_CODE_MAX, OK, OcctWasmAdapter, RAD2DEG, Sketch, Sketcher, Sketches, addChild, addHoles, addJoint, addMate, addStep, adjacentFaces, all, andThen, applyGlue, applyMatrix, approximateCurve, as2D, as3D, asTopo, assignRoles, autoHeal, bezier, blueprintToDXF, booleanPipeline, booleans_exports as booleans, boss, box, bsplineApprox, bug, cameraFromPlane, cameraLookAt, captureHint, cast, castShape, castShape3D, chamfer, chamferDistAngle as chamferDistAngleShape, chamferWithEvolution, checkAllInterferences, checkBoolean, checkInterference, circle, circularPattern, classifyPointOnFace, clearMeshCache, clone, closedWire, collect, collectShapes, colorFaces, colorShape, complexExtrude, composeTransforms, compound, compoundSketchExtrude, compoundSketchFace, compoundSketchLoft, compoundSketchRevolve, computationError, computeStraightSkeleton, cone, construction_exports as construction, convexHull, cornerFinder, countNodes, createAssembly, createAssemblyNode, createBlueprint, createCamera, createCompound, createCompoundBlueprint, createDistanceQuery, createEdge, createFace, createHandle, createHistory, createKernelHandle, createMeshCache, createNamedPlane, createOperationRegistry, createPlane, createRef, createRegistry, createShell, createSolid, createTaskQueue, createVertex, createWire, createWorkerClient, createWorkerHandler, csg_exports as csg, currentQuality, curve2dBoundingBox, curve2dDistanceFrom, curve2dFirstPoint, curve2dIsOnCurve, curve2dLastPoint, curve2dParameter, curve2dSplitAt, curve2dTangentAt, curveAxis, curveEndPoint, curveIsClosed, curveIsPeriodic, curveLength, curvePeriod, curvePointAt, curveStartPoint, curveTangentAt, cut, cut2D, cutAll, cutAllBisect, cutBlueprints, cutWithEvolution, cylinder, defaultScorer, dequeueTask, describe, deserializeDrawing, deserializeHistory, fromBREP as deserializeShape, downcast, draft, draw, drawCircle, drawEllipse, drawFaceOutline, drawParametricFunction, drawPointsInterpolation, drawPolysides, drawProjection, drawRectangle, drawRoundedRectangle, drawSingleCircle, drawSingleEllipse, drawText, drawingChamfer, drawingCut, drawingFillet, drawingFuse, drawingIntersect, drawingToSketchOnPlane, drill, edgeFinder, edgesOfFace, ellipse, ellipseArc, ellipsoid, enqueueTask, err, exportAssemblySTEP, exportDXF, exportGlb, exportGltf, exportIGES, exportOBJ, exportSTEP, exportSTEPConfigured, exportSTL, exportThreeMF, extrude, extrudeAll, face, faceAxis, faceCenter, faceFinder, faceGeomType, faceOrientation, facesOfEdge, fieldBoolean, fieldContour, fieldOffset, fieldReinit, fieldShell, fill, filledFace, fillet, filletWithEvolution, findFacesByTag, findNode, findStep, fixSelfIntersection, fixShape, flatMap, flatten, flipFaceOrientation, flipOrientation, fontMetrics, forwardKinematics, fromBREP$1 as fromBREP, fromKernelDir, fromKernelPnt, fromKernelVec, fromNullable, fuse, fuse2D, fuseAll, fuseAllBisect, fuseBlueprints, fuseWithEvolution, gearGeometry, getActiveVoxelId, getBounds, getBounds2D, getCompSolids, getCurveType, getDisposalStats, getEdges, getFaceColor, getFaceOrigins, getFaceTags, getFaces, getFont, getHashCode, getShape as getHistoryShape, getKernel, getKernelCapabilities, getKernelTier, getNurbsCurveData, getNurbsSurfaceData, getOrientation, getOrientation2D, getPerformanceStats, getShapeColor, getShapeKind, getShells, getSingleFace, getSolids, getSurfaceType, getTagMetadata, getVertices, getVoxel, getWires, guidedSweep, heal, healFace, healSolid, healWire, helix, hull, importDXF, importGLB, importIGES, importOBJ, importSTEP, importSTL, importSVG, importSVGPathD, importThreeMF, init, initFromManifold, initFromOC, initVoxel, innerWires, interpolateCurve, intersect, intersect2D, intersectBlueprints, intersectWithEvolution, invalidateShapeCache, ioNs_exports as io, ioError, is2D, is3D, isChamferRadius, isClosedWire, isCompSolid, isCompound, isDisposeRequest, isEdge, isEmpty, isEqualShape, isErr, isErrorResponse, isFace, isFilletRadius, isInitRequest, isInside2D, isLive, isManifoldShell, isNumber, isOk, isOperationRequest, isOrientedFace, isPlanarFace, isPlanarWire, isProjectionPlane, isEmpty$1 as isQueueEmpty, isSameShape, isShape1D, isShape3D, isShell, isSolid, isSuccessResponse, isValid, isValidSolid, isVertex, isWire, iterCompSolids, iterEdges, iterFaces, iterShells, iterSolids, iterTopo, iterVertices, iterWires, jointTransform, kernelCall, kernelCallRaw, kernelCallScoped, kernelError, latticeInfill, latticeInfillShape, line, linearPattern, loadFont, loft, loftAll, makeBaseBox, makeExternalGear, makeInternalGear, makePlane, makePlanetaryGear, makeProjectedEdges, manifoldShell, map, mapBoth, mapErr, match, measureArea, measureCurvatureAt, measureCurvatureAtMid, measureDistance, measureDistanceProps, measureLength, measureLinearProps, measureSurfaceProps, measureVolume, measureVolumeProps, measurement_exports as measurement, mechanismDOF, mesh, meshEdges, meshMultiLOD, minkowski, mirror, mirror2D, mirrorDrawing, mirrorJoin, modifiers_exports as modifiers, modifyStep, moduleInitError, multiSectionSweep, normalAt, offset, offsetFace, offsetMesh, offsetShape, offsetWire2D, ok, or, orElse, organiseBlueprints, orientedFace, outerWire, patterns_exports as patterns, pendingCount, pipeline, pivotPlane, planarFace, planarWire, planetPlacements, pocket, pointOnSurface, pointsInside, polygon, polyhedron, polysideInnerRadius, polysidesBlueprint, positionOnCurve, prewarm, primitives_exports as primitives, prismaticJoint, projectEdges, projectPointOnFace, query_exports as query, queryError, rectangularPattern, registerHandler, registerKernel, registerKernelTier, registerOperation, registerShape, registerVoxel, rejectAll, removeChild, removeHolesFromFace, repairMesh, replayFrom, replayHistory, resetDisposalStats, resetPerformanceStats, resize, resolve, resolve3D, resolveDirection, resolvePlane, resolveRef, reverseCurve, revoluteJoint, revolve, roof, rotate, rotate2D, rotateDrawing, roundedRectangleBlueprint, scale, scale2D, scaleDrawing, box$1 as sdfBox, capsule as sdfCapsule, cone$1 as sdfCone, cylinder$1 as sdfCylinder, fieldAxialRamp as sdfFieldAxialRamp, fieldClamp as sdfFieldClamp, fieldConst as sdfFieldConst, fieldFromSdf as sdfFieldFromSdf, fieldRadialRamp as sdfFieldRadialRamp, lattice as sdfLattice, plane as sdfPlane, roundedBox as sdfRoundedBox, sphere as sdfSphere, strutLattice as sdfStrutLattice, sweep as sdfSweep, torus as sdfTorus, section, sectionToFace, serializeHistory, setJointValue, setShapeOrigin, setTagMetadata, sewShells, shape, shapeToMeshInput, shapeType, sharedEdges, shell, shellMesh, shellShape, shellWithEvolution, simplify, sketchCircle, sketchEllipse, sketchExtrude, sketchFace, sketchFaceOffset, sketchHelix, sketchLoft, sketchOnFace2D, sketchOnPlane2D, sketchParametricFunction, sketchPolysides, sketchRectangle, sketchRevolve, sketchRoundedRectangle, sketchSweep, sketchText, sketchWires, sketcherStateError, slice, solid, solidFromShell, solveAssembly, sphere$1 as sphere, split, stepCount, stepsFrom, stretch2D, subFace, supportExtrude, supportsConstraintSketch, supportsProjection, surfaceFromGrid, surfaceFromImage, sweep$1 as sweep, tagFaces, tangentArc, tap, tapErr, textBlueprints, textMetrics, thicken, threePointArc, toBREP, toBufferGeometryData, toGroupedBufferGeometryData, toKernelVec, toLODGeometryData, toLineGeometryData, toSVGPathD, toVec2, toVec3, torus$1 as torus, tpmsLattice, transformCopy, transforms_exports as transforms, translate, translate2D, translateDrawing, translatePlane, tryCatch, tryCatchAsync, twistExtrude, typeCastError, undoLast, unsupportedError, unwrap, unwrapErr, unwrapOr, unwrapOrElse, updateNode, updateRoles, uvBounds, uvCoordinates, validSolid, validatePlanetary, validationError, variableFillet, vecAdd, vecAngle, vecCross, vecDistance, vecDot, vecEquals, vecIsZero, vecLength, vecLengthSq, vecNegate, vecNormalize, vecProjectToPlane, vecRepr, vecRotate, vecScale, vecSub, vertex, vertexFinder, vertexPosition, verticesOfEdge, voxelBoolean, voxelBooleanField, voxelBooleanFieldShapes, voxelBooleanShapes, voxelField, voxelFieldFromShape, walkAssembly, windingNumbers, wire, wireFinder, wireLoop, wiresOfFace, withKernel, withKernelDir, withKernelPnt, withKernelVec, withQuality, withScope, withScopeResult, withScopeResultAsync, withTier, zip as zipResults };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
2
2
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
3
|
-
const require_helpers = require("./helpers-
|
|
3
|
+
const require_helpers = require("./helpers-90SKWHEY.cjs");
|
|
4
4
|
//#region 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-ITRzCnCp.js";
|
|
2
2
|
import { n as getAtOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
3
|
-
import { _ as samePoint, p as distance2d, u as angle2d } from "./helpers-
|
|
3
|
+
import { _ as samePoint, p as distance2d, u as angle2d } from "./helpers-DsaGpuUh.js";
|
|
4
4
|
//#region src/query/cornerFinder.ts
|
|
5
5
|
var PI_2 = 2 * Math.PI;
|
|
6
6
|
function positiveHalfAngle(angle) {
|
|
@@ -45,6 +45,64 @@ function curveTangentAt(shape, position = .5) {
|
|
|
45
45
|
function curveLength(shape) {
|
|
46
46
|
return require_shapeTypes.getKernel().length(shape.wrapped);
|
|
47
47
|
}
|
|
48
|
+
/**
|
|
49
|
+
* Axis of a circular edge: the circle's center plus the unit normal of its
|
|
50
|
+
* plane. Returns null for non-circular curves.
|
|
51
|
+
*
|
|
52
|
+
* Derived kernel-agnostically from three sampled points (the circumcenter of a
|
|
53
|
+
* triangle determines the unique circle through its vertices), so it works for
|
|
54
|
+
* full circles and arcs alike without an analytic circle accessor.
|
|
55
|
+
*/
|
|
56
|
+
function curveAxis(shape) {
|
|
57
|
+
if (getCurveType(shape) !== "CIRCLE") return null;
|
|
58
|
+
const a = curvePointAt(shape, 0);
|
|
59
|
+
const b = curvePointAt(shape, 1 / 3);
|
|
60
|
+
const c = curvePointAt(shape, 2 / 3);
|
|
61
|
+
const ab = [
|
|
62
|
+
b[0] - a[0],
|
|
63
|
+
b[1] - a[1],
|
|
64
|
+
b[2] - a[2]
|
|
65
|
+
];
|
|
66
|
+
const ac = [
|
|
67
|
+
c[0] - a[0],
|
|
68
|
+
c[1] - a[1],
|
|
69
|
+
c[2] - a[2]
|
|
70
|
+
];
|
|
71
|
+
const m = [
|
|
72
|
+
ab[1] * ac[2] - ab[2] * ac[1],
|
|
73
|
+
ab[2] * ac[0] - ab[0] * ac[2],
|
|
74
|
+
ab[0] * ac[1] - ab[1] * ac[0]
|
|
75
|
+
];
|
|
76
|
+
const mLenSq = m[0] * m[0] + m[1] * m[1] + m[2] * m[2];
|
|
77
|
+
if (mLenSq < 1e-18) return null;
|
|
78
|
+
const abSq = ab[0] * ab[0] + ab[1] * ab[1] + ab[2] * ab[2];
|
|
79
|
+
const acSq = ac[0] * ac[0] + ac[1] * ac[1] + ac[2] * ac[2];
|
|
80
|
+
const d = [
|
|
81
|
+
abSq * ac[0] - acSq * ab[0],
|
|
82
|
+
abSq * ac[1] - acSq * ab[1],
|
|
83
|
+
abSq * ac[2] - acSq * ab[2]
|
|
84
|
+
];
|
|
85
|
+
const dxm = [
|
|
86
|
+
d[1] * m[2] - d[2] * m[1],
|
|
87
|
+
d[2] * m[0] - d[0] * m[2],
|
|
88
|
+
d[0] * m[1] - d[1] * m[0]
|
|
89
|
+
];
|
|
90
|
+
const inv = 1 / (2 * mLenSq);
|
|
91
|
+
const origin = [
|
|
92
|
+
a[0] + dxm[0] * inv,
|
|
93
|
+
a[1] + dxm[1] * inv,
|
|
94
|
+
a[2] + dxm[2] * inv
|
|
95
|
+
];
|
|
96
|
+
const mLen = Math.sqrt(mLenSq);
|
|
97
|
+
return {
|
|
98
|
+
origin,
|
|
99
|
+
direction: [
|
|
100
|
+
m[0] / mLen,
|
|
101
|
+
m[1] / mLen,
|
|
102
|
+
m[2] / mLen
|
|
103
|
+
]
|
|
104
|
+
};
|
|
105
|
+
}
|
|
48
106
|
/** Check if the curve is closed. */
|
|
49
107
|
function curveIsClosed(shape) {
|
|
50
108
|
return require_shapeTypes.getKernel().curveIsClosed(shape.wrapped);
|
|
@@ -127,6 +185,12 @@ Object.defineProperty(exports, "approximateCurve", {
|
|
|
127
185
|
return approximateCurve;
|
|
128
186
|
}
|
|
129
187
|
});
|
|
188
|
+
Object.defineProperty(exports, "curveAxis", {
|
|
189
|
+
enumerable: true,
|
|
190
|
+
get: function() {
|
|
191
|
+
return curveAxis;
|
|
192
|
+
}
|
|
193
|
+
});
|
|
130
194
|
Object.defineProperty(exports, "curveEndPoint", {
|
|
131
195
|
enumerable: true,
|
|
132
196
|
get: function() {
|
|
@@ -45,6 +45,64 @@ function curveTangentAt(shape, position = .5) {
|
|
|
45
45
|
function curveLength(shape) {
|
|
46
46
|
return getKernel().length(shape.wrapped);
|
|
47
47
|
}
|
|
48
|
+
/**
|
|
49
|
+
* Axis of a circular edge: the circle's center plus the unit normal of its
|
|
50
|
+
* plane. Returns null for non-circular curves.
|
|
51
|
+
*
|
|
52
|
+
* Derived kernel-agnostically from three sampled points (the circumcenter of a
|
|
53
|
+
* triangle determines the unique circle through its vertices), so it works for
|
|
54
|
+
* full circles and arcs alike without an analytic circle accessor.
|
|
55
|
+
*/
|
|
56
|
+
function curveAxis(shape) {
|
|
57
|
+
if (getCurveType(shape) !== "CIRCLE") return null;
|
|
58
|
+
const a = curvePointAt(shape, 0);
|
|
59
|
+
const b = curvePointAt(shape, 1 / 3);
|
|
60
|
+
const c = curvePointAt(shape, 2 / 3);
|
|
61
|
+
const ab = [
|
|
62
|
+
b[0] - a[0],
|
|
63
|
+
b[1] - a[1],
|
|
64
|
+
b[2] - a[2]
|
|
65
|
+
];
|
|
66
|
+
const ac = [
|
|
67
|
+
c[0] - a[0],
|
|
68
|
+
c[1] - a[1],
|
|
69
|
+
c[2] - a[2]
|
|
70
|
+
];
|
|
71
|
+
const m = [
|
|
72
|
+
ab[1] * ac[2] - ab[2] * ac[1],
|
|
73
|
+
ab[2] * ac[0] - ab[0] * ac[2],
|
|
74
|
+
ab[0] * ac[1] - ab[1] * ac[0]
|
|
75
|
+
];
|
|
76
|
+
const mLenSq = m[0] * m[0] + m[1] * m[1] + m[2] * m[2];
|
|
77
|
+
if (mLenSq < 1e-18) return null;
|
|
78
|
+
const abSq = ab[0] * ab[0] + ab[1] * ab[1] + ab[2] * ab[2];
|
|
79
|
+
const acSq = ac[0] * ac[0] + ac[1] * ac[1] + ac[2] * ac[2];
|
|
80
|
+
const d = [
|
|
81
|
+
abSq * ac[0] - acSq * ab[0],
|
|
82
|
+
abSq * ac[1] - acSq * ab[1],
|
|
83
|
+
abSq * ac[2] - acSq * ab[2]
|
|
84
|
+
];
|
|
85
|
+
const dxm = [
|
|
86
|
+
d[1] * m[2] - d[2] * m[1],
|
|
87
|
+
d[2] * m[0] - d[0] * m[2],
|
|
88
|
+
d[0] * m[1] - d[1] * m[0]
|
|
89
|
+
];
|
|
90
|
+
const inv = 1 / (2 * mLenSq);
|
|
91
|
+
const origin = [
|
|
92
|
+
a[0] + dxm[0] * inv,
|
|
93
|
+
a[1] + dxm[1] * inv,
|
|
94
|
+
a[2] + dxm[2] * inv
|
|
95
|
+
];
|
|
96
|
+
const mLen = Math.sqrt(mLenSq);
|
|
97
|
+
return {
|
|
98
|
+
origin,
|
|
99
|
+
direction: [
|
|
100
|
+
m[0] / mLen,
|
|
101
|
+
m[1] / mLen,
|
|
102
|
+
m[2] / mLen
|
|
103
|
+
]
|
|
104
|
+
};
|
|
105
|
+
}
|
|
48
106
|
/** Check if the curve is closed. */
|
|
49
107
|
function curveIsClosed(shape) {
|
|
50
108
|
return getKernel().curveIsClosed(shape.wrapped);
|
|
@@ -121,4 +179,4 @@ function offsetWire2D(wire, offset, kind = "arc") {
|
|
|
121
179
|
return ok(wrapped);
|
|
122
180
|
}
|
|
123
181
|
//#endregion
|
|
124
|
-
export {
|
|
182
|
+
export { curveIsPeriodic as a, curvePointAt as c, flipOrientation as d, getCurveType as f, offsetWire2D as h, curveIsClosed as i, curveStartPoint as l, interpolateCurve as m, curveAxis as n, curveLength as o, getOrientation as p, curveEndPoint as r, curvePeriod as s, approximateCurve as t, curveTangentAt as u };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_textBlueprints = require("./textBlueprints-
|
|
1
|
+
const require_textBlueprints = require("./textBlueprints-8lNMcsUv.cjs");
|
|
2
2
|
const require_shapeTypes = require("./shapeTypes-C4cMKLoj.cjs");
|
|
3
3
|
const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
|
|
4
4
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
@@ -8,14 +8,14 @@ const require_types = require("./types-KjA8tY4Y.cjs");
|
|
|
8
8
|
const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
|
|
9
9
|
const require_planeOps = require("./planeOps-BA4HfgQu.cjs");
|
|
10
10
|
const require_faceFns = require("./faceFns-CZvemlPW.cjs");
|
|
11
|
-
const require_curveFns = require("./curveFns-
|
|
11
|
+
const require_curveFns = require("./curveFns-B8UdENpg.cjs");
|
|
12
12
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
13
13
|
const require_surfaceBuilders = require("./surfaceBuilders-QK_Cnn_u.cjs");
|
|
14
|
-
const require_blueprintSketcher = require("./blueprintSketcher-
|
|
15
|
-
const require_helpers = require("./helpers-
|
|
16
|
-
const require_blueprint = require("./blueprint-
|
|
17
|
-
const require_cornerFinder = require("./cornerFinder-
|
|
18
|
-
const require_boolean2D = require("./boolean2D-
|
|
14
|
+
const require_blueprintSketcher = require("./blueprintSketcher-Th4H1tao.cjs");
|
|
15
|
+
const require_helpers = require("./helpers-90SKWHEY.cjs");
|
|
16
|
+
const require_blueprint = require("./blueprint-BHyTsY5E.cjs");
|
|
17
|
+
const require_cornerFinder = require("./cornerFinder-CxqA_AYe.cjs");
|
|
18
|
+
const require_boolean2D = require("./boolean2D-BGK18W_l.cjs");
|
|
19
19
|
const require_cameraFns = require("./cameraFns-G2lc5c9M.cjs");
|
|
20
20
|
//#region src/2d/lib/stitching.ts
|
|
21
21
|
/**
|
|
@@ -7,15 +7,15 @@ import { r as toVec3 } from "./types-D24Y27N0.js";
|
|
|
7
7
|
import { d as vecNormalize, g as vecSub, h as vecScale, m as vecRotate, r as vecCross } from "./vecOps-SKPRvPH-.js";
|
|
8
8
|
import { a as planeToWorld, o as resolvePlane } from "./planeOps-DSjjtrjg.js";
|
|
9
9
|
import { d as pointOnSurface, l as normalAt, m as uvBounds, r as faceCenter, u as outerWire, v as downcast } from "./faceFns-BJ0mbRh5.js";
|
|
10
|
-
import {
|
|
10
|
+
import { h as offsetWire2D, i as curveIsClosed, l as curveStartPoint } from "./curveFns-CwOY58kC.js";
|
|
11
11
|
import { n as getAtOrThrow, r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
12
12
|
import { c as makeBSplineApproximation, d as makeCircle, f as makeEllipse, m as makeHelix, r as makeFace, s as assembleWire } from "./surfaceBuilders-DllH3kXs.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-
|
|
14
|
-
import { _ as samePoint$1, b as subtract2d, c as PRECISION_OFFSET, l as add2d, y as squareDistance2d } from "./helpers-
|
|
15
|
-
import { _ as Curve2D, a as edgeToCurve, c as make2dCircle, d as make2dInerpolatedBSplineCurve, f as make2dSegmentCurve, g as approximateAsSvgCompatibleCurve, i as curvesAsEdgesOnPlane, l as make2dEllipse, o as make2dArcFromCenter, t as Blueprint, v as deserializeCurve2D, y as BoundingBox2d } 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 wrapSketchDataArray, a as Sketch, g as wrapSketchData, i as Sketches, t as textBlueprints } from "./textBlueprints-
|
|
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-IY1gJ613.js";
|
|
14
|
+
import { _ as samePoint$1, b as subtract2d, c as PRECISION_OFFSET, l as add2d, y as squareDistance2d } from "./helpers-DsaGpuUh.js";
|
|
15
|
+
import { _ as Curve2D, a as edgeToCurve, c as make2dCircle, d as make2dInerpolatedBSplineCurve, f as make2dSegmentCurve, g as approximateAsSvgCompatibleCurve, i as curvesAsEdgesOnPlane, l as make2dEllipse, o as make2dArcFromCenter, t as Blueprint, v as deserializeCurve2D, y as BoundingBox2d } from "./blueprint-DuT3LJGx.js";
|
|
16
|
+
import { t as cornerFinder } from "./cornerFinder-DamaTij5.js";
|
|
17
|
+
import { c as roundedRectangleBlueprint, n as fuse2D, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-DUDg_dMv.js";
|
|
18
|
+
import { _ as wrapSketchDataArray, a as Sketch, g as wrapSketchData, i as Sketches, t as textBlueprints } from "./textBlueprints-C_ThSDVg.js";
|
|
19
19
|
import { i as projectEdges, t as cameraFromPlane } from "./cameraFns-Ctxe8ev-.js";
|
|
20
20
|
//#region src/2d/lib/stitching.ts
|
|
21
21
|
/**
|
|
@@ -5,7 +5,7 @@ const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
|
5
5
|
const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
|
|
6
6
|
const require_faceFns = require("./faceFns-CZvemlPW.cjs");
|
|
7
7
|
const require_shapeFns = require("./shapeFns-CQmd2W5F.cjs");
|
|
8
|
-
const require_curveFns = require("./curveFns-
|
|
8
|
+
const require_curveFns = require("./curveFns-B8UdENpg.cjs");
|
|
9
9
|
const require_measureFns = require("./measureFns-CRS3U8gj.cjs");
|
|
10
10
|
//#region src/utils/vec2d.ts
|
|
11
11
|
/** Precision for curve intersection and parameter operations. */
|
|
@@ -5,7 +5,7 @@ import { t as DEG2RAD } from "./constants-ITRzCnCp.js";
|
|
|
5
5
|
import { a as vecDot, d as vecNormalize } from "./vecOps-SKPRvPH-.js";
|
|
6
6
|
import { l as normalAt, s as getSurfaceType } from "./faceFns-BJ0mbRh5.js";
|
|
7
7
|
import { a as isSameShape, n as getHashCode } from "./shapeFns-CQRGTifg.js";
|
|
8
|
-
import {
|
|
8
|
+
import { f as getCurveType, i as curveIsClosed, o as curveLength } from "./curveFns-CwOY58kC.js";
|
|
9
9
|
import { n as measureArea } from "./measureFns-DYeTPyHr.js";
|
|
10
10
|
//#region src/utils/vec2d.ts
|
|
11
11
|
/** Precision for curve intersection and parameter operations. */
|
|
@@ -2,7 +2,7 @@ import { Z as getKernel, t as castShape } from "./shapeTypes-VCBsDI43.js";
|
|
|
2
2
|
import { n as wasmIndex, t as vec3At$1 } from "./vec3-Dpha8d5k.js";
|
|
3
3
|
import { A as ok, b as err, r as ioError, t as BrepErrorCode } from "./errors-DNWJsfVU.js";
|
|
4
4
|
import { n as getAtOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
5
|
-
import { f as make2dSegmentCurve, m as make2dThreePointArc, s as make2dBezierCurve, t as Blueprint } from "./blueprint-
|
|
5
|
+
import { f as make2dSegmentCurve, m as make2dThreePointArc, s as make2dBezierCurve, t as Blueprint } from "./blueprint-DuT3LJGx.js";
|
|
6
6
|
//#region 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-C4cMKLoj.cjs");
|
|
|
2
2
|
const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
|
|
3
3
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
4
4
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
5
|
-
const require_blueprint = require("./blueprint-
|
|
5
|
+
const require_blueprint = require("./blueprint-BHyTsY5E.cjs");
|
|
6
6
|
//#region 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/index.d.ts
CHANGED
|
@@ -88,7 +88,7 @@ export { colorFaces, colorShape, getFaceColor, getShapeColor, } from './topology
|
|
|
88
88
|
export type { Color, ColorInput } from './topology/metadata/colorFns.js';
|
|
89
89
|
export { chamferDistAngle as chamferDistAngleShape } from './topology/chamferAngleFns.js';
|
|
90
90
|
export { facesOfEdge, edgesOfFace, wiresOfFace, verticesOfEdge, adjacentFaces, sharedEdges, } from './topology/adjacencyFns.js';
|
|
91
|
-
export { getCurveType, curveStartPoint, curveEndPoint, curvePointAt, curveTangentAt, curveLength, curveIsClosed, curveIsPeriodic, curvePeriod, getOrientation, flipOrientation, offsetWire2D, interpolateCurve, approximateCurve, type InterpolateCurveOptions, type ApproximateCurveOptions, } from './topology/curveFns.js';
|
|
91
|
+
export { getCurveType, curveStartPoint, curveEndPoint, curvePointAt, curveTangentAt, curveAxis, curveLength, curveIsClosed, curveIsPeriodic, curvePeriod, getOrientation, flipOrientation, offsetWire2D, interpolateCurve, approximateCurve, type InterpolateCurveOptions, type ApproximateCurveOptions, } from './topology/curveFns.js';
|
|
92
92
|
export { getNurbsCurveData, getNurbsSurfaceData } from './topology/nurbsFns.js';
|
|
93
93
|
export type { NurbsCurveData, NurbsSurfaceData } from './kernel/types.js';
|
|
94
94
|
export { getSurfaceType, faceGeomType, faceOrientation, flipFaceOrientation, uvBounds, pointOnSurface, uvCoordinates, normalAt, faceCenter, faceAxis, classifyPointOnFace, outerWire, innerWires, removeHolesFromFace, projectPointOnFace, type UVBounds, type PointProjectionResult, } from './topology/faceFns.js';
|
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-CvmTzMPL.cjs");
|
|
3
|
-
const require_importFns = require("./importFns-
|
|
3
|
+
const require_importFns = require("./importFns-CXH2OmJ6.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-CLQL2D95.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-B02-HKco.js";
|
|
3
3
|
export { blueprintToDXF, exportDXF, exportGlb, exportGltf, exportIGES, exportOBJ, exportSTEP, exportSTEPConfigured, exportSTL, exportThreeMF, importIGES, importSTEP, importSTL, importSVG, importSVGPathD };
|
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-90SKWHEY.cjs");
|
|
3
|
+
const require_cornerFinder = require("./cornerFinder-CxqA_AYe.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-DsaGpuUh.js";
|
|
2
|
+
import { t as cornerFinder } from "./cornerFinder-DamaTij5.js";
|
|
3
3
|
export { cornerFinder, edgeFinder, faceFinder, getSingleFace };
|
package/dist/sketching.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_textBlueprints = require("./textBlueprints-
|
|
3
|
-
const require_blueprintSketcher = require("./blueprintSketcher-
|
|
4
|
-
const require_drawFns = require("./drawFns-
|
|
2
|
+
const require_textBlueprints = require("./textBlueprints-8lNMcsUv.cjs");
|
|
3
|
+
const require_blueprintSketcher = require("./blueprintSketcher-Th4H1tao.cjs");
|
|
4
|
+
const require_drawFns = require("./drawFns-BwfhGs8Z.cjs");
|
|
5
5
|
//#region src/sketching.ts
|
|
6
6
|
/**
|
|
7
7
|
* brepjs/sketching — Sketcher, Drawing, and sketch-to-shape operations.
|
package/dist/sketching.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as BaseSketcher2d, t as BlueprintSketcher } from "./blueprintSketcher-
|
|
2
|
-
import { A as sketchEllipse, C as DrawingPen, D as makeBaseBox, E as deserializeDrawing, F as sketchRectangle, I as sketchRoundedRectangle, L as FaceSketcher, M as sketchHelix, N as sketchParametricFunction, O as polysideInnerRadius, P as sketchPolysides, R as Sketcher, S as drawText, T as Drawing, _ as drawPolysides, a as drawingIntersect, b as drawSingleCircle, c as rotateDrawing, d as drawFaceOutline, f as drawProjection, g as drawPointsInterpolation, h as drawParametricFunction, i as drawingFuse, j as sketchFaceOffset, k as sketchCircle, l as scaleDrawing, m as drawEllipse, n as drawingCut, o as drawingToSketchOnPlane, p as drawCircle, r as drawingFillet, s as mirrorDrawing, t as drawingChamfer, u as translateDrawing, v as drawRectangle, w as draw, x as drawSingleEllipse, y as drawRoundedRectangle } from "./drawFns-
|
|
3
|
-
import { a as Sketch, c as compoundSketchLoft, d as sketchFace, f as sketchLoft, h as sketchWires, i as Sketches, l as compoundSketchRevolve, m as sketchSweep, o as compoundSketchExtrude, p as sketchRevolve, s as compoundSketchFace, u as sketchExtrude, v as CompoundSketch } from "./textBlueprints-
|
|
1
|
+
import { n as BaseSketcher2d, t as BlueprintSketcher } from "./blueprintSketcher-IY1gJ613.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-CcR9_01X.js";
|
|
3
|
+
import { a as Sketch, c as compoundSketchLoft, d as sketchFace, f as sketchLoft, h as sketchWires, i as Sketches, l as compoundSketchRevolve, m as sketchSweep, o as compoundSketchExtrude, p as sketchRevolve, s as compoundSketchFace, u as sketchExtrude, v as CompoundSketch } from "./textBlueprints-C_ThSDVg.js";
|
|
4
4
|
//#region src/sketching.ts
|
|
5
5
|
/**
|
|
6
6
|
* brepjs/sketching — Sketcher, Drawing, and sketch-to-shape operations.
|
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-8lNMcsUv.cjs");
|
|
3
|
+
const require_textMetrics = require("./textMetrics-Bn5VPcTV.cjs");
|
|
4
4
|
exports.fontMetrics = require_textMetrics.fontMetrics;
|
|
5
5
|
exports.getFont = require_textBlueprints.getFont;
|
|
6
6
|
exports.loadFont = require_textBlueprints.loadFont;
|
package/dist/text.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as getFont, r as loadFont, t as textBlueprints } from "./textBlueprints-
|
|
2
|
-
import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-
|
|
1
|
+
import { n as getFont, r as loadFont, t as textBlueprints } from "./textBlueprints-C_ThSDVg.js";
|
|
2
|
+
import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-CxdhimFF.js";
|
|
3
3
|
export { fontMetrics, getFont, loadFont, sketchText, textBlueprints, textMetrics };
|
|
@@ -35,10 +35,10 @@ const require_types = require("./types-KjA8tY4Y.cjs");
|
|
|
35
35
|
const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
|
|
36
36
|
const require_planeOps = require("./planeOps-BA4HfgQu.cjs");
|
|
37
37
|
const require_faceFns = require("./faceFns-CZvemlPW.cjs");
|
|
38
|
-
const require_curveFns = require("./curveFns-
|
|
38
|
+
const require_curveFns = require("./curveFns-B8UdENpg.cjs");
|
|
39
39
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
40
40
|
const require_surfaceBuilders = require("./surfaceBuilders-QK_Cnn_u.cjs");
|
|
41
|
-
const require_blueprintSketcher = require("./blueprintSketcher-
|
|
41
|
+
const require_blueprintSketcher = require("./blueprintSketcher-Th4H1tao.cjs");
|
|
42
42
|
const require_solidBuilders = require("./solidBuilders-B0Hzin8a.cjs");
|
|
43
43
|
const require_extrudeFns = require("./extrudeFns-b7JHaMsv.cjs");
|
|
44
44
|
let opentype_js = require("opentype.js");
|
|
@@ -4,10 +4,10 @@ import { r as toVec3 } from "./types-D24Y27N0.js";
|
|
|
4
4
|
import { d as vecNormalize, h as vecScale, r as vecCross } from "./vecOps-SKPRvPH-.js";
|
|
5
5
|
import { n as createPlane } from "./planeOps-DSjjtrjg.js";
|
|
6
6
|
import { _ as cast, v as downcast } from "./faceFns-BJ0mbRh5.js";
|
|
7
|
-
import {
|
|
7
|
+
import { l as curveStartPoint, u as curveTangentAt } from "./curveFns-CwOY58kC.js";
|
|
8
8
|
import { n as getAtOrThrow, t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
9
9
|
import { i as makeNewFaceWithinFace, r as makeFace, t as addHolesInFace } from "./surfaceBuilders-DllH3kXs.js";
|
|
10
|
-
import { r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-
|
|
10
|
+
import { r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-IY1gJ613.js";
|
|
11
11
|
import { o as makeSolid, t as makeCompound } from "./solidBuilders-DBsHetmI.js";
|
|
12
12
|
import { c as sweep, i as complexExtrude, l as twistExtrude, r as revolve, t as extrude } from "./extrudeFns-msxcCUm2.js";
|
|
13
13
|
import opentype from "opentype.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { A as ok, b as err, d as validationError, t as BrepErrorCode } from "./errors-DNWJsfVU.js";
|
|
2
|
-
import { g as wrapSketchData, i as Sketches, n as getFont, t as textBlueprints, v as CompoundSketch } from "./textBlueprints-
|
|
2
|
+
import { g as wrapSketchData, i as Sketches, n as getFont, t as textBlueprints, v as CompoundSketch } from "./textBlueprints-C_ThSDVg.js";
|
|
3
3
|
//#region src/text/sketchText.ts
|
|
4
4
|
/**
|
|
5
5
|
* Render text as 3D sketch outlines on a plane.
|
|
@@ -24,6 +24,18 @@ export declare function curvePointAt(shape: Edge<Dimension> | Wire<Dimension>, p
|
|
|
24
24
|
export declare function curveTangentAt(shape: Edge<Dimension> | Wire<Dimension>, position?: number): Vec3;
|
|
25
25
|
/** Get the arc length of an edge or wire. */
|
|
26
26
|
export declare function curveLength(shape: Edge<Dimension> | Wire<Dimension>): number;
|
|
27
|
+
/**
|
|
28
|
+
* Axis of a circular edge: the circle's center plus the unit normal of its
|
|
29
|
+
* plane. Returns null for non-circular curves.
|
|
30
|
+
*
|
|
31
|
+
* Derived kernel-agnostically from three sampled points (the circumcenter of a
|
|
32
|
+
* triangle determines the unique circle through its vertices), so it works for
|
|
33
|
+
* full circles and arcs alike without an analytic circle accessor.
|
|
34
|
+
*/
|
|
35
|
+
export declare function curveAxis(shape: Edge<Dimension> | Wire<Dimension>): {
|
|
36
|
+
origin: Vec3;
|
|
37
|
+
direction: Vec3;
|
|
38
|
+
} | null;
|
|
27
39
|
/** Check if the curve is closed. */
|
|
28
40
|
export declare function curveIsClosed(shape: Edge<Dimension> | Wire<Dimension>): boolean;
|
|
29
41
|
/** Check if the curve is periodic. */
|
package/dist/topology/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export { applyGlue } from './shapeBooleans.js';
|
|
|
6
6
|
export { isNumber, isChamferRadius, isFilletRadius, type ChamferRadius, type FilletRadius, type RadiusOptions, } from './shapeModifiers.js';
|
|
7
7
|
export type { CurveType } from '../core/typeDiscriminants.js';
|
|
8
8
|
export { getHashCode, isSameShape, isEqualShape, getEdges, getFaces, getWires, iterEdges, iterFaces, iterWires, getBounds, vertexPosition, type Bounds3D, } from './shapeFns.js';
|
|
9
|
-
export { getCurveType, curveStartPoint, curveEndPoint, curvePointAt, curveTangentAt, curveLength, curveIsClosed, curveIsPeriodic, curvePeriod, getOrientation, flipOrientation, offsetWire2D, } from './curveFns.js';
|
|
9
|
+
export { getCurveType, curveStartPoint, curveEndPoint, curvePointAt, curveTangentAt, curveAxis, curveLength, curveIsClosed, curveIsPeriodic, curvePeriod, getOrientation, flipOrientation, offsetWire2D, } from './curveFns.js';
|
|
10
10
|
export { getSurfaceType, faceGeomType, faceOrientation, flipFaceOrientation, uvBounds, pointOnSurface, uvCoordinates, normalAt, faceCenter, faceAxis, outerWire, innerWires, type UVBounds, } from './faceFns.js';
|
|
11
11
|
export { exportSTEP, exportSTL, type EdgeMesh, type MeshOptions } from './meshFns.js';
|
|
12
12
|
export { fuseAll, cutAll, type BooleanOptions } from './booleanFns.js';
|
package/dist/topology.cjs
CHANGED
|
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
2
2
|
const require_topologyQueryFns = require("./topologyQueryFns-Bj5wpC75.cjs");
|
|
3
3
|
const require_faceFns = require("./faceFns-CZvemlPW.cjs");
|
|
4
4
|
const require_shapeFns = require("./shapeFns-CQmd2W5F.cjs");
|
|
5
|
-
const require_curveFns = require("./curveFns-
|
|
5
|
+
const require_curveFns = require("./curveFns-B8UdENpg.cjs");
|
|
6
6
|
const require_meshFns = require("./meshFns-CvmTzMPL.cjs");
|
|
7
7
|
const require_booleanFns = require("./booleanFns-DxnTjP19.cjs");
|
|
8
8
|
const require_primitiveFns = require("./primitiveFns-FudrSXrp.cjs");
|
|
@@ -24,6 +24,7 @@ exports.clearMeshCache = require_meshFns.clearMeshCache;
|
|
|
24
24
|
exports.compound = require_primitiveFns.compound;
|
|
25
25
|
exports.cone = require_primitiveFns.cone;
|
|
26
26
|
exports.createMeshCache = require_meshFns.createMeshCache;
|
|
27
|
+
exports.curveAxis = require_curveFns.curveAxis;
|
|
27
28
|
exports.curveEndPoint = require_curveFns.curveEndPoint;
|
|
28
29
|
exports.curveIsClosed = require_curveFns.curveIsClosed;
|
|
29
30
|
exports.curveIsPeriodic = require_curveFns.curveIsPeriodic;
|
package/dist/topology.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export { fuseWithEvolution, cutWithEvolution, intersectWithEvolution, filletWith
|
|
|
15
15
|
export type { ShapeEvolution } from './kernel/types.js';
|
|
16
16
|
export { chamferDistAngle as chamferDistAngleShape } from './topology/chamferAngleFns.js';
|
|
17
17
|
export { variableFillet, type VariableFilletRadius } from './topology/modifierFns.js';
|
|
18
|
-
export { getCurveType, curveStartPoint, curveEndPoint, curvePointAt, curveTangentAt, curveLength, curveIsClosed, curveIsPeriodic, curvePeriod, getOrientation, flipOrientation, offsetWire2D, interpolateCurve, approximateCurve, type InterpolateCurveOptions, type ApproximateCurveOptions, } from './topology/curveFns.js';
|
|
18
|
+
export { getCurveType, curveStartPoint, curveEndPoint, curvePointAt, curveTangentAt, curveAxis, curveLength, curveIsClosed, curveIsPeriodic, curvePeriod, getOrientation, flipOrientation, offsetWire2D, interpolateCurve, approximateCurve, type InterpolateCurveOptions, type ApproximateCurveOptions, } from './topology/curveFns.js';
|
|
19
19
|
export { getNurbsCurveData, getNurbsSurfaceData } from './topology/nurbsFns.js';
|
|
20
20
|
export { getSurfaceType, faceGeomType, faceOrientation, flipFaceOrientation, uvBounds, pointOnSurface, uvCoordinates, normalAt, faceCenter, faceAxis, classifyPointOnFace, outerWire, innerWires, projectPointOnFace, type UVBounds, type PointProjectionResult, } from './topology/faceFns.js';
|
|
21
21
|
export { facesOfEdge, edgesOfFace, wiresOfFace, verticesOfEdge, adjacentFaces, sharedEdges, } from './topology/adjacencyFns.js';
|
package/dist/topology.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { S as vertexPosition, _ as iterFaces, b as iterVertices, c as getFaces, f as getVertices, g as iterEdges, m as invalidateShapeCache, n as getBounds, p as getWires, s as getEdges, x as iterWires } from "./topologyQueryFns-BtfhAVY2.js";
|
|
2
2
|
import { S as shapeType, _ as cast, a as faceOrientation, b as isCompSolid, c as innerWires, d as pointOnSurface, f as projectPointOnFace, g as asTopo, h as uvCoordinates, i as faceGeomType, l as normalAt, m as uvBounds, n as faceAxis, o as flipFaceOrientation, r as faceCenter, s as getSurfaceType, t as classifyPointOnFace, u as outerWire, v as downcast, x as iterTopo, y as fromBREP } from "./faceFns-BJ0mbRh5.js";
|
|
3
3
|
import { a as isSameShape, i as isEqualShape, n as getHashCode } from "./shapeFns-CQRGTifg.js";
|
|
4
|
-
import { a as
|
|
4
|
+
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-CwOY58kC.js";
|
|
5
5
|
import { c as createMeshCache, n as exportSTEP, r as exportSTL, s as clearMeshCache, t as exportIGES } from "./meshFns-CLQL2D95.js";
|
|
6
6
|
import { a as fuseAll, r as cutAll } from "./booleanFns-Cu-J1THp.js";
|
|
7
7
|
import { $ as fuseAllBisect, A as fixShape, C as threePointArc, D as wireLoop, E as wire, G as chamferWithEvolution, I as solidFromShell, J as fuseWithEvolution, K as cutWithEvolution, M as healFace, N as healSolid, O as autoHeal, P as healWire, Q as cutAllBisect, S as tangentArc, T as vertex, U as variableFillet, W as positionOnCurve, X as shellWithEvolution, Y as intersectWithEvolution, Z as checkBoolean, _ as polygon, a as circle, at as sharedEdges, b as sphere, c as cylinder, ct as chamferDistAngle, d as ellipsoid, et as getNurbsCurveData, f as face, ft as toLineGeometryData, g as offsetFace, h as line, i as bsplineApprox, it as facesOfEdge, k as fixSelfIntersection, l as ellipse, lt as toBufferGeometryData, m as helix, n as bezier, nt as adjacentFaces, o as compound, ot as verticesOfEdge, p as filledFace, q as filletWithEvolution, r as box, rt as edgesOfFace, s as cone, st as wiresOfFace, t as addHoles, tt as getNurbsSurfaceData, u as ellipseArc, ut as toGroupedBufferGeometryData, v as sewShells, w as torus, x as subFace, y as solid } from "./primitiveFns-B6Q6lx9-.js";
|
|
8
|
-
export { addHoles, adjacentFaces, approximateCurve, asTopo, autoHeal, bezier, box, bsplineApprox, cast, chamferDistAngle as chamferDistAngleShape, chamferWithEvolution, checkBoolean, circle, classifyPointOnFace, clearMeshCache, compound, cone, createMeshCache, curveEndPoint, curveIsClosed, curveIsPeriodic, curveLength, curvePeriod, curvePointAt, curveStartPoint, curveTangentAt, cutAll, cutAllBisect, cutWithEvolution, cylinder, fromBREP as deserializeShape, downcast, edgesOfFace, ellipse, ellipseArc, ellipsoid, exportIGES, exportSTEP, exportSTL, face, 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 };
|
|
8
|
+
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 };
|