discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Helix with circular cross-section

RW
Raymond West
Sun, Oct 27, 2024 10:51 AM

fwiw, I made a short length of threaded rod, about a month or two ago, 
with left and right hand threads, and matching huts, one lh thread,
t'other rh. (also an attempt at a nut that 'would go both ways). I
showed it to someone I know, but he liked it so much, he put it in his
pocket. This one will be toroidal, too big for a pocket. With sufficient
stiction between the nuts and the rod, if you hold one nut you think you
can tighten the other one against it, but you can't.

On 26/10/2024 18:56, John David via Discuss wrote:

Maybe like the screws that can be tightened turning both left and right?

https://www.youtube.com/watch?app=desktop&v=_48-Ike_i6M
https://www.youtube.com/watch?app=desktop&v=_48-Ike_i6M

That can hurt your noggin, but I get it...

  EBo --

fwiw, I made a short length of threaded rod, about a month or two ago,  with left and right hand threads, and matching huts, one lh thread, t'other rh. (also an attempt at a nut that 'would go both ways). I showed it to someone I know, but he liked it so much, he put it in his pocket. This one will be toroidal, too big for a pocket. With sufficient stiction between the nuts and the rod, if you hold one nut you think you can tighten the other one against it, but you can't. On 26/10/2024 18:56, John David via Discuss wrote: > Maybe like the screws that can be tightened turning both left and right? > > https://www.youtube.com/watch?app=desktop&v=_48-Ike_i6M > <https://www.youtube.com/watch?app=desktop&v=_48-Ike_i6M> > > That can hurt your noggin, but I get it... > >   EBo -- >
AM
Adrian Mariano
Mon, Oct 28, 2024 9:28 PM

Why wouldn't you be able to tighten one nut against another on the helical
threaded rod?  It does seem like the nuts would need to have their
threading skewed by the helical curve and angle.

For anyone who wants a simple example of the double threaded screw, there's
one here:

https://github.com/BelfrySCAD/BOSL2/wiki/threading.scad#module-threaded_rod

See Example 7.

On Sun, Oct 27, 2024 at 6:51 AM Raymond West via Discuss <
discuss@lists.openscad.org> wrote:

fwiw, I made a short length of threaded rod, about a month or two ago,
with left and right hand threads, and matching huts, one lh thread,
t'other rh. (also an attempt at a nut that 'would go both ways). I
showed it to someone I know, but he liked it so much, he put it in his
pocket. This one will be toroidal, too big for a pocket. With sufficient
stiction between the nuts and the rod, if you hold one nut you think you
can tighten the other one against it, but you can't.

On 26/10/2024 18:56, John David via Discuss wrote:

Maybe like the screws that can be tightened turning both left and right?

https://www.youtube.com/watch?app=desktop&v=_48-Ike_i6M
https://www.youtube.com/watch?app=desktop&v=_48-Ike_i6M

That can hurt your noggin, but I get it...

EBo --


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

Why wouldn't you be able to tighten one nut against another on the helical threaded rod? It does seem like the nuts would need to have their threading skewed by the helical curve and angle. For anyone who wants a simple example of the double threaded screw, there's one here: https://github.com/BelfrySCAD/BOSL2/wiki/threading.scad#module-threaded_rod See Example 7. On Sun, Oct 27, 2024 at 6:51 AM Raymond West via Discuss < discuss@lists.openscad.org> wrote: > fwiw, I made a short length of threaded rod, about a month or two ago, > with left and right hand threads, and matching huts, one lh thread, > t'other rh. (also an attempt at a nut that 'would go both ways). I > showed it to someone I know, but he liked it so much, he put it in his > pocket. This one will be toroidal, too big for a pocket. With sufficient > stiction between the nuts and the rod, if you hold one nut you think you > can tighten the other one against it, but you can't. > > On 26/10/2024 18:56, John David via Discuss wrote: > > Maybe like the screws that can be tightened turning both left and right? > > > > https://www.youtube.com/watch?app=desktop&v=_48-Ike_i6M > > <https://www.youtube.com/watch?app=desktop&v=_48-Ike_i6M> > > > > That can hurt your noggin, but I get it... > > > > EBo -- > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
RW
Raymond West
Tue, Oct 29, 2024 8:13 PM

Hi Adrian,

if you hold one nut, the stiction can hold the stud, allowing the second
nut to be tightened against the first, but when the second nut touches
the first nut, the stud starts turning in the same direction as the
second nut, thus it can not tighten against the first nut. I've not got
my original, since a friend 'borrowed' it, so that is the best
explanation that I can remember. If you hold the stud, then you can
tighten both nuts together, but swap them over, and turn each in the
same direction, they move apart, of course.

I'm not sure of any practical application, but there are plenty of
double threaded nuts and bolts, but with the threads going in the same
direction. Many occurred when going from imperial to metric threads in
the UK🙁.

Best wishes,

Ray

On 28/10/2024 21:28, Adrian Mariano via Discuss wrote:

Why wouldn't you be able to tighten one nut against another on the
helical threaded rod?  It does seem like the nuts would need to have
their threading skewed by the helical curve and angle.

For anyone who wants a simple example of the double threaded screw,
there's one here:

https://github.com/BelfrySCAD/BOSL2/wiki/threading.scad#module-threaded_rod

See Example 7.

