Create STL for case pieces too

This commit is contained in:
Roberto Alsina 2022-07-24 10:30:22 -03:00
parent 5dd7b5578f
commit d0c1a2cdae
1 changed files with 68 additions and 50 deletions

View File

@ -37,8 +37,10 @@ back_reinforcement = (
threaded_inserts = cq.Sketch().rarray(width / 8, 0, 4, 1).circle(ti_radius, mode="a")
# Case for the screen
case = (
def case():
# Case for the screen
return (
# Basic filleted box shape
cq.Workplane("bottom")
.lineTo(-width, 0)
@ -85,6 +87,22 @@ case = (
.workplane(centerOption="CenterOfBoundBox")
.placeSketch(threaded_inserts)
.cutBlind(-ti_depth)
)
)
exporters.export(case, "case.stl")
full_case = case()
exporters.export(full_case, "case.stl")
top_case = (case()
.faces(">X")
.workplane(offset=-width/2)
.split(keepTop=True)
)
exporters.export(top_case, "case_1.stl")
bottom_case = (case()
.faces(">X")
.workplane(offset=-width/2)
.split(keepBottom=True)
)
exporters.export(bottom_case, "case_2.stl")