I determined to make my own as I didn't locate a cable chain satisfying my needs.
I was searching for a completely parametric cable chain, capable of outcome in CSG.
The Cable Chains I discovered here were mainly just .stl Surfaces.
Additionally I needed in order to construct a whole cable chain, although not just one Chainlink.
Here you can define a vector comprising the angles towards the last chain links.
In future the will be an added choice to differing link kinds, to limit angular motion of the chain.
The Cable Chain is created though a nested vector.
There's a tupel consisting of the chain link type (at the minute there are only kind 1: limited to 45° move and sort 2: +-45° move, kind 3 creates a fine appearing shut but mechanically not always fair closed chain, sort 4 onwards is simply the same as type 3) as well as the angle of the link towards the preceding. e.g. [1,30] is a connection with a 30° angle.
These tupels are embedded in a vector. The vector:
ChainDef = [[1,0],[1,0],[1,0],[1,0],[1,0],[1,0],[1,0],[1,0],[1,0],[1,0],[1,30],[1,30],[1,30],[1,30],[1,30],[1,30],[1,0],[1,0],[1,0],[1,0],[1,0],[1,0],[1,0]];
defines the example cable chain revealed as screenshot.
ChainDef = [[1,0],[1,5],[1,15],[1,15],[1,20],[1,20],[1,20],[1,20],[1,15],[1,15],[1,10],[1,10],[1,10],[1,10],[1,10],[1,10],[1,7],[1,6],[1,5],[1,5],[1,5],[1,5],[1,5],[1,5],[1,4],[1,4],[1,4],[1,4],[1,3],[1,3],[1,0],[1,0]];
defines the variation I use in my 3D printer for the xy-axis.
The chain links aren't optimized for printing. I made this to have the ability to immediately add cable chains into my FreeCAD Printer Assembly in a solid geometry format. In the event you would like to print customized chain links, you can of course simply establish the chain length to one component and export the .stl:
ChainDef = [[1,0]];
I 'll add a link kind optimized for printing. But perhaps it might be of interest for you the best way to create parametric chains, as OpenSCAD is a practical language you CAn't use "for" loops and variants, for assessing the input signal vector, it must be done in a recursive function.
Please, do not mind the poor formatting of the source with German words in the opinions, I only immediately made this in one day, as I wanted it as a fast and dirty alternative for my 3D printer job, but I thought, perhaps it could be of interest to somebody here, so I place it here anyhow in this "beta" variation.
I am going to definitely upgrade it using a better variant that is organized and commented sometime after.
Feel free to leave an opinion for those who have some questions.
- Chance to limit permitted angle of motion
- More 3D printer friendly linktype (e.g. based on: http://www.thingiverse.com/thing:34661)
- Assess if chainprintable variation is potential
- Add Beginning and End links
- Clean up Source Code
- Enhance detection of impossible designs ("Error-Cube")