-
Notifications
You must be signed in to change notification settings - Fork 5
/
connector.scad
45 lines (37 loc) · 1.16 KB
/
connector.scad
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/* (c) 2021++ by Saarbastler
** https://github.com/saarbastler/library.scad
**
** Header Connector Library
*/
/** Male Header
*/
module header254(pins, rows, pinDownLen= 3.5)
{
color("darkgrey") translate([-1.27, -1.27]) cube([2.54*pins,2.54*rows,2.54]);
for(x=[0:pins-1],y=[0:rows-1])
translate([x*2.54-.6/2,y*2.54-.6/2,-pinDownLen]) cube([0.6,0.6,8 + pinDownLen]);
}
/** Male Header rectangular
*/
module header254w(pins, rows, pinDownLen= 5.08)
{
color("darkgrey") translate([-1.27, -1.27,0]) cube([2.54*pins,2.54*rows,2.54]);
for(x=[0:pins-1],y=[0:rows-1])
{
translate([x*2.54-.6/2,y*2.54-.6/2,-pinDownLen]) cube([0.6,0.6,2.54+.4+pinDownLen + y*2.54]);
translate([x*2.54-.6/2,-4.4,2.54+0.4 + y*2.54]) cube([0.6, 4.7+y*2.54,0.6]);
}
}
/** Female Header
*/
module header254f(pins, rows, pinDownLen= 3.2, h=8.5)
{
color("darkgrey") translate([-1.27, -1.27,0]) difference()
{
cube([2.54*pins,2.54*rows,h]);
for(x=[0:pins-1],y=[0:rows-1])
translate([1.27-.8 + x*2.54,1.27-.8 + y*2.54,2]) cube([1.6,1.6,h]);
}
for(x=[0:pins-1],y=[0:rows-1])
translate([x*2.54-.6/2,y*2.54-.4/2,-pinDownLen]) cube([0.6,0.4,pinDownLen]);
}