discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

screw tolerance -- self tap not allowed?

BR
Bob Roos
Thu, Apr 2, 2026 9:47 PM

Hello Discuss,

// vent anchor
// Bob Roos
// April 2, 2026

include <BOSL2/std.scad> //or screws or threading
include <BOSL2/screws.scad> //or screws or
$fn=24;
Inch=25.4;
LHF = .28;      // Layer height for faster build
LH=.25; // Layer height after 1st layer
FL=.2; // first layer
ShowInside=0; // switch for applying cutout section

D1 = 17;
D2 = 12;

difference(){
union(){
cyl(d=D1,h=2,anchor=BOTTOM);
cyl(d=D2,h=8,anchor=TOP,$fn=6);
}

up(3) screw_hole("1/4-20,1.5",thread=true,tolerance="self tap",anchor=TOP);

}

I get this errorCompiling design (CSG Tree generation)...
ERROR: Assertion 'tolOK' failed: "Tolerance was self tap. Must be one of 1A, 2A, 3A, 1B, 2B, 3B" in file ../../../../../Program Files/OpenSCAD (Nightly)/libraries/BOSL2/screws.scad, line 1323

--
Best regards and thanks,
Bob                          mailto:roosbob@wybatap.com

Hello Discuss, // vent anchor // Bob Roos // April 2, 2026 include <BOSL2/std.scad> //or screws or threading include <BOSL2/screws.scad> //or screws or $fn=24; Inch=25.4; LHF = .28; // Layer height for faster build LH=.25; // Layer height after 1st layer FL=.2; // first layer ShowInside=0; // switch for applying cutout section D1 = 17; D2 = 12; difference(){ union(){ cyl(d=D1,h=2,anchor=BOTTOM); cyl(d=D2,h=8,anchor=TOP,$fn=6); } # up(3) screw_hole("1/4-20,1.5",thread=true,tolerance="self tap",anchor=TOP); } I get this errorCompiling design (CSG Tree generation)... ERROR: Assertion 'tolOK' failed: "Tolerance was self tap. Must be one of 1A, 2A, 3A, 1B, 2B, 3B" in file ../../../../../Program Files/OpenSCAD (Nightly)/libraries/BOSL2/screws.scad, line 1323 -- Best regards and thanks, Bob mailto:roosbob@wybatap.com
CC
Cory Cross
Fri, Apr 3, 2026 3:34 AM

Bob, I think you're just the first one to try using "self tap" with a
UTS or ISO named thread instead of specifying diameter and pitch, and it
turns out not to be implemented. Nobody's touched the relevant code in
years, so it's not a regression.

  • Cory

On 4/2/26 2:47 PM, Bob Roos via Discuss wrote:

difference(){
union(){
cyl(d=D1,h=2,anchor=BOTTOM);
cyl(d=D2,h=8,anchor=TOP,$fn=6);
}
# up(3) screw_hole("1/4-20,1.5",thread=true,tolerance="self tap",anchor=TOP);
}

I get this errorCompiling design (CSG Tree generation)...
ERROR: Assertion 'tolOK' failed: "Tolerance was self tap. Must be one of 1A, 2A, 3A, 1B, 2B, 3B" in file ../../../../../Program Files/OpenSCAD (Nightly)/libraries/BOSL2/screws.scad, line 1323

Bob, I think you're just the first one to try using "self tap" with a UTS or ISO named thread instead of specifying diameter and pitch, and it turns out not to be implemented. Nobody's touched the relevant code in years, so it's not a regression. - Cory On 4/2/26 2:47 PM, Bob Roos via Discuss wrote: > difference(){ > union(){ > cyl(d=D1,h=2,anchor=BOTTOM); > cyl(d=D2,h=8,anchor=TOP,$fn=6); > } > # up(3) screw_hole("1/4-20,1.5",thread=true,tolerance="self tap",anchor=TOP); > } > > I get this errorCompiling design (CSG Tree generation)... > ERROR: Assertion 'tolOK' failed: "Tolerance was self tap. Must be one of 1A, 2A, 3A, 1B, 2B, 3B" in file ../../../../../Program Files/OpenSCAD (Nightly)/libraries/BOSL2/screws.scad, line 1323 >
AM
Adrian Mariano
Fri, Apr 3, 2026 10:18 AM

The problem is that you cannot make a threaded hole with a self tap
tolerance.  You've got thread=true.  That case needs a better error
message.  Now there seems to be a bug where if you set thread=false you
also get a (different) error.  If you do not provide thread= at all then it
works.

On Thu, Apr 2, 2026 at 5:47 PM Bob Roos via Discuss <
discuss@lists.openscad.org> wrote:

Hello Discuss,

// vent anchor
// Bob Roos
// April 2, 2026

