My previous post described making a link also be a gear. I realize now that this is a limitation that doesn’t need to happen. But removing that limitation causes other problems. Here is where I am with this project:
- A gear is a link, but not a link like any other; It is a link with a single connector.
- Multiple gears and regular links can be joined at a connector.
- Gears can be fastened to non-gear links. Previously, only drawing layer elements could be fastened to links. Now, a gear can also be fastened to a link. Of course, if the gear and link don’t share a connector, weird stuff will happen; Maybe I need to not let that happen.
That sounds simple enough. The first task is to finish the user interface. The file format changes are almost done, but then I need to add code in lots of places to keep users from making gears into weird things. I know that they can’t have more than one connector, so a bunch of code needs to be updated to disallow combine operations, and things like it.
The next task will be the simulation. I’ll need to add rotation information to links. Right now, I keep track of rotation of connectors, but only as far as dealing with rotating anchors. Links will now have more than 360 degrees of rotation so that I can rotate one gear (link) that it connects to.
Interestingly, if a gear is fastened to a link and the link moved before the gear, the gear should rotate however much the link rotated when it moved to a new position. That should allow for some very interesting mechanisms.
I need to add link numbers to gears, maybe next to the connector letter, or maybe to the upper-left of the connector. It’s hard to know what will look best here.