brepjs 20.12.8 → 20.12.9
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/{adjacencyFns-Bl109A3Z.js → adjacencyFns-1Cmjb2ot.js} +3 -3
- package/dist/{adjacencyFns-BfgFo-Rh.cjs → adjacencyFns-CfhGIMeR.cjs} +3 -3
- package/dist/{blueprint-RqemOtg5.js → blueprint-BVcuEefs.js} +5 -5
- package/dist/{blueprint-DTDSztfd.cjs → blueprint-DbJVzU9F.cjs} +5 -5
- package/dist/{blueprintFns-C7E5R89N.cjs → blueprintFns-DePTHG1I.cjs} +2 -2
- package/dist/{blueprintFns-B9_PhTr8.js → blueprintFns-mD4pDyFP.js} +2 -2
- package/dist/{blueprintSketcher-Brj4lXjj.cjs → blueprintSketcher-B5CFmhjg.cjs} +3 -3
- package/dist/{blueprintSketcher-B15522Kr.js → blueprintSketcher-BrGmq-65.js} +3 -3
- package/dist/{boolean2D-_eiIiNw1.js → boolean2D-BrHrY60M.js} +4 -4
- package/dist/{boolean2D-DZ8aJbI-.cjs → boolean2D-CFKg1FJ_.cjs} +4 -4
- package/dist/{booleanFns-D5nQ1nWS.cjs → booleanFns-C640CeaY.cjs} +4 -4
- package/dist/{booleanFns-cNfXGqMX.js → booleanFns-CKDyqKz0.js} +4 -4
- package/dist/brepjs.cjs +30 -30
- package/dist/brepjs.js +30 -30
- package/dist/{cameraFns-YhB7A_Zc.js → cameraFns-DIbua1lC.js} +3 -3
- package/dist/{cameraFns-6Er2lhp5.cjs → cameraFns-hXUKJkLg.cjs} +3 -3
- package/dist/core.cjs +2 -2
- package/dist/core.js +2 -2
- package/dist/{cornerFinder-G1WkSkVl.js → cornerFinder-BYDkloVc.js} +1 -1
- package/dist/{cornerFinder-D9Wx3DWu.cjs → cornerFinder-ByBGU0r7.cjs} +1 -1
- package/dist/{curveFns-B5_N-gMj.cjs → curveFns-Cqgtmhr0.cjs} +1 -1
- package/dist/{curveFns-C4CqthJp.js → curveFns-DphpaoQ4.js} +1 -1
- package/dist/{drawFns-DU5fewKl.js → drawFns-Ch3ah8K9.js} +12 -12
- package/dist/{drawFns-UPbO2heB.cjs → drawFns-GwVZX47o.cjs} +12 -12
- package/dist/{faceFns-C4NOGZBg.cjs → faceFns-BDqVGEoB.cjs} +2 -2
- package/dist/{faceFns-BgRNa5vx.js → faceFns-D4cDeMRf.js} +2 -2
- package/dist/{healingFns-BzOo0yyz.js → healingFns--vBKh5pa.js} +5 -5
- package/dist/{healingFns-i5gV3BMG.cjs → healingFns-Fu7Xl8fu.cjs} +5 -5
- package/dist/{helpers-DPHQt2Kr.js → helpers-CroIo2SI.js} +6 -6
- package/dist/{helpers-DJQeDf_5.cjs → helpers-Wnq-YPWv.cjs} +6 -6
- package/dist/{importFns-CwrJsNvg.js → importFns-D5Bt_44J.js} +5 -5
- package/dist/{importFns-BiRpt227.cjs → importFns-tHr15Lhm.cjs} +5 -5
- package/dist/io.cjs +2 -2
- package/dist/io.js +2 -2
- package/dist/kernel/occtWasm/evolutionOps.d.ts +4 -3
- package/dist/kernel/occtWasm/helpers.d.ts +14 -3
- package/dist/kernel/occtWasm/ioOps.d.ts +13 -13
- package/dist/kernel/occtWasm/modifierOps.d.ts +5 -3
- package/dist/kernel/occtWasm/occtWasmAdapter.cjs +1 -1
- package/dist/kernel/occtWasm/occtWasmAdapter.d.ts +1 -1
- package/dist/kernel/occtWasm/occtWasmAdapter.js +1 -1
- package/dist/kernel/occtWasm/occtWasmTypes.d.ts +33 -0
- package/dist/{loftFns-lwzTh1fI.js → loftFns-Bh_RuF7a.js} +1 -1
- package/dist/{loftFns-DgkK4Kj_.cjs → loftFns-T0GxcPlB.cjs} +1 -1
- package/dist/{measureFns-Q3K25IfN.js → measureFns-C3TZ5Fj9.js} +3 -3
- package/dist/{measureFns-D_RRjCZg.cjs → measureFns-DGm6ndQY.cjs} +3 -3
- package/dist/measurement.cjs +2 -2
- package/dist/measurement.js +2 -2
- package/dist/{meshFns-Djbb4PUC.cjs → meshFns-DDgZ3vpr.cjs} +4 -4
- package/dist/{meshFns-BGoJU6_P.js → meshFns-Go1XSyUh.js} +4 -4
- package/dist/{occtWasmAdapter-UcYZRi-w.cjs → occtWasmAdapter-CZPZnpCe.cjs} +290 -80
- package/dist/{occtWasmAdapter-BCCwaYkq.js → occtWasmAdapter-EM3EhKwk.js} +290 -80
- package/dist/operations.cjs +2 -2
- package/dist/operations.js +2 -2
- package/dist/{primitiveFns-D-aYcwt2.js → primitiveFns-CeRc4Sls.js} +5 -5
- package/dist/{primitiveFns-CfSnex9P.cjs → primitiveFns-Dg_XWYtp.cjs} +5 -5
- package/dist/{principalBoxFns-IY8FfPVj.cjs → principalBoxFns-B5zdek3y.cjs} +3 -3
- package/dist/{principalBoxFns-Dcp9gg5e.js → principalBoxFns-BuK-ueAB.js} +3 -3
- 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/{refResolveFns-gZQ1o5XK.cjs → refResolveFns-CFwsYCKA.cjs} +6 -6
- package/dist/{refResolveFns-BPge7T5w.js → refResolveFns-WRcvVhV-.js} +6 -6
- package/dist/{shapeFns-TWdr4Dv4.js → shapeFns-CYjU8PsF.js} +2 -2
- package/dist/{shapeFns-Bs92VrZh.cjs → shapeFns-DuxfaqTw.cjs} +2 -2
- package/dist/shapeRef.cjs +1 -1
- package/dist/shapeRef.js +1 -1
- package/dist/{shapeTypes-DmThK_oa.cjs → shapeTypes--7XBFlOD.cjs} +1 -1
- package/dist/{shapeTypes-CIH-8d_a.js → shapeTypes-DvzbSivn.js} +1 -1
- package/dist/sketching.cjs +3 -3
- package/dist/sketching.js +3 -3
- package/dist/{solidBuilders-q_hwYsdo.js → solidBuilders-BqSVC4cB.js} +3 -3
- package/dist/{solidBuilders-DGskMugU.cjs → solidBuilders-D0bIZX9K.cjs} +3 -3
- package/dist/{surfaceBuilders-DXo4N7wQ.js → surfaceBuilders--HOoTQad.js} +3 -3
- package/dist/{surfaceBuilders-DeSLKg73.cjs → surfaceBuilders-CPQHyL_5.cjs} +3 -3
- package/dist/text.cjs +2 -2
- package/dist/text.js +2 -2
- package/dist/{textBlueprints-Dz6wNgve.cjs → textBlueprints-B4HzJzZM.cjs} +8 -8
- package/dist/{textBlueprints-BYWZho_c.js → textBlueprints-plsbHqiI.js} +8 -8
- package/dist/{textMetrics-bKoFTj3m.cjs → textMetrics-CBwUIDI7.cjs} +1 -1
- package/dist/{textMetrics-k_rGqib2.js → textMetrics-IIS6DUTr.js} +1 -1
- package/dist/{threadFns-BeB8s0tA.js → threadFns-CmZFykpi.js} +7 -7
- package/dist/{threadFns-CoGAFHHt.cjs → threadFns-e8_26ZYw.cjs} +7 -7
- package/dist/topology.cjs +9 -9
- package/dist/topology.js +9 -9
- package/dist/{topologyQueryFns-Cp0yekBh.js → topologyQueryFns-BUzMuIs5.js} +1 -1
- package/dist/{topologyQueryFns-CXbCFaU2.cjs → topologyQueryFns-NszVx8a0.cjs} +1 -1
- package/dist/{validityTypes-DlrWkrSR.js → validityTypes-CdY06B8c.js} +1 -1
- package/dist/{validityTypes-m6eLRTYE.cjs → validityTypes-Ds4zNICF.cjs} +1 -1
- package/package.json +2 -2
|
@@ -2299,16 +2299,56 @@ function multiplyMatrices4x4(a, b) {
|
|
|
2299
2299
|
for (let i = 0; i < 4; i++) for (let j = 0; j < 4; j++) for (let k = 0; k < 4; k++) result[i * 4 + j] = result[i * 4 + j] + a[i * 4 + k] * b[k * 4 + j];
|
|
2300
2300
|
return result;
|
|
2301
2301
|
}
|
|
2302
|
+
function resolveEdgeValues(edges, value) {
|
|
2303
|
+
const first = [];
|
|
2304
|
+
const second = [];
|
|
2305
|
+
for (const edge of edges) {
|
|
2306
|
+
const v = typeof value === "function" ? value(edge) : value;
|
|
2307
|
+
first.push(typeof v === "number" ? v : v[0]);
|
|
2308
|
+
second.push(typeof v === "number" ? v : v[1]);
|
|
2309
|
+
}
|
|
2310
|
+
return {
|
|
2311
|
+
first,
|
|
2312
|
+
second
|
|
2313
|
+
};
|
|
2314
|
+
}
|
|
2315
|
+
/** The value every edge takes on both sides, or `undefined` when they differ. */
|
|
2316
|
+
function uniformEdgeValue({ first, second }) {
|
|
2317
|
+
const [value] = first;
|
|
2318
|
+
if (value === void 0) return void 0;
|
|
2319
|
+
return first.every((v) => v === value) && second.every((v) => v === value) ? value : void 0;
|
|
2320
|
+
}
|
|
2302
2321
|
/**
|
|
2303
|
-
*
|
|
2304
|
-
*
|
|
2322
|
+
* Run a fillet or chamfer over `edges`, naming the edges it fails on. Edges
|
|
2323
|
+
* that all take one value go to `uniform`, the single-value entry point every
|
|
2324
|
+
* occt-wasm build has; otherwise `perEdge` gets each edge's pair as `first`
|
|
2325
|
+
* and `second`.
|
|
2305
2326
|
*/
|
|
2306
|
-
function
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2327
|
+
function runEdgeTreatment(Module, edges, value, uniform, perEdge) {
|
|
2328
|
+
const values = resolveEdgeValues(edges, value);
|
|
2329
|
+
const shared = uniformEdgeValue(values);
|
|
2330
|
+
const edgeVec = makeVecU32(Module, edges.map(unwrap));
|
|
2331
|
+
try {
|
|
2332
|
+
if (shared !== void 0) return reportingFaultyEdges(edges, () => uniform(edgeVec, shared));
|
|
2333
|
+
const first = makeVecDouble(Module, values.first);
|
|
2334
|
+
const second = makeVecDouble(Module, values.second);
|
|
2335
|
+
try {
|
|
2336
|
+
return reportingFaultyEdges(edges, () => perEdge(edgeVec, first, second));
|
|
2337
|
+
} finally {
|
|
2338
|
+
first.delete();
|
|
2339
|
+
second.delete();
|
|
2340
|
+
}
|
|
2341
|
+
} finally {
|
|
2342
|
+
edgeVec.delete();
|
|
2343
|
+
}
|
|
2344
|
+
}
|
|
2345
|
+
/** Each face's draft angle, in radians. */
|
|
2346
|
+
function draftAnglesRad(faces, angleDeg) {
|
|
2347
|
+
return faces.map((face) => (typeof angleDeg === "function" ? angleDeg(face) : angleDeg) * Math.PI / 180);
|
|
2348
|
+
}
|
|
2349
|
+
/** The peer range still admits older builds, which lack the per-edge and unit entry points. */
|
|
2350
|
+
function needsOcctWasm59(what) {
|
|
2351
|
+
return new UnsupportedKernelOperationError(`occt-wasm: ${what} requires occt-wasm >= 5.9.0`);
|
|
2312
2352
|
}
|
|
2313
2353
|
/**
|
|
2314
2354
|
* Rotate a shape from the kernel's default Z-axis to an arbitrary direction.
|
|
@@ -3754,29 +3794,42 @@ function surfaceCurvature(k, face, u, v) {
|
|
|
3754
3794
|
// src/kernel/occtWasm/modifierOps.ts
|
|
3755
3795
|
var HASH_UPPER_BOUND = 2147483647;
|
|
3756
3796
|
function fillet(k, Module, shape, edges, radius) {
|
|
3757
|
-
const
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
return
|
|
3761
|
-
}
|
|
3762
|
-
vec.delete();
|
|
3763
|
-
}
|
|
3797
|
+
const id = unwrap(shape);
|
|
3798
|
+
return wrapResult(k, runEdgeTreatment(Module, edges, radius, (edgeVec, r) => k.fillet(id, edgeVec, r), (edgeVec, startRadii, endRadii) => {
|
|
3799
|
+
if (!k.filletRadii) throw needsOcctWasm59("per-edge or tapered fillet radii");
|
|
3800
|
+
return k.filletRadii(id, edgeVec, startRadii, endRadii);
|
|
3801
|
+
}));
|
|
3764
3802
|
}
|
|
3765
3803
|
function chamfer(k, Module, shape, edges, distance) {
|
|
3766
|
-
const
|
|
3767
|
-
const
|
|
3804
|
+
const id = unwrap(shape);
|
|
3805
|
+
const faceVec = makeVecU32(Module, []);
|
|
3768
3806
|
try {
|
|
3769
|
-
return wrapResult(k,
|
|
3807
|
+
return wrapResult(k, runEdgeTreatment(Module, edges, distance, (edgeVec, d) => k.chamfer(id, edgeVec, d), (edgeVec, distances1, distances2) => {
|
|
3808
|
+
if (!k.chamferDistances) throw needsOcctWasm59("per-edge or asymmetric chamfer distances");
|
|
3809
|
+
return k.chamferDistances(id, edgeVec, distances1, distances2, faceVec);
|
|
3810
|
+
}));
|
|
3770
3811
|
} finally {
|
|
3771
|
-
|
|
3812
|
+
faceVec.delete();
|
|
3772
3813
|
}
|
|
3773
3814
|
}
|
|
3774
3815
|
function chamferDistAngle(k, Module, shape, edges, distance, angleDeg) {
|
|
3775
|
-
const
|
|
3816
|
+
const id = unwrap(shape);
|
|
3817
|
+
const edgeVec = makeVecU32(Module, edges.map(unwrap));
|
|
3776
3818
|
try {
|
|
3777
|
-
return wrapResult(k, k.chamferDistAngle(
|
|
3819
|
+
if (!k.chamferDistAngles) return wrapResult(k, k.chamferDistAngle(id, edgeVec, distance, angleDeg));
|
|
3820
|
+
const chamferDistAngles = k.chamferDistAngles.bind(k);
|
|
3821
|
+
const distanceVec = makeVecDouble(Module, Array(edges.length).fill(distance));
|
|
3822
|
+
const angleVec = makeVecDouble(Module, Array(edges.length).fill(angleDeg));
|
|
3823
|
+
const faceVec = makeVecU32(Module, []);
|
|
3824
|
+
try {
|
|
3825
|
+
return wrapResult(k, reportingFaultyEdges(edges, () => chamferDistAngles(id, edgeVec, distanceVec, angleVec, faceVec)));
|
|
3826
|
+
} finally {
|
|
3827
|
+
distanceVec.delete();
|
|
3828
|
+
angleVec.delete();
|
|
3829
|
+
faceVec.delete();
|
|
3830
|
+
}
|
|
3778
3831
|
} finally {
|
|
3779
|
-
|
|
3832
|
+
edgeVec.delete();
|
|
3780
3833
|
}
|
|
3781
3834
|
}
|
|
3782
3835
|
function shell(k, Module, shape, faces, thickness, tolerance) {
|
|
@@ -3858,13 +3911,30 @@ function filletVariable(k, shape, spec) {
|
|
|
3858
3911
|
}
|
|
3859
3912
|
throw new UnsupportedKernelOperationError("occt-wasm: filletVariable: unrecognized spec");
|
|
3860
3913
|
}
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3914
|
+
/**
|
|
3915
|
+
* Before 5.9 occt-wasm drafts one face per call about the XY plane through the
|
|
3916
|
+
* origin. That is the caller's plane (through `neutralPlane`, normal to the
|
|
3917
|
+
* pull) only for a pull along Z and a point at z = 0.
|
|
3918
|
+
*/
|
|
3919
|
+
function legacyDraft(k, shape, faces, pullDirection, neutralPlane, anglesRad) {
|
|
3920
|
+
const [face] = faces;
|
|
3921
|
+
const [angle] = anglesRad;
|
|
3922
|
+
const [dx, dy, dz] = pullDirection;
|
|
3923
|
+
if (!(faces.length === 1 && dx === 0 && dy === 0 && neutralPlane[2] === 0) || face === void 0 || angle === void 0) throw needsOcctWasm59("drafting several faces, or about a neutral plane off z = 0,");
|
|
3924
|
+
return wrapResult(k, k.draft(unwrap(shape), unwrap(face), angle, dx, dy, dz));
|
|
3925
|
+
}
|
|
3926
|
+
/** Draft every face in one operation about the plane through `neutralPlane` normal to the pull. */
|
|
3927
|
+
function draft(k, Module, shape, faces, pullDirection, neutralPlane, angleDeg) {
|
|
3928
|
+
const anglesRad = draftAnglesRad(faces, angleDeg);
|
|
3929
|
+
if (!k.draftFaces) return legacyDraft(k, shape, faces, pullDirection, neutralPlane, anglesRad);
|
|
3930
|
+
const faceVec = makeVecU32(Module, faces.map(unwrap));
|
|
3931
|
+
const angleVec = makeVecDouble(Module, anglesRad);
|
|
3932
|
+
try {
|
|
3933
|
+
return wrapResult(k, k.draftFaces(unwrap(shape), faceVec, angleVec, ...pullDirection, ...neutralPlane, ...pullDirection));
|
|
3934
|
+
} finally {
|
|
3935
|
+
faceVec.delete();
|
|
3936
|
+
angleVec.delete();
|
|
3866
3937
|
}
|
|
3867
|
-
return wrapResult(k, currentId);
|
|
3868
3938
|
}
|
|
3869
3939
|
function defeature(k, Module, shape, faces) {
|
|
3870
3940
|
const vec = makeVecU32(Module, faces.map(unwrap));
|
|
@@ -4480,10 +4550,85 @@ function buildGltfManifest(vCount, nCount, iCount, posBytes, nrmBytes, idxBytes,
|
|
|
4480
4550
|
]
|
|
4481
4551
|
};
|
|
4482
4552
|
}
|
|
4553
|
+
var MM_PER_UNIT = {
|
|
4554
|
+
mm: 1,
|
|
4555
|
+
millimeter: 1,
|
|
4556
|
+
millimetre: 1,
|
|
4557
|
+
cm: 10,
|
|
4558
|
+
centimeter: 10,
|
|
4559
|
+
centimetre: 10,
|
|
4560
|
+
m: 1e3,
|
|
4561
|
+
meter: 1e3,
|
|
4562
|
+
metre: 1e3,
|
|
4563
|
+
km: 1e6,
|
|
4564
|
+
kilometer: 1e6,
|
|
4565
|
+
kilometre: 1e6,
|
|
4566
|
+
in: 25.4,
|
|
4567
|
+
inch: 25.4,
|
|
4568
|
+
ft: 304.8,
|
|
4569
|
+
foot: 304.8,
|
|
4570
|
+
feet: 304.8,
|
|
4571
|
+
mi: 1609344,
|
|
4572
|
+
mile: 1609344,
|
|
4573
|
+
mil: .0254,
|
|
4574
|
+
thou: .0254,
|
|
4575
|
+
um: .001,
|
|
4576
|
+
micron: .001,
|
|
4577
|
+
micrometer: .001,
|
|
4578
|
+
micrometre: .001,
|
|
4579
|
+
uin: 254e-7,
|
|
4580
|
+
microinch: 254e-7
|
|
4581
|
+
};
|
|
4582
|
+
function mmPerUnit(unit) {
|
|
4583
|
+
const mm = MM_PER_UNIT[unit.toLowerCase()];
|
|
4584
|
+
if (mm === void 0) throw new Error(`occt-wasm: unknown STEP length unit '${unit}'`);
|
|
4585
|
+
return mm;
|
|
4586
|
+
}
|
|
4587
|
+
/**
|
|
4588
|
+
* brepjs writes lengths in `unit` and reads the shapes as `modelUnit`, which
|
|
4589
|
+
* defaults to `unit` (so `unit` alone relabels and does not scale). occt-wasm
|
|
4590
|
+
* reads shapes as millimeters and scales them into the unit written, so a
|
|
4591
|
+
* model in another unit is scaled to millimeters first.
|
|
4592
|
+
*/
|
|
4593
|
+
function resolveStepUnits(options) {
|
|
4594
|
+
const write = options?.unit ?? options?.modelUnit ?? "mm";
|
|
4595
|
+
return {
|
|
4596
|
+
write,
|
|
4597
|
+
modelScale: mmPerUnit(options?.modelUnit ?? write)
|
|
4598
|
+
};
|
|
4599
|
+
}
|
|
4600
|
+
/**
|
|
4601
|
+
* The writer for `units`: the 5.9 unit-aware one, else the millimeter-only
|
|
4602
|
+
* one when the file is in millimeters anyway.
|
|
4603
|
+
*/
|
|
4604
|
+
function stepWriter(withUnit, inMillimeters, units) {
|
|
4605
|
+
if (withUnit) return (id) => withUnit(id, units.write);
|
|
4606
|
+
if (mmPerUnit(units.write) === 1) return inMillimeters;
|
|
4607
|
+
throw needsOcctWasm59(`STEP export in '${units.write}'`);
|
|
4608
|
+
}
|
|
4609
|
+
/** Run `use` on `id` scaled by `factor` about the origin, releasing the scaled copy. */
|
|
4610
|
+
function withScaled(k, id, factor, use) {
|
|
4611
|
+
if (factor === 1) return use(id);
|
|
4612
|
+
const scaled = k.scale(id, 0, 0, 0, factor);
|
|
4613
|
+
try {
|
|
4614
|
+
return use(scaled);
|
|
4615
|
+
} finally {
|
|
4616
|
+
k.release(scaled);
|
|
4617
|
+
}
|
|
4618
|
+
}
|
|
4619
|
+
/** One STEP file holding every shape (as a compound when there are several). */
|
|
4620
|
+
function writeStepShapes(k, makeCompound, shapes, units) {
|
|
4621
|
+
const write = stepWriter(k.exportStepWithUnit?.bind(k), (id) => k.exportStep(id), units);
|
|
4622
|
+
if (shapes.length === 1) return withScaled(k, unwrap(shapes[0]), units.modelScale, write);
|
|
4623
|
+
const compoundId = unwrap(makeCompound(shapes));
|
|
4624
|
+
try {
|
|
4625
|
+
return withScaled(k, compoundId, units.modelScale, write);
|
|
4626
|
+
} finally {
|
|
4627
|
+
k.release(compoundId);
|
|
4628
|
+
}
|
|
4629
|
+
}
|
|
4483
4630
|
function exportSTEP(k, makeCompound, shapes) {
|
|
4484
|
-
|
|
4485
|
-
const compound = makeCompound(shapes);
|
|
4486
|
-
return k.exportStep(unwrap(compound));
|
|
4631
|
+
return writeStepShapes(k, makeCompound, shapes, resolveStepUnits(void 0));
|
|
4487
4632
|
}
|
|
4488
4633
|
function exportSTL(mesh, shape, binary, tolerance = DEFAULT_STL_TOLERANCE, angularTolerance = DEFAULT_STL_ANGULAR_TOLERANCE) {
|
|
4489
4634
|
const { vertices, triangles } = mesh(shape, {
|
|
@@ -4518,14 +4663,9 @@ function importIGES(k, data) {
|
|
|
4518
4663
|
if (!importIges) throw new UnsupportedKernelOperationError("occt-wasm: importIGES is unsupported");
|
|
4519
4664
|
return [wrapResult(k, importIges(typeof data === "string" ? data : new TextDecoder().decode(data)))];
|
|
4520
4665
|
}
|
|
4521
|
-
function exportSTEPAssembly(k,
|
|
4666
|
+
function exportSTEPAssembly(k, parts, options) {
|
|
4522
4667
|
if (parts.length === 0) return "";
|
|
4523
|
-
|
|
4524
|
-
try {
|
|
4525
|
-
return writeXCAFToSTEP(k, doc);
|
|
4526
|
-
} finally {
|
|
4527
|
-
doc.delete();
|
|
4528
|
-
}
|
|
4668
|
+
return writeXcafParts(k, parts, resolveStepUnits(options));
|
|
4529
4669
|
}
|
|
4530
4670
|
function exportGLB(mesh, shape, tolerance) {
|
|
4531
4671
|
const result = mesh(shape, {
|
|
@@ -4653,9 +4793,9 @@ function toBREP(k, shape) {
|
|
|
4653
4793
|
function fromBREP(k, data) {
|
|
4654
4794
|
return wrapResult(k, k.fromBREP(data));
|
|
4655
4795
|
}
|
|
4656
|
-
function
|
|
4796
|
+
function addXcafParts(k, parts) {
|
|
4657
4797
|
const docId = k.xcafNewDocument();
|
|
4658
|
-
for (const entry of
|
|
4798
|
+
for (const entry of parts) {
|
|
4659
4799
|
const labelId = k.xcafAddShape(docId, unwrap(entry.shape));
|
|
4660
4800
|
if (entry.name) k.xcafSetName(docId, labelId, entry.name);
|
|
4661
4801
|
if (entry.color) {
|
|
@@ -4663,37 +4803,94 @@ function createXCAFDocument(k, _Module, shapes) {
|
|
|
4663
4803
|
k.xcafSetColor(docId, labelId, r / 255, g / 255, b / 255);
|
|
4664
4804
|
}
|
|
4665
4805
|
}
|
|
4666
|
-
return
|
|
4806
|
+
return docId;
|
|
4667
4807
|
}
|
|
4668
|
-
function
|
|
4669
|
-
const docId = unwrap(doc);
|
|
4808
|
+
function writeXcafDoc(k, docId, units) {
|
|
4670
4809
|
const roots = k.xcafGetRootLabels(docId);
|
|
4671
|
-
|
|
4810
|
+
try {
|
|
4811
|
+
if (roots.size() === 0) return "";
|
|
4812
|
+
} finally {
|
|
4813
|
+
roots.delete();
|
|
4814
|
+
}
|
|
4815
|
+
return stepWriter(k.xcafExportSTEPWithUnit?.bind(k), (id) => k.xcafExportSTEP(id), units)(docId);
|
|
4816
|
+
}
|
|
4817
|
+
/** Write `parts` as one XCAF STEP file, scaling each into millimeters first if needed. */
|
|
4818
|
+
function writeXcafParts(k, parts, units) {
|
|
4819
|
+
const scaled = [];
|
|
4820
|
+
try {
|
|
4821
|
+
const docId = addXcafParts(k, parts.map((part) => {
|
|
4822
|
+
if (units.modelScale === 1) return part;
|
|
4823
|
+
const id = k.scale(unwrap(part.shape), 0, 0, 0, units.modelScale);
|
|
4824
|
+
scaled.push(id);
|
|
4825
|
+
return {
|
|
4826
|
+
...part,
|
|
4827
|
+
shape: id
|
|
4828
|
+
};
|
|
4829
|
+
}));
|
|
4672
4830
|
try {
|
|
4673
|
-
return
|
|
4831
|
+
return writeXcafDoc(k, docId, units);
|
|
4674
4832
|
} finally {
|
|
4675
|
-
|
|
4833
|
+
k.xcafClose(docId);
|
|
4676
4834
|
}
|
|
4677
|
-
}
|
|
4835
|
+
} finally {
|
|
4836
|
+
for (const id of scaled) k.release(id);
|
|
4837
|
+
}
|
|
4838
|
+
}
|
|
4839
|
+
function createXCAFDocument(k, makeCompound, shapes) {
|
|
4840
|
+
const retainedId = unwrap(makeCompound(shapes.map((s) => s.shape)));
|
|
4841
|
+
try {
|
|
4842
|
+
return {
|
|
4843
|
+
...handle("compound", addXcafParts(k, shapes)),
|
|
4844
|
+
retainedId,
|
|
4845
|
+
labels: shapes.map(({ name, color }) => ({
|
|
4846
|
+
name,
|
|
4847
|
+
color
|
|
4848
|
+
}))
|
|
4849
|
+
};
|
|
4850
|
+
} catch (e) {
|
|
4851
|
+
k.release(retainedId);
|
|
4852
|
+
throw e;
|
|
4853
|
+
}
|
|
4854
|
+
}
|
|
4855
|
+
function writeXCAFToSTEP(k, doc, options) {
|
|
4856
|
+
const docId = unwrap(doc);
|
|
4857
|
+
const { retainedId, labels } = doc;
|
|
4678
4858
|
try {
|
|
4679
|
-
|
|
4859
|
+
const units = resolveStepUnits(options);
|
|
4860
|
+
if (units.modelScale === 1) return writeXcafDoc(k, docId, units);
|
|
4861
|
+
if (retainedId === void 0 || labels === void 0) throw new Error("occt-wasm: this XCAF document does not record its parts");
|
|
4862
|
+
return writeScaledXcafParts(k, retainedId, labels, units);
|
|
4680
4863
|
} finally {
|
|
4681
4864
|
k.xcafClose(docId);
|
|
4865
|
+
if (retainedId !== void 0) k.release(retainedId);
|
|
4682
4866
|
}
|
|
4683
4867
|
}
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
const
|
|
4687
|
-
|
|
4688
|
-
|
|
4689
|
-
color: s.color
|
|
4690
|
-
})));
|
|
4868
|
+
/** Scale the retained compound once and write its children as the labeled parts. */
|
|
4869
|
+
function writeScaledXcafParts(k, retainedId, labels, units) {
|
|
4870
|
+
const scaledId = k.scale(retainedId, 0, 0, 0, units.modelScale);
|
|
4871
|
+
const children = k.iterShapes(scaledId);
|
|
4872
|
+
const childIds = [];
|
|
4691
4873
|
try {
|
|
4692
|
-
|
|
4874
|
+
for (let i = 0; i < children.size(); i++) childIds.push(children.get(i));
|
|
4875
|
+
return writeXcafParts(k, labels.map((label, i) => ({
|
|
4876
|
+
...label,
|
|
4877
|
+
shape: handle("compound", childIds[i] ?? 0)
|
|
4878
|
+
})), {
|
|
4879
|
+
...units,
|
|
4880
|
+
modelScale: 1
|
|
4881
|
+
});
|
|
4693
4882
|
} finally {
|
|
4694
|
-
|
|
4883
|
+
children.delete();
|
|
4884
|
+
for (const id of childIds) k.release(id);
|
|
4885
|
+
k.release(scaledId);
|
|
4695
4886
|
}
|
|
4696
4887
|
}
|
|
4888
|
+
function exportSTEPConfigured(k, makeCompound, shapes, options) {
|
|
4889
|
+
if (shapes.length === 0) return "";
|
|
4890
|
+
const units = resolveStepUnits(options);
|
|
4891
|
+
if (!shapes.some((s) => s.name || s.color)) return writeStepShapes(k, makeCompound, shapes.map((s) => s.shape), units);
|
|
4892
|
+
return writeXcafParts(k, shapes, units);
|
|
4893
|
+
}
|
|
4697
4894
|
// src/kernel/occtWasm/constructionOps.ts
|
|
4698
4895
|
function makeVertex(k, x, y, z) {
|
|
4699
4896
|
return handle("vertex", k.makeVertex(x, y, z));
|
|
@@ -5926,32 +6123,36 @@ function cutAllWithHistory(k, Module, shape, tools, inputFaceHashes, hashUpperBo
|
|
|
5926
6123
|
return withSolidIds(k, [shape], (argIds) => withSolidIds(k, tools, (toolIds) => viaBooleanOp(k, Module, "cut", argIds, toolIds, inputFaceHashes, hashUpperBound, options)));
|
|
5927
6124
|
}
|
|
5928
6125
|
function filletWithHistory(k, Module, shape, edges, radius, inputFaceHashes, hashUpperBound) {
|
|
5929
|
-
const
|
|
5930
|
-
const edgeVec = makeVecU32(Module, edges.map(unwrap));
|
|
6126
|
+
const shapeId = unwrap(shape);
|
|
5931
6127
|
const hashVec = makeVecInt(Module, inputFaceHashes);
|
|
5932
6128
|
try {
|
|
5933
|
-
const { id, evolution } = parseEvolution(
|
|
6129
|
+
const { id, evolution } = parseEvolution(runEdgeTreatment(Module, edges, radius, (edgeVec, r) => k.filletWithHistory(shapeId, edgeVec, r, hashVec, hashUpperBound), (edgeVec, startRadii, endRadii) => {
|
|
6130
|
+
if (!k.filletRadiiWithHistory) throw needsOcctWasm59("per-edge or tapered fillet radii");
|
|
6131
|
+
return k.filletRadiiWithHistory(shapeId, edgeVec, startRadii, endRadii, hashVec, hashUpperBound);
|
|
6132
|
+
}));
|
|
5934
6133
|
return {
|
|
5935
6134
|
shape: wrapResult(k, id),
|
|
5936
6135
|
evolution
|
|
5937
6136
|
};
|
|
5938
6137
|
} finally {
|
|
5939
|
-
edgeVec.delete();
|
|
5940
6138
|
hashVec.delete();
|
|
5941
6139
|
}
|
|
5942
6140
|
}
|
|
5943
6141
|
function chamferWithHistory(k, Module, shape, edges, distance, inputFaceHashes, hashUpperBound) {
|
|
5944
|
-
const
|
|
5945
|
-
const
|
|
6142
|
+
const shapeId = unwrap(shape);
|
|
6143
|
+
const faceVec = makeVecU32(Module, []);
|
|
5946
6144
|
const hashVec = makeVecInt(Module, inputFaceHashes);
|
|
5947
6145
|
try {
|
|
5948
|
-
const { id, evolution } = parseEvolution(
|
|
6146
|
+
const { id, evolution } = parseEvolution(runEdgeTreatment(Module, edges, distance, (edgeVec, d) => k.chamferWithHistory(shapeId, edgeVec, d, hashVec, hashUpperBound), (edgeVec, distances1, distances2) => {
|
|
6147
|
+
if (!k.chamferDistancesWithHistory) throw needsOcctWasm59("per-edge or asymmetric chamfer distances");
|
|
6148
|
+
return k.chamferDistancesWithHistory(shapeId, edgeVec, distances1, distances2, faceVec, hashVec, hashUpperBound);
|
|
6149
|
+
}));
|
|
5949
6150
|
return {
|
|
5950
6151
|
shape: wrapResult(k, id),
|
|
5951
6152
|
evolution
|
|
5952
6153
|
};
|
|
5953
6154
|
} finally {
|
|
5954
|
-
|
|
6155
|
+
faceVec.delete();
|
|
5955
6156
|
hashVec.delete();
|
|
5956
6157
|
}
|
|
5957
6158
|
}
|
|
@@ -5993,21 +6194,30 @@ function offsetWithHistory(k, Module, shape, distance, inputFaceHashes, hashUppe
|
|
|
5993
6194
|
hashVec.delete();
|
|
5994
6195
|
}
|
|
5995
6196
|
}
|
|
5996
|
-
function draftWithHistory(k, shape, faces, pullDirection, angleDeg) {
|
|
5997
|
-
|
|
5998
|
-
|
|
5999
|
-
for (const face of faces) {
|
|
6000
|
-
const angleRad = (typeof angleDeg === "number" ? angleDeg : angleDeg(face)) * Math.PI / 180;
|
|
6001
|
-
currentId = k.draft(currentId, unwrap(face), angleRad, dx, dy, dz);
|
|
6002
|
-
}
|
|
6003
|
-
return {
|
|
6004
|
-
shape: wrapResult(k, currentId),
|
|
6197
|
+
function draftWithHistory(k, Module, shape, faces, pullDirection, neutralPlane, angleDeg, inputFaceHashes, hashUpperBound) {
|
|
6198
|
+
if (!k.draftFacesWithHistory) return {
|
|
6199
|
+
shape: draft(k, Module, shape, faces, pullDirection, neutralPlane, angleDeg),
|
|
6005
6200
|
evolution: {
|
|
6006
6201
|
modified: /* @__PURE__ */ new Map(),
|
|
6007
6202
|
generated: /* @__PURE__ */ new Map(),
|
|
6008
6203
|
deleted: /* @__PURE__ */ new Set()
|
|
6009
6204
|
}
|
|
6010
6205
|
};
|
|
6206
|
+
const anglesRad = draftAnglesRad(faces, angleDeg);
|
|
6207
|
+
const faceVec = makeVecU32(Module, faces.map(unwrap));
|
|
6208
|
+
const angleVec = makeVecDouble(Module, anglesRad);
|
|
6209
|
+
const hashVec = makeVecInt(Module, inputFaceHashes);
|
|
6210
|
+
try {
|
|
6211
|
+
const { id, evolution } = parseEvolution(k.draftFacesWithHistory(unwrap(shape), faceVec, angleVec, ...pullDirection, ...neutralPlane, ...pullDirection, hashVec, hashUpperBound));
|
|
6212
|
+
return {
|
|
6213
|
+
shape: wrapResult(k, id),
|
|
6214
|
+
evolution
|
|
6215
|
+
};
|
|
6216
|
+
} finally {
|
|
6217
|
+
faceVec.delete();
|
|
6218
|
+
angleVec.delete();
|
|
6219
|
+
hashVec.delete();
|
|
6220
|
+
}
|
|
6011
6221
|
}
|
|
6012
6222
|
function applyComposedTransformWithHistory(transformFn, iterShapesFn, hashCodeFn, shape, transformHandle, inputFaceHashes, hashUpperBound) {
|
|
6013
6223
|
const result = transformFn(shape, transformHandle);
|
|
@@ -6369,7 +6579,7 @@ var OcctWasmAdapter = class OcctWasmAdapter {
|
|
|
6369
6579
|
return filletVariable(this.k, shape, spec);
|
|
6370
6580
|
}
|
|
6371
6581
|
draft(shape, faces, pullDirection, neutralPlane, angleDeg) {
|
|
6372
|
-
return draft(this.k, shape, faces, pullDirection, neutralPlane, angleDeg);
|
|
6582
|
+
return draft(this.k, this.Module, shape, faces, pullDirection, neutralPlane, angleDeg);
|
|
6373
6583
|
}
|
|
6374
6584
|
defeature(shape, faces) {
|
|
6375
6585
|
return defeature(this.k, this.Module, shape, faces);
|
|
@@ -6461,8 +6671,8 @@ var OcctWasmAdapter = class OcctWasmAdapter {
|
|
|
6461
6671
|
offsetWithHistory(shape, distance, inputFaceHashes, hashUpperBound, tolerance) {
|
|
6462
6672
|
return offsetWithHistory(this.k, this.Module, shape, distance, inputFaceHashes, hashUpperBound, tolerance);
|
|
6463
6673
|
}
|
|
6464
|
-
draftWithHistory(shape, faces, pullDirection,
|
|
6465
|
-
return draftWithHistory(this.k, shape, faces, pullDirection, angleDeg);
|
|
6674
|
+
draftWithHistory(shape, faces, pullDirection, neutralPlane, angleDeg, inputFaceHashes, hashUpperBound) {
|
|
6675
|
+
return draftWithHistory(this.k, this.Module, shape, faces, pullDirection, neutralPlane, angleDeg, inputFaceHashes, hashUpperBound);
|
|
6466
6676
|
}
|
|
6467
6677
|
applyComposedTransformWithHistory(shape, transformHandle, inputFaceHashes, hashUpperBound) {
|
|
6468
6678
|
return applyComposedTransformWithHistory((s, t) => this.transform(s, t), (s, t) => this.iterShapes(s, t), (s, ub) => this.hashCode(s, ub), shape, transformHandle, inputFaceHashes, hashUpperBound);
|
|
@@ -6498,7 +6708,7 @@ var OcctWasmAdapter = class OcctWasmAdapter {
|
|
|
6498
6708
|
return importIGES(this.k, data);
|
|
6499
6709
|
}
|
|
6500
6710
|
exportSTEPAssembly(parts, options) {
|
|
6501
|
-
return exportSTEPAssembly(this.k,
|
|
6711
|
+
return exportSTEPAssembly(this.k, parts, options);
|
|
6502
6712
|
}
|
|
6503
6713
|
export3MF(_shape, _tolerance) {
|
|
6504
6714
|
throw new Error("export3MF is only available with the brepkit kernel");
|
|
@@ -6528,13 +6738,13 @@ var OcctWasmAdapter = class OcctWasmAdapter {
|
|
|
6528
6738
|
return fromBREP(this.k, data);
|
|
6529
6739
|
}
|
|
6530
6740
|
createXCAFDocument(shapes) {
|
|
6531
|
-
return createXCAFDocument(this.k, this.
|
|
6741
|
+
return createXCAFDocument(this.k, this.makeCompound.bind(this), shapes);
|
|
6532
6742
|
}
|
|
6533
6743
|
writeXCAFToSTEP(doc, options) {
|
|
6534
6744
|
return writeXCAFToSTEP(this.k, doc, options);
|
|
6535
6745
|
}
|
|
6536
6746
|
exportSTEPConfigured(shapes, options) {
|
|
6537
|
-
return exportSTEPConfigured(this.k, this.
|
|
6747
|
+
return exportSTEPConfigured(this.k, this.makeCompound.bind(this), shapes, options);
|
|
6538
6748
|
}
|
|
6539
6749
|
volume(shape) {
|
|
6540
6750
|
return volume(this.k, shape);
|
package/dist/operations.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_threadFns = require("./threadFns-
|
|
3
|
-
const require_loftFns = require("./loftFns-
|
|
2
|
+
const require_threadFns = require("./threadFns-e8_26ZYw.cjs");
|
|
3
|
+
const require_loftFns = require("./loftFns-T0GxcPlB.cjs");
|
|
4
4
|
exports.addChild = require_threadFns.addChild;
|
|
5
5
|
exports.addJoint = require_threadFns.addJoint;
|
|
6
6
|
exports.addStep = require_threadFns.addStep;
|
package/dist/operations.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { A as setJointValue, B as walkAssembly, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, F as countNodes, H as circularPattern, I as createAssemblyNode, L as findNode, M as sphericalJoint, N as addChild, O as prismaticJoint, P as collectShapes, R as removeChild, S as addJoint, T as jointTransform, U as gridPattern, V as exportAssemblySTEP, W as linearPattern, Y as createAssembly, _ as exportURDF, b as inverseKinematics, c as modifyStep, d as replayFrom, f as replayHistory, g as undoLast, h as stepsFrom, i as createRegistry, j as setJointValues, k as revoluteJoint, l as registerOperation, m as stepCount, n as addStep, o as findStep, r as createHistory, s as getShape, t as thread, u as registerShape, v as importURDF, w as forwardKinematics, x as jointTrajectory, y as jointsFromDH, z as updateNode } from "./threadFns-
|
|
2
|
-
import { c as twistExtrude, o as supportExtrude, r as complexExtrude, s as sweep } from "./loftFns-
|
|
1
|
+
import { A as setJointValue, B as walkAssembly, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, F as countNodes, H as circularPattern, I as createAssemblyNode, L as findNode, M as sphericalJoint, N as addChild, O as prismaticJoint, P as collectShapes, R as removeChild, S as addJoint, T as jointTransform, U as gridPattern, V as exportAssemblySTEP, W as linearPattern, Y as createAssembly, _ as exportURDF, b as inverseKinematics, c as modifyStep, d as replayFrom, f as replayHistory, g as undoLast, h as stepsFrom, i as createRegistry, j as setJointValues, k as revoluteJoint, l as registerOperation, m as stepCount, n as addStep, o as findStep, r as createHistory, s as getShape, t as thread, u as registerShape, v as importURDF, w as forwardKinematics, x as jointTrajectory, y as jointsFromDH, z as updateNode } from "./threadFns-CmZFykpi.js";
|
|
2
|
+
import { c as twistExtrude, o as supportExtrude, r as complexExtrude, s as sweep } from "./loftFns-Bh_RuF7a.js";
|
|
3
3
|
export { addChild, addJoint, addStep, circularPattern, collectShapes, complexExtrude, countNodes, createAssembly, createAssemblyNode, createHistory, createRegistry, cylindricalJoint, exportAssemblySTEP, exportURDF, findNode, findStep, forwardKinematics, getShape as getHistoryShape, gridPattern, importURDF, inverseKinematics, jointTrajectory, jointTransform, jointsFromDH, linearPattern, mechanismDOF, modifyStep, planarJoint, prismaticJoint, registerOperation, registerShape, removeChild, replayFrom, replayHistory, revoluteJoint, setJointValue, setJointValues, sphericalJoint, stepCount, stepsFrom, supportExtrude, sweep, thread, twistExtrude, undoLast, updateNode, walkAssembly };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { E as GeometryCleanupError, G as _usingCtx, d as createSolid, n as castResultShape, q as getKernel } from "./shapeTypes-
|
|
1
|
+
import { E as GeometryCleanupError, G as _usingCtx, d as createSolid, n as castResultShape, q as getKernel } from "./shapeTypes-DvzbSivn.js";
|
|
2
2
|
import { E as ok, d as validationError, g as err, m as andThen, t as BrepErrorCode } from "./errors-BTccWbtE.js";
|
|
3
|
-
import { n as isClosedWire } from "./validityTypes-
|
|
3
|
+
import { n as isClosedWire } from "./validityTypes-CdY06B8c.js";
|
|
4
4
|
import { n as HASH_CODE_MAX, t as DEG2RAD } from "./constants-iraOnb2p.js";
|
|
5
5
|
import { d as vecNormalize, h as vecScale } from "./vecOps-S-m9H_fe.js";
|
|
6
|
-
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-
|
|
7
|
-
import { d as collectInputFaceHashes, f as hasAnyMetadata, h as propagateMetadataThroughRelocation, m as propagateMetadataByHash, p as propagateAllMetadata } from "./booleanFns-
|
|
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
|
|
6
|
+
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-BqSVC4cB.js";
|
|
7
|
+
import { d as collectInputFaceHashes, f as hasAnyMetadata, h as propagateMetadataThroughRelocation, m as propagateMetadataByHash, p as propagateAllMetadata } from "./booleanFns-CKDyqKz0.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--HOoTQad.js";
|
|
9
9
|
// src/topology/transformFns.ts
|
|
10
10
|
/**
|
|
11
11
|
* Immutable shape transforms — translate, rotate, scale, mirror, applyMatrix.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes--7XBFlOD.cjs");
|
|
2
2
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
3
|
-
const require_validityTypes = require("./validityTypes-
|
|
3
|
+
const require_validityTypes = require("./validityTypes-Ds4zNICF.cjs");
|
|
4
4
|
const require_constants = require("./constants-oee0S_x6.cjs");
|
|
5
5
|
const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
|
|
6
|
-
const require_solidBuilders = require("./solidBuilders-
|
|
7
|
-
const require_booleanFns = require("./booleanFns-
|
|
8
|
-
const require_surfaceBuilders = require("./surfaceBuilders-
|
|
6
|
+
const require_solidBuilders = require("./solidBuilders-D0bIZX9K.cjs");
|
|
7
|
+
const require_booleanFns = require("./booleanFns-C640CeaY.cjs");
|
|
8
|
+
const require_surfaceBuilders = require("./surfaceBuilders-CPQHyL_5.cjs");
|
|
9
9
|
// src/topology/transformFns.ts
|
|
10
10
|
/**
|
|
11
11
|
* Immutable shape transforms — translate, rotate, scale, mirror, applyMatrix.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes--7XBFlOD.cjs");
|
|
2
2
|
const require_bug = require("./bug-CBcpIPuf.cjs");
|
|
3
3
|
const require_errors = require("./errors-O_blYTWT.cjs");
|
|
4
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
4
|
+
const require_topologyQueryFns = require("./topologyQueryFns-NszVx8a0.cjs");
|
|
5
5
|
const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
|
|
6
|
-
const require_measureFns = require("./measureFns-
|
|
6
|
+
const require_measureFns = require("./measureFns-DGm6ndQY.cjs");
|
|
7
7
|
// src/measurement/principalBoxFns.ts
|
|
8
8
|
/**
|
|
9
9
|
* Principal-axes bounding box: a solid's extent measured in the frame of its
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { G as _usingCtx, n as castResultShape, q as getKernel } from "./shapeTypes-
|
|
1
|
+
import { G as _usingCtx, n as castResultShape, q as getKernel } from "./shapeTypes-DvzbSivn.js";
|
|
2
2
|
import { i as wasmIndex } from "./bug-ClMTAJhe.js";
|
|
3
3
|
import { E as ok, d as validationError, g as err, t as BrepErrorCode, u as unsupportedError } from "./errors-BTccWbtE.js";
|
|
4
|
-
import { E as kernelCallRaw, S as subShapeCount } from "./topologyQueryFns-
|
|
4
|
+
import { E as kernelCallRaw, S as subShapeCount } from "./topologyQueryFns-BUzMuIs5.js";
|
|
5
5
|
import { r as vecCross } from "./vecOps-S-m9H_fe.js";
|
|
6
|
-
import { f as getCachedMeasurement, p as setCachedMeasurement } from "./measureFns-
|
|
6
|
+
import { f as getCachedMeasurement, p as setCachedMeasurement } from "./measureFns-C3TZ5Fj9.js";
|
|
7
7
|
// src/measurement/principalBoxFns.ts
|
|
8
8
|
/**
|
|
9
9
|
* Principal-axes bounding box: a solid's extent measured in the frame of its
|
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-hXUKJkLg.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 +1 @@
|
|
|
1
|
-
export { o as PROJECTION_PLANES, t as cameraFromPlane, n as cameraLookAt, r as createCamera, s as isProjectionPlane, a as makeProjectedEdges, i as projectEdges } from "./cameraFns-
|
|
1
|
+
export { o as PROJECTION_PLANES, t as cameraFromPlane, n as cameraLookAt, r as createCamera, s as isProjectionPlane, a as makeProjectedEdges, i as projectEdges } from "./cameraFns-DIbua1lC.js";
|
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-Wnq-YPWv.cjs");
|
|
3
|
+
const require_cornerFinder = require("./cornerFinder-ByBGU0r7.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-CroIo2SI.js";
|
|
2
|
+
import { t as cornerFinder } from "./cornerFinder-BYDkloVc.js";
|
|
3
3
|
export { cornerFinder, edgeFinder, faceFinder, getSingleFace };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
const require_shapeTypes = require("./shapeTypes
|
|
2
|
-
const require_topologyQueryFns = require("./topologyQueryFns-
|
|
3
|
-
const require_faceFns = require("./faceFns-
|
|
1
|
+
const require_shapeTypes = require("./shapeTypes--7XBFlOD.cjs");
|
|
2
|
+
const require_topologyQueryFns = require("./topologyQueryFns-NszVx8a0.cjs");
|
|
3
|
+
const require_faceFns = require("./faceFns-BDqVGEoB.cjs");
|
|
4
4
|
const require_faceRoleFns = require("./faceRoleFns-Db5bYj4Q.cjs");
|
|
5
|
-
const require_shapeFns = require("./shapeFns-
|
|
6
|
-
const require_measureFns = require("./measureFns-
|
|
7
|
-
const require_adjacencyFns = require("./adjacencyFns-
|
|
5
|
+
const require_shapeFns = require("./shapeFns-DuxfaqTw.cjs");
|
|
6
|
+
const require_measureFns = require("./measureFns-DGm6ndQY.cjs");
|
|
7
|
+
const require_adjacencyFns = require("./adjacencyFns-CfhGIMeR.cjs");
|
|
8
8
|
// src/topology/shapeRef/scoring.ts
|
|
9
9
|
/**
|
|
10
10
|
* Default face scorer combining surface type, normal alignment, centroid proximity,
|