FlorianPommerening / FingerJoints

Fusion 360 add-in for creating finger joints
128 stars 11 forks source link

feat(update): added update fingerjoint command #26

Open it-ony opened 1 year ago

it-ony commented 1 year ago

Added an update fingerjoint command

When fingerjoint are created, the tool body persists:

On execution of the update fingerjoint command all features of the timelime are iterated through. If the feature is a base feature and has the settings + references stored as an attribute of the feature, the tool bodies are recreated. As the combine features references the tool bodies, the finger joints update.

If no tool body can be created the former fingerjoint features (toolbody + 2x combines) are removed.

FlorianPommerening commented 1 year ago

Sounds like a great addition. I think a separate command is a good compromise between waiting for custom features to finally make it out of preview mode and hacking something into the existing command. I would like to do a quick review of the code before merging and cannot get to it right now, but I'll try on the weekend.

From the description, I wondered if the error case (removing the joints if the recomputation fails) is correct: shouldn't they stick around, maybe with some warning? For example, if I vary a parameter for the thickness of some parts and with a certain thickness the joint will fail, I would be surprised if I cannot reset the thickness to a valid value and get back a working joint.

it-ony commented 1 year ago

Sure, I can change it to warning instead. Fascinating is that now everything can be a user parameter and updating is easy.