Grasshopper

algorithmic modeling for Rhino

I somewhere found a file called CollisionsExample.gh and some geometry, when using Rigid Body, well, is not falling:

CollisionsExample_Tetris.gh

Views: 772

Replies to This Discussion

Attachments:

Thanks for reporting this Marcus - it helped me track down a bug.

Your definition should work as it is, and now the bug is fixed it will work in the next release.

To explain a bit more:

When no input is supplied to the Plane input of any of the rigid body related components, it calculates the centroid, and uses an XY aligned plane centred on this point. This is what becomes the 6 degree of freedom node in the solver that the body stays oriented relative to. Other goals acting on the origin point of this plane will affect the whole body.

For most applications there should be no need to change from this default.

The bug was that when I was calculating the centroid in my code I had accidentally used the AreaMassProperties function, which gives a point slightly different to VolumeMassProperties which I should have used. Because of this. the gravity was being applied to a slightly separate point, not the body itself.

The fix Petras posted works because by setting the planes directly, you guarantee they are the same. This is a good workaround for now, but as I say, in the next release your original definition would work as it is.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service