From a5311d45a12b1ab433e478424f766c00079bcd0c Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 9 Sep 2017 16:08:00 +0100 Subject: [PATCH] sprinkler-spike-receptacle: wip --- sprinkler-spike-receptacle.scad | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/sprinkler-spike-receptacle.scad b/sprinkler-spike-receptacle.scad index 2c8534f..09d596f 100644 --- a/sprinkler-spike-receptacle.scad +++ b/sprinkler-spike-receptacle.scad @@ -9,6 +9,10 @@ spike_botpos_width = 11.68; topwall_width = 1.5; +// calculated + +main_width = spike_top_width + topwall_width*2; + module NegativePlan(){ x4z = (spike_top_width - spike_botpos_width) / @@ -21,16 +25,37 @@ module NegativePlan(){ polygon([[ x0, -5], [ x0, 0], [ x1, z1], + [ x1, z1+5], + [-x1, z1+5], [-x1, z1], [-x0, 0], [-x0, -5]]); } module PositivePlan(){ - w = spike_top_width + topwall_width*2; + w = main_width; translate([ -w/2, 0 ]) square([ w, main_height ]); } -PositivePlan(); -//NegativePlan(); +module PlanTest(){ + linear_extrude(height=2.0){ + difference(){ + PositivePlan(); + NegativePlan(); + } + difference(){ + circle(r = spike_botpos_width/2 + 5); + circle(r = spike_botpos_width/2); + translate([-50, 0]) square([100,50]); + } + } + linear_extrude(height=4.0){ + difference(){ + translate([ -main_width/2, 0 ]) square([ main_width, 2 ]); + NegativePlan(); + } + } +} + +PlanTest(); -- 2.30.2