On Sun, Oct 27, 2024 at 6:51 AM Raymond West via Discuss
discuss@lists.openscad.org wrote:

 fwiw, I made a short length of threaded rod, about a month or two
 ago,
 with left and right hand threads, and matching huts, one lh thread,
 t'other rh. (also an attempt at a nut that 'would go both ways). I
 showed it to someone I know, but he liked it so much, he put it in
 his
 pocket. This one will be toroidal, too big for a pocket. With
 sufficient
 stiction between the nuts and the rod, if you hold one nut you
 think you
 can tighten the other one against it, but you can't.

 On 26/10/2024 18:56, John David via Discuss wrote:

Maybe like the screws that can be tightened turning both left

 and right?
 <https://www.youtube.com/watch?app=desktop&v=_48-Ike_i6M>

<https://www.youtube.com/watch?app=desktop&v=_48-Ike_i6M

 <https://www.youtube.com/watch?app=desktop&v=_48-Ike_i6M>>

That can hurt your noggin, but I get it...

  EBo --

 _______________________________________________
 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

Hi Adrian, if you hold one nut, the stiction can hold the stud, allowing the second nut to be tightened against the first, but when the second nut touches the first nut, the stud starts turning in the same direction as the second nut, thus it can not tighten against the first nut. I've not got my original, since a friend 'borrowed' it, so that is the best explanation that I can remember. If you hold the stud, then you can tighten both nuts together, but swap them over, and turn each in the same direction, they move apart, of course. I'm not sure of any practical application, but there are plenty of double threaded nuts and bolts, but with the threads going in the same direction. Many occurred when going from imperial to metric threads in the UK🙁. Best wishes, Ray On 28/10/2024 21:28, Adrian Mariano via Discuss wrote: > Why wouldn't you be able to tighten one nut against another on the > helical threaded rod?  It does seem like the nuts would need to have > their threading skewed by the helical curve and angle. > > For anyone who wants a simple example of the double threaded screw, > there's one here: > > https://github.com/BelfrySCAD/BOSL2/wiki/threading.scad#module-threaded_rod > > See Example 7. > > On Sun, Oct 27, 2024 at 6:51 AM Raymond West via Discuss > <discuss@lists.openscad.org> wrote: > > fwiw, I made a short length of threaded rod, about a month or two > ago, > with left and right hand threads, and matching huts, one lh thread, > t'other rh. (also an attempt at a nut that 'would go both ways). I > showed it to someone I know, but he liked it so much, he put it in > his > pocket. This one will be toroidal, too big for a pocket. With > sufficient > stiction between the nuts and the rod, if you hold one nut you > think you > can tighten the other one against it, but you can't. > > On 26/10/2024 18:56, John David via Discuss wrote: > > Maybe like the screws that can be tightened turning both left > and right? > > > > https://www.youtube.com/watch?app=desktop&v=_48-Ike_i6M > <https://www.youtube.com/watch?app=desktop&v=_48-Ike_i6M> > > <https://www.youtube.com/watch?app=desktop&v=_48-Ike_i6M > <https://www.youtube.com/watch?app=desktop&v=_48-Ike_i6M>> > > > > That can hurt your noggin, but I get it... > > > >   EBo -- > > > _______________________________________________ > 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
Tue, Oct 29, 2024 9:20 PM

Ray, I think you're talking about the double threaded rod and I
misinterpreted you and thought you were referring to the threaded helix
that you posted.  I have printed the double threaded rod (from the above
posted BOSL2 example) and am still in possession of the print, so I know
how that thing behaves.

On Tue, Oct 29, 2024 at 4:14 PM Raymond West via Discuss <
discuss@lists.openscad.org> wrote:

Hi Adrian,

if you hold one nut, the stiction can hold the stud, allowing the second
nut to be tightened against the first, but when the second nut touches the
first nut, the stud starts turning in the same direction as the second nut,
thus it can not tighten against the first nut. I've not got my original,
since a friend 'borrowed' it, so that is the best explanation that I can
remember. If you hold the stud, then you can tighten both nuts together,
but swap them over, and turn each in the same direction, they move apart,
of course.

I'm not sure of any practical application, but there are plenty of double
threaded nuts and bolts, but with the threads going in the same direction.
Many occurred when going from imperial to metric threads in the UK🙁.

Best wishes,

Ray
On 28/10/2024 21:28, Adrian Mariano via Discuss wrote:

Why wouldn't you be able to tighten one nut against another on the helical
threaded rod?  It does seem like the nuts would need to have their
threading skewed by the helical curve and angle.

For anyone who wants a simple example of the double threaded screw,
there's one here:

https://github.com/BelfrySCAD/BOSL2/wiki/threading.scad#module-threaded_rod

See Example 7.

On Sun, Oct 27, 2024 at 6:51 AM Raymond West via Discuss <
discuss@lists.openscad.org> wrote:

fwiw, I made a short length of threaded rod, about a month or two ago,
with left and right hand threads, and matching huts, one lh thread,
t'other rh. (also an attempt at a nut that 'would go both ways). I
showed it to someone I know, but he liked it so much, he put it in his
pocket. This one will be toroidal, too big for a pocket. With sufficient
stiction between the nuts and the rod, if you hold one nut you think you
can tighten the other one against it, but you can't.

On 26/10/2024 18:56, John David via Discuss wrote:

Maybe like the screws that can be tightened turning both left and right?

