Reordered components so kbd doesn't interfere with other things

This commit is contained in:
Roberto Alsina 2023-03-27 17:15:49 -03:00
parent c49f9c6348
commit bf302deab1
3 changed files with 16 additions and 18 deletions

Binary file not shown.

View File

@ -75,18 +75,6 @@ def model():
# Now the basic box shape is in place, start adding things
# and cutting holes.
model = keyboard.add(
model=model,
width=width,
height=height,
thickness=thickness,
bottom_face=">Z", # Yes >Z
back_face=None,
offset_x=0,
offset_y=height - keyboard.kbd_height,
shell_t=shell_t,
)
model = usb_hub.add(
model=model,
width=width,
@ -149,6 +137,18 @@ def model():
shell_t=shell_t,
)
model = keyboard.add(
model=model,
width=width,
height=height,
thickness=thickness,
bottom_face=">Z", # Yes >Z
back_face=None,
offset_x=0,
offset_y=height - keyboard.kbd_height,
shell_t=shell_t,
)
return model

View File

@ -23,10 +23,7 @@ elements = [
"x": 0,
"y": 5,
"shape": (
cq.Sketch()
.trapezoid(22, 10, 90, mode="a")
.trapezoid(17, 10, 90, mode="s")
.clean()
cq.Sketch().trapezoid(22, 10, 90, mode="a").trapezoid(17, 10, 90, mode="s")
),
"height": 8,
}
@ -47,6 +44,7 @@ def add(
):
# USB Hub extrusions
print(offset_x)
if bottom_face:
for element in elements:
model = extrude_shape(
@ -54,8 +52,8 @@ def add(
face=bottom_face,
w=width,
h=height,
x_offset=offset_x,
y_offset=shell_t + offset_y,
x_offset=263, # offset_x,
y_offset=0, # shell_t + offset_y,
element=element,
height=-(element["height"] + shell_t),
)