Beam Width

I’ve spend quite a few hours strolling the forum to find out how to find the width of a beam in Dynamo, there are a few topics that go into this, but nothing that provided a satisfying answer (it succeeded with rectangular beams, but not ones with more complicated cross sections like steel profiles).

After trying out many different ways, and failing many times i came up with something. Maybe by sharing this i can spare someone else a headache. :smiley:

Here’s how you can easily find the width of a beam:

  1. find the curve of an element
  2. Get the Vector of the curve
  3. Get the Geometry of the desired element and rotate it’s vector to be paralel to the y-axis of the project
  4. Create a Bounding box from the Geometry
  5. Read the width of the Bounding box

Here’s a screenshot with a working sample:

3 Likes

This is really cool, but it seems to fail if the beam is both skewed and rotated (getting a bigger value than the width due to the rotation of the beam). Can this script be elaborated to unrotate the geometry and have the top parallel to the xy plane? Looks like I will need to rotate around the y axis after these steps, but I am also going to need to get a new curve line from the rotated geometry to calculate?