adrianschlatter / threadlib

thread library for OpenSCAD
BSD 3-Clause "New" or "Revised" License
351 stars 34 forks source link

Example M4 profile in DesignOfThreadlib.md gives unexpected results (winding order) #84

Closed bobc closed 3 months ago

bobc commented 8 months ago

The example M4 thread profile in docs/DesignOfThreadlib.md appears to give incorrect results (invalid faces) due to winding order. This confused me for a while when doing a difference() and getting weird output.

Suggested fix:

Change

["M4-int", [0.7, -2.1095, 4.1095,
            [
             [0, 0.3465], 
             [0, -0.3465], 
             [0.43304671, -0.09648036], 
             [0.43304671, 0.09648036]
            ]]]

to

["M4-int", [0.7, -2.1095, 4.1095,
            [
             [0, -0.3465], 
             [0, 0.3465], 
             [0.43304671, 0.09648036], 
             [0.43304671, -0.09648036]
            ]]]
adrianschlatter commented 8 months ago

I just checked and the definition in the docs is actually what threadlib uses (in THREAD_TABLE.scad). If it is an error, it does not only affect the docs. Could you provide the code that resulted in invalid faces for you?