From 1bb0ec3e7fab29e371bdf6bf5a3eecdf19087e3a Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 31 May 2022 18:06:37 +0100 Subject: [PATCH] laptop-sound-cable-hooks: wip Signed-off-by: Ian Jackson --- laptop-sound-cable-hooks.scad | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/laptop-sound-cable-hooks.scad b/laptop-sound-cable-hooks.scad index 30a72e0..d0a7b9c 100644 --- a/laptop-sound-cable-hooks.scad +++ b/laptop-sound-cable-hooks.scad @@ -22,18 +22,37 @@ module PlugMainPlan() { } } -module PlugBodyPlan() { +module PlugHolderPlan() { intersection(){ hull() offset(r= wall_th) PlugMainPlan(); - rectfromto([-100,-100], [0,+100]); + + rectfromto([-100,-100], [-0.1,+100]); } } module DemoPlan() { - translate([0,0,-5]) color("grey") PlugBodyPlan(); + translate([0,0,-5]) color("grey") PlugHolderPlan(); PlugMainPlan(); } -DemoPlan(); +module RotateIntersect(n=6){ + intersection_for (r = [0:n-1]) { + rotate([r/n * 360,0,0]) + linextr(-100,100) children(0); + } +} + +module PlugHolder(){ + difference(){ + RotateIntersect(8) + PlugHolderPlan(); + + RotateIntersect(6) + PlugMainPlan(); + } +} + +//DemoPlan(); +PlugHolder(); -- 2.30.2