From 7371c463687eaedab53b00ed1eb273aa99483e2e Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 23 Jul 2016 14:33:36 +0100 Subject: [PATCH] earring-stand: TestBase good --- earring-stand.scad | 39 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/earring-stand.scad b/earring-stand.scad index 08f0701..abca4e1 100644 --- a/earring-stand.scad +++ b/earring-stand.scad @@ -9,8 +9,13 @@ eclip_inner_xstrt = 0.5; eclip_ult_angle = 44; eclip_base_epsilon = 0.5; +eclip_each_len = 6; +eclip_each_every = 15; + test_alpha = 10; test_main_th = 1.5; +test_eclips = 5; +test_base_th = 2.5; // calculated @@ -27,6 +32,8 @@ ppxl = -(r0 / sqrt(2)) + (eclip_inner_strt / sqrt(2)); rgap = eclip_gap_rad; +eclip_base_offset = r1; + $fn=70; module EclipLPlanCore(alpha){ @@ -71,6 +78,32 @@ module EclipPPlan(main_th){ translate([ppxl, 0]) square([main_th, r2]); } -color("red") EclipLPlan(test_alpha); -color("blue") rotate(test_alpha) EclipPPlan(test_main_th); -color("green") EclipRPlan(test_alpha, test_main_th); +module TestBase(){ + translate([0,0, eclip_base_offset]){ + for (i=[0 : 2: test_eclips-1]) { + translate([0, i*eclip_each_every]) + rotate([90,0,0]) + linear_extrude(height=eclip_each_len) + EclipLPlan(test_alpha); + } + for (j=[1 : 2: test_eclips-2]) { + translate([0, j*eclip_each_every]) + rotate([90,0,0]) + linear_extrude(height=eclip_each_len) + EclipRPlan(test_alpha, test_main_th); + } + } + translate([-r2, -eclip_each_len, -test_base_th]) + cube([r2*2, + eclip_each_len + eclip_each_every*(test_eclips-1), + test_base_th]); +} + +module PlanDemo(){ + color("red") EclipLPlan(test_alpha); + color("blue") rotate(test_alpha) EclipPPlan(test_main_th); + color("green") EclipRPlan(test_alpha, test_main_th); +} + +//PlanDemo(); +TestBase(); -- 2.30.2