brepjs 18.27.0 → 18.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/2d.cjs +6 -6
- package/dist/2d.js +6 -6
- package/dist/{blueprint-BRsNfnfQ.cjs → blueprint-79MQJVZa.cjs} +5 -5
- package/dist/{blueprint-CQ04Ov5Z.js → blueprint-CUvDkWLs.js} +5 -5
- package/dist/{blueprintFns-DpPZNhFx.js → blueprintFns-Ce-Mzufq.js} +2 -2
- package/dist/{blueprintFns-C5DCLCtZ.cjs → blueprintFns-DX7ftQu1.cjs} +2 -2
- package/dist/{blueprintSketcher-DaF5OR4M.cjs → blueprintSketcher-CoefmhkD.cjs} +3 -3
- package/dist/{blueprintSketcher-OwXVDMOb.js → blueprintSketcher-DiJ7nX5P.js} +3 -3
- package/dist/{boolean2D-BQKMy6dN.js → boolean2D-B-6u7Td3.js} +4 -4
- package/dist/{boolean2D-gwOq0VXi.cjs → boolean2D-ByEkLCB7.cjs} +4 -4
- package/dist/{booleanFns-cmeKRsth.cjs → booleanFns-2zKQEuA8.cjs} +4 -4
- package/dist/{booleanFns-CuXl5XQP.js → booleanFns-B-saLmi4.js} +4 -4
- package/dist/brepjs.cjs +24 -24
- package/dist/brepjs.js +24 -24
- package/dist/{cameraFns-LurBny3f.cjs → cameraFns-C0uWLB4t.cjs} +2 -2
- package/dist/{cameraFns-DC2ShyXC.js → cameraFns-ILz-I1EN.js} +2 -2
- package/dist/core.cjs +1 -1
- package/dist/core.js +1 -1
- package/dist/{cornerFinder-BjjFVnDq.cjs → cornerFinder-DheJjEdJ.cjs} +1 -1
- package/dist/{cornerFinder-CF8fVEx2.js → cornerFinder-DnbKeXpc.js} +1 -1
- package/dist/{curveFns-BR8gQOAc.cjs → curveFns-BW6fpApo.cjs} +1 -1
- package/dist/{curveFns-Cimni2kq.js → curveFns-Dp2RyxrR.js} +1 -1
- package/dist/{drawFns-Bh1LGuSX.js → drawFns-CJamg2C6.js} +12 -12
- package/dist/{drawFns-btYAn61y.cjs → drawFns-rCnf1L3r.cjs} +12 -12
- package/dist/{extrudeFns-BmF17qhf.js → extrudeFns-CMGE0i5l.js} +1 -1
- package/dist/{extrudeFns-CLrrRprF.cjs → extrudeFns-zngMBHOx.cjs} +1 -1
- package/dist/{faceFns-BFEUkmn7.cjs → faceFns-C8A9sCkb.cjs} +2 -2
- package/dist/{faceFns-D9UAkqPb.js → faceFns-DFDKI39R.js} +2 -2
- package/dist/{helpers-BnF1MObz.cjs → helpers-D-mko0qh.cjs} +6 -6
- package/dist/{helpers-DnrXynu0.js → helpers-POBaax19.js} +6 -6
- package/dist/{historyFns-DGDKVD6-.js → historyFns-CbT3UJYn.js} +4 -4
- package/dist/{historyFns-BX9Bu5NT.cjs → historyFns-D0K337z6.cjs} +4 -4
- package/dist/{importFns-BMN4KCmX.cjs → importFns-B1ym1wuL.cjs} +2 -2
- package/dist/{importFns-B9RUaVsc.js → importFns-CwNl9Ll2.js} +2 -2
- package/dist/io.cjs +2 -2
- package/dist/io.js +2 -2
- package/dist/kernel/brepkit/brepkitWasmTypes.d.ts +17 -11
- package/dist/kernel/brepkit/constructionOps.d.ts +1 -1
- package/dist/kernel/brepkit/geometryOps.d.ts +8 -2
- package/dist/{measureFns-CaOR1TEA.cjs → measureFns-B7x2vp6b.cjs} +3 -3
- package/dist/{measureFns-CiCx5o_s.js → measureFns-CeEybpyd.js} +3 -3
- package/dist/measurement.cjs +1 -1
- package/dist/measurement.js +1 -1
- package/dist/{meshFns-k-gSXquL.js → meshFns-BtNBXH5S.js} +2 -2
- package/dist/{meshFns-CIdP0f35.cjs → meshFns-By5mtdo9.cjs} +2 -2
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/{primitiveFns-OvPYb4CU.js → primitiveFns-DfsjF4Kj.js} +7 -7
- package/dist/{primitiveFns-Ds2LNkol.cjs → primitiveFns-IzSRaAG-.cjs} +7 -7
- package/dist/projection.cjs +1 -1
- package/dist/projection.js +1 -1
- package/dist/query.cjs +2 -2
- package/dist/query.js +2 -2
- package/dist/{shapeFns-ByuSx62n.js → shapeFns-Cf79IuMn.js} +2 -2
- package/dist/{shapeFns-BD6oYLMM.cjs → shapeFns-DPjMiDcX.cjs} +2 -2
- package/dist/shapeRef.cjs +1 -1
- package/dist/shapeRef.js +1 -1
- package/dist/{shapeRefFns-CybMlSCu.cjs → shapeRefFns-hCaw9c68.cjs} +4 -4
- package/dist/{shapeRefFns-Bv3Jj1vz.js → shapeRefFns-sE77hIRw.js} +4 -4
- package/dist/{shapeTypes-BdIQ-d5X.js → shapeTypes-DUC23pOr.js} +27 -24
- package/dist/{shapeTypes-D6hfaPZq.cjs → shapeTypes-q3dLIqqs.cjs} +27 -24
- package/dist/sketching.cjs +3 -3
- package/dist/sketching.js +3 -3
- package/dist/{solidBuilders-DAHTAqeh.cjs → solidBuilders-BoeIWGQs.cjs} +2 -2
- package/dist/{solidBuilders-TJZOIga_.js → solidBuilders-CwwLuRz8.js} +2 -2
- package/dist/{surfaceBuilders-CzRFME5_.cjs → surfaceBuilders-BJX_D1VO.cjs} +2 -2
- package/dist/{surfaceBuilders-rNgtRqTR.js → surfaceBuilders-CRTJ3eLf.js} +2 -2
- package/dist/text.cjs +2 -2
- package/dist/text.js +2 -2
- package/dist/{textBlueprints-D7gWCZ88.cjs → textBlueprints-CuPkJa3W.cjs} +7 -7
- package/dist/{textBlueprints-C9eKTxef.js → textBlueprints-OEB7VKBv.js} +7 -7
- package/dist/{textMetrics-B5SN90x5.cjs → textMetrics-boJWbnQk.cjs} +1 -1
- package/dist/{textMetrics-0y73spLE.js → textMetrics-lTkakQKC.js} +1 -1
- package/dist/topology.cjs +7 -7
- package/dist/topology.js +7 -7
- package/dist/{topologyQueryFns-Ds2H75YB.js → topologyQueryFns-BELdxJ8R.js} +1 -1
- package/dist/{topologyQueryFns-hG0APAJN.cjs → topologyQueryFns-C38cIHle.cjs} +1 -1
- package/package.json +2 -2
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { B as createKernelHandle, Z as getKernel, t as castShape } from "./shapeTypes-
|
|
1
|
+
import { B as createKernelHandle, Z as getKernel, t as castShape } from "./shapeTypes-DUC23pOr.js";
|
|
2
2
|
import { A as ok, b as err, d as validationError, n as computationError, r as ioError } from "./errors-BJSTLaDI.js";
|
|
3
3
|
import { d as vecNormalize, s as vecIsZero } from "./vecOps-SKPRvPH-.js";
|
|
4
|
-
import { v as fromBREP } from "./faceFns-
|
|
5
|
-
import { s as toBREP } from "./shapeFns-
|
|
6
|
-
import { a as fuseAll } from "./booleanFns-
|
|
4
|
+
import { v as fromBREP } from "./faceFns-DFDKI39R.js";
|
|
5
|
+
import { s as toBREP } from "./shapeFns-Cf79IuMn.js";
|
|
6
|
+
import { a as fuseAll } from "./booleanFns-B-saLmi4.js";
|
|
7
7
|
//#region src/utils/uuid.ts
|
|
8
8
|
/** Generate a v4-style UUID string using `crypto.getRandomValues`. */
|
|
9
9
|
function uuidv() {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-q3dLIqqs.cjs");
|
|
2
2
|
const require_errors = require("./errors-DxoD7zgx.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_booleanFns = require("./booleanFns-
|
|
4
|
+
const require_faceFns = require("./faceFns-C8A9sCkb.cjs");
|
|
5
|
+
const require_shapeFns = require("./shapeFns-DPjMiDcX.cjs");
|
|
6
|
+
const require_booleanFns = require("./booleanFns-2zKQEuA8.cjs");
|
|
7
7
|
//#region src/utils/uuid.ts
|
|
8
8
|
/** Generate a v4-style UUID string using `crypto.getRandomValues`. */
|
|
9
9
|
function uuidv() {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-q3dLIqqs.cjs");
|
|
2
2
|
const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
|
|
3
3
|
const require_errors = require("./errors-DxoD7zgx.cjs");
|
|
4
4
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
5
|
-
const require_blueprint = require("./blueprint-
|
|
5
|
+
const require_blueprint = require("./blueprint-79MQJVZa.cjs");
|
|
6
6
|
//#region src/io/objExportFns.ts
|
|
7
7
|
/** Read a vec3 from a typed array at the given vertex index. */
|
|
8
8
|
function vec3At(arr, i) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Z as getKernel, t as castShape } from "./shapeTypes-
|
|
1
|
+
import { Z as getKernel, t as castShape } from "./shapeTypes-DUC23pOr.js";
|
|
2
2
|
import { n as wasmIndex, t as vec3At$1 } from "./vec3-Dpha8d5k.js";
|
|
3
3
|
import { A as ok, b as err, r as ioError, t as BrepErrorCode } from "./errors-BJSTLaDI.js";
|
|
4
4
|
import { n as getAtOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
5
|
-
import { f as make2dSegmentCurve, m as make2dThreePointArc, s as make2dBezierCurve, t as Blueprint } from "./blueprint-
|
|
5
|
+
import { f as make2dSegmentCurve, m as make2dThreePointArc, s as make2dBezierCurve, t as Blueprint } from "./blueprint-CUvDkWLs.js";
|
|
6
6
|
//#region src/io/objExportFns.ts
|
|
7
7
|
/** Read a vec3 from a typed array at the given vertex index. */
|
|
8
8
|
function vec3At(arr, i) {
|
package/dist/io.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_meshFns = require("./meshFns-
|
|
3
|
-
const require_importFns = require("./importFns-
|
|
2
|
+
const require_meshFns = require("./meshFns-By5mtdo9.cjs");
|
|
3
|
+
const require_importFns = require("./importFns-B1ym1wuL.cjs");
|
|
4
4
|
exports.blueprintToDXF = require_importFns.blueprintToDXF;
|
|
5
5
|
exports.exportDXF = require_importFns.exportDXF;
|
|
6
6
|
exports.exportGlb = require_importFns.exportGlb;
|
package/dist/io.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as exportSTEP, r as exportSTL, t as exportIGES } from "./meshFns-
|
|
2
|
-
import { a as importSVG, c as blueprintToDXF, d as exportGltf, f as exportOBJ, i as exportSTEPConfigured, l as exportDXF, n as importSTEP, o as importSVGPathD, r as importSTL, s as exportThreeMF, t as importIGES, u as exportGlb } from "./importFns-
|
|
1
|
+
import { n as exportSTEP, r as exportSTL, t as exportIGES } from "./meshFns-BtNBXH5S.js";
|
|
2
|
+
import { a as importSVG, c as blueprintToDXF, d as exportGltf, f as exportOBJ, i as exportSTEPConfigured, l as exportDXF, n as importSTEP, o as importSVGPathD, r as importSTL, s as exportThreeMF, t as importIGES, u as exportGlb } from "./importFns-CwNl9Ll2.js";
|
|
3
3
|
export { blueprintToDXF, exportDXF, exportGlb, exportGltf, exportIGES, exportOBJ, exportSTEP, exportSTEPConfigured, exportSTL, exportThreeMF, importIGES, importSTEP, importSTL, importSVG, importSVGPathD };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Type-safe interface for the brepkit WASM kernel (`BrepKernel`).
|
|
3
3
|
*
|
|
4
4
|
* AUTO-GENERATED by `npm run sync:brepkit-types`.
|
|
5
|
-
* Synced against `brepkit-wasm@2.
|
|
5
|
+
* Synced against `brepkit-wasm@2.99.0`.
|
|
6
6
|
*
|
|
7
7
|
* Methods not yet referenced in the adapter layer are tagged `@unwired`.
|
|
8
8
|
*
|
|
@@ -203,11 +203,11 @@ export interface BrepkitKernel {
|
|
|
203
203
|
fixFaceOrientations(solid: number): number;
|
|
204
204
|
mergeCoincidentVertices(solid: number, tolerance: number): number;
|
|
205
205
|
removeDegenerateEdges(solid: number, tolerance: number): number;
|
|
206
|
-
tessellateFace(face: number, deflection: number): BrepkitMesh;
|
|
206
|
+
tessellateFace(face: number, deflection: number, angularTolerance?: number | null): BrepkitMesh;
|
|
207
207
|
/** @unwired */
|
|
208
|
-
tessellateSolid(solid: number, deflection: number): BrepkitMesh;
|
|
209
|
-
tessellateSolidGrouped(solid: number, deflection: number): string;
|
|
210
|
-
tessellateSolidUV(solid: number, deflection: number): string;
|
|
208
|
+
tessellateSolid(solid: number, deflection: number, angularTolerance?: number | null): BrepkitMesh;
|
|
209
|
+
tessellateSolidGrouped(solid: number, deflection: number, angularTolerance?: number | null): string;
|
|
210
|
+
tessellateSolidUV(solid: number, deflection: number, angularTolerance?: number | null): string;
|
|
211
211
|
/** @unwired */
|
|
212
212
|
tessellateEdge(edge: number, numPoints: number): Float64Array;
|
|
213
213
|
/** @unwired */
|
|
@@ -281,27 +281,33 @@ export interface BrepkitKernel {
|
|
|
281
281
|
convertToElementary(solid: number): number;
|
|
282
282
|
/** @unwired */
|
|
283
283
|
detectCoincidentFaces(a: number, b: number): string;
|
|
284
|
+
/** @unwired */
|
|
285
|
+
getNurbsCurveData(edge: number): string;
|
|
286
|
+
/** @unwired */
|
|
287
|
+
getNurbsSurfaceData(face: number): string;
|
|
288
|
+
getNurbsSurfaceDataParity(face: number): string;
|
|
284
289
|
makeCircleEdge(cx: number, cy: number, cz: number, nx: number, ny: number, nz: number, radius: number): number;
|
|
285
290
|
/** @unwired */
|
|
286
291
|
makeCircleEdgeWithRef(cx: number, cy: number, cz: number, nx: number, ny: number, nz: number, radius: number, rx: number, ry: number, rz: number): number;
|
|
287
292
|
makeEllipseEdge(cx: number, cy: number, cz: number, nx: number, ny: number, nz: number, semiMajor: number, semiMinor: number): number;
|
|
288
293
|
makeEllipseEdgeWithRef(cx: number, cy: number, cz: number, nx: number, ny: number, nz: number, semiMajor: number, semiMinor: number, rx: number, ry: number, rz: number): number;
|
|
294
|
+
makePlanarFaceFromWire(wire: number): number;
|
|
289
295
|
/** @unwired */
|
|
290
296
|
sketchAddCircle(sketch: number, centerIdx: number, radius: number): number;
|
|
291
297
|
/** @unwired */
|
|
292
298
|
toBrepJson(solid: number): string;
|
|
293
299
|
transformFace(face: number, matrix: Float64Array | number[]): void;
|
|
294
|
-
/** @future Not in brepkit-wasm 2.
|
|
300
|
+
/** @future Not in brepkit-wasm 2.99.0. Referenced with feature detection in adapter. */
|
|
295
301
|
chamferAsymmetric?(solid: number, edgeHandles: Uint32Array | number[], d1: number, d2: number): number;
|
|
296
|
-
/** @future Not in brepkit-wasm 2.
|
|
302
|
+
/** @future Not in brepkit-wasm 2.99.0. Referenced with feature detection in adapter. */
|
|
297
303
|
compoundFuse?(solidIds: Uint32Array | number[]): number;
|
|
298
|
-
/** @future Not in brepkit-wasm 2.
|
|
304
|
+
/** @future Not in brepkit-wasm 2.99.0. Referenced with feature detection in adapter. */
|
|
299
305
|
copyEdge?(edge: number): number;
|
|
300
|
-
/** @future Not in brepkit-wasm 2.
|
|
306
|
+
/** @future Not in brepkit-wasm 2.99.0. Referenced with feature detection in adapter. */
|
|
301
307
|
copyFace?(face: number): number;
|
|
302
|
-
/** @future Not in brepkit-wasm 2.
|
|
308
|
+
/** @future Not in brepkit-wasm 2.99.0. Referenced with feature detection in adapter. */
|
|
303
309
|
transformEdge?(edge: number, matrix: Float64Array | number[]): void;
|
|
304
|
-
/** @future Not in brepkit-wasm 2.
|
|
310
|
+
/** @future Not in brepkit-wasm 2.99.0. Referenced with feature detection in adapter. */
|
|
305
311
|
validateSolidDetails?(solid: number): string;
|
|
306
312
|
/** Release the entire arena. */
|
|
307
313
|
free(): void;
|
|
@@ -4,7 +4,7 @@ import { Vec3 } from '../../utils/vec3.js';
|
|
|
4
4
|
export declare function makeVertex(bk: BrepkitKernel, x: number, y: number, z: number): KernelShape;
|
|
5
5
|
export declare function makeEdge(bk: BrepkitKernel, curve: KernelType, start?: number, end?: number): KernelShape;
|
|
6
6
|
export declare function makeWire(bk: BrepkitKernel, edges: KernelShape[]): KernelShape;
|
|
7
|
-
export declare function makeFace(bk: BrepkitKernel, wire: KernelShape,
|
|
7
|
+
export declare function makeFace(bk: BrepkitKernel, wire: KernelShape, planar?: boolean): KernelShape;
|
|
8
8
|
export declare function makeBox(bk: BrepkitKernel, width: number, height: number, depth: number): KernelShape;
|
|
9
9
|
export declare function makeRectangle(bk: BrepkitKernel, width: number, height: number): KernelShape;
|
|
10
10
|
export declare function makeCylinder(bk: BrepkitKernel, radius: number, height: number, center?: [number, number, number], direction?: [number, number, number]): KernelShape;
|
|
@@ -55,8 +55,14 @@ export declare function projectEdges(bk: BrepkitKernel, shape: KernelShape, _cam
|
|
|
55
55
|
};
|
|
56
56
|
/** brepkit does not support NURBS introspection on edges. Always returns null. */
|
|
57
57
|
export declare function getNurbsCurveData(_bk: BrepkitKernel, _edge: KernelShape): NurbsCurveData | null;
|
|
58
|
-
/**
|
|
59
|
-
|
|
58
|
+
/**
|
|
59
|
+
* Read-only B-Spline/NURBS surface data for a face.
|
|
60
|
+
*
|
|
61
|
+
* Type-gated: analytic faces (plane, cylinder, cone, sphere, torus) return
|
|
62
|
+
* `null`; only intrinsically free-form faces yield a record. The kernel emits
|
|
63
|
+
* distinct knots paired with multiplicities, matching {@link NurbsSurfaceData}.
|
|
64
|
+
*/
|
|
65
|
+
export declare function getNurbsSurfaceData(bk: BrepkitKernel, face: KernelShape): NurbsSurfaceData | null;
|
|
60
66
|
/** Co-located factory: returns the geometry-query slice of {@link KernelAdapter} bound to `bk`. */
|
|
61
67
|
export declare function makeGeometryOps(bk: BrepkitKernel): {
|
|
62
68
|
vertexPosition: (vertex: any) => [number, number, number];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-q3dLIqqs.cjs");
|
|
2
2
|
const require_errors = require("./errors-DxoD7zgx.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
4
|
-
const require_faceFns = require("./faceFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-C38cIHle.cjs");
|
|
4
|
+
const require_faceFns = require("./faceFns-C8A9sCkb.cjs");
|
|
5
5
|
//#region src/measurement/measureCache.ts
|
|
6
6
|
var cache = /* @__PURE__ */ new WeakMap();
|
|
7
7
|
function getCachedMeasurement(shape, key) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Z as getKernel } from "./shapeTypes-
|
|
1
|
+
import { Z as getKernel } from "./shapeTypes-DUC23pOr.js";
|
|
2
2
|
import { A as ok, b as err, d as validationError, t as BrepErrorCode } from "./errors-BJSTLaDI.js";
|
|
3
|
-
import { v as kernelCallRaw } from "./topologyQueryFns-
|
|
4
|
-
import { p as uvBounds } from "./faceFns-
|
|
3
|
+
import { v as kernelCallRaw } from "./topologyQueryFns-BELdxJ8R.js";
|
|
4
|
+
import { p as uvBounds } from "./faceFns-DFDKI39R.js";
|
|
5
5
|
//#region src/measurement/measureCache.ts
|
|
6
6
|
var cache = /* @__PURE__ */ new WeakMap();
|
|
7
7
|
function getCachedMeasurement(shape, key) {
|
package/dist/measurement.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_measureFns = require("./measureFns-
|
|
2
|
+
const require_measureFns = require("./measureFns-B7x2vp6b.cjs");
|
|
3
3
|
exports.createDistanceQuery = require_measureFns.createDistanceQuery;
|
|
4
4
|
exports.measureArea = require_measureFns.measureArea;
|
|
5
5
|
exports.measureDistance = require_measureFns.measureDistance;
|
package/dist/measurement.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as measureDistance, c as measureLinearProps, d as measureVolumeProps, l as measureSurfaceProps, n as measureArea, o as measureDistanceProps, s as measureLength, t as createDistanceQuery, u as measureVolume } from "./measureFns-
|
|
1
|
+
import { a as measureDistance, c as measureLinearProps, d as measureVolumeProps, l as measureSurfaceProps, n as measureArea, o as measureDistanceProps, s as measureLength, t as createDistanceQuery, u as measureVolume } from "./measureFns-CeEybpyd.js";
|
|
2
2
|
export { createDistanceQuery, measureArea, measureDistance, measureDistanceProps, measureLength, measureLinearProps, measureSurfaceProps, measureVolume, measureVolumeProps };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Z as getKernel } from "./shapeTypes-
|
|
1
|
+
import { Z as getKernel } from "./shapeTypes-DUC23pOr.js";
|
|
2
2
|
import { A as ok, b as err, r as ioError } from "./errors-BJSTLaDI.js";
|
|
3
|
-
import { O as getFaceOrigins } from "./shapeFns-
|
|
3
|
+
import { O as getFaceOrigins } from "./shapeFns-Cf79IuMn.js";
|
|
4
4
|
//#region src/topology/meshCache.ts
|
|
5
5
|
/**
|
|
6
6
|
* Build a parameter key for the inner cache map (excludes shape identity).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-q3dLIqqs.cjs");
|
|
2
2
|
const require_errors = require("./errors-DxoD7zgx.cjs");
|
|
3
|
-
const require_shapeFns = require("./shapeFns-
|
|
3
|
+
const require_shapeFns = require("./shapeFns-DPjMiDcX.cjs");
|
|
4
4
|
//#region src/topology/meshCache.ts
|
|
5
5
|
/**
|
|
6
6
|
* Build a parameter key for the inner cache map (excludes shape identity).
|
package/dist/operations.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_historyFns = require("./historyFns-
|
|
3
|
-
const require_extrudeFns = require("./extrudeFns-
|
|
2
|
+
const require_historyFns = require("./historyFns-D0K337z6.cjs");
|
|
3
|
+
const require_extrudeFns = require("./extrudeFns-zngMBHOx.cjs");
|
|
4
4
|
exports.addChild = require_historyFns.addChild;
|
|
5
5
|
exports.addStep = require_historyFns.addStep;
|
|
6
6
|
exports.circularPattern = require_historyFns.circularPattern;
|
package/dist/operations.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { C as walkAssembly, D as exportAssemblySTEP, E as linearPattern, O as createAssembly, S as updateNode, T as gridPattern, _ as collectShapes, a as findStep, b as findNode, c as registerOperation, d as replayHistory, g as addChild, h as undoLast, l as registerShape, m as stepsFrom, n as createHistory, o as getShape, p as stepCount, r as createRegistry, s as modifyStep, t as addStep, u as replayFrom, v as countNodes, w as circularPattern, x as removeChild, y as createAssemblyNode } from "./historyFns-
|
|
2
|
-
import { c as sweep, i as complexExtrude, l as twistExtrude, s as supportExtrude } from "./extrudeFns-
|
|
1
|
+
import { C as walkAssembly, D as exportAssemblySTEP, E as linearPattern, O as createAssembly, S as updateNode, T as gridPattern, _ as collectShapes, a as findStep, b as findNode, c as registerOperation, d as replayHistory, g as addChild, h as undoLast, l as registerShape, m as stepsFrom, n as createHistory, o as getShape, p as stepCount, r as createRegistry, s as modifyStep, t as addStep, u as replayFrom, v as countNodes, w as circularPattern, x as removeChild, y as createAssemblyNode } from "./historyFns-CbT3UJYn.js";
|
|
2
|
+
import { c as sweep, i as complexExtrude, l as twistExtrude, s as supportExtrude } from "./extrudeFns-CMGE0i5l.js";
|
|
3
3
|
export { addChild, addStep, circularPattern, collectShapes, complexExtrude, countNodes, createAssembly, createAssemblyNode, createHistory, createRegistry, exportAssemblySTEP, findNode, findStep, getShape as getHistoryShape, gridPattern, linearPattern, modifyStep, registerOperation, registerShape, removeChild, replayFrom, replayHistory, stepCount, stepsFrom, supportExtrude, sweep, twistExtrude, undoLast, updateNode, walkAssembly };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Z as getKernel, _ as isSolid, c as createSolid, h as isShape3D, p as isFace, r as castShapeWithKnownType, t as castShape, x as isClosedWire, y as isWire } from "./shapeTypes-
|
|
1
|
+
import { Z as getKernel, _ as isSolid, c as createSolid, h as isShape3D, p as isFace, r as castShapeWithKnownType, t as castShape, x as isClosedWire, y as isWire } from "./shapeTypes-DUC23pOr.js";
|
|
2
2
|
import { A as ok, T as isOk, b as err, d as validationError, i as kernelError, l as typeCastError, t as BrepErrorCode, v as andThen, w as isErr } from "./errors-BJSTLaDI.js";
|
|
3
|
-
import { c as getOrCreateCache, d as invalidateShapeCache, i as getCachedIsValid, o as getEdges, s as getFaces, u as getWires } from "./topologyQueryFns-
|
|
3
|
+
import { c as getOrCreateCache, d as invalidateShapeCache, i as getCachedIsValid, o as getEdges, s as getFaces, u as getWires } from "./topologyQueryFns-BELdxJ8R.js";
|
|
4
4
|
import { n as HASH_CODE_MAX, t as DEG2RAD } from "./constants-ITRzCnCp.js";
|
|
5
|
-
import { _ as downcast } from "./faceFns-
|
|
6
|
-
import { _ as propagateAllMetadata, g as collectInputFaceHashes, h as translate } from "./shapeFns-
|
|
5
|
+
import { _ as downcast } from "./faceFns-DFDKI39R.js";
|
|
6
|
+
import { _ as propagateAllMetadata, g as collectInputFaceHashes, h as translate } from "./shapeFns-Cf79IuMn.js";
|
|
7
7
|
import { t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
|
|
8
|
-
import { _ as makeThreePointArc, a as makeNonPlanarFace, c as makeBSplineApproximation, d as makeCircle, f as makeEllipse, g as makeTangentArc, h as makeLine, i as makeNewFaceWithinFace, m as makeHelix, o as makePolygon, p as makeEllipseArc, r as makeFace, s as assembleWire, t as addHolesInFace, u as makeBezierCurve } from "./surfaceBuilders-
|
|
9
|
-
import { a as fuseAll, i as fuse, n as cut, r as cutAll } from "./booleanFns-
|
|
10
|
-
import { a as makeOffset, c as makeTorus, i as makeEllipsoid, l as makeVertex, n as makeCone, o as makeSolid, r as makeCylinder, s as makeSphere, t as makeCompound, u as weldShellsAndFaces } from "./solidBuilders-
|
|
8
|
+
import { _ as makeThreePointArc, a as makeNonPlanarFace, c as makeBSplineApproximation, d as makeCircle, f as makeEllipse, g as makeTangentArc, h as makeLine, i as makeNewFaceWithinFace, m as makeHelix, o as makePolygon, p as makeEllipseArc, r as makeFace, s as assembleWire, t as addHolesInFace, u as makeBezierCurve } from "./surfaceBuilders-CRTJ3eLf.js";
|
|
9
|
+
import { a as fuseAll, i as fuse, n as cut, r as cutAll } from "./booleanFns-B-saLmi4.js";
|
|
10
|
+
import { a as makeOffset, c as makeTorus, i as makeEllipsoid, l as makeVertex, n as makeCone, o as makeSolid, r as makeCylinder, s as makeSphere, t as makeCompound, u as weldShellsAndFaces } from "./solidBuilders-CwwLuRz8.js";
|
|
11
11
|
//#region src/topology/threeHelpers.ts
|
|
12
12
|
/**
|
|
13
13
|
* Convert a ShapeMesh into BufferGeometry-compatible typed arrays.
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-q3dLIqqs.cjs");
|
|
2
2
|
const require_errors = require("./errors-DxoD7zgx.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-C38cIHle.cjs");
|
|
4
4
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
5
|
-
const require_faceFns = require("./faceFns-
|
|
6
|
-
const require_shapeFns = require("./shapeFns-
|
|
5
|
+
const require_faceFns = require("./faceFns-C8A9sCkb.cjs");
|
|
6
|
+
const require_shapeFns = require("./shapeFns-DPjMiDcX.cjs");
|
|
7
7
|
const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
|
|
8
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
9
|
-
const require_booleanFns = require("./booleanFns-
|
|
10
|
-
const require_solidBuilders = require("./solidBuilders-
|
|
8
|
+
const require_surfaceBuilders = require("./surfaceBuilders-BJX_D1VO.cjs");
|
|
9
|
+
const require_booleanFns = require("./booleanFns-2zKQEuA8.cjs");
|
|
10
|
+
const require_solidBuilders = require("./solidBuilders-BoeIWGQs.cjs");
|
|
11
11
|
//#region src/topology/threeHelpers.ts
|
|
12
12
|
/**
|
|
13
13
|
* Convert a ShapeMesh into BufferGeometry-compatible typed arrays.
|
package/dist/projection.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_cameraFns = require("./cameraFns-
|
|
2
|
+
const require_cameraFns = require("./cameraFns-C0uWLB4t.cjs");
|
|
3
3
|
exports.PROJECTION_PLANES = require_cameraFns.PROJECTION_PLANES;
|
|
4
4
|
exports.cameraFromPlane = require_cameraFns.cameraFromPlane;
|
|
5
5
|
exports.cameraLookAt = require_cameraFns.cameraLookAt;
|
package/dist/projection.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as makeProjectedEdges, i as projectEdges, n as cameraLookAt, o as PROJECTION_PLANES, r as createCamera, s as isProjectionPlane, t as cameraFromPlane } from "./cameraFns-
|
|
1
|
+
import { a as makeProjectedEdges, i as projectEdges, n as cameraLookAt, o as PROJECTION_PLANES, r as createCamera, s as isProjectionPlane, t as cameraFromPlane } from "./cameraFns-ILz-I1EN.js";
|
|
2
2
|
export { PROJECTION_PLANES, cameraFromPlane, cameraLookAt, createCamera, isProjectionPlane, makeProjectedEdges, projectEdges };
|
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-D-mko0qh.cjs");
|
|
3
|
+
const require_cornerFinder = require("./cornerFinder-DheJjEdJ.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-POBaax19.js";
|
|
2
|
+
import { t as cornerFinder } from "./cornerFinder-DnbKeXpc.js";
|
|
3
3
|
export { cornerFinder, edgeFinder, faceFinder, getSingleFace };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Z as getKernel, t as castShape } from "./shapeTypes-
|
|
1
|
+
import { Z as getKernel, t as castShape } from "./shapeTypes-DUC23pOr.js";
|
|
2
2
|
import { A as ok, b as err, d as validationError, t as BrepErrorCode } from "./errors-BJSTLaDI.js";
|
|
3
|
-
import { _ as kernelCall, c as getOrCreateCache, r as getCacheEntry, s as getFaces, v as kernelCallRaw } from "./topologyQueryFns-
|
|
3
|
+
import { _ as kernelCall, c as getOrCreateCache, r as getCacheEntry, s as getFaces, v as kernelCallRaw } from "./topologyQueryFns-BELdxJ8R.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
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes-q3dLIqqs.cjs");
|
|
2
2
|
const require_errors = require("./errors-DxoD7zgx.cjs");
|
|
3
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
+
const require_topologyQueryFns = require("./topologyQueryFns-C38cIHle.cjs");
|
|
4
4
|
const require_constants = require("./constants-BOVyEYGH.cjs");
|
|
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-hCaw9c68.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-sE77hIRw.js";
|
|
2
2
|
export { assignRoles, captureHint, createRef, defaultScorer, resolveRef, updateRoles };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
|
|
2
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
-
const require_faceFns = require("./faceFns-
|
|
4
|
-
const require_shapeFns = require("./shapeFns-
|
|
5
|
-
const require_measureFns = require("./measureFns-
|
|
2
|
+
const require_topologyQueryFns = require("./topologyQueryFns-C38cIHle.cjs");
|
|
3
|
+
const require_faceFns = require("./faceFns-C8A9sCkb.cjs");
|
|
4
|
+
const require_shapeFns = require("./shapeFns-DPjMiDcX.cjs");
|
|
5
|
+
const require_measureFns = require("./measureFns-B7x2vp6b.cjs");
|
|
6
6
|
//#region src/topology/shapeRef/scoring.ts
|
|
7
7
|
/**
|
|
8
8
|
* Default face scorer combining surface type, normal alignment, centroid proximity,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as wasmIndex } from "./vec3-Dpha8d5k.js";
|
|
2
|
-
import { s as getFaces } from "./topologyQueryFns-
|
|
3
|
-
import { c as normalAt, n as faceCenter, r as faceGeomType } from "./faceFns-
|
|
4
|
-
import { n as getHashCode } from "./shapeFns-
|
|
5
|
-
import { n as measureArea } from "./measureFns-
|
|
2
|
+
import { s as getFaces } from "./topologyQueryFns-BELdxJ8R.js";
|
|
3
|
+
import { c as normalAt, n as faceCenter, r as faceGeomType } from "./faceFns-DFDKI39R.js";
|
|
4
|
+
import { n as getHashCode } from "./shapeFns-Cf79IuMn.js";
|
|
5
|
+
import { n as measureArea } from "./measureFns-CeEybpyd.js";
|
|
6
6
|
//#region src/topology/shapeRef/scoring.ts
|
|
7
7
|
/**
|
|
8
8
|
* Default face scorer combining surface type, normal alignment, centroid proximity,
|
|
@@ -6233,9 +6233,15 @@ function projectEdges(bk, shape, _cameraOrigin, _cameraDirection, _cameraXAxis)
|
|
|
6233
6233
|
function getNurbsCurveData(_bk, _edge) {
|
|
6234
6234
|
return null;
|
|
6235
6235
|
}
|
|
6236
|
-
/**
|
|
6237
|
-
|
|
6238
|
-
|
|
6236
|
+
/**
|
|
6237
|
+
* Read-only B-Spline/NURBS surface data for a face.
|
|
6238
|
+
*
|
|
6239
|
+
* Type-gated: analytic faces (plane, cylinder, cone, sphere, torus) return
|
|
6240
|
+
* `null`; only intrinsically free-form faces yield a record. The kernel emits
|
|
6241
|
+
* distinct knots paired with multiplicities, matching {@link NurbsSurfaceData}.
|
|
6242
|
+
*/
|
|
6243
|
+
function getNurbsSurfaceData(bk, face) {
|
|
6244
|
+
return JSON.parse(bk.getNurbsSurfaceDataParity(unwrap(face, "face")));
|
|
6239
6245
|
}
|
|
6240
6246
|
/** Co-located factory: returns the geometry-query slice of {@link KernelAdapter} bound to `bk`. */
|
|
6241
6247
|
function makeGeometryOps(bk) {
|
|
@@ -6863,13 +6869,10 @@ function makeWire(bk, edges) {
|
|
|
6863
6869
|
}
|
|
6864
6870
|
return wireHandle(bk.makeWire(edgeIds, true));
|
|
6865
6871
|
}
|
|
6866
|
-
function makeFace(bk, wire,
|
|
6872
|
+
function makeFace(bk, wire, planar) {
|
|
6867
6873
|
const h = wire;
|
|
6868
|
-
|
|
6869
|
-
|
|
6870
|
-
return faceHandle(bk.makeFaceFromWire(wireId));
|
|
6871
|
-
}
|
|
6872
|
-
return faceHandle(bk.makeFaceFromWire(unwrap(wire, "wire")));
|
|
6874
|
+
const wireId = h.type === "edge" ? bk.makeWire([h.id], true) : unwrap(wire, "wire");
|
|
6875
|
+
return faceHandle(planar ? bk.makePlanarFaceFromWire(wireId) : bk.makeFaceFromWire(wireId));
|
|
6873
6876
|
}
|
|
6874
6877
|
function makeBox(bk, width, height, depth) {
|
|
6875
6878
|
return solidHandle(bk.makeBox(width, height, depth));
|
|
@@ -7072,7 +7075,7 @@ function solidFromShell(bk, shell) {
|
|
|
7072
7075
|
return solidHandle(bk.solidFromShell(unwrap(shell, "shell")));
|
|
7073
7076
|
}
|
|
7074
7077
|
function makeNonPlanarFace(bk, wire) {
|
|
7075
|
-
return makeFace(bk, wire,
|
|
7078
|
+
return makeFace(bk, wire, false);
|
|
7076
7079
|
}
|
|
7077
7080
|
function addHolesInFace(bk, face, holeWires) {
|
|
7078
7081
|
const wireIds = holeWires.map((w) => unwrap(w, "wire"));
|
|
@@ -7082,7 +7085,7 @@ function removeHolesFromFace(bk, face) {
|
|
|
7082
7085
|
return faceHandle(bk.removeHolesFromFace(unwrap(face, "face")));
|
|
7083
7086
|
}
|
|
7084
7087
|
function makeFaceOnSurface(bk, _surface, wire) {
|
|
7085
|
-
return makeFace(bk, wire,
|
|
7088
|
+
return makeFace(bk, wire, false);
|
|
7086
7089
|
}
|
|
7087
7090
|
function bsplineSurface(bk, points, rows, cols) {
|
|
7088
7091
|
const coords = [];
|
|
@@ -9367,13 +9370,13 @@ function makeMeasureOps(bk) {
|
|
|
9367
9370
|
//#endregion
|
|
9368
9371
|
//#region src/kernel/brepkit/meshOps.ts
|
|
9369
9372
|
function mesh(bk, shape, options) {
|
|
9370
|
-
if (options.angularTolerance > 0) warnOnce("mesh-angular", "mesh angularTolerance is not supported; only linear deflection is used.");
|
|
9371
9373
|
const h = unwrap(shape);
|
|
9372
9374
|
const bkHandle = shape;
|
|
9373
9375
|
const deflection = options.tolerance || .01;
|
|
9376
|
+
const angularTol = options.angularTolerance > 0 ? options.angularTolerance : void 0;
|
|
9374
9377
|
let result;
|
|
9375
|
-
if (bkHandle.type === "solid") result = meshSolid(bk, h, deflection, !!options.includeUVs);
|
|
9376
|
-
else if (bkHandle.type === "face") result = meshSingleFace(bk, h, deflection, 0);
|
|
9378
|
+
if (bkHandle.type === "solid") result = meshSolid(bk, h, deflection, !!options.includeUVs, angularTol);
|
|
9379
|
+
else if (bkHandle.type === "face") result = meshSingleFace(bk, h, deflection, 0, angularTol);
|
|
9377
9380
|
else throw new Error(`brepkit: cannot mesh shape of type '${bkHandle.type}'`);
|
|
9378
9381
|
if (options.skipNormals) result.normals = new Float32Array(0);
|
|
9379
9382
|
if (!options.includeUVs) result.uvs = new Float32Array(0);
|
|
@@ -9409,12 +9412,12 @@ function hasTriangulation(_bk, _shape) {
|
|
|
9409
9412
|
return false;
|
|
9410
9413
|
}
|
|
9411
9414
|
/** Tessellate a solid with per-face groups for brepjs mesh format. */
|
|
9412
|
-
function meshSolid(bk, solidId, deflection, includeUVs) {
|
|
9415
|
+
function meshSolid(bk, solidId, deflection, includeUVs, angularTolerance) {
|
|
9413
9416
|
try {
|
|
9414
|
-
return meshSolidGrouped(bk, solidId, deflection, includeUVs);
|
|
9417
|
+
return meshSolidGrouped(bk, solidId, deflection, includeUVs, angularTolerance);
|
|
9415
9418
|
} catch (e) {
|
|
9416
9419
|
console.warn(`brepkit: tessellateSolidGrouped failed (solidId=${solidId}), falling back to per-face:`, e);
|
|
9417
|
-
return meshSolidPerFace(bk, solidId, deflection);
|
|
9420
|
+
return meshSolidPerFace(bk, solidId, deflection, angularTolerance);
|
|
9418
9421
|
}
|
|
9419
9422
|
}
|
|
9420
9423
|
/**
|
|
@@ -9424,8 +9427,8 @@ function meshSolid(bk, solidId, deflection, includeUVs) {
|
|
|
9424
9427
|
* When `includeUVs` is true, makes an additional `tessellateSolidUV` call
|
|
9425
9428
|
* to populate real surface parametrization coordinates.
|
|
9426
9429
|
*/
|
|
9427
|
-
function meshSolidGrouped(bk, solidId, deflection, includeUVs) {
|
|
9428
|
-
const json = bk.tessellateSolidGrouped(solidId, deflection);
|
|
9430
|
+
function meshSolidGrouped(bk, solidId, deflection, includeUVs, angularTolerance) {
|
|
9431
|
+
const json = bk.tessellateSolidGrouped(solidId, deflection, angularTolerance);
|
|
9429
9432
|
const data = JSON.parse(json);
|
|
9430
9433
|
const faceIds = toArray(bk.getSolidFaces(solidId));
|
|
9431
9434
|
const groupCount = data.faceOffsets.length - 1;
|
|
@@ -9445,7 +9448,7 @@ function meshSolidGrouped(bk, solidId, deflection, includeUVs) {
|
|
|
9445
9448
|
if (includeUVs) {
|
|
9446
9449
|
const expectedUvLen = data.positions.length / 3 * 2;
|
|
9447
9450
|
try {
|
|
9448
|
-
const uvJson = bk.tessellateSolidUV(solidId, deflection);
|
|
9451
|
+
const uvJson = bk.tessellateSolidUV(solidId, deflection, angularTolerance);
|
|
9449
9452
|
const uvData = JSON.parse(uvJson);
|
|
9450
9453
|
if (uvData.uvs.length === expectedUvLen) uvs = new Float32Array(uvData.uvs);
|
|
9451
9454
|
else uvs = new Float32Array(expectedUvLen);
|
|
@@ -9462,7 +9465,7 @@ function meshSolidGrouped(bk, solidId, deflection, includeUVs) {
|
|
|
9462
9465
|
};
|
|
9463
9466
|
}
|
|
9464
9467
|
/** Per-face tessellation fallback -- N WASM calls, one per face. */
|
|
9465
|
-
function meshSolidPerFace(bk, solidId, deflection) {
|
|
9468
|
+
function meshSolidPerFace(bk, solidId, deflection, angularTolerance) {
|
|
9466
9469
|
const faceIds = toArray(bk.getSolidFaces(solidId));
|
|
9467
9470
|
const allVertices = [];
|
|
9468
9471
|
const allNormals = [];
|
|
@@ -9471,7 +9474,7 @@ function meshSolidPerFace(bk, solidId, deflection) {
|
|
|
9471
9474
|
const faceGroups = [];
|
|
9472
9475
|
let vertexOffset = 0;
|
|
9473
9476
|
for (const faceId of faceIds) try {
|
|
9474
|
-
const faceMesh = bk.tessellateFace(faceId, deflection);
|
|
9477
|
+
const faceMesh = bk.tessellateFace(faceId, deflection, angularTolerance);
|
|
9475
9478
|
const positions = faceMesh.positions;
|
|
9476
9479
|
const normals = faceMesh.normals;
|
|
9477
9480
|
const indices = faceMesh.indices;
|
|
@@ -9500,8 +9503,8 @@ function meshSolidPerFace(bk, solidId, deflection) {
|
|
|
9500
9503
|
};
|
|
9501
9504
|
}
|
|
9502
9505
|
/** Tessellate a single face and return brepjs mesh format. */
|
|
9503
|
-
function meshSingleFace(bk, faceId, deflection, faceHash) {
|
|
9504
|
-
const faceMesh = bk.tessellateFace(faceId, deflection);
|
|
9506
|
+
function meshSingleFace(bk, faceId, deflection, faceHash, angularTolerance) {
|
|
9507
|
+
const faceMesh = bk.tessellateFace(faceId, deflection, angularTolerance);
|
|
9505
9508
|
const positions = faceMesh.positions;
|
|
9506
9509
|
const normals = faceMesh.normals;
|
|
9507
9510
|
const indices = faceMesh.indices;
|