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.
Center of Gravity
giulio_tamberi
Member Posts: 3 ✭
Is there a way to locate the center of gravity of a part?
It would be useful to design balanced 3D models able to stand on a surface.
Thanks,
Giulio
It would be useful to design balanced 3D models able to stand on a surface.
Thanks,
Giulio
5
Answers
ON EDIT:
Out of date info: apologies (and kudos to Onshape)
Parts must to be assigned with material to get values
Twitter: @onshapetricks & @babart1977
Only way I can think to get a point at the CoG at the moment is taking the coordinates and positioning a point on a sketch.
Twitter: @onshapetricks & @babart1977
I would also like to change units directly to 'mass properties' -window rather than calculate manually. Remember the new units for current ps or assy. As a note, I can do the math - I just expect I wouldn't need to when I'm looking at computer.
Twitter: @onshapetricks & @babart1977
@philip_thomas This is done - what's next
@philip_thomas , @lougallo sounds like we need a ticket raised for this if there is not already one.
Twitter: @onshapetricks & @babart1977
Twitter: @onshapetricks & @babart1977
A simple point would work for me rather that what is done in SW's, a mate connector could be added as needed.
Twitter: @onshapetricks & @babart1977
https://forum.onshape.com/discussion/1267/center-of-mass-symbol#latest
When the FeatureScript team is back on Monday, i will bug them to expose a couple of key calls to make this happen
It seems we have a solution - "mate connector with property 'CoG' (+ part selection) following coordinates automatically and updating while model updates." , but I can't really figure out how that should work.
Can someone explain it a bit further? I don't really care how the CoG looks like in the model, but I really need one.
Here is a test part I prepared:
https://cad.onshape.com/documents/521fc76ca840f71547b4279b/w/283e190e231f346381c959c9/e/5127741b14187972d0028199
If we have a solution, can anyone point out where is the CoG of this wheel?
Thanks in advance!
Regards,
Viktor
First find the CofM off the origin
Then add a mate connector to the origin and move to the CofM coordinates found in the first step.
Twitter: @onshapetricks & @babart1977
That's what I did, but I thought there is a more elegant way where I can see the CoG moving as I edit the part (which is what I actually need).
So nothing much changed from 2015.
Manually copy-pasting all the coordinates is just too frustrating, if an exact CoG in an assembly is the main goal.
Thanks anyway!
Notes:
This is the center of mass if all selected parts have the same density; to my understanding, FS can't currently read the material/density of a part, so this is the best you can do for now, unless @philip_thomas had any luck getting more of the back-end exposed to FS calls.
Also: Onshape's documentation explicitly says that the evApproximateCentroid function shouldn't be used for modeling, so use this as a visual guide, or at your own risk.
PhD, Mechanical Engineering, Stanford University
That's WAY better!. Thank you! It works perfect for me.
Just one thing - you mentioned "all selected parts", but I get an error message invalid input selection when I select more than one part.
Can you check if you can really select multiple parts?
Thanks again
Twitter: @onshapetricks & @babart1977
Unfortunately I can't understand how to set this up? What is meant under "mate connector with property 'CoG'"?
@ilya_baran I noticed in the documentation that opMateConnector says "If the query resolves to multiple bodies, the first is taken as the owner" regarding the "owner" parameter, but that was what was causing the error here; if definition.parts had multiple elements, passing it directly as the "owner" parameter failed, but using qNthElement(definition.parts, 0) it worked and gave me a mate connector.
PhD, Mechanical Engineering, Stanford University
Currently I'm just guessing.