brepjs 20.5.0 → 20.6.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/README.md +1 -0
- package/dist/2d.cjs +9 -11
- package/dist/2d.js +9 -11
- package/dist/{adjacencyFns-1rxgJ6Hw.cjs → adjacencyFns-CmNvIFu1.cjs} +5 -6
- package/dist/{adjacencyFns-DeyXahej.js → adjacencyFns-DO9_F2YJ.js} +5 -6
- package/dist/{arrayAccess-DrUGPADn.js → arrayAccess-BpgouNir.js} +1 -2
- package/dist/{arrayAccess-e4H9cBfh.cjs → arrayAccess-DpJYARwv.cjs} +1 -2
- package/dist/{blueprint-Yyoiz-U1.cjs → blueprint-Ci2Mw5v-.cjs} +24 -37
- package/dist/{blueprint-rwJjYPzo.js → blueprint-DHKul4EN.js} +24 -37
- package/dist/{blueprintFns-Ce6OoPSX.cjs → blueprintFns-CbJPSd5r.cjs} +5 -7
- package/dist/{blueprintFns-Q3Sq-Fse.js → blueprintFns-D68_PxRl.js} +5 -7
- package/dist/{blueprintSketcher-FywUpRiV.js → blueprintSketcher-j9vJAniE.js} +19 -31
- package/dist/{blueprintSketcher-CzKbxeTk.cjs → blueprintSketcher-pVbM0BHf.cjs} +19 -31
- package/dist/{boolean2D-D8igCYc9.js → boolean2D-D6Oc8tBx.js} +13 -19
- package/dist/{boolean2D-BzZ9iBSn.cjs → boolean2D-Dq29HCr9.cjs} +13 -19
- package/dist/brepjs.cjs +113 -187
- package/dist/brepjs.js +113 -188
- package/dist/{bug-O02CsAmt.cjs → bug-CBcpIPuf.cjs} +2 -4
- package/dist/{bug-BdOHwn_e.js → bug-ClMTAJhe.js} +2 -4
- package/dist/{cameraFns-RHCb1F1s.cjs → cameraFns-BMXugx7m.cjs} +8 -11
- package/dist/{cameraFns-Cs6v3bWQ.js → cameraFns-DVZkA2eq.js} +8 -11
- package/dist/{constants-ITRzCnCp.js → constants-iraOnb2p.js} +1 -2
- package/dist/{constants-BOVyEYGH.cjs → constants-oee0S_x6.cjs} +1 -2
- package/dist/core.cjs +8 -8
- package/dist/core.js +8 -8
- package/dist/{cornerFinder-Dlae8IX5.js → cornerFinder-DSnn8gRP.js} +4 -5
- package/dist/{cornerFinder-Cji_BK-R.cjs → cornerFinder-DshfhGHG.cjs} +4 -5
- package/dist/{curveFns-KS1BWGhF.js → curveFns-CEb6TLxC.js} +3 -4
- package/dist/{curveFns-6-ULFrEB.cjs → curveFns-Cxq5lFqU.cjs} +3 -4
- package/dist/{drawFns-Ddlgp9gQ.cjs → drawFns-CH0q-0JP.cjs} +32 -45
- package/dist/{drawFns-3yRVBDgI.js → drawFns-DMhKXGgG.js} +32 -45
- package/dist/{errors-Zb3jBa0u.js → errors-B3espUT6.js} +3 -5
- package/dist/{errors-jwhfQJZK.cjs → errors-DoMAp7mQ.cjs} +3 -5
- package/dist/{faceFns-CZeHWke7.cjs → faceFns-B8ctN5Te.cjs} +6 -8
- package/dist/{faceFns-CTlJC5IY.js → faceFns-C-wc4fX-.js} +6 -8
- package/dist/{faceRoleFns-CWU1-Pm8.js → faceRoleFns-BPxzQF-n.js} +1 -2
- package/dist/{faceRoleFns-CtH_48MO.cjs → faceRoleFns-Db5bYj4Q.cjs} +1 -2
- package/dist/{healingFns-Ct3gEMvk.js → healingFns-CJfuZMw2.js} +16 -25
- package/dist/{healingFns-DwSpJZfg.cjs → healingFns-D3mNy1rp.cjs} +16 -25
- package/dist/{helpers-BN1mVMuZ.js → helpers-BXoAMWe3.js} +15 -21
- package/dist/{helpers-NRZVshPb.cjs → helpers-BhHbDu6-.cjs} +15 -21
- package/dist/{importFns-BEi-HsSw.cjs → importFns-DHaw1x5R.cjs} +12 -19
- package/dist/{importFns-0kHGg-b8.js → importFns-YZyGYu_M.js} +12 -19
- package/dist/io.cjs +2 -2
- package/dist/io.js +2 -2
- package/dist/kernel/occtWasm/occtWasmAdapter.cjs +1 -1
- package/dist/kernel/occtWasm/occtWasmAdapter.js +1 -2
- package/dist/{loftFns-B5mq1WDh.js → loftFns-CTTia_cZ.js} +7 -10
- package/dist/{loftFns-DL9UsQhd.cjs → loftFns-DVr6PaTM.cjs} +7 -10
- package/dist/{measureFns-CyDVZomf.js → measureFns-BmdVG0_8.js} +6 -8
- package/dist/{measureFns-D_GpQw5z.cjs → measureFns-C6wgH_1a.cjs} +6 -8
- package/dist/measurement.cjs +2 -2
- package/dist/measurement.js +2 -2
- package/dist/{meshFns-CAxkaRTm.cjs → meshFns-r_p0RRoO.cjs} +6 -8
- package/dist/{meshFns-COlno8TY.js → meshFns-uNRS602U.js} +6 -8
- package/dist/{occtWasmAdapter-CA6PmIIj.cjs → occtWasmAdapter-CxSY6Ty2.cjs} +37 -56
- package/dist/{occtWasmAdapter-BX10fyla.js → occtWasmAdapter-cnV8J7Y-.js} +37 -56
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/{originTrackingFns-DiHy5BZC.js → originTrackingFns-BIa3TdgX.js} +4 -5
- package/dist/{originTrackingFns-CWo6NWHK.cjs → originTrackingFns-DgJ-MTtE.cjs} +4 -5
- package/dist/{planeOps-DJuclNxa.cjs → planeOps-BDt05NAD.cjs} +5 -6
- package/dist/{planeOps-Cxws4Tiu.js → planeOps-BkwaqhUj.js} +5 -6
- package/dist/{primitiveFns-ZV3aMbqG.cjs → primitiveFns-CktCbLBo.cjs} +8 -10
- package/dist/{primitiveFns-CGJzS4MO.js → primitiveFns-h_zOAbmf.js} +8 -10
- package/dist/{principalBoxFns-5FSbxAj-.cjs → principalBoxFns-28BQIeo8.cjs} +7 -8
- package/dist/{principalBoxFns-BJgGEoik.js → principalBoxFns-DkP-681E.js} +7 -8
- package/dist/projection.cjs +1 -1
- package/dist/projection.js +1 -2
- package/dist/query.cjs +2 -2
- package/dist/query.js +2 -2
- package/dist/{refResolveFns-CpVZoeOT.js → refResolveFns-DUDJqfOM.js} +14 -21
- package/dist/{refResolveFns-Ct52Uw7R.cjs → refResolveFns-fSzDZ1rx.cjs} +14 -21
- package/dist/result.cjs +2 -2
- package/dist/result.js +2 -2
- package/dist/{rolldown-runtime-C0BPl7ul.cjs → rolldown-runtime-BW-eSwOZ.cjs} +1 -2
- package/dist/{shapeFns--1wNlcc_.js → shapeFns-B5hzkmwe.js} +5 -6
- package/dist/{shapeFns-C2j6oZ2u.cjs → shapeFns-DKDlt3k2.cjs} +5 -6
- package/dist/shapeRef.cjs +1 -1
- package/dist/shapeRef.js +1 -2
- package/dist/{shapeTypes-CqNJoSam.js → shapeTypes-Bva18qvE.js} +81 -160
- package/dist/{shapeTypes-DH2ShBU_.cjs → shapeTypes-CkxvJRpq.cjs} +81 -160
- package/dist/sketching.cjs +4 -5
- package/dist/sketching.js +4 -5
- package/dist/{solidBuilders-CgicU3le.cjs → solidBuilders-BFEnqrU0.cjs} +17 -23
- package/dist/{solidBuilders-IstbiWju.js → solidBuilders-BpTN-NfM.js} +17 -23
- package/dist/{surfaceBuilders-vYgSvgI6.cjs → surfaceBuilders-CTk2lGlw.cjs} +8 -12
- package/dist/{surfaceBuilders-8nLk2PWk.js → surfaceBuilders-DAZCPa5O.js} +8 -12
- package/dist/text.cjs +2 -2
- package/dist/text.js +2 -2
- package/dist/{textBlueprints-fa7VHJZz.cjs → textBlueprints-DbEWBdhF.cjs} +24 -32
- package/dist/{textBlueprints-C13NAA3C.js → textBlueprints-DuwP72D6.js} +23 -31
- package/dist/{textMetrics--cikHkGX.cjs → textMetrics-CbNBlPsl.cjs} +4 -6
- package/dist/{textMetrics-Dcc63qRm.js → textMetrics-q6RSXX9Z.js} +4 -6
- package/dist/{threadFns-BUQPg_vI.cjs → threadFns-5FXCN-9R.cjs} +21 -33
- package/dist/{threadFns-3U9x4v_M.js → threadFns-BcsScbp4.js} +21 -33
- package/dist/topology.cjs +9 -9
- package/dist/topology.js +9 -9
- package/dist/{topologyQueryFns-q2bGyuEV.cjs → topologyQueryFns-C6HwYYpi.cjs} +6 -9
- package/dist/{topologyQueryFns-DnfjQgP7.js → topologyQueryFns-CY6YiGsk.js} +6 -9
- package/dist/{types-D24Y27N0.js → types-CKXsIm9-.js} +1 -2
- package/dist/{types-KjA8tY4Y.cjs → types-CjF9Rofr.cjs} +1 -2
- package/dist/{validityTypes-r0A2YdNq.cjs → validityTypes-D0IDDMbY.cjs} +3 -4
- package/dist/{validityTypes-t7JpS0Ki.js → validityTypes-MiXYsBZi.js} +3 -4
- package/dist/{vecOps-CCnJt-yH.cjs → vecOps-CrGEPPQM.cjs} +1 -2
- package/dist/{vecOps-SKPRvPH-.js → vecOps-S-m9H_fe.js} +1 -2
- package/dist/vectors.cjs +4 -4
- package/dist/vectors.js +4 -4
- package/dist/worker.cjs +1 -1
- package/dist/worker.js +1 -2
- package/dist/{workerPool-XcYX2UZ0.js → workerPool-Bc5hmJc4.js} +5 -10
- package/dist/{workerPool-D30NsiIW.cjs → workerPool-D5tiNXrI.cjs} +5 -10
- package/package.json +10 -10
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as EXACT_BREP_CAPABILITIES, C as serializeCurve2d$2, D as UnsupportedKernelOperationError, E as quickHull, O as isUnsupportedKernelOperationError, S as scaleCurve2d$2, T as translateCurve2d$2, _ as makeEllipse2d$2, a as buildBinarySTL, b as mirrorAtPoint, c as curveBounds, d as evaluateCurve2d$2, f as intersectCurves2dFn, g as makeCircle2d$2, h as makeBezier2d$2, i as buildAsciiSTL, l as curveTypeName, m as makeArc2dThreePoints, n as DEFAULT_STL_ANGULAR_TOLERANCE, o as addCurveToBBox, p as makeArc2dTangent, r as DEFAULT_STL_TOLERANCE, s as createBBox2d, t as OcctWasmAdapter, u as deserializeCurve2d$2, v as makeLine2d$2, w as tangentCurve2d, x as rotateCurve2d$2, y as mirrorAcrossAxis } from "./occtWasmAdapter-
|
|
2
|
-
import { i as wasmIndex, r as vec3At } from "./bug-
|
|
3
|
-
|
|
1
|
+
import { A as EXACT_BREP_CAPABILITIES, C as serializeCurve2d$2, D as UnsupportedKernelOperationError, E as quickHull, O as isUnsupportedKernelOperationError, S as scaleCurve2d$2, T as translateCurve2d$2, _ as makeEllipse2d$2, a as buildBinarySTL, b as mirrorAtPoint, c as curveBounds, d as evaluateCurve2d$2, f as intersectCurves2dFn, g as makeCircle2d$2, h as makeBezier2d$2, i as buildAsciiSTL, l as curveTypeName, m as makeArc2dThreePoints, n as DEFAULT_STL_ANGULAR_TOLERANCE, o as addCurveToBBox, p as makeArc2dTangent, r as DEFAULT_STL_TOLERANCE, s as createBBox2d, t as OcctWasmAdapter, u as deserializeCurve2d$2, v as makeLine2d$2, w as tangentCurve2d, x as rotateCurve2d$2, y as mirrorAcrossAxis } from "./occtWasmAdapter-cnV8J7Y-.js";
|
|
2
|
+
import { i as wasmIndex, r as vec3At } from "./bug-ClMTAJhe.js";
|
|
3
|
+
// src/kernel/quality.ts
|
|
4
4
|
/**
|
|
5
5
|
* Extract-time deflection per level. `'standard'` matches brepjs's historical
|
|
6
6
|
* `mesh()` defaults (1e-3 / 0.1) so behaviour is unchanged when no quality is
|
|
@@ -33,14 +33,12 @@ function qualityDeflection(level = _current) {
|
|
|
33
33
|
function setQualityState(level) {
|
|
34
34
|
_current = level;
|
|
35
35
|
}
|
|
36
|
-
|
|
37
|
-
//#region src/kernel/kernel2dTypes.ts
|
|
36
|
+
// src/kernel/kernel2dTypes.ts
|
|
38
37
|
/** Check if the kernel supports 2D geometry operations. */
|
|
39
38
|
function supportsKernel2D(kernel) {
|
|
40
39
|
return "makeLine2d" in kernel;
|
|
41
40
|
}
|
|
42
|
-
|
|
43
|
-
//#region src/kernel/perfStats.ts
|
|
41
|
+
// src/kernel/perfStats.ts
|
|
44
42
|
/**
|
|
45
43
|
* Operation-level performance instrumentation.
|
|
46
44
|
*
|
|
@@ -93,8 +91,7 @@ function getPerformanceStats() {
|
|
|
93
91
|
function resetPerformanceStats() {
|
|
94
92
|
_init();
|
|
95
93
|
}
|
|
96
|
-
|
|
97
|
-
//#region src/kernel/occt/booleanBatchOps.ts
|
|
94
|
+
// src/kernel/occt/booleanBatchOps.ts
|
|
98
95
|
var hasCppBooleanBatch;
|
|
99
96
|
function resetBooleanBatchDetectionCache() {
|
|
100
97
|
hasCppBooleanBatch = void 0;
|
|
@@ -145,8 +142,7 @@ function cppCutAll(oc, base, tools, options = {}) {
|
|
|
145
142
|
}
|
|
146
143
|
/* v8 ignore stop */
|
|
147
144
|
}
|
|
148
|
-
|
|
149
|
-
//#region src/kernel/occt/measureOps.ts
|
|
145
|
+
// src/kernel/occt/measureOps.ts
|
|
150
146
|
var HASH_CODE_MAX = 2147483647;
|
|
151
147
|
/** Cached flag: does the WASM build include MeasurementExtractor? */
|
|
152
148
|
var hasCppMeasurement;
|
|
@@ -355,8 +351,7 @@ function makeMeasureOps$2(oc) {
|
|
|
355
351
|
measureBulk: (shape, includeLinear) => measureBulk$2(oc, shape, includeLinear)
|
|
356
352
|
};
|
|
357
353
|
}
|
|
358
|
-
|
|
359
|
-
//#region src/kernel/occt/topologyOps.ts
|
|
354
|
+
// src/kernel/occt/topologyOps.ts
|
|
360
355
|
var BULK_TYPE_ENUM_MAP = {
|
|
361
356
|
vertex: 7,
|
|
362
357
|
edge: 6,
|
|
@@ -524,8 +519,7 @@ function makeTopologyOps$2(oc) {
|
|
|
524
519
|
sew: (shapes, tolerance) => sew$1(oc, shapes, tolerance)
|
|
525
520
|
};
|
|
526
521
|
}
|
|
527
|
-
|
|
528
|
-
//#region src/kernel/occt/booleanOps.ts
|
|
522
|
+
// src/kernel/occt/booleanOps.ts
|
|
529
523
|
/** Tolerance passed to OCCT SimplifyResult (ShapeUpgrade_UnifySameDomain). */
|
|
530
524
|
var SIMPLIFY_TOLERANCE = .001;
|
|
531
525
|
/**
|
|
@@ -833,8 +827,7 @@ function makeBooleanOps$2(oc) {
|
|
|
833
827
|
checkBoolean: (shape, tool, op) => checkBoolean$1(oc, shape, tool, op, (s) => isValid$1(oc, s))
|
|
834
828
|
};
|
|
835
829
|
}
|
|
836
|
-
|
|
837
|
-
//#region src/kernel/occt/booleanPipelineOps.ts
|
|
830
|
+
// src/kernel/occt/booleanPipelineOps.ts
|
|
838
831
|
var OP_CODES = {
|
|
839
832
|
fuse: 0,
|
|
840
833
|
cut: 1,
|
|
@@ -864,8 +857,7 @@ function executeBooleanPipeline(oc, base, steps, options = {}) {
|
|
|
864
857
|
function makeBooleanPipelineOps(oc) {
|
|
865
858
|
return { booleanPipeline: (base, steps, options) => executeBooleanPipeline(oc, base, steps, options) ?? null };
|
|
866
859
|
}
|
|
867
|
-
|
|
868
|
-
//#region src/kernel/occt/constructorOps.ts
|
|
860
|
+
// src/kernel/occt/constructorOps.ts
|
|
869
861
|
/**
|
|
870
862
|
* Creates a vertex at the given coordinates.
|
|
871
863
|
*/
|
|
@@ -1084,8 +1076,7 @@ function makeConstructorOps(oc) {
|
|
|
1084
1076
|
buildTriFace: (a, b, c) => makeTriFace$1(oc, a, b, c)
|
|
1085
1077
|
};
|
|
1086
1078
|
}
|
|
1087
|
-
|
|
1088
|
-
//#region src/kernel/occt/hullOps.ts
|
|
1079
|
+
// src/kernel/occt/hullOps.ts
|
|
1089
1080
|
/** Safe array access — throws on out-of-bounds instead of returning undefined. */
|
|
1090
1081
|
function at(arr, i) {
|
|
1091
1082
|
const v = arr[i];
|
|
@@ -1221,8 +1212,7 @@ function makeHullOps(oc) {
|
|
|
1221
1212
|
buildSolidFromFaces: (points, faces, tolerance) => buildSolidFromFaces$1(oc, points, faces, tolerance)
|
|
1222
1213
|
};
|
|
1223
1214
|
}
|
|
1224
|
-
|
|
1225
|
-
//#region src/kernel/occt/extendedConstructorOps.ts
|
|
1215
|
+
// src/kernel/occt/extendedConstructorOps.ts
|
|
1226
1216
|
/** Create a straight edge between two 3D points. */
|
|
1227
1217
|
function makeLineEdge$1(oc, p1, p2) {
|
|
1228
1218
|
const gp1 = new oc.gp_Pnt_3(p1[0], p1[1], p1[2]);
|
|
@@ -1705,8 +1695,7 @@ function makeExtendedConstructorOps(oc) {
|
|
|
1705
1695
|
createAxis3: (ox, oy, oz, zx, zy, zz, xx, xy, xz) => createAxis3$1(oc, ox, oy, oz, zx, zy, zz, xx, xy, xz)
|
|
1706
1696
|
};
|
|
1707
1697
|
}
|
|
1708
|
-
|
|
1709
|
-
//#region src/kernel/occt/sweepOps.ts
|
|
1698
|
+
// src/kernel/occt/sweepOps.ts
|
|
1710
1699
|
/**
|
|
1711
1700
|
* Extrudes a face along a direction.
|
|
1712
1701
|
*/
|
|
@@ -1888,8 +1877,7 @@ function makeSweepOps$2(oc) {
|
|
|
1888
1877
|
extrudeBatch: (entries) => extrudeBatch(oc, entries)
|
|
1889
1878
|
};
|
|
1890
1879
|
}
|
|
1891
|
-
|
|
1892
|
-
//#region src/kernel/occt/modifierOps.ts
|
|
1880
|
+
// src/kernel/occt/modifierOps.ts
|
|
1893
1881
|
/**
|
|
1894
1882
|
* Applies a fillet (rounded edge) to selected edges of a shape.
|
|
1895
1883
|
* Supports constant radius, variable radius [r1, r2], and per-edge callbacks.
|
|
@@ -2146,8 +2134,7 @@ function makeModifierOps$2(oc) {
|
|
|
2146
2134
|
filletBatch: (entries) => filletBatch(oc, entries)
|
|
2147
2135
|
};
|
|
2148
2136
|
}
|
|
2149
|
-
|
|
2150
|
-
//#region src/kernel/occt/transformOps.ts
|
|
2137
|
+
// src/kernel/occt/transformOps.ts
|
|
2151
2138
|
/** Cached flag: does the WASM build include TransformBatch? */
|
|
2152
2139
|
var hasCppTransformBatch;
|
|
2153
2140
|
/** Reset detection cache (called when kernel is re-initialized). */
|
|
@@ -2347,8 +2334,7 @@ function makeTransformOps$2(oc) {
|
|
|
2347
2334
|
simplify: (shape) => simplify$2(oc, shape)
|
|
2348
2335
|
};
|
|
2349
2336
|
}
|
|
2350
|
-
|
|
2351
|
-
//#region src/kernel/occt/meshOps.ts
|
|
2337
|
+
// src/kernel/occt/meshOps.ts
|
|
2352
2338
|
/** Slice a Float32Array from the WASM heap, or return empty if size is 0. */
|
|
2353
2339
|
function sliceF32(heap, ptr, size) {
|
|
2354
2340
|
if (size === 0) return /* @__PURE__ */ new Float32Array(0);
|
|
@@ -2433,16 +2419,14 @@ function makeMeshOps$2(oc) {
|
|
|
2433
2419
|
meshEdges: (shape, tolerance, angularTolerance) => meshEdges$2(oc, shape, tolerance, angularTolerance)
|
|
2434
2420
|
};
|
|
2435
2421
|
}
|
|
2436
|
-
|
|
2437
|
-
//#region src/utils/ioFilename.ts
|
|
2422
|
+
// src/utils/ioFilename.ts
|
|
2438
2423
|
/** Shared counter for unique I/O filenames to prevent race conditions in concurrent operations. */
|
|
2439
2424
|
var _counter = 0;
|
|
2440
2425
|
/** Generate a unique filename with prefix and extension (e.g., `_export_1.step`). */
|
|
2441
2426
|
function uniqueIOFilename(prefix, ext) {
|
|
2442
2427
|
return `${prefix}_${++_counter}.${ext}`;
|
|
2443
2428
|
}
|
|
2444
|
-
|
|
2445
|
-
//#region src/kernel/occt/ioOps.ts
|
|
2429
|
+
// src/kernel/occt/ioOps.ts
|
|
2446
2430
|
/**
|
|
2447
2431
|
* Exports shapes to STEP format.
|
|
2448
2432
|
*
|
|
@@ -2588,8 +2572,7 @@ function makeIoOps$2(oc) {
|
|
|
2588
2572
|
importIGES: (data) => importIGES$1(oc, data)
|
|
2589
2573
|
};
|
|
2590
2574
|
}
|
|
2591
|
-
|
|
2592
|
-
//#region src/kernel/occt/geometryQueryOps.ts
|
|
2575
|
+
// src/kernel/occt/geometryQueryOps.ts
|
|
2593
2576
|
/** Extract the 3D position of a vertex. */
|
|
2594
2577
|
function vertexPosition$1(oc, vertex) {
|
|
2595
2578
|
const pnt = oc.BRep_Tool.Pnt(vertex);
|
|
@@ -3002,8 +2985,7 @@ function makeGeometryQueryOps(oc) {
|
|
|
3002
2985
|
reverseSurfaceU: (surface) => reverseSurfaceU$1(oc, surface)
|
|
3003
2986
|
};
|
|
3004
2987
|
}
|
|
3005
|
-
|
|
3006
|
-
//#region src/kernel/occt/nurbsQueryOps.ts
|
|
2988
|
+
// src/kernel/occt/nurbsQueryOps.ts
|
|
3007
2989
|
/**
|
|
3008
2990
|
* Extract NURBS curve data from a BSpline or Bezier edge.
|
|
3009
2991
|
* Returns null for non-BSpline curve types (line, circle, etc.).
|
|
@@ -3141,8 +3123,7 @@ function makeNurbsQueryOps(oc) {
|
|
|
3141
3123
|
getNurbsSurfaceData: (face) => getNurbsSurfaceData$1(oc, face)
|
|
3142
3124
|
};
|
|
3143
3125
|
}
|
|
3144
|
-
|
|
3145
|
-
//#region src/kernel/occt/curveOps.ts
|
|
3126
|
+
// src/kernel/occt/curveOps.ts
|
|
3146
3127
|
/**
|
|
3147
3128
|
* Interpolate a BSpline curve through the given points.
|
|
3148
3129
|
*
|
|
@@ -3211,8 +3192,7 @@ function makeCurveOps(oc) {
|
|
|
3211
3192
|
approximatePoints: (points, options) => approximatePoints$1(oc, points, options ?? {})
|
|
3212
3193
|
};
|
|
3213
3194
|
}
|
|
3214
|
-
|
|
3215
|
-
//#region src/kernel/occt/healingOps.ts
|
|
3195
|
+
// src/kernel/occt/healingOps.ts
|
|
3216
3196
|
/**
|
|
3217
3197
|
* Heals a solid shape using ShapeFix_Solid.
|
|
3218
3198
|
* Returns the healed solid, or null if the fixer produced a null result.
|
|
@@ -3263,8 +3243,7 @@ function makeHealingOps(oc) {
|
|
|
3263
3243
|
healWire: (wire, face) => healWire$1(oc, wire, face)
|
|
3264
3244
|
};
|
|
3265
3245
|
}
|
|
3266
|
-
|
|
3267
|
-
//#region src/kernel/occt/evolutionOps.ts
|
|
3246
|
+
// src/kernel/occt/evolutionOps.ts
|
|
3268
3247
|
/** Shared empty evolution object for operations with no face tracking.
|
|
3269
3248
|
* Avoids allocating new Map/Set instances on every transform. */
|
|
3270
3249
|
var EMPTY_EVOLUTION = {
|
|
@@ -3443,8 +3422,7 @@ function modifierWithEvolution(oc, builder, inputShape, inputFaceHashes, hashUpp
|
|
|
3443
3422
|
evolution: buildEvolution$1(oc, builder, inputShape, inputFaceHashes, hashUpperBound)
|
|
3444
3423
|
};
|
|
3445
3424
|
}
|
|
3446
|
-
|
|
3447
|
-
//#region src/kernel/occt/historyOps.ts
|
|
3425
|
+
// src/kernel/occt/historyOps.ts
|
|
3448
3426
|
function translateWithHistory$1(oc, shape, x, y, z, inputFaceHashes, hashUpperBound) {
|
|
3449
3427
|
const trsf = new oc.gp_Trsf_1();
|
|
3450
3428
|
const vec = new oc.gp_Vec_4(x, y, z);
|
|
@@ -3654,8 +3632,7 @@ function makeHistoryOps(oc) {
|
|
|
3654
3632
|
draftWithHistory: (shape, faces, pullDirection, neutralPlane, angleDeg, inputFaceHashes, hashUpperBound) => draftWithHistory$1(oc, shape, faces, pullDirection, neutralPlane, angleDeg, inputFaceHashes, hashUpperBound)
|
|
3655
3633
|
};
|
|
3656
3634
|
}
|
|
3657
|
-
|
|
3658
|
-
//#region src/kernel/occt/advancedOps.ts
|
|
3635
|
+
// src/kernel/occt/advancedOps.ts
|
|
3659
3636
|
/**
|
|
3660
3637
|
* Apply a non-orthogonal general transform using gp_GTrsf + BRepBuilderAPI_GTransform.
|
|
3661
3638
|
* This path is for shear / non-uniform scale matrices. Requires BRepBuilderAPI_GTransform
|
|
@@ -4425,8 +4402,7 @@ function makeAdvancedOps(oc) {
|
|
|
4425
4402
|
exportSTEPConfigured: (shapes, options) => exportSTEPConfigured$1(oc, shapes, options ?? {})
|
|
4426
4403
|
};
|
|
4427
4404
|
}
|
|
4428
|
-
|
|
4429
|
-
//#region src/kernel/occt/kernel2dOps.ts
|
|
4405
|
+
// src/kernel/occt/kernel2dOps.ts
|
|
4430
4406
|
var noop$1 = () => {};
|
|
4431
4407
|
/** Cast opaque Curve2dHandle to internal Curve2dObj. */
|
|
4432
4408
|
function c2d$1(handle) {
|
|
@@ -5260,8 +5236,7 @@ function makeKernel2dOps$1(oc) {
|
|
|
5260
5236
|
fillSurface: (wires, options) => fillSurface$1(oc, wires, options)
|
|
5261
5237
|
};
|
|
5262
5238
|
}
|
|
5263
|
-
|
|
5264
|
-
//#region src/kernel/occt/defaultAdapter.ts
|
|
5239
|
+
// src/kernel/occt/defaultAdapter.ts
|
|
5265
5240
|
/**
|
|
5266
5241
|
* Stubs for methods that only the brepkit kernel implements.
|
|
5267
5242
|
*
|
|
@@ -5335,8 +5310,7 @@ var DefaultAdapter = class {
|
|
|
5335
5310
|
Object.assign(this, makeBooleanOps$2(oc), makeBooleanPipelineOps(oc), makeHullOps(oc), makeConstructorOps(oc), makeExtendedConstructorOps(oc), makeSweepOps$2(oc), makeModifierOps$2(oc), makeTransformOps$2(oc), makeMeshOps$2(oc), makeIoOps$2(oc), makeMeasureOps$2(oc), makeTopologyOps$2(oc), makeGeometryQueryOps(oc), makeNurbsQueryOps(oc), makeCurveOps(oc), makeHealingOps(oc), makeHistoryOps(oc), makeAdvancedOps(oc), makeKernel2dOps$1(oc), makeDraftAdapter(oc), makeBrepkitOnlyStubs());
|
|
5336
5311
|
}
|
|
5337
5312
|
};
|
|
5338
|
-
|
|
5339
|
-
//#region src/kernel/brepkit/helpers.ts
|
|
5313
|
+
// src/kernel/brepkit/helpers.ts
|
|
5340
5314
|
/** Shared no-op delete -- one function instance for all handles. */
|
|
5341
5315
|
var noop = () => {};
|
|
5342
5316
|
/** Type guard: is this shape a brepkit handle? */
|
|
@@ -5677,8 +5651,7 @@ function resolveUniformAngle(faces, angleDeg) {
|
|
|
5677
5651
|
if (uniform === void 0) throw new Error("draft: no faces provided");
|
|
5678
5652
|
return uniform;
|
|
5679
5653
|
}
|
|
5680
|
-
|
|
5681
|
-
//#region src/kernel/brepkit/topologyOps.ts
|
|
5654
|
+
// src/kernel/brepkit/topologyOps.ts
|
|
5682
5655
|
function iterCompound(bk, h, type) {
|
|
5683
5656
|
const children = syntheticCompounds.get(h);
|
|
5684
5657
|
if (children) return children.flatMap((child) => child.type === type ? [child] : iterShapes$1(bk, child, type));
|
|
@@ -5853,8 +5826,7 @@ function makeTopologyOps$1(bk) {
|
|
|
5853
5826
|
sew: (shapes, tolerance) => sew(bk, shapes, tolerance)
|
|
5854
5827
|
};
|
|
5855
5828
|
}
|
|
5856
|
-
|
|
5857
|
-
//#region src/kernel/brepkit/geometryOps.ts
|
|
5829
|
+
// src/kernel/brepkit/geometryOps.ts
|
|
5858
5830
|
function vertexPosition(bk, vertex) {
|
|
5859
5831
|
return vec3At(bk.getVertexPosition(unwrap$1(vertex, "vertex")));
|
|
5860
5832
|
}
|
|
@@ -6224,8 +6196,7 @@ function makeGeometryOps$1(bk) {
|
|
|
6224
6196
|
getNurbsSurfaceData: (face) => getNurbsSurfaceData(bk, face)
|
|
6225
6197
|
};
|
|
6226
6198
|
}
|
|
6227
|
-
|
|
6228
|
-
//#region src/kernel/brepkit/transformOps.ts
|
|
6199
|
+
// src/kernel/brepkit/transformOps.ts
|
|
6229
6200
|
function transform$2(bk, shape, trsf) {
|
|
6230
6201
|
if (Array.isArray(trsf) && trsf.length === 16) return applyMatrix$1(bk, shape, trsf);
|
|
6231
6202
|
throw new Error("brepkit: transform expects a 16-element matrix array");
|
|
@@ -6319,8 +6290,7 @@ function makeTransformOps$1(bk) {
|
|
|
6319
6290
|
transformBatch: (entries) => transformBatch$1(bk, entries)
|
|
6320
6291
|
};
|
|
6321
6292
|
}
|
|
6322
|
-
|
|
6323
|
-
//#region src/kernel/brepkit/internalOps.ts
|
|
6293
|
+
// src/kernel/brepkit/internalOps.ts
|
|
6324
6294
|
/** Apply a 4x4 row-major matrix to a shape (copy + transform). */
|
|
6325
6295
|
function applyMatrix$1(bk, shape, matrix) {
|
|
6326
6296
|
const h = shape;
|
|
@@ -6489,8 +6459,7 @@ function extractNurbsFromEdge(bk, shape) {
|
|
|
6489
6459
|
weights: [1, 1]
|
|
6490
6460
|
};
|
|
6491
6461
|
}
|
|
6492
|
-
|
|
6493
|
-
//#region src/kernel/brepkit/repairOps.ts
|
|
6462
|
+
// src/kernel/brepkit/repairOps.ts
|
|
6494
6463
|
function isValid(bk, shape) {
|
|
6495
6464
|
if (!isBrepkitHandle(shape)) return false;
|
|
6496
6465
|
if (shape.type !== "solid") return true;
|
|
@@ -6579,8 +6548,7 @@ function makeRepairOps$1(bk) {
|
|
|
6579
6548
|
validationDetails: (shape) => validationDetails(bk, shape)
|
|
6580
6549
|
};
|
|
6581
6550
|
}
|
|
6582
|
-
|
|
6583
|
-
//#region src/kernel/brepkit/booleanOps.ts
|
|
6551
|
+
// src/kernel/brepkit/booleanOps.ts
|
|
6584
6552
|
function isEmptyBooleanError(e) {
|
|
6585
6553
|
if (!(e instanceof Error)) return false;
|
|
6586
6554
|
const msg = e.message;
|
|
@@ -6867,8 +6835,7 @@ function makeBooleanOps$1(bk) {
|
|
|
6867
6835
|
buildSolidFromFaces: (points, faces, tolerance) => buildSolidFromFaces(bk, points, faces, tolerance)
|
|
6868
6836
|
};
|
|
6869
6837
|
}
|
|
6870
|
-
|
|
6871
|
-
//#region src/kernel/brepkit/constructionOps.ts
|
|
6838
|
+
// src/kernel/brepkit/constructionOps.ts
|
|
6872
6839
|
function makeVertex(bk, x, y, z) {
|
|
6873
6840
|
return vertexHandle(bk.makeVertex(x, y, z));
|
|
6874
6841
|
}
|
|
@@ -7517,8 +7484,7 @@ function makeConstructionOps(bk) {
|
|
|
7517
7484
|
createAxis3: (ox, oy, oz, zx, zy, zz, xx, xy, xz) => createAxis3(bk, ox, oy, oz, zx, zy, zz, xx, xy, xz)
|
|
7518
7485
|
};
|
|
7519
7486
|
}
|
|
7520
|
-
|
|
7521
|
-
//#region src/kernel/brepkit/modifierOps.ts
|
|
7487
|
+
// src/kernel/brepkit/modifierOps.ts
|
|
7522
7488
|
function fillet(bk, shape, edges, radius) {
|
|
7523
7489
|
const solidId = unwrapSolidOrThrow(shape, "fillet");
|
|
7524
7490
|
const edgeIds = edges.map((e) => unwrap$1(e, "edge"));
|
|
@@ -7729,8 +7695,7 @@ function makeModifierOps$1(bk) {
|
|
|
7729
7695
|
reverseShape: (shape) => reverseShape$1(bk, shape)
|
|
7730
7696
|
};
|
|
7731
7697
|
}
|
|
7732
|
-
|
|
7733
|
-
//#region src/kernel/brepkit/evolutionOps.ts
|
|
7698
|
+
// src/kernel/brepkit/evolutionOps.ts
|
|
7734
7699
|
/**
|
|
7735
7700
|
* Parse native brepkit evolution JSON and convert face IDs to hash-based
|
|
7736
7701
|
* evolution that the brepjs propagation system expects.
|
|
@@ -8199,8 +8164,7 @@ function makeEvolutionOps$1(bk) {
|
|
|
8199
8164
|
composeTransform: (ops) => composeTransform$1(bk, ops)
|
|
8200
8165
|
};
|
|
8201
8166
|
}
|
|
8202
|
-
|
|
8203
|
-
//#region src/kernel/brepkit/meshOps.ts
|
|
8167
|
+
// src/kernel/brepkit/meshOps.ts
|
|
8204
8168
|
function mesh$1(bk, shape, options) {
|
|
8205
8169
|
const h = unwrap$1(shape);
|
|
8206
8170
|
const bkHandle = shape;
|
|
@@ -8493,8 +8457,7 @@ function makeMeshOps$1(bk) {
|
|
|
8493
8457
|
meshShape: (shape, tolerance, angularTolerance) => {}
|
|
8494
8458
|
};
|
|
8495
8459
|
}
|
|
8496
|
-
|
|
8497
|
-
//#region src/kernel/brepkit/ioOps.ts
|
|
8460
|
+
// src/kernel/brepkit/ioOps.ts
|
|
8498
8461
|
function exportSTEP(bk, shapes) {
|
|
8499
8462
|
if (shapes.length === 0) return "";
|
|
8500
8463
|
const parts = [];
|
|
@@ -8619,8 +8582,7 @@ function makeIoOps$1(bk) {
|
|
|
8619
8582
|
exportSTEPConfigured: (shapes, options) => exportSTEPConfigured(bk, shapes, options)
|
|
8620
8583
|
};
|
|
8621
8584
|
}
|
|
8622
|
-
|
|
8623
|
-
//#region src/kernel/brepkit/kernel2dOps.ts
|
|
8585
|
+
// src/kernel/brepkit/kernel2dOps.ts
|
|
8624
8586
|
function createPoint2d(x, y) {
|
|
8625
8587
|
return {
|
|
8626
8588
|
x,
|
|
@@ -9539,8 +9501,7 @@ function makeKernel2dOps(bk) {
|
|
|
9539
9501
|
fillSurface: (wires, options) => fillSurface(bk, wires, options)
|
|
9540
9502
|
};
|
|
9541
9503
|
}
|
|
9542
|
-
|
|
9543
|
-
//#region src/kernel/brepkit/measureOps.ts
|
|
9504
|
+
// src/kernel/brepkit/measureOps.ts
|
|
9544
9505
|
function volume$1(bk, shape) {
|
|
9545
9506
|
const h = shape;
|
|
9546
9507
|
if (h.type === "solid") return bk.volume(unwrap$1(shape), DEFAULT_DEFLECTION);
|
|
@@ -9812,8 +9773,7 @@ function makeMeasureOps$1(bk) {
|
|
|
9812
9773
|
measureBulk: (shape, includeLinear) => measureBulk$1(bk, shape, includeLinear)
|
|
9813
9774
|
};
|
|
9814
9775
|
}
|
|
9815
|
-
|
|
9816
|
-
//#region src/kernel/brepkit/sketchOps.ts
|
|
9776
|
+
// src/kernel/brepkit/sketchOps.ts
|
|
9817
9777
|
/** Create a new constraint sketch. Returns an opaque sketch handle. */
|
|
9818
9778
|
function sketchNew(bk) {
|
|
9819
9779
|
return bk.sketchNew();
|
|
@@ -9856,8 +9816,7 @@ function makeSketchOps(bk) {
|
|
|
9856
9816
|
sketchDof: (sketch) => sketchDof(bk, sketch)
|
|
9857
9817
|
};
|
|
9858
9818
|
}
|
|
9859
|
-
|
|
9860
|
-
//#region src/kernel/brepkit/sweepOps.ts
|
|
9819
|
+
// src/kernel/brepkit/sweepOps.ts
|
|
9861
9820
|
function extrude(bk, face, direction, length) {
|
|
9862
9821
|
return solidHandle(bk.extrude(unwrap$1(face, "face"), direction[0], direction[1], direction[2], length));
|
|
9863
9822
|
}
|
|
@@ -10078,8 +10037,7 @@ function makeSweepOps$1(bk) {
|
|
|
10078
10037
|
draftPrism: (shape, face, baseFace, height, angleDeg, fuse) => draftPrism(bk, shape, face, baseFace, height, angleDeg, fuse)
|
|
10079
10038
|
};
|
|
10080
10039
|
}
|
|
10081
|
-
|
|
10082
|
-
//#region src/kernel/brepkit/brepkitAdapter.ts
|
|
10040
|
+
// src/kernel/brepkit/brepkitAdapter.ts
|
|
10083
10041
|
/* v8 ignore file -- brepkit WASM kernel not available in OCCT test suite */
|
|
10084
10042
|
/**
|
|
10085
10043
|
* Kernel-lifecycle ops that call directly into the brepkit WASM instance
|
|
@@ -10121,8 +10079,7 @@ var BrepkitAdapter = class {
|
|
|
10121
10079
|
Object.assign(this, makeBooleanOps$1(bk), makeConstructionOps(bk), makeSweepOps$1(bk), makeModifierOps$1(bk), makeTransformOps$1(bk), makeMeshOps$1(bk), makeIoOps$1(bk), makeMeasureOps$1(bk), makeTopologyOps$1(bk), makeGeometryOps$1(bk), makeRepairOps$1(bk), makeEvolutionOps$1(bk), makeSketchOps(bk), makeKernel2dOps(bk), makeCoreOps$1(bk));
|
|
10122
10080
|
}
|
|
10123
10081
|
};
|
|
10124
|
-
|
|
10125
|
-
//#region src/kernel/manifold/helpers.ts
|
|
10082
|
+
// src/kernel/manifold/helpers.ts
|
|
10126
10083
|
function notImplemented(method) {
|
|
10127
10084
|
throw new Error(`manifold: ${method} is not implemented`);
|
|
10128
10085
|
}
|
|
@@ -10177,8 +10134,7 @@ var REPLAYABLE_OPS = /* @__PURE__ */ new Set([
|
|
|
10177
10134
|
function opIsReplayable(op) {
|
|
10178
10135
|
return REPLAYABLE_OPS.has(op);
|
|
10179
10136
|
}
|
|
10180
|
-
|
|
10181
|
-
//#region src/kernel/manifold/opGraph.ts
|
|
10137
|
+
// src/kernel/manifold/opGraph.ts
|
|
10182
10138
|
/**
|
|
10183
10139
|
* Op-graph node — the recorded intent behind every manifold shape.
|
|
10184
10140
|
*
|
|
@@ -10214,8 +10170,7 @@ function makeNode(op, params, inputs) {
|
|
|
10214
10170
|
replayable: opIsReplayable(op) && inputs.every((input) => input.replayable)
|
|
10215
10171
|
};
|
|
10216
10172
|
}
|
|
10217
|
-
|
|
10218
|
-
//#region src/kernel/manifold/meshHandle.ts
|
|
10173
|
+
// src/kernel/manifold/meshHandle.ts
|
|
10219
10174
|
function wrap(manifold, node) {
|
|
10220
10175
|
return {
|
|
10221
10176
|
manifold,
|
|
@@ -10250,8 +10205,7 @@ function occtOrThrow(method) {
|
|
|
10250
10205
|
return occt;
|
|
10251
10206
|
}
|
|
10252
10207
|
var brepCache = /* @__PURE__ */ new WeakMap();
|
|
10253
|
-
|
|
10254
|
-
//#region src/kernel/manifold/primitiveOps.ts
|
|
10208
|
+
// src/kernel/manifold/primitiveOps.ts
|
|
10255
10209
|
var ORIGIN = [
|
|
10256
10210
|
0,
|
|
10257
10211
|
0,
|
|
@@ -10371,8 +10325,7 @@ function makePrimitiveOps(module) {
|
|
|
10371
10325
|
makeRectangle: () => notImplemented("makeRectangle")
|
|
10372
10326
|
};
|
|
10373
10327
|
}
|
|
10374
|
-
|
|
10375
|
-
//#region src/kernel/manifold/booleanOps.ts
|
|
10328
|
+
// src/kernel/manifold/booleanOps.ts
|
|
10376
10329
|
function asShape$4(shape) {
|
|
10377
10330
|
return shape;
|
|
10378
10331
|
}
|
|
@@ -10514,8 +10467,7 @@ function makeBooleanOps(module) {
|
|
|
10514
10467
|
meshBoolean
|
|
10515
10468
|
};
|
|
10516
10469
|
}
|
|
10517
|
-
|
|
10518
|
-
//#region src/kernel/manifold/transformOps.ts
|
|
10470
|
+
// src/kernel/manifold/transformOps.ts
|
|
10519
10471
|
function asShape$3(shape) {
|
|
10520
10472
|
return shape;
|
|
10521
10473
|
}
|
|
@@ -10964,8 +10916,7 @@ function multiplyMatrix(a, b) {
|
|
|
10964
10916
|
}
|
|
10965
10917
|
return out;
|
|
10966
10918
|
}
|
|
10967
|
-
|
|
10968
|
-
//#region src/kernel/manifold/curveDesc.ts
|
|
10919
|
+
// src/kernel/manifold/curveDesc.ts
|
|
10969
10920
|
var TAU = 2 * Math.PI;
|
|
10970
10921
|
var hypot3 = (a) => Math.hypot(a[0], a[1], a[2]);
|
|
10971
10922
|
var sub3 = (a, b) => [
|
|
@@ -11129,8 +11080,7 @@ function numericLength(at, t0, t1, n) {
|
|
|
11129
11080
|
}
|
|
11130
11081
|
return len;
|
|
11131
11082
|
}
|
|
11132
|
-
|
|
11133
|
-
//#region src/kernel/manifold/approximations.ts
|
|
11083
|
+
// src/kernel/manifold/approximations.ts
|
|
11134
11084
|
function asShape$2(shape) {
|
|
11135
11085
|
return shape;
|
|
11136
11086
|
}
|
|
@@ -11529,8 +11479,7 @@ function rotationMinimizingFrames(path, seed) {
|
|
|
11529
11479
|
}
|
|
11530
11480
|
return frames;
|
|
11531
11481
|
}
|
|
11532
|
-
|
|
11533
|
-
//#region src/kernel/manifold/profileOps.ts
|
|
11482
|
+
// src/kernel/manifold/profileOps.ts
|
|
11534
11483
|
/** Fallback full-circle segment count when the kernel exposes no quality fn. */
|
|
11535
11484
|
var FULL_CIRCLE_SEGMENTS = 24;
|
|
11536
11485
|
/** Bezier sampling segments per edge. */
|
|
@@ -11954,8 +11903,7 @@ function makeProfileBuilders(module) {
|
|
|
11954
11903
|
makePolygonFace: (points) => faceFromRing(points)
|
|
11955
11904
|
};
|
|
11956
11905
|
}
|
|
11957
|
-
|
|
11958
|
-
//#region src/kernel/manifold/builderOps.ts
|
|
11906
|
+
// src/kernel/manifold/builderOps.ts
|
|
11959
11907
|
function makeBuilderOps(module) {
|
|
11960
11908
|
const Manifold = module.Manifold;
|
|
11961
11909
|
const profile = makeProfileBuilders(module);
|
|
@@ -12021,8 +11969,7 @@ function makeBuilderOps(module) {
|
|
|
12021
11969
|
createAxis3: () => notImplemented("createAxis3")
|
|
12022
11970
|
};
|
|
12023
11971
|
}
|
|
12024
|
-
|
|
12025
|
-
//#region src/kernel/manifold/sweepOps.ts
|
|
11972
|
+
// src/kernel/manifold/sweepOps.ts
|
|
12026
11973
|
var RAD_PER_DEG = Math.PI / 180;
|
|
12027
11974
|
function asShape$1(shape) {
|
|
12028
11975
|
return shape;
|
|
@@ -12475,8 +12422,7 @@ function makeSweepOps(module) {
|
|
|
12475
12422
|
extrudeBatch: (entries) => entries.map((e) => extrudeOp(module, e.face, e.direction, e.length))
|
|
12476
12423
|
};
|
|
12477
12424
|
}
|
|
12478
|
-
|
|
12479
|
-
//#region src/kernel/manifold/modifierOps.ts
|
|
12425
|
+
// src/kernel/manifold/modifierOps.ts
|
|
12480
12426
|
var ROUNDING_BALL_SEGMENTS = 16;
|
|
12481
12427
|
function approxFilletMesh(module, solid, radius) {
|
|
12482
12428
|
if (!(radius > 0)) return cloneSolid(solid);
|
|
@@ -12731,8 +12677,7 @@ function makeModifierOps(module) {
|
|
|
12731
12677
|
filletBatch: (entries) => entries.map((e) => filletBatchEntry(module, e))
|
|
12732
12678
|
};
|
|
12733
12679
|
}
|
|
12734
|
-
|
|
12735
|
-
//#region src/kernel/manifold/meshOps.ts
|
|
12680
|
+
// src/kernel/manifold/meshOps.ts
|
|
12736
12681
|
function getMesh(shape) {
|
|
12737
12682
|
return unwrap(shape).getMesh();
|
|
12738
12683
|
}
|
|
@@ -12876,8 +12821,7 @@ function makeMeshOps(_module) {
|
|
|
12876
12821
|
meshShape: (shape, tolerance, angularTolerance) => {}
|
|
12877
12822
|
};
|
|
12878
12823
|
}
|
|
12879
|
-
|
|
12880
|
-
//#region src/kernel/manifold/replay.ts
|
|
12824
|
+
// src/kernel/manifold/replay.ts
|
|
12881
12825
|
function asVec3(value, fallback = [
|
|
12882
12826
|
0,
|
|
12883
12827
|
0,
|
|
@@ -13323,8 +13267,7 @@ function replay(node, targetKernel, cache = /* @__PURE__ */ new Map()) {
|
|
|
13323
13267
|
for (const shape of allocated) if (shape !== root) targetKernel.dispose(shape);
|
|
13324
13268
|
return root;
|
|
13325
13269
|
}
|
|
13326
|
-
|
|
13327
|
-
//#region src/kernel/manifold/measureOps.ts
|
|
13270
|
+
// src/kernel/manifold/measureOps.ts
|
|
13328
13271
|
function solidOf(shape) {
|
|
13329
13272
|
return unwrap(shape);
|
|
13330
13273
|
}
|
|
@@ -13633,8 +13576,7 @@ function makeMeasureOps(_module) {
|
|
|
13633
13576
|
})
|
|
13634
13577
|
};
|
|
13635
13578
|
}
|
|
13636
|
-
|
|
13637
|
-
//#region src/kernel/manifold/nativeFaces.ts
|
|
13579
|
+
// src/kernel/manifold/nativeFaces.ts
|
|
13638
13580
|
/** runOriginalID for a triangle index, via the runIndex run boundaries. */
|
|
13639
13581
|
function originOfTri(mesh, triIndex) {
|
|
13640
13582
|
const { runIndex, runOriginalID } = mesh;
|
|
@@ -13773,8 +13715,7 @@ function extractFaces(meshUnknown) {
|
|
|
13773
13715
|
function isNativeFace(shape) {
|
|
13774
13716
|
return !!shape && typeof shape === "object" && shape.__nativeFace === true;
|
|
13775
13717
|
}
|
|
13776
|
-
|
|
13777
|
-
//#region src/kernel/manifold/nativeEdges.ts
|
|
13718
|
+
// src/kernel/manifold/nativeEdges.ts
|
|
13778
13719
|
var CREASE_COS = Math.cos(45 * Math.PI / 180);
|
|
13779
13720
|
var edgeKey = (a, b) => a < b ? a * 1e9 + b : b * 1e9 + a;
|
|
13780
13721
|
var pairKey = (a, b) => a < b ? `${a},${b}` : `${b},${a}`;
|
|
@@ -14086,8 +14027,7 @@ function edgeTangentAt(edge, s) {
|
|
|
14086
14027
|
dz / l
|
|
14087
14028
|
];
|
|
14088
14029
|
}
|
|
14089
|
-
|
|
14090
|
-
//#region src/kernel/manifold/topologyOps.ts
|
|
14030
|
+
// src/kernel/manifold/topologyOps.ts
|
|
14091
14031
|
function brepOf(shape, method) {
|
|
14092
14032
|
const ms = asManifoldShape(shape);
|
|
14093
14033
|
if (!ms) throw new Error(`manifold: ${method} requires a manifold shape handle`);
|
|
@@ -14229,8 +14169,7 @@ function makeTopologyOps(_module) {
|
|
|
14229
14169
|
}
|
|
14230
14170
|
};
|
|
14231
14171
|
}
|
|
14232
|
-
|
|
14233
|
-
//#region src/kernel/manifold/ioOps.ts
|
|
14172
|
+
// src/kernel/manifold/ioOps.ts
|
|
14234
14173
|
function meshOf$1(shape) {
|
|
14235
14174
|
return unwrap(shape).getMesh();
|
|
14236
14175
|
}
|
|
@@ -14758,8 +14697,7 @@ function makeIoOps(module) {
|
|
|
14758
14697
|
}
|
|
14759
14698
|
};
|
|
14760
14699
|
}
|
|
14761
|
-
|
|
14762
|
-
//#region src/kernel/manifold/geometryOps.ts
|
|
14700
|
+
// src/kernel/manifold/geometryOps.ts
|
|
14763
14701
|
function meshOf(shape) {
|
|
14764
14702
|
return unwrap(shape).getMesh();
|
|
14765
14703
|
}
|
|
@@ -14885,8 +14823,7 @@ function makeGeometryOps(_module) {
|
|
|
14885
14823
|
getNurbsSurfaceData: (face) => viaOcct(face, (s, occt) => occt.getNurbsSurfaceData?.(s) ?? null)
|
|
14886
14824
|
};
|
|
14887
14825
|
}
|
|
14888
|
-
|
|
14889
|
-
//#region src/kernel/manifold/evolutionOps.ts
|
|
14826
|
+
// src/kernel/manifold/evolutionOps.ts
|
|
14890
14827
|
var NO_DIAGNOSTICS = {
|
|
14891
14828
|
hasErrors: false,
|
|
14892
14829
|
hasWarnings: false,
|
|
@@ -14934,8 +14871,7 @@ function makeEvolutionOps(module) {
|
|
|
14934
14871
|
applyComposedTransformWithHistory: (shape, transformHandle) => result(transform.transform(shape, transformHandle))
|
|
14935
14872
|
};
|
|
14936
14873
|
}
|
|
14937
|
-
|
|
14938
|
-
//#region src/kernel/manifold/repairOps.ts
|
|
14874
|
+
// src/kernel/manifold/repairOps.ts
|
|
14939
14875
|
function isWellFormed(shape) {
|
|
14940
14876
|
const solid = shape?.manifold;
|
|
14941
14877
|
if (!solid) return false;
|
|
@@ -14961,8 +14897,7 @@ function makeRepairOps(_module) {
|
|
|
14961
14897
|
fixSelfIntersection: (wire) => wire
|
|
14962
14898
|
};
|
|
14963
14899
|
}
|
|
14964
|
-
|
|
14965
|
-
//#region src/kernel/manifold/kernel2dNative.ts
|
|
14900
|
+
// src/kernel/manifold/kernel2dNative.ts
|
|
14966
14901
|
var CHORD_TOL = .004;
|
|
14967
14902
|
/**
|
|
14968
14903
|
* Closest parameter on a native curve to (x, y), in that curve's own
|
|
@@ -15931,8 +15866,7 @@ function makeNativeKernel2DOps(_module, occt) {
|
|
|
15931
15866
|
}
|
|
15932
15867
|
return impl;
|
|
15933
15868
|
}
|
|
15934
|
-
|
|
15935
|
-
//#region src/kernel/manifold/kernel2dOps.ts
|
|
15869
|
+
// src/kernel/manifold/kernel2dOps.ts
|
|
15936
15870
|
var KERNEL_2D_METHODS = [
|
|
15937
15871
|
"createPoint2d",
|
|
15938
15872
|
"createDirection2d",
|
|
@@ -16010,8 +15944,7 @@ function makeKernel2DOps(module) {
|
|
|
16010
15944
|
Object.assign(ops, native);
|
|
16011
15945
|
return ops;
|
|
16012
15946
|
}
|
|
16013
|
-
|
|
16014
|
-
//#region src/kernel/manifold/constraintSketchOps.ts
|
|
15947
|
+
// src/kernel/manifold/constraintSketchOps.ts
|
|
16015
15948
|
function makeConstraintSketchOps(_module) {
|
|
16016
15949
|
return {
|
|
16017
15950
|
sketchNew: () => notImplemented("sketchNew"),
|
|
@@ -16022,13 +15955,11 @@ function makeConstraintSketchOps(_module) {
|
|
|
16022
15955
|
sketchDof: () => notImplemented("sketchDof")
|
|
16023
15956
|
};
|
|
16024
15957
|
}
|
|
16025
|
-
|
|
16026
|
-
//#region src/kernel/manifold/projectionOps.ts
|
|
15958
|
+
// src/kernel/manifold/projectionOps.ts
|
|
16027
15959
|
function makeProjectionOps(_module) {
|
|
16028
15960
|
return { projectEdges: () => notImplemented("projectEdges") };
|
|
16029
15961
|
}
|
|
16030
|
-
|
|
16031
|
-
//#region src/kernel/manifold/manifoldAdapter.ts
|
|
15962
|
+
// src/kernel/manifold/manifoldAdapter.ts
|
|
16032
15963
|
function makeCoreOps(_module) {
|
|
16033
15964
|
return {
|
|
16034
15965
|
dispose(handle) {
|
|
@@ -16080,8 +16011,7 @@ var ManifoldAdapter = class {
|
|
|
16080
16011
|
Object.assign(this, makePrimitiveOps(module), makeBooleanOps(module), makeTransformOps(module), makeBuilderOps(module), makeSweepOps(module), makeModifierOps(module), makeMeshOps(module), makeMeasureOps(module), makeTopologyOps(module), makeIoOps(module), makeGeometryOps(module), makeEvolutionOps(module), makeRepairOps(module), makeKernel2DOps(module), makeConstraintSketchOps(module), makeProjectionOps(module), makeCoreOps(module));
|
|
16081
16012
|
}
|
|
16082
16013
|
};
|
|
16083
|
-
|
|
16084
|
-
//#region src/kernel/optionalBackend.ts
|
|
16014
|
+
// src/kernel/optionalBackend.ts
|
|
16085
16015
|
/**
|
|
16086
16016
|
* Dynamically import an optional kernel backend (`occt-wasm`,
|
|
16087
16017
|
* `brepjs-opencascade`, `brepkit-wasm`) at runtime.
|
|
@@ -16102,8 +16032,7 @@ function importOptionalBackend(specifier) {
|
|
|
16102
16032
|
specifier
|
|
16103
16033
|
);
|
|
16104
16034
|
}
|
|
16105
|
-
|
|
16106
|
-
//#region src/kernel/index.ts
|
|
16035
|
+
// src/kernel/index.ts
|
|
16107
16036
|
var _kernels = /* @__PURE__ */ new Map();
|
|
16108
16037
|
var _defaultKernelId = null;
|
|
16109
16038
|
var _cachedDefault = null;
|
|
@@ -16292,8 +16221,7 @@ async function init() {
|
|
|
16292
16221
|
} catch {}
|
|
16293
16222
|
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");
|
|
16294
16223
|
}
|
|
16295
|
-
|
|
16296
|
-
//#region \0@oxc-project+runtime@0.152.0/helpers/esm/usingCtx.js
|
|
16224
|
+
// \0@oxc-project+runtime@0.155.0/helpers/esm/usingCtx.js
|
|
16297
16225
|
function _usingCtx() {
|
|
16298
16226
|
var r = "function" == typeof SuppressedError ? SuppressedError : function(r, e) {
|
|
16299
16227
|
var n = Error();
|
|
@@ -16348,8 +16276,7 @@ function _usingCtx() {
|
|
|
16348
16276
|
}
|
|
16349
16277
|
};
|
|
16350
16278
|
}
|
|
16351
|
-
|
|
16352
|
-
//#region src/core/disposal.ts
|
|
16279
|
+
// src/core/disposal.ts
|
|
16353
16280
|
var S = Symbol;
|
|
16354
16281
|
S.dispose ??= Symbol.for("Symbol.dispose");
|
|
16355
16282
|
S.asyncDispose ??= Symbol.for("Symbol.asyncDispose");
|
|
@@ -16637,8 +16564,7 @@ async function withScopeResultAsync(fn) {
|
|
|
16637
16564
|
function isLive(handle) {
|
|
16638
16565
|
return !handle.disposed;
|
|
16639
16566
|
}
|
|
16640
|
-
|
|
16641
|
-
//#region src/core/dimensionTypes.ts
|
|
16567
|
+
// src/core/dimensionTypes.ts
|
|
16642
16568
|
/**
|
|
16643
16569
|
* Narrow an unknown-dimension shape to 3D.
|
|
16644
16570
|
* All shapes from the kernel default to 3D embedding.
|
|
@@ -16676,8 +16602,7 @@ function as2D(s) {
|
|
|
16676
16602
|
if (!is2D(s)) throw new Error("Expected 2D shape, got 3D");
|
|
16677
16603
|
return s;
|
|
16678
16604
|
}
|
|
16679
|
-
|
|
16680
|
-
//#region src/core/shapeTypeCache.ts
|
|
16605
|
+
// src/core/shapeTypeCache.ts
|
|
16681
16606
|
var cache = /* @__PURE__ */ new WeakMap();
|
|
16682
16607
|
/** Store a type for a shape. */
|
|
16683
16608
|
function setCachedType(shape, type) {
|
|
@@ -16694,14 +16619,12 @@ function getOrQueryType(kernel, shape) {
|
|
|
16694
16619
|
cache.set(shape, type);
|
|
16695
16620
|
return type;
|
|
16696
16621
|
}
|
|
16697
|
-
|
|
16698
|
-
//#region src/core/typeDiscriminants.ts
|
|
16622
|
+
// src/core/typeDiscriminants.ts
|
|
16699
16623
|
/** Query the kernel for the topological type of a shape. */
|
|
16700
16624
|
function getShapeKind(shape) {
|
|
16701
16625
|
return getOrQueryType(getKernel(), shape.wrapped);
|
|
16702
16626
|
}
|
|
16703
|
-
|
|
16704
|
-
//#region src/core/cleanupError.ts
|
|
16627
|
+
// src/core/cleanupError.ts
|
|
16705
16628
|
/** An observable failed release. Its native outcome is uncertain; never retry it blindly. */
|
|
16706
16629
|
var GeometryCleanupError = class extends Error {
|
|
16707
16630
|
resourceKind;
|
|
@@ -16711,8 +16634,7 @@ var GeometryCleanupError = class extends Error {
|
|
|
16711
16634
|
this.resourceKind = options.resourceKind;
|
|
16712
16635
|
}
|
|
16713
16636
|
};
|
|
16714
|
-
|
|
16715
|
-
//#region src/core/shapeTypes.ts
|
|
16637
|
+
// src/core/shapeTypes.ts
|
|
16716
16638
|
function brandHandle(handle, dim) {
|
|
16717
16639
|
if (dim === "2D") handle["__is2D"] = true;
|
|
16718
16640
|
return handle;
|
|
@@ -16943,5 +16865,4 @@ function borrowShapeWithKnownType(ocShape, knownType, dim) {
|
|
|
16943
16865
|
setCachedType(ocShape, knownType);
|
|
16944
16866
|
return brandHandle(createBorrowedHandle(ocShape), dim);
|
|
16945
16867
|
}
|
|
16946
|
-
//#endregion
|
|
16947
16868
|
export { initFromOC as $, as3D as A, unregisterFromCleanup as B, isSolid as C, getShapeKind as D, GeometryCleanupError as E, createKernelHandle as F, _usingCtx as G, withScope as H, getDisposalStats as I, getKernel2D as J, getActiveKernelId as K, isLive as L, is3D as M, DisposalScope as N, getOrQueryType as O, createHandle as P, initFromManifold as Q, registerForCleanup as R, isShell as S, isWire as T, withScopeResult as U, withArenaCheckpoint as V, withScopeResultAsync as W, getKernelTier as X, getKernelCapabilities as Y, init as Z, isCompound as _, castShape3D as a, withTier as at, isShape1D as b, createEdge as c, resetPerformanceStats as ct, createSolid as d, prewarm as et, createVertex as f, disposeTransientSubShape as g, disposeResultShape as h, castShape as i, withQuality as it, is2D as j, as2D as k, createFace as l, currentQuality as lt, disposeDowncastSource as m, castResultShape as n, registerKernelTier as nt, castShapeWithKnownType as o, BrepkitAdapter as ot, createWire as p, getKernel as q, castResultShapeWithKnownType as r, withKernel as rt, createCompound as s, getPerformanceStats as st, borrowShapeWithKnownType as t, registerKernel as tt, createShell as u, qualityDeflection as ut, isEdge as v, isVertex as w, isShape3D as x, isFace as y, resetDisposalStats as z };
|