Adding my own Object Properties. Can I?

Hi Tim,

Try this one:
volumeMassWeightCentroids.py (7.3 KB)
It check for your unit system and in accordance to that, exports the data in the following way:

  • units: millimeters: length(mm), volume(mm3), mass(g)
  • units: centimeters: length(cm), volume(cm3), mass(g)
  • units: meters: length(m), volume(m3), mass(kg)
  • units: inches: length(in), volume(in3), mass(oz - ounce)
  • units: feets: length(ft), volume(ft3), mass(lb)

The weight is always given in Newtons, no matter what unit system you have. This could easily be changed into KiloNewtons (just additionally multiply the line 84 with “0.001”. Like so: weight = mass * massFactor * 9.81 * 0.001

I took the metal alloy material densities data from here. If you want to add more materials, you could do that by yourself. Just add the material’s name at the end or beginning of list (line 11 in the attached .py file) and its respective density to the list in the line 12.

Apart from exporting a data into .csv file, it also adds labels of object’s number’s and volume centroid points to the Rhino file: