Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
Mass Properties
JWP
Member Posts: 11 PRO
I know i can select a part and click the scales to get the mass, however, is there a way to have a variable that displays the mass of a part?
I found the featurescript Mv Measure Value, which is very handy, but it doesn't do mass.
I also found evApproximateMassProperties in the featurescript manual, but i cant work out if it gives me a way to display the mass of a particular part.
1
Comments
evApproximateMassProperties can estimate the mass of parts, but it takes a density as an input, so it probably isn't the most useful to you unless you can get the density first.
FRC Design Mentor - Team 1306 BadgerBots
did you figure out how to do this? I'm also interested
Is there even a way to get the density? I have only found the material(…) function which 'constructs a material with a name and a density' but no way to get the density.
Also, calling the getProperty(…) function for a body throws the Runtime Warning '@getProperty: Cannot get properties during feature regeneration in current context'
For my context: I want to write a feature that creates a point at the center of mass of a selection of bodies and I'm currently not seeing any way this could work.
Maybe someone from Onshape could explain what's happening and if there is a solution? Thanks in advance!
If the bodies are all known to have the same material, the solution is obvious - you just need the centroid.
Else, no, there's no built-in way to get properties during regeneration because what you specify in the UI gets applied "after" regeneration. You could sort of hack around Onshape's UI - write a feature that sets the material, plus also something like density as an attribute on the body. Note that you'll first need to clear the material you've set in the UI.
Do you intend to model using the centroid? If you just want to know where it is, the mass properties dialog should suffice.
I actually have a relevant example here. At Boss Display we produce a lot of tipping water buckets that need to fill up to a level that overbalances and dumps out the contents, then returns to neutral for the next filling cycle.
Feathering the center of mass of all of the HDPE and Acrylic and Stainless Steel components that go into the bucket constructions in relation to the center of mass of the water that fills the assembly is critical to proper operation of these things and I've seen us do it without driving the geometry via mass properties and the result was always guess and checking with prototype parts. Sometimes you'd get a bucket that doesn't tip at all, sometimes you get a bucket that tips after a single pump of the bilge and the mechanism stays upside down instead of returning to neutral.
So we're one of those cases where an anisotropic mass properties solver would come in handy for these builds, but I have yet to write the bucket solver script in featurescript.
Derek Van Allen | Engineering Consultant | Meddler