From 3e5bb9538ebef7fcc50f735302e1888055bf6af1 Mon Sep 17 00:00:00 2001 From: wes Date: Tue, 23 Apr 2024 13:13:20 -0400 Subject: [PATCH] add cutout at the bottom for screw so it sits flat --- planter.py | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/planter.py b/planter.py index 3057c65..9063094 100644 --- a/planter.py +++ b/planter.py @@ -99,27 +99,29 @@ screw = ButtonHeadScrew( size="M16-2", fastener_type="iso7380_1", length=10 * MM, simple=simple ) +bottom_radius = planter_radius / 1.85 + scaled_screw = screw.scale(0.90) screw_result = ( Workplane() - .makePolygon(star(outerRadius=22, innerRadius=13, n=8)) - .extrude(10) + .makePolygon(star(outerRadius=bottom_radius / 4.5, innerRadius=13, n=8)) + .extrude(8) .union(scaled_screw) ) result = result.workplane(offset=planter_height / 2).cylinder(80, 65, combine="cut") +bottom_polygon = regularPolygon( + nSides=11, + radius=bottom_radius, + thetaStart=holder_angle_offset, + thetaEnd=360 + holder_angle_offset, +) + result = ( result.workplane(offset=(planter_height / 2) - 27) - .makePolygon( - regularPolygon( - nSides=11, - radius=planter_radius / 1.85, - thetaStart=holder_angle_offset, - thetaEnd=360 + holder_angle_offset, - ) - ) + .makePolygon(bottom_polygon) .extrude(10) ) @@ -138,6 +140,16 @@ cut_tapered = Workplane().union(tapered_circle).cut(tapered_circle_inner) result = result.union(cut_tapered) +result = ( + result.workplane(offset=(planter_height / 2) - 25) + .makePolygon(bottom_polygon) + .extrude(5) +) + +result = result.workplane(offset=(planter_height / 2) - 25).cylinder( + 8, bottom_radius / 3, combine="cut" +) + assembly = cq.Assembly() assembly.add(screw_result, loc=cq.Location((0, 0, 0)))