From cc471eecaf7652c2ce18d50ee8836175d0543956 Mon Sep 17 00:00:00 2001 From: Joel Ebel Date: Fri, 18 May 2018 01:35:16 -0400 Subject: [PATCH] Extrude the whole foot at once Generate a cross-section of the foot in 2D, then rotate/extrude the whole thing at once. This is a little easier to reason about than working in 3D. You can use debug view to see just the cross section with more ease. It save a line of code, too. --- files/U_Box_V104_Test_Cleaned.scad | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/files/U_Box_V104_Test_Cleaned.scad b/files/U_Box_V104_Test_Cleaned.scad index 690d57b..ad282a9 100644 --- a/files/U_Box_V104_Test_Cleaned.scad +++ b/files/U_Box_V104_Test_Cleaned.scad @@ -342,21 +342,20 @@ module Coque() { //Coque - Shell module foot(FootDia, FootHole, FootHeight) { Filet = FootFilet; color(Couleur1) { - difference() { + rotate_extrude($fn=100) { difference() { - cylinder(FootHeight, d=(FootDia + Filet*2), $fn=100); - rotate_extrude($fn=100) { - translate([FootDia/2 + Filet, Filet, 0]) { - offset(r=Filet, $fn=Resolution) { - square(FootHeight); - } - } - } - } - cylinder(FootHeight + 1, d=FootHole + CutoutMargin, $fn=100); - } + translate([FootHole/2, 0, 0]) { + square([(FootDia - FootHole)/2 + Filet, FootHeight]); + } + translate([FootDia/2 + Filet, Filet, 0]) { + offset(r=Filet, $fn=Resolution) { + square(FootHeight); + } + } + } + } } -} // Fin module foot +} /* Feet module