Applying a mass
Applying a mass
(OP)
Hi gents,
I have a dumb part that I need to add a mass to.
As I know the weight is there a way I can add the mass to it instead of applying a material?
The part is a casting and applying a material isn't giving me the same result as I get when I weigh it.
I know I can adjust the material settings to get the same result but I wondered if there was an easier way.
thanks
Alan
I have a dumb part that I need to add a mass to.
As I know the weight is there a way I can add the mass to it instead of applying a material?
The part is a casting and applying a material isn't giving me the same result as I get when I weigh it.
I know I can adjust the material settings to get the same result but I wondered if there was an easier way.
thanks
Alan





RE: Applying a mass
This is basically the steps I used, so well as I remember it.
The part is open in its own window
Run the macro, and the macro presents an Input Box to prompt the user to type in the desired weight. Then the macro would do this:
1) Get the mass properties of the part, and get the volume of the part from that
2) Apply the necessary math to divide the mass by the volume to derive the desired density
3) Open the material library...this part I don't recall for sure about getting the library
4) Create a new material in the library with the desired density
5) Apply the material to the part. You have options here - probably most straightforward to apply to either the PartBody object or to a selected solid body. Or maybe the best is to use the Part object.
6) Close the material library without saving it
7) Pop up a message box with the measured mass and maybe other useful information for the user to confirm
I got as far as proof of concept, but then found that in reality I didn't have a use for it :) In my field we're not so concerned with the weight of things down to that level.
Sorry I don't have the actual code any more, but hope this helps point in a useful direction.
Cheers
Mark
RE: Applying a mass
Could well be a handy thing to have.
cheers
Alan
RE: Applying a mass
--Doug
RE: Applying a mass
RE: Applying a mass
I will have a look.
Thanks, alan