Yogurt Pot Storage Rack
FleetingFirst, let’s try this model
https://www.thingiverse.com/thing:3889080
Nothing wrong with it. It does the job well.
I also need to have one for other sizes of yogurt pot. Let’s get our hands dirty with cadquery.
import cadquery as cq
def support():
return (
cq.Workplane("XY")
# the main body of the holder
.box(
xnum*width
,
ynum*width
,
height
)
.edges("|Z").fillet(8) # make the corners round, I don't understand the value I put here
# let's make a small pipe to hold the yogurt pots
.faces(">Z")
.rarray(
width,
width,
xnum,
ynum,
True
)
.cylinder(
bump_height,
diameter/2 + 2,
combine=True,
centered=(True, True, False)
)
.rarray(
width,
width,
xnum,
ynum,
True
)
.cylinder(
bump_height,
diameter/2,
combine="cut",
centered=(True, True, False)
)
# then holes to avoid keeping moisture in them
.rarray(
width,
width,
xnum,
ynum,
True
)
.circle(
short_diameter/2
)
.cutThruAll()
)
def foot(depth):
return (
cq.Workplane("XY")
# let's build from top to bottom
.transformed(offset=cq.Vector(0, 0, -height/2), rotate=cq.Vector(0, 180, 0))
# a central column big enough to resist the weight of the yogurt pots
.cylinder(foot_length, foot_diameter/2, centered=(True, True, False))
.tag("bottom")
# let's make sure the cylinder shape goes as the same height of the
# supports
.faces("<Z", tag="bottom")
.cylinder(foot_depth, foot_diameter/2)
# first support, along the Y axis
.faces("<Z", tag="bottom")
.box(xnum*width - foot_support_width, foot_support_width, depth, combine=True)
## with reinforcement at its end
.faces(">X")
.box(foot_support_width, ynum*width * 0.75, depth, combine=True)
.faces("<X")
.box(foot_support_width, ynum*width * 0.75, depth, combine=True)
# seconds support, along the X axis
.faces("<Z", tag="bottom")
.box(foot_support_width, ynum*width - foot_support_width, depth, combine=True)
## with reinforcement at its end
.faces(">Y")
.box(ynum*width * 0.75, foot_support_width, depth, combine=True)
.faces("<Y")
.box(ynum*width * 0.75, foot_support_width, depth, combine=True)
.edges("|Z").fillet(0.9) # make the corners round, I don't understand the value I put here
)
if model == "support":
res = (
support()
# leave some space for the foot of the upper level
.cut(foot(bump_height).translate(vec=cq.Vector(0, 0, foot_length + height + bump_height / 2)))
# leave some space for the foot of the lower level
.cut(foot(foot_depth).translate(vec=cq.Vector(0, 0, connector_depth)))
)
else:
res = foot(foot_depth)
cq.exporters.export(res, out)
return out
Now, my yogurt pots are correctly organised. No more mold or spider web that needs to clean them before use!