mirror of
https://github.com/DJSundog/NopSCADlib.git
synced 2024-11-23 07:13:51 -05:00
Fixed countersink shape.
This commit is contained in:
parent
dd757a1461
commit
344e8d1583
@ -2940,7 +2940,7 @@ Machine screws and wood screws with various head styles.
|
|||||||
|:--- |:--- |
|
|:--- |:--- |
|
||||||
| ```screw(type, length, hob_point = 0, nylon = false)``` | Draw specified screw, optionally hobbed or nylon |
|
| ```screw(type, length, hob_point = 0, nylon = false)``` | Draw specified screw, optionally hobbed or nylon |
|
||||||
| ```screw_and_washer(type, length, star = false, penny = false)``` | Screw with a washer which can be standard or penny and an optional star washer on top |
|
| ```screw_and_washer(type, length, star = false, penny = false)``` | Screw with a washer which can be standard or penny and an optional star washer on top |
|
||||||
| ```screw_countersink(type)``` | Countersink shape |
|
| ```screw_countersink(type, drilled = true)``` | Countersink shape |
|
||||||
|
|
||||||
![screws](tests/png/screws.png)
|
![screws](tests/png/screws.png)
|
||||||
|
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 19 KiB |
Binary file not shown.
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 62 KiB |
@ -116,7 +116,7 @@ module mains_socket(type) { //! Draw specified 13A socket
|
|||||||
cylinder(r = screw_clearance_radius(screw), h = 100, center = true);
|
cylinder(r = screw_clearance_radius(screw), h = 100, center = true);
|
||||||
|
|
||||||
translate_z(height)
|
translate_z(height)
|
||||||
screw_countersink(screw);
|
screw_countersink(screw, drilled = false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -247,14 +247,23 @@ module screw(type, length, hob_point = 0, nylon = false) { //! Draw specified sc
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module screw_countersink(type) { //! Countersink shape
|
module screw_countersink(type, drilled = true) { //! Countersink shape
|
||||||
head_type = screw_head_type(type);
|
head_type = screw_head_type(type);
|
||||||
head_rad = screw_head_radius(type);
|
head_rad = screw_head_radius(type);
|
||||||
head_height = head_rad;
|
rad = screw_radius(type);
|
||||||
|
head_t = rad / 5;
|
||||||
|
head_height = head_rad + head_t;
|
||||||
|
|
||||||
if(head_type == hs_cs || head_type == hs_cs_cap)
|
if(head_type == hs_cs || head_type == hs_cs_cap)
|
||||||
translate_z(-head_height)
|
translate_z(-head_height)
|
||||||
cylinder(h = head_height, r1 = 0, r2 = head_rad);
|
if(drilled)
|
||||||
|
cylinder(h = head_height, r1 = 0, r2 = head_rad + head_t);
|
||||||
|
else
|
||||||
|
intersection() {
|
||||||
|
cylinder(h = head_height + eps, r1 = 0, r2 = head_rad + head_t);
|
||||||
|
|
||||||
|
cylinder(h = head_height + eps, r = head_rad + eps);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module screw_and_washer(type, length, star = false, penny = false) { //! Screw with a washer which can be standard or penny and an optional star washer on top
|
module screw_and_washer(type, length, star = false, penny = false) { //! Screw with a washer which can be standard or penny and an optional star washer on top
|
||||||
|
Loading…
Reference in New Issue
Block a user