Ticket #6432: PolyBeamShape.mo

File PolyBeamShape.mo, 392 bytes (added by dariomangoni@…, 5 years ago)

Minimal example

Line 
1model PolyBeamShape "Visualizing a beam with fixed shape given some points"
2 parameter Modelica.SIunits.Position r_shape[3, :] = {{1.0, 0, 0}, {0, 1.0, 0}, {0, 0, 1.0}};
3
4 parameter Integer ptsCount = size(r_shape, 2);
5 parameter Real length[ptsCount - 1] = {Modelica.Math.Vectors.norm(r_shape[1:3, pt_sel + 1] - r_shape[:, pt_sel]) for pt_sel in 1:ptsCount - 1};
6end PolyBeamShape;