Plot-ready geometry extraction
Geo(model) (or Geo(network)) flattens a solved structure into plain arrays for plotting — node positions, displaced positions, element connectivity, and per-element force ranges with their maxima. ElementDisplacements(element, model) samples the exact deflected curve along a member.
The examples reuse the truss (a solved Warren2D) and bldg (a solved Frame) from Structure generators:
geo = Geo(truss.model) # geo.nodes, geo.disp, geo.indices, geo.P, …ModelGeo (plot-ready arrays from a solved frame model)
21 nodes, 39 elements
max |u| = 0.028357988559118953 [length] (largest nodal displacement)
max |N| = 187.49999999999994 [force] (largest axial end force)
max |M| = 0.0 [force·length] (largest bending end moment)
fields: nodes, disp, indices, P, Vy, Vz, Tx, My, Mz, areas, lengths, …ed = ElementDisplacements(bldg.model.elements[1], bldg.model; resolution = 20)
ed.basepositions .+ 100 .* ed.uglobal # 3×20 displaced curve, scaled ×1003×20 Matrix{Float64}:
0.0 -0.000536406 -0.00106384 -0.00157332 … -0.00095896 3.92842e-5
0.0 -3.58372e-6 -6.83631e-6 -9.4266e-6 0.000256371 0.000309413
0.0 0.210477 0.420954 0.631431 3.78859 3.99907