https://www.youtube.com/watch?app=desktop&v=_48-Ike_i6M
https://www.youtube.com/watch?app=desktop&v=_48-Ike_i6M

That can hurt your noggin, but I get it...

EBo --


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


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

Ray, I think you're talking about the double threaded rod and I misinterpreted you and thought you were referring to the threaded helix that you posted. I have printed the double threaded rod (from the above posted BOSL2 example) and am still in possession of the print, so I know how that thing behaves. On Tue, Oct 29, 2024 at 4:14 PM Raymond West via Discuss < discuss@lists.openscad.org> wrote: > Hi Adrian, > > if you hold one nut, the stiction can hold the stud, allowing the second > nut to be tightened against the first, but when the second nut touches the > first nut, the stud starts turning in the same direction as the second nut, > thus it can not tighten against the first nut. I've not got my original, > since a friend 'borrowed' it, so that is the best explanation that I can > remember. If you hold the stud, then you can tighten both nuts together, > but swap them over, and turn each in the same direction, they move apart, > of course. > > I'm not sure of any practical application, but there are plenty of double > threaded nuts and bolts, but with the threads going in the same direction. > Many occurred when going from imperial to metric threads in the UK🙁. > > Best wishes, > > Ray > On 28/10/2024 21:28, Adrian Mariano via Discuss wrote: > > Why wouldn't you be able to tighten one nut against another on the helical > threaded rod? It does seem like the nuts would need to have their > threading skewed by the helical curve and angle. > > For anyone who wants a simple example of the double threaded screw, > there's one here: > > https://github.com/BelfrySCAD/BOSL2/wiki/threading.scad#module-threaded_rod > > See Example 7. > > On Sun, Oct 27, 2024 at 6:51 AM Raymond West via Discuss < > discuss@lists.openscad.org> wrote: > >> fwiw, I made a short length of threaded rod, about a month or two ago, >> with left and right hand threads, and matching huts, one lh thread, >> t'other rh. (also an attempt at a nut that 'would go both ways). I >> showed it to someone I know, but he liked it so much, he put it in his >> pocket. This one will be toroidal, too big for a pocket. With sufficient >> stiction between the nuts and the rod, if you hold one nut you think you >> can tighten the other one against it, but you can't. >> >> On 26/10/2024 18:56, John David via Discuss wrote: >> > Maybe like the screws that can be tightened turning both left and right? >> > >> > https://www.youtube.com/watch?app=desktop&v=_48-Ike_i6M >> > <https://www.youtube.com/watch?app=desktop&v=_48-Ike_i6M> >> > >> > That can hurt your noggin, but I get it... >> > >> > EBo -- >> > >> _______________________________________________ >> 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 > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
RS
Robbie Sandberg
Wed, Jun 25, 2025 5:03 PM

Hi!
Can someone tell me the z-position of a threaded_rod in BOSL2 when it’s not translated?
I’m using it in a difference function to cut a thread out of a tube.

difference() {
cylinder(h=50, d=16, $fn=150);
translate([0,0,1.5])
cylinder(h=32.5, d=12);
translate([0,0,34])
threaded_rod(d=12, l=16, pitch=2, internal=false, bevel=0.5);
}

That should bring the top of the rod to the top of the tube, but it doesn’t. Instead the tube is closed at the top.
I also tried adding half the rod’s length to the translation, in case it’s originally centered. That produces an open tube, but with a rim at the top.

I should mention that I’m blind and can’t use the preview.
Any advice is welcome.

Cheers! Robbie

Hi! Can someone tell me the z-position of a threaded_rod in BOSL2 when it’s not translated? I’m using it in a difference function to cut a thread out of a tube. difference() { cylinder(h=50, d=16, $fn=150); translate([0,0,1.5]) cylinder(h=32.5, d=12); translate([0,0,34]) threaded_rod(d=12, l=16, pitch=2, internal=false, bevel=0.5); } That should bring the top of the rod to the top of the tube, but it doesn’t. Instead the tube is closed at the top. I also tried adding half the rod’s length to the translation, in case it’s originally centered. That produces an open tube, but with a rim at the top. I should mention that I’m blind and can’t use the preview. Any advice is welcome. Cheers! Robbie
GH
gene heskett
Wed, Jun 25, 2025 6:14 PM

On 6/25/25 13:04, Robbie Sandberg via Discuss wrote:

Hi!
Can someone tell me the z-position of a threaded_rod in BOSL2 when it’s not translated?
I’m using it in a difference function to cut a thread out of a tube.

difference() {
cylinder(h=50, d=16, $fn=150);
translate([0,0,1.5])
cylinder(h=32.5, d=12);
translate([0,0,34])
threaded_rod(d=12, l=16, pitch=2, internal=false, bevel=0.5);
}

That should bring the top of the rod to the top of the tube, but it doesn’t. Instead the tube is closed at the top.
I also tried adding half the rod’s length to the translation, in case it’s originally centered. That produces an open tube, but with a rim at the top.

I should mention that I’m blind and can’t use the preview.
Any advice is welcome.

That is a limitation I don't have, but what I do in such a case is make
the threaded rod I'm using for a difference, enough longer that both
ends project beyond the length of the item its being differenced out of.
Unfortunately I don't see the code for "threaded_rod()" so I can't test
it  Can that be posted?l

Cheers! Robbie


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

Cheers, Gene Heskett, CET.

"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.

  • Louis D. Brandeis
On 6/25/25 13:04, Robbie Sandberg via Discuss wrote: > Hi! > Can someone tell me the z-position of a threaded_rod in BOSL2 when it’s not translated? > I’m using it in a difference function to cut a thread out of a tube. > > difference() { > cylinder(h=50, d=16, $fn=150); > translate([0,0,1.5]) > cylinder(h=32.5, d=12); > translate([0,0,34]) > threaded_rod(d=12, l=16, pitch=2, internal=false, bevel=0.5); > } > > That should bring the top of the rod to the top of the tube, but it doesn’t. Instead the tube is closed at the top. > I also tried adding half the rod’s length to the translation, in case it’s originally centered. That produces an open tube, but with a rim at the top. > > I should mention that I’m blind and can’t use the preview. > Any advice is welcome. That is a limitation I don't have, but what I do in such a case is make the threaded rod I'm using for a difference, enough longer that both ends project beyond the length of the item its being differenced out of. Unfortunately I don't see the code for "threaded_rod()" so I can't test it  Can that be posted?l > > Cheers! Robbie > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org Cheers, Gene Heskett, CET. -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author, 1940) If we desire respect for the law, we must first make the law respectable. - Louis D. Brandeis
AM
Adrian Mariano
Wed, Jun 25, 2025 8:38 PM

