Load of pipe on hangers

I’m looking to create a script that takes a run of pipe, calculates the weight of the pipe, weight of the water in the pipe, and evenly distributes that weight across the number of hangers sitting on that run of pipe. I can determine the total weight, but how could I get dynamo to find the number of hangers?

If you know mass per length factor,
Total length,
And max load per hanger,
Then you can calculate the max length of each section…right?

For example:
Ever 1m = 20kg
Max load = 80kg
80 / 20 = nr of hangers required
Add one (for cases just below rounding, if you please, or for start /end hangers)
=Total number of divisions (5)

If you want to add model elements, you will need to tap into the geometry of the element. Most likely with get.location, which will return a line you can query the length of.

If you want a script to automate the placement of these elements…it will be a bit difficult. There you could use a pick model elements to walk through your model for placement. (Assuming you want them to relate to a wall or a deck.)

Posting pictures of what you want to accomplish or where you are hung up helps the community understand what you re trying to accomplish.

Everyone is happy to help! :slight_smile: