This commit is contained in:
Roberto Alsina 2022-07-24 10:31:48 -03:00
commit 4a4d11bd95

View File

@ -11,6 +11,8 @@ board_cutout = (
cq.Sketch().trapezoid(55, 50, 90, mode="a").reset().vertices("<X").fillet(5) cq.Sketch().trapezoid(55, 50, 90, mode="a").reset().vertices("<X").fillet(5)
) )
plug_cutout = cq.Sketch().trapezoid(55, 11, 90, mode="a").reset().vertices("<X")
cable_relief = cq.Sketch().trapezoid(width, 30, 90) cable_relief = cq.Sketch().trapezoid(width, 30, 90)
segment_breaks_top = ( segment_breaks_top = (
@ -52,6 +54,12 @@ def case():
.shell(-shell_t) .shell(-shell_t)
.edges("|X") .edges("|X")
.fillet(fillet_s) .fillet(fillet_s)
# Cutout room for plugs to slide in and be exposed
.faces(">X")
.workplane(centerOption="CenterOfBoundBox")
.center(0, -5)
.placeSketch(plug_cutout)
.cutBlind(-width / 2)
# Cutout visible screen area from top face # Cutout visible screen area from top face
.faces(">Z") .faces(">Z")
.workplane(centerOption="CenterOfBoundBox") .workplane(centerOption="CenterOfBoundBox")
@ -93,16 +101,8 @@ def case():
full_case = case() full_case = case()
exporters.export(full_case, "case.stl") exporters.export(full_case, "case.stl")
top_case = (case() top_case = case().faces(">X").workplane(offset=-width / 2).split(keepTop=True)
.faces(">X")
.workplane(offset=-width/2)
.split(keepTop=True)
)
exporters.export(top_case, "case_1.stl") exporters.export(top_case, "case_1.stl")
bottom_case = (case() bottom_case = case().faces(">X").workplane(offset=-width / 2).split(keepBottom=True)
.faces(">X")
.workplane(offset=-width/2)
.split(keepBottom=True)
)
exporters.export(bottom_case, "case_2.stl") exporters.export(bottom_case, "case_2.stl")