[{"data":1,"prerenderedAt":2110},["ShallowReactive",2],{"lib:\u002Fplot\u002Ffunctions":3,"lib-nav:en:\u002Fplot":2081},{"id":4,"title":5,"body":6,"description":2071,"extension":2072,"group":2073,"meta":2074,"navigation":114,"order":2076,"path":2077,"seo":2078,"stem":2079,"__hash__":2080},"libs\u002Fplot\u002Ffunctions.md","Functions",{"type":7,"value":8,"toc":2061},"minimark",[9,13,22,25,30,49,187,198,440,489,492,546,553,557,612,616,644,872,893,897,1005,1048,1090,1094,1194,1229,1233,1241,1396,1410,1424,1428,1583,1587,1611,1952,1981,2057],[10,11,5],"h1",{"id":12},"functions",[14,15,16,17,21],"p",{},"Everything the components draw comes from pure functions with no Vue in them. They write a figure as an SVG file, read results exactly, prepare data ahead of time, and build figures of your own. Named imports keep a bundle small: a page that imports only ",[18,19,20],"code",{},"modelFromSolver"," gets no component code at all.",[14,23,24],{},"All values are SI unless a unit says otherwise; positions along a member are metres from its start node.",[26,27,29],"h2",{"id":28},"a-standalone-svg-file","A standalone SVG file",[14,31,32,33,36,37,40,41,44,45,48],{},"A plot in a page takes its colours from the page's CSS custom properties, so an ",[18,34,35],{},"\u003Csvg>"," copied out of it has none. ",[18,38,39],{},"structureSvg"," writes the figure as the text of a standalone ",[18,42,43],{},".svg"," file instead: plain colours, no stylesheet, no scripts, laid out by the same routine as ",[18,46,47],{},"StructurePlot",". Word, PowerPoint, Inkscape, CairoSVG and LaTeX tool chains draw it as the page does.",[50,51,57],"pre",{"className":52,"code":53,"filename":54,"language":55,"meta":56,"style":56},"language-ts shiki shiki-themes github-light github-dark","import { writeFileSync } from 'node:fs'\nimport { modelFromSolver, structureSvg } from '@edubeam\u002Fplot'\nimport { portalFrame } from '.\u002Fframe.ts' \u002F\u002F () => a solved LinearStaticSolver, as on the Slides page\n\nconst frame = modelFromSolver(portalFrame())\nwriteFileSync('frame.svg', structureSvg(frame, { layers: ['members', 'supports', 'loads', 'reactions', 'M'] }))\n","to-svg.ts","ts","",[18,58,59,79,92,109,116,142],{"__ignoreMap":56},[60,61,64,68,72,75],"span",{"class":62,"line":63},"line",1,[60,65,67],{"class":66},"szBVR","import",[60,69,71],{"class":70},"sVt8B"," { writeFileSync } ",[60,73,74],{"class":66},"from",[60,76,78],{"class":77},"sZZnC"," 'node:fs'\n",[60,80,82,84,87,89],{"class":62,"line":81},2,[60,83,67],{"class":66},[60,85,86],{"class":70}," { modelFromSolver, structureSvg } ",[60,88,74],{"class":66},[60,90,91],{"class":77}," '@edubeam\u002Fplot'\n",[60,93,95,97,100,102,105],{"class":62,"line":94},3,[60,96,67],{"class":66},[60,98,99],{"class":70}," { portalFrame } ",[60,101,74],{"class":66},[60,103,104],{"class":77}," '.\u002Fframe.ts'",[60,106,108],{"class":107},"sJ8bj"," \u002F\u002F () => a solved LinearStaticSolver, as on the Slides page\n",[60,110,112],{"class":62,"line":111},4,[60,113,115],{"emptyLinePlaceholder":114},true,"\n",[60,117,119,122,126,129,133,136,139],{"class":62,"line":118},5,[60,120,121],{"class":66},"const",[60,123,125],{"class":124},"sj4cs"," frame",[60,127,128],{"class":66}," =",[60,130,132],{"class":131},"sScJk"," modelFromSolver",[60,134,135],{"class":70},"(",[60,137,138],{"class":131},"portalFrame",[60,140,141],{"class":70},"())\n",[60,143,145,148,150,153,156,158,161,164,166,169,171,174,176,179,181,184],{"class":62,"line":144},6,[60,146,147],{"class":131},"writeFileSync",[60,149,135],{"class":70},[60,151,152],{"class":77},"'frame.svg'",[60,154,155],{"class":70},", ",[60,157,39],{"class":131},[60,159,160],{"class":70},"(frame, { layers: [",[60,162,163],{"class":77},"'members'",[60,165,155],{"class":70},[60,167,168],{"class":77},"'supports'",[60,170,155],{"class":70},[60,172,173],{"class":77},"'loads'",[60,175,155],{"class":70},[60,177,178],{"class":77},"'reactions'",[60,180,155],{"class":70},[60,182,183],{"class":77},"'M'",[60,185,186],{"class":70},"] }))\n",[14,188,189],{},[190,191],"img",{"alt":192,"className":193,"height":195,"src":196,"width":197},"The portal frame as a standalone SVG file, rendered by CairoSVG: the loads, the reactions, 20 and 40 up and 2.3 and 12.7 sideways, and the bending moment from −50.7 at C to 29.3 in the beam",[194],"shot-lg",908,"\u002Fscreenshots\u002Fp2p-plot-frame-svg.webp",1280,[199,200,201,217],"table",{},[202,203,204],"thead",{},[205,206,207,211,214],"tr",{},[208,209,210],"th",{},"Option",[208,212,213],{},"Default",[208,215,216],{},"What it does",[218,219,220,237,252,265,278,293,312,327,342,365,381,404],"tbody",{},[205,221,222,228,234],{},[223,224,225],"td",{},[18,226,227],{},"layers",[223,229,230,231,233],{},"members, supports, loads, reactions and the result ",[18,232,47],{}," would pick",[223,235,236],{},"What to draw",[205,238,239,244,249],{},[223,240,241],{},[18,242,243],{},"width",[223,245,246],{},[18,247,248],{},"640",[223,250,251],{},"Width in px, the SVG's user units",[205,253,254,259,262],{},[223,255,256],{},[18,257,258],{},"height",[223,260,261],{},"follows the drawing",[223,263,264],{},"A fixed height, px",[205,266,267,272,275],{},[223,268,269],{},[18,270,271],{},"maxHeight",[223,273,274],{},"max(320, 0.75 × width)",[223,276,277],{},"The upper bound of the automatic height",[205,279,280,285,290],{},[223,281,282],{},[18,283,284],{},"padding",[223,286,287],{},[18,288,289],{},"6",[223,291,292],{},"Space around the drawing, px",[205,294,295,300,309],{},[223,296,297],{},[18,298,299],{},"fontSize",[223,301,302,305,306],{},[18,303,304],{},"13",", compact ",[18,307,308],{},"11.5",[223,310,311],{},"Text size, px",[205,313,314,319,324],{},[223,315,316],{},[18,317,318],{},"fontFamily",[223,320,321],{},[18,322,323],{},"Helvetica, Arial, sans-serif",[223,325,326],{},"A font stack the program opening the file has",[205,328,329,334,339],{},[223,330,331],{},[18,332,333],{},"colors",[223,335,336],{},[18,337,338],{},"PRINT_COLORS",[223,340,341],{},"Any of the tones, as plain colours",[205,343,344,349,354],{},[223,345,346],{},[18,347,348],{},"background",[223,350,351],{},[18,352,353],{},"true",[223,355,356,357,360,361,364],{},"Paint the background in ",[18,358,359],{},"paper","; ",[18,362,363],{},"false"," leaves it transparent",[205,366,367,372,375],{},[223,368,369],{},[18,370,371],{},"title",[223,373,374],{},"none",[223,376,377,378],{},"Written as the SVG's ",[18,379,380],{},"\u003Ctitle>",[205,382,383,394,396],{},[223,384,385,155,388,155,391],{},[18,386,387],{},"reserve",[18,389,390],{},"reserveLabelModes",[18,392,393],{},"reserveReactionLabels",[223,395,374],{},[223,397,398,399],{},"Layers, label styles and reaction label styles to make room for besides those drawn, so the files of a build-up line up: ",[400,401,403],"a",{"href":402},"\u002Fplot\u002Fslides#a-build-up-in-beamer","A build-up in Beamer",[205,405,406,432,437],{},[223,407,408,155,411,155,414,155,417,155,420,155,423,155,426,155,429],{},[18,409,410],{},"units",[18,412,413],{},"numberFormat",[18,415,416],{},"compact",[18,418,419],{},"diagramSize",[18,421,422],{},"deformedSize",[18,424,425],{},"momentOnTensionSide",[18,427,428],{},"resultLabelMode",[18,430,431],{},"reactionLabels",[223,433,434,435],{},"as ",[18,436,47],{},[223,438,439],{},"The same meaning as the component's props",[14,441,442,444,445,448,449,452,453,456,457,460,461,464,465,468,469,472,473,481,482,485,486,488],{},[18,443,338],{}," are the EduBeam app's colours on white: ink ",[18,446,447],{},"#16182b",", normal force ",[18,450,451],{},"#2222ff",", shear force ",[18,454,455],{},"#00af00",", bending moment ",[18,458,459],{},"#ff2222",", loads ",[18,462,463],{},"#ff8700",", reactions ",[18,466,467],{},"#a020f0",". Every label is written twice, a halo in the background colour under the text, because not every SVG program understands ",[18,470,471],{},"paint-order",", and a subscript, as in the reaction names ",[474,475,476,477],"em",{},"A",[478,479,480],"sub",{},"x",", is a ",[18,483,484],{},"tspan"," with plain numbers that Word and Inkscape read. Without ",[18,487,387],{},", a file is fitted to the layers it draws.",[14,490,491],{},"To use the file:",[493,494,495,507,536],"ul",{},[496,497,498,502,503,506],"li",{},[499,500,501],"strong",{},"Word and PowerPoint"," (2019 and Microsoft 365): ",[474,504,505],{},"Insert › Pictures",".",[496,508,509,512,513,519,520,523,524,527,528,531,532,535],{},[499,510,511],{},"LaTeX",": convert it to PDF with ",[400,514,518],{"href":515,"rel":516},"https:\u002F\u002Fcairosvg.org",[517],"nofollow","CairoSVG"," (",[18,521,522],{},"cairosvg frame.svg -o frame.pdf",") or Inkscape, then ",[18,525,526],{},"\\includegraphics","; or use ",[18,529,530],{},"\\includesvg"," from the ",[18,533,534],{},"svg"," package, which calls Inkscape for you. At 640 units wide, a figure set to a 16 cm text column has 9 pt labels.",[496,537,538,541,542,506],{},[499,539,540],{},"A web page without Vue",": paste the text into the HTML. See ",[400,543,545],{"href":544},"\u002Fplot\u002Fembedding#plain-html-from-node","Without Vue",[14,547,548,552],{},[400,549,551],{"href":550},"\u002Fplot\u002Fexercises#figures-for-latex-and-word","Exercises and tests"," writes a file for every student's exercise and key.",[26,554,556],{"id":555},"from-a-solver","From a solver",[199,558,559,572],{},[202,560,561],{},[205,562,563,566,569],{},[208,564,565],{},"Export",[208,567,568],{},"Signature",[208,570,571],{},"Does",[218,573,574,593],{},[205,575,576,580,585],{},[223,577,578],{},[18,579,20],{},[223,581,582],{},[18,583,584],{},"(solver: Solver, options?: FromSolverOptions) => PlotModel",[223,586,587,588,592],{},"Reads a solver into the plain ",[400,589,591],{"href":590},"\u002Fplot\u002Fmodel","plot model","; results only for a solved load case",[205,594,595,600,603],{},[223,596,597],{},[18,598,599],{},"FromSolverOptions",[223,601,602],{},"type",[223,604,605,608,609],{},[18,606,607],{},"{ loadCase?: number }",", an index into ",[18,610,611],{},"solver.loadCases",[26,613,615],{"id":614},"piecewise-polynomials","Piecewise polynomials",[14,617,618,619,622,623,626,627,631,632,635,636,639,640,643],{},"A member's results are ",[18,620,621],{},"Piecewise"," values: lists of ",[18,624,625],{},"{ x0, x1, c }"," pieces, explained in ",[400,628,630],{"href":629},"\u002Fplot\u002Fmodel#piecewise-polynomials","Plot model",". ",[18,633,634],{},"side"," picks the value just before (",[18,637,638],{},"'left'",") or just after (",[18,641,642],{},"'right'",", the default) a point where two pieces meet.",[199,645,646,656],{},[202,647,648],{},[205,649,650,652,654],{},[208,651,565],{},[208,653,568],{},[208,655,571],{},[218,657,658,676,690,708,723,738,753,768,782,797,816,835,853],{},[205,659,660,665,670],{},[223,661,662],{},[18,663,664],{},"valueAt",[223,666,667],{},[18,668,669],{},"(pw, x, side?) => number",[223,671,672,673,675],{},"The value at ",[18,674,480],{},"; past the ends, the nearest end value",[205,677,678,683,687],{},[223,679,680],{},[18,681,682],{},"slopeAt",[223,684,685],{},[18,686,669],{},[223,688,689],{},"The derivative, value units per metre",[205,691,692,697,702],{},[223,693,694],{},[18,695,696],{},"extremes",[223,698,699],{},[18,700,701],{},"(pw) => { max: Extreme; min: Extreme } | null",[223,703,704,705],{},"The largest and smallest value, exactly, each ",[18,706,707],{},"{ x, value, side }",[205,709,710,715,720],{},[223,711,712],{},[18,713,714],{},"maxAbs",[223,716,717],{},[18,718,719],{},"(pw) => number",[223,721,722],{},"The largest absolute value",[205,724,725,730,735],{},[223,726,727],{},[18,728,729],{},"innerBreaks",[223,731,732],{},[18,733,734],{},"(pw) => number[]",[223,736,737],{},"Where pieces meet, without the two ends",[205,739,740,745,750],{},[223,741,742],{},[18,743,744],{},"isZero",[223,746,747],{},[18,748,749],{},"(pw) => boolean",[223,751,752],{},"Whether the result is zero throughout",[205,754,755,760,765],{},[223,756,757],{},[18,758,759],{},"evalPiece",[223,761,762],{},[18,763,764],{},"(piece, x) => number",[223,766,767],{},"The value of one piece",[205,769,770,775,779],{},[223,771,772],{},[18,773,774],{},"evalPieceSlope",[223,776,777],{},[18,778,764],{},[223,780,781],{},"The slope of one piece",[205,783,784,789,794],{},[223,785,786],{},[18,787,788],{},"pieceExtrema",[223,790,791],{},[18,792,793],{},"(piece) => number[]",[223,795,796],{},"Where the slope of a piece is zero, m",[205,798,799,804,809],{},[223,800,801],{},[18,802,803],{},"pieceDegree",[223,805,806],{},[18,807,808],{},"(piece) => number | null",[223,810,811,812,815],{},"The degree of a piece; ",[18,813,814],{},"null"," when it is zero",[205,817,818,823,828],{},[223,819,820],{},[18,821,822],{},"cleanPiecewise",[223,824,825],{},[18,826,827],{},"(pw, tolerance) => Piecewise",[223,829,830,831,834],{},"Drops coefficients below ",[18,832,833],{},"tolerance",", the round-off of a solved model",[205,836,837,842,847],{},[223,838,839],{},[18,840,841],{},"fitPiece",[223,843,844],{},[18,845,846],{},"(f, x0, x1, degree) => Piece",[223,848,849,850],{},"The polynomial of a degree through a function on ",[18,851,852],{},"(x0, x1)",[205,854,855,860,865],{},[223,856,857],{},[18,858,859],{},"pieceToBeziers",[223,861,862],{},[18,863,864],{},"(piece, segments?) => CubicSegment[]",[223,866,867,868,871],{},"The piece as cubic Béziers in (x, value): exact up to cubics, else ",[18,869,870],{},"segments"," of them, 4 by default",[14,873,874,875,155,878,155,880,519,883,886,887,155,890,506],{},"Types: ",[18,876,877],{},"Piece",[18,879,621],{},[18,881,882],{},"Side",[18,884,885],{},"'left' \\| 'right'","), ",[18,888,889],{},"Extreme",[18,891,892],{},"CubicSegment",[26,894,896],{"id":895},"units-and-numbers","Units and numbers",[199,898,899,909],{},[202,900,901],{},[205,902,903,905,907],{},[208,904,565],{},[208,906,568],{},[208,908,571],{},[218,910,911,926,940,957,972,987],{},[205,912,913,918,923],{},[223,914,915],{},[18,916,917],{},"KN_UNITS",[223,919,920],{},[18,921,922],{},"Units",[223,924,925],{},"kN, kNm, kN\u002Fm, m, mm, mrad, K: the default",[205,927,928,933,937],{},[223,929,930],{},[18,931,932],{},"SI_UNITS",[223,934,935],{},[18,936,922],{},[223,938,939],{},"N, N·m, N\u002Fm, m, m, rad, K",[205,941,942,947,952],{},[223,943,944],{},[18,945,946],{},"resolveUnits",[223,948,949],{},[18,950,951],{},"(units?: Partial\u003CUnits>) => Units",[223,953,954,956],{},[18,955,917],{}," with your overrides",[205,958,959,964,969],{},[223,960,961],{},[18,962,963],{},"DEFAULT_NUMBER_FORMAT",[223,965,966],{},[18,967,968],{},"Intl.NumberFormat",[223,970,971],{},"English, at most one decimal",[205,973,974,979,984],{},[223,975,976],{},[18,977,978],{},"formatNumber",[223,980,981],{},[18,982,983],{},"(value, format?) => string",[223,985,986],{},"The number with a true minus sign, never −0",[205,988,989,994,999],{},[223,990,991],{},[18,992,993],{},"formatQuantity",[223,995,996],{},[18,997,998],{},"(si, unit, format?) => string",[223,1000,1001,1004],{},[18,1002,1003],{},"\"36 kN\"",": an SI value in a unit, with a narrow no-break space",[14,1006,1007,1008,1011,1012,1015,1016,631,1019,1021,1022,1025,1026,155,1029,155,1032,155,1035,155,1038,155,1041,1044,1045,506],{},"A ",[18,1009,1010],{},"Unit"," is ",[18,1013,1014],{},"{ symbol, scale }",", display value = SI value × ",[18,1017,1018],{},"scale",[18,1020,922],{}," has one for each ",[18,1023,1024],{},"UnitKind",": ",[18,1027,1028],{},"force",[18,1030,1031],{},"moment",[18,1033,1034],{},"distributed",[18,1036,1037],{},"length",[18,1039,1040],{},"displacement",[18,1042,1043],{},"rotation"," and ",[18,1046,1047],{},"temperature",[50,1049,1051],{"className":52,"code":1050,"language":55,"meta":56,"style":56},"import { formatQuantity, KN_UNITS } from '@edubeam\u002Fplot'\n\nformatQuantity(-37500, KN_UNITS.moment) \u002F\u002F \"−37.5 kNm\"\n",[18,1052,1053,1064,1068],{"__ignoreMap":56},[60,1054,1055,1057,1060,1062],{"class":62,"line":63},[60,1056,67],{"class":66},[60,1058,1059],{"class":70}," { formatQuantity, KN_UNITS } ",[60,1061,74],{"class":66},[60,1063,91],{"class":77},[60,1065,1066],{"class":62,"line":81},[60,1067,115],{"emptyLinePlaceholder":114},[60,1069,1070,1072,1074,1077,1080,1082,1084,1087],{"class":62,"line":94},[60,1071,993],{"class":131},[60,1073,135],{"class":70},[60,1075,1076],{"class":66},"-",[60,1078,1079],{"class":124},"37500",[60,1081,155],{"class":70},[60,1083,917],{"class":124},[60,1085,1086],{"class":70},".moment) ",[60,1088,1089],{"class":107},"\u002F\u002F \"−37.5 kNm\"\n",[26,1091,1093],{"id":1092},"reading-values","Reading values",[199,1095,1096,1106],{},[202,1097,1098],{},[205,1099,1100,1102,1104],{},[208,1101,565],{},[208,1103,568],{},[208,1105,571],{},[218,1107,1108,1138,1157,1172],{},[205,1109,1110,1115,1120],{},[223,1111,1112],{},[18,1113,1114],{},"readMember",[223,1116,1117],{},[18,1118,1119],{},"(results: MemberResults, x, snap?) => { x, u, values }",[223,1121,1122,1123,1125,1126,1129,1130,1133,1134,1137],{},"N, V, M and w at ",[18,1124,480],{},", each ",[18,1127,1128],{},"{ left, right }",", and the axial displacement ",[18,1131,1132],{},"u","; snaps to a step within ",[18,1135,1136],{},"snap"," m",[205,1139,1140,1145,1150],{},[223,1141,1142],{},[18,1143,1144],{},"readoutAt",[223,1146,1147],{},[18,1148,1149],{},"(model, transform, px, py, reach) => Readout | null",[223,1151,1152,1153,1156],{},"The member nearest a screen point within ",[18,1154,1155],{},"reach"," px, and its results there",[205,1158,1159,1164,1169],{},[223,1160,1161],{},[18,1162,1163],{},"readoutMarks",[223,1165,1166],{},[18,1167,1168],{},"(model, transform, readout, shown, k, side) => ReadoutMark[]",[223,1170,1171],{},"Where the read values are drawn: each shown diagram's ordinate tip (both across a step), the point on the deformed shape",[205,1173,1174,1179,1184],{},[223,1175,1176],{},[18,1177,1178],{},"formatReadout",[223,1180,1181],{},[18,1182,1183],{},"(readout, quantity, units, format?) => string",[223,1185,1186,1189,1190,1193],{},[18,1187,1188],{},"\"M = 54 kNm\"",", or ",[18,1191,1192],{},"\"V = 13.3 → −6.7 kN\""," across a step",[14,1195,1196,1199,1200,1202,1203,1044,1206,1209,1210,155,1213,519,1216,1219,1220,519,1223,886,1226,506],{},[18,1197,1198],{},"k"," is px per SI unit for each result and ",[18,1201,634],{}," the side each diagram is drawn on, from ",[18,1204,1205],{},"diagramScales",[18,1207,1208],{},"diagramSide"," below. Types: ",[18,1211,1212],{},"Readout",[18,1214,1215],{},"ReadoutMark",[18,1217,1218],{},"{ tone, from, to }"," in px), ",[18,1221,1222],{},"ReadoutQuantity",[18,1224,1225],{},"'N' \\| 'V' \\| 'M' \\| 'w'",[18,1227,1228],{},"SidedValue",[26,1230,1232],{"id":1231},"beam-lines","Beam lines",[14,1234,1235,1236,1240],{},"The pieces of ",[400,1237,1239],{"href":1238},"\u002Fplot\u002Fdiagram-stack","DiagramStack",", for building a stacked figure of your own.",[199,1242,1243,1253],{},[202,1244,1245],{},[205,1246,1247,1249,1251],{},[208,1248,565],{},[208,1250,568],{},[208,1252,571],{},[218,1254,1255,1270,1285,1300,1315,1329,1344,1363,1378],{},[205,1256,1257,1262,1267],{},[223,1258,1259],{},[18,1260,1261],{},"beamLine",[223,1263,1264],{},[18,1265,1266],{},"(model, ids?) => BeamLine",[223,1268,1269],{},"The members as one horizontal line, left to right; throws for anything else",[205,1271,1272,1277,1282],{},[223,1273,1274],{},[18,1275,1276],{},"lineDiagram",[223,1278,1279],{},[18,1280,1281],{},"(model, line, row) => Piecewise",[223,1283,1284],{},"One result along the whole line, in the line's x",[205,1286,1287,1292,1297],{},[223,1288,1289],{},[18,1290,1291],{},"rowRange",[223,1293,1294],{},[18,1295,1296],{},"(pw) => [number, number]",[223,1298,1299],{},"The range a row is scaled to, always including zero",[205,1301,1302,1307,1312],{},[223,1303,1304],{},[18,1305,1306],{},"rowPeaks",[223,1308,1309],{},[18,1310,1311],{},"(pw) => RowPeak[]",[223,1313,1314],{},"The extremes worth writing on a row",[205,1316,1317,1322,1326],{},[223,1318,1319],{},[18,1320,1321],{},"rowBreaks",[223,1323,1324],{},[18,1325,734],{},[223,1327,1328],{},"Where the result breaks: supports, joints and point loads",[205,1330,1331,1336,1341],{},[223,1332,1333],{},[18,1334,1335],{},"rowOutline",[223,1337,1338],{},[18,1339,1340],{},"(pw, sx, sy, close) => string",[223,1342,1343],{},"SVG path data of a row's outline, given the maps from m and value to px",[205,1345,1346,1351,1356],{},[223,1347,1348],{},[18,1349,1350],{},"rowOrdinates",[223,1352,1353],{},[18,1354,1355],{},"(pw, sx, sy, spacing) => string",[223,1357,1358,1359,1362],{},"SVG path data of the hatching ordinates, ",[18,1360,1361],{},"spacing"," px apart",[205,1364,1365,1370,1375],{},[223,1366,1367],{},[18,1368,1369],{},"lineModel",[223,1371,1372],{},[18,1373,1374],{},"(model, line, omit?) => PlotModel",[223,1376,1377],{},"The model cut down to the line, optionally without one load",[205,1379,1380,1385,1390],{},[223,1381,1382],{},[18,1383,1384],{},"pointLoadAt",[223,1386,1387],{},[18,1388,1389],{},"(model, line, at) => PlotLoad | undefined",[223,1391,1392,1393],{},"The point force at line position ",[18,1394,1395],{},"at",[14,1397,874,1398,155,1401,155,1404,155,1407,506],{},[18,1399,1400],{},"BeamLine",[18,1402,1403],{},"LineMember",[18,1405,1406],{},"RowPeak",[18,1408,1409],{},"StackRow",[14,1411,1412,1413,1416,1417,155,1419,1044,1421,1423],{},"The ",[400,1414,1239],{"href":1415},"\u002Fplot\u002Fdiagram-stack#a-load-the-reader-can-drag"," page uses ",[18,1418,1261],{},[18,1420,1276],{},[18,1422,1291],{}," to keep each row's scale over every position of a moving load.",[26,1425,1427],{"id":1426},"geometry-and-supports","Geometry and supports",[199,1429,1430,1440],{},[202,1431,1432],{},[205,1433,1434,1436,1438],{},[208,1435,565],{},[208,1437,568],{},[208,1439,571],{},[218,1441,1442,1457,1472,1487,1505,1538,1553,1568],{},[205,1443,1444,1449,1454],{},[223,1445,1446],{},[18,1447,1448],{},"nodeMap",[223,1450,1451],{},[18,1452,1453],{},"(model) => ReadonlyMap\u003Cstring, PlotNode>",[223,1455,1456],{},"Nodes by id",[205,1458,1459,1464,1469],{},[223,1460,1461],{},[18,1462,1463],{},"memberFrame",[223,1465,1466],{},[18,1467,1468],{},"(model, member, nodes?) => MemberFrame",[223,1470,1471],{},"A member's start, unit tangent, unit local z and length",[205,1473,1474,1479,1484],{},[223,1475,1476],{},[18,1477,1478],{},"memberFrames",[223,1480,1481],{},[18,1482,1483],{},"(model) => Map\u003Cstring, MemberFrame>",[223,1485,1486],{},"The same for every member, by id",[205,1488,1489,1494,1499],{},[223,1490,1491],{},[18,1492,1493],{},"pointAlong",[223,1495,1496],{},[18,1497,1498],{},"(frame, at) => { x, z }",[223,1500,1501,1502,1504],{},"The point ",[18,1503,1395],{}," metres along a member",[205,1506,1507,1512,1517],{},[223,1508,1509],{},[18,1510,1511],{},"supportKind",[223,1513,1514],{},[18,1515,1516],{},"(fixity) => SupportKind",[223,1518,1519,155,1522,155,1525,155,1528,155,1531,1534,1535],{},[18,1520,1521],{},"'fixed'",[18,1523,1524],{},"'pin'",[18,1526,1527],{},"'roller'",[18,1529,1530],{},"'slider'",[18,1532,1533],{},"'rotation'"," or ",[18,1536,1537],{},"'none'",[205,1539,1540,1545,1550],{},[223,1541,1542],{},[18,1543,1544],{},"supportPlacement",[223,1546,1547],{},[18,1548,1549],{},"(model, node) => SupportPlacement",[223,1551,1552],{},"The symbol for a node and its clockwise turn, degrees",[205,1554,1555,1560,1565],{},[223,1556,1557],{},[18,1558,1559],{},"supportGlyph",[223,1561,1562],{},[18,1563,1564],{},"(kind) => readonly GlyphPart[]",[223,1566,1567],{},"The symbol's lines, in px",[205,1569,1570,1575,1580],{},[223,1571,1572],{},[18,1573,1574],{},"glyphReach",[223,1576,1577],{},[18,1578,1579],{},"(kind, rotation, x, z) => number",[223,1581,1582],{},"How far a turned symbol reaches along a direction, px",[26,1584,1586],{"id":1585},"drawing","Drawing",[14,1588,1589,1590,1593,1594,1597,1598,1601,1602,1605,1606,1044,1608,1610],{},"The drawing works in three steps. ",[18,1591,1592],{},"buildStructureScene"," turns a model into scene items: model points with offsets in screen pixels. ",[18,1595,1596],{},"fitScene"," finds the scale and offset that fit them in a box. ",[18,1599,1600],{},"resolveScene"," turns them into SVG path data, circles, and the labels that have room. ",[18,1603,1604],{},"layoutStructure"," runs all three as ",[18,1607,47],{},[18,1609,39],{}," do, so a figure of your own is laid out like theirs.",[199,1612,1613,1623],{},[202,1614,1615],{},[205,1616,1617,1619,1621],{},[208,1618,565],{},[208,1620,568],{},[208,1622,571],{},[218,1624,1625,1642,1663,1677,1694,1711,1726,1741,1756,1771,1786,1800,1814,1829,1844,1859,1874,1889,1908,1922,1937],{},[205,1626,1627,1631,1636],{},[223,1628,1629],{},[18,1630,1604],{},[223,1632,1633],{},[18,1634,1635],{},"(model, options, box, shown?, labelModes?) => StructureLayout",[223,1637,1638,1639],{},"The whole layout: fit with every label, drop crowded labels, fit again. Returns ",[18,1640,1641],{},"{ fit, items, resolved }",[205,1643,1644,1648,1653],{},[223,1645,1646],{},[18,1647,39],{},[223,1649,1650],{},[18,1651,1652],{},"(model, options?) => string",[223,1654,1655,1656,1658,1659],{},"A standalone ",[18,1657,43],{}," file: ",[400,1660,1662],{"href":1661},"#a-standalone-svg-file","above",[205,1664,1665,1669,1674],{},[223,1666,1667],{},[18,1668,1592],{},[223,1670,1671],{},[18,1672,1673],{},"(model, options: StructureSceneOptions) => SceneItem[]",[223,1675,1676],{},"The drawing of the chosen layers at a scale, px per metre",[205,1678,1679,1683,1688],{},[223,1680,1681],{},[18,1682,1596],{},[223,1684,1685],{},[18,1686,1687],{},"(items, box: FitBox) => Fit",[223,1689,1690,1691],{},"Scale and offset to fit a box ",[18,1692,1693],{},"{ width, height?, maxHeight?, padding, fontSize }",[205,1695,1696,1700,1705],{},[223,1697,1698],{},[18,1699,1600],{},[223,1701,1702],{},[18,1703,1704],{},"(items, transform, options: ResolveOptions) => ResolvedScene",[223,1706,1707,1710],{},[18,1708,1709],{},"{ paths, circles, texts }"," in px, with the labels that fit",[205,1712,1713,1718,1723],{},[223,1714,1715],{},[18,1716,1717],{},"placeLabels",[223,1719,1720],{},[18,1721,1722],{},"(items, transform, options: ResolveOptions) => Map\u003CSceneText, SceneText>",[223,1724,1725],{},"Which labels to keep, and where",[205,1727,1728,1733,1738],{},[223,1729,1730],{},[18,1731,1732],{},"alternativeResultGroups",[223,1734,1735],{},[18,1736,1737],{},"(shown) => ReadonlySet\u003Cstring>",[223,1739,1740],{},"The result layers that are shown one at a time, whose labels give way to the rest but not to each other",[205,1742,1743,1748,1753],{},[223,1744,1745],{},[18,1746,1747],{},"sceneBounds",[223,1749,1750],{},[18,1751,1752],{},"(items, scale, fontSize) => Bounds",[223,1754,1755],{},"The extent of a scene, px",[205,1757,1758,1763,1768],{},[223,1759,1760],{},[18,1761,1762],{},"project",[223,1764,1765],{},[18,1766,1767],{},"(transform, anchor) => [number, number]",[223,1769,1770],{},"A scene point on screen, px",[205,1772,1773,1778,1783],{},[223,1774,1775],{},[18,1776,1777],{},"defaultResultLayer",[223,1779,1780],{},[18,1781,1782],{},"(model) => ResultLayer | null",[223,1784,1785],{},"The result a plot shows when none is asked for",[205,1787,1788,1792,1797],{},[223,1789,1790],{},[18,1791,1205],{},[223,1793,1794],{},[18,1795,1796],{},"(model, options) => Record\u003CResultLayer, number>",[223,1798,1799],{},"px per SI unit for each result",[205,1801,1802,1806,1811],{},[223,1803,1804],{},[18,1805,1208],{},[223,1807,1808],{},[18,1809,1810],{},"(q, momentOnTensionSide) => 1 | -1",[223,1812,1813],{},"Which side of a member a positive value is drawn on",[205,1815,1816,1821,1826],{},[223,1817,1818],{},[18,1819,1820],{},"isBarStructure",[223,1822,1823],{},[18,1824,1825],{},"(model, memberResults) => boolean",[223,1827,1828],{},"Whether N is written as numbers along the bars (a truss) rather than drawn as a diagram",[205,1830,1831,1836,1841],{},[223,1832,1833],{},[18,1834,1835],{},"tipPlacements",[223,1837,1838],{},[18,1839,1840],{},"(tip, out, mode, gaps?) => TextPlacement[]",[223,1842,1843],{},"The places a value may take beyond an ordinate's tip",[205,1845,1846,1851,1856],{},[223,1847,1848],{},[18,1849,1850],{},"PLOT_LAYERS",[223,1852,1853],{},[18,1854,1855],{},"readonly PlotLayer[]",[223,1857,1858],{},"Every layer, in paint order",[205,1860,1861,1866,1871],{},[223,1862,1863],{},[18,1864,1865],{},"RESULT_LAYERS",[223,1867,1868],{},[18,1869,1870],{},"['N', 'V', 'M', 'w']",[223,1872,1873],{},"The result layers",[205,1875,1876,1881,1886],{},[223,1877,1878],{},[18,1879,1880],{},"HATCH_SPACING_PX",[223,1882,1883],{},[18,1884,1885],{},"7",[223,1887,1888],{},"The spacing of the diagram ordinates, px",[205,1890,1891,1896,1901],{},[223,1892,1893],{},[18,1894,1895],{},"DEFAULT_COLORS",[223,1897,1898],{},[18,1899,1900],{},"PlotColors",[223,1902,1903,1904],{},"The default colour of each tone, as CSS: ",[400,1905,1907],{"href":1906},"\u002Fplot\u002Ftheming","Theming",[205,1909,1910,1914,1919],{},[223,1911,1912],{},[18,1913,338],{},[223,1915,1916],{},[18,1917,1918],{},"Record\u003CTone | 'paper', string>",[223,1920,1921],{},"Plain colours for a file, the app's on white",[205,1923,1924,1929,1934],{},[223,1925,1926],{},[18,1927,1928],{},"toneVars",[223,1930,1931],{},[18,1932,1933],{},"(colors?) => Record\u003Cstring, string>",[223,1935,1936],{},"The custom properties a plot sets on its root",[205,1938,1939,1944,1949],{},[223,1940,1941],{},[18,1942,1943],{},"PLOT_CSS",[223,1945,1946],{},[18,1947,1948],{},"string",[223,1950,1951],{},"The CSS rules inlined into each plot",[14,1953,1954,1957,1958,1025,1961,1964,1965,155,1967,1970,1971,886,1973,1976,1977,1980],{},[18,1955,1956],{},"ResolveOptions"," are ",[18,1959,1960],{},"{ fontSize, viewport?, exclude?, alternativeGroups?, shields? }",[18,1962,1963],{},"shields"," are the groups whose lines keep labels off (the diagrams on show), all of them when left out. In ",[18,1966,1604],{},[18,1968,1969],{},"options.layers"," are the layers to lay out (everything that may be shown, like ",[18,1972,387],{},[18,1974,1975],{},"shown"," those on show, and ",[18,1978,1979],{},"labelModes"," the label styles to make room for.",[14,1982,874,1983,155,1986,155,1989,155,1992,155,1995,155,1998,155,2001,155,2004,155,2007,155,2010,155,2013,155,2015,155,2018,155,2021,155,2024,155,2027,155,2030,155,2033,155,2036,155,2039,155,2042,155,2045,155,2048,155,2051,2054,2055,506],{},[18,1984,1985],{},"StructureSceneOptions",[18,1987,1988],{},"StructureLayout",[18,1990,1991],{},"StructureSvgOptions",[18,1993,1994],{},"SceneItem",[18,1996,1997],{},"SceneText",[18,1999,2000],{},"TextPlacement",[18,2002,2003],{},"ResolvedScene",[18,2005,2006],{},"ResolvedPath",[18,2008,2009],{},"ResolvedText",[18,2011,2012],{},"ResolvedCircle",[18,2014,1956],{},[18,2016,2017],{},"Bounds",[18,2019,2020],{},"Anchor",[18,2022,2023],{},"Transform",[18,2025,2026],{},"Fit",[18,2028,2029],{},"FitBox",[18,2031,2032],{},"Tone",[18,2034,2035],{},"PlotLayer",[18,2037,2038],{},"ResultLayer",[18,2040,2041],{},"ResultLabelMode",[18,2043,2044],{},"ReactionLabels",[18,2046,2047],{},"SupportKind",[18,2049,2050],{},"SupportPlacement",[18,2052,2053],{},"GlyphPart",", and the model types of ",[400,2056,630],{"href":590},[2058,2059,2060],"style",{},"html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":56,"searchDepth":81,"depth":94,"links":2062},[2063,2064,2065,2066,2067,2068,2069,2070],{"id":28,"depth":81,"text":29},{"id":555,"depth":81,"text":556},{"id":614,"depth":81,"text":615},{"id":895,"depth":81,"text":896},{"id":1092,"depth":81,"text":1093},{"id":1231,"depth":81,"text":1232},{"id":1426,"depth":81,"text":1427},{"id":1585,"depth":81,"text":1586},"The functions, constants and types @edubeam\u002Fplot exports besides its components: structureSvg for SVG files, exact results, units, beam lines and layout.","md",null,{"source":2075},"site",10,"\u002Fplot\u002Ffunctions",{"title":5,"description":2071},"plot\u002Ffunctions","49x1qxSCSqK1qLyaC4nrZyy4Zk4lh2eByzZN0U5jUxE",[2082,2086,2089,2090,2092,2095,2098,2102,2107,2109],{"path":2083,"title":2084,"order":63,"group":2085},"\u002Fplot\u002Fgetting-started","Getting started","Introduction",{"path":2087,"title":47,"order":81,"group":2088},"\u002Fplot\u002Fstructure-plot","Components",{"path":1238,"title":1239,"order":94,"group":2073},{"path":1906,"title":2091,"order":111,"group":2073},"Theming and colours",{"path":2093,"title":551,"order":118,"group":2094},"\u002Fplot\u002Fexercises","Use cases",{"path":2096,"title":2097,"order":144,"group":2073},"\u002Fplot\u002Fslides","Slides and notes",{"path":2099,"title":2100,"order":2101,"group":2073},"\u002Fplot\u002Fembedding","Embedding",7,{"path":2103,"title":2104,"order":2105,"group":2106},"\u002Fplot\u002Fcomponents","Component API",8,"Reference",{"path":590,"title":630,"order":2108,"group":2073},9,{"path":2077,"title":5,"order":2076,"group":2073},1795108676458]