Skip to content

Commit

Permalink
Put a chamfer on the bottom cap so water will flow out.
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasian committed Apr 14, 2018
1 parent 80cb328 commit 02da38b
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions make_grow_tower.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def __init__(self,
self.handle_radius = 5
self.handle_width = 2

def make_cap(self, bottom=True):
def make_cap(self, bottom=True,chammed=True):
"""
"""
cut_tower = self.make_em_stack(self.make_raw_tower())
Expand Down Expand Up @@ -97,6 +97,10 @@ def make_cap(self, bottom=True):
cap = cap.cut(cut_tower)
bottom_cutout = Part.makeCylinder(bottom_cap_hole_radius, cap_thickness, vec(0,0,-cap_thickness/2) )
cap = cap.cut(bottom_cutout)
if chammed:
edges = [edge for edge in range(75,84)]
cap = self.chamfer_me_baby(cap, edges, cham_lens=[9.0,3.0])

return cap
else:
cap.translate(vec(0, 0, tower_height))
Expand Down Expand Up @@ -160,7 +164,7 @@ def make_destructor(self):
return tube_destructor


def chamfer_me_baby(self, part, edges=[], cham_len=1.0):
def chamfer_me_baby(self, part, edges=[], cham_lens=[1.0,1.0]):
"""
Helper function to chamfer edges given their numbers and chamfer length.
"""
Expand All @@ -171,7 +175,7 @@ def chamfer_me_baby(self, part, edges=[], cham_len=1.0):
myEdges = []
if len(edges) > 0:
for edge in edges:
myEdges.append((edge, cham_len, cham_len))
myEdges.append((edge, cham_lens[0], cham_lens[1]))
else:
return None
FreeCAD.ActiveDocument.myChamfer.Edges = myEdges
Expand All @@ -182,6 +186,9 @@ def chamfer_me_baby(self, part, edges=[], cham_len=1.0):
App.getDocument("Unnamed").removeObject("myPart")
return res

def chamfer_my_tube(self, tower):
chamed_tube = chamfer_me_baby()


def make_raw_tower(self):
"""
Expand Down Expand Up @@ -235,7 +242,7 @@ def make_em_stack(self, tower_shell):
pan = Part.makeCylinder(top_cutout_radius, cutout_height)
pan.translate(vec(0, 0, move_up))
# chamfer Edge 3.
#cham_pan = self.chamfer_me_baby(pan, [3], cham_len=cham_len)
#cham_pan = self.chamfer_me_baby(pan, [3], cham_lens=[cham_len, cham_len])
cut_top = tower_shell.cut(pan)

# CUT AROUND THE OUTER SURFACE ON BOTTOM. WATER GOES DOWN.
Expand All @@ -247,7 +254,7 @@ def make_em_stack(self, tower_shell):
bottom_ring = outer_ring.cut(inner_volume)
# chamfer Edge 4
both_cut = cut_top.cut(bottom_ring)
# both_cut_cham = self.chamfer_me_baby(both_cut, [35], cham_len=cham_len)
# both_cut_cham = self.chamfer_me_baby(both_cut, [35], cham_lens=[cham_len,cham_len])

return both_cut

Expand Down

0 comments on commit 02da38b

Please sign in to comment.