| 123456789101112131415161718192021222324252627282930313233343536373839404142 | 
							- include <../config/thread.scad>
 
- module thread_object(screw = false, oversize = 0) {
 
-     module base_object() {
 
-         top_height = thread_top_height + oversize;
 
-         translate([0, 0, -thread_height / 2]) {
 
-             translate([0, 0, thread_height]) {
 
-                 cylinder(r = thread_screw / 2, h = oversize);
 
-             }
 
-             cylinder(r = thread_diameter / 2, h = thread_height);
 
-             translate([0, 0, -oversize]) {
 
-                 cylinder(r = thread_top_diameter / 2, h = top_height);
 
-             }
 
-         }
 
-     }
 
-     module screw() {
 
-         cylinder(r = thread_screw / 2, h = thread_height, center = true);
 
-     }
 
-     module final_object() {
 
-         if (!screw) {
 
-             base_object();
 
-         } else {
 
-             difference() {
 
-                 base_object();
 
-                 screw();
 
-             }
 
-         }
 
-     }
 
-     render() {
 
-         final_object();
 
-     }
 
- }
 
- module thread_screw_object(height = 5) {
 
-     cylinder(r = thread_screw / 2, h = height, center = true);
 
- }
 
 
  |