@ferscloud/fers-mcp 2.84.0 → 2.85.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/fers-mcp.cjs +50 -4
- package/package.json +2 -2
package/dist/fers-mcp.cjs
CHANGED
|
@@ -21940,7 +21940,7 @@ var openapi_default = {
|
|
|
21940
21940
|
name: "PolyForm-Strict-1.0.0",
|
|
21941
21941
|
url: "https://polyformproject.org/licenses/strict/1.0.0"
|
|
21942
21942
|
},
|
|
21943
|
-
version: "0.2.
|
|
21943
|
+
version: "0.2.85"
|
|
21944
21944
|
},
|
|
21945
21945
|
paths: {},
|
|
21946
21946
|
components: {
|
|
@@ -79106,6 +79106,32 @@ function memberIdsOf(model) {
|
|
|
79106
79106
|
for (const s of model.model.member_sets) push(s?.members);
|
|
79107
79107
|
return out;
|
|
79108
79108
|
}
|
|
79109
|
+
var CABLE_SPAN_LOAD = "A cable takes no load along its span: its own weight is in the catenary, and any other load there would reach neither its force nor its sag. Apply the load to nodes instead";
|
|
79110
|
+
function isCable(model, memberId) {
|
|
79111
|
+
const sets = Array.isArray(model.model?.member_sets) ? model.model.member_sets : [];
|
|
79112
|
+
const members = [
|
|
79113
|
+
...Array.isArray(model.model?.members) ? model.model.members : [],
|
|
79114
|
+
...sets.flatMap((s) => Array.isArray(s?.members) ? s.members : [])
|
|
79115
|
+
];
|
|
79116
|
+
return members.some((m) => m?.id === memberId && m?.member_type === "Cable");
|
|
79117
|
+
}
|
|
79118
|
+
function spanLoadsOn(model, memberIds) {
|
|
79119
|
+
const ids = new Set(memberIds);
|
|
79120
|
+
const cases = Array.isArray(model.analysis?.load_cases) ? model.analysis.load_cases : [];
|
|
79121
|
+
const interior = (l) => l?.position > 0 && l?.position < 1;
|
|
79122
|
+
const found = [];
|
|
79123
|
+
for (const lc of cases) {
|
|
79124
|
+
const scan = (key, label, keep) => {
|
|
79125
|
+
for (const l of Array.isArray(lc?.[key]) ? lc[key] : [])
|
|
79126
|
+
if (ids.has(l?.member) && keep(l))
|
|
79127
|
+
found.push(`${label} ${l.id} (case ${lc.id})`);
|
|
79128
|
+
};
|
|
79129
|
+
scan("distributed_loads", "distributed load", () => true);
|
|
79130
|
+
scan("member_point_loads", "member point load", interior);
|
|
79131
|
+
scan("member_point_moments", "member point moment", interior);
|
|
79132
|
+
}
|
|
79133
|
+
return found;
|
|
79134
|
+
}
|
|
79109
79135
|
function nodeIdsOf(model) {
|
|
79110
79136
|
const out = /* @__PURE__ */ new Set();
|
|
79111
79137
|
if (Array.isArray(model.model?.nodes)) {
|
|
@@ -79417,6 +79443,11 @@ function addLoad(args) {
|
|
|
79417
79443
|
if (members.size && !members.has(member)) {
|
|
79418
79444
|
return fail(`member ${member} does not exist in this model.`);
|
|
79419
79445
|
}
|
|
79446
|
+
if (isCable(model, member)) {
|
|
79447
|
+
return fail(
|
|
79448
|
+
`member ${member} is a Cable, and the solve rejects a distributed load on one. ${CABLE_SPAN_LOAD}.`
|
|
79449
|
+
);
|
|
79450
|
+
}
|
|
79420
79451
|
const startFrac = coerceNumber(args.start_frac) ?? 0;
|
|
79421
79452
|
const endFrac = coerceNumber(args.end_frac) ?? 1;
|
|
79422
79453
|
if (!(startFrac >= 0 && endFrac <= 1 && startFrac < endFrac)) {
|
|
@@ -79446,8 +79477,14 @@ function addLoad(args) {
|
|
|
79446
79477
|
`kind "${kind}" requires \`position\` (0 = start node, 1 = end node).`
|
|
79447
79478
|
);
|
|
79448
79479
|
}
|
|
79480
|
+
const position = Math.min(Math.max(rawPos, 0), 1);
|
|
79481
|
+
if (isCable(model, member) && position > 0 && position < 1) {
|
|
79482
|
+
return fail(
|
|
79483
|
+
`member ${member} is a Cable, and the solve rejects a point load or moment inside its span (position ${position}). ${CABLE_SPAN_LOAD}.`
|
|
79484
|
+
);
|
|
79485
|
+
}
|
|
79449
79486
|
record2.member = member;
|
|
79450
|
-
record2.position =
|
|
79487
|
+
record2.position = position;
|
|
79451
79488
|
record2.direction = unit2;
|
|
79452
79489
|
const axes = args.axes == null ? "global" : String(args.axes).toLowerCase();
|
|
79453
79490
|
if (axes !== "global" && axes !== "local") {
|
|
@@ -82788,6 +82825,15 @@ function setMember(args) {
|
|
|
82788
82825
|
notes.push(
|
|
82789
82826
|
"Cables force the whole solve onto the nonlinear Newton path even when order is LINEAR, and are excluded from the generated self-weight load case (their weight is intrinsic to the catenary)."
|
|
82790
82827
|
);
|
|
82828
|
+
const onSpan = spanLoadsOn(
|
|
82829
|
+
doc,
|
|
82830
|
+
targets.filter((m) => String(m.member_type) === "Cable").map((m) => Number(m.id))
|
|
82831
|
+
);
|
|
82832
|
+
if (onSpan.length) {
|
|
82833
|
+
notes.push(
|
|
82834
|
+
`This model will NOT solve as it stands: ${onSpan.join(", ")} sit${onSpan.length === 1 ? "s" : ""} on a Cable's span. ${CABLE_SPAN_LOAD}.`
|
|
82835
|
+
);
|
|
82836
|
+
}
|
|
82791
82837
|
}
|
|
82792
82838
|
if (targets.some((m) => String(m.member_type) === "Rigid")) {
|
|
82793
82839
|
notes.push(
|
|
@@ -84515,7 +84561,7 @@ function solveInBrowserPayload(a) {
|
|
|
84515
84561
|
}
|
|
84516
84562
|
|
|
84517
84563
|
// src/lib/mcp-core/server.ts
|
|
84518
|
-
var SERVER_VERSION = "2.
|
|
84564
|
+
var SERVER_VERSION = "2.85.0";
|
|
84519
84565
|
function tooLarge(model) {
|
|
84520
84566
|
return typeof model !== "string" || model.length > MODEL_JSON_MAX_BYTES;
|
|
84521
84567
|
}
|
|
@@ -85338,7 +85384,7 @@ function createFersMcpServer(ctx, deps) {
|
|
|
85338
85384
|
);
|
|
85339
85385
|
defineTool(
|
|
85340
85386
|
"add_load",
|
|
85341
|
-
'Add ONE load of any kind to an existing load case. Choose `kind`: "nodal_force" (force at a node), "nodal_moment" (moment at a node \u2014 `direction` is the moment AXIS, right-hand rule), "distributed" (line load along a member; covers uniform, TRAPEZOIDAL/TRIANGULAR via end_magnitude, and PARTIAL via start_frac/end_frac), "member_point_force" / "member_point_moment" (at a fractional position along a member, in global or local axes), "surface" (pressure over a convex planar polygon, distributed onto the coplanar members inside it), "plate_pressure" (pressure on a meshed plate surface). SIGN: direction_x/y/z is a GLOBAL vector \u2014 gravity is direction_y = -1. The direction is normalised for you and the whole load stays in `magnitude` (the raw engine multiplies component-wise, so an unnormalised [0,-2,0] would silently double the load). Distributed intensity is per unit of MEMBER length, not of horizontal projection. Units are the model\'s own (default N, m) EXCEPT plate_pressure, which must always be in SI pascals. Free.',
|
|
85387
|
+
'Add ONE load of any kind to an existing load case. Choose `kind`: "nodal_force" (force at a node), "nodal_moment" (moment at a node \u2014 `direction` is the moment AXIS, right-hand rule), "distributed" (line load along a member; covers uniform, TRAPEZOIDAL/TRIANGULAR via end_magnitude, and PARTIAL via start_frac/end_frac), "member_point_force" / "member_point_moment" (at a fractional position along a member, in global or local axes), "surface" (pressure over a convex planar polygon, distributed onto the coplanar members inside it), "plate_pressure" (pressure on a meshed plate surface). SIGN: direction_x/y/z is a GLOBAL vector \u2014 gravity is direction_y = -1. The direction is normalised for you and the whole load stays in `magnitude` (the raw engine multiplies component-wise, so an unnormalised [0,-2,0] would silently double the load). Distributed intensity is per unit of MEMBER length, not of horizontal projection. A Cable member takes no load along its span (no distributed load, no point load or moment inside it): load its end nodes. Units are the model\'s own (default N, m) EXCEPT plate_pressure, which must always be in SI pascals. Free.',
|
|
85342
85388
|
{
|
|
85343
85389
|
model: jsonString().optional().describe("Stringified FERS model JSON"),
|
|
85344
85390
|
model_ref: modelRefField(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ferscloud/fers-mcp",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.85.0",
|
|
4
4
|
"description": "FERS structural finite-element tools for MCP clients (Claude Desktop, Claude Code, Cursor, VS Code, Codex, ChatGPT desktop), solving on your own machine.",
|
|
5
5
|
"mcpName": "com.ferscloud/fers",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -30,6 +30,6 @@
|
|
|
30
30
|
"node": ">=18"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@ferscloud/fers-calculation": "0.2.
|
|
33
|
+
"@ferscloud/fers-calculation": "0.2.85"
|
|
34
34
|
}
|
|
35
35
|
}
|