opentakeoff-mcp 0.9.59 → 0.9.60
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/server-core.js +26 -16
- package/package.json +1 -1
package/dist/server-core.js
CHANGED
|
@@ -4154,6 +4154,30 @@ function buildNegative(fp, segs, rect, opts = {}) {
|
|
|
4154
4154
|
center: [Math.round(best.at[0] * 10) / 10, Math.round(best.at[1] * 10) / 10]
|
|
4155
4155
|
};
|
|
4156
4156
|
}
|
|
4157
|
+
function mergeProposals(scored, mergeR) {
|
|
4158
|
+
const kept = [];
|
|
4159
|
+
for (const s of scored) {
|
|
4160
|
+
const twin = kept.find((k) => Math.hypot(k.at[0] - s.at[0], k.at[1] - s.at[1]) <= mergeR);
|
|
4161
|
+
if (!twin) {
|
|
4162
|
+
kept.push({ ...s });
|
|
4163
|
+
continue;
|
|
4164
|
+
}
|
|
4165
|
+
if (s.score > twin.score || s.score === twin.score && s.xf < twin.xf) {
|
|
4166
|
+
twin.at = s.at;
|
|
4167
|
+
twin.score = s.score;
|
|
4168
|
+
twin.rotation = s.rotation;
|
|
4169
|
+
twin.mirrored = s.mirrored;
|
|
4170
|
+
twin.xf = s.xf;
|
|
4171
|
+
}
|
|
4172
|
+
}
|
|
4173
|
+
const byBest = [...kept].sort((a, b) => b.score - a.score || a.xf - b.xf || a.at[1] - b.at[1] || a.at[0] - b.at[0]);
|
|
4174
|
+
const out = [];
|
|
4175
|
+
for (const s of byBest) {
|
|
4176
|
+
if (out.some((k) => Math.hypot(k.at[0] - s.at[0], k.at[1] - s.at[1]) <= mergeR)) continue;
|
|
4177
|
+
out.push(s);
|
|
4178
|
+
}
|
|
4179
|
+
return out;
|
|
4180
|
+
}
|
|
4157
4181
|
function matchSymbol(fp, segs, opts = {}) {
|
|
4158
4182
|
const scale = opts.scale ?? 1;
|
|
4159
4183
|
const tol = (opts.tolPx ?? SWEEP_TOL_PX) * Math.max(1, scale);
|
|
@@ -4264,21 +4288,7 @@ function matchSymbol(fp, segs, opts = {}) {
|
|
|
4264
4288
|
scored.push({ at: [c.tx, c.ty], score, rotation: xforms[c.xf].rotation, mirrored: xforms[c.xf].mirrored, xf: c.xf });
|
|
4265
4289
|
}
|
|
4266
4290
|
const mergeR = Math.max(2 * tol, 4);
|
|
4267
|
-
const kept =
|
|
4268
|
-
for (const s of scored) {
|
|
4269
|
-
const twin = kept.find((k) => Math.hypot(k.at[0] - s.at[0], k.at[1] - s.at[1]) <= mergeR);
|
|
4270
|
-
if (!twin) {
|
|
4271
|
-
kept.push(s);
|
|
4272
|
-
continue;
|
|
4273
|
-
}
|
|
4274
|
-
if (s.score > twin.score || s.score === twin.score && s.xf < twin.xf) {
|
|
4275
|
-
twin.at = s.at;
|
|
4276
|
-
twin.score = s.score;
|
|
4277
|
-
twin.rotation = s.rotation;
|
|
4278
|
-
twin.mirrored = s.mirrored;
|
|
4279
|
-
twin.xf = s.xf;
|
|
4280
|
-
}
|
|
4281
|
-
}
|
|
4291
|
+
const kept = mergeProposals(scored, mergeR);
|
|
4282
4292
|
const suppressR = Math.max(mergeR, fpS.footprint / 2);
|
|
4283
4293
|
const ex = opts.excludeCenter;
|
|
4284
4294
|
const away = ex ? kept.filter((s) => Math.hypot(s.at[0] - ex[0], s.at[1] - ex[1]) > suppressR) : kept;
|
|
@@ -11896,7 +11906,7 @@ function nameTheStageInRefusals(server) {
|
|
|
11896
11906
|
// package.json
|
|
11897
11907
|
var package_default = {
|
|
11898
11908
|
name: "opentakeoff-mcp",
|
|
11899
|
-
version: "0.9.
|
|
11909
|
+
version: "0.9.60",
|
|
11900
11910
|
mcpName: "io.github.Kentucky-ai/opentakeoff",
|
|
11901
11911
|
type: "module",
|
|
11902
11912
|
description: "OpenTakeoff MCP server \u2014 drive the takeoff engine from your MCP client over stdio.",
|
package/package.json
CHANGED