Another feature that I’m “working on” in the Linkage software is mechanism synthesis. I will describe manual synthesis in the Linkage software before describing how the feature could work.

Generating a four-bar mechanism requires two or three positions defined for the middle bar (the middle bar is the bar where each end moves). The positions must include the two ends of the bar at the correct distance apart. These position definitions are used with perpendicular lines to generate the anchors of the mechanism. Here are the steps to generate a mechanism using guidelines. This is a slightly advanced set of instructions since you should already know how to drop in a guideline and use the Align menu to make perpendicular lines and things like that:

Create two positions you need for the mechanism as shown below:

Using the left-most end of each position, create a perpendicular line from the line between those points. The line should go towards where you want the anchors (anchors being the connectors that do not move).

Since this synthesis is using two positions, the anchors can be anywhere on those perpendicular lines.

Create the rest of the mechanism using the first position and the two anchors.

The last thing is to get the angle from the start of the first position to the start position of the second position. The picture below includes an angle measurement element added to show what angle is needed.

Now change the left anchor to be an input element and set the limit angle to the angle seen with the measurement element. Note that you didn’t need to add the angle measurement – simply select three connectors and you will get an angle in the dimensions text box in the toolbar. Below is the finished mechanism. This will run and the movement of the OP bar will go from this start position to the second position still visible as the blue guideline.

The way to do this with three positions is fairly simple. As before, the lengths of the three position guides must be equal to each other. The perpendiculars are created and this time, there are two perpendiculars for the start and for the endpoints of the guides. The anchors must absolutely be placed at the intersections of the perpendiculars. Here is a picture of the finished mechanism some of the guides left in:

In the above image, there are three positions for the mechanism. There are two perpendiculars for the star positions and two for the end positions. the anchors go at the intersections of the perpendiculars. The number 14 link (between a and b) moves from the start position through the middle position to the end position.

This was a little bit hard to manage manually because the guidelines in the software are all the exact same color and cannot be changed. Changing colors would make these look like links or drawing elements so I’m not sure how to improve this. It might be easy to just create the two perpendiculars for the start points and then drag the anchor into place at the intersection of the guidelines before dealing with the end points of the positions.

I want to add this as an automatic feature of the software. There are a few issues that come up and only one is at all hard to solve:

  • There needs to be a “Synthesis” option that is like “New” in the File menu.
  • The user needs to specify a two-position or three-position synthesis.
  • The program needs to drop in two or three clearly labeled lines that can be moved and rotated but their length cannot be changed.
  • There needs to be a “go do the synthesis” button somewhere.
  • For a two-position synthesis, there needs to be a reasonable way for the program to pick the anchor locations. Without a guideline for the anchor positions, there is no way for the user to change those positions later. Maybe two guidelines need to be left in for the user to use to move the anchors.

Out of the above list, the only part that requires changes to the UI code is the third item where there are special guidelines whose length cannot be changed and that have some sort of label to indicate 1st, 2nd, or 3rd position. Even that feature is easy since I just need a flag on the guidelines to indicate what they are being used for. Oh, and where do O put that “go” button? Hmmm, that would be two issues that are tricky to solve.

New Thoughts…

I think that the synthesis needs to be available when there is an existing mechanism in the window so users can synthesize multiple mechanisms that all work together. That means adding a drop-on set of synthesis position bars; those bars would all be part of a set of elements whose length changes when one changes and that all get deleted if one gets deleted. It’s time for some experimentation now!