As the subject says, it's a BOSL2 question, which is where threaded_rod is
to be found.

The cylinder() module by default places the cylinder with its bottom on the
XY plane.  You can use center=true to make it center. The BOSL2 commands by
default center objects, so the threaded rod will be centered.  It may work
better to combine this with cyl() which automatically centers for
consistent behavior.  Note that you probably want internal=true if you're
making a threaded hole.  Your model has a 50 unit tall cylinder, so its
top is at z=50.  The top of the threaded rod, which has height 16, is at
z=8.  Since you are beveling you will not want to follow Gene's advice to
make it oversized.  You have a  but your threaded rod is only 16 units
tall.  So you need to raise it by 50-8 units.  So like this:

difference() {
cylinder(h=50, d=16, $fn=150);
translate([0,0,1.5])
cylinder(h=32.5, d=12);
up(50-8)
threaded_rod(d=12, l=16, pitch=2, internal=true, bevel2=0.5, bevel1=0);
}

I took the bevel off the bottom because that works better.  Note that
internal=true causes the bevels to reverse.  And you may want to go up by
slightly more to ensure no issues with coplanar faces, but in this case I
think it only matters in preview, which doesn't affect you.  By slightly
more I mean 0.01 units.

The easier way to address this is with attachments.  That looks like this:

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

diff()
cyl(h=50,d=16, $fn=150){
up(1.5)attach(BOT,BOT,inside=true) cyl(h=32.5,d=12);
attach(TOP,TOP,inside=true)
threaded_rod(d=12, l=16, pitch=2, internal=true, bevel2=0.5,
bevel1=0);
}

You can also in general explicitly anchor BOSL2 objects so you know where
they are, e.g. with anchor=BOTTOM to put the bottom at the origin, or
anchor=CENTER to center it at the origin.

On Wed, Jun 25, 2025 at 2:15 PM gene heskett via Discuss <
discuss@lists.openscad.org> wrote:

On 6/25/25 13:04, Robbie Sandberg via Discuss wrote:

Hi!
Can someone tell me the z-position of a threaded_rod in BOSL2 when it’s

not translated?

I’m using it in a difference function to cut a thread out of a tube.

difference() {
cylinder(h=50, d=16, $fn=150);
translate([0,0,1.5])
cylinder(h=32.5, d=12);
translate([0,0,34])
threaded_rod(d=12, l=16, pitch=2, internal=false, bevel=0.5);
}

That should bring the top of the rod to the top of the tube, but it

doesn’t. Instead the tube is closed at the top.

I also tried adding half the rod’s length to the translation, in case

it’s originally centered. That produces an open tube, but with a rim at the
top.

I should mention that I’m blind and can’t use the preview.
Any advice is welcome.

That is a limitation I don't have, but what I do in such a case is make
the threaded rod I'm using for a difference, enough longer that both
ends project beyond the length of the item its being differenced out of.
Unfortunately I don't see the code for "threaded_rod()" so I can't test
it  Can that be posted?l

Cheers! Robbie


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

Cheers, Gene Heskett, CET.

"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.

  • Louis D. Brandeis

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

