Browse Source

add cutout at the bottom for screw so it sits flat

master
wes 1 year ago
parent
commit
3e5bb9538e
  1. 32
      planter.py

32
planter.py

@ -99,27 +99,29 @@ screw = ButtonHeadScrew(
size="M16-2", fastener_type="iso7380_1", length=10 * MM, simple=simple size="M16-2", fastener_type="iso7380_1", length=10 * MM, simple=simple
) )
bottom_radius = planter_radius / 1.85
scaled_screw = screw.scale(0.90) scaled_screw = screw.scale(0.90)
screw_result = ( screw_result = (
Workplane() Workplane()
.makePolygon(star(outerRadius=22, innerRadius=13, n=8)) .makePolygon(star(outerRadius=bottom_radius / 4.5, innerRadius=13, n=8))
.extrude(10) .extrude(8)
.union(scaled_screw) .union(scaled_screw)
) )
result = result.workplane(offset=planter_height / 2).cylinder(80, 65, combine="cut") 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 = (
result.workplane(offset=(planter_height / 2) - 27) result.workplane(offset=(planter_height / 2) - 27)
.makePolygon( .makePolygon(bottom_polygon)
regularPolygon(
nSides=11,
radius=planter_radius / 1.85,
thetaStart=holder_angle_offset,
thetaEnd=360 + holder_angle_offset,
)
)
.extrude(10) .extrude(10)
) )
@ -138,6 +140,16 @@ cut_tapered = Workplane().union(tapered_circle).cut(tapered_circle_inner)
result = result.union(cut_tapered) 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 = cq.Assembly()
assembly.add(screw_result, loc=cq.Location((0, 0, 0))) assembly.add(screw_result, loc=cq.Location((0, 0, 0)))

Loading…
Cancel
Save