Analyse Weight of Object

Hello everyone,

I need the object I am building to arrive to a very precise weight.

I can find the volume (Analyse/Mass Properties/Volume) and I use it to calculate the weight knowing the density of the material.

Is there in Rhino a way you can enter the density and see the result ‘live’ of your object’s weight?

Thanks!

Hi french_craftsman - In what form is the density value?

-Pascal

Hi Pascal, I meant density as mass per unit volume. In metrics (what I use) for example the density of titanium is 4,5 g per cm3. Would love to click on an object in Rhino and have the weight.

OK, so, the number you want to enter is always as gm/cm3 ? That’s what I wanted to know… It should be easy enough to make a little script.

-Pascal

Hello,

I was looking for something similar a few days ago. I found this thread that speaks of a tool called wishful mockup. Although I have yet to seek it. I did however find some valuable information on the thread. Hope it is helpful.

Other forum thread

Personally I take the cubic milimeters and translate to cm3, and then multiply by specific gravitates of the metal I plan to work in. A button would be useful surely, and especially if it was connected to the current spot price of precious metals.

Hope this is useful.

Pascal, yes g/cm3 is always and only the one I need to enter.

Thanks Cyle_Thomas, I’ll have a look at that

Cyle_Thomas, if it helps you, you can in Rhino choose which unit each time you ask to analyze the volume. So you do not have to translate from cubic millimeters to cubic centimeters.

For that you need the object unselected before to run the command.

Here a screenshot:

ps: I checked what you said about ‘wishful mockup’ and it would be perfect. but can’t find it anywhere…

See how this script works- use

 _-RunPythonScript "Full path to script file in double quotes here"

Did I do it right?

WeightFromDensity.py (1.1 KB)

-Pascal

The Script is working fine! Thanks Pascal!

OK, great.

-Pascal

Excellent. One less step! Thank you.

Thanks goes to @Helvetosaur for this script, now works in OSX. The price part is commented out New Specific gravities can be added to the dictionary. It also prints out as text and not just to command line. The finished weight can be omitted, I use it for jewellery, almost everyday.

MetalWeight2.py (2.5 KB)

I hope this helps … Randy

What do I need to open the file?

You need to install Python. Then type in Rhino the command “RunPythonScript” and then select the script you want to use.

This is the default folder for Rhino to recognize Python scripts. Place file there and then _RunPythonScript

Python is now included in OSXRhino, so no need to run the old .macrhi file.

Randy

ironpython is now included in the rhino application… so, no need to download/install anything besides the app itself in order to run python scripts in it.

Thanks Randy. With that script and the one from Pascal I’m all set

I also found that one but it’s a .rvb file and I couldn’t open it so I don’t know if it’s good or not: SolidWeight.rvb (2.8 KB)

As an .rvb, it’s a RhinoScript file, and only usable with Windows Rhino.

Very useful script! But I can not make it work. I put the weight script in the Scripts directory. What is wrong?

how are you trying to run the script? also, which script are you trying to run exactly? (there’s more than one in this thread)

from that error message, it looks like youre trying to run a script called f9464ed4c1300f5b.py which is in your scripts folder.
??