threads-scad icon indicating copy to clipboard operation
threads-scad copied to clipboard

Automatic pitch calculation in ScrewHole is broken

Open lorf opened this issue 3 years ago • 2 comments

use <threads-scad/threads.scad>;

intersection() {
    union() {
        ScrewThread(5, 10);
        
        ScrewHole(5, 10)
            cylinder(d=10,h=10);
    }
    cube(10);
}

bug1

use <threads-scad/threads.scad>;

intersection() {
    union() {
        ScrewThread(5, 10);
        
        ScrewHole(5, 10, pitch=0.8)
            cylinder(d=10,h=10);
    }
    cube(10);
}

bug2

lorf avatar Apr 11 '21 10:04 lorf

I've love for #7 or #3 to get merged to fix this, as I just ran into it too.

Without the patch in place, a workaround is to always specify a pitch= value, which can be the (proper) default via:

ScrewHole(d, ...otherargs..., pitch=ThreadPitch(d))

jagerman avatar Dec 04 '22 20:12 jagerman

I appreciate the findings here. I also ran into this problem. Apparently 2 years later and the fixes haven't been merged.

kevinmic avatar Jun 20 '24 05:06 kevinmic