With gears somewhat working in the Linkage program (there is a small glitch to fix still), I need to figure out what to do next. I have a list of user requests as well as a list of things that I want. I’m not sure what to do yet.

Cams

With gears working, I can use some of that code to also implement cams. Mostly, the gear fastening to links feature is what make the cams more easily implemented. I was never sure in the past how to have cams and links moving together.

I have already played around with cam shapes. My geometric constructions page has some experiments in cam design that I implemented in JavaScript.

image

Part of An Engine Valve Cam

The cam lobe in the image above is a common design using a radius for the heel, a radius for the flank, and a radius for the nose. the flank can also be straight. I didn’t draw the left flank, only the right. The shape is calculated from the center point, the radius of the heel circle, the radius of the flank, and the end of the nose. Oh, and the position of the nose point relative to the position of the flank radius center. The nose radius is computed from the other values.

I also tried Bezier curves to define the shape of the cam. This is what a toy-maker might use.

image

Bezier Cam

The Bezier cam has four curves. The start point and end point are the same point in the bottom set of curves. Adjusting the shape of the curves at the bottom adjusts the shape of the lobe above it. I would eventually use just the cam lobe alone to display and adjust the shape, but in this experiment, it was easier to transfer the curves from the normal Bezier curve representation to the polar coordinates of the cam lobe.

Parts List

One idea that I’ve been thinking of for a year or two has been to display all of the parts of a mechanism separately. This would be a display option that would disable editing of the parts and would then display each link separately in a column. I would also rotate the parts to take up the most room horizontally and the least room vertically, since they would be stacked on above the other on screen and when printed.

image

Mechanism View

image

Parts View

The parts view above is an approximation of what the program would really display. I simply copied the parts from the mechanism above that and then rotated and aligned them to look like this. Since I faked this, the colors and labels don’t match between the mechanism and parts views. I think that this would be an important addition to the program since reading full-size printouts is difficult when lots parts overlap.

The only hard part of this is deciding what part of the code will handle this. I keep track of the mechanism in one piece of code but a completely different part of the code handles the view. Things are not as separate as they should be because the size of the connector circles, and things of that sort, don’t change when zooming in and out; they are part of the display and therefore don’t actually affect the size of the mechanism. It’s all a bit tricky. This new feature would just make the code that much more complex, but might help because I could then include the dimension lines when calculating the visual size of the mechanism.

Constraints

I think that this is the correct word for this feature. Users should be able to constrain or “lock” a link so that it cannot have its size or shape changed. I have been reluctant to work on this feature because I don’t know how to deal with it in the editor; What happens if a user has a link constrained/locked and then tried to move one of the connectors? Do they all move? Can the link be rotated (which can change the size of the link because of math rounding issues), or is it really suck at one size with no alterations allowed?

And then what happens if a link is connected to another that is constrained and one of the connectors is moved? Do both links move together? I think that would be the appropriate solution. Essentially, selecting a connector or a link that is part of a constrained link makes all connectors and links that are connected to it be selected too. The selection doesn’t need to be visible, but some sort of indication would be a great idea.

Summary

Those are the ideas that I have at the moment for major changes to the Linkage program. I think that cams will be the last big change because I need to come up with a user interface for changing the cam shapes. That might mean adding an editing mode selection or adding a new window to edit one cam at a time separate form the mechanism. I could make it work like the control knob on the linear actuators, which is only visible and moveable when the actuator is selected. That is a really good modeless option for editing cam shapes.