brepjs 18.35.3 → 18.35.5
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.cjs +6 -6
- package/dist/2d.js +6 -6
- package/dist/{blueprint-BugZrlJZ.js → blueprint-DFX9Mice.js} +5 -5
- package/dist/{blueprint-BZtQ37hZ.cjs → blueprint-Dt8UBapg.cjs} +5 -5
- package/dist/{blueprintFns-DZreBQDw.js → blueprintFns-DKm_TMpq.js} +2 -2
- package/dist/{blueprintFns-Cd6RX-3U.cjs → blueprintFns-DUrh_Vuo.cjs} +2 -2
- package/dist/{blueprintSketcher-CeUtlreY.cjs → blueprintSketcher-CSWQy4s0.cjs} +3 -3
- package/dist/{blueprintSketcher-Br9S5j8n.js → blueprintSketcher-CqdAW9fb.js} +3 -3
- package/dist/{boolean2D-jMwDLuLK.js → boolean2D-CAMPcmle.js} +4 -4
- package/dist/{boolean2D-B30MyM5A.cjs → boolean2D-LKA2WvT1.cjs} +4 -4
- package/dist/{booleanFns-NkgP7bZA.cjs → booleanFns-BherB6vd.cjs} +4 -4
- package/dist/{booleanFns-BPWMgD1t.js → booleanFns-ky-zHUHR.js} +4 -4
- package/dist/brepjs.cjs +25 -25
- package/dist/brepjs.js +25 -25
- package/dist/{cameraFns-B5FrSRRP.js → cameraFns-AIlIbZXo.js} +2 -2
- package/dist/{cameraFns-Bb5fmsNi.cjs → cameraFns-D_6uvLNa.cjs} +2 -2
- package/dist/core.cjs +1 -1
- package/dist/core.js +1 -1
- package/dist/{cornerFinder-NT0nEY2D.js → cornerFinder-CHrWbA9J.js} +1 -1
- package/dist/{cornerFinder-Nd00yMHA.cjs → cornerFinder-D0D01Iv4.cjs} +1 -1
- package/dist/{curveFns-D1IaRpWu.js → curveFns-DC4gwhim.js} +1 -1
- package/dist/{curveFns-tBJhB6jA.cjs → curveFns-DplagD2s.cjs} +1 -1
- package/dist/{drawFns-BetA5msk.js → drawFns-2FS4bc0v.js} +12 -12
- package/dist/{drawFns-C9WFdiAW.cjs → drawFns-shtE96tg.cjs} +12 -12
- package/dist/{extrudeFns-DWeYb6cu.js → extrudeFns-B2koxf8d.js} +1 -1
- package/dist/{extrudeFns-Bg-IXT_O.cjs → extrudeFns-CGXjoiA3.cjs} +1 -1
- package/dist/{faceFns-ThsHosgU.cjs → faceFns-D-i7rp7Y.cjs} +2 -2
- package/dist/{faceFns-DBEEcVC-.js → faceFns-D9IXo1EY.js} +2 -2
- package/dist/{helpers-D2RrISk0.js → helpers-6tUnAb2m.js} +6 -6
- package/dist/{helpers-D6XMORWy.cjs → helpers-DoflJrR5.cjs} +6 -6
- package/dist/{historyFns-DrjICLPB.cjs → historyFns-1a841VzH.cjs} +4 -4
- package/dist/{historyFns-BSSA9qoA.js → historyFns-Y0v0weT9.js} +4 -4
- package/dist/{importFns-Cq-bKeDn.js → importFns-BsE_nugZ.js} +2 -2
- package/dist/{importFns-B7nffQNd.cjs → importFns-CzArHdFY.cjs} +2 -2
- package/dist/io.cjs +2 -2
- package/dist/io.js +2 -2
- package/dist/kernel/hullGeometry.d.ts +22 -0
- package/dist/kernel/occt/hullOps.d.ts +1 -6
- package/dist/kernel/occtWasm/hullOps.d.ts +1 -5
- package/dist/kernel/occtWasm/kernel2dOps.d.ts +7 -1
- package/dist/kernel/occtWasm/occtWasmAdapter.cjs +1 -1
- package/dist/kernel/occtWasm/occtWasmAdapter.d.ts +1 -1
- package/dist/kernel/occtWasm/occtWasmAdapter.js +1 -1
- package/dist/kernel/occtWasm/occtWasmTypes.d.ts +2 -0
- package/dist/{measureFns-BT_G8lXZ.cjs → measureFns-gkq2sYtY.cjs} +3 -3
- package/dist/{measureFns-BTn_t0LK.js → measureFns-ry6_O167.js} +3 -3
- package/dist/measurement.cjs +1 -1
- package/dist/measurement.js +1 -1
- package/dist/{meshFns-CR68GwS8.js → meshFns-CEECiqKQ.js} +3 -3
- package/dist/{meshFns-BcYvu4zj.cjs → meshFns-D-4VAld_.cjs} +3 -3
- package/dist/{occtWasmAdapter-DUruQhFF.js → occtWasmAdapter-DNXBos24.js} +360 -132
- package/dist/{occtWasmAdapter-R8zCS1h7.cjs → occtWasmAdapter-sH6wg1Z6.cjs} +365 -131
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/{primitiveFns-BjeLfI12.js → primitiveFns-BiEXbXUy.js} +7 -7
- package/dist/{primitiveFns-DtY84t7q.cjs → primitiveFns-IFpwC8fs.cjs} +7 -7
- package/dist/projection.cjs +1 -1
- package/dist/projection.js +1 -1
- package/dist/query.cjs +2 -2
- package/dist/query.js +2 -2
- package/dist/{shapeFns-oS8Us7JQ.js → shapeFns-2ZBm7gZd.js} +2 -2
- package/dist/{shapeFns-lDEvCF5Q.cjs → shapeFns-BsNw-egb.cjs} +2 -2
- package/dist/shapeRef.cjs +1 -1
- package/dist/shapeRef.js +1 -1
- package/dist/{shapeRefFns-DHioZfFV.cjs → shapeRefFns-4I03ZCKU.cjs} +4 -4
- package/dist/{shapeRefFns-C2DbyKEO.js → shapeRefFns-VuIGZejB.js} +4 -4
- package/dist/{shapeTypes-BiX2PjaO.cjs → shapeTypes-CUTaIMCC.cjs} +5 -243
- package/dist/{shapeTypes-BH-9bXON.js → shapeTypes-CiEgOVu3.js} +3 -241
- package/dist/sketching.cjs +3 -3
- package/dist/sketching.js +3 -3
- package/dist/{solidBuilders-DR3oU7Fb.cjs → solidBuilders-0Y1U2uMs.cjs} +2 -2
- package/dist/{solidBuilders-BiduNSRx.js → solidBuilders-DV8lvLq3.js} +2 -2
- package/dist/{surfaceBuilders-xmm7fFbW.js → surfaceBuilders-DYzjeM-y.js} +2 -2
- package/dist/{surfaceBuilders-s2Uo2ard.cjs → surfaceBuilders-OUTnDgr5.cjs} +2 -2
- package/dist/text.cjs +2 -2
- package/dist/text.js +2 -2
- package/dist/{textBlueprints-DRh48_Fo.js → textBlueprints-00P4WdIq.js} +7 -7
- package/dist/{textBlueprints-Ca1NcWQg.cjs → textBlueprints-DQcSGfcQ.cjs} +7 -7
- package/dist/{textMetrics-BU6Ow8mb.js → textMetrics-8KJFgEn5.js} +1 -1
- package/dist/{textMetrics-CGN19mAp.cjs → textMetrics-Av8N82V_.cjs} +1 -1
- package/dist/topology.cjs +7 -7
- package/dist/topology.js +7 -7
- package/dist/{topologyQueryFns-B8uqQlEU.js → topologyQueryFns-DXKyoFvA.js} +1 -1
- package/dist/{topologyQueryFns-BoMkI1jZ.cjs → topologyQueryFns-j7sTNssl.cjs} +1 -1
- package/package.json +2 -2
package/dist/shapeRef.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as updateRoles, i as resolveRef, n as captureHint, o as defaultScorer, r as createRef, t as assignRoles } from "./shapeRefFns-
|
|
1
|
+
import { a as updateRoles, i as resolveRef, n as captureHint, o as defaultScorer, r as createRef, t as assignRoles } from "./shapeRefFns-VuIGZejB.js";
|
|
2
2
|
export { assignRoles, captureHint, createRef, defaultScorer, resolveRef, updateRoles };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
|
|
2
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
-
const require_faceFns = require("./faceFns-
|
|
4
|
-
const require_shapeFns = require("./shapeFns-
|
|
5
|
-
const require_measureFns = require("./measureFns-
|
|
2
|
+
const require_topologyQueryFns = require("./topologyQueryFns-j7sTNssl.cjs");
|
|
3
|
+
const require_faceFns = require("./faceFns-D-i7rp7Y.cjs");
|
|
4
|
+
const require_shapeFns = require("./shapeFns-BsNw-egb.cjs");
|
|
5
|
+
const require_measureFns = require("./measureFns-gkq2sYtY.cjs");
|
|
6
6
|
//#region src/topology/shapeRef/scoring.ts
|
|
7
7
|
/**
|
|
8
8
|
* Default face scorer combining surface type, normal alignment, centroid proximity,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as wasmIndex } from "./vec3-Dpha8d5k.js";
|
|
2
|
-
import { c as getFaces } from "./topologyQueryFns-
|
|
3
|
-
import { c as normalAt, n as faceCenter, r as faceGeomType } from "./faceFns-
|
|
4
|
-
import { n as getHashCode } from "./shapeFns-
|
|
5
|
-
import { n as measureArea } from "./measureFns-
|
|
2
|
+
import { c as getFaces } from "./topologyQueryFns-DXKyoFvA.js";
|
|
3
|
+
import { c as normalAt, n as faceCenter, r as faceGeomType } from "./faceFns-D9IXo1EY.js";
|
|
4
|
+
import { n as getHashCode } from "./shapeFns-2ZBm7gZd.js";
|
|
5
|
+
import { n as measureArea } from "./measureFns-ry6_O167.js";
|
|
6
6
|
//#region src/topology/shapeRef/scoring.ts
|
|
7
7
|
/**
|
|
8
8
|
* Default face scorer combining surface type, normal alignment, centroid proximity,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
|
|
2
|
-
const require_occtWasmAdapter = require("./occtWasmAdapter-
|
|
2
|
+
const require_occtWasmAdapter = require("./occtWasmAdapter-sH6wg1Z6.cjs");
|
|
3
3
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
4
4
|
//#region src/kernel/kernel2dTypes.ts
|
|
5
5
|
/** Check if the kernel supports 2D geometry operations. */
|
|
@@ -866,7 +866,7 @@ function makeWire$1(oc, edges) {
|
|
|
866
866
|
* Creates a face from a wire.
|
|
867
867
|
* If planar is true, creates a planar face. Otherwise creates a non-planar filling surface.
|
|
868
868
|
*/
|
|
869
|
-
function makeFace$
|
|
869
|
+
function makeFace$1(oc, wire, planar = true) {
|
|
870
870
|
if (planar) {
|
|
871
871
|
const builder = new oc.BRepBuilderAPI_MakeFace_15(wire, false);
|
|
872
872
|
const face = builder.Face();
|
|
@@ -1038,7 +1038,7 @@ function makeConstructorOps(oc) {
|
|
|
1038
1038
|
makeEdge: (curve, start, end) => makeEdge$1(oc, curve, start, end),
|
|
1039
1039
|
makeWire: (edges) => makeWire$1(oc, edges),
|
|
1040
1040
|
makeWireFromMixed: (items) => makeWireFromMixed$1(oc, items),
|
|
1041
|
-
makeFace: (wire, planar) => makeFace$
|
|
1041
|
+
makeFace: (wire, planar) => makeFace$1(oc, wire, planar),
|
|
1042
1042
|
makeBox: (w, h, d) => makeBox$1(oc, w, h, d),
|
|
1043
1043
|
makeCylinder: (radius, height, center, direction) => makeCylinder$1(oc, radius, height, center, direction),
|
|
1044
1044
|
makeSphere: (radius, center) => makeSphere$1(oc, radius, center),
|
|
@@ -1049,250 +1049,12 @@ function makeConstructorOps(oc) {
|
|
|
1049
1049
|
}
|
|
1050
1050
|
//#endregion
|
|
1051
1051
|
//#region src/kernel/occt/hullOps.ts
|
|
1052
|
-
function sub$1(a, b) {
|
|
1053
|
-
return {
|
|
1054
|
-
x: a.x - b.x,
|
|
1055
|
-
y: a.y - b.y,
|
|
1056
|
-
z: a.z - b.z
|
|
1057
|
-
};
|
|
1058
|
-
}
|
|
1059
|
-
function cross$1(a, b) {
|
|
1060
|
-
return {
|
|
1061
|
-
x: a.y * b.z - a.z * b.y,
|
|
1062
|
-
y: a.z * b.x - a.x * b.z,
|
|
1063
|
-
z: a.x * b.y - a.y * b.x
|
|
1064
|
-
};
|
|
1065
|
-
}
|
|
1066
|
-
function dot$1(a, b) {
|
|
1067
|
-
return a.x * b.x + a.y * b.y + a.z * b.z;
|
|
1068
|
-
}
|
|
1069
|
-
function lengthVec(v) {
|
|
1070
|
-
return Math.sqrt(v.x * v.x + v.y * v.y + v.z * v.z);
|
|
1071
|
-
}
|
|
1072
|
-
function distSq(a, b) {
|
|
1073
|
-
const dx = a.x - b.x;
|
|
1074
|
-
const dy = a.y - b.y;
|
|
1075
|
-
const dz = a.z - b.z;
|
|
1076
|
-
return dx * dx + dy * dy + dz * dz;
|
|
1077
|
-
}
|
|
1078
1052
|
/** Safe array access — throws on out-of-bounds instead of returning undefined. */
|
|
1079
1053
|
function at(arr, i) {
|
|
1080
1054
|
const v = arr[i];
|
|
1081
1055
|
if (v === void 0) throw new Error(`Index ${i} out of bounds`);
|
|
1082
1056
|
return v;
|
|
1083
1057
|
}
|
|
1084
|
-
/** Safe number array access. */
|
|
1085
|
-
function atN(arr, i) {
|
|
1086
|
-
const v = arr[i];
|
|
1087
|
-
if (v === void 0) throw new Error(`Index ${i} out of bounds`);
|
|
1088
|
-
return v;
|
|
1089
|
-
}
|
|
1090
|
-
function makeFace$1(points, a, b, c) {
|
|
1091
|
-
const normal = cross$1(sub$1(at(points, b), at(points, a)), sub$1(at(points, c), at(points, a)));
|
|
1092
|
-
const len = lengthVec(normal);
|
|
1093
|
-
const n = len > 1e-14 ? {
|
|
1094
|
-
x: normal.x / len,
|
|
1095
|
-
y: normal.y / len,
|
|
1096
|
-
z: normal.z / len
|
|
1097
|
-
} : normal;
|
|
1098
|
-
return {
|
|
1099
|
-
a,
|
|
1100
|
-
b,
|
|
1101
|
-
c,
|
|
1102
|
-
normal: n,
|
|
1103
|
-
offset: dot$1(n, at(points, a)),
|
|
1104
|
-
alive: true,
|
|
1105
|
-
outsidePoints: []
|
|
1106
|
-
};
|
|
1107
|
-
}
|
|
1108
|
-
function signedDist(face, point) {
|
|
1109
|
-
return dot$1(face.normal, point) - face.offset;
|
|
1110
|
-
}
|
|
1111
|
-
function deduplicatePoints(points, tolerance) {
|
|
1112
|
-
const tolSq = tolerance * tolerance;
|
|
1113
|
-
const result = [];
|
|
1114
|
-
for (const p of points) {
|
|
1115
|
-
let isDuplicate = false;
|
|
1116
|
-
for (const q of result) if (distSq(p, q) < tolSq) {
|
|
1117
|
-
isDuplicate = true;
|
|
1118
|
-
break;
|
|
1119
|
-
}
|
|
1120
|
-
if (!isDuplicate) result.push(p);
|
|
1121
|
-
}
|
|
1122
|
-
return result;
|
|
1123
|
-
}
|
|
1124
|
-
function findInitialTetrahedron(points) {
|
|
1125
|
-
const n = points.length;
|
|
1126
|
-
if (n < 4) return null;
|
|
1127
|
-
let i0 = 0;
|
|
1128
|
-
let i1 = 1;
|
|
1129
|
-
let maxDist = distSq(at(points, 0), at(points, 1));
|
|
1130
|
-
for (let i = 0; i < n; i++) for (let j = i + 1; j < n; j++) {
|
|
1131
|
-
const d = distSq(at(points, i), at(points, j));
|
|
1132
|
-
if (d > maxDist) {
|
|
1133
|
-
maxDist = d;
|
|
1134
|
-
i0 = i;
|
|
1135
|
-
i1 = j;
|
|
1136
|
-
}
|
|
1137
|
-
}
|
|
1138
|
-
if (maxDist < 1e-20) return null;
|
|
1139
|
-
const lineDir = sub$1(at(points, i1), at(points, i0));
|
|
1140
|
-
let i2 = -1;
|
|
1141
|
-
let maxLineDist = -1;
|
|
1142
|
-
for (let i = 0; i < n; i++) {
|
|
1143
|
-
if (i === i0 || i === i1) continue;
|
|
1144
|
-
const c = cross$1(lineDir, sub$1(at(points, i), at(points, i0)));
|
|
1145
|
-
const d = dot$1(c, c);
|
|
1146
|
-
if (d > maxLineDist) {
|
|
1147
|
-
maxLineDist = d;
|
|
1148
|
-
i2 = i;
|
|
1149
|
-
}
|
|
1150
|
-
}
|
|
1151
|
-
if (i2 === -1 || maxLineDist < 1e-20) return null;
|
|
1152
|
-
const planeNormal = cross$1(sub$1(at(points, i1), at(points, i0)), sub$1(at(points, i2), at(points, i0)));
|
|
1153
|
-
const planeLen = lengthVec(planeNormal);
|
|
1154
|
-
if (planeLen < 1e-14) return null;
|
|
1155
|
-
const pn = {
|
|
1156
|
-
x: planeNormal.x / planeLen,
|
|
1157
|
-
y: planeNormal.y / planeLen,
|
|
1158
|
-
z: planeNormal.z / planeLen
|
|
1159
|
-
};
|
|
1160
|
-
const planeOffset = dot$1(pn, at(points, i0));
|
|
1161
|
-
let i3 = -1;
|
|
1162
|
-
let maxPlaneDist = -1;
|
|
1163
|
-
for (let i = 0; i < n; i++) {
|
|
1164
|
-
if (i === i0 || i === i1 || i === i2) continue;
|
|
1165
|
-
const d = Math.abs(dot$1(pn, at(points, i)) - planeOffset);
|
|
1166
|
-
if (d > maxPlaneDist) {
|
|
1167
|
-
maxPlaneDist = d;
|
|
1168
|
-
i3 = i;
|
|
1169
|
-
}
|
|
1170
|
-
}
|
|
1171
|
-
if (i3 === -1 || maxPlaneDist < 1e-14) return null;
|
|
1172
|
-
if (dot$1(pn, at(points, i3)) - planeOffset > 0) return [
|
|
1173
|
-
i0,
|
|
1174
|
-
i2,
|
|
1175
|
-
i1,
|
|
1176
|
-
i3
|
|
1177
|
-
];
|
|
1178
|
-
return [
|
|
1179
|
-
i0,
|
|
1180
|
-
i1,
|
|
1181
|
-
i2,
|
|
1182
|
-
i3
|
|
1183
|
-
];
|
|
1184
|
-
}
|
|
1185
|
-
function quickHull(inputPoints, tolerance) {
|
|
1186
|
-
const points = deduplicatePoints(inputPoints, tolerance);
|
|
1187
|
-
if (points.length < 4) throw new Error(points.length === 0 ? "No points provided for convex hull" : "Fewer than 4 non-coincident points; cannot form a 3D convex hull");
|
|
1188
|
-
const tet = findInitialTetrahedron(points);
|
|
1189
|
-
if (tet === null) throw new Error("All points are coplanar; cannot form a 3D convex hull");
|
|
1190
|
-
const [t0, t1, t2, t3] = tet;
|
|
1191
|
-
const centroid = {
|
|
1192
|
-
x: (at(points, t0).x + at(points, t1).x + at(points, t2).x + at(points, t3).x) / 4,
|
|
1193
|
-
y: (at(points, t0).y + at(points, t1).y + at(points, t2).y + at(points, t3).y) / 4,
|
|
1194
|
-
z: (at(points, t0).z + at(points, t1).z + at(points, t2).z + at(points, t3).z) / 4
|
|
1195
|
-
};
|
|
1196
|
-
function makeOutwardFace(a, b, c) {
|
|
1197
|
-
const face = makeFace$1(points, a, b, c);
|
|
1198
|
-
const toCentroid = sub$1(centroid, {
|
|
1199
|
-
x: (at(points, a).x + at(points, b).x + at(points, c).x) / 3,
|
|
1200
|
-
y: (at(points, a).y + at(points, b).y + at(points, c).y) / 3,
|
|
1201
|
-
z: (at(points, a).z + at(points, b).z + at(points, c).z) / 3
|
|
1202
|
-
});
|
|
1203
|
-
if (dot$1(face.normal, toCentroid) > 0) return makeFace$1(points, a, c, b);
|
|
1204
|
-
return face;
|
|
1205
|
-
}
|
|
1206
|
-
const faces = [
|
|
1207
|
-
makeOutwardFace(t0, t1, t2),
|
|
1208
|
-
makeOutwardFace(t0, t2, t3),
|
|
1209
|
-
makeOutwardFace(t0, t3, t1),
|
|
1210
|
-
makeOutwardFace(t1, t3, t2)
|
|
1211
|
-
];
|
|
1212
|
-
const tetSet = new Set([
|
|
1213
|
-
t0,
|
|
1214
|
-
t1,
|
|
1215
|
-
t2,
|
|
1216
|
-
t3
|
|
1217
|
-
]);
|
|
1218
|
-
const epsilon = 1e-10;
|
|
1219
|
-
for (let i = 0; i < points.length; i++) {
|
|
1220
|
-
if (tetSet.has(i)) continue;
|
|
1221
|
-
for (const face of faces) if (signedDist(face, at(points, i)) > epsilon) {
|
|
1222
|
-
face.outsidePoints.push(i);
|
|
1223
|
-
break;
|
|
1224
|
-
}
|
|
1225
|
-
}
|
|
1226
|
-
for (let iteration = 0; iteration < points.length * 4; iteration++) {
|
|
1227
|
-
let currentFace = null;
|
|
1228
|
-
for (const face of faces) if (face.alive && face.outsidePoints.length > 0) {
|
|
1229
|
-
currentFace = face;
|
|
1230
|
-
break;
|
|
1231
|
-
}
|
|
1232
|
-
if (currentFace === null) break;
|
|
1233
|
-
let furthestIdx = atN(currentFace.outsidePoints, 0);
|
|
1234
|
-
let furthestDist = signedDist(currentFace, at(points, furthestIdx));
|
|
1235
|
-
for (let i = 1; i < currentFace.outsidePoints.length; i++) {
|
|
1236
|
-
const idx = atN(currentFace.outsidePoints, i);
|
|
1237
|
-
const d = signedDist(currentFace, at(points, idx));
|
|
1238
|
-
if (d > furthestDist) {
|
|
1239
|
-
furthestDist = d;
|
|
1240
|
-
furthestIdx = idx;
|
|
1241
|
-
}
|
|
1242
|
-
}
|
|
1243
|
-
const visibleFaces = [];
|
|
1244
|
-
for (const face of faces) if (face.alive && signedDist(face, at(points, furthestIdx)) > epsilon) visibleFaces.push(face);
|
|
1245
|
-
const edgeCount = /* @__PURE__ */ new Map();
|
|
1246
|
-
for (const face of visibleFaces) {
|
|
1247
|
-
const edges = [
|
|
1248
|
-
[face.a, face.b],
|
|
1249
|
-
[face.b, face.c],
|
|
1250
|
-
[face.c, face.a]
|
|
1251
|
-
];
|
|
1252
|
-
for (const [ea, eb] of edges) {
|
|
1253
|
-
const key = ea < eb ? `${ea}-${eb}` : `${eb}-${ea}`;
|
|
1254
|
-
const entry = edgeCount.get(key);
|
|
1255
|
-
if (entry) entry.count++;
|
|
1256
|
-
else edgeCount.set(key, {
|
|
1257
|
-
a: ea,
|
|
1258
|
-
b: eb,
|
|
1259
|
-
count: 1
|
|
1260
|
-
});
|
|
1261
|
-
}
|
|
1262
|
-
}
|
|
1263
|
-
const horizonEdges = [];
|
|
1264
|
-
for (const entry of edgeCount.values()) if (entry.count === 1) horizonEdges.push({
|
|
1265
|
-
a: entry.a,
|
|
1266
|
-
b: entry.b
|
|
1267
|
-
});
|
|
1268
|
-
const orphanedPoints = [];
|
|
1269
|
-
for (const face of visibleFaces) {
|
|
1270
|
-
for (const idx of face.outsidePoints) if (idx !== furthestIdx) orphanedPoints.push(idx);
|
|
1271
|
-
face.alive = false;
|
|
1272
|
-
face.outsidePoints = [];
|
|
1273
|
-
}
|
|
1274
|
-
const newFaces = [];
|
|
1275
|
-
for (const edge of horizonEdges) {
|
|
1276
|
-
const newFaceObj = makeFace$1(points, edge.a, edge.b, furthestIdx);
|
|
1277
|
-
newFaces.push(newFaceObj);
|
|
1278
|
-
faces.push(newFaceObj);
|
|
1279
|
-
}
|
|
1280
|
-
for (const idx of orphanedPoints) for (const face of newFaces) if (signedDist(face, at(points, idx)) > epsilon) {
|
|
1281
|
-
face.outsidePoints.push(idx);
|
|
1282
|
-
break;
|
|
1283
|
-
}
|
|
1284
|
-
}
|
|
1285
|
-
const resultFaces = [];
|
|
1286
|
-
for (const face of faces) if (face.alive) resultFaces.push([
|
|
1287
|
-
face.a,
|
|
1288
|
-
face.b,
|
|
1289
|
-
face.c
|
|
1290
|
-
]);
|
|
1291
|
-
return {
|
|
1292
|
-
faces: resultFaces,
|
|
1293
|
-
points
|
|
1294
|
-
};
|
|
1295
|
-
}
|
|
1296
1058
|
function extractVertices(oc, shapes, tolerance) {
|
|
1297
1059
|
const vertices = [];
|
|
1298
1060
|
const meshDeflection = Math.max(tolerance, 1);
|
|
@@ -1392,7 +1154,7 @@ function hull$1(oc, shapes, tolerance) {
|
|
|
1392
1154
|
if (shapes.length === 0) throw new Error("hull: no shapes provided");
|
|
1393
1155
|
const vertices = extractVertices(oc, shapes, tolerance);
|
|
1394
1156
|
if (vertices.length < 4) throw new Error("hull: fewer than 4 vertices extracted from input shapes");
|
|
1395
|
-
const hullResult = quickHull(vertices, tolerance);
|
|
1157
|
+
const hullResult = require_occtWasmAdapter.quickHull(vertices, tolerance);
|
|
1396
1158
|
if (hullResult.faces.length < 4) throw new Error("hull: degenerate hull (fewer than 4 faces)");
|
|
1397
1159
|
return reconstructBrep(oc, hullResult, tolerance);
|
|
1398
1160
|
}
|
|
@@ -1410,7 +1172,7 @@ function buildSolidFromFaces$1(oc, points, faces, tolerance) {
|
|
|
1410
1172
|
}
|
|
1411
1173
|
function hullFromPoints$1(oc, points, tolerance) {
|
|
1412
1174
|
if (points.length < 4) throw new Error("hullFromPoints: fewer than 4 points");
|
|
1413
|
-
const hullResult = quickHull(points, tolerance);
|
|
1175
|
+
const hullResult = require_occtWasmAdapter.quickHull(points, tolerance);
|
|
1414
1176
|
if (hullResult.faces.length < 4) throw new Error("hullFromPoints: degenerate hull (fewer than 4 faces)");
|
|
1415
1177
|
return reconstructBrep(oc, hullResult, tolerance);
|
|
1416
1178
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as wasmIndex, t as vec3At } from "./vec3-Dpha8d5k.js";
|
|
2
|
-
import { _ as serializeCurve2d$2, a as curveTypeName, c as intersectCurves2dFn, d as makeEllipse2d$2, f as makeLine2d$2, g as scaleCurve2d$2, h as rotateCurve2d$2, i as curveBounds, l as makeBezier2d$2, m as mirrorAtPoint, n as addCurveToBBox, o as deserializeCurve2d$2, p as mirrorAcrossAxis, r as createBBox2d, s as evaluateCurve2d$2, u as makeCircle2d$2, v as tangentCurve2d, y as translateCurve2d$2 } from "./occtWasmAdapter-
|
|
2
|
+
import { _ as serializeCurve2d$2, a as curveTypeName, b as quickHull, c as intersectCurves2dFn, d as makeEllipse2d$2, f as makeLine2d$2, g as scaleCurve2d$2, h as rotateCurve2d$2, i as curveBounds, l as makeBezier2d$2, m as mirrorAtPoint, n as addCurveToBBox, o as deserializeCurve2d$2, p as mirrorAcrossAxis, r as createBBox2d, s as evaluateCurve2d$2, u as makeCircle2d$2, v as tangentCurve2d, y as translateCurve2d$2 } from "./occtWasmAdapter-DNXBos24.js";
|
|
3
3
|
import { A as ok, b as err } from "./errors-DNWJsfVU.js";
|
|
4
4
|
//#region src/kernel/kernel2dTypes.ts
|
|
5
5
|
/** Check if the kernel supports 2D geometry operations. */
|
|
@@ -866,7 +866,7 @@ function makeWire$1(oc, edges) {
|
|
|
866
866
|
* Creates a face from a wire.
|
|
867
867
|
* If planar is true, creates a planar face. Otherwise creates a non-planar filling surface.
|
|
868
868
|
*/
|
|
869
|
-
function makeFace$
|
|
869
|
+
function makeFace$1(oc, wire, planar = true) {
|
|
870
870
|
if (planar) {
|
|
871
871
|
const builder = new oc.BRepBuilderAPI_MakeFace_15(wire, false);
|
|
872
872
|
const face = builder.Face();
|
|
@@ -1038,7 +1038,7 @@ function makeConstructorOps(oc) {
|
|
|
1038
1038
|
makeEdge: (curve, start, end) => makeEdge$1(oc, curve, start, end),
|
|
1039
1039
|
makeWire: (edges) => makeWire$1(oc, edges),
|
|
1040
1040
|
makeWireFromMixed: (items) => makeWireFromMixed$1(oc, items),
|
|
1041
|
-
makeFace: (wire, planar) => makeFace$
|
|
1041
|
+
makeFace: (wire, planar) => makeFace$1(oc, wire, planar),
|
|
1042
1042
|
makeBox: (w, h, d) => makeBox$1(oc, w, h, d),
|
|
1043
1043
|
makeCylinder: (radius, height, center, direction) => makeCylinder$1(oc, radius, height, center, direction),
|
|
1044
1044
|
makeSphere: (radius, center) => makeSphere$1(oc, radius, center),
|
|
@@ -1049,250 +1049,12 @@ function makeConstructorOps(oc) {
|
|
|
1049
1049
|
}
|
|
1050
1050
|
//#endregion
|
|
1051
1051
|
//#region src/kernel/occt/hullOps.ts
|
|
1052
|
-
function sub$1(a, b) {
|
|
1053
|
-
return {
|
|
1054
|
-
x: a.x - b.x,
|
|
1055
|
-
y: a.y - b.y,
|
|
1056
|
-
z: a.z - b.z
|
|
1057
|
-
};
|
|
1058
|
-
}
|
|
1059
|
-
function cross$1(a, b) {
|
|
1060
|
-
return {
|
|
1061
|
-
x: a.y * b.z - a.z * b.y,
|
|
1062
|
-
y: a.z * b.x - a.x * b.z,
|
|
1063
|
-
z: a.x * b.y - a.y * b.x
|
|
1064
|
-
};
|
|
1065
|
-
}
|
|
1066
|
-
function dot$1(a, b) {
|
|
1067
|
-
return a.x * b.x + a.y * b.y + a.z * b.z;
|
|
1068
|
-
}
|
|
1069
|
-
function lengthVec(v) {
|
|
1070
|
-
return Math.sqrt(v.x * v.x + v.y * v.y + v.z * v.z);
|
|
1071
|
-
}
|
|
1072
|
-
function distSq(a, b) {
|
|
1073
|
-
const dx = a.x - b.x;
|
|
1074
|
-
const dy = a.y - b.y;
|
|
1075
|
-
const dz = a.z - b.z;
|
|
1076
|
-
return dx * dx + dy * dy + dz * dz;
|
|
1077
|
-
}
|
|
1078
1052
|
/** Safe array access — throws on out-of-bounds instead of returning undefined. */
|
|
1079
1053
|
function at(arr, i) {
|
|
1080
1054
|
const v = arr[i];
|
|
1081
1055
|
if (v === void 0) throw new Error(`Index ${i} out of bounds`);
|
|
1082
1056
|
return v;
|
|
1083
1057
|
}
|
|
1084
|
-
/** Safe number array access. */
|
|
1085
|
-
function atN(arr, i) {
|
|
1086
|
-
const v = arr[i];
|
|
1087
|
-
if (v === void 0) throw new Error(`Index ${i} out of bounds`);
|
|
1088
|
-
return v;
|
|
1089
|
-
}
|
|
1090
|
-
function makeFace$1(points, a, b, c) {
|
|
1091
|
-
const normal = cross$1(sub$1(at(points, b), at(points, a)), sub$1(at(points, c), at(points, a)));
|
|
1092
|
-
const len = lengthVec(normal);
|
|
1093
|
-
const n = len > 1e-14 ? {
|
|
1094
|
-
x: normal.x / len,
|
|
1095
|
-
y: normal.y / len,
|
|
1096
|
-
z: normal.z / len
|
|
1097
|
-
} : normal;
|
|
1098
|
-
return {
|
|
1099
|
-
a,
|
|
1100
|
-
b,
|
|
1101
|
-
c,
|
|
1102
|
-
normal: n,
|
|
1103
|
-
offset: dot$1(n, at(points, a)),
|
|
1104
|
-
alive: true,
|
|
1105
|
-
outsidePoints: []
|
|
1106
|
-
};
|
|
1107
|
-
}
|
|
1108
|
-
function signedDist(face, point) {
|
|
1109
|
-
return dot$1(face.normal, point) - face.offset;
|
|
1110
|
-
}
|
|
1111
|
-
function deduplicatePoints(points, tolerance) {
|
|
1112
|
-
const tolSq = tolerance * tolerance;
|
|
1113
|
-
const result = [];
|
|
1114
|
-
for (const p of points) {
|
|
1115
|
-
let isDuplicate = false;
|
|
1116
|
-
for (const q of result) if (distSq(p, q) < tolSq) {
|
|
1117
|
-
isDuplicate = true;
|
|
1118
|
-
break;
|
|
1119
|
-
}
|
|
1120
|
-
if (!isDuplicate) result.push(p);
|
|
1121
|
-
}
|
|
1122
|
-
return result;
|
|
1123
|
-
}
|
|
1124
|
-
function findInitialTetrahedron(points) {
|
|
1125
|
-
const n = points.length;
|
|
1126
|
-
if (n < 4) return null;
|
|
1127
|
-
let i0 = 0;
|
|
1128
|
-
let i1 = 1;
|
|
1129
|
-
let maxDist = distSq(at(points, 0), at(points, 1));
|
|
1130
|
-
for (let i = 0; i < n; i++) for (let j = i + 1; j < n; j++) {
|
|
1131
|
-
const d = distSq(at(points, i), at(points, j));
|
|
1132
|
-
if (d > maxDist) {
|
|
1133
|
-
maxDist = d;
|
|
1134
|
-
i0 = i;
|
|
1135
|
-
i1 = j;
|
|
1136
|
-
}
|
|
1137
|
-
}
|
|
1138
|
-
if (maxDist < 1e-20) return null;
|
|
1139
|
-
const lineDir = sub$1(at(points, i1), at(points, i0));
|
|
1140
|
-
let i2 = -1;
|
|
1141
|
-
let maxLineDist = -1;
|
|
1142
|
-
for (let i = 0; i < n; i++) {
|
|
1143
|
-
if (i === i0 || i === i1) continue;
|
|
1144
|
-
const c = cross$1(lineDir, sub$1(at(points, i), at(points, i0)));
|
|
1145
|
-
const d = dot$1(c, c);
|
|
1146
|
-
if (d > maxLineDist) {
|
|
1147
|
-
maxLineDist = d;
|
|
1148
|
-
i2 = i;
|
|
1149
|
-
}
|
|
1150
|
-
}
|
|
1151
|
-
if (i2 === -1 || maxLineDist < 1e-20) return null;
|
|
1152
|
-
const planeNormal = cross$1(sub$1(at(points, i1), at(points, i0)), sub$1(at(points, i2), at(points, i0)));
|
|
1153
|
-
const planeLen = lengthVec(planeNormal);
|
|
1154
|
-
if (planeLen < 1e-14) return null;
|
|
1155
|
-
const pn = {
|
|
1156
|
-
x: planeNormal.x / planeLen,
|
|
1157
|
-
y: planeNormal.y / planeLen,
|
|
1158
|
-
z: planeNormal.z / planeLen
|
|
1159
|
-
};
|
|
1160
|
-
const planeOffset = dot$1(pn, at(points, i0));
|
|
1161
|
-
let i3 = -1;
|
|
1162
|
-
let maxPlaneDist = -1;
|
|
1163
|
-
for (let i = 0; i < n; i++) {
|
|
1164
|
-
if (i === i0 || i === i1 || i === i2) continue;
|
|
1165
|
-
const d = Math.abs(dot$1(pn, at(points, i)) - planeOffset);
|
|
1166
|
-
if (d > maxPlaneDist) {
|
|
1167
|
-
maxPlaneDist = d;
|
|
1168
|
-
i3 = i;
|
|
1169
|
-
}
|
|
1170
|
-
}
|
|
1171
|
-
if (i3 === -1 || maxPlaneDist < 1e-14) return null;
|
|
1172
|
-
if (dot$1(pn, at(points, i3)) - planeOffset > 0) return [
|
|
1173
|
-
i0,
|
|
1174
|
-
i2,
|
|
1175
|
-
i1,
|
|
1176
|
-
i3
|
|
1177
|
-
];
|
|
1178
|
-
return [
|
|
1179
|
-
i0,
|
|
1180
|
-
i1,
|
|
1181
|
-
i2,
|
|
1182
|
-
i3
|
|
1183
|
-
];
|
|
1184
|
-
}
|
|
1185
|
-
function quickHull(inputPoints, tolerance) {
|
|
1186
|
-
const points = deduplicatePoints(inputPoints, tolerance);
|
|
1187
|
-
if (points.length < 4) throw new Error(points.length === 0 ? "No points provided for convex hull" : "Fewer than 4 non-coincident points; cannot form a 3D convex hull");
|
|
1188
|
-
const tet = findInitialTetrahedron(points);
|
|
1189
|
-
if (tet === null) throw new Error("All points are coplanar; cannot form a 3D convex hull");
|
|
1190
|
-
const [t0, t1, t2, t3] = tet;
|
|
1191
|
-
const centroid = {
|
|
1192
|
-
x: (at(points, t0).x + at(points, t1).x + at(points, t2).x + at(points, t3).x) / 4,
|
|
1193
|
-
y: (at(points, t0).y + at(points, t1).y + at(points, t2).y + at(points, t3).y) / 4,
|
|
1194
|
-
z: (at(points, t0).z + at(points, t1).z + at(points, t2).z + at(points, t3).z) / 4
|
|
1195
|
-
};
|
|
1196
|
-
function makeOutwardFace(a, b, c) {
|
|
1197
|
-
const face = makeFace$1(points, a, b, c);
|
|
1198
|
-
const toCentroid = sub$1(centroid, {
|
|
1199
|
-
x: (at(points, a).x + at(points, b).x + at(points, c).x) / 3,
|
|
1200
|
-
y: (at(points, a).y + at(points, b).y + at(points, c).y) / 3,
|
|
1201
|
-
z: (at(points, a).z + at(points, b).z + at(points, c).z) / 3
|
|
1202
|
-
});
|
|
1203
|
-
if (dot$1(face.normal, toCentroid) > 0) return makeFace$1(points, a, c, b);
|
|
1204
|
-
return face;
|
|
1205
|
-
}
|
|
1206
|
-
const faces = [
|
|
1207
|
-
makeOutwardFace(t0, t1, t2),
|
|
1208
|
-
makeOutwardFace(t0, t2, t3),
|
|
1209
|
-
makeOutwardFace(t0, t3, t1),
|
|
1210
|
-
makeOutwardFace(t1, t3, t2)
|
|
1211
|
-
];
|
|
1212
|
-
const tetSet = new Set([
|
|
1213
|
-
t0,
|
|
1214
|
-
t1,
|
|
1215
|
-
t2,
|
|
1216
|
-
t3
|
|
1217
|
-
]);
|
|
1218
|
-
const epsilon = 1e-10;
|
|
1219
|
-
for (let i = 0; i < points.length; i++) {
|
|
1220
|
-
if (tetSet.has(i)) continue;
|
|
1221
|
-
for (const face of faces) if (signedDist(face, at(points, i)) > epsilon) {
|
|
1222
|
-
face.outsidePoints.push(i);
|
|
1223
|
-
break;
|
|
1224
|
-
}
|
|
1225
|
-
}
|
|
1226
|
-
for (let iteration = 0; iteration < points.length * 4; iteration++) {
|
|
1227
|
-
let currentFace = null;
|
|
1228
|
-
for (const face of faces) if (face.alive && face.outsidePoints.length > 0) {
|
|
1229
|
-
currentFace = face;
|
|
1230
|
-
break;
|
|
1231
|
-
}
|
|
1232
|
-
if (currentFace === null) break;
|
|
1233
|
-
let furthestIdx = atN(currentFace.outsidePoints, 0);
|
|
1234
|
-
let furthestDist = signedDist(currentFace, at(points, furthestIdx));
|
|
1235
|
-
for (let i = 1; i < currentFace.outsidePoints.length; i++) {
|
|
1236
|
-
const idx = atN(currentFace.outsidePoints, i);
|
|
1237
|
-
const d = signedDist(currentFace, at(points, idx));
|
|
1238
|
-
if (d > furthestDist) {
|
|
1239
|
-
furthestDist = d;
|
|
1240
|
-
furthestIdx = idx;
|
|
1241
|
-
}
|
|
1242
|
-
}
|
|
1243
|
-
const visibleFaces = [];
|
|
1244
|
-
for (const face of faces) if (face.alive && signedDist(face, at(points, furthestIdx)) > epsilon) visibleFaces.push(face);
|
|
1245
|
-
const edgeCount = /* @__PURE__ */ new Map();
|
|
1246
|
-
for (const face of visibleFaces) {
|
|
1247
|
-
const edges = [
|
|
1248
|
-
[face.a, face.b],
|
|
1249
|
-
[face.b, face.c],
|
|
1250
|
-
[face.c, face.a]
|
|
1251
|
-
];
|
|
1252
|
-
for (const [ea, eb] of edges) {
|
|
1253
|
-
const key = ea < eb ? `${ea}-${eb}` : `${eb}-${ea}`;
|
|
1254
|
-
const entry = edgeCount.get(key);
|
|
1255
|
-
if (entry) entry.count++;
|
|
1256
|
-
else edgeCount.set(key, {
|
|
1257
|
-
a: ea,
|
|
1258
|
-
b: eb,
|
|
1259
|
-
count: 1
|
|
1260
|
-
});
|
|
1261
|
-
}
|
|
1262
|
-
}
|
|
1263
|
-
const horizonEdges = [];
|
|
1264
|
-
for (const entry of edgeCount.values()) if (entry.count === 1) horizonEdges.push({
|
|
1265
|
-
a: entry.a,
|
|
1266
|
-
b: entry.b
|
|
1267
|
-
});
|
|
1268
|
-
const orphanedPoints = [];
|
|
1269
|
-
for (const face of visibleFaces) {
|
|
1270
|
-
for (const idx of face.outsidePoints) if (idx !== furthestIdx) orphanedPoints.push(idx);
|
|
1271
|
-
face.alive = false;
|
|
1272
|
-
face.outsidePoints = [];
|
|
1273
|
-
}
|
|
1274
|
-
const newFaces = [];
|
|
1275
|
-
for (const edge of horizonEdges) {
|
|
1276
|
-
const newFaceObj = makeFace$1(points, edge.a, edge.b, furthestIdx);
|
|
1277
|
-
newFaces.push(newFaceObj);
|
|
1278
|
-
faces.push(newFaceObj);
|
|
1279
|
-
}
|
|
1280
|
-
for (const idx of orphanedPoints) for (const face of newFaces) if (signedDist(face, at(points, idx)) > epsilon) {
|
|
1281
|
-
face.outsidePoints.push(idx);
|
|
1282
|
-
break;
|
|
1283
|
-
}
|
|
1284
|
-
}
|
|
1285
|
-
const resultFaces = [];
|
|
1286
|
-
for (const face of faces) if (face.alive) resultFaces.push([
|
|
1287
|
-
face.a,
|
|
1288
|
-
face.b,
|
|
1289
|
-
face.c
|
|
1290
|
-
]);
|
|
1291
|
-
return {
|
|
1292
|
-
faces: resultFaces,
|
|
1293
|
-
points
|
|
1294
|
-
};
|
|
1295
|
-
}
|
|
1296
1058
|
function extractVertices(oc, shapes, tolerance) {
|
|
1297
1059
|
const vertices = [];
|
|
1298
1060
|
const meshDeflection = Math.max(tolerance, 1);
|
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-DQcSGfcQ.cjs");
|
|
3
|
+
const require_blueprintSketcher = require("./blueprintSketcher-CSWQy4s0.cjs");
|
|
4
|
+
const require_drawFns = require("./drawFns-shtE96tg.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-CqdAW9fb.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-2FS4bc0v.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-00P4WdIq.js";
|
|
4
4
|
//#region src/sketching.ts
|
|
5
5
|
/**
|
|
6
6
|
* brepjs/sketching — Sketcher, Drawing, and sketch-to-shape operations.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-CUTaIMCC.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
|
-
const require_faceFns = require("./faceFns-
|
|
3
|
+
const require_faceFns = require("./faceFns-D-i7rp7Y.cjs");
|
|
4
4
|
//#region src/topology/shapeUtils.ts
|
|
5
5
|
/**
|
|
6
6
|
* Shape assembly utilities — welding and sewing operations.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Z as getKernel, _ as isSolid, c as createSolid, g as isShell, h as isShape3D, i as createCompound, l as createVertex } from "./shapeTypes-
|
|
1
|
+
import { Z as getKernel, _ as isSolid, c as createSolid, g as isShell, h as isShape3D, i as createCompound, l as createVertex } from "./shapeTypes-CiEgOVu3.js";
|
|
2
2
|
import { A as ok, R as unwrap, b as err, l as typeCastError, v as andThen } from "./errors-DNWJsfVU.js";
|
|
3
|
-
import { _ as downcast, g as cast } from "./faceFns-
|
|
3
|
+
import { _ as downcast, g as cast } from "./faceFns-D9IXo1EY.js";
|
|
4
4
|
//#region src/topology/shapeUtils.ts
|
|
5
5
|
/**
|
|
6
6
|
* Shape assembly utilities — welding and sewing operations.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Z as getKernel, a as createEdge, o as createFace, p as isFace, u as createWire, w as isPlanarFace } from "./shapeTypes-
|
|
1
|
+
import { Z as getKernel, a as createEdge, o as createFace, p as isFace, u as createWire, w as isPlanarFace } from "./shapeTypes-CiEgOVu3.js";
|
|
2
2
|
import { A as ok, b as err, d as validationError, i as kernelError, v as andThen } from "./errors-DNWJsfVU.js";
|
|
3
|
-
import { g as cast, l as outerWire } from "./faceFns-
|
|
3
|
+
import { g as cast, l as outerWire } from "./faceFns-D9IXo1EY.js";
|
|
4
4
|
//#region src/utils/range.ts
|
|
5
5
|
/** Generate an array of integers `[0, 1, …, len - 1]`. */
|
|
6
6
|
function range(len) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-CUTaIMCC.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
|
-
const require_faceFns = require("./faceFns-
|
|
3
|
+
const require_faceFns = require("./faceFns-D-i7rp7Y.cjs");
|
|
4
4
|
//#region src/utils/range.ts
|
|
5
5
|
/** Generate an array of integers `[0, 1, …, len - 1]`. */
|
|
6
6
|
function range(len) {
|
package/dist/text.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_textBlueprints = require("./textBlueprints-
|
|
3
|
-
const require_textMetrics = require("./textMetrics-
|
|
2
|
+
const require_textBlueprints = require("./textBlueprints-DQcSGfcQ.cjs");
|
|
3
|
+
const require_textMetrics = require("./textMetrics-Av8N82V_.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-00P4WdIq.js";
|
|
2
|
+
import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-8KJFgEn5.js";
|
|
3
3
|
export { fontMetrics, getFont, loadFont, sketchText, textBlueprints, textMetrics };
|