In the “production” version of the Linkage software, it is possible to select a circle and then “grab” the small round “control knob” and adjust the circle radius with the mouse. It works this way for the linear actuators too.

In the old days, only the actuators had a control knob and it was always draggable. Then I added the control knob for circles and decided that seeing those all the time was ugly. That’s when I opted to only show them when the links/connectors they belong to are selected. The one problem this presents in that a control knob and a connector cannot be selected at the same time. And a control knob and another control knob can’t be selected either. But with actuators and circles, that didn’t matter.

Now there are curves. Well, not quite yet, but I’m getting there. I only have a few minutes a day to work on it and there is a lot of work to do. With the curves, there will be many control knobs on the curve (and off) that can be selected. And there will be very good reasons for selecting more than one, such as to align them in various ways. It just won’t work well if the curve must be selected to manipulate the control knobs.

The solution will be to have two ways to manipulate the control knobs. The recently old way of seeing them when an element is selected will work fine. A new way where a button causes all control knobs in the mechanism to show up is the new better way for editing multiple knobs at the same time. The button will be a mode-change button, which I sort of hate but can’t avoid, and will simply toggle between “on” to show the knobs, and “off” to hide them all… except those that are on any elements that are selected. Multiple selections will only work when the button is “on”. Hopefully, it won’t be too confusing for users.

One of the other options I thought of and threw away was to have a third mode for clicking on elements. Right now, if you click on something, it becomes selected and you can stretch it. Click again on the same thing and it can then be rotated. This is an interface feature that has been around in various drawing programs for decades and it makes sense to do it this way. having a third click change the element into control knob mode seemed interesting but I could not figure out how the user could then drag a box around a few control knobs to select them all – the element itself is already selected and clicking elsewhere unselects it!

As for the work to do for curves, here a list of a bunch of things that I’ve done so far:

  • Right-click and select a curve to drop into the mechanism.
  • Select a curve by dragging a selection box around it (as is already done for links and connectors).
  • Select a curve by clicking on the curve. This was interesting since computing the distance from a point to the nearest point on the curve is complicated.
  • Stretch and rotate curves. Drag curves.
  • Save curves in the linkage files.
  • Read curves form the linkage file.
  • Add a dialog box to set the line width and color for a curve as well as if the curve is a closed curve or not. Do all that to the curve.
  • Draw the curve.
  • Draw the control knobs for the nodes of the curve plus the little arrows for the Bezier control points.
  • Manage the control knobs of the curve just like connectors or the control knobs on actuators and circles.

That stuff is just about all done. That is probably about 25% of the total work. I still need to:

  • Allow multiple selection of control knobs and/or connectors.
  • Make all align features work with the control knobs.
  • Allow curves to be fasted to links as drawing elements and as mechanism elements depending on how the curve will be used.
  • Allow sliding connectors to be “attached” to curves and to then snap/stick to the curve while editing.
  • Simulate moving a link to match a curve using the sliding connection.
  • Simulate moving a curve to match a fixed (or temporality fixed) sliding connector.
  • Draw a fill for curves if I can figure out how to do that with any of the rendering features available to me.

That second list is shorter but way more work! Let’s hope I can make steady progress.