As the subject says, it's a BOSL2 question, which is where threaded_rod is to be found. The cylinder() module by default places the cylinder with its bottom on the XY plane. You can use center=true to make it center. The BOSL2 commands by default center objects, so the threaded rod will be centered. It may work better to combine this with cyl() which automatically centers for consistent behavior. Note that you probably want internal=true if you're making a threaded hole. Your model has a 50 unit tall cylinder, so its top is at z=50. The top of the threaded rod, which has height 16, is at z=8. Since you are beveling you will not want to follow Gene's advice to make it oversized. You have a but your threaded rod is only 16 units tall. So you need to raise it by 50-8 units. So like this: difference() { cylinder(h=50, d=16, $fn=150); translate([0,0,1.5]) cylinder(h=32.5, d=12); up(50-8) threaded_rod(d=12, l=16, pitch=2, internal=true, bevel2=0.5, bevel1=0); } I took the bevel off the bottom because that works better. Note that internal=true causes the bevels to reverse. And you may want to go up by slightly more to ensure no issues with coplanar faces, but in this case I think it only matters in preview, which doesn't affect you. By slightly more I mean 0.01 units. The easier way to address this is with attachments. That looks like this: include<BOSL2/std.scad> include<BOSL2/threading.scad> diff() cyl(h=50,d=16, $fn=150){ up(1.5)attach(BOT,BOT,inside=true) cyl(h=32.5,d=12); attach(TOP,TOP,inside=true) threaded_rod(d=12, l=16, pitch=2, internal=true, bevel2=0.5, bevel1=0); } You can also in general explicitly anchor BOSL2 objects so you know where they are, e.g. with anchor=BOTTOM to put the bottom at the origin, or anchor=CENTER to center it at the origin. On Wed, Jun 25, 2025 at 2:15 PM gene heskett via Discuss < discuss@lists.openscad.org> wrote: > On 6/25/25 13:04, Robbie Sandberg via Discuss wrote: > > Hi! > > Can someone tell me the z-position of a threaded_rod in BOSL2 when it’s > not translated? > > I’m using it in a difference function to cut a thread out of a tube. > > > > difference() { > > cylinder(h=50, d=16, $fn=150); > > translate([0,0,1.5]) > > cylinder(h=32.5, d=12); > > translate([0,0,34]) > > threaded_rod(d=12, l=16, pitch=2, internal=false, bevel=0.5); > > } > > > > That should bring the top of the rod to the top of the tube, but it > doesn’t. Instead the tube is closed at the top. > > I also tried adding half the rod’s length to the translation, in case > it’s originally centered. That produces an open tube, but with a rim at the > top. > > > > I should mention that I’m blind and can’t use the preview. > > Any advice is welcome. > That is a limitation I don't have, but what I do in such a case is make > the threaded rod I'm using for a difference, enough longer that both > ends project beyond the length of the item its being differenced out of. > Unfortunately I don't see the code for "threaded_rod()" so I can't test > it Can that be posted?l > > > > Cheers! Robbie > > _______________________________________________ > > OpenSCAD mailing list > > To unsubscribe send an email to discuss-leave@lists.openscad.org > > Cheers, Gene Heskett, CET. > -- > "There are four boxes to be used in defense of liberty: > soap, ballot, jury, and ammo. Please use in that order." > -Ed Howdershelt (Author, 1940) > If we desire respect for the law, we must first make the law respectable. > - Louis D. Brandeis > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
GH
gene heskett
Thu, Jun 26, 2025 12:40 AM

On 6/25/25 16:39, Adrian Mariano via Discuss wrote:

As the subject says, it's a BOSL2 question, which is where threaded_rod is
to be found.

Unfortunately I can't make it work by adding

include </home/gene/.local/share/OpenSCAD/libraries/BOSL2/std.scad>

include
</home/gene/.local/share/OpenSCAD/libraries/BOSL2/threading.scad; as
lines 3 & 4..

Perhaps someone else can help this gentleman. Obviously Adrian, I need
to get more familiar with BOSL2, and/or I need to dl a newer version.

It is now complaining about an error in shapes3d.scad line 15. But it
won't copy/paste from the error box. URL for latest?

The cylinder() module by default places the cylinder with its bottom on the
XY plane.  You can use center=true to make it center. The BOSL2 commands by
default center objects, so the threaded rod will be centered.  It may work
better to combine this with cyl() which automatically centers for
consistent behavior.  Note that you probably want internal=true if you're
making a threaded hole.  Your model has a 50 unit tall cylinder, so its
top is at z=50.  The top of the threaded rod, which has height 16, is at
z=8.  Since you are beveling you will not want to follow Gene's advice to
make it oversized.  You have a  but your threaded rod is only 16 units
tall.  So you need to raise it by 50-8 units.  So like this:

difference() {
cylinder(h=50, d=16, $fn=150);
translate([0,0,1.5])
cylinder(h=32.5, d=12);
up(50-8)
threaded_rod(d=12, l=16, pitch=2, internal=true, bevel2=0.5, bevel1=0);
}

I took the bevel off the bottom because that works better.  Note that
internal=true causes the bevels to reverse.  And you may want to go up by
slightly more to ensure no issues with coplanar faces, but in this case I
think it only matters in preview, which doesn't affect you.  By slightly
more I mean 0.01 units.

The easier way to address this is with attachments.  That looks like this:

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

diff()
cyl(h=50,d=16, $fn=150){
up(1.5)attach(BOT,BOT,inside=true) cyl(h=32.5,d=12);
attach(TOP,TOP,inside=true)
threaded_rod(d=12, l=16, pitch=2, internal=true, bevel2=0.5,
bevel1=0);
}

You can also in general explicitly anchor BOSL2 objects so you know where
they are, e.g. with anchor=BOTTOM to put the bottom at the origin, or
anchor=CENTER to center it at the origin.

On Wed, Jun 25, 2025 at 2:15 PM gene heskett via Discuss <
discuss@lists.openscad.org> wrote:

On 6/25/25 13:04, Robbie Sandberg via Discuss wrote:

Hi!
Can someone tell me the z-position of a threaded_rod in BOSL2 when it’s

not translated?

I’m using it in a difference function to cut a thread out of a tube.

