brepjs 18.82.5 → 18.82.7
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-DjzevNhB.js → blueprint-DmvnSTKs.js} +7 -7
- package/dist/{blueprint-BBUOweQy.cjs → blueprint-lbpshPPC.cjs} +7 -7
- package/dist/{blueprintFns-CxSMnMfl.js → blueprintFns-Bhmqz0_E.js} +2 -2
- package/dist/{blueprintFns-CRES_5vP.cjs → blueprintFns-Nl1hnrJX.cjs} +2 -2
- package/dist/{blueprintSketcher-CIydRzRr.js → blueprintSketcher-DzCTWt_f.js} +140 -86
- package/dist/{blueprintSketcher-CFa32JZU.cjs → blueprintSketcher-NDZKJGYh.cjs} +140 -86
- package/dist/{boolean2D-BRWPIJhe.js → boolean2D-DGtpfl2g.js} +4 -4
- package/dist/{boolean2D-Z0KE98a4.cjs → boolean2D-Dzs9Vkjv.cjs} +4 -4
- package/dist/brepjs.cjs +25 -25
- package/dist/brepjs.js +25 -25
- package/dist/{cameraFns-B3Wb4Br9.js → cameraFns-B2WR42Tm.js} +2 -2
- package/dist/{cameraFns-Drgka78Q.cjs → cameraFns-p4G3cFuC.cjs} +2 -2
- package/dist/core.cjs +1 -1
- package/dist/core.js +1 -1
- package/dist/{cornerFinder-BuYpqGO8.cjs → cornerFinder-B_SuHSBj.cjs} +1 -1
- package/dist/{cornerFinder-BRYZAgdE.js → cornerFinder-KoakXQze.js} +1 -1
- package/dist/{curveFns-BA5zsoce.cjs → curveFns-CJWxgcHu.cjs} +1 -1
- package/dist/{curveFns-XSz4F9j3.js → curveFns-XRM_FMU4.js} +1 -1
- package/dist/{drawFns-DK3DGHku.cjs → drawFns-7qn35uWm.cjs} +12 -12
- package/dist/{drawFns-C5Mdr0iH.js → drawFns-D7q8qpEI.js} +12 -12
- package/dist/{faceFns-6AarivqH.cjs → faceFns-B3bYfnGX.cjs} +2 -2
- package/dist/{faceFns-BO8IXhhf.js → faceFns-hGTQhRXB.js} +2 -2
- package/dist/{healingFns-D3BkAVML.cjs → healingFns-BpFs-Puf.cjs} +5 -5
- package/dist/{healingFns-C4JZHv8K.js → healingFns-CUn6v5p4.js} +5 -5
- package/dist/{helpers-DN6s-TLC.cjs → helpers-D6yNdVOO.cjs} +6 -6
- package/dist/{helpers-CTc8ZbY8.js → helpers-DOE4GlZ0.js} +6 -6
- package/dist/{importFns-Cb-cmpGG.cjs → importFns-BQTQKGbi.cjs} +2 -2
- package/dist/{importFns-D4Xet5aD.js → importFns-CPZWa8WK.js} +2 -2
- package/dist/io.cjs +2 -2
- package/dist/io.js +2 -2
- package/dist/kernel/brepkit/brepkitWasmTypes.d.ts +35 -6
- package/dist/kernel/occtWasm/kernel2dOps.d.ts +8 -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/{loftFns-DxhcdpAu.cjs → loftFns-B8UzGtwS.cjs} +1 -1
- package/dist/{loftFns-BVbzy6gm.js → loftFns-DusJd7Qq.js} +1 -1
- package/dist/{measureFns-7Nz5JklM.js → measureFns-Bka10mrS.js} +3 -3
- package/dist/{measureFns-BNHvjShh.cjs → measureFns-DwHd423H.cjs} +3 -3
- package/dist/measurement.cjs +1 -1
- package/dist/measurement.js +1 -1
- package/dist/{meshFns-YXFipjjx.cjs → meshFns-B2k02WJJ.cjs} +3 -3
- package/dist/{meshFns-CWwOpBlM.js → meshFns-CNfOU3D1.js} +3 -3
- package/dist/{occtWasmAdapter-BMV179Ji.js → occtWasmAdapter-BK6h0nKd.js} +29 -5
- package/dist/{occtWasmAdapter-5hzzhkME.cjs → occtWasmAdapter-Bfz5Zfmk.cjs} +29 -5
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/{primitiveFns-DkuLOFkI.js → primitiveFns-C-kQixz1.js} +4 -4
- package/dist/{primitiveFns-BPfYb_t5.cjs → primitiveFns-D3y2t4FS.cjs} +4 -4
- 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-sF0x5Zhj.cjs → shapeFns-BPvq4QYa.cjs} +2 -2
- package/dist/{shapeFns-B6UAiYAx.js → shapeFns-kVgikxkG.js} +2 -2
- package/dist/shapeRef.cjs +1 -1
- package/dist/shapeRef.js +1 -1
- package/dist/{shapeRefFns-NdQvPa5J.js → shapeRefFns-CXWVzhbm.js} +4 -4
- package/dist/{shapeRefFns-Bb0aQZWz.cjs → shapeRefFns-CxB7OXOc.cjs} +4 -4
- package/dist/{shapeTypes-D4Evnmz_.js → shapeTypes-Caa9T1VR.js} +61 -6
- package/dist/{shapeTypes-D1eUDuzl.cjs → shapeTypes-DpDcMU0a.cjs} +61 -6
- package/dist/sketching.cjs +3 -3
- package/dist/sketching.js +3 -3
- package/dist/{solidBuilders-QUpJdbiK.js → solidBuilders-BHRL7010.js} +5 -5
- package/dist/{solidBuilders-lDXPwoCz.cjs → solidBuilders-Cve7yf13.cjs} +5 -5
- package/dist/{surfaceBuilders-R4DKNFkI.cjs → surfaceBuilders-5hLC_QeE.cjs} +2 -2
- package/dist/{surfaceBuilders-CLMyFimy.js → surfaceBuilders-BDEc8WSE.js} +2 -2
- package/dist/text.cjs +2 -2
- package/dist/text.js +2 -2
- package/dist/{textBlueprints-f8cgx9vi.js → textBlueprints-Cl5P2MkE.js} +7 -7
- package/dist/{textBlueprints-D4pLmVno.cjs → textBlueprints-bMa5164s.cjs} +7 -7
- package/dist/{textMetrics-DTRuXeXr.cjs → textMetrics-BDr82S48.cjs} +1 -1
- package/dist/{textMetrics-CQtQI4vF.js → textMetrics-DBEv2A2N.js} +1 -1
- package/dist/{threadFns-CvLvKdwB.js → threadFns-74sXf2tN.js} +6 -6
- package/dist/{threadFns-DvSdQiRw.cjs → threadFns-Cw1TzGd2.cjs} +6 -6
- package/dist/topology.cjs +8 -8
- package/dist/topology.js +8 -8
- package/dist/{topologyQueryFns-5EeBz6_7.js → topologyQueryFns-CR7zQvDK.js} +1 -1
- package/dist/{topologyQueryFns-Nnu56Ke2.cjs → topologyQueryFns-imRz9gK2.cjs} +1 -1
- package/package.json +16 -16
package/dist/query.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_helpers = require("./helpers-
|
|
3
|
-
const require_cornerFinder = require("./cornerFinder-
|
|
2
|
+
const require_helpers = require("./helpers-D6yNdVOO.cjs");
|
|
3
|
+
const require_cornerFinder = require("./cornerFinder-B_SuHSBj.cjs");
|
|
4
4
|
exports.cornerFinder = require_cornerFinder.cornerFinder;
|
|
5
5
|
exports.edgeFinder = require_helpers.edgeFinder;
|
|
6
6
|
exports.faceFinder = require_helpers.faceFinder;
|
package/dist/query.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-
|
|
2
|
-
import { t as cornerFinder } from "./cornerFinder-
|
|
1
|
+
import { n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-DOE4GlZ0.js";
|
|
2
|
+
import { t as cornerFinder } from "./cornerFinder-KoakXQze.js";
|
|
3
3
|
export { cornerFinder, edgeFinder, faceFinder, getSingleFace };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-DpDcMU0a.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-imRz9gK2.cjs");
|
|
4
4
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
5
5
|
//#region src/topology/metadata/originTrackingFns.ts
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Z as getKernel, t as castShape } from "./shapeTypes-
|
|
1
|
+
import { Z as getKernel, t as castShape } from "./shapeTypes-Caa9T1VR.js";
|
|
2
2
|
import { A as ok, b as err, d as validationError, t as BrepErrorCode } from "./errors-DNWJsfVU.js";
|
|
3
|
-
import { C as kernelCall, c as getFaces, l as getOrCreateCache, r as getCacheEntry, w as kernelCallRaw } from "./topologyQueryFns-
|
|
3
|
+
import { C as kernelCall, c as getFaces, l as getOrCreateCache, r as getCacheEntry, w as kernelCallRaw } from "./topologyQueryFns-CR7zQvDK.js";
|
|
4
4
|
import { n as HASH_CODE_MAX, t as DEG2RAD } from "./constants-ITRzCnCp.js";
|
|
5
5
|
//#region src/topology/metadata/originTrackingFns.ts
|
|
6
6
|
/**
|
package/dist/shapeRef.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_shapeRefFns = require("./shapeRefFns-
|
|
2
|
+
const require_shapeRefFns = require("./shapeRefFns-CxB7OXOc.cjs");
|
|
3
3
|
exports.assignRoles = require_shapeRefFns.assignRoles;
|
|
4
4
|
exports.captureHint = require_shapeRefFns.captureHint;
|
|
5
5
|
exports.createRef = require_shapeRefFns.createRef;
|
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-CXWVzhbm.js";
|
|
2
2
|
export { assignRoles, captureHint, createRef, defaultScorer, resolveRef, updateRoles };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as wasmIndex } from "./vec3-Dpha8d5k.js";
|
|
2
|
-
import { c as getFaces } from "./topologyQueryFns-
|
|
3
|
-
import { i as faceGeomType, l as normalAt, r as faceCenter } from "./faceFns-
|
|
4
|
-
import { n as getHashCode } from "./shapeFns-
|
|
5
|
-
import { n as measureArea } from "./measureFns-
|
|
2
|
+
import { c as getFaces } from "./topologyQueryFns-CR7zQvDK.js";
|
|
3
|
+
import { i as faceGeomType, l as normalAt, r as faceCenter } from "./faceFns-hGTQhRXB.js";
|
|
4
|
+
import { n as getHashCode } from "./shapeFns-kVgikxkG.js";
|
|
5
|
+
import { n as measureArea } from "./measureFns-Bka10mrS.js";
|
|
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
|
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-imRz9gK2.cjs");
|
|
3
|
+
const require_faceFns = require("./faceFns-B3bYfnGX.cjs");
|
|
4
|
+
const require_shapeFns = require("./shapeFns-BPvq4QYa.cjs");
|
|
5
|
+
const require_measureFns = require("./measureFns-DwHd423H.cjs");
|
|
6
6
|
//#region src/topology/shapeRef/scoring.ts
|
|
7
7
|
/**
|
|
8
8
|
* Default face scorer combining surface type, normal alignment, centroid proximity,
|
|
@@ -1,4 +1,4 @@
|
|
|
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-
|
|
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-BK6h0nKd.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
|
|
@@ -5692,8 +5692,10 @@ function iterCompound(bk, h, type) {
|
|
|
5692
5692
|
if (type === "face" || type === "edge" || type === "vertex" || type === "wire") return toArray(bk.getCompoundSolids(h)).map(solidHandle).flatMap((s) => iterShapes$1(bk, s, type));
|
|
5693
5693
|
return [];
|
|
5694
5694
|
}
|
|
5695
|
-
function iterSolid(bk, h, type) {
|
|
5695
|
+
function iterSolid(bk, shape, h, type) {
|
|
5696
5696
|
switch (type) {
|
|
5697
|
+
case "solid": return [shape];
|
|
5698
|
+
case "shell": return toArray(bk.getSolidShells(h)).map(shellHandle);
|
|
5697
5699
|
case "face": return toArray(bk.getSolidFaces(h)).map(faceHandle);
|
|
5698
5700
|
case "edge": return toArray(bk.getSolidEdges(h)).map(edgeHandle);
|
|
5699
5701
|
case "vertex": return toArray(bk.getSolidVertices(h)).map(vertexHandle);
|
|
@@ -5713,7 +5715,8 @@ function iterShellChildren(bk, h, type) {
|
|
|
5713
5715
|
}
|
|
5714
5716
|
return results;
|
|
5715
5717
|
}
|
|
5716
|
-
function iterShell(bk, h, type) {
|
|
5718
|
+
function iterShell(bk, shape, h, type) {
|
|
5719
|
+
if (type === "shell") return [shape];
|
|
5717
5720
|
if (type === "face") return toArray(bk.getShellFaces(h)).map(faceHandle);
|
|
5718
5721
|
if (type === "edge" || type === "vertex") return iterShellChildren(bk, h, type);
|
|
5719
5722
|
return [];
|
|
@@ -5769,8 +5772,8 @@ function iterShapes$1(bk, shape, type) {
|
|
|
5769
5772
|
const h = unwrap$1(shape);
|
|
5770
5773
|
switch (shape.type) {
|
|
5771
5774
|
case "compound": return iterCompound(bk, h, type);
|
|
5772
|
-
case "solid": return iterSolid(bk, h, type);
|
|
5773
|
-
case "shell": return iterShell(bk, h, type);
|
|
5775
|
+
case "solid": return iterSolid(bk, shape, h, type);
|
|
5776
|
+
case "shell": return iterShell(bk, shape, h, type);
|
|
5774
5777
|
case "face": return iterFace(bk, shape, h, type);
|
|
5775
5778
|
case "wire": return iterWire(bk, shape, h, type);
|
|
5776
5779
|
case "edge": return iterEdge(bk, shape, h, type);
|
|
@@ -8051,10 +8054,62 @@ function meshSolid(bk, solidId, deflection, includeUVs, angularTolerance) {
|
|
|
8051
8054
|
* Batch tessellation via `tessellateSolidGrouped` -- single WASM call for
|
|
8052
8055
|
* all faces. Falls back to `meshSolidPerFace` on error.
|
|
8053
8056
|
*
|
|
8057
|
+
* Prefers the binary `tessellateSolidGroupedBinary` (packed typed arrays) when
|
|
8058
|
+
* the kernel exposes it; the mesh then crosses the WASM boundary as bulk memory
|
|
8059
|
+
* copies instead of a multi-megabyte JSON string round-trip (the JSON variant
|
|
8060
|
+
* was ~2x slower on large meshes). Falls back to the JSON path on older kernels.
|
|
8061
|
+
*
|
|
8054
8062
|
* When `includeUVs` is true, makes an additional `tessellateSolidUV` call
|
|
8055
8063
|
* to populate real surface parametrization coordinates.
|
|
8056
8064
|
*/
|
|
8057
8065
|
function meshSolidGrouped(bk, solidId, deflection, includeUVs, angularTolerance) {
|
|
8066
|
+
if (typeof bk.tessellateSolidGroupedBinary === "function") return meshSolidGroupedBinary(bk, solidId, deflection, includeUVs, angularTolerance, bk.tessellateSolidGroupedBinary(solidId, deflection, angularTolerance));
|
|
8067
|
+
return meshSolidGroupedJson(bk, solidId, deflection, includeUVs, angularTolerance);
|
|
8068
|
+
}
|
|
8069
|
+
/**
|
|
8070
|
+
* Binary grouped tessellation: positions/normals are packed `Float32Array`s and
|
|
8071
|
+
* indices/`faceOffsets` are `Uint32Array`s straight from the kernel — no JSON.
|
|
8072
|
+
*/
|
|
8073
|
+
function meshSolidGroupedBinary(bk, solidId, deflection, includeUVs, angularTolerance, m) {
|
|
8074
|
+
const positions = m.positions;
|
|
8075
|
+
const normals = m.normals;
|
|
8076
|
+
const indices = m.indices;
|
|
8077
|
+
const faceOffsets = m.faceOffsets;
|
|
8078
|
+
const faceIds = toArray(bk.getSolidFaces(solidId));
|
|
8079
|
+
const groupCount = faceOffsets.length - 1;
|
|
8080
|
+
if (groupCount !== faceIds.length) throw new Error(`faceOffsets/faceIds length mismatch: ${groupCount} groups vs ${faceIds.length} faces`);
|
|
8081
|
+
const faceGroups = [];
|
|
8082
|
+
for (let i = 0; i < faceOffsets.length - 1; i++) {
|
|
8083
|
+
const start = wasmIndex(faceOffsets, i);
|
|
8084
|
+
const count = wasmIndex(faceOffsets, i + 1) - start;
|
|
8085
|
+
if (count === 0) continue;
|
|
8086
|
+
faceGroups.push({
|
|
8087
|
+
start,
|
|
8088
|
+
count,
|
|
8089
|
+
faceHash: faceIds[i] ?? 0
|
|
8090
|
+
});
|
|
8091
|
+
}
|
|
8092
|
+
let uvs = new Float32Array(0);
|
|
8093
|
+
if (includeUVs) {
|
|
8094
|
+
const expectedUvLen = positions.length / 3 * 2;
|
|
8095
|
+
try {
|
|
8096
|
+
const uvJson = bk.tessellateSolidUV(solidId, deflection, angularTolerance);
|
|
8097
|
+
const uvData = JSON.parse(uvJson);
|
|
8098
|
+
uvs = uvData.uvs.length === expectedUvLen ? new Float32Array(uvData.uvs) : new Float32Array(expectedUvLen);
|
|
8099
|
+
} catch {
|
|
8100
|
+
uvs = new Float32Array(expectedUvLen);
|
|
8101
|
+
}
|
|
8102
|
+
}
|
|
8103
|
+
return {
|
|
8104
|
+
vertices: positions,
|
|
8105
|
+
normals,
|
|
8106
|
+
triangles: indices,
|
|
8107
|
+
uvs,
|
|
8108
|
+
faceGroups
|
|
8109
|
+
};
|
|
8110
|
+
}
|
|
8111
|
+
/** JSON grouped tessellation (fallback for kernels without the binary API). */
|
|
8112
|
+
function meshSolidGroupedJson(bk, solidId, deflection, includeUVs, angularTolerance) {
|
|
8058
8113
|
const json = bk.tessellateSolidGrouped(solidId, deflection, angularTolerance);
|
|
8059
8114
|
const data = JSON.parse(json);
|
|
8060
8115
|
const faceIds = toArray(bk.getSolidFaces(solidId));
|
|
@@ -15348,7 +15403,7 @@ async function init() {
|
|
|
15348
15403
|
throw new Error("brepjs: no kernel package found. Install one of:\n npm install occt-wasm (recommended, default)\n npm install brepjs-opencascade\n npm install brepkit-wasm");
|
|
15349
15404
|
}
|
|
15350
15405
|
//#endregion
|
|
15351
|
-
//#region \0@oxc-project+runtime@0.
|
|
15406
|
+
//#region \0@oxc-project+runtime@0.133.0/helpers/esm/usingCtx.js
|
|
15352
15407
|
function _usingCtx() {
|
|
15353
15408
|
var r = "function" == typeof SuppressedError ? SuppressedError : function(r, e) {
|
|
15354
15409
|
var n = Error();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_occtWasmAdapter = require("./occtWasmAdapter-
|
|
1
|
+
const require_occtWasmAdapter = require("./occtWasmAdapter-Bfz5Zfmk.cjs");
|
|
2
2
|
const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
|
|
3
3
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
4
4
|
//#region src/kernel/quality.ts
|
|
@@ -5696,8 +5696,10 @@ function iterCompound(bk, h, type) {
|
|
|
5696
5696
|
if (type === "face" || type === "edge" || type === "vertex" || type === "wire") return toArray(bk.getCompoundSolids(h)).map(solidHandle).flatMap((s) => iterShapes$1(bk, s, type));
|
|
5697
5697
|
return [];
|
|
5698
5698
|
}
|
|
5699
|
-
function iterSolid(bk, h, type) {
|
|
5699
|
+
function iterSolid(bk, shape, h, type) {
|
|
5700
5700
|
switch (type) {
|
|
5701
|
+
case "solid": return [shape];
|
|
5702
|
+
case "shell": return toArray(bk.getSolidShells(h)).map(shellHandle);
|
|
5701
5703
|
case "face": return toArray(bk.getSolidFaces(h)).map(faceHandle);
|
|
5702
5704
|
case "edge": return toArray(bk.getSolidEdges(h)).map(edgeHandle);
|
|
5703
5705
|
case "vertex": return toArray(bk.getSolidVertices(h)).map(vertexHandle);
|
|
@@ -5717,7 +5719,8 @@ function iterShellChildren(bk, h, type) {
|
|
|
5717
5719
|
}
|
|
5718
5720
|
return results;
|
|
5719
5721
|
}
|
|
5720
|
-
function iterShell(bk, h, type) {
|
|
5722
|
+
function iterShell(bk, shape, h, type) {
|
|
5723
|
+
if (type === "shell") return [shape];
|
|
5721
5724
|
if (type === "face") return toArray(bk.getShellFaces(h)).map(faceHandle);
|
|
5722
5725
|
if (type === "edge" || type === "vertex") return iterShellChildren(bk, h, type);
|
|
5723
5726
|
return [];
|
|
@@ -5773,8 +5776,8 @@ function iterShapes$1(bk, shape, type) {
|
|
|
5773
5776
|
const h = unwrap$1(shape);
|
|
5774
5777
|
switch (shape.type) {
|
|
5775
5778
|
case "compound": return iterCompound(bk, h, type);
|
|
5776
|
-
case "solid": return iterSolid(bk, h, type);
|
|
5777
|
-
case "shell": return iterShell(bk, h, type);
|
|
5779
|
+
case "solid": return iterSolid(bk, shape, h, type);
|
|
5780
|
+
case "shell": return iterShell(bk, shape, h, type);
|
|
5778
5781
|
case "face": return iterFace(bk, shape, h, type);
|
|
5779
5782
|
case "wire": return iterWire(bk, shape, h, type);
|
|
5780
5783
|
case "edge": return iterEdge(bk, shape, h, type);
|
|
@@ -8055,10 +8058,62 @@ function meshSolid(bk, solidId, deflection, includeUVs, angularTolerance) {
|
|
|
8055
8058
|
* Batch tessellation via `tessellateSolidGrouped` -- single WASM call for
|
|
8056
8059
|
* all faces. Falls back to `meshSolidPerFace` on error.
|
|
8057
8060
|
*
|
|
8061
|
+
* Prefers the binary `tessellateSolidGroupedBinary` (packed typed arrays) when
|
|
8062
|
+
* the kernel exposes it; the mesh then crosses the WASM boundary as bulk memory
|
|
8063
|
+
* copies instead of a multi-megabyte JSON string round-trip (the JSON variant
|
|
8064
|
+
* was ~2x slower on large meshes). Falls back to the JSON path on older kernels.
|
|
8065
|
+
*
|
|
8058
8066
|
* When `includeUVs` is true, makes an additional `tessellateSolidUV` call
|
|
8059
8067
|
* to populate real surface parametrization coordinates.
|
|
8060
8068
|
*/
|
|
8061
8069
|
function meshSolidGrouped(bk, solidId, deflection, includeUVs, angularTolerance) {
|
|
8070
|
+
if (typeof bk.tessellateSolidGroupedBinary === "function") return meshSolidGroupedBinary(bk, solidId, deflection, includeUVs, angularTolerance, bk.tessellateSolidGroupedBinary(solidId, deflection, angularTolerance));
|
|
8071
|
+
return meshSolidGroupedJson(bk, solidId, deflection, includeUVs, angularTolerance);
|
|
8072
|
+
}
|
|
8073
|
+
/**
|
|
8074
|
+
* Binary grouped tessellation: positions/normals are packed `Float32Array`s and
|
|
8075
|
+
* indices/`faceOffsets` are `Uint32Array`s straight from the kernel — no JSON.
|
|
8076
|
+
*/
|
|
8077
|
+
function meshSolidGroupedBinary(bk, solidId, deflection, includeUVs, angularTolerance, m) {
|
|
8078
|
+
const positions = m.positions;
|
|
8079
|
+
const normals = m.normals;
|
|
8080
|
+
const indices = m.indices;
|
|
8081
|
+
const faceOffsets = m.faceOffsets;
|
|
8082
|
+
const faceIds = toArray(bk.getSolidFaces(solidId));
|
|
8083
|
+
const groupCount = faceOffsets.length - 1;
|
|
8084
|
+
if (groupCount !== faceIds.length) throw new Error(`faceOffsets/faceIds length mismatch: ${groupCount} groups vs ${faceIds.length} faces`);
|
|
8085
|
+
const faceGroups = [];
|
|
8086
|
+
for (let i = 0; i < faceOffsets.length - 1; i++) {
|
|
8087
|
+
const start = require_vec3.wasmIndex(faceOffsets, i);
|
|
8088
|
+
const count = require_vec3.wasmIndex(faceOffsets, i + 1) - start;
|
|
8089
|
+
if (count === 0) continue;
|
|
8090
|
+
faceGroups.push({
|
|
8091
|
+
start,
|
|
8092
|
+
count,
|
|
8093
|
+
faceHash: faceIds[i] ?? 0
|
|
8094
|
+
});
|
|
8095
|
+
}
|
|
8096
|
+
let uvs = new Float32Array(0);
|
|
8097
|
+
if (includeUVs) {
|
|
8098
|
+
const expectedUvLen = positions.length / 3 * 2;
|
|
8099
|
+
try {
|
|
8100
|
+
const uvJson = bk.tessellateSolidUV(solidId, deflection, angularTolerance);
|
|
8101
|
+
const uvData = JSON.parse(uvJson);
|
|
8102
|
+
uvs = uvData.uvs.length === expectedUvLen ? new Float32Array(uvData.uvs) : new Float32Array(expectedUvLen);
|
|
8103
|
+
} catch {
|
|
8104
|
+
uvs = new Float32Array(expectedUvLen);
|
|
8105
|
+
}
|
|
8106
|
+
}
|
|
8107
|
+
return {
|
|
8108
|
+
vertices: positions,
|
|
8109
|
+
normals,
|
|
8110
|
+
triangles: indices,
|
|
8111
|
+
uvs,
|
|
8112
|
+
faceGroups
|
|
8113
|
+
};
|
|
8114
|
+
}
|
|
8115
|
+
/** JSON grouped tessellation (fallback for kernels without the binary API). */
|
|
8116
|
+
function meshSolidGroupedJson(bk, solidId, deflection, includeUVs, angularTolerance) {
|
|
8062
8117
|
const json = bk.tessellateSolidGrouped(solidId, deflection, angularTolerance);
|
|
8063
8118
|
const data = JSON.parse(json);
|
|
8064
8119
|
const faceIds = toArray(bk.getSolidFaces(solidId));
|
|
@@ -15356,7 +15411,7 @@ async function init() {
|
|
|
15356
15411
|
throw new Error("brepjs: no kernel package found. Install one of:\n npm install occt-wasm (recommended, default)\n npm install brepjs-opencascade\n npm install brepkit-wasm");
|
|
15357
15412
|
}
|
|
15358
15413
|
//#endregion
|
|
15359
|
-
//#region \0@oxc-project+runtime@0.
|
|
15414
|
+
//#region \0@oxc-project+runtime@0.133.0/helpers/esm/usingCtx.js
|
|
15360
15415
|
function _usingCtx() {
|
|
15361
15416
|
var r = "function" == typeof SuppressedError ? SuppressedError : function(r, e) {
|
|
15362
15417
|
var n = Error();
|
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-bMa5164s.cjs");
|
|
3
|
+
const require_blueprintSketcher = require("./blueprintSketcher-NDZKJGYh.cjs");
|
|
4
|
+
const require_drawFns = require("./drawFns-7qn35uWm.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-DzCTWt_f.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-D7q8qpEI.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-Cl5P2MkE.js";
|
|
4
4
|
//#region src/sketching.ts
|
|
5
5
|
/**
|
|
6
6
|
* brepjs/sketching — Sketcher, Drawing, and sketch-to-shape operations.
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Z as getKernel, _ as isSolid, c as createSolid, g as isShell, h as isShape3D, i as createCompound, l as createVertex, t as castShape } from "./shapeTypes-
|
|
1
|
+
import { Z as getKernel, _ as isSolid, c as createSolid, g as isShell, h as isShape3D, i as createCompound, l as createVertex, t as castShape } from "./shapeTypes-Caa9T1VR.js";
|
|
2
2
|
import { A as ok, R as unwrap, b as err, d as validationError, i as kernelError, l as typeCastError, t as BrepErrorCode, v as andThen, w as isErr } from "./errors-DNWJsfVU.js";
|
|
3
|
-
import { f as getVertices, p as getWires, s as getEdges } from "./topologyQueryFns-
|
|
3
|
+
import { f as getVertices, p as getWires, s as getEdges } from "./topologyQueryFns-CR7zQvDK.js";
|
|
4
4
|
import { n as HASH_CODE_MAX } from "./constants-ITRzCnCp.js";
|
|
5
5
|
import { h as vecScale, t as vecAdd } from "./vecOps-SKPRvPH-.js";
|
|
6
6
|
import { o as resolvePlane } from "./planeOps-DSjjtrjg.js";
|
|
7
|
-
import { _ as cast, v as downcast } from "./faceFns-
|
|
8
|
-
import { _ as propagateAllMetadata, g as collectInputFaceHashes, v as propagateMetadataByHash } from "./shapeFns-
|
|
7
|
+
import { _ as cast, v as downcast } from "./faceFns-hGTQhRXB.js";
|
|
8
|
+
import { _ as propagateAllMetadata, g as collectInputFaceHashes, v as propagateMetadataByHash } from "./shapeFns-kVgikxkG.js";
|
|
9
9
|
import { n as getAtOrThrow, t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
10
|
-
import { r as makeFace } from "./surfaceBuilders-
|
|
10
|
+
import { r as makeFace } from "./surfaceBuilders-BDEc8WSE.js";
|
|
11
11
|
//#region src/topology/booleanFns.ts
|
|
12
12
|
/**
|
|
13
13
|
* Boolean and compound operations — functional replacements for _3DShape boolean methods.
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-DpDcMU0a.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-imRz9gK2.cjs");
|
|
4
4
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
5
5
|
const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
|
|
6
6
|
const require_planeOps = require("./planeOps-BA4HfgQu.cjs");
|
|
7
|
-
const require_faceFns = require("./faceFns-
|
|
8
|
-
const require_shapeFns = require("./shapeFns-
|
|
7
|
+
const require_faceFns = require("./faceFns-B3bYfnGX.cjs");
|
|
8
|
+
const require_shapeFns = require("./shapeFns-BPvq4QYa.cjs");
|
|
9
9
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
10
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
10
|
+
const require_surfaceBuilders = require("./surfaceBuilders-5hLC_QeE.cjs");
|
|
11
11
|
//#region src/topology/booleanFns.ts
|
|
12
12
|
/**
|
|
13
13
|
* Boolean and compound operations — functional replacements for _3DShape boolean methods.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-DpDcMU0a.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
|
-
const require_faceFns = require("./faceFns-
|
|
3
|
+
const require_faceFns = require("./faceFns-B3bYfnGX.cjs");
|
|
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
|
-
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-Caa9T1VR.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 { _ as cast, u as outerWire } from "./faceFns-
|
|
3
|
+
import { _ as cast, u as outerWire } from "./faceFns-hGTQhRXB.js";
|
|
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-bMa5164s.cjs");
|
|
3
|
+
const require_textMetrics = require("./textMetrics-BDr82S48.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-Cl5P2MkE.js";
|
|
2
|
+
import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-DBEv2A2N.js";
|
|
3
3
|
export { fontMetrics, getFont, loadFont, sketchText, textBlueprints, textMetrics };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { o as createFace, u as createWire } from "./shapeTypes-
|
|
1
|
+
import { o as createFace, u as createWire } from "./shapeTypes-Caa9T1VR.js";
|
|
2
2
|
import { A as ok, R as unwrap, b as err, h as bug, 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 { v as downcast } from "./faceFns-
|
|
7
|
-
import { l as curveStartPoint, u as curveTangentAt } from "./curveFns-
|
|
6
|
+
import { v as downcast } from "./faceFns-hGTQhRXB.js";
|
|
7
|
+
import { l as curveStartPoint, u as curveTangentAt } from "./curveFns-XRM_FMU4.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 { o as makeSolid, p as cutAll, t as makeCompound } from "./solidBuilders-
|
|
11
|
-
import { r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-
|
|
12
|
-
import { a as revolve, d as twistExtrude, o as complexExtrude, r as extrude, t as loft, u as sweep } from "./loftFns-
|
|
9
|
+
import { i as makeNewFaceWithinFace, r as makeFace, t as addHolesInFace } from "./surfaceBuilders-BDEc8WSE.js";
|
|
10
|
+
import { o as makeSolid, p as cutAll, t as makeCompound } from "./solidBuilders-BHRL7010.js";
|
|
11
|
+
import { r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-DzCTWt_f.js";
|
|
12
|
+
import { a as revolve, d as twistExtrude, o as complexExtrude, r as extrude, t as loft, u as sweep } from "./loftFns-DusJd7Qq.js";
|
|
13
13
|
import opentype from "opentype.js";
|
|
14
14
|
//#region src/sketching/compoundSketch.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-DpDcMU0a.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-B3bYfnGX.cjs");
|
|
38
|
+
const require_curveFns = require("./curveFns-CJWxgcHu.cjs");
|
|
39
39
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
40
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
41
|
-
const require_solidBuilders = require("./solidBuilders-
|
|
42
|
-
const require_blueprintSketcher = require("./blueprintSketcher-
|
|
43
|
-
const require_loftFns = require("./loftFns-
|
|
40
|
+
const require_surfaceBuilders = require("./surfaceBuilders-5hLC_QeE.cjs");
|
|
41
|
+
const require_solidBuilders = require("./solidBuilders-Cve7yf13.cjs");
|
|
42
|
+
const require_blueprintSketcher = require("./blueprintSketcher-NDZKJGYh.cjs");
|
|
43
|
+
const require_loftFns = require("./loftFns-B8UzGtwS.cjs");
|
|
44
44
|
let opentype_js = require("opentype.js");
|
|
45
45
|
opentype_js = __toESM(opentype_js, 1);
|
|
46
46
|
//#region src/sketching/compoundSketch.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-Cl5P2MkE.js";
|
|
3
3
|
//#region src/text/sketchText.ts
|
|
4
4
|
/**
|
|
5
5
|
* Render text as 3D sketch outlines on a plane.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { B as createKernelHandle, R as DisposalScope, Y as _usingCtx, Z as getKernel, t as castShape } from "./shapeTypes-
|
|
1
|
+
import { B as createKernelHandle, R as DisposalScope, Y as _usingCtx, Z as getKernel, t as castShape } from "./shapeTypes-Caa9T1VR.js";
|
|
2
2
|
import { A as ok, T as isOk, b as err, d as validationError, n as computationError, r as ioError, t as BrepErrorCode } from "./errors-DNWJsfVU.js";
|
|
3
3
|
import { d as vecNormalize, s as vecIsZero } from "./vecOps-SKPRvPH-.js";
|
|
4
|
-
import { y as fromBREP } from "./faceFns-
|
|
5
|
-
import { s as toBREP } from "./shapeFns-
|
|
6
|
-
import { h as fuseAll } from "./solidBuilders-
|
|
7
|
-
import { t as loft } from "./loftFns-
|
|
8
|
-
import { E as wire, h as line } from "./primitiveFns-
|
|
4
|
+
import { y as fromBREP } from "./faceFns-hGTQhRXB.js";
|
|
5
|
+
import { s as toBREP } from "./shapeFns-kVgikxkG.js";
|
|
6
|
+
import { h as fuseAll } from "./solidBuilders-BHRL7010.js";
|
|
7
|
+
import { t as loft } from "./loftFns-DusJd7Qq.js";
|
|
8
|
+
import { E as wire, h as line } from "./primitiveFns-C-kQixz1.js";
|
|
9
9
|
//#region src/utils/uuid.ts
|
|
10
10
|
/** Generate a v4-style UUID string using `crypto.getRandomValues`. */
|
|
11
11
|
function uuidv() {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-DpDcMU0a.cjs");
|
|
2
2
|
const require_errors = require("./errors-CXJtc4I7.cjs");
|
|
3
3
|
const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
|
|
4
|
-
const require_faceFns = require("./faceFns-
|
|
5
|
-
const require_shapeFns = require("./shapeFns-
|
|
6
|
-
const require_solidBuilders = require("./solidBuilders-
|
|
7
|
-
const require_loftFns = require("./loftFns-
|
|
8
|
-
const require_primitiveFns = require("./primitiveFns-
|
|
4
|
+
const require_faceFns = require("./faceFns-B3bYfnGX.cjs");
|
|
5
|
+
const require_shapeFns = require("./shapeFns-BPvq4QYa.cjs");
|
|
6
|
+
const require_solidBuilders = require("./solidBuilders-Cve7yf13.cjs");
|
|
7
|
+
const require_loftFns = require("./loftFns-B8UzGtwS.cjs");
|
|
8
|
+
const require_primitiveFns = require("./primitiveFns-D3y2t4FS.cjs");
|
|
9
9
|
//#region src/utils/uuid.ts
|
|
10
10
|
/** Generate a v4-style UUID string using `crypto.getRandomValues`. */
|
|
11
11
|
function uuidv() {
|
package/dist/topology.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
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_solidBuilders = require("./solidBuilders-
|
|
8
|
-
const require_healingFns = require("./healingFns-
|
|
9
|
-
const require_primitiveFns = require("./primitiveFns-
|
|
2
|
+
const require_topologyQueryFns = require("./topologyQueryFns-imRz9gK2.cjs");
|
|
3
|
+
const require_faceFns = require("./faceFns-B3bYfnGX.cjs");
|
|
4
|
+
const require_shapeFns = require("./shapeFns-BPvq4QYa.cjs");
|
|
5
|
+
const require_curveFns = require("./curveFns-CJWxgcHu.cjs");
|
|
6
|
+
const require_meshFns = require("./meshFns-B2k02WJJ.cjs");
|
|
7
|
+
const require_solidBuilders = require("./solidBuilders-Cve7yf13.cjs");
|
|
8
|
+
const require_healingFns = require("./healingFns-BpFs-Puf.cjs");
|
|
9
|
+
const require_primitiveFns = require("./primitiveFns-D3y2t4FS.cjs");
|
|
10
10
|
exports.addHoles = require_primitiveFns.addHoles;
|
|
11
11
|
exports.adjacentFaces = require_healingFns.adjacentFaces;
|
|
12
12
|
exports.approximateCurve = require_curveFns.approximateCurve;
|
package/dist/topology.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
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 { S as shapeType, _ as cast, a as faceOrientation, b as isCompSolid, c as innerWires, d as pointOnSurface, f as projectPointOnFace, g as asTopo, h as uvCoordinates, i as faceGeomType, l as normalAt, m as uvBounds, n as faceAxis, o as flipFaceOrientation, r as faceCenter, s as getSurfaceType, t as classifyPointOnFace, u as outerWire, v as downcast, x as iterTopo, y as fromBREP } from "./faceFns-
|
|
3
|
-
import { a as isSameShape, i as isEqualShape, n as getHashCode } from "./shapeFns-
|
|
4
|
-
import { a as curveIsPeriodic, c as curvePointAt, d as flipOrientation, f as getCurveType, h as offsetWire2D, i as curveIsClosed, l as curveStartPoint, m as interpolateCurve, n as curveAxis, o as curveLength, p as getOrientation, r as curveEndPoint, s as curvePeriod, t as approximateCurve, u as curveTangentAt } from "./curveFns-
|
|
5
|
-
import { c as createMeshCache, n as exportSTEP, r as exportSTL, s as clearMeshCache, t as exportIGES } from "./meshFns-
|
|
6
|
-
import { h as fuseAll, p as cutAll } from "./solidBuilders-
|
|
7
|
-
import { A as edgesOfFace, C as shellWithEvolution, D as getNurbsCurveData, E as fuseAllBisect, F as chamferDistAngle, I as toBufferGeometryData, L as toGroupedBufferGeometryData, M as sharedEdges, N as verticesOfEdge, O as getNurbsSurfaceData, P as wiresOfFace, S as intersectWithEvolution, T as cutAllBisect, _ as positionOnCurve, a as healFace, b as filletWithEvolution, g as variableFillet, j as facesOfEdge, k as adjacentFaces, l as solidFromShell, n as fixSelfIntersection, o as healSolid, r as fixShape, s as healWire, t as autoHeal, v as chamferWithEvolution, w as checkBoolean, x as fuseWithEvolution, y as cutWithEvolution, z as toLineGeometryData } from "./healingFns-
|
|
8
|
-
import { C as threePointArc, D as wireLoop, E as wire, S as tangentArc, T as vertex, _ as polygon, a as circle, b as sphere, c as cylinder, d as ellipsoid, f as face, g as offsetFace, h as line, i as bsplineApprox, l as ellipse, m as helix, n as bezier, o as compound, p as filledFace, r as box, s as cone, t as addHoles, u as ellipseArc, 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-CR7zQvDK.js";
|
|
2
|
+
import { S as shapeType, _ as cast, a as faceOrientation, b as isCompSolid, c as innerWires, d as pointOnSurface, f as projectPointOnFace, g as asTopo, h as uvCoordinates, i as faceGeomType, l as normalAt, m as uvBounds, n as faceAxis, o as flipFaceOrientation, r as faceCenter, s as getSurfaceType, t as classifyPointOnFace, u as outerWire, v as downcast, x as iterTopo, y as fromBREP } from "./faceFns-hGTQhRXB.js";
|
|
3
|
+
import { a as isSameShape, i as isEqualShape, n as getHashCode } from "./shapeFns-kVgikxkG.js";
|
|
4
|
+
import { a as curveIsPeriodic, c as curvePointAt, d as flipOrientation, f as getCurveType, h as offsetWire2D, i as curveIsClosed, l as curveStartPoint, m as interpolateCurve, n as curveAxis, o as curveLength, p as getOrientation, r as curveEndPoint, s as curvePeriod, t as approximateCurve, u as curveTangentAt } from "./curveFns-XRM_FMU4.js";
|
|
5
|
+
import { c as createMeshCache, n as exportSTEP, r as exportSTL, s as clearMeshCache, t as exportIGES } from "./meshFns-CNfOU3D1.js";
|
|
6
|
+
import { h as fuseAll, p as cutAll } from "./solidBuilders-BHRL7010.js";
|
|
7
|
+
import { A as edgesOfFace, C as shellWithEvolution, D as getNurbsCurveData, E as fuseAllBisect, F as chamferDistAngle, I as toBufferGeometryData, L as toGroupedBufferGeometryData, M as sharedEdges, N as verticesOfEdge, O as getNurbsSurfaceData, P as wiresOfFace, S as intersectWithEvolution, T as cutAllBisect, _ as positionOnCurve, a as healFace, b as filletWithEvolution, g as variableFillet, j as facesOfEdge, k as adjacentFaces, l as solidFromShell, n as fixSelfIntersection, o as healSolid, r as fixShape, s as healWire, t as autoHeal, v as chamferWithEvolution, w as checkBoolean, x as fuseWithEvolution, y as cutWithEvolution, z as toLineGeometryData } from "./healingFns-CUn6v5p4.js";
|
|
8
|
+
import { C as threePointArc, D as wireLoop, E as wire, S as tangentArc, T as vertex, _ as polygon, a as circle, b as sphere, c as cylinder, d as ellipsoid, f as face, g as offsetFace, h as line, i as bsplineApprox, l as ellipse, m as helix, n as bezier, o as compound, p as filledFace, r as box, s as cone, t as addHoles, u as ellipseArc, v as sewShells, w as torus, x as subFace, y as solid } from "./primitiveFns-C-kQixz1.js";
|
|
9
9
|
export { addHoles, adjacentFaces, approximateCurve, asTopo, autoHeal, bezier, box, bsplineApprox, cast, chamferDistAngle as chamferDistAngleShape, chamferWithEvolution, checkBoolean, circle, classifyPointOnFace, clearMeshCache, compound, cone, createMeshCache, curveAxis, curveEndPoint, curveIsClosed, curveIsPeriodic, curveLength, curvePeriod, curvePointAt, curveStartPoint, curveTangentAt, cutAll, cutAllBisect, cutWithEvolution, cylinder, fromBREP as deserializeShape, downcast, edgesOfFace, ellipse, ellipseArc, ellipsoid, exportIGES, exportSTEP, exportSTL, face, faceAxis, faceCenter, faceGeomType, faceOrientation, facesOfEdge, filledFace, filletWithEvolution, fixSelfIntersection, fixShape, flipFaceOrientation, flipOrientation, fuseAll, fuseAllBisect, fuseWithEvolution, getBounds, getCurveType, getEdges, getFaces, getHashCode, getNurbsCurveData, getNurbsSurfaceData, getOrientation, getSurfaceType, getVertices, getWires, healFace, healSolid, healWire, helix, innerWires, interpolateCurve, intersectWithEvolution, invalidateShapeCache, isCompSolid, isEqualShape, isSameShape, iterEdges, iterFaces, iterTopo, iterVertices, iterWires, line, normalAt, offsetFace, offsetWire2D, outerWire, pointOnSurface, polygon, positionOnCurve, projectPointOnFace, sewShells, shapeType, sharedEdges, shellWithEvolution, solid, solidFromShell, sphere, subFace, tangentArc, threePointArc, toBufferGeometryData, toGroupedBufferGeometryData, toLineGeometryData, torus, uvBounds, uvCoordinates, variableFillet, vertex, vertexPosition, verticesOfEdge, wire, wireLoop, wiresOfFace };
|
|
@@ -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-Caa9T1VR.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) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-DpDcMU0a.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) {
|