From af3807795ac618ae60652fe8d21e8b3fc27f1d76 Mon Sep 17 00:00:00 2001 From: Jan Huwald Date: Tue, 11 Feb 2014 15:25:28 +0100 Subject: refractor from connector_front to connector 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(); -- cgit v0.10.1