difference() {
cylinder(h=50, d=16, $fn=150);
translate([0,0,1.5])
cylinder(h=32.5, d=12);
translate([0,0,34])
threaded_rod(d=12, l=16, pitch=2, internal=false, bevel=0.5);
}

That should bring the top of the rod to the top of the tube, but it

doesn’t. Instead the tube is closed at the top.

I also tried adding half the rod’s length to the translation, in case

it’s originally centered. That produces an open tube, but with a rim at the
top.

I should mention that I’m blind and can’t use the preview.
Any advice is welcome.

That is a limitation I don't have, but what I do in such a case is make
the threaded rod I'm using for a difference, enough longer that both
ends project beyond the length of the item its being differenced out of.
Unfortunately I don't see the code for "threaded_rod()" so I can't test
it  Can that be posted?l

Cheers! Robbie


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

Cheers, Gene Heskett, CET.

"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
- Louis D. Brandeis


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

Cheers, Gene Heskett, CET.

"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.

  • Louis D. Brandeis
On 6/25/25 16:39, Adrian Mariano via Discuss wrote: > As the subject says, it's a BOSL2 question, which is where threaded_rod is > to be found. Unfortunately I can't make it work by adding include </home/gene/.local/share/OpenSCAD/libraries/BOSL2/std.scad> include </home/gene/.local/share/OpenSCAD/libraries/BOSL2/threading.scad; as lines 3 & 4.. Perhaps someone else can help this gentleman. Obviously Adrian, I need to get more familiar with BOSL2, and/or I need to dl a newer version. It is now complaining about an error in shapes3d.scad line 15. But it won't copy/paste from the error box. URL for latest? > The cylinder() module by default places the cylinder with its bottom on the > XY plane. You can use center=true to make it center. The BOSL2 commands by > default center objects, so the threaded rod will be centered. It may work > better to combine this with cyl() which automatically centers for > consistent behavior. Note that you probably want internal=true if you're > making a threaded hole. Your model has a 50 unit tall cylinder, so its > top is at z=50. The top of the threaded rod, which has height 16, is at > z=8. Since you are beveling you will not want to follow Gene's advice to > make it oversized. You have a but your threaded rod is only 16 units > tall. So you need to raise it by 50-8 units. So like this: > > difference() { > cylinder(h=50, d=16, $fn=150); > translate([0,0,1.5]) > cylinder(h=32.5, d=12); > up(50-8) > threaded_rod(d=12, l=16, pitch=2, internal=true, bevel2=0.5, bevel1=0); > } > > I took the bevel off the bottom because that works better. Note that > internal=true causes the bevels to reverse. And you may want to go up by > slightly more to ensure no issues with coplanar faces, but in this case I > think it only matters in preview, which doesn't affect you. By slightly > more I mean 0.01 units. > > The easier way to address this is with attachments. That looks like this: > > include<BOSL2/std.scad> > include<BOSL2/threading.scad> > > diff() > cyl(h=50,d=16, $fn=150){ > up(1.5)attach(BOT,BOT,inside=true) cyl(h=32.5,d=12); > attach(TOP,TOP,inside=true) > threaded_rod(d=12, l=16, pitch=2, internal=true, bevel2=0.5, > bevel1=0); > } > > You can also in general explicitly anchor BOSL2 objects so you know where > they are, e.g. with anchor=BOTTOM to put the bottom at the origin, or > anchor=CENTER to center it at the origin. > > > On Wed, Jun 25, 2025 at 2:15 PM gene heskett via Discuss < > discuss@lists.openscad.org> wrote: > >> On 6/25/25 13:04, Robbie Sandberg via Discuss wrote: >>> Hi! >>> Can someone tell me the z-position of a threaded_rod in BOSL2 when it’s >> not translated? >>> I’m using it in a difference function to cut a thread out of a tube. >>> >>> difference() { >>> cylinder(h=50, d=16, $fn=150); >>> translate([0,0,1.5]) >>> cylinder(h=32.5, d=12); >>> translate([0,0,34]) >>> threaded_rod(d=12, l=16, pitch=2, internal=false, bevel=0.5); >>> } >>> >>> That should bring the top of the rod to the top of the tube, but it >> doesn’t. Instead the tube is closed at the top. >>> I also tried adding half the rod’s length to the translation, in case >> it’s originally centered. That produces an open tube, but with a rim at the >> top. >>> I should mention that I’m blind and can’t use the preview. >>> Any advice is welcome. >> That is a limitation I don't have, but what I do in such a case is make >> the threaded rod I'm using for a difference, enough longer that both >> ends project beyond the length of the item its being differenced out of. >> Unfortunately I don't see the code for "threaded_rod()" so I can't test >> it Can that be posted?l >>> Cheers! Robbie >>> _______________________________________________ >>> OpenSCAD mailing list >>> To unsubscribe send an email to discuss-leave@lists.openscad.org >> Cheers, Gene Heskett, CET. >> -- >> "There are four boxes to be used in defense of liberty: >> soap, ballot, jury, and ammo. Please use in that order." >> -Ed Howdershelt (Author, 1940) >> If we desire respect for the law, we must first make the law respectable. >> - Louis D. Brandeis >> _______________________________________________ >> 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 Cheers, Gene Heskett, CET. -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author, 1940) If we desire respect for the law, we must first make the law respectable. - Louis D. Brandeis
AM
Adrian Mariano
Thu, Jun 26, 2025 1:06 AM

