diff --git a/notebook_nueva/audio_plug.py b/notebook_nueva/audio_plug.py
index ae9d316..625b66b 100644
--- a/notebook_nueva/audio_plug.py
+++ b/notebook_nueva/audio_plug.py
@@ -2,17 +2,41 @@
import cadquery as cq
-from utils import punch_hole
+from utils import extrude_shape, punch_hole
# The hole is for a random USB sound card.
# Consumers should set proper offsets for the hole
+# FIXME: use actual sizes
+item_w = 40
+item_h = 20
+
+hole_w = 17
+hole_h = 5
+
holes = [
# 2-jack plug
{
- "x": 0,
+ "x": -item_h / 2,
"y": 4,
- "shape": cq.Sketch().trapezoid(17, 5, 90, mode="a").vertices().fillet(2),
+ "shape": cq.Sketch()
+ .trapezoid(hole_w, hole_h, 90, mode="a")
+ .vertices()
+ .fillet(2),
+ },
+]
+
+elements = [
+ # Outline
+ {
+ "x": item_w / 2,
+ "y": item_h / 2,
+ "shape": (
+ cq.Sketch()
+ .trapezoid(item_w, item_h, 90, mode="a")
+ .trapezoid(item_w - 2, item_h - 2, 90, mode="s")
+ ),
+ "height": 0.2,
},
]
@@ -29,6 +53,19 @@ def add(
back_face,
shell_t
):
+ # Extrusions
+ if bottom_face:
+ for element in elements:
+ model = extrude_shape(
+ model=model,
+ face=bottom_face,
+ w=width,
+ h=height,
+ x_offset=offset_x,
+ y_offset=offset_y,
+ element=element,
+ height=-(element["height"] + shell_t),
+ )
# Holes
if back_face:
@@ -37,11 +74,11 @@ def add(
model=model,
face=back_face,
# FIXME: This is weird because it's the RIGHT side,
- # So it's height instead of w
+ # So it's height instead of w, offset_y instead of x
# need to work on making these coherent
w=height,
h=thickness,
- x_offset=offset_x - 17 / 2,
+ x_offset=height - offset_y,
y_offset=shell_t,
hole=hole,
depth=shell_t,
diff --git a/notebook_nueva/battery_holder.py b/notebook_nueva/battery_holder.py
index 7d550c4..605f901 100644
--- a/notebook_nueva/battery_holder.py
+++ b/notebook_nueva/battery_holder.py
@@ -106,7 +106,6 @@ def add(
back_face,
shell_t
):
-
if bottom_face:
# Vents
for vent in vents:
diff --git a/notebook_nueva/hdmi_out.py b/notebook_nueva/hdmi_out.py
index 65b4916..07ad6e3 100644
--- a/notebook_nueva/hdmi_out.py
+++ b/notebook_nueva/hdmi_out.py
@@ -29,7 +29,6 @@ def add(
back_face,
shell_t
):
-
# Holes
if back_face:
for hole in holes:
diff --git a/notebook_nueva/keyboard.py b/notebook_nueva/keyboard.py
index df41c68..a0359d3 100644
--- a/notebook_nueva/keyboard.py
+++ b/notebook_nueva/keyboard.py
@@ -55,7 +55,6 @@ def add(
back_face,
shell_t
):
-
# This one is special, it creates angled things and cuts off the
# case, so ... it's going to do weird stuff
diff --git a/notebook_nueva/left_screen_mount.stl b/notebook_nueva/left_screen_mount.stl
deleted file mode 100644
index 99cad16..0000000
Binary files a/notebook_nueva/left_screen_mount.stl and /dev/null differ
diff --git a/notebook_nueva/left_side.3mf b/notebook_nueva/left_side.3mf
deleted file mode 100644
index 88253a8..0000000
Binary files a/notebook_nueva/left_side.3mf and /dev/null differ
diff --git a/notebook_nueva/left_side.stl b/notebook_nueva/left_side.stl
deleted file mode 100644
index 011ca22..0000000
Binary files a/notebook_nueva/left_side.stl and /dev/null differ
diff --git a/notebook_nueva/left_side_lid.stl b/notebook_nueva/left_side_lid.stl
deleted file mode 100644
index ff95e67..0000000
Binary files a/notebook_nueva/left_side_lid.stl and /dev/null differ
diff --git a/notebook_nueva/lid.py b/notebook_nueva/lid.py
index 83cb2c1..bc38db4 100644
--- a/notebook_nueva/lid.py
+++ b/notebook_nueva/lid.py
@@ -67,7 +67,6 @@ def model():
if __name__ == "__main__":
-
model = model()
exporters.export(model, "lid.stl")
diff --git a/notebook_nueva/lid.stl b/notebook_nueva/lid.stl
deleted file mode 100644
index c9ce70d..0000000
Binary files a/notebook_nueva/lid.stl and /dev/null differ
diff --git a/notebook_nueva/lid.svg b/notebook_nueva/lid.svg
deleted file mode 100644
index 9c848e1..0000000
--- a/notebook_nueva/lid.svg
+++ /dev/null
@@ -1,1269 +0,0 @@
-
-
diff --git a/notebook_nueva/model.stl b/notebook_nueva/model.stl
index 0af1a38..e69de29 100644
Binary files a/notebook_nueva/model.stl and b/notebook_nueva/model.stl differ
diff --git a/notebook_nueva/model.svg b/notebook_nueva/model.svg
deleted file mode 100644
index 82971a2..0000000
--- a/notebook_nueva/model.svg
+++ /dev/null
@@ -1,3093 +0,0 @@
-
-
diff --git a/notebook_nueva/modelo.py b/notebook_nueva/modelo.py
index 52d267c..edaecb3 100644
--- a/notebook_nueva/modelo.py
+++ b/notebook_nueva/modelo.py
@@ -1,5 +1,6 @@
import cadquery as cq
from cadquery import exporters
+from cq_warehouse.drafting import Draft
import audio_plug
import battery_holder
@@ -96,9 +97,9 @@ def model():
width=width,
height=height,
thickness=thickness,
- offset_x=111, # Offset from the front-left corner
- offset_y=0, # Offset from the bottom
- bottom_face=None,
+ offset_x=width - audio_plug.item_w,
+ offset_y=40,
+ bottom_face="