brepjs 7.4.2 → 7.5.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 +179 -17
- package/dist/2d.cjs +2 -2
- package/dist/2d.js +4 -4
- package/dist/{Blueprint-3Dyu0OL6.cjs → Blueprint-CVctc41Z.cjs} +4 -4
- package/dist/{Blueprint-DSHD89bZ.js → Blueprint-D3JfGJTz.js} +4 -4
- package/dist/{boolean2D-CtyE2hK5.js → boolean2D-Ba8TcVzC.js} +6 -6
- package/dist/{boolean2D-BwOpOv6L.cjs → boolean2D-BnuJdfDv.cjs} +6 -6
- package/dist/{booleanFns-5KSbtLBU.cjs → booleanFns-BBSVKhL2.cjs} +27 -31
- package/dist/{booleanFns-DcxqLQSG.js → booleanFns-CqehfzcK.js} +27 -31
- package/dist/brepjs.cjs +87 -79
- package/dist/brepjs.js +120 -112
- package/dist/{cast-D1s7Im9E.js → cast-DQaUibmm.js} +3 -3
- package/dist/{cast-DsxJk_F0.cjs → cast-DkB0GKmQ.cjs} +2 -2
- package/dist/{drawFns-CSbH7uoI.js → drawFns-D9qkvHgY.js} +8 -8
- package/dist/{drawFns-C6KQjmQj.cjs → drawFns-DWOskIp7.cjs} +8 -8
- package/dist/{faceFns-B9if-FPW.cjs → faceFns-BwK7FP7N.cjs} +1 -1
- package/dist/{faceFns-Bl6HHbqO.js → faceFns-DHu-2JpA.js} +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/io.cjs +2 -2
- package/dist/io.js +2 -2
- package/dist/{loft-Cc5E5pAf.cjs → loft-BzWFokmC.cjs} +2 -2
- package/dist/{loft-BlNndTOR.js → loft-CtG5nMq5.js} +2 -2
- package/dist/{measurement-D75pyJi1.js → measurement-C5JGCuUP.js} +1 -1
- package/dist/{measurement-BVdZ9cG3.cjs → measurement-fxm_pW7x.cjs} +1 -1
- package/dist/measurement.cjs +1 -1
- package/dist/measurement.js +1 -1
- package/dist/{meshFns-p_kv--PW.js → meshFns-BY1fMF48.js} +7 -7
- package/dist/{meshFns-mVlogI3J.cjs → meshFns-Dbj_k5gq.cjs} +7 -7
- package/dist/operations/api.d.ts +2 -2
- package/dist/operations/api.d.ts.map +1 -1
- package/dist/operations/extrude.d.ts +2 -2
- package/dist/operations/extrudeFns.d.ts +3 -3
- package/dist/operations/extrudeFns.d.ts.map +1 -1
- package/dist/operations/loft.d.ts +1 -1
- package/dist/operations/loftFns.d.ts +2 -2
- package/dist/operations/loftFns.d.ts.map +1 -1
- package/dist/{operations-SRN-mfTx.cjs → operations-BP1wVDw0.cjs} +14 -20
- package/dist/{operations-CEV-gqkX.js → operations-C1rWoba2.js} +14 -20
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/{query-D7XclvBZ.js → query-V6nV-VfL.js} +4 -4
- package/dist/{query-DkcMfh6j.cjs → query-hMSmOWJP.cjs} +4 -4
- package/dist/query.cjs +1 -1
- package/dist/query.js +1 -1
- package/dist/{shapeFns-BpCPVHFT.js → shapeFns-BrF97sKt.js} +19 -19
- package/dist/{shapeFns-DjsWo98C.cjs → shapeFns-BvOndshS.cjs} +19 -19
- package/dist/{shapeHelpers-BBSVHPGk.cjs → shapeHelpers-B2SXz1p4.cjs} +2 -2
- package/dist/{shapeHelpers-C4QIp7u5.js → shapeHelpers-BcoZf2N9.js} +2 -2
- package/dist/sketching.cjs +2 -2
- package/dist/sketching.js +2 -2
- package/dist/topology/api.d.ts +11 -11
- package/dist/topology/api.d.ts.map +1 -1
- package/dist/topology/booleanFns.d.ts +9 -9
- package/dist/topology/booleanFns.d.ts.map +1 -1
- package/dist/topology/cast.d.ts +2 -2
- package/dist/topology/cast.d.ts.map +1 -1
- package/dist/topology/chamferAngleFns.d.ts +1 -1
- package/dist/topology/chamferAngleFns.d.ts.map +1 -1
- package/dist/topology/healingFns.d.ts +2 -2
- package/dist/topology/healingFns.d.ts.map +1 -1
- package/dist/topology/index.d.ts +1 -1
- package/dist/topology/index.d.ts.map +1 -1
- package/dist/topology/meshFns.d.ts +2 -2
- package/dist/topology/meshFns.d.ts.map +1 -1
- package/dist/topology/modifierFns.d.ts +5 -5
- package/dist/topology/modifierFns.d.ts.map +1 -1
- package/dist/topology/primitiveFns.d.ts +5 -1
- package/dist/topology/primitiveFns.d.ts.map +1 -1
- package/dist/topology/shapeFns.d.ts +9 -9
- package/dist/topology/shapeFns.d.ts.map +1 -1
- package/dist/{topology-BEMrS4WZ.js → topology-CJKeDGUb.js} +18 -18
- package/dist/{topology-Bb1W3SyF.cjs → topology-DoNKAKMt.cjs} +18 -18
- package/dist/topology.cjs +8 -8
- package/dist/topology.d.ts +1 -1
- package/dist/topology.d.ts.map +1 -1
- package/dist/topology.js +8 -8
- package/package.json +1 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { g as getKernel, b as toOcVec, m as makeOcAx1, c as makeOcAx2, d as toOcPnt } from "./occtBoundary-CwegMzqc.js";
|
|
2
2
|
import { c as castShape, g as getShapeKind } from "./shapeTypes-BlSElW8z.js";
|
|
3
3
|
import { H as HASH_CODE_MAX, D as DEG2RAD } from "./vecOps-ZDdZWbwT.js";
|
|
4
|
-
import { i as iterTopo, d as downcast } from "./cast-
|
|
4
|
+
import { i as iterTopo, d as downcast } from "./cast-DQaUibmm.js";
|
|
5
5
|
import { u as unwrap } from "./errors-wGhcJMpB.js";
|
|
6
|
-
function
|
|
6
|
+
function clone(shape) {
|
|
7
7
|
return castShape(unwrap(downcast(shape.wrapped)));
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function toBREP(shape) {
|
|
10
10
|
const oc = getKernel().oc;
|
|
11
11
|
return oc.BRepToolsWrapper.Write(shape.wrapped);
|
|
12
12
|
}
|
|
13
13
|
function getHashCode(shape) {
|
|
14
14
|
return shape.wrapped.HashCode(HASH_CODE_MAX);
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function isEmpty(shape) {
|
|
17
17
|
return shape.wrapped.IsNull();
|
|
18
18
|
}
|
|
19
19
|
function isSameShape(a, b) {
|
|
@@ -22,7 +22,7 @@ function isSameShape(a, b) {
|
|
|
22
22
|
function isEqualShape(a, b) {
|
|
23
23
|
return a.wrapped.IsEqual(b.wrapped);
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function simplify(shape) {
|
|
26
26
|
const oc = getKernel().oc;
|
|
27
27
|
const upgrader = new oc.ShapeUpgrade_UnifySameDomain_2(shape.wrapped, true, true, false);
|
|
28
28
|
upgrader.Build();
|
|
@@ -30,7 +30,7 @@ function simplifyShape(shape) {
|
|
|
30
30
|
upgrader.delete();
|
|
31
31
|
return result;
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function translate(shape, v) {
|
|
34
34
|
const oc = getKernel().oc;
|
|
35
35
|
const trsf = new oc.gp_Trsf_1();
|
|
36
36
|
const vec = toOcVec(v);
|
|
@@ -42,7 +42,7 @@ function translateShape(shape, v) {
|
|
|
42
42
|
vec.delete();
|
|
43
43
|
return result;
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function rotate(shape, angle, position = [0, 0, 0], direction = [0, 0, 1]) {
|
|
46
46
|
const oc = getKernel().oc;
|
|
47
47
|
const trsf = new oc.gp_Trsf_1();
|
|
48
48
|
const ax1 = makeOcAx1(position, direction);
|
|
@@ -54,7 +54,7 @@ function rotateShape(shape, angle, position = [0, 0, 0], direction = [0, 0, 1])
|
|
|
54
54
|
ax1.delete();
|
|
55
55
|
return result;
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function mirror(shape, planeNormal = [0, 1, 0], planeOrigin = [0, 0, 0]) {
|
|
58
58
|
const oc = getKernel().oc;
|
|
59
59
|
const trsf = new oc.gp_Trsf_1();
|
|
60
60
|
const ax2 = makeOcAx2(planeOrigin, planeNormal);
|
|
@@ -66,7 +66,7 @@ function mirrorShape(shape, planeNormal = [0, 1, 0], planeOrigin = [0, 0, 0]) {
|
|
|
66
66
|
ax2.delete();
|
|
67
67
|
return result;
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function scale(shape, factor, center = [0, 0, 0]) {
|
|
70
70
|
const oc = getKernel().oc;
|
|
71
71
|
const trsf = new oc.gp_Trsf_1();
|
|
72
72
|
const pnt = toOcPnt(center);
|
|
@@ -160,7 +160,7 @@ function getBounds(shape) {
|
|
|
160
160
|
zMax: zMax.current
|
|
161
161
|
};
|
|
162
162
|
}
|
|
163
|
-
function
|
|
163
|
+
function describe(shape) {
|
|
164
164
|
return {
|
|
165
165
|
kind: getShapeKind(shape),
|
|
166
166
|
faceCount: getFaces(shape).length,
|
|
@@ -179,26 +179,26 @@ function vertexPosition(vertex) {
|
|
|
179
179
|
return result;
|
|
180
180
|
}
|
|
181
181
|
export {
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
182
|
+
simplify as a,
|
|
183
|
+
toBREP as b,
|
|
184
|
+
clone as c,
|
|
185
|
+
describe as d,
|
|
186
186
|
getBounds as e,
|
|
187
187
|
getFaces as f,
|
|
188
188
|
getEdges as g,
|
|
189
189
|
getVertices as h,
|
|
190
|
-
|
|
190
|
+
isEmpty as i,
|
|
191
191
|
getWires as j,
|
|
192
192
|
getHashCode as k,
|
|
193
193
|
isEqualShape as l,
|
|
194
|
-
|
|
194
|
+
mirror as m,
|
|
195
195
|
isSameShape as n,
|
|
196
196
|
iterEdges as o,
|
|
197
197
|
iterFaces as p,
|
|
198
198
|
iterVertices as q,
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
199
|
+
rotate as r,
|
|
200
|
+
scale as s,
|
|
201
|
+
translate as t,
|
|
202
202
|
iterWires as u,
|
|
203
203
|
vertexPosition as v
|
|
204
204
|
};
|
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
const occtBoundary = require("./occtBoundary-du8_ex-p.cjs");
|
|
3
3
|
const shapeTypes = require("./shapeTypes-DKhwEnUM.cjs");
|
|
4
4
|
const vecOps = require("./vecOps-CjRL1jau.cjs");
|
|
5
|
-
const cast = require("./cast-
|
|
5
|
+
const cast = require("./cast-DkB0GKmQ.cjs");
|
|
6
6
|
const errors = require("./errors-DK1VAdP4.cjs");
|
|
7
|
-
function
|
|
7
|
+
function clone(shape) {
|
|
8
8
|
return shapeTypes.castShape(errors.unwrap(cast.downcast(shape.wrapped)));
|
|
9
9
|
}
|
|
10
|
-
function
|
|
10
|
+
function toBREP(shape) {
|
|
11
11
|
const oc = occtBoundary.getKernel().oc;
|
|
12
12
|
return oc.BRepToolsWrapper.Write(shape.wrapped);
|
|
13
13
|
}
|
|
14
14
|
function getHashCode(shape) {
|
|
15
15
|
return shape.wrapped.HashCode(vecOps.HASH_CODE_MAX);
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function isEmpty(shape) {
|
|
18
18
|
return shape.wrapped.IsNull();
|
|
19
19
|
}
|
|
20
20
|
function isSameShape(a, b) {
|
|
@@ -23,7 +23,7 @@ function isSameShape(a, b) {
|
|
|
23
23
|
function isEqualShape(a, b) {
|
|
24
24
|
return a.wrapped.IsEqual(b.wrapped);
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function simplify(shape) {
|
|
27
27
|
const oc = occtBoundary.getKernel().oc;
|
|
28
28
|
const upgrader = new oc.ShapeUpgrade_UnifySameDomain_2(shape.wrapped, true, true, false);
|
|
29
29
|
upgrader.Build();
|
|
@@ -31,7 +31,7 @@ function simplifyShape(shape) {
|
|
|
31
31
|
upgrader.delete();
|
|
32
32
|
return result;
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function translate(shape, v) {
|
|
35
35
|
const oc = occtBoundary.getKernel().oc;
|
|
36
36
|
const trsf = new oc.gp_Trsf_1();
|
|
37
37
|
const vec = occtBoundary.toOcVec(v);
|
|
@@ -43,7 +43,7 @@ function translateShape(shape, v) {
|
|
|
43
43
|
vec.delete();
|
|
44
44
|
return result;
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function rotate(shape, angle, position = [0, 0, 0], direction = [0, 0, 1]) {
|
|
47
47
|
const oc = occtBoundary.getKernel().oc;
|
|
48
48
|
const trsf = new oc.gp_Trsf_1();
|
|
49
49
|
const ax1 = occtBoundary.makeOcAx1(position, direction);
|
|
@@ -55,7 +55,7 @@ function rotateShape(shape, angle, position = [0, 0, 0], direction = [0, 0, 1])
|
|
|
55
55
|
ax1.delete();
|
|
56
56
|
return result;
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function mirror(shape, planeNormal = [0, 1, 0], planeOrigin = [0, 0, 0]) {
|
|
59
59
|
const oc = occtBoundary.getKernel().oc;
|
|
60
60
|
const trsf = new oc.gp_Trsf_1();
|
|
61
61
|
const ax2 = occtBoundary.makeOcAx2(planeOrigin, planeNormal);
|
|
@@ -67,7 +67,7 @@ function mirrorShape(shape, planeNormal = [0, 1, 0], planeOrigin = [0, 0, 0]) {
|
|
|
67
67
|
ax2.delete();
|
|
68
68
|
return result;
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function scale(shape, factor, center = [0, 0, 0]) {
|
|
71
71
|
const oc = occtBoundary.getKernel().oc;
|
|
72
72
|
const trsf = new oc.gp_Trsf_1();
|
|
73
73
|
const pnt = occtBoundary.toOcPnt(center);
|
|
@@ -161,7 +161,7 @@ function getBounds(shape) {
|
|
|
161
161
|
zMax: zMax.current
|
|
162
162
|
};
|
|
163
163
|
}
|
|
164
|
-
function
|
|
164
|
+
function describe(shape) {
|
|
165
165
|
return {
|
|
166
166
|
kind: shapeTypes.getShapeKind(shape),
|
|
167
167
|
faceCount: getFaces(shape).length,
|
|
@@ -179,25 +179,25 @@ function vertexPosition(vertex) {
|
|
|
179
179
|
pnt.delete();
|
|
180
180
|
return result;
|
|
181
181
|
}
|
|
182
|
-
exports.
|
|
183
|
-
exports.
|
|
182
|
+
exports.clone = clone;
|
|
183
|
+
exports.describe = describe;
|
|
184
184
|
exports.getBounds = getBounds;
|
|
185
185
|
exports.getEdges = getEdges;
|
|
186
186
|
exports.getFaces = getFaces;
|
|
187
187
|
exports.getHashCode = getHashCode;
|
|
188
188
|
exports.getVertices = getVertices;
|
|
189
189
|
exports.getWires = getWires;
|
|
190
|
+
exports.isEmpty = isEmpty;
|
|
190
191
|
exports.isEqualShape = isEqualShape;
|
|
191
192
|
exports.isSameShape = isSameShape;
|
|
192
|
-
exports.isShapeNull = isShapeNull;
|
|
193
193
|
exports.iterEdges = iterEdges;
|
|
194
194
|
exports.iterFaces = iterFaces;
|
|
195
195
|
exports.iterVertices = iterVertices;
|
|
196
196
|
exports.iterWires = iterWires;
|
|
197
|
-
exports.
|
|
198
|
-
exports.
|
|
199
|
-
exports.
|
|
200
|
-
exports.
|
|
201
|
-
exports.
|
|
202
|
-
exports.
|
|
197
|
+
exports.mirror = mirror;
|
|
198
|
+
exports.rotate = rotate;
|
|
199
|
+
exports.scale = scale;
|
|
200
|
+
exports.simplify = simplify;
|
|
201
|
+
exports.toBREP = toBREP;
|
|
202
|
+
exports.translate = translate;
|
|
203
203
|
exports.vertexPosition = vertexPosition;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const occtBoundary = require("./occtBoundary-du8_ex-p.cjs");
|
|
3
|
-
const cast = require("./cast-
|
|
3
|
+
const cast = require("./cast-DkB0GKmQ.cjs");
|
|
4
4
|
const errors = require("./errors-DK1VAdP4.cjs");
|
|
5
5
|
const shapeTypes = require("./shapeTypes-DKhwEnUM.cjs");
|
|
6
|
-
const shapeFns = require("./shapeFns-
|
|
6
|
+
const shapeFns = require("./shapeFns-BvOndshS.cjs");
|
|
7
7
|
function range(len) {
|
|
8
8
|
return Array.from(Array(len).keys());
|
|
9
9
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { g as getKernel, d as toOcPnt, b as toOcVec, c as makeOcAx2, e as makeOcAx3, m as makeOcAx1 } from "./occtBoundary-CwegMzqc.js";
|
|
2
|
-
import { c as cast, d as downcast } from "./cast-
|
|
2
|
+
import { c as cast, d as downcast } from "./cast-DQaUibmm.js";
|
|
3
3
|
import { e as err, o as occtError, l as ok, a as andThen, x as validationError, u as unwrap, p as typeCastError } from "./errors-wGhcJMpB.js";
|
|
4
4
|
import { q as createFace, r as createCompound, o as localGC, d as isEdge, m as isWire, s as createWire, t as createEdge, n as gcWithScope, u as createVertex, p as createSolid, e as isFace, h as isShape3D, j as isShell, k as isSolid } from "./shapeTypes-BlSElW8z.js";
|
|
5
|
-
import { g as getEdges } from "./shapeFns-
|
|
5
|
+
import { g as getEdges } from "./shapeFns-BrF97sKt.js";
|
|
6
6
|
function range(len) {
|
|
7
7
|
return Array.from(Array(len).keys());
|
|
8
8
|
}
|
package/dist/sketching.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const drawFns = require("./drawFns-
|
|
4
|
-
const boolean2D = require("./boolean2D-
|
|
3
|
+
const drawFns = require("./drawFns-DWOskIp7.cjs");
|
|
4
|
+
const boolean2D = require("./boolean2D-BnuJdfDv.cjs");
|
|
5
5
|
exports.CompoundSketch = drawFns.CompoundSketch;
|
|
6
6
|
exports.Drawing = drawFns.Drawing;
|
|
7
7
|
exports.DrawingPen = drawFns.DrawingPen;
|
package/dist/sketching.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C, D, a, S, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, T, U, V, W } from "./drawFns-
|
|
2
|
-
import { B as B2, a as a2, F as F2, S as S2 } from "./boolean2D-
|
|
1
|
+
import { C, D, a, S, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, T, U, V, W } from "./drawFns-D9qkvHgY.js";
|
|
2
|
+
import { B as B2, a as a2, F as F2, S as S2 } from "./boolean2D-Ba8TcVzC.js";
|
|
3
3
|
export {
|
|
4
4
|
B2 as BaseSketcher2d,
|
|
5
5
|
a2 as BlueprintSketcher,
|
package/dist/topology/api.d.ts
CHANGED
|
@@ -3,10 +3,10 @@ import { Result } from '../core/result.js';
|
|
|
3
3
|
import { AnyShape, Edge, Face, Shape3D, Shell, Solid } from '../core/shapeTypes.js';
|
|
4
4
|
import { Shapeable, FinderFn, FilletRadius, ChamferDistance } from './apiTypes.js';
|
|
5
5
|
import { ShapeFinder } from '../query/finderFns.js';
|
|
6
|
-
import { ShapeDescription } from './shapeFns.js';
|
|
7
|
-
import { BooleanOptions } from './booleanFns.js';
|
|
8
|
-
import { ShapeMesh, EdgeMesh, MeshOptions } from './meshFns.js';
|
|
9
6
|
import { PlaneInput } from '../core/planeTypes.js';
|
|
7
|
+
import * as transforms from './shapeFns.js';
|
|
8
|
+
import * as booleans from './booleanFns.js';
|
|
9
|
+
import * as meshing from './meshFns.js';
|
|
10
10
|
/** Translate a shape by a vector. Returns a new shape. */
|
|
11
11
|
export declare function translate<T extends AnyShape>(shape: Shapeable<T>, v: Vec3): T;
|
|
12
12
|
/** Options for {@link rotate}. */
|
|
@@ -41,11 +41,11 @@ export declare function scale<T extends AnyShape>(shape: Shapeable<T>, factor: n
|
|
|
41
41
|
/** Clone a shape (deep copy). */
|
|
42
42
|
export declare function clone<T extends AnyShape>(shape: Shapeable<T>): T;
|
|
43
43
|
/** Fuse two 3D shapes (boolean union). */
|
|
44
|
-
export declare function fuse<T extends Shape3D>(a: Shapeable<T>, b: Shapeable<Shape3D>, options?: BooleanOptions): Result<T>;
|
|
44
|
+
export declare function fuse<T extends Shape3D>(a: Shapeable<T>, b: Shapeable<Shape3D>, options?: booleans.BooleanOptions): Result<T>;
|
|
45
45
|
/** Cut a tool from a base shape (boolean subtraction). */
|
|
46
|
-
export declare function cut<T extends Shape3D>(base: Shapeable<T>, tool: Shapeable<Shape3D>, options?: BooleanOptions): Result<T>;
|
|
46
|
+
export declare function cut<T extends Shape3D>(base: Shapeable<T>, tool: Shapeable<Shape3D>, options?: booleans.BooleanOptions): Result<T>;
|
|
47
47
|
/** Compute the intersection of two shapes (boolean common). */
|
|
48
|
-
export declare function intersect<T extends Shape3D>(a: Shapeable<T>, b: Shapeable<Shape3D>, options?: BooleanOptions): Result<T>;
|
|
48
|
+
export declare function intersect<T extends Shape3D>(a: Shapeable<T>, b: Shapeable<Shape3D>, options?: booleans.BooleanOptions): Result<T>;
|
|
49
49
|
/** Section (cross-section) a shape with a plane. */
|
|
50
50
|
export declare function section(shape: Shapeable<AnyShape>, plane: PlaneInput, options?: {
|
|
51
51
|
approximation?: boolean;
|
|
@@ -81,17 +81,17 @@ export declare function heal<T extends AnyShape>(shape: Shapeable<T>): Result<T>
|
|
|
81
81
|
/** Simplify a shape by merging same-domain faces/edges. */
|
|
82
82
|
export declare function simplify<T extends AnyShape>(shape: Shapeable<T>): T;
|
|
83
83
|
/** Mesh a shape for rendering. */
|
|
84
|
-
export declare function mesh(shape: Shapeable<AnyShape>, options?: MeshOptions & {
|
|
84
|
+
export declare function mesh(shape: Shapeable<AnyShape>, options?: meshing.MeshOptions & {
|
|
85
85
|
skipNormals?: boolean;
|
|
86
86
|
includeUVs?: boolean;
|
|
87
87
|
cache?: boolean;
|
|
88
|
-
}): ShapeMesh;
|
|
88
|
+
}): meshing.ShapeMesh;
|
|
89
89
|
/** Mesh the edges of a shape for wireframe rendering. */
|
|
90
|
-
export declare function meshEdges(shape: Shapeable<AnyShape>, options?: MeshOptions & {
|
|
90
|
+
export declare function meshEdges(shape: Shapeable<AnyShape>, options?: meshing.MeshOptions & {
|
|
91
91
|
cache?: boolean;
|
|
92
|
-
}): EdgeMesh;
|
|
92
|
+
}): meshing.EdgeMesh;
|
|
93
93
|
/** Get a summary description of a shape. */
|
|
94
|
-
export declare function describe(shape: Shapeable<AnyShape>): ShapeDescription;
|
|
94
|
+
export declare function describe(shape: Shapeable<AnyShape>): transforms.ShapeDescription;
|
|
95
95
|
/** Serialize a shape to BREP format. */
|
|
96
96
|
export declare function toBREP(shape: Shapeable<AnyShape>): string;
|
|
97
97
|
/** Deserialize a shape from BREP format. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/topology/api.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AACzF,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAExF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/topology/api.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AACzF,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAExF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,UAAU,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAI5C,OAAO,KAAK,OAAO,MA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AAQ,CAAC,KAAK,EAAE,SAAS,CAAC,QAAQ,CAAC,GAAG,UAAU,CAAC,gBAAgB,CAEhF;AAED,wCAAwC;AACxC,wBAAgB,MAAM,CAAC,KAAK,EAAE,SAAS,CAAC,QAAQ,CAAC,GAAG,MAAM,CAEzD;AAED,4CAA4C;AAC5C,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,CAEvD;AAED,iCAAiC;AACjC,wBAAgB,OAAO,CAAC,KAAK,EAAE,SAAS,CAAC,QAAQ,CAAC,GAAG,OAAO,CAE3D;AAED,wCAAwC;AACxC,wBAAgB,OAAO,CAAC,KAAK,EAAE,SAAS,CAAC,QAAQ,CAAC,GAAG,OAAO,CAE3D"}
|
|
@@ -22,11 +22,11 @@ export interface BooleanOptions {
|
|
|
22
22
|
*
|
|
23
23
|
* @example
|
|
24
24
|
* ```ts
|
|
25
|
-
* const result =
|
|
26
|
-
* if (isOk(result)) console.log(
|
|
25
|
+
* const result = fuse(box, cylinder);
|
|
26
|
+
* if (isOk(result)) console.log(describe(result.value));
|
|
27
27
|
* ```
|
|
28
28
|
*/
|
|
29
|
-
export declare function
|
|
29
|
+
export declare function fuse(a: Shape3D, b: Shape3D, { optimisation, simplify, signal }?: BooleanOptions): Result<Shape3D>;
|
|
30
30
|
/**
|
|
31
31
|
* Cut a tool shape from a base shape (boolean subtraction). Returns a new shape.
|
|
32
32
|
*
|
|
@@ -37,10 +37,10 @@ export declare function fuseShape(a: Shape3D, b: Shape3D, { optimisation, simpli
|
|
|
37
37
|
*
|
|
38
38
|
* @example
|
|
39
39
|
* ```ts
|
|
40
|
-
* const result =
|
|
40
|
+
* const result = cut(box, hole);
|
|
41
41
|
* ```
|
|
42
42
|
*/
|
|
43
|
-
export declare function
|
|
43
|
+
export declare function cut(base: Shape3D, tool: Shape3D, { optimisation, simplify, signal }?: BooleanOptions): Result<Shape3D>;
|
|
44
44
|
/**
|
|
45
45
|
* Compute the intersection of two shapes (boolean common). Returns a new shape.
|
|
46
46
|
*
|
|
@@ -49,7 +49,7 @@ export declare function cutShape(base: Shape3D, tool: Shape3D, { optimisation, s
|
|
|
49
49
|
* @param options - Boolean operation options.
|
|
50
50
|
* @returns Ok with the intersection, or Err if the result is not 3D.
|
|
51
51
|
*/
|
|
52
|
-
export declare function
|
|
52
|
+
export declare function intersect(a: Shape3D, b: Shape3D, { simplify, signal }?: BooleanOptions): Result<Shape3D>;
|
|
53
53
|
/**
|
|
54
54
|
* Fuse all shapes in a single boolean operation.
|
|
55
55
|
*
|
|
@@ -88,7 +88,7 @@ export declare function cutAll(base: Shape3D, tools: Shape3D[], { optimisation,
|
|
|
88
88
|
* @param options.planeSize Half-size of the cutting plane (default 1e4)
|
|
89
89
|
* @returns The section result as a shape (typically containing wires/edges)
|
|
90
90
|
*/
|
|
91
|
-
export declare function
|
|
91
|
+
export declare function section(shape: AnyShape, plane: PlaneInput, { approximation, planeSize }?: {
|
|
92
92
|
approximation?: boolean;
|
|
93
93
|
planeSize?: number;
|
|
94
94
|
}): Result<AnyShape>;
|
|
@@ -96,12 +96,12 @@ export declare function sectionShape(shape: AnyShape, plane: PlaneInput, { appro
|
|
|
96
96
|
* Split a shape with one or more tool shapes using BRepAlgoAPI_Splitter.
|
|
97
97
|
* Returns all pieces from the split as a compound.
|
|
98
98
|
*/
|
|
99
|
-
export declare function
|
|
99
|
+
export declare function split(shape: AnyShape, tools: AnyShape[]): Result<AnyShape>;
|
|
100
100
|
/**
|
|
101
101
|
* Slice a shape with multiple planes, returning one cross-section per plane.
|
|
102
102
|
* Each result entry corresponds to the input plane at the same index.
|
|
103
103
|
*/
|
|
104
|
-
export declare function
|
|
104
|
+
export declare function slice(shape: AnyShape, planes: PlaneInput[], options?: {
|
|
105
105
|
approximation?: boolean;
|
|
106
106
|
planeSize?: number;
|
|
107
107
|
}): Result<AnyShape[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"booleanFns.d.ts","sourceRoot":"","sources":["../../src/topology/booleanFns.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAG/D,OAAO,EAAE,KAAK,MAAM,EAAkB,MAAM,mBAAmB,CAAC;AAGhE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAoBxD,6DAA6D;AAC7D,MAAM,WAAW,cAAc;IAC7B,6DAA6D;IAC7D,YAAY,CAAC,EAAE,MAAM,GAAG,YAAY,GAAG,UAAU,CAAC;IAClD,uDAAuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sHAAsH;IACtH,QAAQ,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAC;IACjC,oEAAoE;IACpE,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AA6CD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,
|
|
1
|
+
{"version":3,"file":"booleanFns.d.ts","sourceRoot":"","sources":["../../src/topology/booleanFns.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAG/D,OAAO,EAAE,KAAK,MAAM,EAAkB,MAAM,mBAAmB,CAAC;AAGhE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAoBxD,6DAA6D;AAC7D,MAAM,WAAW,cAAc;IAC7B,6DAA6D;IAC7D,YAAY,CAAC,EAAE,MAAM,GAAG,YAAY,GAAG,UAAU,CAAC;IAClD,uDAAuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sHAAsH;IACtH,QAAQ,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAC;IACjC,oEAAoE;IACpE,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AA6CD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,IAAI,CAClB,CAAC,EAAE,OAAO,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,QAAQ,CAAC,CAiC1E;AAMD;;;GAGG;AACH,wBAAgB,KAAK,CACnB,KAAK,EAAE,QAAQ,EACf,MAAM,EAAE,UAAU,EAAE,EACpB,OAAO,GAAE;IAAE,aAAa,CAAC,EAAE,OAAO,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAO,GAC5D,MAAM,CAAC,QAAQ,EAAE,CAAC,CAQpB"}
|
package/dist/topology/cast.d.ts
CHANGED
|
@@ -39,8 +39,8 @@ export declare function isCompSolid(shape: AnyShape): shape is CompSolid;
|
|
|
39
39
|
/**
|
|
40
40
|
* Deserialize a shape from a BREP string representation.
|
|
41
41
|
*
|
|
42
|
-
* @param data - BREP string produced by
|
|
42
|
+
* @param data - BREP string produced by toBREP().
|
|
43
43
|
* @returns Ok with the deserialized shape, or Err if parsing fails.
|
|
44
44
|
*/
|
|
45
|
-
export declare function
|
|
45
|
+
export declare function fromBREP(data: string): Result<AnyShape>;
|
|
46
46
|
//# sourceMappingURL=cast.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cast.d.ts","sourceRoot":"","sources":["../../src/topology/cast.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAIhF,OAAO,EAAE,KAAK,MAAM,EAAoB,MAAM,mBAAmB,CAAC;AAElE,0FAA0F;AAC1F,MAAM,MAAM,UAAU,GAClB,QAAQ,GACR,MAAM,GACN,MAAM,GACN,MAAM,GACN,OAAO,GACP,OAAO,GACP,eAAe,GACf,UAAU,GACV,OAAO,CAAC;AAEZ,6EAA6E;AAC7E,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC;AAMlC,sEAAsE;AACtE,eAAO,MAAM,MAAM,GAAI,QAAQ,UAAU,KAAG,MAkB3C,CA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;AACtE,eAAO,MAAM,MAAM,GAAI,QAAQ,UAAU,KAAG,MAkB3C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,QAAQ,GACnB,OAAO,OAAO,EACd,MAAM,UAAU,KACf,gBAAgB,CAAC,OAAO,CAmB1B,CAAC;AAEF,qFAAqF;AACrF,eAAO,MAAM,SAAS,GAAI,OAAO,OAAO,KAAG,MAAM,CAAC,MAAM,CAGvD,CAAC;AAwBF;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC,WAAW,CAAC,CAO5D;AAED;;;;;;GAMG;AACH,wBAAgB,IAAI,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC,QAAQ,CAAC,CAKrD;AAED,gGAAgG;AAChG,wBAAgB,SAAS,CAAC,KAAK,EAAE,QAAQ,GAAG,KAAK,IAAI,OAAO,CAE3D;AAED,sDAAsD;AACtD,wBAAgB,MAAM,CAAC,KAAK,EAAE,QAAQ,GAAG,KAAK,IAAI,IAAI,CAErD;AAED,2DAA2D;AAC3D,wBAAgB,WAAW,CAAC,KAAK,EAAE,QAAQ,GAAG,KAAK,IAAI,SAAS,CAI/D;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,CAGvD"}
|
|
@@ -14,5 +14,5 @@ import { Result } from '../core/result.js';
|
|
|
14
14
|
*
|
|
15
15
|
* @remarks Uses `BRepFilletAPI_MakeChamfer.AddDA(dist, angle, edge, face)` internally.
|
|
16
16
|
*/
|
|
17
|
-
export declare function
|
|
17
|
+
export declare function chamferDistAngle(shape: Shape3D, edges: Edge[], distance: number, angleDeg: number): Result<Shape3D>;
|
|
18
18
|
//# sourceMappingURL=chamferAngleFns.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chamferAngleFns.d.ts","sourceRoot":"","sources":["../../src/topology/chamferAngleFns.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAG3D,OAAO,EAAE,KAAK,MAAM,EAAkB,MAAM,mBAAmB,CAAC;AAGhE;;;;;;;;;;;;;GAaG;AACH,wBAAgB,
|
|
1
|
+
{"version":3,"file":"chamferAngleFns.d.ts","sourceRoot":"","sources":["../../src/topology/chamferAngleFns.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAG3D,OAAO,EAAE,KAAK,MAAM,EAAkB,MAAM,mBAAmB,CAAC;AAGhE;;;;;;;;;;;;;GAaG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,OAAO,EACd,KAAK,EAAE,IAAI,EAAE,EACb,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,GACf,MAAM,CAAC,OAAO,CAAC,CA+DjB"}
|
|
@@ -3,7 +3,7 @@ import { Result } from '../core/result.js';
|
|
|
3
3
|
/**
|
|
4
4
|
* Check if a shape is valid according to OCCT geometry and topology checks.
|
|
5
5
|
*/
|
|
6
|
-
export declare function
|
|
6
|
+
export declare function isValid(shape: AnyShape): boolean;
|
|
7
7
|
/**
|
|
8
8
|
* Attempt to heal/fix a solid shape.
|
|
9
9
|
*
|
|
@@ -29,7 +29,7 @@ export declare function healWire(wire: Wire, face?: Face): Result<Wire>;
|
|
|
29
29
|
* Supports solids, faces, and wires. For other shape types, returns the
|
|
30
30
|
* input unchanged.
|
|
31
31
|
*/
|
|
32
|
-
export declare function
|
|
32
|
+
export declare function heal<T extends AnyShape>(shape: T): Result<T>;
|
|
33
33
|
/** Diagnostic for a single healing step. */
|
|
34
34
|
export interface HealingStepDiagnostic {
|
|
35
35
|
readonly name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"healingFns.d.ts","sourceRoot":"","sources":["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AC1B;AAED,iDAAiD;AACjD,MAAM,WAAW,eAAe;IAC9B,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iEAAiE;IACjE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,2EAA2E;IAC3E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,uDAAuD;IACvD,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,iDAAiD;AACjD,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,0EAA0E;IAC1E,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACtC,QAAQ,CAAC,WAAW,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;CAC5D;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CACtB,KAAK,EAAE,QAAQ,EACf,OAAO,CAAC,EAAE,eAAe,GACxB,MAAM,CAAC;IAAE,KAAK,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,aAAa,CAAA;CAAE,CAAC,CA2IpD"}
|
package/dist/topology/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Topology layer — casting, construction helpers, and functional API.
|
|
3
3
|
*/
|
|
4
|
-
export { cast, downcast, shapeType, iterTopo, asTopo, isShape3D, isWire, isCompSolid, deserializeShape, type TopoEntity, type GenericTopo, } from './cast.js';
|
|
4
|
+
export { cast, downcast, shapeType, iterTopo, asTopo, isShape3D, isWire, isCompSolid, fromBREP as deserializeShape, type TopoEntity, type GenericTopo, } from './cast.js';
|
|
5
5
|
export { applyGlue } from './shapeBooleans.js';
|
|
6
6
|
export { isNumber, isChamferRadius, isFilletRadius, type ChamferRadius, type FilletRadius, type RadiusOptions, type RadiusConfig, } from './shapeModifiers.js';
|
|
7
7
|
export type { AnyShape, Shape3D, CurveLike } from '../core/shapeTypes.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/topology/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,EACL,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,MAAM,EACN,SAAS,EACT,MAAM,EACN,WAAW,EACX,gBAAgB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/topology/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,EACL,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,MAAM,EACN,SAAS,EACT,MAAM,EACN,WAAW,EACX,QAAQ,IAAI,gBAAgB,EAC5B,KAAK,UAAU,EACf,KAAK,WAAW,GACjB,MAAM,WAAW,CAAC;AAInB,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAI/C,OAAO,EACL,QAAQ,EACR,eAAe,EACf,cAAc,EACd,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,YAAY,GAClB,MAAM,qBAAqB,CAAC;AAI7B,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAI1E,YAAY,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAI3D,OAAO,EACL,WAAW,EACX,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,cAAc,EACd,KAAK,QAAQ,GACd,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,YAAY,EACZ,eAAe,EACf,aAAa,EACb,YAAY,EACZ,cAAc,EACd,WAAW,EACX,aAAa,EACb,eAAe,EACf,WAAW,EACX,cAAc,EACd,eAAe,EACf,YAAY,GACb,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,cAAc,EACd,YAAY,EACZ,eAAe,EACf,mBAAmB,EACnB,QAAQ,EACR,cAAc,EACd,aAAa,EACb,QAAQ,EACR,UAAU,EACV,SAAS,EACT,UAAU,EACV,KAAK,QAAQ,GACd,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,KAAK,QAAQ,EAAE,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAEtF,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEvE,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,GACtB,MAAM,mBAAmB,CAAC"}
|
|
@@ -46,7 +46,7 @@ export interface MeshOptions {
|
|
|
46
46
|
* @returns A ShapeMesh containing typed arrays ready for GPU upload.
|
|
47
47
|
* @see toBufferGeometryData — convert to Three.js BufferGeometry format
|
|
48
48
|
*/
|
|
49
|
-
export declare function
|
|
49
|
+
export declare function mesh(shape: AnyShape, { tolerance, angularTolerance, skipNormals, includeUVs, cache, signal, }?: MeshOptions & {
|
|
50
50
|
skipNormals?: boolean;
|
|
51
51
|
includeUVs?: boolean;
|
|
52
52
|
cache?: boolean;
|
|
@@ -59,7 +59,7 @@ export declare function meshShape(shape: AnyShape, { tolerance, angularTolerance
|
|
|
59
59
|
* @returns An EdgeMesh containing line vertex positions and per-edge groups.
|
|
60
60
|
* @see toLineGeometryData — convert to Three.js LineSegments format
|
|
61
61
|
*/
|
|
62
|
-
export declare function
|
|
62
|
+
export declare function meshEdges(shape: AnyShape, { tolerance, angularTolerance, cache }?: MeshOptions & {
|
|
63
63
|
cache?: boolean;
|
|
64
64
|
}): EdgeMesh;
|
|
65
65
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meshFns.d.ts","sourceRoot":"","sources":["../../src/topology/meshFns.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,KAAK,MAAM,EAAW,MAAM,mBAAmB,CAAC;AAgBzD,0EAA0E;AAC1E,MAAM,WAAW,SAAS;IACxB,gDAAgD;IAChD,SAAS,EAAE,WAAW,CAAC;IACvB,0DAA0D;IAC1D,QAAQ,EAAE,YAAY,CAAC;IACvB,wDAAwD;IACxD,OAAO,EAAE,YAAY,CAAC;IACtB,8EAA8E;IAC9E,GAAG,EAAE,YAAY,CAAC;IAClB,mEAAmE;IACnE,UAAU,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAChE;AAED,6DAA6D;AAC7D,MAAM,WAAW,QAAQ;IACvB,uFAAuF;IACvF,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,4EAA4E;IAC5E,UAAU,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAChE;AAED,6CAA6C;AAC7C,MAAM,WAAW,WAAW;IAC1B,wEAAwE;IACxE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sGAAsG;IACtG,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,sEAAsE;IACtE,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAMD;;;;;;;;GAQG;AACH,wBAAgB,
|
|
1
|
+
{"version":3,"file":"meshFns.d.ts","sourceRoot":"","sources":["../../src/topology/meshFns.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,E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wBAAgB,SAAS,CACvB,KAAK,EAAE,QAAQ,EACf,EAAE,SAAgB,EAAE,gBAAsB,EAAE,KAAY,EAAE,GAAE,WAAW,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAO,GACjG,QAAQ,CAyBV;AAMD;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,CA4BxD;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CACvB,KAAK,EAAE,QAAQ,EACf,EACE,SAAgB,EAChB,gBAAsB,EACtB,MAAc,GACf,GAAE,WAAW,GAAG;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,GACzC,MAAM,CAAC,IAAI,CAAC,CAuBd;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,CAwBxD"}
|
|
@@ -7,7 +7,7 @@ import { Result } from '../core/result.js';
|
|
|
7
7
|
* by offsetting it by the given thickness. Positive thickness offsets
|
|
8
8
|
* along the surface normal; negative thickness offsets against it.
|
|
9
9
|
*/
|
|
10
|
-
export declare function
|
|
10
|
+
export declare function thicken(shape: Face | Shell, thickness: number): Result<Solid>;
|
|
11
11
|
/**
|
|
12
12
|
* Apply a fillet (rounded edge) to selected edges of a 3D shape.
|
|
13
13
|
*
|
|
@@ -15,7 +15,7 @@ export declare function thickenSurface(shape: Face | Shell, thickness: number):
|
|
|
15
15
|
* @param edges - Edges to fillet. Pass `undefined` to fillet all edges.
|
|
16
16
|
* @param radius - Constant radius, variable radius `[r1, r2]`, or per-edge callback.
|
|
17
17
|
*/
|
|
18
|
-
export declare function
|
|
18
|
+
export declare function fillet(shape: Shape3D, edges: ReadonlyArray<Edge> | undefined, radius: number | [number, number] | ((edge: Edge) => number | [number, number] | null)): Result<Shape3D>;
|
|
19
19
|
/**
|
|
20
20
|
* Apply a chamfer (beveled edge) to selected edges of a 3D shape.
|
|
21
21
|
*
|
|
@@ -23,7 +23,7 @@ export declare function filletShape(shape: Shape3D, edges: ReadonlyArray<Edge> |
|
|
|
23
23
|
* @param edges - Edges to chamfer. Pass `undefined` to chamfer all edges.
|
|
24
24
|
* @param distance - Symmetric distance, asymmetric `[d1, d2]`, or per-edge callback.
|
|
25
25
|
*/
|
|
26
|
-
export declare function
|
|
26
|
+
export declare function chamfer(shape: Shape3D, edges: ReadonlyArray<Edge> | undefined, distance: number | [number, number] | ((edge: Edge) => number | [number, number] | null)): Result<Shape3D>;
|
|
27
27
|
/**
|
|
28
28
|
* Create a hollow shell by removing faces and offsetting remaining walls.
|
|
29
29
|
*
|
|
@@ -32,7 +32,7 @@ export declare function chamferShape(shape: Shape3D, edges: ReadonlyArray<Edge>
|
|
|
32
32
|
* @param thickness - Wall thickness.
|
|
33
33
|
* @param tolerance - Shell operation tolerance (default 1e-3).
|
|
34
34
|
*/
|
|
35
|
-
export declare function
|
|
35
|
+
export declare function shell(shape: Shape3D, faces: ReadonlyArray<Face>, thickness: number, tolerance?: number): Result<Shape3D>;
|
|
36
36
|
/**
|
|
37
37
|
* Offset all faces of a shape by a given distance.
|
|
38
38
|
*
|
|
@@ -40,5 +40,5 @@ export declare function shellShape(shape: Shape3D, faces: ReadonlyArray<Face>, t
|
|
|
40
40
|
* @param distance - Offset distance (positive = outward, negative = inward).
|
|
41
41
|
* @param tolerance - Offset tolerance (default 1e-6).
|
|
42
42
|
*/
|
|
43
|
-
export declare function
|
|
43
|
+
export declare function offset(shape: Shape3D, distance: number, tolerance?: number): Result<Shape3D>;
|
|
44
44
|
//# sourceMappingURL=modifierFns.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modifierFns.d.ts","sourceRoot":"","sources":["../../src/topology/modifierFns.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,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AAC,IAAI,CAAC,EAC1B,SAAS,EAAE,MAAM,EACjB,SAAS,SAAO,GACf,MAAM,CAAC,OAAO,CAAC,CAiCjB;AAMD;;;;;;GAMG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,SAAO,GAAG,MAAM,CAAC,OAAO,CAAC,CAY1F"}
|
|
@@ -5,8 +5,12 @@ import { BSplineApproximationOptions } from './shapeHelpers.js';
|
|
|
5
5
|
export type { BSplineApproximationOptions } from './shapeHelpers.js';
|
|
6
6
|
/** Options for {@link box}. */
|
|
7
7
|
export interface BoxOptions {
|
|
8
|
-
/**
|
|
8
|
+
/** @deprecated Use `centered` or `at` instead. Will be removed in v8.0.0. */
|
|
9
9
|
center?: true | Vec3;
|
|
10
|
+
/** Center at this point (center semantics, like {@link sphere}). */
|
|
11
|
+
at?: Vec3;
|
|
12
|
+
/** Center the box at the origin (or at the `at` point). Default: false. */
|
|
13
|
+
centered?: boolean;
|
|
10
14
|
}
|
|
11
15
|
/**
|
|
12
16
|
* Create a box with the given dimensions.
|