1
0
mirror of https://github.com/nophead/NopSCADlib.git synced 2025-01-16 13:08:15 +01:00

Added d_hole() module.

This commit is contained in:
Chris Palmer 2024-03-14 21:02:20 +00:00
parent 929abbefda
commit 67408f8422
2 changed files with 9 additions and 1 deletions

View File

@ -987,6 +987,7 @@ D-connectors. Can be any number of ways, male or female, solder buckets, PCB mou
| Module | Description |
|:--- |:--- |
| `d_connector_holes(type)` | Place children at the screw hole positions |
| `d_hole(type, h = 0, center = true, clearance = 0.2)` | Make a hole to clear the back of d-connector |
| `d_pillar()` | Draw a pillar for a D-connector |
| `d_plug(type, socket = false, pcb = false, idc = false)` | Draw specified D plug, which can be IDC, PCB or plain solder bucket |
| `d_plug_D(length, width, rad)` | D plug D shape |

View File

@ -80,6 +80,13 @@ module d_plug_D(length, width, rad) { //! D plug D shape
circle(rad);
}
module d_hole(type, h = 0, center = true, clearance = 0.2) { //! Make a hole to clear the back of d-connector
dwall = 0.5 + clearance;
extrude_if(h, center)
d_plug_D(d_lengths(type)[0] + 2 * dwall, d_widths(type)[0] + 2 * dwall, 2.5 + dwall);
}
module d_plug(type, socket = false, pcb = false, idc = false) { //! Draw specified D plug, which can be IDC, PCB or plain solder bucket
hole_r = 3.05 / 2;
dwall = 0.5;
@ -106,7 +113,7 @@ module d_plug(type, socket = false, pcb = false, idc = false) { //! Draw specifi
// Shell
//
color(d_plug_shell_colour) {
linear_extrude( d_flange_thickness(type))
linear_extrude(d_flange_thickness(type))
difference() {
rounded_square([flange_length, flange_width], 2);