The example I posted does not require a recent copy of BOSL2, so your
issues may depend on installation issues, but you didn't post the error
messages so that makes a more detailed diagnosis impossible. You should be
able to include BOSL2 without needing the full path if you have your
library path set up correctly.

If you want the most recent BOSL2 it can be found at:

https://github.com/BelfrySCAD/BOSL2

On Wed, Jun 25, 2025 at 8:40 PM gene heskett via Discuss <
discuss@lists.openscad.org> wrote:

On 6/25/25 16:39, Adrian Mariano via Discuss wrote:

As the subject says, it's a BOSL2 question, which is where threaded_rod

is

to be found.

Unfortunately I can't make it work by adding

include </home/gene/.local/share/OpenSCAD/libraries/BOSL2/std.scad>

include
</home/gene/.local/share/OpenSCAD/libraries/BOSL2/threading.scad; as
lines 3 & 4..

Perhaps someone else can help this gentleman. Obviously Adrian, I need
to get more familiar with BOSL2, and/or I need to dl a newer version.

It is now complaining about an error in shapes3d.scad line 15. But it
won't copy/paste from the error box. URL for latest?

The cylinder() module by default places the cylinder with its bottom on

the

XY plane.  You can use center=true to make it center. The BOSL2 commands

by

default center objects, so the threaded rod will be centered.  It may

work

better to combine this with cyl() which automatically centers for
consistent behavior.  Note that you probably want internal=true if

you're

making a threaded hole.  Your model has a 50 unit tall cylinder, so its
top is at z=50.  The top of the threaded rod, which has height 16, is at
z=8.  Since you are beveling you will not want to follow Gene's advice to
make it oversized.  You have a  but your threaded rod is only 16 units
tall.  So you need to raise it by 50-8 units.  So like this:

difference() {
cylinder(h=50, d=16, $fn=150);
translate([0,0,1.5])
cylinder(h=32.5, d=12);
up(50-8)
threaded_rod(d=12, l=16, pitch=2, internal=true, bevel2=0.5,

bevel1=0);

}

I took the bevel off the bottom because that works better.  Note that
internal=true causes the bevels to reverse.  And you may want to go up by
slightly more to ensure no issues with coplanar faces, but in this case I
think it only matters in preview, which doesn't affect you.  By slightly
more I mean 0.01 units.

The easier way to address this is with attachments.  That looks like

this:

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

diff()
cyl(h=50,d=16, $fn=150){
up(1.5)attach(BOT,BOT,inside=true) cyl(h=32.5,d=12);
attach(TOP,TOP,inside=true)
threaded_rod(d=12, l=16, pitch=2, internal=true, bevel2=0.5,
bevel1=0);
}

You can also in general explicitly anchor BOSL2 objects so you know where
they are, e.g. with anchor=BOTTOM to put the bottom at the origin, or
anchor=CENTER to center it at the origin.

On Wed, Jun 25, 2025 at 2:15 PM gene heskett via Discuss <
discuss@lists.openscad.org> wrote:

On 6/25/25 13:04, Robbie Sandberg via Discuss wrote:

Hi!
Can someone tell me the z-position of a threaded_rod in BOSL2 when it’s

not translated?

I’m using it in a difference function to cut a thread out of a tube.

difference() {
cylinder(h=50, d=16, $fn=150);
translate([0,0,1.5])
cylinder(h=32.5, d=12);
translate([0,0,34])
threaded_rod(d=12, l=16, pitch=2, internal=false, bevel=0.5);
}

That should bring the top of the rod to the top of the tube, but it

doesn’t. Instead the tube is closed at the top.

I also tried adding half the rod’s length to the translation, in case

it’s originally centered. That produces an open tube, but with a rim at

the

top.

I should mention that I’m blind and can’t use the preview.
Any advice is welcome.

That is a limitation I don't have, but what I do in such a case is make
the threaded rod I'm using for a difference, enough longer that both
ends project beyond the length of the item its being differenced out of.
Unfortunately I don't see the code for "threaded_rod()" so I can't test
it  Can that be posted?l

Cheers! Robbie


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

Cheers, Gene Heskett, CET.

"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law

respectable.

- Louis D. Brandeis

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

Cheers, Gene Heskett, CET.

"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.

  • Louis D. Brandeis

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

