Compare commits
2 Commits
be6245aa3b
...
64db220a46
Author | SHA1 | Date | |
---|---|---|---|
64db220a46 | |||
4624a2531f |
12
notebook_nueva/battery_holder.py
Normal file
12
notebook_nueva/battery_holder.py
Normal file
@ -0,0 +1,12 @@
|
||||
import cadquery2 as cq
|
||||
from cadquery2 import exporters
|
||||
|
||||
cpu_stand_positions = [(0, 0), (58, 0), (58, 48), (0, 48)]
|
||||
|
||||
lower_stands = (
|
||||
cq.Sketch().push(cpu_stand_positions).circle(3, mode="a")
|
||||
)
|
||||
|
||||
higher_stands = (
|
||||
cq.Sketch().push(cpu_stand_positions).circle(2.65 / 2, mode="a")
|
||||
)
|
Binary file not shown.
@ -1,28 +1,12 @@
|
||||
import cadquery2 as cq
|
||||
from cadquery2 import exporters
|
||||
|
||||
cpu_stand_positions = [(0, 0), (23, 0), (23, 58), (0, 58)]
|
||||
|
||||
lower_stands = (
|
||||
cq.Sketch().push([(0, 0), (58, 0), (58, 23), (0, 23)]).circle(3, mode="a")
|
||||
cq.Sketch().push(cpu_stand_positions).circle(3, mode="a")
|
||||
)
|
||||
|
||||
higher_stands = (
|
||||
cq.Sketch().push([(0, 0), (58, 0), (58, 23), (0, 23)]).circle(2.65 / 2, mode="a")
|
||||
)
|
||||
|
||||
model = (
|
||||
cq.Workplane("XY")
|
||||
.workplane()
|
||||
.box(75, 40, 2)
|
||||
.edges("+Z")
|
||||
.fillet(3)
|
||||
.faces(">Z")
|
||||
.workplane(centerOption="CenterOfBoundBox")
|
||||
.center(-29, -11.5)
|
||||
.placeSketch(lower_stands)
|
||||
.extrude(4)
|
||||
.workplane()
|
||||
.placeSketch(higher_stands)
|
||||
.extrude(9)
|
||||
)
|
||||
|
||||
exporters.export(model, "cpu_holder.stl")
|
||||
cq.Sketch().push(cpu_stand_positions).circle(2.65 / 2, mode="a")
|
||||
)
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
81172
notebook_nueva/model.stl
81172
notebook_nueva/model.stl
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,9 @@
|
||||
import cadquery2 as cq
|
||||
from cadquery2 import exporters
|
||||
|
||||
import battery_holder
|
||||
import cpu_holder
|
||||
|
||||
# Base for the notebook. Basically a kbd base that extends back
|
||||
# as much as possible
|
||||
|
||||
@ -77,6 +80,16 @@ screw_holes = cq.Sketch().push(mounting_pillar_positions).circle(3, mode="a")
|
||||
usb_in = cq.Sketch().trapezoid(13, 5.5, 90, mode="a")
|
||||
|
||||
|
||||
# CPU stand pins
|
||||
lower_stands = (
|
||||
cq.Sketch().push([(0, 0), (58, 0), (58, 23), (0, 23)]).circle(3, mode="a")
|
||||
)
|
||||
|
||||
higher_stands = (
|
||||
cq.Sketch().push([(0, 0), (58, 0), (58, 23), (0, 23)]).circle(2.65 / 2, mode="a")
|
||||
)
|
||||
|
||||
|
||||
def model():
|
||||
return (
|
||||
cq.Workplane("XY")
|
||||
@ -132,6 +145,34 @@ def model():
|
||||
.placeSketch(screw_holes)
|
||||
# 13 is 20-7 (screw thread length - threaded insert depth)
|
||||
.cutBlind(thickness - 13)
|
||||
# CPU Stands (lower)
|
||||
# The -65, -40 is the position of the CPU,
|
||||
# and should be a parameter (TODO)
|
||||
.workplaneFromTagged("mid_height")
|
||||
.workplane(offset=-thickness / 2, centerOption="CenterOfBoundBox")
|
||||
.center (width/2 - 40, height/2 - 65)
|
||||
.placeSketch(cpu_holder.lower_stands)
|
||||
.extrude(7)
|
||||
# CPU Stands (higher)
|
||||
.workplaneFromTagged("mid_height")
|
||||
.workplane(offset=-thickness / 2, centerOption="CenterOfBoundBox")
|
||||
.center (width/2 - 40, height/2 - 65)
|
||||
.placeSketch(cpu_holder.higher_stands)
|
||||
.extrude(11)
|
||||
# Battery Stands (lower)
|
||||
# The +18, -55 is the position of the battery system,
|
||||
# and should be a parameter (TODO)
|
||||
.workplaneFromTagged("mid_height")
|
||||
.workplane(offset=-thickness / 2, centerOption="CenterOfBoundBox")
|
||||
.center (-width/2 + 18, height/2 - 55)
|
||||
.placeSketch(battery_holder.lower_stands)
|
||||
.extrude(shell_t + 5)
|
||||
# Battery Stands (higher)
|
||||
.workplaneFromTagged("mid_height")
|
||||
.workplane(offset=-thickness / 2, centerOption="CenterOfBoundBox")
|
||||
.center (-width/2 + 18, height/2 - 55)
|
||||
.placeSketch(battery_holder.higher_stands)
|
||||
.extrude(shell_t + 8)
|
||||
)
|
||||
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user