Gear simulator


Inspired by a question about cams the other week, I've made a simple tool which can be used for simulating a range of different types of gears, cogs, cams, drives...

Hopefully this will enable some new ways of playing with mechanical systems.

Some ideas for the kinds of things it might be used to simulate:

http://www.youtube.com/watch?v=mkQ2pXkYjRM

http://www.robives.com/mechs

http://www.mekanizmalar.com/

http://www.cs.cmu.edu/~rapidproto/mechanisms/examples.html

Unlike the rest of Kangaroo, this component works with specifically 2D interactions. All input curves should be in the XY plane. The dependencies are also strictly 1-directional - the driver gear affects the follower, but not vice-versa. It is also designed to work with closed curves - some open curves may work, but the results could be unpredictable.

The inputs are:

Driver - One or more driver curves

Follower - The gear affected by the driver

Axle - The point about which the follower gear will rotate. Moving this point during simulation will also move the Follower gear, as shown in the video (the new grasshopper gumball comes in handy here)

Compound - allows you to optionally attach another curve which will move and translate along with the Follower curve, but which does not itself interact directly with the Driver (can be used for building compound gear trains)

Pull - If this boolean toggle is set to true, the Follower curve will try and always stay in contact with the Driver, useful if you are simulating cams

Reset - Sets the rotation of the Follower back to its original value

GearToy.gha

(edit 15/12/13 - This component is now included as part of the latest release of Kangaroo)

The component will show up as part of Kangaroo under the utilities tab (and in time I intend to integrate this 2D curve interaction with the main solver, to allow multidirectional dependencies)

Example files:

Gear_examples.zip

  • Cong Ye

    awesome.. it's wonderful to see the preliminary version of object collision interaction, just yesterday I was wondering how to establish domino, this shapes to be a very interesting case of object collision

  • Mateusz Zwierzycki

    So is it actually 2d rigid bodies simulation or some other magic ?

  • Daniel Piker

    Mateusz - yes, this is 2d rigid body simulation, with a few extra constraints (the interaction is one directional and only rotational, while translation is set by user input).

    This has been a sort of test case, but now I do think it should be possible to extend to something more general...

  • Mateusz Zwierzycki

    How about 3d ? Nice job with constraints, as far as I know this is the tough part.

  • Cong Ye

    Daniel, I saw in the blog you posted long time ago of tons of algorithmic questions of 3D constraints which is the most tough parts, and you suggest Blender to simulate such experiments. Any ideas of when to make it in the new kangaroo? :D, but I am very excited to see the 2d rigid simulations.

  • Daniel Piker

    Here the dependencies of the gears have to follow the same directed-acyclic-graph as standard grasshopper definitions, so they get enforced in order from upstream to downstream.

    Integrating it more fully within Kangaroo will mean enabling it to deal with things like kinematic loops, where there isn't such an ordering.

    and yes - I think in theory extending the same approach to 3d should work, but interactions between complex NURBS surfaces might pose some speed challenges (though with this 2d stuff I've been pleasantly surprised by just how fast Rhino's curve-curve intersections are).

  • Cong Ye

    Well. I am not so familiar with the exact logic in DAG, and of course interactions between NURBS objects probably would drag rhino behind, I am more curious based on current Kangaroo how to integrate meshes and Meshcollide together( in the current kangaroo, these passive collider are static in rhino). Is it possible to move these passive rigid objects? :D

  • Thomas Carriot

    I'm looking for the grasshopper gumball and I can't find it.

    It seems that the plug-in can't run without it

  • Daniel Piker

    Thomas - if you have the latest version of Grasshopper installed, the gumball is an option you can turn on from the display menu. Then you can select a point (it must be internalized not referenced, and its preview on) on the grasshopper canvas, and the gumball will appear in the rhino viewports

  • Thomas Carriot

    Thanks Daniel!

    This plug-in seems very usefull to study mechanism.

    I'm going to try to modeling bevel gears with it.

  • Luis García Lara

    Hello Daniel, 

    i'm trying to simulate a hypo-cycloid with the gear simulator component, but i can't figure out how to use it, what i'm trying to reproduce are the curves like the picture http://www2.mat.dtu.dk/people/J.Gravesen/MoineauPump/Hypo3_2.html

    def: https://www.dropbox.com/s/ou5w082wezuhylt/20140930%20Hypo.gh?dl=0

    any help will be welcome

    Thanks!