Skip to content

Commit

Permalink
Add more materials
Browse files Browse the repository at this point in the history
Add more materials to calculate weight of the volume. I had use the table from https://imaterialise.helpjuice.com/materials/density
  • Loading branch information
mcanet committed Jun 13, 2018
1 parent 6642423 commit 5cb86b7
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions mesure_volume.py
Expand Up @@ -75,6 +75,34 @@ def calculateMassCM3(self,totalVolume):
totalMass = (totalVolume*1.79)
elif material in {'4','Plexiglass'}:
totalMass = (totalVolume*1.18)
elif material in {'5','Alumide'}:
totalMass = (totalVolume*1.36)
elif material in {'6','Aluminum'}:
totalMass = (totalVolume*2.68)
elif material in {'7','Brass'}:
totalMass = (totalVolume*8.6)
elif material in {'8','Bronze'}:
totalMass = (totalVolume*9.0)
elif material in {'9','Copper'}:
totalMass = (totalVolume*9.0)
elif material in {'10','Gold_14K'}:
totalMass = (totalVolume*13.6)
elif material in {'11','Gold_18K'}:
totalMass = (totalVolume*15.6)
elif material in {'12','Polyamide_MJF'}:
totalMass = (totalVolume*1.01)
elif material in {'13','Polyamide_SLS'}:
totalMass = (totalVolume*0.95)
elif material in {'14','Rubber'}:
totalMass = (totalVolume*1.2)
elif material in {'15','Silver'}:
totalMass = (totalVolume*10.26)
elif material in {'15','Steel'}:
totalMass = (totalVolume*7.86)
elif material in {'15','Titanium'}:
totalMass = (totalVolume*4.41)
elif material in {'15','Resin'}:
totalMass = (totalVolume*1.2)
return totalMass

def calculateVolume(self,infilename, unit):
Expand Down

0 comments on commit 5cb86b7

Please sign in to comment.