summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Huwald <jh@sotun.de>2014-02-11 14:25:28 (GMT)
committerJan Huwald <jh@sotun.de>2014-02-11 14:25:28 (GMT)
commitaf3807795ac618ae60652fe8d21e8b3fc27f1d76 (patch)
tree7f8f49fb49dfa78597d876433e16f17a1fd3a38a
parent96f9b7bd72c30bb39a6f770d78bdf38575814e92 (diff)
refractor from connector_front to connector
-rw-r--r--connector.scad19
-rw-r--r--connector_front.scad12
2 files changed, 20 insertions, 11 deletions
diff --git a/connector.scad b/connector.scad
index bc17e98..7bc7493 100644
--- a/connector.scad
+++ b/connector.scad
@@ -37,3 +37,22 @@ module connector_half(
if (!border_top)
translate([rail_width, bar_thickness / 2, tray_height]) nipple(pla_epsilon);
}
+
+module connector(
+ border_left = false,
+ border_right = false,
+ border_top = false,
+ border_bottom = false
+) {
+ difference() {
+ children();
+
+ // female leftward positioning nippel
+ if (!border_left)
+ translate([-tray_width/2, bar_thickness / 2, tray_height - bar_thickness / 2]) rotate([0, 270, 0]) nipple(pla_epsilon);
+ }
+
+ // male rightward positioning nippel
+ if (!border_right)
+ translate([tray_width / 2, bar_thickness / 2, tray_height - bar_thickness / 2]) rotate([0, 270, 0]) nipple();
+} \ No newline at end of file
diff --git a/connector_front.scad b/connector_front.scad
index 9562b02..867fb3f 100644
--- a/connector_front.scad
+++ b/connector_front.scad
@@ -34,20 +34,10 @@ module front_connector(
border_top = false,
border_bottom = false
) {
- difference() {
- union() {
+ connector(border_left, border_right, border_top, border_bottom) {
mirror() front_connector_half(border_left, border_top, border_bottom);
front_connector_half(border_right, border_top, border_bottom);
- }
-
- // female leftward positioning nippel
- if (!border_left)
- translate([-tray_width/2, bar_thickness / 2, tray_height - bar_thickness / 2]) rotate([0, 270, 0]) nipple(pla_epsilon);
}
-
- // male rightward positioning nippel
- if (!border_right)
- translate([tray_width / 2, bar_thickness / 2, tray_height - bar_thickness / 2]) rotate([0, 270, 0]) nipple();
}
front_connector();
contact: Jan Huwald // Impressum