|
20 | 20 | // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
21 | 21 | //
|
22 | 22 |
|
| 23 | +//arduino("Mega"); |
23 | 24 |
|
24 | 25 | //Constructs a roughed out arduino board
|
25 | 26 | //Current only USB and power on the board but will add headers later
|
@@ -97,8 +98,7 @@ module boardShape( boardType = "Uno", offset = 0, height = boardHeight ) {
|
97 | 98 | polygon(points = dueBoardPath);
|
98 | 99 | } else {
|
99 | 100 | echo("Board type not found!");
|
100 |
| - } |
101 |
| - |
| 101 | + } |
102 | 102 | }
|
103 | 103 |
|
104 | 104 | //This is used for placing the mounting holes
|
@@ -151,9 +151,23 @@ module usb( boardType = "Uno", extend = 0, offset = 0 ) {
|
151 | 151 | }
|
152 | 152 |
|
153 | 153 | //similar to usb function but for the power jack
|
154 |
| -module power( boardType = "Uno", extend = 0, offset = 0 ) { |
155 |
| - translate([41.14 - offset,-(1.8 + extend), boardHeight - offset]) |
156 |
| - cube([9 + offset * 2, 13.2 + extend, 10.9 + offset * 2]); |
| 154 | +module power( boardType = "Uno", extend = 0, offset = 0, circleCut = false ) { |
| 155 | + width = 9; |
| 156 | + height = 10.9; |
| 157 | + radius = 6.33 / 2; |
| 158 | + distanceFromTop = 1.36; |
| 159 | + if( !circleCut ) { |
| 160 | + translate([41.14, 0, boardHeight]) { // difference() { |
| 161 | + translate([-offset, -(1.8 + extend), -offset]) |
| 162 | + cube([width + offset * 2, 13.2 + extend, height + offset * 2]); |
| 163 | +// translate([ width / 2, 5, 10.9 - radius - distanceFromTop]) rotate( [90, 0, 0]) |
| 164 | +// cylinder( r = radius, h = 20, $fn = 32 ); |
| 165 | + } |
| 166 | + } else { |
| 167 | + translate([ 41.14 + width / 2, 0, boardHeight + height - radius - distanceFromTop]) |
| 168 | + rotate( [90, 0, 0]) |
| 169 | + cylinder( r = radius + offset, h = extend, $fn = 64 ); |
| 170 | + } |
157 | 171 | }
|
158 | 172 |
|
159 | 173 | module headers( boardType = "Uno", extend = 0, offset = 0 ) {
|
|
0 commit comments