Someone suggests adding the ability to lock the length of a link. After giving this some thought, I can think of a few ways to handle it. There are some complications though and I’m not sure how to handle them. First, the questions:
If someone moves a connector and it is has it’s length locked to another connector, should I let the user finish the move then move the other connector close or further to the moved connector but along the new angle?
This seems to make sense on the surface but it doesn’t seem right to leave the other connector as-is until the move is done. Having both move at the same time as if they are both selected might work better but might not be what the user intends to do.
If someone moves a connector that is locked to one other connector, should they be restricted to moving the connector in a circle around the other with the length never changing?
This one would be useful at times but how could a user move something in this case? Do they need to know what other connectors are locked to the selected connector and select them all? If they pick one that is locked to two others then it won’t be moveable!
Can connectors on different links be locked to each other?
This is easy. I can let the user do this and if they don’t want this feature, they simply don’t lock the lengths of connectors on different links. At least one question is easy to answer here.
That’s the extent of the dilemma so far. I’m sure that the first two questions will leads to others but they seem to cover all of the complicated bases right now.
Should the order of selection determine how the code behaves in regard to those first two questions?
When connectors are selected and alignment features are used, the order of selection matters. It will determine which connectors gets moved and which connectors do not get moved. I can do this with the length locking feature but the user will need to know somehow what lengths are locked and in what way. Perhaps some hint lines can be drawn when dimensions are visible. That just seems too complex compared to moving multiple links that are locked when one is selected and moved. That would make this more of a selection locking mechanism than a length locking mechanism although the code should ensure that lengths don’t change during these operations due to rounding errors.
First Draft Proposal
Okay, This is the first draft idea. The user will select multiple connectors. The last selected connector will be the base for the length locking and the distance to all others will be maintained through any operation. The locking will have an effect during drag operations so that moving or rotating any one of the links that are locked will move or rotate them all. Scaling will cause the base connector to move but the others will only move and will not change their distance from that base connector. The base connector will only really be important when lengths are tweaked to make up for rounding issues during changes to the mechanism or during the scale operation to determine what connector of a set is allowed to move first.