include <BOSL2/std.scad> //or screws or threading
include <BOSL2/screws.scad> //or screws or
$fn=24;
Inch=25.4;
LHF = .28;      // Layer height for faster build
LH=.25; // Layer height after 1st layer
FL=.2; // first layer
ShowInside=0; // switch for applying cutout section

D1 = 17;
D2 = 12;

difference(){
union(){
cyl(d=D1,h=2,anchor=BOTTOM);
cyl(d=D2,h=8,anchor=TOP,$fn=6);
}

up(3) screw_hole("1/4-20,1.5",thread=true,tolerance="self

tap",anchor=TOP);
}

I get this errorCompiling design (CSG Tree generation)...
ERROR: Assertion 'tolOK' failed: "Tolerance was self tap. Must be one of
1A, 2A, 3A, 1B, 2B, 3B" in file ../../../../../Program Files/OpenSCAD
(Nightly)/libraries/BOSL2/screws.scad, line 1323

--
Best regards and thanks,
Bob                          mailto:roosbob@wybatap.com


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

The problem is that you cannot make a threaded hole with a self tap tolerance. You've got thread=true. That case needs a better error message. Now there seems to be a bug where if you set thread=false you also get a (different) error. If you do not provide thread= at all then it works. On Thu, Apr 2, 2026 at 5:47 PM Bob Roos via Discuss < discuss@lists.openscad.org> wrote: > Hello Discuss, > > // vent anchor > // Bob Roos > // April 2, 2026 > > include <BOSL2/std.scad> //or screws or threading > include <BOSL2/screws.scad> //or screws or > $fn=24; > Inch=25.4; > LHF = .28; // Layer height for faster build > LH=.25; // Layer height after 1st layer > FL=.2; // first layer > ShowInside=0; // switch for applying cutout section > > D1 = 17; > D2 = 12; > > difference(){ > union(){ > cyl(d=D1,h=2,anchor=BOTTOM); > cyl(d=D2,h=8,anchor=TOP,$fn=6); > } > # up(3) screw_hole("1/4-20,1.5",thread=true,tolerance="self > tap",anchor=TOP); > } > > I get this errorCompiling design (CSG Tree generation)... > ERROR: Assertion 'tolOK' failed: "Tolerance was self tap. Must be one of > 1A, 2A, 3A, 1B, 2B, 3B" in file ../../../../../Program Files/OpenSCAD > (Nightly)/libraries/BOSL2/screws.scad, line 1323 > > -- > Best regards and thanks, > Bob mailto:roosbob@wybatap.com > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
JR
jos.richters@visualdata.nl
Fri, Apr 3, 2026 8:44 PM

Hello Bob**,**

I use another threat nut ans bolt set of functions.

You may have a look here:

OpenScad/threads.scad at main · verhas/OpenScad · GitHub

Works like a charm and fully parametric.

Cheers,

Jos.

Almelo (NL)

Hello Bob**,** I use another threat nut ans bolt set of functions. You may have a look here: [OpenScad/threads.scad at main · verhas/OpenScad · GitHub](https://github.com/verhas/OpenScad/blob/main/threads.scad) Works like a charm and fully parametric. Cheers, Jos. Almelo (NL)
AM
Adrian Mariano
Fri, Apr 3, 2026 10:52 PM

Not a great fit for Bob's needs given that the library is metric but Bob is
using imperial sizing 1/4-20 and Bob's whole issue was the self tap
feature, which is not supported by Kirshner's library.

I'm pushing out improved error handling for the self tap feature.  You'll
get a comprehensible error if thread=true.  And thread=false is supposed to
also be an error because it's equivalent to setting the pitch to zero.

On Fri, Apr 3, 2026 at 4:45 PM jos.richters--- via Discuss <
discuss@lists.openscad.org> wrote:

Hello Bob*,*

I use another threat nut ans bolt set of functions.

You may have a look here:

OpenScad/threads.scad at main · verhas/OpenScad · GitHub
https://github.com/verhas/OpenScad/blob/main/threads.scad

Works like a charm and fully parametric.

Cheers,

Jos.

Almelo (NL)


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

Not a great fit for Bob's needs given that the library is metric but Bob is using imperial sizing 1/4-20 and Bob's whole issue was the self tap feature, which is not supported by Kirshner's library. I'm pushing out improved error handling for the self tap feature. You'll get a comprehensible error if thread=true. And thread=false is supposed to also be an error because it's equivalent to setting the pitch to zero. On Fri, Apr 3, 2026 at 4:45 PM jos.richters--- via Discuss < discuss@lists.openscad.org> wrote: > Hello Bob*,* > > I use another threat nut ans bolt set of functions. > > You may have a look here: > > OpenScad/threads.scad at main · verhas/OpenScad · GitHub > <https://github.com/verhas/OpenScad/blob/main/threads.scad> > > Works like a charm and fully parametric. > > Cheers, > > Jos. > > Almelo (NL) > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org