discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Bug in my code or OpenSCAD?

BC
Bob Carlson
Fri, Nov 1, 2024 11:46 PM

“what other kinds of face splines exist?” Danged if I know. I have designed a couple just out of basic need. Made them up myself. I’m not a mechanical engineer, so I’ve got no formal background to draw on.

The def of spline "A spline is a ridge or tooth on a drive shaft that matches with a groove in a mating piece and transfers torque to it, maintaining the angular correspondence between them. For instance, a gear mounted on a shaft might use a male spline on the shaft that matches the female spline on the gear."

  • Bob

On Nov 1, 2024, at 15:44, Adrian Mariano via Discuss discuss@lists.openscad.org wrote:

No, I did not say Hirth joints don't exist.  Specifically I said:  "I looked up Hirth joints online and found no indication at all that a conical hirth joint exists" [emphasis added].  And the wikipedia page sure doesn't mention such a beast.  In terms of what would be nice to have?  That would be a document with clear pictures (not those incomprehensible patent diagrams) that lays out what the parameters of the thing is (like how is the tooth angle defined?) and geometrically how it is formed.  After struggling with my implementation's failures I think I know a way to form the thing that is more direct than Bob's approach, but not sure if I can generalize it neatly to the conical case without introducing lots of complexity...and the point of my approach was supposed to be simplicity.

Bob, what other kinds of face splines exist?  That is, how are they different?

On Fri, Nov 1, 2024 at 5:54 PM John David <ebo.2112@gmail.com mailto:ebo.2112@gmail.com> wrote:

Sorry Adrian.  Your post basically said there was no such thing, and was also terse on details on what you wanted.  So, they are on the net with a slight change of spelling.  That was the entire reason for my post.

If you want me to explain how to make them in a tool-and-die shop, or how modeling a machine-tool path as a diff operator will give you the same thing, I can go over that.  I'll be backing up to travel tonight, so if you want me to code that up it will be next week sometime at the earliest.

EBo --

On Fri, Nov 1, 2024 at 4:20 PM Adrian Mariano <avm4@cornell.edu mailto:avm4@cornell.edu> wrote:

I'm not sure what you are suggesting with the "ummm" and the reference to a remarkably short and unhelpful wikipedia entry, that gives absolutely no information on how you might design one, doesn't mention the conical version, doesn't talk about the basic parameters of the joint.  Basically useless.

In ongoing fiddling with my code I've found that this is remarkably tricky to get right.  My version looked OK with lots of teeth but at low teeth count, the errors became apparent.  Bob's version works even at low teeth count, at least in terms of producing a proper mesh between the parts.

On Fri, Nov 1, 2024 at 2:59 PM John David via Discuss <discuss@lists.openscad.org mailto:discuss@lists.openscad.org> wrote:

Ummmm... Hirth Joint https://en.wikipedia.org/wiki/Hirth_joint  That said, maybe because you used "joints" threw it as they are singular.  Hope this helps.

On Fri, Nov 1, 2024 at 12:20 AM Sanjeev Prabhakar via Discuss <discuss@lists.openscad.org mailto:discuss@lists.openscad.org> wrote:

There was a little issue in the previous code i sent:
here is the corrected one:

from openscad2 import *

hirth coupling

n=20 # number of teeths
ta=60 # teeth angle
ca=10 # for straight 360/42.232 # cone angle
i_r=30 # inner radius
o_r=100 # outer radius
ch=.5 # chamfer height
l1=[[i_r,0],[o_r,0]]
l2=[ q_rot([f'z{i}'],l1)  for i in linspace(0,360,n+1)[:-1]]

l3=axis_rot_1(l1,ax1=[0,1,0],loc1=[o_r,0],theta=ca)
l3= line2length(flip(line2length(l3,(o_r-i_r)+5)),(o_r-i_r)+10)
cone1=[ q_rot([f'z{i}'],l3) for i in linspace(0,360,n)]
l2=psos(cone1,l2,[0,0,1])
l1=[l2[0][0],l2[1][0]]
d1=l_len(l1)/2/cos(d2r(ta))
l1=axis_rot_1(l1,line_as_axis(l2[0]),l2[0][0],ta)
l1=line2length(l1,d1)
l3=[l2[0][1],l2[1][1]]
d2=l_len(l3)/2/cos(d2r(ta))
l3=axis_rot_1(l3,line_as_axis(l2[0]),l2[0][1],ta)
l3=line2length(l3,d2)
l4=[l1[1],l3[1]]

a,b=l4

l4=line2length(flip(line2length(l4,(o_r-i_r)+5)),(o_r-i_r)+10)
cone2=[ q_rot([f'z{i}'],l4) for i in linspace(0,360,n)]
l3=psos(cone2,l2,[0,0,1])
l3=q_rot([f'z{360/n/2}'],l3)
s1=l_(a_([l2,l3]).transpose(1,0,2,3).reshape(n*2,2,3))
s1=s1+[s1[0]]
s1=l_(a_(s1).transpose(1,0,2))
sol1=flip(surf_base(s1,s1[0][1][2]+10))
s2=l_(a_(cone1).transpose(1,0,2))
s2=surface_offset(s2,-ch)
sol2=surf_base(s2,s1[1][0][2]-10)
sol2=sol2+[sol2[0]]
sol3=surf_base(flip(s1),s1[1][0][2]-10)
s3=q_rot(['z5'],l_(a_(cone2[:-1]).transpose(1,0,2)))
s3=surface_offset(s3,ch)
sol4=surf_base(s3,s1[0][1][2]+10)
sol4=sol4+[sol4[0]]
with open('trial.scad','w+') as f:
f.write(f'''

 translate([0,0,25])
// color([.13,.81,.37])
 difference(){{
 {swp_c(sol1)}
 {swp_c(sol2)}
 }}

difference(){{
{swp_c(sol3)}
{swp_c(sol4)}
}}

 ''')

On Fri, 1 Nov 2024 at 09:12, Jordan Brown via Discuss <discuss@lists.openscad.org mailto:discuss@lists.openscad.org> wrote:

Unfortunately, you cannot raise the cone by _conic  + _chamferHeight. The chamfer must (should?) radiate from the “origin” just like the ridge and grooves. I believe your code as written takes a constant chamfer off the teeth, but at the inner radius, that’s too much.

Indeed, I missed that subtlety. Sorry.  Your fix looks right.


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org mailto:discuss-leave@lists.openscad.org


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org mailto:discuss-leave@lists.openscad.org


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org mailto:discuss-leave@lists.openscad.org


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

“what other kinds of face splines exist?” Danged if I know. I have designed a couple just out of basic need. Made them up myself. I’m not a mechanical engineer, so I’ve got no formal background to draw on. The def of spline "A spline is a ridge or tooth on a drive shaft that matches with a groove in a mating piece and transfers torque to it, maintaining the angular correspondence between them. For instance, a gear mounted on a shaft might use a male spline on the shaft that matches the female spline on the gear." - Bob > On Nov 1, 2024, at 15:44, Adrian Mariano via Discuss <discuss@lists.openscad.org> wrote: > > No, I did not say Hirth joints don't exist. Specifically I said: "I looked up Hirth joints online and found no indication at all that a conical hirth joint exists" [emphasis added]. And the wikipedia page sure doesn't mention such a beast. In terms of what would be nice to have? That would be a document with clear pictures (not those incomprehensible patent diagrams) that lays out what the parameters of the thing is (like how is the tooth angle defined?) and geometrically how it is formed. After struggling with my implementation's failures I think I know a way to form the thing that is more direct than Bob's approach, but not sure if I can generalize it neatly to the conical case without introducing lots of complexity...and the point of my approach was supposed to be simplicity. > > Bob, what other kinds of face splines exist? That is, how are they different? > > On Fri, Nov 1, 2024 at 5:54 PM John David <ebo.2112@gmail.com <mailto:ebo.2112@gmail.com>> wrote: >> Sorry Adrian. Your post basically said there was no such thing, and was also terse on details on what you wanted. So, they are on the net with a slight change of spelling. That was the entire reason for my post. >> >> If you want me to explain how to make them in a tool-and-die shop, or how modeling a machine-tool path as a diff operator will give you the same thing, I can go over that. I'll be backing up to travel tonight, so if you want me to code that up it will be next week sometime at the earliest. >> >> EBo -- >> >> On Fri, Nov 1, 2024 at 4:20 PM Adrian Mariano <avm4@cornell.edu <mailto:avm4@cornell.edu>> wrote: >>> I'm not sure what you are suggesting with the "ummm" and the reference to a remarkably short and unhelpful wikipedia entry, that gives absolutely no information on how you might design one, doesn't mention the conical version, doesn't talk about the basic parameters of the joint. Basically useless. >>> >>> In ongoing fiddling with my code I've found that this is remarkably tricky to get right. My version looked OK with lots of teeth but at low teeth count, the errors became apparent. Bob's version works even at low teeth count, at least in terms of producing a proper mesh between the parts. >>> >>> On Fri, Nov 1, 2024 at 2:59 PM John David via Discuss <discuss@lists.openscad.org <mailto:discuss@lists.openscad.org>> wrote: >>>> Ummmm... Hirth Joint <https://en.wikipedia.org/wiki/Hirth_joint> That said, maybe because you used "joints" threw it as they are singular. Hope this helps. >>>> >>>> On Fri, Nov 1, 2024 at 12:20 AM Sanjeev Prabhakar via Discuss <discuss@lists.openscad.org <mailto:discuss@lists.openscad.org>> wrote: >>>>> There was a little issue in the previous code i sent: >>>>> here is the corrected one: >>>>> >>>>> from openscad2 import * >>>>> >>>>> # hirth coupling >>>>> n=20 # number of teeths >>>>> ta=60 # teeth angle >>>>> ca=10 # for straight 360/42.232 # cone angle >>>>> i_r=30 # inner radius >>>>> o_r=100 # outer radius >>>>> ch=.5 # chamfer height >>>>> l1=[[i_r,0],[o_r,0]] >>>>> l2=[ q_rot([f'z{i}'],l1) for i in linspace(0,360,n+1)[:-1]] >>>>> >>>>> l3=axis_rot_1(l1,ax1=[0,1,0],loc1=[o_r,0],theta=ca) >>>>> l3= line2length(flip(line2length(l3,(o_r-i_r)+5)),(o_r-i_r)+10) >>>>> cone1=[ q_rot([f'z{i}'],l3) for i in linspace(0,360,n)] >>>>> l2=psos(cone1,l2,[0,0,1]) >>>>> l1=[l2[0][0],l2[1][0]] >>>>> d1=l_len(l1)/2/cos(d2r(ta)) >>>>> l1=axis_rot_1(l1,line_as_axis(l2[0]),l2[0][0],ta) >>>>> l1=line2length(l1,d1) >>>>> l3=[l2[0][1],l2[1][1]] >>>>> d2=l_len(l3)/2/cos(d2r(ta)) >>>>> l3=axis_rot_1(l3,line_as_axis(l2[0]),l2[0][1],ta) >>>>> l3=line2length(l3,d2) >>>>> l4=[l1[1],l3[1]] >>>>> # a,b=l4 >>>>> l4=line2length(flip(line2length(l4,(o_r-i_r)+5)),(o_r-i_r)+10) >>>>> cone2=[ q_rot([f'z{i}'],l4) for i in linspace(0,360,n)] >>>>> l3=psos(cone2,l2,[0,0,1]) >>>>> l3=q_rot([f'z{360/n/2}'],l3) >>>>> s1=l_(a_([l2,l3]).transpose(1,0,2,3).reshape(n*2,2,3)) >>>>> s1=s1+[s1[0]] >>>>> s1=l_(a_(s1).transpose(1,0,2)) >>>>> sol1=flip(surf_base(s1,s1[0][1][2]+10)) >>>>> s2=l_(a_(cone1).transpose(1,0,2)) >>>>> s2=surface_offset(s2,-ch) >>>>> sol2=surf_base(s2,s1[1][0][2]-10) >>>>> sol2=sol2+[sol2[0]] >>>>> sol3=surf_base(flip(s1),s1[1][0][2]-10) >>>>> s3=q_rot(['z5'],l_(a_(cone2[:-1]).transpose(1,0,2))) >>>>> s3=surface_offset(s3,ch) >>>>> sol4=surf_base(s3,s1[0][1][2]+10) >>>>> sol4=sol4+[sol4[0]] >>>>> with open('trial.scad','w+') as f: >>>>> f.write(f''' >>>>> >>>>> translate([0,0,25]) >>>>> // color([.13,.81,.37]) >>>>> difference(){{ >>>>> {swp_c(sol1)} >>>>> {swp_c(sol2)} >>>>> }} >>>>> difference(){{ >>>>> {swp_c(sol3)} >>>>> {swp_c(sol4)} >>>>> }} >>>>> >>>>> ''') >>>>> >>>>> On Fri, 1 Nov 2024 at 09:12, Jordan Brown via Discuss <discuss@lists.openscad.org <mailto:discuss@lists.openscad.org>> wrote: >>>>>> >>>>>> >>>>>> > Unfortunately, you cannot raise the cone by _conic + _chamferHeight. The chamfer must (should?) radiate from the “origin” just like the ridge and grooves. I believe your code as written takes a constant chamfer off the teeth, but at the inner radius, that’s too much. >>>>>> >>>>>> Indeed, I missed that subtlety. Sorry. Your fix looks right. >>>>>> _______________________________________________ >>>>>> OpenSCAD mailing list >>>>>> To unsubscribe send an email to discuss-leave@lists.openscad.org <mailto:discuss-leave@lists.openscad.org> >>>>> _______________________________________________ >>>>> OpenSCAD mailing list >>>>> To unsubscribe send an email to discuss-leave@lists.openscad.org <mailto:discuss-leave@lists.openscad.org> >>>> _______________________________________________ >>>> OpenSCAD mailing list >>>> To unsubscribe send an email to discuss-leave@lists.openscad.org <mailto:discuss-leave@lists.openscad.org> > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
M
mikeonenine@web.de
Sat, Nov 2, 2024 12:50 AM

Bob Carlson wrote:

“what other kinds of face splines exist?” Danged if I know. I have designed a couple just out of basic need. Made them up myself. I’m not a mechanical engineer, so I’ve got no formal background to draw on.

The def of spline "A spline is a ridge or tooth on a drive shaft that matches with a groove in a mating piece and transfers torque to it, maintaining the angular correspondence between them. For instance, a gear mounted on a shaft might use a male spline on the shaft that matches the female spline on the gear."

  • Bob

Gratified to see that someone has clicked on my link (further up) to splines on Wikipedia.

I think you meant to say, there are lots of other XXXX splines, the Hirth is just one kind. (XXXX = word deleted). Though strictly speaking, a spline is just a spline; what counts is the way multiple splines are arranged and where.

In most cases, splines run along a shaft, but sometimes the end (the face) of a shaft, or a flange on the end of a shaft can have radial splines, for the purpose of transmitting torque. Your joint is something of an inbetweenie: radial splines with longitudinal leanings.

Bob Carlson wrote: > “what other kinds of face splines exist?” Danged if I know. I have designed a couple just out of basic need. Made them up myself. I’m not a mechanical engineer, so I’ve got no formal background to draw on. > > The def of spline "A spline is a ridge or tooth on a drive shaft that matches with a groove in a mating piece and transfers torque to it, maintaining the angular correspondence between them. For instance, a gear mounted on a shaft might use a male spline on the shaft that matches the female spline on the gear." > > * Bob Gratified to see that someone has clicked on my link (further up) to [splines](https://en.wikipedia.org/wiki/Spline_(mechanical) "splines") on Wikipedia. I think you meant to say, there are lots of other XXXX splines, the Hirth is just one kind. (XXXX = word deleted). Though strictly speaking, a spline is just a spline; what counts is the way multiple splines are arranged and where. In most cases, splines run along a shaft, but sometimes the end (the *face*) of a shaft, or a flange on the end of a shaft can have radial splines, for the purpose of transmitting torque. Your joint is something of an inbetweenie: radial splines with longitudinal leanings.
AM
Adrian Mariano
Sat, Nov 2, 2024 1:21 AM

I'm a bit confused.  Bob wrote "There are lots of other face splines, a
hirth is just one kind." but when I asked about them said he had no idea.
The wikipedia on splines doesn't appear to mention face splines, though
without any pictures of the types...maybe I missed something.  Whether
other face splines exist could affect how we name functions in BOSL2.

On Fri, Nov 1, 2024 at 8:51 PM Caddiy via Discuss <
discuss@lists.openscad.org> wrote:

Bob Carlson wrote:

“what other kinds of face splines exist?” Danged if I know. I have
designed a couple just out of basic need. Made them up myself. I’m not a
mechanical engineer, so I’ve got no formal background to draw on.

The def of spline "A spline is a ridge or tooth on a drive shaft that
matches with a groove in a mating piece and transfers torque to it,
maintaining the angular correspondence between them. For instance, a gear
mounted on a shaft might use a male spline on the shaft that matches the
female spline on the gear."

-

Bob

Gratified to see that someone has clicked on my link (further up) to
splines https://en.wikipedia.org/wiki/Spline_(mechanical) on Wikipedia.

I think you meant to say, there are lots of other XXXX splines, the Hirth
is just one kind. (XXXX = word deleted). Though strictly speaking, a spline
is just a spline; what counts is the way multiple splines are arranged and
where.

In most cases, splines run along a shaft, but sometimes the end (the
face) of a shaft, or a flange on the end of a shaft can have radial
splines, for the purpose of transmitting torque. Your joint is something of
an inbetweenie: radial splines with longitudinal leanings.


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

I'm a bit confused. Bob wrote "There are lots of other face splines, a hirth is just one kind." but when I asked about them said he had no idea. The wikipedia on splines doesn't appear to mention face splines, though without any pictures of the types...maybe I missed something. Whether other face splines exist could affect how we name functions in BOSL2. On Fri, Nov 1, 2024 at 8:51 PM Caddiy via Discuss < discuss@lists.openscad.org> wrote: > Bob Carlson wrote: > > “what other kinds of face splines exist?” Danged if I know. I have > designed a couple just out of basic need. Made them up myself. I’m not a > mechanical engineer, so I’ve got no formal background to draw on. > > The def of spline "A spline is a ridge or tooth on a drive shaft that > matches with a groove in a mating piece and transfers torque to it, > maintaining the angular correspondence between them. For instance, a gear > mounted on a shaft might use a male spline on the shaft that matches the > female spline on the gear." > > - > > Bob > > Gratified to see that someone has clicked on my link (further up) to > splines <https://en.wikipedia.org/wiki/Spline_(mechanical)> on Wikipedia. > > I think you meant to say, there are lots of other XXXX splines, the Hirth > is just one kind. (XXXX = word deleted). Though strictly speaking, a spline > is just a spline; what counts is the way multiple splines are arranged and > where. > > In most cases, splines run along a shaft, but sometimes the end (the > *face*) of a shaft, or a flange on the end of a shaft can have radial > splines, for the purpose of transmitting torque. Your joint is something of > an inbetweenie: radial splines with longitudinal leanings. > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
M
mikeonenine@web.de
Sat, Nov 2, 2024 1:23 AM

Adrian Mariano wrote:

not those incomprehensible patent diagrams

The patent I posted does show clearly that the ridges and the bottom of the grooves have a constant width and do not taper towards the centre. Only the flanks of the splines will taper towards the centre. That is because the tool that cuts the grooves cannot alter its width, and then the ridges have to be skimmed to fit .

3D printing works differently. But someone might want to print a coupling half that mates properly with a machined coupling half.

Voith purchased the Hirth patent and a subsidiary in Switzerland now manufactures the couplings. The catalogue offers standard sizes, though there doesn’t seem to be any mention of national or international standards. Here too, diagrams show that the ridges and the bottom of the grooves have a constant width, though the ridges are flat instead of rounded.

Adrian Mariano wrote: > not those incomprehensible patent diagrams The patent I posted does show clearly that the ridges and the bottom of the grooves have a constant width and do not taper towards the centre. Only the flanks of the splines will taper towards the centre. That is because the tool that cuts the grooves cannot alter its width, and then the ridges have to be skimmed to fit . 3D printing works differently. But someone might want to print a coupling half that mates properly with a machined coupling half. Voith purchased the Hirth patent and a subsidiary in Switzerland now manufactures the couplings. The [catalogue](https://cdn.prod.website-files.com/617936d36593ad9e94674a6d/6218ebeaad9094e1eee4ad4a_Katalog%20Voith%20Hirth-Stirnverzahnung%2C%20Normringe%20und%20Zahnringe.pdf "catalogue") offers standard sizes, though there doesn’t seem to be any mention of national or international standards. Here too, diagrams show that the ridges and the bottom of the grooves have a constant width, though the ridges are flat instead of rounded.
M
mikeonenine@web.de
Sat, Nov 2, 2024 1:39 AM

Adrian Mariano wrote:

not those incomprehensible patent diagrams

The patent I posted does show clearly that the ridges and the bottom of the grooves have a constant width and do not taper towards the centre. Only the flanks of the splines will taper towards the centre. That is because the tool that cuts the grooves cannot alter its width, and then the ridges have to be skimmed to fit .

3D printing works differently. But someone might want to print a coupling half that mates properly with a machined coupling half.

Voith purchased the Hirth patent and a subsidiary in Switzerland now manufactures the couplings. The catalogue offers standard sizes, though there doesn’t seem to be any mention of national or international standards. Here too, diagrams show that the ridges and the bottom of the grooves have a constant width, though the ridges are flat instead of rounded.

Click on “catalogue” above to view the catalogue!

mikeonenine@web.de wrote: > Adrian Mariano wrote: > > > not those incomprehensible patent diagrams > > The patent I posted does show clearly that the ridges and the bottom of the grooves have a constant width and do not taper towards the centre. Only the flanks of the splines will taper towards the centre. That is because the tool that cuts the grooves cannot alter its width, and then the ridges have to be skimmed to fit . > > 3D printing works differently. But someone might want to print a coupling half that mates properly with a machined coupling half. > > Voith purchased the Hirth patent and a subsidiary in Switzerland now manufactures the couplings. The [catalogue](https://cdn.prod.website-files.com/617936d36593ad9e94674a6d/6218ebeaad9094e1eee4ad4a_Katalog%20Voith%20Hirth-Stirnverzahnung%2C%20Normringe%20und%20Zahnringe.pdf "catalogue") offers standard sizes, though there doesn’t seem to be any mention of national or international standards. Here too, diagrams show that the ridges and the bottom of the grooves have a constant width, though the ridges are flat instead of rounded. Click on “catalogue” above to view the catalogue!
SP
Sanjeev Prabhakar
Sat, Nov 2, 2024 2:25 AM

you can also have teeths like this, which is normally used in ratchets, if
you put a spring on top

[image: Screenshot 2024-11-02 at 7.51.21 AM.png]

On Sat, 2 Nov 2024 at 07:10, Caddiy via Discuss discuss@lists.openscad.org
wrote:

mikeonenine@web.de wrote:

Adrian Mariano wrote:

not those incomprehensible patent diagrams

The patent I posted does show clearly that the ridges and the bottom of
the grooves have a constant width and do not taper towards the centre. Only
the flanks of the splines will taper towards the centre. That is because
the tool that cuts the grooves cannot alter its width, and then the ridges
have to be skimmed to fit .

3D printing works differently. But someone might want to print a coupling
half that mates properly with a machined coupling half.

Voith purchased the Hirth patent and a subsidiary in Switzerland now
manufactures the couplings. The catalogue
https://cdn.prod.website-files.com/617936d36593ad9e94674a6d/6218ebeaad9094e1eee4ad4a_Katalog%20Voith%20Hirth-Stirnverzahnung%2C%20Normringe%20und%20Zahnringe.pdf
offers standard sizes, though there doesn’t seem to be any mention of
national or international standards. Here too, diagrams show that the
ridges and the bottom of the grooves have a constant width, though the
ridges are flat instead of rounded.

Click on “catalogue” above to view the catalogue!


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

you can also have teeths like this, which is normally used in ratchets, if you put a spring on top [image: Screenshot 2024-11-02 at 7.51.21 AM.png] On Sat, 2 Nov 2024 at 07:10, Caddiy via Discuss <discuss@lists.openscad.org> wrote: > mikeonenine@web.de wrote: > > Adrian Mariano wrote: > > not those incomprehensible patent diagrams > > The patent I posted does show clearly that the ridges and the bottom of > the grooves have a constant width and do not taper towards the centre. Only > the flanks of the splines will taper towards the centre. That is because > the tool that cuts the grooves cannot alter its width, and then the ridges > have to be skimmed to fit . > > 3D printing works differently. But someone might want to print a coupling > half that mates properly with a machined coupling half. > > Voith purchased the Hirth patent and a subsidiary in Switzerland now > manufactures the couplings. The catalogue > <https://cdn.prod.website-files.com/617936d36593ad9e94674a6d/6218ebeaad9094e1eee4ad4a_Katalog%20Voith%20Hirth-Stirnverzahnung%2C%20Normringe%20und%20Zahnringe.pdf> > offers standard sizes, though there doesn’t seem to be any mention of > national or international standards. Here too, diagrams show that the > ridges and the bottom of the grooves have a constant width, though the > ridges are flat instead of rounded. > > Click on “catalogue” above to view the catalogue! > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
M
mikeonenine@web.de
Sat, Nov 2, 2024 3:13 AM

Sanjeev Prabhakar wrote:

you can also have teeths like this, which is normally used in ratchets, if
you put a spring on top

[image: Screenshot 2024-11-02 at 7.51.21 AM.png]

On Sat, 2 Nov 2024 at 07:10, Caddiy via Discuss discuss@lists.openscad.org
wrote:

mikeonenine@web.de wrote:

Adrian Mariano wrote:

not those incomprehensible patent diagrams

The patent I posted does show clearly that the ridges and the bottom of
the grooves have a constant width and do not taper towards the centre. Only
the flanks of the splines will taper towards the centre. That is because
the tool that cuts the grooves cannot alter its width, and then the ridges
have to be skimmed to fit .

3D printing works differently. But someone might want to print a coupling
half that mates properly with a machined coupling half.

Voith purchased the Hirth patent and a subsidiary in Switzerland now
manufactures the couplings. The catalogue
https://cdn.prod.website-files.com/617936d36593ad9e94674a6d/6218ebeaad9094e1eee4ad4a_Katalog Voith Hirth-Stirnverzahnung%2C Normringe und Zahnringe.pdf
offers standard sizes, though there doesn’t seem to be any mention of
national or international standards. Here too, diagrams show that the
ridges and the bottom of the grooves have a constant width, though the
ridges are flat instead of rounded.

Click on “catalogue” above to view the catalogue!


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

Really wierd!

There seemed to be a negative gap between the two halves, i.e. the splines overlapped slightly.

I also noticed small gaps around the top and bottom edges where the joint halves are supposed to meet the filler-cones and realised that was because the concave side of the joint halves was not conical but polyhedral, made up of the flat undersides of n splines. So the circular cones didn’t fit the joint halves properly. So I replaced the cones with polyhedral cones for a better fit, which eliminated the gaps.

At the same time, the two halves of the joint now fit together properly with zero overlap! What does that have to do with the cones?

Talk about swatting two flies with one stroke! (Let’s not throw stones at birds)

Sanjeev Prabhakar wrote: > you can also have teeths like this, which is normally used in ratchets, if > you put a spring on top > > \[image: Screenshot 2024-11-02 at 7.51.21 AM.png\] > > On Sat, 2 Nov 2024 at 07:10, Caddiy via Discuss [discuss@lists.openscad.org](mailto:discuss@lists.openscad.org) > wrote: > > > mikeonenine@web.de wrote: > > > > Adrian Mariano wrote: > > > > not those incomprehensible patent diagrams > > > > The patent I posted does show clearly that the ridges and the bottom of > > the grooves have a constant width and do not taper towards the centre. Only > > the flanks of the splines will taper towards the centre. That is because > > the tool that cuts the grooves cannot alter its width, and then the ridges > > have to be skimmed to fit . > > > > 3D printing works differently. But someone might want to print a coupling > > half that mates properly with a machined coupling half. > > > > Voith purchased the Hirth patent and a subsidiary in Switzerland now > > manufactures the couplings. The catalogue > > [https://cdn.prod.website-files.com/617936d36593ad9e94674a6d/6218ebeaad9094e1eee4ad4a_Katalog Voith Hirth-Stirnverzahnung%2C Normringe und Zahnringe.pdf](https://cdn.prod.website-files.com/617936d36593ad9e94674a6d/6218ebeaad9094e1eee4ad4a_Katalog%20Voith%20Hirth-Stirnverzahnung%2C%20Normringe%20und%20Zahnringe.pdf) > > offers standard sizes, though there doesn’t seem to be any mention of > > national or international standards. Here too, diagrams show that the > > ridges and the bottom of the grooves have a constant width, though the > > ridges are flat instead of rounded. > > > > Click on “catalogue” above to view the catalogue! > > > > --- > > > > OpenSCAD mailing list > > To unsubscribe send an email to discuss-leave@lists.openscad.org Really wierd! There seemed to be a negative gap between the two halves, i.e. the splines overlapped slightly. I also noticed small gaps around the top and bottom edges where the joint halves are supposed to meet the filler-cones and realised that was because the concave side of the joint halves was not conical but polyhedral, made up of the flat undersides of n splines. So the circular cones didn’t fit the joint halves properly. So I replaced the cones with polyhedral cones for a better fit, which eliminated the gaps. At the same time, the two halves of the joint now fit together properly with zero overlap! What does that have to do with the cones? Talk about swatting two flies with one stroke! (Let’s not throw stones at birds)
JD
John David
Sat, Nov 2, 2024 5:47 AM

Sorry, Adrian, I misread your post. It looks like others have been able to
help sort you out.  It was not my intent to be offensive.

As a note, if you have links to the paper that went through the math, and
also the relevant patent numbers, others would be able to look at them as
well.

On Fri, Nov 1, 2024 at 11:14 PM Caddiy via Discuss <
discuss@lists.openscad.org> wrote:

Sanjeev Prabhakar wrote:

you can also have teeths like this, which is normally used in ratchets, if
you put a spring on top

[image: Screenshot 2024-11-02 at 7.51.21 AM.png]

On Sat, 2 Nov 2024 at 07:10, Caddiy via Discuss discuss@lists.openscad.org
wrote:

mikeonenine@web.de wrote:

Adrian Mariano wrote:

not those incomprehensible patent diagrams

The patent I posted does show clearly that the ridges and the bottom of
the grooves have a constant width and do not taper towards the centre. Only
the flanks of the splines will taper towards the centre. That is because
the tool that cuts the grooves cannot alter its width, and then the ridges
have to be skimmed to fit .

3D printing works differently. But someone might want to print a coupling
half that mates properly with a machined coupling half.

Voith purchased the Hirth patent and a subsidiary in Switzerland now
manufactures the couplings. The catalogue https://cdn.prod.website-files.com/617936d36593ad9e94674a6d/6218ebeaad9094e1eee4ad4a_Katalog
Voith Hirth-Stirnverzahnung%2C Normringe und Zahnringe.pdf
https://cdn.prod.website-files.com/617936d36593ad9e94674a6d/6218ebeaad9094e1eee4ad4a_Katalog%20Voith%20Hirth-Stirnverzahnung%2C%20Normringe%20und%20Zahnringe.pdf
offers standard sizes, though there doesn’t seem to be any mention of
national or international standards. Here too, diagrams show that the
ridges and the bottom of the grooves have a constant width, though the
ridges are flat instead of rounded.

Click on “catalogue” above to view the catalogue!

OpenSCAD mailing list To unsubscribe send an email to
discuss-leave@lists.openscad.org

Really wierd!

There seemed to be a negative gap between the two halves, i.e. the splines
overlapped slightly.

I also noticed small gaps around the top and bottom edges where the joint
halves are supposed to meet the filler-cones and realised that was because
the concave side of the joint halves was not conical but polyhedral, made
up of the flat undersides of n splines. So the circular cones didn’t fit
the joint halves properly. So I replaced the cones with polyhedral cones
for a better fit, which eliminated the gaps.

At the same time, the two halves of the joint now fit together properly
with zero overlap! What does that have to do with the cones?

Talk about swatting two flies with one stroke! (Let’s not throw stones at
birds)


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

Sorry, Adrian, I misread your post. It looks like others have been able to help sort you out. It was not my intent to be offensive. As a note, if you have links to the paper that went through the math, and also the relevant patent numbers, others would be able to look at them as well. On Fri, Nov 1, 2024 at 11:14 PM Caddiy via Discuss < discuss@lists.openscad.org> wrote: > Sanjeev Prabhakar wrote: > > you can also have teeths like this, which is normally used in ratchets, if > you put a spring on top > > [image: Screenshot 2024-11-02 at 7.51.21 AM.png] > > On Sat, 2 Nov 2024 at 07:10, Caddiy via Discuss discuss@lists.openscad.org > wrote: > > mikeonenine@web.de wrote: > > Adrian Mariano wrote: > > not those incomprehensible patent diagrams > > The patent I posted does show clearly that the ridges and the bottom of > the grooves have a constant width and do not taper towards the centre. Only > the flanks of the splines will taper towards the centre. That is because > the tool that cuts the grooves cannot alter its width, and then the ridges > have to be skimmed to fit . > > 3D printing works differently. But someone might want to print a coupling > half that mates properly with a machined coupling half. > > Voith purchased the Hirth patent and a subsidiary in Switzerland now > manufactures the couplings. The catalogue https://cdn.prod.website-files.com/617936d36593ad9e94674a6d/6218ebeaad9094e1eee4ad4a_Katalog > Voith Hirth-Stirnverzahnung%2C Normringe und Zahnringe.pdf > <https://cdn.prod.website-files.com/617936d36593ad9e94674a6d/6218ebeaad9094e1eee4ad4a_Katalog%20Voith%20Hirth-Stirnverzahnung%2C%20Normringe%20und%20Zahnringe.pdf> > offers standard sizes, though there doesn’t seem to be any mention of > national or international standards. Here too, diagrams show that the > ridges and the bottom of the grooves have a constant width, though the > ridges are flat instead of rounded. > > Click on “catalogue” above to view the catalogue! > ------------------------------ > > OpenSCAD mailing list To unsubscribe send an email to > discuss-leave@lists.openscad.org > > Really wierd! > > There seemed to be a negative gap between the two halves, i.e. the splines > overlapped slightly. > > I also noticed small gaps around the top and bottom edges where the joint > halves are supposed to meet the filler-cones and realised that was because > the concave side of the joint halves was not conical but polyhedral, made > up of the flat undersides of n splines. So the circular cones didn’t fit > the joint halves properly. So I replaced the cones with polyhedral cones > for a better fit, which eliminated the gaps. > > At the same time, the two halves of the joint now fit together properly > with zero overlap! What does that have to do with the cones? > > Talk about swatting two flies with one stroke! (Let’s not throw stones at > birds) > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
RW
Raymond West
Sat, Nov 2, 2024 1:09 PM

There are many possible face spline designs, each tailored to specific
needs, and they don’t necessarily need to achieve a precise fit. In
fact, the requirements for a Hirth Joint are often quite different from
those of gear wheels. The version I coded is among the easiest to
machine and would likely be the go-to choice in real-world applications
due to its simplicity. The self-aligning, identical halves are practical
for many uses. While variations do exist—especially for assemblies
needing occasional adjustments—they remain straightforward and
versatile. My design does not require the use of BOSL2, and if It needed
rounded crests and valleys, it would merely require a more complicated
profile for the 'wedge'. It would then tend towards the design of a
curvic coupling.

In many cases, rounded crests and valleys are dictated by manufacturing
or assembly needs rather than any mathematical ideal, as demonstrated by
designs found in clutch mechanisms.

It seems the thread has become a bit tangled between practical
application and theoretical ideals, with too much focus on terminology.
For instance, while we openscadders might refer to a "cone," the meaning
shifts based on context. To a potter or a road worker, a "cone"
signifies something quite different. Just as “horse” refers to a
four-legged animal but doesn’t define all four-legged animals, our
approach to Hirth Joints doesn’t need to be over-complicated.

On 02/11/2024 01:21, Adrian Mariano via Discuss wrote:

I'm a bit confused.  Bob wrote "There are lots of other face splines,
a hirth is just one kind." but when I asked about them said he had no
idea.  The wikipedia on splines doesn't appear to mention face
splines, though without any pictures of the types...maybe I missed
something.   Whether other face splines exist could affect how we name
functions in BOSL2.

On Fri, Nov 1, 2024 at 8:51 PM Caddiy via Discuss
discuss@lists.openscad.org wrote:

 Bob Carlson wrote:

     “what other kinds of face splines exist?” Danged if I know. I
     have designed a couple just out of basic need. Made them up
     myself. I’m not a mechanical engineer, so I’ve got no formal
     background to draw on.

     The def of spline "A spline is a ridge or tooth on a drive
     shaft that matches with a groove in a mating piece and
     transfers torque to it, maintaining the angular correspondence
     between them. For instance, a gear mounted on a shaft might
     use a male spline on the shaft that matches the female spline
     on the gear."

      *

         Bob

 Gratified to see that someone has clicked on my link (further up)
 to splines <https://en.wikipedia.org/wiki/Spline_(mechanical)> on
 Wikipedia.

 I think you meant to say, there are lots of other XXXX splines,
 the Hirth is just one kind. (XXXX = word deleted). Though strictly
 speaking, a spline is just a spline; what counts is the way
 multiple splines are arranged and where.

 In most cases, splines run along a shaft, but sometimes the end
 (the /face/) of a shaft, or a flange on the end of a shaft can
 have radial splines, for the purpose of transmitting torque. Your
 joint is something of an inbetweenie: radial splines with
 longitudinal leanings.


 _______________________________________________
 OpenSCAD mailing list
 To unsubscribe send an email to discuss-leave@lists.openscad.org

OpenSCAD mailing list
To unsubscribe send an email todiscuss-leave@lists.openscad.org

There are many possible face spline designs, each tailored to specific needs, and they don’t necessarily need to achieve a precise fit. In fact, the requirements for a Hirth Joint are often quite different from those of gear wheels. The version I coded is among the easiest to machine and would likely be the go-to choice in real-world applications due to its simplicity. The self-aligning, identical halves are practical for many uses. While variations do exist—especially for assemblies needing occasional adjustments—they remain straightforward and versatile. My design does not require the use of BOSL2, and if It needed rounded crests and valleys, it would merely require a more complicated profile for the 'wedge'. It would then tend towards the design of a curvic coupling. In many cases, rounded crests and valleys are dictated by manufacturing or assembly needs rather than any mathematical ideal, as demonstrated by designs found in clutch mechanisms. It seems the thread has become a bit tangled between practical application and theoretical ideals, with too much focus on terminology. For instance, while we openscadders might refer to a "cone," the meaning shifts based on context. To a potter or a road worker, a "cone" signifies something quite different. Just as “horse” refers to a four-legged animal but doesn’t define all four-legged animals, our approach to Hirth Joints doesn’t need to be over-complicated. On 02/11/2024 01:21, Adrian Mariano via Discuss wrote: > I'm a bit confused.  Bob wrote "There are lots of other face splines, > a hirth is just one kind." but when I asked about them said he had no > idea.  The wikipedia on splines doesn't appear to mention face > splines, though without any pictures of the types...maybe I missed > something.   Whether other face splines exist could affect how we name > functions in BOSL2. > > On Fri, Nov 1, 2024 at 8:51 PM Caddiy via Discuss > <discuss@lists.openscad.org> wrote: > > Bob Carlson wrote: > > “what other kinds of face splines exist?” Danged if I know. I > have designed a couple just out of basic need. Made them up > myself. I’m not a mechanical engineer, so I’ve got no formal > background to draw on. > > The def of spline "A spline is a ridge or tooth on a drive > shaft that matches with a groove in a mating piece and > transfers torque to it, maintaining the angular correspondence > between them. For instance, a gear mounted on a shaft might > use a male spline on the shaft that matches the female spline > on the gear." > > * > > Bob > > Gratified to see that someone has clicked on my link (further up) > to splines <https://en.wikipedia.org/wiki/Spline_(mechanical)> on > Wikipedia. > > I think you meant to say, there are lots of other XXXX splines, > the Hirth is just one kind. (XXXX = word deleted). Though strictly > speaking, a spline is just a spline; what counts is the way > multiple splines are arranged and where. > > In most cases, splines run along a shaft, but sometimes the end > (the /face/) of a shaft, or a flange on the end of a shaft can > have radial splines, for the purpose of transmitting torque. Your > joint is something of an inbetweenie: radial splines with > longitudinal leanings. > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email todiscuss-leave@lists.openscad.org
AM
Adrian Mariano
Sat, Nov 2, 2024 1:38 PM

Ray, I tried out your code and ran into numerous problems.  It is super
slow to preview.  You don't give a convexity argument so stuff is missing
in preview.  Render fails with a bunch of errors, perhaps due to the
reversed faces.  So I can't really look at the shape very well.  I tried
setting the tooth count to 5 and it gets really weird.  My suspicion is
that you fell into the same trap that I did in not recognizing the subtlety
of the face spline design, but I can't be certain....  Or maybe you don't
care if it fits accurately--could be that the modeling errors in question
aren't a major source of error at high tooth count.  Note that EVEN the
case of two symmetric parts is rather tricky to get right.  I didn't
realize this at first.  A fully correct implementation will let someone
make a 5 tooth design that could be used to set a mechanism at fifth of a
circle angles, for example.

With regards to terminology, my main reason for asking the question about
other face splines is that I'd call this module in BOSL2 face_spline(),
except that if there are 4 other kinds of face spline then that could be
confusing, in which case perhaps it should be hirth() which is more
obscure.

On Thu, Oct 31, 2024 at 8:01 PM Raymond West via Discuss <
discuss@lists.openscad.org> wrote:

Hi Bob,

Here's the basic code for a parametric Hirth Joint. Spring loaded often
use as a slip clutch in torque sensitive situations, e.g screw drivers,
tapping heads, etc. Larger scale high speed turbines for shaft
connections, since easy to balance, no windage, etc. I've tested as
saving as stl, and re-importing, gives no errors. Easy enough to cut out
the centre teeth if you don't want them.

// clutch.scad

ind= 50;  // overall diameter
num= 20;  // number of teeth
back = 6; //thickness of back
////////////////////////////////////////////

diam= ind/cos (180/num);  // bigger to allow for chords
chord = diam*sin(180/num);

ridge= chord *sqrt(3)/3;  // or set to whatever (denominator = 2 for 60
degrees.)

points=[
[0,0,ridge/2],
[diam/2,-chord/2,0],
[diam/2,+chord/2,0],
[diam/2,0,ridge]
];
faces=[
[0,1,2],
[0,1,3],
[0,2,3],
[1,2,3]
];

module wedge(){
polyhedron(points,faces,convexity=10);
}

//rotate wedge

intersection(){
translate([0,0,-back])
cylinder(d=ind,h=200,$fn=100);
union(){
for (j=[0:1:+1+360/num])
rotate([0,0,j360/num+0.5360/num]) wedge();
cylinder(d1=diam,d2=0,h=ridge/2,$fn=num);
translate([0,0,-back])
cylinder(d=diam,h=back,$fn=num);
}
}

//save as stl, then import to check for valid stl. (remove comments
below and run again)

/*
translate([0,0,6])
rotate([0,180,360/(num*2)])
import("P:/Docs/openscad/clutch.stl");
*/

On 26/10/2024 00:44, Bob Carlson via Discuss wrote:

I got really intrigued by the Hirth joint and have been working a

library entry that would generate them. I have it fully working,
apparently, because it renders perfectly as far as I can see. However when
I load one of the parts (a concave part) into PrusaSlicer, it reports
thousands of errors that it supposedly fixed. The visual rendering is fine,
but when you look at the slice it is completely screwed up.

First some explanation. When I looked up hirth joints I only saw flat

ones mentioned. The one I have actually encountered though is a conical
one. There is a concave part and a convex part. They fit together
perfectly. I had to invent some terminology since I did not find terms for
some things I found to be important. The outer center line is the plane
that passes through the midpoint of the teeth at the outer radius. In a
flat hirth joint all the teeth radiate from the center of this circle, call
it the origin. If the origin of the teeth is above the outer center line,
then joint has a conical shape and the two parts are concave and convex.

Each tooth at every point has the same profile, the top of the tooth

profile is either 60 or 90 degrees. The groove angle is the angle that the
groove forms from the origin to the outer radius. It will pass below (for a
convex part) the outer radius. It’s critical for making hirth joints
because it forms the tool path. The ridge angle is the angle formed by the
corresponding ridge.

If the joint is conical, then there is an inner center line that passes

through the center of the teeth at the inner radius. The tooth height is
the critical number to calculate. It is dependent on the number of teeth,
the profile angle and the inner and out radii. Something that really
complicates the mental gymnastics is that the tooth height is smaller at
the inner radius. My code adds a “base” of extra material at the bottom of
the convex part and the top of the concave part. What’s tricky is
positioning the base of the concave part relative to the inner center line.
The concave parts base is relatively easy to place because it depends on
the outer radius and center line.

I generate the raw teeth using the groove and ridge angles and spherical

coordinates to make two 2d tooth profiles. Then I complete a tooth using
skin(). A for loop generates the full set of N teeth. Then intersection or
difference is used the trim the teeth at the inner and outer radii. I
discovered something at that point, but solved it pretty simply. When
diffing a cylinder from the N teeth, each tooth took up a small portion of
the cylinder being diffed out. I had to raise the $fn on the cylinder or
tube being used so that I got enough points in each tooth that diff or
intersection was accurate. I kept raising it until the results stopped
improving. I ended up with the 16*360 you see in the code.

After I have the raw teeth, I generate a cone that is diffed away to

produce the chamfer at the top of the teeth. Then I add in the base. The
base also adds the “chamfer” at the bottom of the groove. It’s half the
size of the top chamfer to leave a little gap when the parts are joined.

When I comment out the everything but the raw teeth and import the STL

into PrusaSlicer, it reports errors fixed, but appears to slice correctly
when supports are added.

When I add the intersection to trim the raw teeth, the number of

reported errors goes way up.

When I add the diff to remove the chamfer, the number goes way up again.

When I add in the base, the number goes up again and it starts reporting

many open edges.

Throughout, OpenSCAD reports no errors. Using $fn at 16*360, manifold

renders in 4+ seconds. At 32*360, it’s 53+ seconds. I did check CSG and it
did not help.

Maybe the biggest hint is that the convex part uses almost identical

code, but produces no errors. Very weird.

So, is this an OpenSCAD problem? Or something in my code?

It’s also possible that my math is off somewhere. My formal trig

training was 60 years ago. However I doubt a math error is responsible for
the slicing problem and STL errors.

-Bob

include <BOSL2/std.scad>
include <BOSL2/structs.scad>

// Number of Teeth
_n = 36;          // Number Of Teeth

// Inner Radius
_ir = 30;
// Outer Radius
_or = 50;
// Is the coupling conical?
_conic = 10;
// Tooth Profile Angle
_profile = 60; // [60, 90]
// Percentage of tooth height
_chamfer = 5; // Default 5%
_base = 1;

$fn = 180;
tiny = 1 / 1024;

hirth_concave();

_irRatio = _ir / _or;
_toothAngle = 360/_n;
_toothHeight = (sin(_toothAngle/2) * _or) / tan(_profile/2);
_chamferHeight = _chamfer * _toothHeight / 100;
_grooveAngle =  atan(((_toothHeight/2) + _conic) / _or);
_ridgeAngle = -atan(((_toothHeight/2) - _conic) / _or);
_innerCenterLine = (1 - _irRatio) * _conic;
_stackHeight  = _innerCenterLine + _toothHeight + 2*_base;
_tubeHeight = 2*_conic + 2*_base + 2*_toothHeight;

module hirth_concave() {
zrot(_toothAngle/2)
union() {
difference() {
intersection() {
union() {
for (i = [0 : 360/_n : 359])
zrot(i)
_profileF();
}
tube(ir = _ir, or = _or, anchor = CENTER, l =

_tubeHeight, orient = UP, $fn = 16*360);

          }
          _chamferF();
          zcyl(r = _ir, h = _tubeHeight, $fn = 16*360, anchor =

CENTER);

      }
      _baseF();
  }

} // hirth_concave

module _profileF() {
IR = _ir * .5;
OR = _or * 1.5;
tI = [spherical_to_xyz(IR,  0,            _grooveAngle + 90),
spherical_to_xyz(IR,  _toothAngle/2, _ridgeAngle + 90),
spherical_to_xyz(IR, -_toothAngle/2, _ridgeAngle + 90)];

  tO = [spherical_to_xyz(OR,   0,            _grooveAngle + 90),
        spherical_to_xyz(OR,  _toothAngle/2, _ridgeAngle + 90),
        spherical_to_xyz(OR, -_toothAngle/2, _ridgeAngle + 90)];
  up(_conic)
  skin([tI, tO], slices = 0);

}

module _chamferF() {
A = -_toothHeight/2 - .1;
B = -_toothHeight/2 + _chamferHeight;

  pts = [[0, _conic],
         [_or+tiny, A],
         [_or+tiny, B]];

  rotate_extrude(angle = 360, $fn = 16*360)
  polygon(pts);

}

module _baseF() {
A = _base + _irRatio*_toothHeight/2 + _innerCenterLine;
B = _irRatio * (_toothHeight/2 - _chamferHeight/2) +

_innerCenterLine;

  C = _toothHeight/2 - _chamferHeight/2;
  pts = [
         [_ir, A],
         [_ir, B],
         [_or, C],
         [_or, A]
         ];

  rotate_extrude(angle = 360, $fn = 360*16)
  polygon(pts);

}


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

Ray, I tried out your code and ran into numerous problems. It is super slow to preview. You don't give a convexity argument so stuff is missing in preview. Render fails with a bunch of errors, perhaps due to the reversed faces. So I can't really look at the shape very well. I tried setting the tooth count to 5 and it gets really weird. My suspicion is that you fell into the same trap that I did in not recognizing the subtlety of the face spline design, but I can't be certain.... Or maybe you don't care if it fits accurately--could be that the modeling errors in question aren't a major source of error at high tooth count. Note that EVEN the case of two symmetric parts is rather tricky to get right. I didn't realize this at first. A fully correct implementation will let someone make a 5 tooth design that could be used to set a mechanism at fifth of a circle angles, for example. With regards to terminology, my main reason for asking the question about other face splines is that I'd call this module in BOSL2 face_spline(), except that if there are 4 other kinds of face spline then that could be confusing, in which case perhaps it should be hirth() which is more obscure. On Thu, Oct 31, 2024 at 8:01 PM Raymond West via Discuss < discuss@lists.openscad.org> wrote: > Hi Bob, > > Here's the basic code for a parametric Hirth Joint. Spring loaded often > use as a slip clutch in torque sensitive situations, e.g screw drivers, > tapping heads, etc. Larger scale high speed turbines for shaft > connections, since easy to balance, no windage, etc. I've tested as > saving as stl, and re-importing, gives no errors. Easy enough to cut out > the centre teeth if you don't want them. > > // clutch.scad > > ind= 50; // overall diameter > num= 20; // number of teeth > back = 6; //thickness of back > //////////////////////////////////////////// > > > diam= ind/cos (180/num); // bigger to allow for chords > chord = diam*sin(180/num); > > ridge= chord *sqrt(3)/3; // or set to whatever (denominator = 2 for 60 > degrees.) > > points=[ > [0,0,ridge/2], > [diam/2,-chord/2,0], > [diam/2,+chord/2,0], > [diam/2,0,ridge] > ]; > faces=[ > [0,1,2], > [0,1,3], > [0,2,3], > [1,2,3] > ]; > > module wedge(){ > polyhedron(points,faces,convexity=10); > } > > //rotate wedge > > intersection(){ > translate([0,0,-back]) > cylinder(d=ind,h=200,$fn=100); > union(){ > for (j=[0:1:+1+360/num]) > rotate([0,0,j*360/num+0.5*360/num]) wedge(); > cylinder(d1=diam,d2=0,h=ridge/2,$fn=num); > translate([0,0,-back]) > cylinder(d=diam,h=back,$fn=num); > } > } > > //save as stl, then import to check for valid stl. (remove comments > below and run again) > > /* > translate([0,0,6]) > rotate([0,180,360/(num*2)]) > import("P:/Docs/openscad/clutch.stl"); > */ > > > On 26/10/2024 00:44, Bob Carlson via Discuss wrote: > > I got really intrigued by the Hirth joint and have been working a > library entry that would generate them. I have it fully working, > apparently, because it renders perfectly as far as I can see. However when > I load one of the parts (a concave part) into PrusaSlicer, it reports > thousands of errors that it supposedly fixed. The visual rendering is fine, > but when you look at the slice it is completely screwed up. > > > > First some explanation. When I looked up hirth joints I only saw flat > ones mentioned. The one I have actually encountered though is a conical > one. There is a concave part and a convex part. They fit together > perfectly. I had to invent some terminology since I did not find terms for > some things I found to be important. The outer center line is the plane > that passes through the midpoint of the teeth at the outer radius. In a > flat hirth joint all the teeth radiate from the center of this circle, call > it the origin. If the origin of the teeth is above the outer center line, > then joint has a conical shape and the two parts are concave and convex. > > > > Each tooth at every point has the same profile, the top of the tooth > profile is either 60 or 90 degrees. The groove angle is the angle that the > groove forms from the origin to the outer radius. It will pass below (for a > convex part) the outer radius. It’s critical for making hirth joints > because it forms the tool path. The ridge angle is the angle formed by the > corresponding ridge. > > > > If the joint is conical, then there is an inner center line that passes > through the center of the teeth at the inner radius. The tooth height is > the critical number to calculate. It is dependent on the number of teeth, > the profile angle and the inner and out radii. Something that really > complicates the mental gymnastics is that the tooth height is smaller at > the inner radius. My code adds a “base” of extra material at the bottom of > the convex part and the top of the concave part. What’s tricky is > positioning the base of the concave part relative to the inner center line. > The concave parts base is relatively easy to place because it depends on > the outer radius and center line. > > > > I generate the raw teeth using the groove and ridge angles and spherical > coordinates to make two 2d tooth profiles. Then I complete a tooth using > skin(). A for loop generates the full set of N teeth. Then intersection or > difference is used the trim the teeth at the inner and outer radii. I > discovered something at that point, but solved it pretty simply. When > diffing a cylinder from the N teeth, each tooth took up a small portion of > the cylinder being diffed out. I had to raise the $fn on the cylinder or > tube being used so that I got enough points in each tooth that diff or > intersection was accurate. I kept raising it until the results stopped > improving. I ended up with the 16*360 you see in the code. > > > > After I have the raw teeth, I generate a cone that is diffed away to > produce the chamfer at the top of the teeth. Then I add in the base. The > base also adds the “chamfer” at the bottom of the groove. It’s half the > size of the top chamfer to leave a little gap when the parts are joined. > > > > When I comment out the everything but the raw teeth and import the STL > into PrusaSlicer, it reports errors fixed, but appears to slice correctly > when supports are added. > > > > When I add the intersection to trim the raw teeth, the number of > reported errors goes way up. > > > > When I add the diff to remove the chamfer, the number goes way up again. > > > > When I add in the base, the number goes up again and it starts reporting > many open edges. > > > > Throughout, OpenSCAD reports no errors. Using $fn at 16*360, manifold > renders in 4+ seconds. At 32*360, it’s 53+ seconds. I did check CSG and it > did not help. > > > > Maybe the biggest hint is that the convex part uses almost identical > code, but produces no errors. Very weird. > > > > So, is this an OpenSCAD problem? Or something in my code? > > > > It’s also possible that my math is off somewhere. My formal trig > training was 60 years ago. However I doubt a math error is responsible for > the slicing problem and STL errors. > > > > -Bob > > > > > > include <BOSL2/std.scad> > > include <BOSL2/structs.scad> > > > > // Number of Teeth > > _n = 36; // Number Of Teeth > > > > // Inner Radius > > _ir = 30; > > // Outer Radius > > _or = 50; > > // Is the coupling conical? > > _conic = 10; > > // Tooth Profile Angle > > _profile = 60; // [60, 90] > > // Percentage of tooth height > > _chamfer = 5; // Default 5% > > _base = 1; > > > > $fn = 180; > > tiny = 1 / 1024; > > > > hirth_concave(); > > > > _irRatio = _ir / _or; > > _toothAngle = 360/_n; > > _toothHeight = (sin(_toothAngle/2) * _or) / tan(_profile/2); > > _chamferHeight = _chamfer * _toothHeight / 100; > > _grooveAngle = atan(((_toothHeight/2) + _conic) / _or); > > _ridgeAngle = -atan(((_toothHeight/2) - _conic) / _or); > > _innerCenterLine = (1 - _irRatio) * _conic; > > _stackHeight = _innerCenterLine + _toothHeight + 2*_base; > > _tubeHeight = 2*_conic + 2*_base + 2*_toothHeight; > > > > module hirth_concave() { > > zrot(_toothAngle/2) > > union() { > > difference() { > > intersection() { > > union() { > > for (i = [0 : 360/_n : 359]) > > zrot(i) > > _profileF(); > > } > > tube(ir = _ir, or = _or, anchor = CENTER, l = > _tubeHeight, orient = UP, $fn = 16*360); > > } > > _chamferF(); > > zcyl(r = _ir, h = _tubeHeight, $fn = 16*360, anchor = > CENTER); > > } > > _baseF(); > > } > > } // hirth_concave > > > > module _profileF() { > > IR = _ir * .5; > > OR = _or * 1.5; > > tI = [spherical_to_xyz(IR, 0, _grooveAngle + 90), > > spherical_to_xyz(IR, _toothAngle/2, _ridgeAngle + 90), > > spherical_to_xyz(IR, -_toothAngle/2, _ridgeAngle + 90)]; > > > > tO = [spherical_to_xyz(OR, 0, _grooveAngle + 90), > > spherical_to_xyz(OR, _toothAngle/2, _ridgeAngle + 90), > > spherical_to_xyz(OR, -_toothAngle/2, _ridgeAngle + 90)]; > > up(_conic) > > skin([tI, tO], slices = 0); > > } > > > > > > module _chamferF() { > > A = -_toothHeight/2 - .1; > > B = -_toothHeight/2 + _chamferHeight; > > > > pts = [[0, _conic], > > [_or+tiny, A], > > [_or+tiny, B]]; > > > > rotate_extrude(angle = 360, $fn = 16*360) > > polygon(pts); > > } > > > > module _baseF() { > > A = _base + _irRatio*_toothHeight/2 + _innerCenterLine; > > B = _irRatio * (_toothHeight/2 - _chamferHeight/2) + > _innerCenterLine; > > C = _toothHeight/2 - _chamferHeight/2; > > pts = [ > > [_ir, A], > > [_ir, B], > > [_or, C], > > [_or, A] > > ]; > > > > rotate_extrude(angle = 360, $fn = 360*16) > > polygon(pts); > > } > > _______________________________________________ > > OpenSCAD mailing list > > To unsubscribe send an email to discuss-leave@lists.openscad.org > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >