Modelling a gear (cogwheel)

I am trying to model a gear, but am struggling with the most basic problem.I modeled one tooth and want to distribute it to faces of a tube.That´s the theory.Should look something like this:

I took a geometry node, with a tube inside. Drawing a curve for the tooth and copied them to selected points on the tube. It works almost fine, but the teeth are not oriented correctly. So I tried to use the normal of the primitive, to attach the tooth, but all things I tried didn´t bring me to the correct result.

thank you very much for the solution - this works perfectly!I haven´t thought that such a simple task needs so much effort. As I am not the scripting guy (yet), I try to understand your attribute wrangle.

Thanks Island!the problem with gear-wheels the shape is very special. So I have to distribute the shape around the circle, perpendicular. In the beginning I had the same idea as you, but this is not working for me.construction of gear [en.wikipedia.org]

Could you just use a group range? I modified this to allow a gear with a different size to move with the larger gear. There is no code in this except time animation. If that is not close enough, you can add more than one extrude with individual transforms of extruded front to shape the teeth (rather than increase divisions in a single extrude), but to get a perfect gear, you would do better in a CAD program/solidworks anyway (where there are no polygons).https://vimeo.com/421959451 [vimeo.com]

3dclassen, my guess is that you want to use cogs of potentially different diameters…right? But with (at least somewhat) similar teeth size, to work together.

One simple option then, going this “let's avoid dealing with copy instances point attributes atm” route (ok for learning the basics, but unavoidable going further), and as shown here using polyextrude mainly, is to just set the initial number of columns relative to the tube radius. possibly multiplied by a user picked number to set the teeth “density”, so to speak.

and then “cheat” with a more simple copy and transform node. that'd be the gist of if.

I'm still at work atm, and frustratingly can't send files, but here's a screencap of what I tried in my last break, hopefully the comments might help.