changeset 4:f4edf83a75c7

Move screws and connectors to separate files
author Radomir Dopieralski <sheep-devel@sheep.art.pl>
date Sat, 20 Dec 2014 22:52:32 +0100
parents 360232501138
children 7c41f88d86fe
files boards/arduino.scad fasteners/screws.scad passives/connectors.scad servos/sg90.scad
diffstat 4 files changed, 37 insertions(+), 34 deletions(-) [+]
line wrap: on
line diff
--- a/boards/arduino.scad	Tue Aug 26 01:01:53 2014 +0200
+++ b/boards/arduino.scad	Sat Dec 20 22:52:32 2014 +0100
@@ -1,3 +1,5 @@
+use <../passives/connectors.scad>;
+
 module arduino_pro_mini() {
     difference() {
         union() {
@@ -59,11 +61,6 @@
     }
 }
 
-module goldpin() {
-    color("Gold") translate([0, 0, -0.5]) cylinder(r=0.3, h=25.4/3, $fn=4);
-    color("DimGray") translate([0, 0, 1]) cylinder(r=1.5, h=1.5, $fn=6);
-}
-
 module arduino_pro_mini_goldpins() {
     for (y = [0:11]) {
         translate([1.27, 1.27 + 2.54 * y, 1]) {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fasteners/screws.scad	Sat Dec 20 22:52:32 2014 +0100
@@ -0,0 +1,11 @@
+module SG90_horn_screw() {
+    color("DarkGray") union() {
+        translate([0, 0, 3.4]) difference() {
+            union() {
+                cylinder(r=1.4, h=0.9, $fn=6);
+                translate([0, 0, -3.4]) cylinder(r=0.8, h=4, $fn=8);
+            }
+            translate([-0.25, -2, 0.4]) cube([0.5, 4, 1]);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/passives/connectors.scad	Sat Dec 20 22:52:32 2014 +0100
@@ -0,0 +1,20 @@
+module goldpin() {
+    color("Gold") translate([0, 0, -0.5]) cylinder(r=0.3, h=25.4/3, $fn=4);
+    color("DimGray") translate([0, 0, 1]) cylinder(r=1.5, h=1.5, $fn=6);
+}
+
+module rc_servo_plug() {
+    color("Orange") translate([1.27, 1.27, 12]) cylinder(r1=0.75, r2=0, h=20);
+    color("Red") translate([1.27, 1.27 + 2.54, 12]) cylinder(r1=0.75, r2=0, h=20);
+    color("Brown") translate([1.27, 1.27 + 2.54 * 2, 12]) cylinder(r1=0.75, r2=0, h=20);
+    color("DimGray") difference() {
+        cube([2.54, 2.54 * 3, 12]);
+        translate([-1, -1, -1]) cube([1.25, 2.54 * 3 + 2, 7]);
+        rotate(45) cube([1, 2, 12], center=true);
+        translate([0, 2.54*3, 0]) rotate(-45) cube([1, 2, 12], center=true);
+        for (y = [0:2]) {
+            translate([1.27, 1.27 + y * 2.54, -1]) cylinder(r=0.5, h=12);
+        }
+    }
+}
+
--- a/servos/sg90.scad	Tue Aug 26 01:01:53 2014 +0200
+++ b/servos/sg90.scad	Sat Dec 20 22:52:32 2014 +0100
@@ -1,3 +1,6 @@
+use <../passives/connectors.scad>;
+use <../fasteners/screws.scad>;
+
 module SG90() {
     servo_height = 22.6;
     servo_width = 12.2;
@@ -86,36 +89,8 @@
     }
 }
 
-module SG90_horn_screw() {
-    color("DarkGray") union() {
-        translate([0, 0, 3.4]) difference() {
-            union() {
-                cylinder(r=1.4, h=0.9, $fn=6);
-                translate([0, 0, -3.4]) cylinder(r=0.8, h=4, $fn=8);
-            }
-            translate([-0.25, -2, 0.4]) cube([0.5, 4, 1]);
-        }
-    }
-}
-
-module SG90_plug() {
-    color("Orange") translate([1.27, 1.27, 12]) cylinder(r1=0.75, r2=0, h=20);
-    color("Red") translate([1.27, 1.27 + 2.54, 12]) cylinder(r1=0.75, r2=0, h=20);
-    color("Brown") translate([1.27, 1.27 + 2.54 * 2, 12]) cylinder(r1=0.75, r2=0, h=20);
-    color("DimGray") difference() {
-        cube([2.54, 2.54 * 3, 12]);
-        translate([-1, -1, -1]) cube([1.25, 2.54 * 3 + 2, 7]);
-        rotate(45) cube([1, 2, 12], center=true);
-        translate([0, 2.54*3, 0]) rotate(-45) cube([1, 2, 12], center=true);
-        for (y = [0:2]) {
-            translate([1.27, 1.27 + y * 2.54, -1]) cylinder(r=0.5, h=12);
-        }
-    }
-}
-
-
 SG90();
 SG90_double_horn(90);
 translate([0, 0, 10]) SG90_single_horn(90);
 translate([0, 0, 20]) SG90_horn_screw();
-translate([0, -20, 10]) SG90_plug();
+translate([0, -20, 10]) rc_servo_plug();