case: orient for printing

This commit is contained in:
2023-12-28 09:57:22 +00:00
parent c3b7ee3c44
commit 086f679323

View File

@@ -231,6 +231,9 @@ def battery_straps(phone, battery):
return straps
def orient_for_printing(case):
return case.rotate((0, 0, 0), (1000, 0, 0), angleDegrees=180)
def case(phone, battery=None):
body = phone.solids(tag="body")
volume = phone.solids(tag="volume")
@@ -251,4 +254,5 @@ def case(phone, battery=None):
case = case.cut(battery_cutaway(phone, battery))
case = case.add(battery_straps(phone, battery))
# TODO: compress the case along the Z axis, to give a snugger fit (0.8mm is a good compression)
case = orient_for_printing(case)
return case