The example I posted does not require a recent copy of BOSL2, so your issues may depend on installation issues, but you didn't post the error messages so that makes a more detailed diagnosis impossible. You should be able to include BOSL2 without needing the full path if you have your library path set up correctly. If you want the most recent BOSL2 it can be found at: https://github.com/BelfrySCAD/BOSL2 On Wed, Jun 25, 2025 at 8:40 PM gene heskett via Discuss < discuss@lists.openscad.org> wrote: > > On 6/25/25 16:39, Adrian Mariano via Discuss wrote: > > As the subject says, it's a BOSL2 question, which is where threaded_rod > is > > to be found. > > Unfortunately I can't make it work by adding > > include </home/gene/.local/share/OpenSCAD/libraries/BOSL2/std.scad> > > include > </home/gene/.local/share/OpenSCAD/libraries/BOSL2/threading.scad; as > lines 3 & 4.. > > Perhaps someone else can help this gentleman. Obviously Adrian, I need > to get more familiar with BOSL2, and/or I need to dl a newer version. > > It is now complaining about an error in shapes3d.scad line 15. But it > won't copy/paste from the error box. URL for latest? > > > The cylinder() module by default places the cylinder with its bottom on > the > > XY plane. You can use center=true to make it center. The BOSL2 commands > by > > default center objects, so the threaded rod will be centered. It may > work > > better to combine this with cyl() which automatically centers for > > consistent behavior. Note that you probably want internal=true if > you're > > making a threaded hole. Your model has a 50 unit tall cylinder, so its > > top is at z=50. The top of the threaded rod, which has height 16, is at > > z=8. Since you are beveling you will not want to follow Gene's advice to > > make it oversized. You have a but your threaded rod is only 16 units > > tall. So you need to raise it by 50-8 units. So like this: > > > > difference() { > > cylinder(h=50, d=16, $fn=150); > > translate([0,0,1.5]) > > cylinder(h=32.5, d=12); > > up(50-8) > > threaded_rod(d=12, l=16, pitch=2, internal=true, bevel2=0.5, > bevel1=0); > > } > > > > I took the bevel off the bottom because that works better. Note that > > internal=true causes the bevels to reverse. And you may want to go up by > > slightly more to ensure no issues with coplanar faces, but in this case I > > think it only matters in preview, which doesn't affect you. By slightly > > more I mean 0.01 units. > > > > The easier way to address this is with attachments. That looks like > this: > > > > include<BOSL2/std.scad> > > include<BOSL2/threading.scad> > > > > diff() > > cyl(h=50,d=16, $fn=150){ > > up(1.5)attach(BOT,BOT,inside=true) cyl(h=32.5,d=12); > > attach(TOP,TOP,inside=true) > > threaded_rod(d=12, l=16, pitch=2, internal=true, bevel2=0.5, > > bevel1=0); > > } > > > > You can also in general explicitly anchor BOSL2 objects so you know where > > they are, e.g. with anchor=BOTTOM to put the bottom at the origin, or > > anchor=CENTER to center it at the origin. > > > > > > On Wed, Jun 25, 2025 at 2:15 PM gene heskett via Discuss < > > discuss@lists.openscad.org> wrote: > > > >> On 6/25/25 13:04, Robbie Sandberg via Discuss wrote: > >>> Hi! > >>> Can someone tell me the z-position of a threaded_rod in BOSL2 when it’s > >> not translated? > >>> I’m using it in a difference function to cut a thread out of a tube. > >>> > >>> difference() { > >>> cylinder(h=50, d=16, $fn=150); > >>> translate([0,0,1.5]) > >>> cylinder(h=32.5, d=12); > >>> translate([0,0,34]) > >>> threaded_rod(d=12, l=16, pitch=2, internal=false, bevel=0.5); > >>> } > >>> > >>> That should bring the top of the rod to the top of the tube, but it > >> doesn’t. Instead the tube is closed at the top. > >>> I also tried adding half the rod’s length to the translation, in case > >> it’s originally centered. That produces an open tube, but with a rim at > the > >> top. > >>> I should mention that I’m blind and can’t use the preview. > >>> Any advice is welcome. > >> That is a limitation I don't have, but what I do in such a case is make > >> the threaded rod I'm using for a difference, enough longer that both > >> ends project beyond the length of the item its being differenced out of. > >> Unfortunately I don't see the code for "threaded_rod()" so I can't test > >> it Can that be posted?l > >>> Cheers! Robbie > >>> _______________________________________________ > >>> OpenSCAD mailing list > >>> To unsubscribe send an email to discuss-leave@lists.openscad.org > >> Cheers, Gene Heskett, CET. > >> -- > >> "There are four boxes to be used in defense of liberty: > >> soap, ballot, jury, and ammo. Please use in that order." > >> -Ed Howdershelt (Author, 1940) > >> If we desire respect for the law, we must first make the law > respectable. > >> - Louis D. Brandeis > >> _______________________________________________ > >> 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 > > Cheers, Gene Heskett, CET. > -- > "There are four boxes to be used in defense of liberty: > soap, ballot, jury, and ammo. Please use in that order." > -Ed Howdershelt (Author, 1940) > If we desire respect for the law, we must first make the law respectable. > - Louis D. Brandeis > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
GH
gene heskett
Thu, Jun 26, 2025 5:48 AM

On 6/25/25 21:07, Adrian Mariano via Discuss wrote:

The example I posted does not require a recent copy of BOSL2, so your
issues may depend on installation issues, but you didn't post the error
messages so that makes a more detailed diagnosis impossible. You should be
able to include BOSL2 without needing the full path if you have your
library path set up correctly.

Apparently I don't.  And its not well covered in the cheat sheet.

If you want the most recent BOSL2 it can be found at:

https://github.com/BelfrySCAD/BOSL2

Thank you.

Cheers, Gene Heskett, CET.

--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.

  • Louis D. Brandeis
On 6/25/25 21:07, Adrian Mariano via Discuss wrote: > The example I posted does not require a recent copy of BOSL2, so your > issues may depend on installation issues, but you didn't post the error > messages so that makes a more detailed diagnosis impossible. You should be > able to include BOSL2 without needing the full path if you have your > library path set up correctly. Apparently I don't.  And its not well covered in the cheat sheet. > If you want the most recent BOSL2 it can be found at: > > https://github.com/BelfrySCAD/BOSL2 Thank you. Cheers, Gene Heskett, CET. -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author, 1940) If we desire respect for the law, we must first make the law respectable. - Louis D. Brandeis