brepjs 18.69.1 → 18.69.3
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-a7QLhV4U.cjs → blueprint-DIQeD9xj.cjs} +5 -5
- package/dist/{blueprint-Z5mhI2QD.js → blueprint-Dgl9IkCV.js} +5 -5
- package/dist/{blueprintFns-DULa6FpG.cjs → blueprintFns-BO44cqFY.cjs} +2 -2
- package/dist/{blueprintFns-BNhsXv6q.js → blueprintFns-sKzHcJ4U.js} +2 -2
- package/dist/{blueprintSketcher-4zOPSOnK.cjs → blueprintSketcher-BpOknLmX.cjs} +3 -3
- package/dist/{blueprintSketcher-0DeTMXwj.js → blueprintSketcher-DbINWerx.js} +3 -3
- package/dist/{boolean2D-BNWuFXK_.js → boolean2D-CreNaKXt.js} +4 -4
- package/dist/{boolean2D-xDBZQH_n.cjs → boolean2D-DZcOTOSA.cjs} +4 -4
- package/dist/{booleanFns-CaKngiuu.js → booleanFns-0jDBFjAv.js} +4 -4
- package/dist/{booleanFns-aeG4pQmM.cjs → booleanFns-DvXg6a2Y.cjs} +4 -4
- package/dist/brepjs.cjs +120 -85
- package/dist/brepjs.js +120 -85
- package/dist/{cameraFns-k787od3u.js → cameraFns-Bwxq0IDz.js} +2 -2
- package/dist/{cameraFns-Bk8frXwa.cjs → cameraFns-CsGSVYgb.cjs} +2 -2
- package/dist/core.cjs +1 -1
- package/dist/core.js +1 -1
- package/dist/{cornerFinder-tTS3ny7e.cjs → cornerFinder-ChltJ_ur.cjs} +1 -1
- package/dist/{cornerFinder-B8GvvW0U.js → cornerFinder-fMf9-El_.js} +1 -1
- package/dist/{curveFns-DvNBwUdJ.js → curveFns-BhTtS18d.js} +1 -1
- package/dist/{curveFns-CYP8UOgX.cjs → curveFns-CXytEfTr.cjs} +1 -1
- package/dist/{drawFns-Chpdmj4G.cjs → drawFns-Bn4vzbUr.cjs} +12 -12
- package/dist/{drawFns-DmAPsfmx.js → drawFns-Bzr38vZx.js} +12 -12
- package/dist/{extrudeFns-IvYW5-8y.cjs → extrudeFns-C0FsOXev.cjs} +1 -1
- package/dist/{extrudeFns-CMr1tf7I.js → extrudeFns-rnUgev_g.js} +1 -1
- package/dist/{faceFns-CZp3Y8vi.js → faceFns-Dreo5ksY.js} +2 -2
- package/dist/{faceFns-Byt7Vd3F.cjs → faceFns-FAZgMVCx.cjs} +2 -2
- package/dist/{helpers-BX-0e71G.js → helpers--BMa_zB7.js} +6 -6
- package/dist/{helpers-wFts3ttt.cjs → helpers-D8ycrNeD.cjs} +6 -6
- package/dist/{historyFns-CZ9oNL7j.js → historyFns-CR0RejKJ.js} +4 -4
- package/dist/{historyFns-BzPsKySX.cjs → historyFns-mnmeZ0kB.cjs} +4 -4
- package/dist/{importFns-8zgPWa83.cjs → importFns-4mi5Ih46.cjs} +2 -2
- package/dist/{importFns-BAJm4qfD.js → importFns-DRPQExAD.js} +2 -2
- package/dist/io.cjs +2 -2
- package/dist/io.js +2 -2
- package/dist/kernel/brepkit/ioOps.d.ts +2 -2
- package/dist/kernel/occtWasm/ioOps.d.ts +1 -1
- package/dist/kernel/occtWasm/occtWasmAdapter.cjs +1 -1
- package/dist/kernel/occtWasm/occtWasmAdapter.js +1 -1
- package/dist/kernel/solverAdapter.d.ts +7 -2
- package/dist/kernel/stlBuilder.d.ts +20 -0
- package/dist/{measureFns-CvvenWkS.js → measureFns-BLEx4ZU3.js} +3 -3
- package/dist/{measureFns-CrSEblGG.cjs → measureFns-CT0XaSOt.cjs} +3 -3
- package/dist/measurement.cjs +1 -1
- package/dist/measurement.js +1 -1
- package/dist/{meshFns-0RHalM3t.js → meshFns-B3MjIqk1.js} +3 -3
- package/dist/{meshFns-DwHAYqRN.cjs → meshFns-lwgHYQ79.cjs} +3 -3
- package/dist/{occtWasmAdapter-BPu07Zxg.cjs → occtWasmAdapter-BH7r2nTq.cjs} +137 -51
- package/dist/{occtWasmAdapter-Ctfykwr2.js → occtWasmAdapter-C7FDeTaw.js} +114 -52
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/{primitiveFns-CKCALTVe.cjs → primitiveFns-DZmgvzvk.cjs} +7 -7
- package/dist/{primitiveFns-ecKWNC5k.js → primitiveFns-DcZDTQ_R.js} +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-D63FuB8f.js → shapeFns-BnkizFjV.js} +2 -2
- package/dist/{shapeFns-B5JrP5aD.cjs → shapeFns-w1YoIn_p.cjs} +2 -2
- package/dist/shapeRef.cjs +1 -1
- package/dist/shapeRef.js +1 -1
- package/dist/{shapeRefFns-H_O8zyAx.cjs → shapeRefFns-B3myHs0D.cjs} +4 -4
- package/dist/{shapeRefFns-DjGKujf0.js → shapeRefFns-OVWdFOAC.js} +4 -4
- package/dist/{shapeTypes-kAKwccy_.cjs → shapeTypes-BIlZar9m.cjs} +174 -172
- package/dist/{shapeTypes-RYLpXWzG.js → shapeTypes-yCQ8z5Hc.js} +174 -172
- package/dist/sketching.cjs +3 -3
- package/dist/sketching.js +3 -3
- package/dist/{solidBuilders-0SgkQ386.js → solidBuilders-CPOTKI5i.js} +2 -2
- package/dist/{solidBuilders-B2IX6Pm8.cjs → solidBuilders-dNhToZgl.cjs} +2 -2
- package/dist/{surfaceBuilders-jx81G_YJ.js → surfaceBuilders-CS1QccDv.js} +2 -2
- package/dist/{surfaceBuilders-BkvJS8pw.cjs → surfaceBuilders-CzHPZtd3.cjs} +2 -2
- package/dist/text.cjs +2 -2
- package/dist/text.js +2 -2
- package/dist/{textBlueprints-BXGrW7Ak.js → textBlueprints-B57ej88L.js} +7 -7
- package/dist/{textBlueprints-Q2gxuZd1.cjs → textBlueprints-TG6AH06v.cjs} +7 -7
- package/dist/{textMetrics-V7TXOETY.js → textMetrics-BxtB3sjj.js} +1 -1
- package/dist/{textMetrics-CnCjqf59.cjs → textMetrics-Dag-YREs.cjs} +1 -1
- package/dist/topology.cjs +7 -7
- package/dist/topology.js +7 -7
- package/dist/{topologyQueryFns-Ck5trXrW.cjs → topologyQueryFns-BuWZAQ_o.cjs} +1 -1
- package/dist/{topologyQueryFns-BtWPlP5v.js → topologyQueryFns-Bxdnl5Vt.js} +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { C as translateCurve2d$2, E as EXACT_BREP_CAPABILITIES, S as tangentCurve2d, _ as mirrorAcrossAxis, a as buildBinarySTL, b as scaleCurve2d$2, c as curveBounds, d as evaluateCurve2d$2, f as intersectCurves2dFn, g as makeLine2d$2, h as makeEllipse2d$2, i as buildAsciiSTL, l as curveTypeName, m as makeCircle2d$2, n as DEFAULT_STL_ANGULAR_TOLERANCE, o as addCurveToBBox, p as makeBezier2d$2, r as DEFAULT_STL_TOLERANCE, s as createBBox2d, t as OcctWasmAdapter, u as deserializeCurve2d$2, v as mirrorAtPoint, w as quickHull, x as serializeCurve2d$2, y as rotateCurve2d$2 } from "./occtWasmAdapter-C7FDeTaw.js";
|
|
2
2
|
import { n as wasmIndex, t as vec3At } from "./vec3-Dpha8d5k.js";
|
|
3
3
|
import { A as ok, b as err } from "./errors-DNWJsfVU.js";
|
|
4
4
|
//#region src/kernel/quality.ts
|
|
@@ -7911,6 +7911,171 @@ function makeEvolutionOps$1(bk) {
|
|
|
7911
7911
|
};
|
|
7912
7912
|
}
|
|
7913
7913
|
//#endregion
|
|
7914
|
+
//#region src/kernel/brepkit/meshOps.ts
|
|
7915
|
+
function mesh$1(bk, shape, options) {
|
|
7916
|
+
const h = unwrap$1(shape);
|
|
7917
|
+
const bkHandle = shape;
|
|
7918
|
+
const deflection = options.tolerance || .01;
|
|
7919
|
+
const angularTol = options.angularTolerance > 0 ? options.angularTolerance : void 0;
|
|
7920
|
+
let result;
|
|
7921
|
+
if (bkHandle.type === "solid") result = meshSolid(bk, h, deflection, !!options.includeUVs, angularTol);
|
|
7922
|
+
else if (bkHandle.type === "face") result = meshSingleFace(bk, h, deflection, 0, angularTol);
|
|
7923
|
+
else throw new Error(`brepkit: cannot mesh shape of type '${bkHandle.type}'`);
|
|
7924
|
+
if (options.skipNormals) result.normals = new Float32Array(0);
|
|
7925
|
+
if (!options.includeUVs) result.uvs = new Float32Array(0);
|
|
7926
|
+
return result;
|
|
7927
|
+
}
|
|
7928
|
+
function meshEdges$1(bk, shape, tolerance, angularTolerance) {
|
|
7929
|
+
if (angularTolerance > 0) warnOnce("mesh-edges-angular", "meshEdges angularTolerance is not supported; only linear deflection is used.");
|
|
7930
|
+
const bkHandle = shape;
|
|
7931
|
+
if (bkHandle.type !== "solid") return {
|
|
7932
|
+
lines: new Float32Array(0),
|
|
7933
|
+
edgeGroups: []
|
|
7934
|
+
};
|
|
7935
|
+
const edgeLines = bk.meshEdgesAll(bkHandle.id, tolerance);
|
|
7936
|
+
const positions = edgeLines.positions;
|
|
7937
|
+
const offsets = edgeLines.offsets;
|
|
7938
|
+
const edgeCount = edgeLines.edgeCount;
|
|
7939
|
+
const edgeGroups = [];
|
|
7940
|
+
for (let i = 0; i < edgeCount; i++) {
|
|
7941
|
+
const startIdx = wasmIndex(offsets, i);
|
|
7942
|
+
const pointCount = ((i + 1 < edgeCount ? wasmIndex(offsets, i + 1) : positions.length) - startIdx) / 3;
|
|
7943
|
+
edgeGroups.push({
|
|
7944
|
+
start: startIdx / 3,
|
|
7945
|
+
count: pointCount,
|
|
7946
|
+
edgeHash: i
|
|
7947
|
+
});
|
|
7948
|
+
}
|
|
7949
|
+
return {
|
|
7950
|
+
lines: new Float32Array(positions),
|
|
7951
|
+
edgeGroups
|
|
7952
|
+
};
|
|
7953
|
+
}
|
|
7954
|
+
function hasTriangulation$1(_bk, _shape) {
|
|
7955
|
+
return false;
|
|
7956
|
+
}
|
|
7957
|
+
/** Tessellate a solid with per-face groups for brepjs mesh format. */
|
|
7958
|
+
function meshSolid(bk, solidId, deflection, includeUVs, angularTolerance) {
|
|
7959
|
+
try {
|
|
7960
|
+
return meshSolidGrouped(bk, solidId, deflection, includeUVs, angularTolerance);
|
|
7961
|
+
} catch (e) {
|
|
7962
|
+
console.warn(`brepkit: tessellateSolidGrouped failed (solidId=${solidId}), falling back to per-face:`, e);
|
|
7963
|
+
return meshSolidPerFace(bk, solidId, deflection, angularTolerance);
|
|
7964
|
+
}
|
|
7965
|
+
}
|
|
7966
|
+
/**
|
|
7967
|
+
* Batch tessellation via `tessellateSolidGrouped` -- single WASM call for
|
|
7968
|
+
* all faces. Falls back to `meshSolidPerFace` on error.
|
|
7969
|
+
*
|
|
7970
|
+
* When `includeUVs` is true, makes an additional `tessellateSolidUV` call
|
|
7971
|
+
* to populate real surface parametrization coordinates.
|
|
7972
|
+
*/
|
|
7973
|
+
function meshSolidGrouped(bk, solidId, deflection, includeUVs, angularTolerance) {
|
|
7974
|
+
const json = bk.tessellateSolidGrouped(solidId, deflection, angularTolerance);
|
|
7975
|
+
const data = JSON.parse(json);
|
|
7976
|
+
const faceIds = toArray(bk.getSolidFaces(solidId));
|
|
7977
|
+
const groupCount = data.faceOffsets.length - 1;
|
|
7978
|
+
if (groupCount !== faceIds.length) throw new Error(`faceOffsets/faceIds length mismatch: ${groupCount} groups vs ${faceIds.length} faces`);
|
|
7979
|
+
const faceGroups = [];
|
|
7980
|
+
for (let i = 0; i < data.faceOffsets.length - 1; i++) {
|
|
7981
|
+
const start = wasmIndex(data.faceOffsets, i);
|
|
7982
|
+
const count = wasmIndex(data.faceOffsets, i + 1) - start;
|
|
7983
|
+
if (count === 0) continue;
|
|
7984
|
+
faceGroups.push({
|
|
7985
|
+
start,
|
|
7986
|
+
count,
|
|
7987
|
+
faceHash: faceIds[i] ?? 0
|
|
7988
|
+
});
|
|
7989
|
+
}
|
|
7990
|
+
let uvs = new Float32Array(0);
|
|
7991
|
+
if (includeUVs) {
|
|
7992
|
+
const expectedUvLen = data.positions.length / 3 * 2;
|
|
7993
|
+
try {
|
|
7994
|
+
const uvJson = bk.tessellateSolidUV(solidId, deflection, angularTolerance);
|
|
7995
|
+
const uvData = JSON.parse(uvJson);
|
|
7996
|
+
if (uvData.uvs.length === expectedUvLen) uvs = new Float32Array(uvData.uvs);
|
|
7997
|
+
else uvs = new Float32Array(expectedUvLen);
|
|
7998
|
+
} catch {
|
|
7999
|
+
uvs = new Float32Array(expectedUvLen);
|
|
8000
|
+
}
|
|
8001
|
+
}
|
|
8002
|
+
return {
|
|
8003
|
+
vertices: new Float32Array(data.positions),
|
|
8004
|
+
normals: new Float32Array(data.normals),
|
|
8005
|
+
triangles: new Uint32Array(data.indices),
|
|
8006
|
+
uvs,
|
|
8007
|
+
faceGroups
|
|
8008
|
+
};
|
|
8009
|
+
}
|
|
8010
|
+
/** Per-face tessellation fallback -- N WASM calls, one per face. */
|
|
8011
|
+
function meshSolidPerFace(bk, solidId, deflection, angularTolerance) {
|
|
8012
|
+
const faceIds = toArray(bk.getSolidFaces(solidId));
|
|
8013
|
+
const allVertices = [];
|
|
8014
|
+
const allNormals = [];
|
|
8015
|
+
const allTriangles = [];
|
|
8016
|
+
const allUVs = [];
|
|
8017
|
+
const faceGroups = [];
|
|
8018
|
+
let vertexOffset = 0;
|
|
8019
|
+
for (const faceId of faceIds) try {
|
|
8020
|
+
const faceMesh = bk.tessellateFace(faceId, deflection, angularTolerance);
|
|
8021
|
+
const positions = faceMesh.positions;
|
|
8022
|
+
const normals = faceMesh.normals;
|
|
8023
|
+
const indices = faceMesh.indices;
|
|
8024
|
+
const vertCount = positions.length / 3;
|
|
8025
|
+
if (vertCount === 0) continue;
|
|
8026
|
+
const triStart = allTriangles.length;
|
|
8027
|
+
for (const v of positions) allVertices.push(v);
|
|
8028
|
+
for (const n of normals) allNormals.push(n);
|
|
8029
|
+
for (const idx of indices) allTriangles.push(idx + vertexOffset);
|
|
8030
|
+
for (let i = 0; i < vertCount; i++) allUVs.push(0, 0);
|
|
8031
|
+
faceGroups.push({
|
|
8032
|
+
start: triStart,
|
|
8033
|
+
count: indices.length,
|
|
8034
|
+
faceHash: faceId
|
|
8035
|
+
});
|
|
8036
|
+
vertexOffset += vertCount;
|
|
8037
|
+
} catch (e) {
|
|
8038
|
+
console.warn(`brepkit: face tessellation failed (faceId=${faceId}):`, e);
|
|
8039
|
+
}
|
|
8040
|
+
return {
|
|
8041
|
+
vertices: new Float32Array(allVertices),
|
|
8042
|
+
normals: new Float32Array(allNormals),
|
|
8043
|
+
triangles: new Uint32Array(allTriangles),
|
|
8044
|
+
uvs: new Float32Array(allUVs),
|
|
8045
|
+
faceGroups
|
|
8046
|
+
};
|
|
8047
|
+
}
|
|
8048
|
+
/** Tessellate a single face and return brepjs mesh format. */
|
|
8049
|
+
function meshSingleFace(bk, faceId, deflection, faceHash, angularTolerance) {
|
|
8050
|
+
const faceMesh = bk.tessellateFace(faceId, deflection, angularTolerance);
|
|
8051
|
+
const positions = faceMesh.positions;
|
|
8052
|
+
const normals = faceMesh.normals;
|
|
8053
|
+
const indices = faceMesh.indices;
|
|
8054
|
+
const vertCount = positions.length / 3;
|
|
8055
|
+
const uvs = [];
|
|
8056
|
+
for (let i = 0; i < vertCount; i++) uvs.push(0, 0);
|
|
8057
|
+
return {
|
|
8058
|
+
vertices: new Float32Array(positions),
|
|
8059
|
+
normals: new Float32Array(normals),
|
|
8060
|
+
triangles: new Uint32Array(indices),
|
|
8061
|
+
uvs: new Float32Array(uvs),
|
|
8062
|
+
faceGroups: [{
|
|
8063
|
+
start: 0,
|
|
8064
|
+
count: indices.length,
|
|
8065
|
+
faceHash
|
|
8066
|
+
}]
|
|
8067
|
+
};
|
|
8068
|
+
}
|
|
8069
|
+
/** Co-located factory: returns the mesh slice of {@link KernelAdapter} bound to `bk`. */
|
|
8070
|
+
function makeMeshOps$1(bk) {
|
|
8071
|
+
return {
|
|
8072
|
+
mesh: (shape, options) => mesh$1(bk, shape, options),
|
|
8073
|
+
meshEdges: (shape, tolerance, angularTolerance) => meshEdges$1(bk, shape, tolerance, angularTolerance),
|
|
8074
|
+
hasTriangulation: (shape) => hasTriangulation$1(bk, shape),
|
|
8075
|
+
meshShape: (shape, tolerance, angularTolerance) => {}
|
|
8076
|
+
};
|
|
8077
|
+
}
|
|
8078
|
+
//#endregion
|
|
7914
8079
|
//#region src/kernel/brepkit/ioOps.ts
|
|
7915
8080
|
function exportSTEP(bk, shapes) {
|
|
7916
8081
|
if (shapes.length === 0) return "";
|
|
@@ -7924,11 +8089,13 @@ function exportSTEP(bk, shapes) {
|
|
|
7924
8089
|
}
|
|
7925
8090
|
return parts.join("\n");
|
|
7926
8091
|
}
|
|
7927
|
-
function exportSTL$1(bk, shape, binary) {
|
|
7928
|
-
const
|
|
7929
|
-
|
|
7930
|
-
|
|
7931
|
-
|
|
8092
|
+
function exportSTL$1(bk, shape, binary, tolerance = DEFAULT_STL_TOLERANCE, angularTolerance = DEFAULT_STL_ANGULAR_TOLERANCE) {
|
|
8093
|
+
const { vertices, triangles } = mesh$1(bk, solidHandle(wasmIndex(unwrapSolidsForExport(bk, shape, "exportSTL"), 0)), {
|
|
8094
|
+
tolerance,
|
|
8095
|
+
angularTolerance,
|
|
8096
|
+
skipNormals: true
|
|
8097
|
+
});
|
|
8098
|
+
return binary ? buildBinarySTL(vertices, triangles) : buildAsciiSTL(vertices, triangles);
|
|
7932
8099
|
}
|
|
7933
8100
|
function importSTEP(bk, data) {
|
|
7934
8101
|
const bytes = typeof data === "string" ? new TextEncoder().encode(data) : new Uint8Array(data);
|
|
@@ -8013,7 +8180,7 @@ function exportSTEPConfigured(bk, shapes, _options) {
|
|
|
8013
8180
|
function makeIoOps$1(bk) {
|
|
8014
8181
|
return {
|
|
8015
8182
|
exportSTEP: (shapes) => exportSTEP(bk, shapes),
|
|
8016
|
-
exportSTL: (shape, binary) => exportSTL$1(bk, shape, binary),
|
|
8183
|
+
exportSTL: (shape, binary, tolerance, angularTolerance) => exportSTL$1(bk, shape, binary, tolerance, angularTolerance),
|
|
8017
8184
|
importSTEP: (data) => importSTEP(bk, data),
|
|
8018
8185
|
importSTL: (data) => importSTL(bk, data),
|
|
8019
8186
|
exportIGES: (shapes) => exportIGES(bk, shapes),
|
|
@@ -9195,171 +9362,6 @@ function makeMeasureOps$1(bk) {
|
|
|
9195
9362
|
};
|
|
9196
9363
|
}
|
|
9197
9364
|
//#endregion
|
|
9198
|
-
//#region src/kernel/brepkit/meshOps.ts
|
|
9199
|
-
function mesh$1(bk, shape, options) {
|
|
9200
|
-
const h = unwrap$1(shape);
|
|
9201
|
-
const bkHandle = shape;
|
|
9202
|
-
const deflection = options.tolerance || .01;
|
|
9203
|
-
const angularTol = options.angularTolerance > 0 ? options.angularTolerance : void 0;
|
|
9204
|
-
let result;
|
|
9205
|
-
if (bkHandle.type === "solid") result = meshSolid(bk, h, deflection, !!options.includeUVs, angularTol);
|
|
9206
|
-
else if (bkHandle.type === "face") result = meshSingleFace(bk, h, deflection, 0, angularTol);
|
|
9207
|
-
else throw new Error(`brepkit: cannot mesh shape of type '${bkHandle.type}'`);
|
|
9208
|
-
if (options.skipNormals) result.normals = new Float32Array(0);
|
|
9209
|
-
if (!options.includeUVs) result.uvs = new Float32Array(0);
|
|
9210
|
-
return result;
|
|
9211
|
-
}
|
|
9212
|
-
function meshEdges$1(bk, shape, tolerance, angularTolerance) {
|
|
9213
|
-
if (angularTolerance > 0) warnOnce("mesh-edges-angular", "meshEdges angularTolerance is not supported; only linear deflection is used.");
|
|
9214
|
-
const bkHandle = shape;
|
|
9215
|
-
if (bkHandle.type !== "solid") return {
|
|
9216
|
-
lines: new Float32Array(0),
|
|
9217
|
-
edgeGroups: []
|
|
9218
|
-
};
|
|
9219
|
-
const edgeLines = bk.meshEdgesAll(bkHandle.id, tolerance);
|
|
9220
|
-
const positions = edgeLines.positions;
|
|
9221
|
-
const offsets = edgeLines.offsets;
|
|
9222
|
-
const edgeCount = edgeLines.edgeCount;
|
|
9223
|
-
const edgeGroups = [];
|
|
9224
|
-
for (let i = 0; i < edgeCount; i++) {
|
|
9225
|
-
const startIdx = wasmIndex(offsets, i);
|
|
9226
|
-
const pointCount = ((i + 1 < edgeCount ? wasmIndex(offsets, i + 1) : positions.length) - startIdx) / 3;
|
|
9227
|
-
edgeGroups.push({
|
|
9228
|
-
start: startIdx / 3,
|
|
9229
|
-
count: pointCount,
|
|
9230
|
-
edgeHash: i
|
|
9231
|
-
});
|
|
9232
|
-
}
|
|
9233
|
-
return {
|
|
9234
|
-
lines: new Float32Array(positions),
|
|
9235
|
-
edgeGroups
|
|
9236
|
-
};
|
|
9237
|
-
}
|
|
9238
|
-
function hasTriangulation$1(_bk, _shape) {
|
|
9239
|
-
return false;
|
|
9240
|
-
}
|
|
9241
|
-
/** Tessellate a solid with per-face groups for brepjs mesh format. */
|
|
9242
|
-
function meshSolid(bk, solidId, deflection, includeUVs, angularTolerance) {
|
|
9243
|
-
try {
|
|
9244
|
-
return meshSolidGrouped(bk, solidId, deflection, includeUVs, angularTolerance);
|
|
9245
|
-
} catch (e) {
|
|
9246
|
-
console.warn(`brepkit: tessellateSolidGrouped failed (solidId=${solidId}), falling back to per-face:`, e);
|
|
9247
|
-
return meshSolidPerFace(bk, solidId, deflection, angularTolerance);
|
|
9248
|
-
}
|
|
9249
|
-
}
|
|
9250
|
-
/**
|
|
9251
|
-
* Batch tessellation via `tessellateSolidGrouped` -- single WASM call for
|
|
9252
|
-
* all faces. Falls back to `meshSolidPerFace` on error.
|
|
9253
|
-
*
|
|
9254
|
-
* When `includeUVs` is true, makes an additional `tessellateSolidUV` call
|
|
9255
|
-
* to populate real surface parametrization coordinates.
|
|
9256
|
-
*/
|
|
9257
|
-
function meshSolidGrouped(bk, solidId, deflection, includeUVs, angularTolerance) {
|
|
9258
|
-
const json = bk.tessellateSolidGrouped(solidId, deflection, angularTolerance);
|
|
9259
|
-
const data = JSON.parse(json);
|
|
9260
|
-
const faceIds = toArray(bk.getSolidFaces(solidId));
|
|
9261
|
-
const groupCount = data.faceOffsets.length - 1;
|
|
9262
|
-
if (groupCount !== faceIds.length) throw new Error(`faceOffsets/faceIds length mismatch: ${groupCount} groups vs ${faceIds.length} faces`);
|
|
9263
|
-
const faceGroups = [];
|
|
9264
|
-
for (let i = 0; i < data.faceOffsets.length - 1; i++) {
|
|
9265
|
-
const start = wasmIndex(data.faceOffsets, i);
|
|
9266
|
-
const count = wasmIndex(data.faceOffsets, i + 1) - start;
|
|
9267
|
-
if (count === 0) continue;
|
|
9268
|
-
faceGroups.push({
|
|
9269
|
-
start,
|
|
9270
|
-
count,
|
|
9271
|
-
faceHash: faceIds[i] ?? 0
|
|
9272
|
-
});
|
|
9273
|
-
}
|
|
9274
|
-
let uvs = new Float32Array(0);
|
|
9275
|
-
if (includeUVs) {
|
|
9276
|
-
const expectedUvLen = data.positions.length / 3 * 2;
|
|
9277
|
-
try {
|
|
9278
|
-
const uvJson = bk.tessellateSolidUV(solidId, deflection, angularTolerance);
|
|
9279
|
-
const uvData = JSON.parse(uvJson);
|
|
9280
|
-
if (uvData.uvs.length === expectedUvLen) uvs = new Float32Array(uvData.uvs);
|
|
9281
|
-
else uvs = new Float32Array(expectedUvLen);
|
|
9282
|
-
} catch {
|
|
9283
|
-
uvs = new Float32Array(expectedUvLen);
|
|
9284
|
-
}
|
|
9285
|
-
}
|
|
9286
|
-
return {
|
|
9287
|
-
vertices: new Float32Array(data.positions),
|
|
9288
|
-
normals: new Float32Array(data.normals),
|
|
9289
|
-
triangles: new Uint32Array(data.indices),
|
|
9290
|
-
uvs,
|
|
9291
|
-
faceGroups
|
|
9292
|
-
};
|
|
9293
|
-
}
|
|
9294
|
-
/** Per-face tessellation fallback -- N WASM calls, one per face. */
|
|
9295
|
-
function meshSolidPerFace(bk, solidId, deflection, angularTolerance) {
|
|
9296
|
-
const faceIds = toArray(bk.getSolidFaces(solidId));
|
|
9297
|
-
const allVertices = [];
|
|
9298
|
-
const allNormals = [];
|
|
9299
|
-
const allTriangles = [];
|
|
9300
|
-
const allUVs = [];
|
|
9301
|
-
const faceGroups = [];
|
|
9302
|
-
let vertexOffset = 0;
|
|
9303
|
-
for (const faceId of faceIds) try {
|
|
9304
|
-
const faceMesh = bk.tessellateFace(faceId, deflection, angularTolerance);
|
|
9305
|
-
const positions = faceMesh.positions;
|
|
9306
|
-
const normals = faceMesh.normals;
|
|
9307
|
-
const indices = faceMesh.indices;
|
|
9308
|
-
const vertCount = positions.length / 3;
|
|
9309
|
-
if (vertCount === 0) continue;
|
|
9310
|
-
const triStart = allTriangles.length;
|
|
9311
|
-
for (const v of positions) allVertices.push(v);
|
|
9312
|
-
for (const n of normals) allNormals.push(n);
|
|
9313
|
-
for (const idx of indices) allTriangles.push(idx + vertexOffset);
|
|
9314
|
-
for (let i = 0; i < vertCount; i++) allUVs.push(0, 0);
|
|
9315
|
-
faceGroups.push({
|
|
9316
|
-
start: triStart,
|
|
9317
|
-
count: indices.length,
|
|
9318
|
-
faceHash: faceId
|
|
9319
|
-
});
|
|
9320
|
-
vertexOffset += vertCount;
|
|
9321
|
-
} catch (e) {
|
|
9322
|
-
console.warn(`brepkit: face tessellation failed (faceId=${faceId}):`, e);
|
|
9323
|
-
}
|
|
9324
|
-
return {
|
|
9325
|
-
vertices: new Float32Array(allVertices),
|
|
9326
|
-
normals: new Float32Array(allNormals),
|
|
9327
|
-
triangles: new Uint32Array(allTriangles),
|
|
9328
|
-
uvs: new Float32Array(allUVs),
|
|
9329
|
-
faceGroups
|
|
9330
|
-
};
|
|
9331
|
-
}
|
|
9332
|
-
/** Tessellate a single face and return brepjs mesh format. */
|
|
9333
|
-
function meshSingleFace(bk, faceId, deflection, faceHash, angularTolerance) {
|
|
9334
|
-
const faceMesh = bk.tessellateFace(faceId, deflection, angularTolerance);
|
|
9335
|
-
const positions = faceMesh.positions;
|
|
9336
|
-
const normals = faceMesh.normals;
|
|
9337
|
-
const indices = faceMesh.indices;
|
|
9338
|
-
const vertCount = positions.length / 3;
|
|
9339
|
-
const uvs = [];
|
|
9340
|
-
for (let i = 0; i < vertCount; i++) uvs.push(0, 0);
|
|
9341
|
-
return {
|
|
9342
|
-
vertices: new Float32Array(positions),
|
|
9343
|
-
normals: new Float32Array(normals),
|
|
9344
|
-
triangles: new Uint32Array(indices),
|
|
9345
|
-
uvs: new Float32Array(uvs),
|
|
9346
|
-
faceGroups: [{
|
|
9347
|
-
start: 0,
|
|
9348
|
-
count: indices.length,
|
|
9349
|
-
faceHash
|
|
9350
|
-
}]
|
|
9351
|
-
};
|
|
9352
|
-
}
|
|
9353
|
-
/** Co-located factory: returns the mesh slice of {@link KernelAdapter} bound to `bk`. */
|
|
9354
|
-
function makeMeshOps$1(bk) {
|
|
9355
|
-
return {
|
|
9356
|
-
mesh: (shape, options) => mesh$1(bk, shape, options),
|
|
9357
|
-
meshEdges: (shape, tolerance, angularTolerance) => meshEdges$1(bk, shape, tolerance, angularTolerance),
|
|
9358
|
-
hasTriangulation: (shape) => hasTriangulation$1(bk, shape),
|
|
9359
|
-
meshShape: (shape, tolerance, angularTolerance) => {}
|
|
9360
|
-
};
|
|
9361
|
-
}
|
|
9362
|
-
//#endregion
|
|
9363
9365
|
//#region src/kernel/brepkit/sketchOps.ts
|
|
9364
9366
|
/** Create a new constraint sketch. Returns an opaque sketch handle. */
|
|
9365
9367
|
function sketchNew(bk) {
|
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-TG6AH06v.cjs");
|
|
3
|
+
const require_blueprintSketcher = require("./blueprintSketcher-BpOknLmX.cjs");
|
|
4
|
+
const require_drawFns = require("./drawFns-Bn4vzbUr.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-DbINWerx.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-Bzr38vZx.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-B57ej88L.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
|
-
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-yCQ8z5Hc.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-Dreo5ksY.js";
|
|
4
4
|
//#region src/topology/shapeUtils.ts
|
|
5
5
|
/**
|
|
6
6
|
* Shape assembly utilities — welding and sewing operations.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-BIlZar9m.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
|
-
const require_faceFns = require("./faceFns-
|
|
3
|
+
const require_faceFns = require("./faceFns-FAZgMVCx.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, 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-yCQ8z5Hc.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-Dreo5ksY.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-BIlZar9m.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
|
-
const require_faceFns = require("./faceFns-
|
|
3
|
+
const require_faceFns = require("./faceFns-FAZgMVCx.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-TG6AH06v.cjs");
|
|
3
|
+
const require_textMetrics = require("./textMetrics-Dag-YREs.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-B57ej88L.js";
|
|
2
|
+
import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-BxtB3sjj.js";
|
|
3
3
|
export { fontMetrics, getFont, loadFont, sketchText, textBlueprints, textMetrics };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { Z as getKernel, h as isShape3D, o as createFace, p as isFace, t as castShape, u as createWire } from "./shapeTypes-
|
|
1
|
+
import { Z as getKernel, h as isShape3D, o as createFace, p as isFace, t as castShape, u as createWire } from "./shapeTypes-yCQ8z5Hc.js";
|
|
2
2
|
import { A as ok, R as unwrap, T as isOk, b as err, d as validationError, h as bug, i as kernelError, l as typeCastError, r as ioError, t as BrepErrorCode } from "./errors-DNWJsfVU.js";
|
|
3
3
|
import { r as toVec3 } from "./types-D24Y27N0.js";
|
|
4
4
|
import { d as vecNormalize, h as vecScale, r as vecCross } from "./vecOps-SKPRvPH-.js";
|
|
5
5
|
import { n as createPlane } from "./planeOps-DSjjtrjg.js";
|
|
6
|
-
import { _ as downcast, g as cast } from "./faceFns-
|
|
7
|
-
import { c as curveStartPoint, l as curveTangentAt } from "./curveFns-
|
|
6
|
+
import { _ as downcast, g as cast } from "./faceFns-Dreo5ksY.js";
|
|
7
|
+
import { c as curveStartPoint, l as curveTangentAt } from "./curveFns-BhTtS18d.js";
|
|
8
8
|
import { n as getAtOrThrow, t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
9
|
-
import { i as makeNewFaceWithinFace, r as makeFace, t as addHolesInFace } from "./surfaceBuilders-
|
|
10
|
-
import { r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-
|
|
11
|
-
import { o as makeSolid, t as makeCompound } from "./solidBuilders-
|
|
12
|
-
import { c as sweep, i as complexExtrude, l as twistExtrude, r as revolve, t as extrude } from "./extrudeFns-
|
|
9
|
+
import { i as makeNewFaceWithinFace, r as makeFace, t as addHolesInFace } from "./surfaceBuilders-CS1QccDv.js";
|
|
10
|
+
import { r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-DbINWerx.js";
|
|
11
|
+
import { o as makeSolid, t as makeCompound } from "./solidBuilders-CPOTKI5i.js";
|
|
12
|
+
import { c as sweep, i as complexExtrude, l as twistExtrude, r as revolve, t as extrude } from "./extrudeFns-rnUgev_g.js";
|
|
13
13
|
import opentype from "opentype.js";
|
|
14
14
|
//#region src/operations/loftFns.ts
|
|
15
15
|
/**
|
|
@@ -29,18 +29,18 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
29
29
|
enumerable: true
|
|
30
30
|
}) : target, mod));
|
|
31
31
|
//#endregion
|
|
32
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
32
|
+
const require_shapeTypes = require("./shapeTypes-BIlZar9m.cjs");
|
|
33
33
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
34
34
|
const require_types = require("./types-KjA8tY4Y.cjs");
|
|
35
35
|
const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
|
|
36
36
|
const require_planeOps = require("./planeOps-BA4HfgQu.cjs");
|
|
37
|
-
const require_faceFns = require("./faceFns-
|
|
38
|
-
const require_curveFns = require("./curveFns-
|
|
37
|
+
const require_faceFns = require("./faceFns-FAZgMVCx.cjs");
|
|
38
|
+
const require_curveFns = require("./curveFns-CXytEfTr.cjs");
|
|
39
39
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
40
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
41
|
-
const require_blueprintSketcher = require("./blueprintSketcher-
|
|
42
|
-
const require_solidBuilders = require("./solidBuilders-
|
|
43
|
-
const require_extrudeFns = require("./extrudeFns-
|
|
40
|
+
const require_surfaceBuilders = require("./surfaceBuilders-CzHPZtd3.cjs");
|
|
41
|
+
const require_blueprintSketcher = require("./blueprintSketcher-BpOknLmX.cjs");
|
|
42
|
+
const require_solidBuilders = require("./solidBuilders-dNhToZgl.cjs");
|
|
43
|
+
const require_extrudeFns = require("./extrudeFns-C0FsOXev.cjs");
|
|
44
44
|
let opentype_js = require("opentype.js");
|
|
45
45
|
opentype_js = __toESM(opentype_js, 1);
|
|
46
46
|
//#region src/operations/loftFns.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { A as ok, b as err, d as validationError, t as BrepErrorCode } from "./errors-DNWJsfVU.js";
|
|
2
|
-
import { g as wrapSketchData, i as Sketches, n as getFont, t as textBlueprints, v as CompoundSketch } from "./textBlueprints-
|
|
2
|
+
import { g as wrapSketchData, i as Sketches, n as getFont, t as textBlueprints, v as CompoundSketch } from "./textBlueprints-B57ej88L.js";
|
|
3
3
|
//#region src/text/sketchText.ts
|
|
4
4
|
/**
|
|
5
5
|
* Render text as 3D sketch outlines on a plane.
|
package/dist/topology.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
-
const require_faceFns = require("./faceFns-
|
|
4
|
-
const require_shapeFns = require("./shapeFns-
|
|
5
|
-
const require_curveFns = require("./curveFns-
|
|
6
|
-
const require_meshFns = require("./meshFns-
|
|
7
|
-
const require_booleanFns = require("./booleanFns-
|
|
8
|
-
const require_primitiveFns = require("./primitiveFns-
|
|
2
|
+
const require_topologyQueryFns = require("./topologyQueryFns-BuWZAQ_o.cjs");
|
|
3
|
+
const require_faceFns = require("./faceFns-FAZgMVCx.cjs");
|
|
4
|
+
const require_shapeFns = require("./shapeFns-w1YoIn_p.cjs");
|
|
5
|
+
const require_curveFns = require("./curveFns-CXytEfTr.cjs");
|
|
6
|
+
const require_meshFns = require("./meshFns-lwgHYQ79.cjs");
|
|
7
|
+
const require_booleanFns = require("./booleanFns-DvXg6a2Y.cjs");
|
|
8
|
+
const require_primitiveFns = require("./primitiveFns-DZmgvzvk.cjs");
|
|
9
9
|
exports.addHoles = require_primitiveFns.addHoles;
|
|
10
10
|
exports.adjacentFaces = require_primitiveFns.adjacentFaces;
|
|
11
11
|
exports.approximateCurve = require_curveFns.approximateCurve;
|
package/dist/topology.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { S as vertexPosition, _ as iterFaces, b as iterVertices, c as getFaces, f as getVertices, g as iterEdges, m as invalidateShapeCache, n as getBounds, p as getWires, s as getEdges, x as iterWires } from "./topologyQueryFns-
|
|
2
|
-
import { _ as downcast, a as flipFaceOrientation, b as iterTopo, c as normalAt, d as projectPointOnFace, g as cast, h as asTopo, i as faceOrientation, l as outerWire, m as uvCoordinates, n as faceCenter, o as getSurfaceType, p as uvBounds, r as faceGeomType, s as innerWires, t as classifyPointOnFace, u as pointOnSurface, v as fromBREP, x as shapeType, y as isCompSolid } from "./faceFns-
|
|
3
|
-
import { a as isSameShape, i as isEqualShape, n as getHashCode } from "./shapeFns-
|
|
4
|
-
import { a as curveLength, c as curveStartPoint, d as getCurveType, f as getOrientation, i as curveIsPeriodic, l as curveTangentAt, m as offsetWire2D, n as curveEndPoint, o as curvePeriod, p as interpolateCurve, r as curveIsClosed, s as curvePointAt, t as approximateCurve, u as flipOrientation } from "./curveFns-
|
|
5
|
-
import { c as createMeshCache, n as exportSTEP, r as exportSTL, s as clearMeshCache, t as exportIGES } from "./meshFns-
|
|
6
|
-
import { a as fuseAll, r as cutAll } from "./booleanFns-
|
|
7
|
-
import { $ as fuseAllBisect, A as fixShape, C as threePointArc, D as wireLoop, E as wire, G as chamferWithEvolution, I as solidFromShell, J as fuseWithEvolution, K as cutWithEvolution, M as healFace, N as healSolid, O as autoHeal, P as healWire, Q as cutAllBisect, S as tangentArc, T as vertex, U as variableFillet, W as positionOnCurve, X as shellWithEvolution, Y as intersectWithEvolution, Z as checkBoolean, _ as polygon, a as circle, at as sharedEdges, b as sphere, c as cylinder, ct as chamferDistAngle, d as ellipsoid, et as getNurbsCurveData, f as face, ft as toLineGeometryData, g as offsetFace, h as line, i as bsplineApprox, it as facesOfEdge, k as fixSelfIntersection, l as ellipse, lt as toBufferGeometryData, m as helix, n as bezier, nt as adjacentFaces, o as compound, ot as verticesOfEdge, p as filledFace, q as filletWithEvolution, r as box, rt as edgesOfFace, s as cone, st as wiresOfFace, t as addHoles, tt as getNurbsSurfaceData, u as ellipseArc, ut as toGroupedBufferGeometryData, v as sewShells, w as torus, x as subFace, y as solid } from "./primitiveFns-
|
|
1
|
+
import { S as vertexPosition, _ as iterFaces, b as iterVertices, c as getFaces, f as getVertices, g as iterEdges, m as invalidateShapeCache, n as getBounds, p as getWires, s as getEdges, x as iterWires } from "./topologyQueryFns-Bxdnl5Vt.js";
|
|
2
|
+
import { _ as downcast, a as flipFaceOrientation, b as iterTopo, c as normalAt, d as projectPointOnFace, g as cast, h as asTopo, i as faceOrientation, l as outerWire, m as uvCoordinates, n as faceCenter, o as getSurfaceType, p as uvBounds, r as faceGeomType, s as innerWires, t as classifyPointOnFace, u as pointOnSurface, v as fromBREP, x as shapeType, y as isCompSolid } from "./faceFns-Dreo5ksY.js";
|
|
3
|
+
import { a as isSameShape, i as isEqualShape, n as getHashCode } from "./shapeFns-BnkizFjV.js";
|
|
4
|
+
import { a as curveLength, c as curveStartPoint, d as getCurveType, f as getOrientation, i as curveIsPeriodic, l as curveTangentAt, m as offsetWire2D, n as curveEndPoint, o as curvePeriod, p as interpolateCurve, r as curveIsClosed, s as curvePointAt, t as approximateCurve, u as flipOrientation } from "./curveFns-BhTtS18d.js";
|
|
5
|
+
import { c as createMeshCache, n as exportSTEP, r as exportSTL, s as clearMeshCache, t as exportIGES } from "./meshFns-B3MjIqk1.js";
|
|
6
|
+
import { a as fuseAll, r as cutAll } from "./booleanFns-0jDBFjAv.js";
|
|
7
|
+
import { $ as fuseAllBisect, A as fixShape, C as threePointArc, D as wireLoop, E as wire, G as chamferWithEvolution, I as solidFromShell, J as fuseWithEvolution, K as cutWithEvolution, M as healFace, N as healSolid, O as autoHeal, P as healWire, Q as cutAllBisect, S as tangentArc, T as vertex, U as variableFillet, W as positionOnCurve, X as shellWithEvolution, Y as intersectWithEvolution, Z as checkBoolean, _ as polygon, a as circle, at as sharedEdges, b as sphere, c as cylinder, ct as chamferDistAngle, d as ellipsoid, et as getNurbsCurveData, f as face, ft as toLineGeometryData, g as offsetFace, h as line, i as bsplineApprox, it as facesOfEdge, k as fixSelfIntersection, l as ellipse, lt as toBufferGeometryData, m as helix, n as bezier, nt as adjacentFaces, o as compound, ot as verticesOfEdge, p as filledFace, q as filletWithEvolution, r as box, rt as edgesOfFace, s as cone, st as wiresOfFace, t as addHoles, tt as getNurbsSurfaceData, u as ellipseArc, ut as toGroupedBufferGeometryData, v as sewShells, w as torus, x as subFace, y as solid } from "./primitiveFns-DcZDTQ_R.js";
|
|
8
8
|
export { addHoles, adjacentFaces, approximateCurve, asTopo, autoHeal, bezier, box, bsplineApprox, cast, chamferDistAngle as chamferDistAngleShape, chamferWithEvolution, checkBoolean, circle, classifyPointOnFace, clearMeshCache, compound, cone, createMeshCache, curveEndPoint, curveIsClosed, curveIsPeriodic, curveLength, curvePeriod, curvePointAt, curveStartPoint, curveTangentAt, cutAll, cutAllBisect, cutWithEvolution, cylinder, fromBREP as deserializeShape, downcast, edgesOfFace, ellipse, ellipseArc, ellipsoid, exportIGES, exportSTEP, exportSTL, face, faceCenter, faceGeomType, faceOrientation, facesOfEdge, filledFace, filletWithEvolution, fixSelfIntersection, fixShape, flipFaceOrientation, flipOrientation, fuseAll, fuseAllBisect, fuseWithEvolution, getBounds, getCurveType, getEdges, getFaces, getHashCode, getNurbsCurveData, getNurbsSurfaceData, getOrientation, getSurfaceType, getVertices, getWires, healFace, healSolid, healWire, helix, innerWires, interpolateCurve, intersectWithEvolution, invalidateShapeCache, isCompSolid, isEqualShape, isSameShape, iterEdges, iterFaces, iterTopo, iterVertices, iterWires, line, normalAt, offsetFace, offsetWire2D, outerWire, pointOnSurface, polygon, positionOnCurve, projectPointOnFace, sewShells, shapeType, sharedEdges, shellWithEvolution, solid, solidFromShell, sphere, subFace, tangentArc, threePointArc, toBufferGeometryData, toGroupedBufferGeometryData, toLineGeometryData, torus, uvBounds, uvCoordinates, variableFillet, vertex, vertexPosition, verticesOfEdge, wire, wireLoop, wiresOfFace };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-BIlZar9m.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
3
|
//#region src/core/kernelCall.ts
|
|
4
4
|
function buildError(kind, code, message, cause, suggestion) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as getOrQueryType, R as DisposalScope, Y as _usingCtx, Z as getKernel, r as castShapeWithKnownType, t as castShape } from "./shapeTypes-
|
|
1
|
+
import { N as getOrQueryType, R as DisposalScope, Y as _usingCtx, Z as getKernel, r as castShapeWithKnownType, t as castShape } from "./shapeTypes-yCQ8z5Hc.js";
|
|
2
2
|
import { A as ok, b as err, f as getSuggestionForCode, p as translateKernelError } from "./errors-DNWJsfVU.js";
|
|
3
3
|
//#region src/core/kernelCall.ts
|
|
4
4
|
function buildError(kind, code, message, cause, suggestion) {
|