okgeometry-api 1.75.0 → 1.76.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/Mesh.d.ts +18 -0
- package/dist/Mesh.d.ts.map +1 -1
- package/dist/Mesh.js +64 -8
- package/dist/Mesh.js.map +1 -1
- package/dist/mesh-boolean.protocol.d.ts +1 -1
- package/dist/mesh-boolean.protocol.d.ts.map +1 -1
- package/dist/mesh-boolean.worker.d.ts.map +1 -1
- package/dist/mesh-boolean.worker.js +18 -0
- package/dist/mesh-boolean.worker.js.map +1 -1
- package/package.json +78 -78
- package/src/Mesh.ts +81 -8
- package/src/mesh-boolean.protocol.ts +4 -0
- package/src/mesh-boolean.worker.ts +21 -0
|
@@ -270,6 +270,10 @@ export type MeshHeavyOperation =
|
|
|
270
270
|
// triangle…) × runs]. Jobs carry affinityKey = the
|
|
271
271
|
// target's resident key so one slot owns the index.
|
|
272
272
|
| "projectCurves"
|
|
273
|
+
// projectPoints: [targetMesh, pointsBuffer [n, xyz…]] — project bare
|
|
274
|
+
// points; options ride params.projectCurves (same shape).
|
|
275
|
+
// Response = the raw [n, (hit, x, y, z) × n] block.
|
|
276
|
+
| "projectPoints"
|
|
273
277
|
// projectWarm: [targetMesh] — store the target resident + build its
|
|
274
278
|
// projection index eagerly (PJ24 warm-up). No params;
|
|
275
279
|
// response = empty ack. SAME affinityKey as later
|
|
@@ -887,6 +887,27 @@ function runHeavyOperation(message: {
|
|
|
887
887
|
out.set(raw);
|
|
888
888
|
return { buffer: out.buffer };
|
|
889
889
|
}
|
|
890
|
+
case "projectPoints": {
|
|
891
|
+
const p = params.projectCurves;
|
|
892
|
+
if (!p) throw new Error("projectPoints requires projectCurves params");
|
|
893
|
+
const mesh = resolveOperand(
|
|
894
|
+
message.residentKeys?.[0],
|
|
895
|
+
message.buffers[0],
|
|
896
|
+
message.trusted?.[0],
|
|
897
|
+
);
|
|
898
|
+
const pointsBuf = new Float64Array(message.buffers[1]);
|
|
899
|
+
const raw = mesh.projectPointsRaw(pointsBuf, {
|
|
900
|
+
mode: p.mode,
|
|
901
|
+
direction: p.dir ? { x: p.dir[0], y: p.dir[1], z: p.dir[2] } : undefined,
|
|
902
|
+
tolerance: p.tolerance,
|
|
903
|
+
maxDistance: p.maxDistance,
|
|
904
|
+
stretchLimit: p.stretchLimit,
|
|
905
|
+
sampleCap: p.sampleCap,
|
|
906
|
+
});
|
|
907
|
+
const out = new Float64Array(raw.length);
|
|
908
|
+
out.set(raw);
|
|
909
|
+
return { buffer: out.buffer };
|
|
910
|
+
}
|
|
890
911
|
case "projectWarm": {
|
|
891
912
|
const mesh = resolveOperand(
|
|
892
913
|
message.residentKeys?.[0],
|