The script for chain

 From:  Michael Gibson
6087.12 In reply to 6087.1 
Hi krass, many of the steps that you list are pretty well covered by existing tools.

For example to make the width, height and corner radius parts you can just use the already existing Draw curve > Rectangle command, it allows you to enter width and height there and if you enable the "Rounded corners" checkbox it will allow you to specify corner radius in that command as well, that should cover your steps #2, 3, and 4 right there.

For the thickness of the chain link, just draw a circle of your desired radius off to the side, make sure it is outside of the bounding box around the rounded rectangle. Then you can select the circle and run Construct > Sweep and select the rounded rectangle as the rail path and you will then have your link.

That's already so quick as it is with existing tools that you would only be saving a couple of seconds by having a specialized plug-in script to do it... Are you making a whole lot of chains all day long for some special purpose where saving a couple of seconds might be helpful? Because if you're only doing it here and there even though it would be a fun thing to have it would end up taking quite a bit longer to build and test the script than the amount of time that you would be saving if it's only for occasional use.

- Michael