brepjs 7.5.0 → 8.0.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/dist/2d/blueprints/blueprintFns.d.ts +0 -22
- package/dist/2d/blueprints/blueprintFns.d.ts.map +1 -1
- package/dist/2d/blueprints/boolean2D.d.ts +3 -3
- package/dist/2d.cjs +1 -57
- package/dist/2d.d.ts +1 -2
- package/dist/2d.d.ts.map +1 -1
- package/dist/2d.js +5 -62
- package/dist/{boolean2D-BnuJdfDv.cjs → boolean2D-BdZATaHs.cjs} +3 -3
- package/dist/{boolean2D-Ba8TcVzC.js → boolean2D-hOw5Qay5.js} +3 -3
- package/dist/brepjs.cjs +18 -37
- package/dist/brepjs.js +21 -40
- package/dist/{drawFns-D9qkvHgY.js → drawFns-921SkhDL.js} +2 -2
- package/dist/{drawFns-DWOskIp7.cjs → drawFns-CUyx50gi.cjs} +2 -2
- package/dist/index.d.ts +8 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/io.cjs +1 -1
- package/dist/io.js +1 -1
- package/dist/{meshFns-BY1fMF48.js → meshFns-AqAjTTVl.js} +4 -4
- package/dist/{meshFns-Dbj_k5gq.cjs → meshFns-BhrZGi6w.cjs} +4 -4
- package/dist/operations/api.d.ts +2 -4
- package/dist/operations/api.d.ts.map +1 -1
- package/dist/operations/exporterFns.d.ts +0 -2
- package/dist/operations/exporterFns.d.ts.map +1 -1
- package/dist/operations/extrude.d.ts +0 -2
- package/dist/operations/extrude.d.ts.map +1 -1
- package/dist/operations/extrudeFns.d.ts +1 -1
- package/dist/operations/extrudeFns.d.ts.map +1 -1
- package/dist/operations/extrudeUtils.d.ts +0 -2
- package/dist/operations/extrudeUtils.d.ts.map +1 -1
- package/dist/operations/loftFns.d.ts +0 -2
- package/dist/operations/loftFns.d.ts.map +1 -1
- package/dist/operations.d.ts +3 -3
- package/dist/operations.d.ts.map +1 -1
- package/dist/sketching/sketcherlib.d.ts +2 -4
- package/dist/sketching/sketcherlib.d.ts.map +1 -1
- package/dist/sketching.cjs +2 -2
- package/dist/sketching.d.ts +2 -2
- package/dist/sketching.d.ts.map +1 -1
- package/dist/sketching.js +2 -2
- package/dist/topology/api.d.ts +0 -4
- package/dist/topology/api.d.ts.map +1 -1
- package/dist/topology/apiTypes.d.ts +0 -2
- package/dist/topology/apiTypes.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/meshCache.d.ts +2 -4
- package/dist/topology/meshCache.d.ts.map +1 -1
- package/dist/topology/primitiveFns.d.ts +0 -8
- package/dist/topology/primitiveFns.d.ts.map +1 -1
- package/dist/topology/shapeModifiers.d.ts +0 -2
- package/dist/topology/shapeModifiers.d.ts.map +1 -1
- package/dist/topology/wrapperFns.d.ts +3 -3
- package/dist/topology/wrapperFns.d.ts.map +1 -1
- package/dist/{topology-DoNKAKMt.cjs → topology-CIooytHH.cjs} +1 -1
- package/dist/{topology-CJKeDGUb.js → topology-tFzqSrGH.js} +1 -1
- package/dist/topology.cjs +2 -2
- package/dist/topology.js +2 -2
- package/package.json +3 -3
- package/dist/2d/blueprints/boolean2dFns.d.ts +0 -46
- package/dist/2d/blueprints/boolean2dFns.d.ts.map +0 -1
- package/dist/core/geometry.d.ts +0 -26
- package/dist/core/geometry.d.ts.map +0 -1
package/dist/brepjs.js
CHANGED
|
@@ -12,21 +12,21 @@ import { g as g4, h as h4, i as i5, j as j4, k as k5, l as l4, m as m4, n as n2,
|
|
|
12
12
|
import { b as b6, g as g5, r as r4 } from "./loft-CtG5nMq5.js";
|
|
13
13
|
import { e as extrude$1, r as revolve$1, s as sweep, c as circularPattern, l as linearPattern } from "./operations-C1rWoba2.js";
|
|
14
14
|
import { a as a5, b as b7, d as d2, f as f4, g as g6, h as h5, i as i6, j as j5, k as k6, m as m5, n as n3, o as o3, p, q as q3, t as t4, u as u2, v as v4, w as w4, x as x2, y, z as z2, A, B as B2, C as C2, D as D2, E } from "./operations-C1rWoba2.js";
|
|
15
|
-
import { B as B3, a as a6, b as b8, C as C3, F, S, c as c3, d as d3, f as f5, e as e2, i as i7, g as g7, o as o4, p as p2, r as r5 } from "./boolean2D-
|
|
16
|
-
import {
|
|
15
|
+
import { B as B3, a as a6, b as b8, C as C3, F, S, c as c3, d as d3, f as f5, e as e2, i as i7, g as g7, o as o4, p as p2, r as r5 } from "./boolean2D-hOw5Qay5.js";
|
|
16
|
+
import { createBlueprint, curve2dBoundingBox, curve2dDistanceFrom, curve2dFirstPoint, curve2dIsOnCurve, curve2dLastPoint, curve2dParameter, curve2dSplitAt, curve2dTangentAt, getBounds2D, getOrientation2D, isInside2D, mirror2D, reverseCurve, rotate2D, scale2D, sketch2DOnFace, sketch2DOnPlane, stretch2D, toSVGPathD, translate2D } from "./2d.js";
|
|
17
17
|
import { e as edgeFinder, f as faceFinder } from "./query-V6nV-VfL.js";
|
|
18
18
|
import { c as c4, g as g8, v as v5, w as w5 } from "./query-V6nV-VfL.js";
|
|
19
19
|
import { blueprintToDXF, exportDXF, exportGlb, exportGltf, exportOBJ, exportThreeMF, importIGES, importSTEP, importSTL, importSVG, importSVGPathD } from "./io.js";
|
|
20
|
-
import { C as C4, D as D3, a as a7, S as S2, b as b9, X, Y, c as c5, d as d4, e as e3, f as f6, Z, g as g9, h as h6, i as i8, j as j6, k as k7, l as l5, m as m6, n as n4, o as o5, p as p3, q as q4, r as r6, s as s3, t as t5, u as u3, v as v6, w as w6, x as x3, y as y2, z as z3, _, $, a0, A as A2, a1, B as B4, E as E2, a2 as a22, F as F2, G, H as H2, I, J, K, L, M, N, O as O2, P, Q, R as R2, T, U, a3 as a32, V, a4 as a42, W } from "./drawFns-
|
|
20
|
+
import { C as C4, D as D3, a as a7, S as S2, b as b9, X, Y, c as c5, d as d4, e as e3, f as f6, Z, g as g9, h as h6, i as i8, j as j6, k as k7, l as l5, m as m6, n as n4, o as o5, p as p3, q as q4, r as r6, s as s3, t as t5, u as u3, v as v6, w as w6, x as x3, y as y2, z as z3, _, $, a0, A as A2, a1, B as B4, E as E2, a2 as a22, F as F2, G, H as H2, I, J, K, L, M, N, O as O2, P, Q, R as R2, T, U, a3 as a32, V, a4 as a42, W } from "./drawFns-921SkhDL.js";
|
|
21
21
|
import { c as c6, a as a8, p as p4, r as r7, t as t6 } from "./vectors-CBuaMeZv.js";
|
|
22
22
|
import { t as translate$1, g as getEdges, c as clone$1, d as describe$1, i as isEmpty$1, m as mirror$1, r as rotate$1, s as scale$1, a as simplify$1, b as toBREP$1, e as getBounds, f as getFaces, h as getVertices, j as getWires } from "./shapeFns-BrF97sKt.js";
|
|
23
23
|
import { k as k8, l as l6, n as n5, o as o6, p as p5, q as q5, u as u4, v as v7 } from "./shapeFns-BrF97sKt.js";
|
|
24
|
-
import { c as chamferDistAngle, h as heal$1, i as isValid$1 } from "./topology-
|
|
25
|
-
import { a as a9, b as b10, e as e4, f as f7, d as d5, g as g10, j as j7, s as s4, t as t7, k as k9, l as l7, v as v8, w as w7 } from "./topology-
|
|
24
|
+
import { c as chamferDistAngle, h as heal$1, i as isValid$1 } from "./topology-tFzqSrGH.js";
|
|
25
|
+
import { a as a9, b as b10, e as e4, f as f7, d as d5, g as g10, j as j7, s as s4, t as t7, k as k9, l as l7, v as v8, w as w7 } from "./topology-tFzqSrGH.js";
|
|
26
26
|
import { n as normalAt, f as faceCenter, i as innerWires, o as outerWire, g as getSurfaceType } from "./faceFns-DHu-2JpA.js";
|
|
27
27
|
import { c as c7, a as a10, b as b11, d as d6, p as p6, e as e5, u as u5, h as h7 } from "./faceFns-DHu-2JpA.js";
|
|
28
|
-
import { m as mesh$1, a as meshEdges$1 } from "./meshFns-
|
|
29
|
-
import { c as c8, b as b12, e as e6, d as d7, f as f8 } from "./meshFns-
|
|
28
|
+
import { m as mesh$1, a as meshEdges$1 } from "./meshFns-AqAjTTVl.js";
|
|
29
|
+
import { c as c8, b as b12, e as e6, d as d7, f as f8 } from "./meshFns-AqAjTTVl.js";
|
|
30
30
|
import { c as cut$1, f as fuse$1, i as intersect$1, s as section$1, a as slice$1, b as split$1, d as cutAll } from "./booleanFns-CqehfzcK.js";
|
|
31
31
|
import { e as e7, g as g11 } from "./booleanFns-CqehfzcK.js";
|
|
32
32
|
import { m as measureArea, a as measureSurfaceProps, b as measureVolumeProps, c as measureVolume } from "./measurement-C5JGCuUP.js";
|
|
@@ -64,11 +64,6 @@ function kernelCallRaw(fn, code, message, kind = "OCCT_OPERATION") {
|
|
|
64
64
|
return err(errorFactories[kind](code, `${message}: ${translatedMessage}`, e10));
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
|
-
function isPoint(p7) {
|
|
68
|
-
if (Array.isArray(p7)) return p7.length === 3 || p7.length === 2;
|
|
69
|
-
else if (p7 && typeof p7?.XYZ === "function") return true;
|
|
70
|
-
return false;
|
|
71
|
-
}
|
|
72
67
|
function isNumber(r8) {
|
|
73
68
|
return typeof r8 === "number";
|
|
74
69
|
}
|
|
@@ -139,12 +134,13 @@ function box(width, depth, height, options) {
|
|
|
139
134
|
const maker = r8(new oc.BRepPrimAPI_MakeBox_2(width, depth, height));
|
|
140
135
|
let solid2 = createSolid(maker.Solid());
|
|
141
136
|
gc();
|
|
142
|
-
const
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
137
|
+
const center = options?.at ?? (options?.centered ? [0, 0, 0] : void 0);
|
|
138
|
+
if (center) {
|
|
139
|
+
solid2 = translate$1(solid2, [
|
|
140
|
+
center[0] - width / 2,
|
|
141
|
+
center[1] - depth / 2,
|
|
142
|
+
center[2] - height / 2
|
|
143
|
+
]);
|
|
148
144
|
}
|
|
149
145
|
return solid2;
|
|
150
146
|
}
|
|
@@ -197,11 +193,11 @@ function line(from, to) {
|
|
|
197
193
|
return makeLine(from, to);
|
|
198
194
|
}
|
|
199
195
|
function circle(radius, options) {
|
|
200
|
-
const axisDir = options?.axis ??
|
|
196
|
+
const axisDir = options?.axis ?? [0, 0, 1];
|
|
201
197
|
return makeCircle(radius, options?.at ?? [0, 0, 0], axisDir);
|
|
202
198
|
}
|
|
203
199
|
function ellipse(majorRadius, minorRadius, options) {
|
|
204
|
-
const axisDir = options?.axis ??
|
|
200
|
+
const axisDir = options?.axis ?? [0, 0, 1];
|
|
205
201
|
return makeEllipse(majorRadius, minorRadius, options?.at ?? [0, 0, 0], axisDir, options?.xDir);
|
|
206
202
|
}
|
|
207
203
|
function helix(pitch, height, radius, options) {
|
|
@@ -218,7 +214,7 @@ function threePointArc(p1, p22, p32) {
|
|
|
218
214
|
return makeThreePointArc(p1, p22, p32);
|
|
219
215
|
}
|
|
220
216
|
function ellipseArc(majorRadius, minorRadius, startAngle, endAngle, options) {
|
|
221
|
-
const axisDir = options?.axis ??
|
|
217
|
+
const axisDir = options?.axis ?? [0, 0, 1];
|
|
222
218
|
return makeEllipseArc(
|
|
223
219
|
majorRadius,
|
|
224
220
|
minorRadius,
|
|
@@ -460,11 +456,11 @@ function translate(shape2, v9) {
|
|
|
460
456
|
return translate$1(resolve(shape2), v9);
|
|
461
457
|
}
|
|
462
458
|
function rotate(shape2, angle, options) {
|
|
463
|
-
const pivotPoint = options?.at
|
|
459
|
+
const pivotPoint = options?.at;
|
|
464
460
|
return rotate$1(resolve(shape2), angle, pivotPoint, options?.axis);
|
|
465
461
|
}
|
|
466
462
|
function mirror(shape2, options) {
|
|
467
|
-
const planeOrigin = options?.at
|
|
463
|
+
const planeOrigin = options?.at;
|
|
468
464
|
return mirror$1(resolve(shape2), options?.normal ?? [1, 0, 0], planeOrigin);
|
|
469
465
|
}
|
|
470
466
|
function scale(shape2, factor, options) {
|
|
@@ -639,7 +635,7 @@ function extrude(face2, height) {
|
|
|
639
635
|
return extrude$1(f10, vec);
|
|
640
636
|
}
|
|
641
637
|
function revolve(face2, options) {
|
|
642
|
-
const pivotPoint = options?.at ??
|
|
638
|
+
const pivotPoint = options?.at ?? [0, 0, 0];
|
|
643
639
|
return revolve$1(
|
|
644
640
|
resolve(face2),
|
|
645
641
|
pivotPoint,
|
|
@@ -745,7 +741,7 @@ function boss(shape2, options) {
|
|
|
745
741
|
function mirrorJoin(shape2, options) {
|
|
746
742
|
const s6 = resolve(shape2);
|
|
747
743
|
const normal = options?.normal ?? [1, 0, 0];
|
|
748
|
-
const planeOrigin = options?.at
|
|
744
|
+
const planeOrigin = options?.at;
|
|
749
745
|
const mirrored = mirror$1(s6, normal, planeOrigin);
|
|
750
746
|
return fuse$1(s6, mirrored);
|
|
751
747
|
}
|
|
@@ -981,11 +977,7 @@ export {
|
|
|
981
977
|
b5 as axis2d,
|
|
982
978
|
b6 as basicFaceExtrusion,
|
|
983
979
|
bezier,
|
|
984
|
-
blueprintBoundingBox,
|
|
985
|
-
blueprintIsInside,
|
|
986
|
-
blueprintOrientation,
|
|
987
980
|
blueprintToDXF,
|
|
988
|
-
blueprintToSVGPathD,
|
|
989
981
|
boss,
|
|
990
982
|
box,
|
|
991
983
|
bsplineApprox,
|
|
@@ -1057,7 +1049,6 @@ export {
|
|
|
1057
1049
|
cut,
|
|
1058
1050
|
c3 as cut2D,
|
|
1059
1051
|
cutAll,
|
|
1060
|
-
cutBlueprint2D,
|
|
1061
1052
|
d3 as cutBlueprints,
|
|
1062
1053
|
cylinder,
|
|
1063
1054
|
dequeueTask,
|
|
@@ -1123,7 +1114,6 @@ export {
|
|
|
1123
1114
|
fuse,
|
|
1124
1115
|
f5 as fuse2D,
|
|
1125
1116
|
g11 as fuseAll,
|
|
1126
|
-
fuseBlueprint2D,
|
|
1127
1117
|
e2 as fuseBlueprints,
|
|
1128
1118
|
x as gcWithObject,
|
|
1129
1119
|
gcWithScope,
|
|
@@ -1159,7 +1149,6 @@ export {
|
|
|
1159
1149
|
n2 as interpolateCurve,
|
|
1160
1150
|
intersect,
|
|
1161
1151
|
i7 as intersect2D,
|
|
1162
|
-
intersectBlueprint2D,
|
|
1163
1152
|
g7 as intersectBlueprints,
|
|
1164
1153
|
i2 as ioError,
|
|
1165
1154
|
isChamferRadius,
|
|
@@ -1178,7 +1167,6 @@ export {
|
|
|
1178
1167
|
isNumber,
|
|
1179
1168
|
g as isOk,
|
|
1180
1169
|
isOperationRequest,
|
|
1181
|
-
isPoint,
|
|
1182
1170
|
$ as isProjectionPlane,
|
|
1183
1171
|
isQueueEmpty,
|
|
1184
1172
|
n5 as isSameShape,
|
|
@@ -1221,7 +1209,6 @@ export {
|
|
|
1221
1209
|
meshEdges,
|
|
1222
1210
|
mirror,
|
|
1223
1211
|
mirror2D,
|
|
1224
|
-
mirrorBlueprint,
|
|
1225
1212
|
B4 as mirrorDrawing,
|
|
1226
1213
|
mirrorJoin,
|
|
1227
1214
|
q3 as modifyStep,
|
|
@@ -1262,12 +1249,10 @@ export {
|
|
|
1262
1249
|
revolve,
|
|
1263
1250
|
rotate,
|
|
1264
1251
|
rotate2D,
|
|
1265
|
-
rotateBlueprint,
|
|
1266
1252
|
F2 as rotateDrawing,
|
|
1267
1253
|
r5 as roundedRectangleBlueprint,
|
|
1268
1254
|
scale,
|
|
1269
1255
|
scale2D,
|
|
1270
|
-
scaleBlueprint,
|
|
1271
1256
|
G as scaleDrawing,
|
|
1272
1257
|
section,
|
|
1273
1258
|
sewShells,
|
|
@@ -1278,8 +1263,6 @@ export {
|
|
|
1278
1263
|
simplify,
|
|
1279
1264
|
sketch2DOnFace,
|
|
1280
1265
|
sketch2DOnPlane,
|
|
1281
|
-
sketchBlueprintOnFace,
|
|
1282
|
-
sketchBlueprintOnPlane,
|
|
1283
1266
|
H2 as sketchCircle,
|
|
1284
1267
|
I as sketchEllipse,
|
|
1285
1268
|
J as sketchExtrude,
|
|
@@ -1303,7 +1286,6 @@ export {
|
|
|
1303
1286
|
y as stepCount,
|
|
1304
1287
|
z2 as stepsFrom,
|
|
1305
1288
|
stretch2D,
|
|
1306
|
-
stretchBlueprint,
|
|
1307
1289
|
subFace,
|
|
1308
1290
|
A as supportExtrude,
|
|
1309
1291
|
sweep,
|
|
@@ -1322,7 +1304,6 @@ export {
|
|
|
1322
1304
|
torus,
|
|
1323
1305
|
translate,
|
|
1324
1306
|
translate2D,
|
|
1325
|
-
translateBlueprint,
|
|
1326
1307
|
W as translateDrawing,
|
|
1327
1308
|
t6 as translatePlane,
|
|
1328
1309
|
t2 as tryCatch,
|
|
@@ -3,7 +3,7 @@ import { m as makeLine, x as makeThreePointArc, v as makeTangentArc, l as makeEl
|
|
|
3
3
|
import { r as resolvePlane, b as planeToWorld, d as planeToLocal } from "./vectors-CBuaMeZv.js";
|
|
4
4
|
import { g as getKernel, a as toVec3, c as makeOcAx2 } from "./occtBoundary-CwegMzqc.js";
|
|
5
5
|
import { n as vecScale, j as vecNormalize, v as vecAdd, o as vecSub, b as vecCross, m as vecRotate, R as RAD2DEG, g as vecLength, e as vecEquals, D as DEG2RAD } from "./vecOps-ZDdZWbwT.js";
|
|
6
|
-
import { h as Flatbush, j as convertSvgEllipseParams, k as
|
|
6
|
+
import { h as Flatbush, j as convertSvgEllipseParams, k as defaultsSplineOptions, S as Sketch, r as roundedRectangleBlueprint, b as Blueprints, C as CompoundBlueprint, c as cut2D, l as intersectCurves, f as fuse2D, m as make2dOffset, n as filletCurves, q as chamferCurves, o as organiseBlueprints, a as BlueprintSketcher, i as intersect2D, B as BaseSketcher2d, p as polysidesBlueprint } from "./boolean2D-hOw5Qay5.js";
|
|
7
7
|
import { f as faceCenter, n as normalAt, o as outerWire } from "./faceFns-DHu-2JpA.js";
|
|
8
8
|
import { a as curveTangentAt, d as curveEndPoint, l as getCurveType, o as offsetWire2D } from "./curveFns-CdVE4da7.js";
|
|
9
9
|
import { s as createWire, o as localGC, q as createFace, e as isFace, n as gcWithScope, c as castShape } from "./shapeTypes-BlSElW8z.js";
|
|
@@ -318,7 +318,7 @@ class Sketcher {
|
|
|
318
318
|
smoothSplineTo(end, config) {
|
|
319
319
|
const [r, gc] = localGC();
|
|
320
320
|
try {
|
|
321
|
-
const { endTangent, startTangent, startFactor, endFactor } =
|
|
321
|
+
const { endTangent, startTangent, startFactor, endFactor } = defaultsSplineOptions(config);
|
|
322
322
|
const endPoint = planeToWorld(this.plane, end);
|
|
323
323
|
const previousEdge = this.pendingEdges.length ? this.pendingEdges[this.pendingEdges.length - 1] : null;
|
|
324
324
|
const diff = vecSub(endPoint, this.pointer);
|
|
@@ -4,7 +4,7 @@ const shapeHelpers = require("./shapeHelpers-B2SXz1p4.cjs");
|
|
|
4
4
|
const vectors = require("./vectors-ChWEZPwy.cjs");
|
|
5
5
|
const occtBoundary = require("./occtBoundary-du8_ex-p.cjs");
|
|
6
6
|
const vecOps = require("./vecOps-CjRL1jau.cjs");
|
|
7
|
-
const boolean2D = require("./boolean2D-
|
|
7
|
+
const boolean2D = require("./boolean2D-BdZATaHs.cjs");
|
|
8
8
|
const faceFns = require("./faceFns-BwK7FP7N.cjs");
|
|
9
9
|
const curveFns = require("./curveFns-BilyYL_s.cjs");
|
|
10
10
|
const shapeTypes = require("./shapeTypes-DKhwEnUM.cjs");
|
|
@@ -319,7 +319,7 @@ class Sketcher {
|
|
|
319
319
|
smoothSplineTo(end, config) {
|
|
320
320
|
const [r, gc] = shapeTypes.localGC();
|
|
321
321
|
try {
|
|
322
|
-
const { endTangent, startTangent, startFactor, endFactor } = boolean2D.
|
|
322
|
+
const { endTangent, startTangent, startFactor, endFactor } = boolean2D.defaultsSplineOptions(config);
|
|
323
323
|
const endPoint = vectors.planeToWorld(this.plane, end);
|
|
324
324
|
const previousEdge = this.pendingEdges.length ? this.pendingEdges[this.pendingEdges.length - 1] : null;
|
|
325
325
|
const diff = vecOps.vecSub(endPoint, this.pointer);
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as Sketcher } from './sketching/Sketcher.js';
|
|
2
2
|
import { default as FaceSketcher, BaseSketcher2d, BlueprintSketcher } from './sketching/Sketcher2d.js';
|
|
3
|
-
import { GenericSketcher, SplineOptions
|
|
3
|
+
import { GenericSketcher, SplineOptions } from './sketching/sketcherlib.js';
|
|
4
4
|
/**
|
|
5
5
|
* brepjs — Public API
|
|
6
6
|
*/
|
|
@@ -10,12 +10,11 @@ export { kernelCall, kernelCallRaw } from './core/kernelCall.js';
|
|
|
10
10
|
export { type BrepError, type BrepErrorKind, BrepErrorCode, occtError, validationError, typeCastError, sketcherStateError, moduleInitError, computationError, ioError, queryError, bug, BrepBugError, } from './core/errors.js';
|
|
11
11
|
export { DEG2RAD, RAD2DEG, HASH_CODE_MAX } from './core/constants.js';
|
|
12
12
|
export { gcWithScope, gcWithObject, localGC, type Deletable } from './core/memory.js';
|
|
13
|
-
export { isPoint, type Point } from './core/geometry.js';
|
|
14
13
|
export { makePlane } from './core/geometryHelpers.js';
|
|
15
14
|
export { findCurveType } from './core/definitionMaps.js';
|
|
16
15
|
export type { CurveType } from './core/definitionMaps.js';
|
|
17
|
-
export { cast, downcast, shapeType, iterTopo, asTopo, isCompSolid, deserializeShape, type TopoEntity, type GenericTopo, applyGlue, isNumber, isChamferRadius, isFilletRadius, type ChamferRadius, type RadiusOptions, type
|
|
18
|
-
export { basicFaceExtrusion, revolution, genericSweep, type GenericSweepOptions,
|
|
16
|
+
export { cast, downcast, shapeType, iterTopo, asTopo, isCompSolid, deserializeShape, type TopoEntity, type GenericTopo, applyGlue, isNumber, isChamferRadius, isFilletRadius, type ChamferRadius, type RadiusOptions, type CurveLike, } from './topology/index.js';
|
|
17
|
+
export { basicFaceExtrusion, revolution, genericSweep, type GenericSweepOptions, } from './operations/extrude.js';
|
|
19
18
|
export { type AssemblyExporter, createAssembly } from './operations/exporters.js';
|
|
20
19
|
export { type Point2D, BoundingBox2d, Curve2D, axis2d } from './2d/lib/index.js';
|
|
21
20
|
export { default as Blueprint } from './2d/blueprints/Blueprint.js';
|
|
@@ -27,8 +26,7 @@ export { fuseBlueprints, cutBlueprints, intersectBlueprints, } from './2d/bluepr
|
|
|
27
26
|
export { fuse2D, cut2D, intersect2D, type Shape2D } from './2d/blueprints/boolean2D.js';
|
|
28
27
|
export type { ScaleMode } from './2d/curves.js';
|
|
29
28
|
export { reverseCurve, curve2dBoundingBox, curve2dFirstPoint, curve2dLastPoint, curve2dSplitAt, curve2dParameter, curve2dTangentAt, curve2dIsOnCurve, curve2dDistanceFrom, } from './2d/lib/curve2dFns.js';
|
|
30
|
-
export { createBlueprint, getBounds2D, getOrientation2D, isInside2D, toSVGPathD, translate2D, rotate2D, scale2D, mirror2D, stretch2D, sketch2DOnPlane, sketch2DOnFace,
|
|
31
|
-
export { fuseBlueprint2D, cutBlueprint2D, intersectBlueprint2D, } from './2d/blueprints/boolean2dFns.js';
|
|
29
|
+
export { createBlueprint, getBounds2D, getOrientation2D, isInside2D, toSVGPathD, translate2D, rotate2D, scale2D, mirror2D, stretch2D, sketch2DOnPlane, sketch2DOnFace, } from './2d/blueprints/blueprintFns.js';
|
|
32
30
|
export { getSingleFace, type SingleFace } from './query/helpers.js';
|
|
33
31
|
export { exportOBJ } from './io/objExportFns.js';
|
|
34
32
|
export { exportGltf, exportGlb, type GltfMaterial, type GltfExportOptions, } from './io/gltfExportFns.js';
|
|
@@ -36,7 +34,7 @@ export { exportDXF, blueprintToDXF, type DXFEntity, type DXFExportOptions, } fro
|
|
|
36
34
|
export { exportThreeMF, type ThreeMFExportOptions } from './io/threemfExportFns.js';
|
|
37
35
|
export { importSVGPathD, importSVG, type SVGImportOptions } from './io/svgImportFns.js';
|
|
38
36
|
export { Sketcher, FaceSketcher, BaseSketcher2d, BlueprintSketcher };
|
|
39
|
-
export type { GenericSketcher, SplineOptions
|
|
37
|
+
export type { GenericSketcher, SplineOptions };
|
|
40
38
|
export type { SketchInterface } from './sketching/sketchLib.js';
|
|
41
39
|
export { default as Sketch } from './sketching/Sketch.js';
|
|
42
40
|
export { default as CompoundSketch } from './sketching/CompoundSketch.js';
|
|
@@ -70,8 +68,8 @@ export { clearMeshCache, createMeshCache, type MeshCacheContext } from './topolo
|
|
|
70
68
|
export { toBufferGeometryData, toLineGeometryData, toGroupedBufferGeometryData, type BufferGeometryData, type LineGeometryData, type GroupedBufferGeometryData, type BufferGeometryGroup, } from './topology/threeHelpers.js';
|
|
71
69
|
export { fuseAll, cutAll, type BooleanOptions } from './topology/booleanFns.js';
|
|
72
70
|
export { healSolid, healFace, healWire, autoHeal, type HealingReport, type AutoHealOptions, type HealingStepDiagnostic, } from './topology/healingFns.js';
|
|
73
|
-
export { sweep, supportExtrude, complexExtrude, twistExtrude, type SweepOptions, type
|
|
74
|
-
export { exportAssemblySTEP, type ShapeOptions, type
|
|
71
|
+
export { sweep, supportExtrude, complexExtrude, twistExtrude, type SweepOptions, type ExtrusionProfile, } from './operations/extrudeFns.js';
|
|
72
|
+
export { exportAssemblySTEP, type ShapeOptions, type SupportedUnit, } from './operations/exporterFns.js';
|
|
75
73
|
export { linearPattern, circularPattern } from './operations/patternFns.js';
|
|
76
74
|
export { createAssemblyNode, addChild, removeChild, updateNode, findNode, walkAssembly, countNodes, collectShapes, type AssemblyNode, type AssemblyNodeOptions, } from './operations/assemblyFns.js';
|
|
77
75
|
export { createHistory, addStep, undoLast, findStep, getShape as getHistoryShape, stepCount, stepsFrom, registerShape, createRegistry, registerOperation, replayHistory, replayFrom, modifyStep, type OperationStep, type ModelHistory, type OperationFn, type OperationRegistry as HistoryOperationRegistry, } from './operations/historyFns.js';
|
|
@@ -85,7 +83,7 @@ export type { Shapeable, WrappedMarker, FinderFn, FilletRadius, ChamferDistance,
|
|
|
85
83
|
export { resolve, resolve3D } from './topology/apiTypes.js';
|
|
86
84
|
export { box, cylinder, sphere, cone, torus, ellipsoid, line, circle, ellipse, helix, threePointArc, ellipseArc, bsplineApprox, bezier, tangentArc, wire, face, filledFace, subFace, polygon, vertex, compound, solid, offsetFace, sewShells, addHoles, type BoxOptions, type CylinderOptions, type SphereOptions, type ConeOptions, type TorusOptions, type EllipsoidOptions, type CircleOptions, type EllipseOptions, type HelixOptions, type EllipseArcOptions, } from './topology/primitiveFns.js';
|
|
87
85
|
export { translate, rotate, mirror, scale, clone, fuse, cut, intersect, section, split, slice, fillet, chamfer, shell, offset, thicken, heal, simplify, mesh, meshEdges, describe, toBREP, fromBREP, isValid, isEmpty, type RotateOptions, type MirrorOptions, type ScaleOptions, } from './topology/api.js';
|
|
88
|
-
export { extrude, revolve, loft, type RevolveOptions, type LoftOptions as CleanLoftOptions, type
|
|
86
|
+
export { extrude, revolve, loft, type RevolveOptions, type LoftOptions as CleanLoftOptions, type SweepOptions as CleanSweepOptions, } from './operations/api.js';
|
|
89
87
|
export { drill, pocket, boss, mirrorJoin, rectangularPattern } from './topology/compoundOpsFns.js';
|
|
90
88
|
export { shape, BrepWrapperError, type Wrapped, type Wrapped3D, type WrappedCurve, type WrappedFace, } from './topology/wrapperFns.js';
|
|
91
89
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAI1D,OAAO,EACL,EAAE,EACF,GAAG,EACH,EAAE,EACF,IAAI,EACJ,KAAK,EACL,GAAG,EACH,MAAM,EACN,OAAO,EACP,OAAO,EACP,MAAM,EACN,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,KAAK,EACL,OAAO,EACP,QAAQ,EACR,aAAa,EACb,QAAQ,EACR,KAAK,MAAM,EACX,KAAK,EAAE,EACP,KAAK,GAAG,EACR,KAAK,IAAI,EACT,KAAK,cAAc,GACpB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAEjE,OAAO,EACL,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,aAAa,EACb,SAAS,EACT,eAAe,EACf,aAAa,EACb,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,OAAO,EACP,UAAU,EACV,GAAG,EACH,YAAY,GACb,MAAM,kBA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AI,EACJ,IAAI,EACJ,UAAU,EACV,OAAO,EACP,OAAO,EACP,MAAM,EACN,QAAQ,EACR,KAAK,EACL,UAAU,EACV,SAAS,EACT,QAAQ,EAER,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,iBAAiB,GACvB,MAAM,4BAA4B,CAAC;AAIpC,OAAO,EAEL,SAAS,EACT,MAAM,EACN,MAAM,EACN,KAAK,EACL,KAAK,EAEL,IAAI,EACJ,GAAG,EACH,SAAS,EACT,OAAO,EACP,KAAK,EACL,KAAK,EAEL,MAAM,EACN,OAAO,EACP,KAAK,EACL,MAAM,EACN,OAAO,EAEP,IAAI,EACJ,QAAQ,EACR,IAAI,EACJ,SAAS,EACT,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,OAAO,EACP,OAAO,EAEP,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,YAAY,GAClB,MAAM,mBAAmB,CAAC;AAI3B,OAAO,EACL,OAAO,EACP,OAAO,EACP,IAAI,EACJ,KAAK,cAAc,EACnB,KAAK,WAAW,IAAI,gBAAgB,EACpC,KAAK,YAAY,IAAI,iBAAiB,GACvC,MAAM,qBAAqB,CAAC;AAI7B,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAInG,OAAO,EACL,KAAK,EACL,gBAAgB,EAChB,KAAK,OAAO,EACZ,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,WAAW,GACjB,MAAM,0BAA0B,CAAC"}
|
package/dist/io.cjs
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const occtBoundary = require("./occtBoundary-du8_ex-p.cjs");
|
|
4
4
|
const shapeTypes = require("./shapeTypes-DKhwEnUM.cjs");
|
|
5
5
|
const errors = require("./errors-DK1VAdP4.cjs");
|
|
6
|
-
const meshFns = require("./meshFns-
|
|
6
|
+
const meshFns = require("./meshFns-BhrZGi6w.cjs");
|
|
7
7
|
const Blueprint = require("./Blueprint-CVctc41Z.cjs");
|
|
8
8
|
function vec3At(arr, i) {
|
|
9
9
|
const off = i * 3;
|
package/dist/io.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { g as getKernel, n as uniqueId } from "./occtBoundary-CwegMzqc.js";
|
|
2
2
|
import { c as castShape, n as gcWithScope } from "./shapeTypes-BlSElW8z.js";
|
|
3
3
|
import { e as err, i as ioError, l as ok } from "./errors-wGhcJMpB.js";
|
|
4
|
-
import { e, d, f } from "./meshFns-
|
|
4
|
+
import { e, d, f } from "./meshFns-AqAjTTVl.js";
|
|
5
5
|
import { B as Blueprint, c as make2dSegmentCurve, f as make2dThreePointArc, l as make2dBezierCurve } from "./Blueprint-D3JfGJTz.js";
|
|
6
6
|
function vec3At(arr, i) {
|
|
7
7
|
const off = i * 3;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { g as getKernel, u as uniqueIOFilename } from "./occtBoundary-CwegMzqc.js";
|
|
2
2
|
import { l as ok, e as err, i as ioError } from "./errors-wGhcJMpB.js";
|
|
3
|
-
function buildMeshCacheKey(
|
|
3
|
+
function buildMeshCacheKey(tolerance, angularTolerance, skipNormals) {
|
|
4
4
|
return `${tolerance}:${angularTolerance}:${skipNormals}`;
|
|
5
5
|
}
|
|
6
|
-
function buildEdgeMeshCacheKey(
|
|
6
|
+
function buildEdgeMeshCacheKey(tolerance, angularTolerance) {
|
|
7
7
|
return `edge:${tolerance}:${angularTolerance}`;
|
|
8
8
|
}
|
|
9
9
|
let meshCache = /* @__PURE__ */ new WeakMap();
|
|
@@ -79,7 +79,7 @@ function mesh(shape, {
|
|
|
79
79
|
signal
|
|
80
80
|
} = {}) {
|
|
81
81
|
signal?.throwIfAborted();
|
|
82
|
-
const cacheKey = buildMeshCacheKey(
|
|
82
|
+
const cacheKey = buildMeshCacheKey(tolerance, angularTolerance, skipNormals);
|
|
83
83
|
if (cache && !includeUVs) {
|
|
84
84
|
const cached = getMeshForShape(shape.wrapped, cacheKey);
|
|
85
85
|
if (cached) return cached;
|
|
@@ -108,7 +108,7 @@ function mesh(shape, {
|
|
|
108
108
|
return mesh2;
|
|
109
109
|
}
|
|
110
110
|
function meshEdges(shape, { tolerance = 1e-3, angularTolerance = 0.1, cache = true } = {}) {
|
|
111
|
-
const cacheKey = buildEdgeMeshCacheKey(
|
|
111
|
+
const cacheKey = buildEdgeMeshCacheKey(tolerance, angularTolerance);
|
|
112
112
|
if (cache) {
|
|
113
113
|
const cached = getEdgeMeshForShape(shape.wrapped, cacheKey);
|
|
114
114
|
if (cached) return cached;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const occtBoundary = require("./occtBoundary-du8_ex-p.cjs");
|
|
3
3
|
const errors = require("./errors-DK1VAdP4.cjs");
|
|
4
|
-
function buildMeshCacheKey(
|
|
4
|
+
function buildMeshCacheKey(tolerance, angularTolerance, skipNormals) {
|
|
5
5
|
return `${tolerance}:${angularTolerance}:${skipNormals}`;
|
|
6
6
|
}
|
|
7
|
-
function buildEdgeMeshCacheKey(
|
|
7
|
+
function buildEdgeMeshCacheKey(tolerance, angularTolerance) {
|
|
8
8
|
return `edge:${tolerance}:${angularTolerance}`;
|
|
9
9
|
}
|
|
10
10
|
let meshCache = /* @__PURE__ */ new WeakMap();
|
|
@@ -80,7 +80,7 @@ function mesh(shape, {
|
|
|
80
80
|
signal
|
|
81
81
|
} = {}) {
|
|
82
82
|
signal?.throwIfAborted();
|
|
83
|
-
const cacheKey = buildMeshCacheKey(
|
|
83
|
+
const cacheKey = buildMeshCacheKey(tolerance, angularTolerance, skipNormals);
|
|
84
84
|
if (cache && !includeUVs) {
|
|
85
85
|
const cached = getMeshForShape(shape.wrapped, cacheKey);
|
|
86
86
|
if (cached) return cached;
|
|
@@ -109,7 +109,7 @@ function mesh(shape, {
|
|
|
109
109
|
return mesh2;
|
|
110
110
|
}
|
|
111
111
|
function meshEdges(shape, { tolerance = 1e-3, angularTolerance = 0.1, cache = true } = {}) {
|
|
112
|
-
const cacheKey = buildEdgeMeshCacheKey(
|
|
112
|
+
const cacheKey = buildEdgeMeshCacheKey(tolerance, angularTolerance);
|
|
113
113
|
if (cache) {
|
|
114
114
|
const cached = getEdgeMeshForShape(shape.wrapped, cacheKey);
|
|
115
115
|
if (cached) return cached;
|
package/dist/operations/api.d.ts
CHANGED
|
@@ -3,8 +3,8 @@ import { Face, Wire, Shape3D, Solid } from '../core/shapeTypes.js';
|
|
|
3
3
|
import { Result } from '../core/result.js';
|
|
4
4
|
import { Shapeable } from '../topology/apiTypes.js';
|
|
5
5
|
import * as lofting from './loftFns.js';
|
|
6
|
-
export type { LoftOptions
|
|
7
|
-
export type { SweepOptions
|
|
6
|
+
export type { LoftOptions } from './loftFns.js';
|
|
7
|
+
export type { SweepOptions } from './extrudeFns.js';
|
|
8
8
|
/**
|
|
9
9
|
* Extrude a face to produce a solid.
|
|
10
10
|
*
|
|
@@ -17,8 +17,6 @@ export declare function extrude(face: Shapeable<Face>, height: number | Vec3): R
|
|
|
17
17
|
export interface RevolveOptions {
|
|
18
18
|
/** Rotation axis. Default: [0, 0, 1] (Z). */
|
|
19
19
|
axis?: Vec3;
|
|
20
|
-
/** @deprecated Use `at` instead. Will be removed in v8.0.0. */
|
|
21
|
-
around?: Vec3;
|
|
22
20
|
/** Pivot point. Default: [0, 0, 0]. */
|
|
23
21
|
at?: Vec3;
|
|
24
22
|
/** Rotation angle in degrees. Default: 360 (full revolution). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/operations/api.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAA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CAAC,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC,OAAO,CAAC,CAQxF;AAMD;;GAEG;AACH,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,WAAW,GAAG,MAAM,CAAC,OAAO,CAAC,CAG7F"}
|
|
@@ -13,8 +13,6 @@ export interface ShapeOptions {
|
|
|
13
13
|
/** Display name for the shape node. Auto-generated UUID if omitted. */
|
|
14
14
|
name?: string;
|
|
15
15
|
}
|
|
16
|
-
/** @deprecated Use ShapeOptions instead. Will be removed in v8.0.0. */
|
|
17
|
-
export type ShapeConfig = ShapeOptions;
|
|
18
16
|
/**
|
|
19
17
|
* Create an XCAF document from shape configs and export as a STEP blob.
|
|
20
18
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exporterFns.d.ts","sourceRoot":"","sources":["../../src/operations/exporterFns.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAGtD,OAAO,EAAE,KAAK,MAAM,EAAW,MAAM,mBAAmB,CAAC;AAGzD,OAAO,EAKL,KAAK,aAAa,EACnB,MAAM,oBAAoB,CAAC;AAM5B,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,4EAA4E;AAC5E,MAAM,WAAW,YAAY;IAC3B,oDAAoD;IACpD,KAAK,EAAE,QAAQ,CAAC;IAChB,4DAA4D;IAC5D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iEAAiE;IACjE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uEAAuE;IACvE,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED
|
|
1
|
+
{"version":3,"file":"exporterFns.d.ts","sourceRoot":"","sources":["../../src/operations/exporterFns.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAGtD,OAAO,EAAE,KAAK,MAAM,EAAW,MAAM,mBAAmB,CAAC;AAGzD,OAAO,EAKL,KAAK,aAAa,EACnB,MAAM,oBAAoB,CAAC;AAM5B,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,4EAA4E;AAC5E,MAAM,WAAW,YAAY;IAC3B,oDAAoD;IACpD,KAAK,EAAE,QAAQ,CAAC;IAChB,4DAA4D;IAC5D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iEAAiE;IACjE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uEAAuE;IACvE,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,GAAE,YAAY,EAAO,EAC3B,EAAE,IAAI,EAAE,SAAS,EAAE,GAAE;IAAE,IAAI,CAAC,EAAE,aAAa,CAAC;IAAC,SAAS,CAAC,EAAE,aAAa,CAAA;CAAO,GAC5E,MAAM,CAAC,IAAI,CAAC,CAuDd"}
|
|
@@ -29,8 +29,6 @@ export interface GenericSweepOptions extends Omit<SweepOptions, 'auxiliarySpine'
|
|
|
29
29
|
/** Auxiliary spine for twist control (Wire or Edge in OO API) */
|
|
30
30
|
auxiliarySpine?: Wire | Edge;
|
|
31
31
|
}
|
|
32
|
-
/** @deprecated Use GenericSweepOptions instead. Will be removed in v8.0.0. */
|
|
33
|
-
export type GenericSweepConfig = GenericSweepOptions;
|
|
34
32
|
declare function genericSweep(wire: Wire, spine: Wire, sweepConfig: GenericSweepOptions, shellMode: true): Result<[Shape3D, Wire, Wire]>;
|
|
35
33
|
declare function genericSweep(wire: Wire, spine: Wire, sweepConfig: GenericSweepOptions, shellMode?: false): Result<Shape3D>;
|
|
36
34
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extrude.d.ts","sourceRoot":"","sources":["../../src/operations/ext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AAE1B,iBAAS,YAAY,CACnB,IAAI,EAAE,IAAI,EACV,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,UAAU,EAClB,MAAM,EAAE,UAAU,EAClB,YAAY,CAAC,EAAE,gBAAgB,EAC/B,SAAS,CAAC,EAAE,KAAK,GAChB,MAAM,CAAC,OAAO,CAAC,CAAC;AACnB,iBAAS,YAAY,CACnB,IAAI,EAAE,IAAI,EACV,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,UAAU,EAClB,MAAM,EAAE,UAAU,EAClB,YAAY,EAAE,gBAAgB,GAAG,SAAS,EAC1C,SAAS,EAAE,IAAI,GACd,MAAM,CAAC,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;AAgCjC;;;;;;;GAOG;AACH,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -7,7 +7,7 @@ import { ExtrusionProfile, SweepOptions } from './extrudeUtils.js';
|
|
|
7
7
|
* Immutable: all functions return new shapes without disposing inputs.
|
|
8
8
|
*/
|
|
9
9
|
type OcType = any;
|
|
10
|
-
export type { ExtrusionProfile, SweepOptions
|
|
10
|
+
export type { ExtrusionProfile, SweepOptions } from './extrudeUtils.js';
|
|
11
11
|
/**
|
|
12
12
|
* Extrude a face along a vector to produce a solid.
|
|
13
13
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extrudeFns.d.ts","sourceRoot":"","sources":["../../src/operations/extrudeFns.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,KAAK,MAAM,GAAG,GAAG,CAAC;AAGlB,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAI7C,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAIxE,OAAO,EAAE,KAAK,MAAM,EAA0B,MAAM,mBAAmB,CAAC;AAExE,OAAO,EAAuB,KAAK,gBAAgB,EAAE,KA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,OAAO,EAAE,MAAM,GACd,MAAM,CAAC,OAAO,CAAC,CAIjB;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,IAAI,EACZ,MAAM,EAAE,IAAI,EACZ,YAAY,CAAC,EAAE,gBAAgB,EAC/B,SAAS,UAAQ,GAChB,MAAM,CAAC,OAAO,GAAG,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAWzC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,YAAY,CAC1B,IAAI,EAAE,IAAI,EACV,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,IAAI,EACZ,MAAM,EAAE,IAAI,EACZ,YAAY,CAAC,EAAE,gBAAgB,EAC/B,SAAS,UAAQ,GAChB,MAAM,CAAC,OAAO,GAAG,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAmBzC"}
|
|
@@ -23,8 +23,6 @@ export interface SweepOptions {
|
|
|
23
23
|
/** Force profile to be orthogonal to spine */
|
|
24
24
|
forceProfileSpineOthogonality?: boolean;
|
|
25
25
|
}
|
|
26
|
-
/** @deprecated Use SweepOptions instead. Will be removed in v8.0.0. */
|
|
27
|
-
export type SweepConfig = SweepOptions;
|
|
28
26
|
/** Configuration for extrusion profile scaling along the path. */
|
|
29
27
|
export interface ExtrusionProfile {
|
|
30
28
|
/** Profile curve type: 's-curve' for smooth easing, 'linear' for constant scaling */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extrudeUtils.d.ts","sourceRoot":"","sources":["../../src/operations/extrudeUtils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,KAAK,MAAM,GAAG,GAAG,CAAC;AAIlB,OAAO,EAAE,KAAK,MAAM,EAAW,MAAM,mBAAmB,CAAC;AAOzD,6DAA6D;AAC7D,MAAM,WAAW,YAAY;IAC3B,mDAAmD;IACnD,MAAM,CA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;;;;GAWG;AACH,wBAAgB,mBAAmB,CACjC,eAAe,EAAE,MAAM,EACvB,EAAE,OAAO,EAAE,SAAa,EAAE,EAAE,gBAAgB,GAC3C,MAAM,CAAC,MAAM,CAAC,CAkBhB"}
|
|
@@ -10,8 +10,6 @@ export interface LoftOptions {
|
|
|
10
10
|
/** Optional end vertex after the last wire profile. */
|
|
11
11
|
endPoint?: PointInput;
|
|
12
12
|
}
|
|
13
|
-
/** @deprecated Use LoftOptions instead. Will be removed in v8.0.0. */
|
|
14
|
-
export type LoftConfig = LoftOptions;
|
|
15
13
|
/**
|
|
16
14
|
* Loft through a set of wire profiles to create a 3D shape.
|
|
17
15
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loftFns.d.ts","sourceRoot":"","sources":["../../src/operations/loftFns.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAGnD,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAG3D,OAAO,EAAE,KAAK,MAAM,EAAW,MAAM,mBAAmB,CAAC;AAGzD,uDAAuD;AACvD,MAAM,WAAW,WAAW;IAC1B,+EAA+E;IAC/E,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,2DAA2D;IAC3D,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,uDAAuD;IACvD,QAAQ,CAAC,EAAE,UAAU,CAAC;CACvB;AAED
|
|
1
|
+
{"version":3,"file":"loftFns.d.ts","sourceRoot":"","sources":["../../src/operations/loftFns.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAGnD,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAG3D,OAAO,EAAE,KAAK,MAAM,EAAW,MAAM,mBAAmB,CAAC;AAGzD,uDAAuD;AACvD,MAAM,WAAW,WAAW;IAC1B,+EAA+E;IAC/E,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,2DAA2D;IAC3D,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,uDAAuD;IACvD,QAAQ,CAAC,EAAE,UAAU,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,IAAI,CAClB,KAAK,EAAE,IAAI,EAAE,EACb,EAAE,KAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAE,WAAgB,EACxD,WAAW,UAAQ,GAClB,MAAM,CAAC,OAAO,CAAC,CAoCjB"}
|
package/dist/operations.d.ts
CHANGED
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
* import { sweep, linearPattern } from 'brepjs/operations';
|
|
7
7
|
* ```
|
|
8
8
|
*/
|
|
9
|
-
export { sweep, supportExtrude, complexExtrude, twistExtrude, type SweepOptions, type
|
|
9
|
+
export { sweep, supportExtrude, complexExtrude, twistExtrude, type SweepOptions, type ExtrusionProfile, } from './operations/extrudeFns.js';
|
|
10
10
|
export { linearPattern, circularPattern } from './operations/patternFns.js';
|
|
11
11
|
export { createAssemblyNode, addChild, removeChild, updateNode, findNode, walkAssembly, countNodes, collectShapes, type AssemblyNode, type AssemblyNodeOptions, } from './operations/assemblyFns.js';
|
|
12
|
-
export { exportAssemblySTEP, type ShapeOptions, type
|
|
12
|
+
export { exportAssemblySTEP, type ShapeOptions, type SupportedUnit, } from './operations/exporterFns.js';
|
|
13
13
|
export { createHistory, addStep, undoLast, findStep, getShape as getHistoryShape, stepCount, stepsFrom, registerShape, createRegistry, registerOperation, replayHistory, replayFrom, modifyStep, type OperationStep, type ModelHistory, type OperationFn, type OperationRegistry as HistoryOperationRegistry, } from './operations/historyFns.js';
|
|
14
|
-
export { basicFaceExtrusion, revolution, genericSweep, type GenericSweepOptions,
|
|
14
|
+
export { basicFaceExtrusion, revolution, genericSweep, type GenericSweepOptions, } from './operations/extrude.js';
|
|
15
15
|
export { loft } from './operations/loft.js';
|
|
16
16
|
export { type AssemblyExporter, createAssembly } from './operations/exporters.js';
|
|
17
17
|
//# sourceMappingURL=operations.d.ts.map
|
package/dist/operations.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../src/operations.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,EACL,KAAK,EACL,cAAc,EACd,cAAc,EACd,YAAY,EACZ,KAAK,YAAY,EACjB,KAAK,
|
|
1
|
+
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../src/operations.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,EACL,KAAK,EACL,cAAc,EACd,cAAc,EACd,YAAY,EACZ,KAAK,YAAY,EACjB,KAAK,gBAAgB,GACtB,MAAM,4BAA4B,CAAC;AAIpC,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAI5E,OAAO,EACL,kBAAkB,EAClB,QAAQ,EACR,WAAW,EACX,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,aAAa,EACb,KAAK,YAAY,EACjB,KAAK,mBAAmB,GACzB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EACL,kBAAkB,EAClB,KAAK,YAAY,EACjB,KAAK,aAAa,GACnB,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EACL,aAAa,EACb,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,QAAQ,IAAI,eAAe,EAC3B,SAAS,EACT,SAAS,EACT,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,UAAU,EACV,UAAU,EACV,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,iBAAiB,IAAI,wBAAwB,GACnD,MAAM,4BAA4B,CAAC;AAIpC,OAAO,EACL,kBAAkB,EAClB,UAAU,EACV,YAAY,EACZ,KAAK,mBAAmB,GACzB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAE5C,OAAO,EAAE,KAAK,gBAAgB,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -14,10 +14,8 @@ export type SplineOptions = SplineTangent | {
|
|
|
14
14
|
startFactor?: number;
|
|
15
15
|
endFactor?: number;
|
|
16
16
|
};
|
|
17
|
-
/** @
|
|
18
|
-
export
|
|
19
|
-
/** Resolve a {@link SplineConfig} into fully-expanded tangent directions and factors. */
|
|
20
|
-
export declare const defaultsSplineConfig: (config?: SplineOptions) => {
|
|
17
|
+
/** Resolve a {@link SplineOptions} into fully-expanded tangent directions and factors. */
|
|
18
|
+
export declare const defaultsSplineOptions: (config?: SplineOptions) => {
|
|
21
19
|
endTangent: Point2D | "symmetric";
|
|
22
20
|
startTangent?: Point2D | undefined;
|
|
23
21
|
startFactor: number;
|