I’m about ready to turn the Beta Linkage program into the official production version. The only problem is that I still want to do more work on it. It feels incomplete if it can’t move a cam to make it meet a follower. In other words, the follower connector and its link can be positioned based on the current position of the cam but if the follower is being moved into position by some other elements then a “free floating” cam should move to match.

Curved Slider Path Sample

The curved slider path sample above is an example of the follower moving and the cam then moving to match it. If this were created using a spline as that curve, the mechanism would not work. I can create an example in the Linkage program but I can’t simulate it like the mechanism above. You can try this mechanism by opening the Samples from the File menu and selecting this by its image.

Here is what I want to work before I release a new production version of the software:

Spline Cam Moving to Match Follower

This should not be too difficult but it is the case that every variation of how a sliding connection works is handled by either small conditional pieces of code or sometimes entirely new functions. In this case, I think I will start with a copy of the function for handling a follower that is moved into position based on the position of a spline and then rework it to handle this case. Then I can see how much of the code is still exactly the same as the original case and build a single function with the code differences selected at runtime. In other words, I will create a copy of the code and modify it to see if it stays roughly similar to the unmodified version or if it is different enough to leave it as its own separate function. I prefer to have no redundancy so the goal is always to have as little source code as possible.

Here’s a good time to mention that I actually am wondering if the splines should be dotted if they are being used as cams. Or should the curved slider path, which is not its own element, be drawn as part of the link with a solid line? I think the latter makes more sense but the dotted line does server to tell the user that they can’t select the link by clicking on that curve – it’s purely a decoration.