I was able to clone the original thread from the “History” of the one I accidentally deleted while accessing it from my mobile phone (fat finger syndrome … ):
I got inspired by @jrlazz 's bicycle chain animation and thought I’d give it a try, too.
In its current stage, it only generates kinematically correct sprockets - no chain and no movement.
The sprocket contour comprises exclusively circular arcs and is computed on-the-fly, no pre-computed shapes are involved.
Instead of many words, a few screenshots and a Codepen:
Initially I’m starting with a 5-tooth sprocket for easier illustration (the angles involved are most pronounced). Disclaimer: in serious mechanical engineering, the use of sprockets having < 19 teeth is discouraged, except for “special applications”. Fun fact: my stock DUCATI Monster 1200S comes with a sprocket having 15 teeth. That’s why my bike probably doesn’t count as a “serious” machine …
Development disclosure:
Strictly NO AI was involved in this demonstrator’s development
I completely understand but AI makes my production rate 80% faster no more googleing and brain burn reading and searching it gets you 90% there and no it will not replace me… is just a really cool tool this days that makes everything easier, I just hope we will not have a terminator scenario
From an outsider like me it looks like it is not AI helping you to build something, it is actually you helping AI to build something… And at some point AI will not need you.
Who knows at this point but personally I find it extremely useful, it makes 99%of mistakes but it gets me where I want in no time I found it most useful for complex math, that would take me a lto of the tie with Ai is instan…
What I know is that we have to flow with it otherwise we will be left behind
I re-arranged the internal loops such that the arcs are drawn in proper sequence and as part of a THREE.Shape, which I extruded into a THREE.ExtrudeGeometry().
The updated Codepen logs the corresponding contour as SVG code for further processing i.e. in Blender. Depending on the browser used, you may have to edit the console log, like stripping unwanted empty lines and/or stray double quotes. Enjoy!
I’ve added code to draw a matching roller chain link plate, so all assets for a roller chain / sprocket rendering are in one place. The SVG code for the plate is also logged to the console. ExtendedCodePen
I just made an account on here to say this - fantastic work! I am a mechanical engineer with moderate coding experience, but mainly for microcontroller stuff not anything involving graphics or geometry. Yesterday I spent like 3 hours miserably failing to get Claude to write a Fusion 360 plugin that could do this. I know its extremely ironic you wrote your code with no AI assistance and it is 1000 times better than what I managed with Opus 4.6…
Since I will only use this tool internally, I might try getting Claude to translate your program into python which is needed for Fusion. If you permit it, I would be happy to credit you and share my plugin on GitHub if I can get it working. Otherwise, I will just use this tool myself.
I’m glad you appreciate genuine human work. By publishing on Three.js, I implicitely (and now also: explicitely) waive any rights to further usage of my work. Feel free to proceed as you wish, commercial usage included. Credits would be nice, but are not required from my side.
Btw, I’m a mechanical engineer myself, and a retired one at that.