Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. 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_tamberigiulio_tamberi Member Posts: 3
edited July 2016 in Community Support
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
«1

Answers

  • andrew_troupandrew_troup Member, Mentor Posts: 1,584 ✭✭✭✭✭
    edited August 2015
    Only the time-honoured ways, at present; nothing automatic in Onshape, but it has been requested. 
    ON EDIT:
    Out of date info: apologies (and kudos to Onshape)
  • brucebartlettbrucebartlett Member, OS Professional, Mentor, User Group Leader Posts: 2,141 PRO
    To get CoG select a part or multiple parts and then click the scale icon bottom right.

    Parts must to be assigned with material to get values 
    Engineer ı Product Designer ı Onshape Consulting Partner
    Twitter: @onshapetricks  & @babart1977   
  • giulio_tamberigiulio_tamberi Member Posts: 3
    Great, thanks. It worked for me. Anyway, I'm wondering if then there's a quick way to visualize it. Any suggestion?
  • philip_thomasphilip_thomas Member, Moderator, Onshape Employees, Developers Posts: 1,381
    Great suggestion!
    Philip Thomas - Onshape
  • brucebartlettbrucebartlett Member, OS Professional, Mentor, User Group Leader Posts: 2,141 PRO
    edited August 2015
    giulio_tamberi said: Anyway, I'm wondering if then there's a quick way to visualize it. Any suggestion?
    You can get the co-ordinates you need but it would be better if you could see a point on the screen at the CoG. Even be able to insert various CoG points that rewrite as you change the model, use example would be a lifting lug which would be linked to the CoG point so it parametrically changes as the model changes. 

    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.
    Engineer ı Product Designer ı Onshape Consulting Partner
    Twitter: @onshapetricks  & @babart1977   
  • 3dcad3dcad Member, OS Professional, Mentor Posts: 2,475 PRO
    It would be very nice to see center of mass moving on screen when changing some mates offset or so.

    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. 
    //rami
  • _Ðave__Ðave_ Member, Developers Posts: 712 ✭✭✭✭
    In an assembly, you can create a mate connector at the orgin and move it per the dimensions in the mass properties dialog. You will now have a mate connector a the CoG.
  • brucebartlettbrucebartlett Member, OS Professional, Mentor, User Group Leader Posts: 2,141 PRO
    edited August 2015
    @3dcad your right it would be nice in the assy if the CoG updated as you moved the model. ATM you have to close the mass properties window and re open to get a re calculation.

    Engineer ı Product Designer ı Onshape Consulting Partner
    Twitter: @onshapetricks  & @babart1977   
  • 3dcad3dcad Member, OS Professional, Mentor Posts: 2,475 PRO
    Oh yeah - a simple mate connector with property 'CoG' (+ part selection) following coordinates automatically and updating while model updates.

    @philip_thomas This is done - what's next  B)
    //rami
  • philip_thomasphilip_thomas Member, Moderator, Onshape Employees, Developers Posts: 1,381
    3dcad said:
    Oh yeah - a simple mate connector with property 'CoG' (+ part selection) following coordinates automatically and updating while model updates.

    @philip_thomas This is done - what's next  B)
    Rami - There are some excellent ideas here - I have no doubt that you will be getting 'something' :)
    Philip Thomas - Onshape
  • brucebartlettbrucebartlett Member, OS Professional, Mentor, User Group Leader Posts: 2,141 PRO
    3dcad said:
    Oh yeah - a simple mate connector with property 'CoG' (+ part selection) following coordinates automatically and updating while model updates.

    @philip_thomas This is done - what's next  B)
    Rami - There are some excellent ideas here - I have no doubt that you will be getting 'something' :)
    I'd want the "CoG mate connector" to be visually different from the standard mate connector and be able to take measurements off it. Last time I checked I couldn't measure off mate connectors. 

    @philip_thomas , @lougallo sounds like we need a ticket raised for this if there is not already one.


    Engineer ı Product Designer ı Onshape Consulting Partner
    Twitter: @onshapetricks  & @babart1977   
  • andrew_troupandrew_troup Member, Mentor Posts: 1,584 ✭✭✭✭✭
    I agree that a mate connector is not the right sort of entity. Apart from what @brucebartlett  points out, there is nothing inherently directional about a centre of mass, so it would be inappropriate for it to have cardinal axes. A glowing sphere would suffice, for instance.

  • brucebartlettbrucebartlett Member, OS Professional, Mentor, User Group Leader Posts: 2,141 PRO
    I agree that a mate connector is not the right sort of entity. Apart from what @brucebartlett  points out, there is nothing inherently directional about a centre of mass, so it would be inappropriate for it to have cardinal axes. A glowing sphere would suffice, for instance.

    Like the point used for the origin, but with a point of difference. Pardon the pun
    Engineer ı Product Designer ı Onshape Consulting Partner
    Twitter: @onshapetricks  & @babart1977   
  • brucebartlettbrucebartlett Member, OS Professional, Mentor, User Group Leader Posts: 2,141 PRO


    A simple point would work for me rather that what is done in SW's, a mate connector could be added as needed.
    Engineer ı Product Designer ı Onshape Consulting Partner
    Twitter: @onshapetricks  & @babart1977   
  • david_mcmahondavid_mcmahon Member Posts: 35 ✭✭✭
    I submitted an improvement request for this feature awhile back. If you are interested, please vote for it here:

    https://forum.onshape.com/discussion/1267/center-of-mass-symbol#latest

  • daryntaylordaryntaylor OS Professional Posts: 31 ✭✭
     A centre of gravity symbol / Icon much like they have in Inventor would be good for me also, so it gets my vote.  
  • VierhoutVierhout Member Posts: 13 PRO
    Is there any development with a Center of Gravity symbol at the 3D and drawing environment?
    www.vierhoutengineering.nl
    Mechanical Structural Engineering
  • philip_thomasphilip_thomas Member, Moderator, Onshape Employees, Developers Posts: 1,381
    Ok, i sat at my desk this morning and thought this would be a 15 minute custom feature. Turns out there are some challenges! 
    When the FeatureScript team is back on Monday, i will bug them to expose a couple of key calls to make this happen :)
    Philip Thomas - Onshape
  • viktor_solenoidviktor_solenoid Member Posts: 12
    edited July 2017
    Hey guys,

    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

  • brucebartlettbrucebartlett Member, OS Professional, Mentor, User Group Leader Posts: 2,141 PRO
    Here's how I'd do it manually with a mate connector. 

    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.


    Engineer ı Product Designer ı Onshape Consulting Partner
    Twitter: @onshapetricks  & @babart1977   
  • viktor_solenoidviktor_solenoid Member Posts: 12
    Hi Bruce,

    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!


  • lemon1324lemon1324 Member, Developers Posts: 225 EDU
    Here's a feature that puts a mate connector at the centroid of a bunch of parts.

    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. :)



    Arul Suresh
    PhD, Mechanical Engineering, Stanford University
  • viktor_solenoidviktor_solenoid Member Posts: 12
    edited July 2017
    Hey Arul,

    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

  • brucebartlettbrucebartlett Member, OS Professional, Mentor, User Group Leader Posts: 2,141 PRO
    Thanks Arul, I added it to my toolbar, this will come in handy for part studios. We'll still need a good solution for assemblies. 
    Engineer ı Product Designer ı Onshape Consulting Partner
    Twitter: @onshapetricks  & @babart1977   
  • ilya_baranilya_baran Onshape Employees, Developers, HDM Posts: 1,215
    Please take the warning in the documentation seriously.  Using it as a building block for visualization aides and measurements is fine, but basing feature geometry off the computed center of mass can lead to real regeneration problems -- it's sometimes returned a little different every time Parasolid computes it and a part studio that regenerates just fine may stop doing so without warning.
    Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc
  • viktor_solenoidviktor_solenoid Member Posts: 12
    Hi All,
    3dcad said:
    Oh yeah - a simple mate connector with property 'CoG' (+ part selection) following coordinates automatically and updating while model updates.

    @philip_thomas This is done - what's next  B)

    Unfortunately I can't understand how to set this up? What is meant under "mate connector with property 'CoG'"?
  • lemon1324lemon1324 Member, Developers Posts: 225 EDU
    Updated to V0.2; added a warning message in the dialog that this is not really a supported use of the evApproximateCentroid, and fixed the issue with multiple part selections.

    @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.



    Arul Suresh
    PhD, Mechanical Engineering, Stanford University
  • Jake_RosenfeldJake_Rosenfeld Moderator, Onshape Employees, Developers Posts: 1,646
    @viktor_solenoid - I think @3dcad was saying that he wanted something like a mate connector that would attach to and follow the CoG (center of gravity) of the part.  This does not currently exist in Onshape, but you can use mass properties to see where the center of gravity is, or use the custom feature mentioned above to approximate it in a Part Studio.
    Jake Rosenfeld - Modeling Team
  • Nickolas_LockardNickolas_Lockard OS Professional Posts: 36 ✭✭
    edited November 2018
    Can I suggest that the scale should be present whenever you click on a part?
  • digitalcarbondigitalcarbon Member Posts: 58 PRO
    Where are we with CoG?  I want to add a hanger to my duct...
    Currently I'm just guessing.


Sign In or Register to comment.