This commit is contained in:
Roberto Alsina 2023-02-16 14:57:51 -03:00
parent 64db220a46
commit 31630ab1b0
3 changed files with 13 additions and 21 deletions

View File

@ -1,12 +1,8 @@
import cadquery2 as cq import cadquery2 as cq
from cadquery2 import exporters from cadquery2 import exporters
cpu_stand_positions = [(0, 0), (58, 0), (58, 48), (0, 48)] cpu_stand_positions = [(0, 0), (58, 0), (58, 48), (0, 48)]
lower_stands = ( lower_stands = cq.Sketch().push(cpu_stand_positions).circle(3, mode="a")
cq.Sketch().push(cpu_stand_positions).circle(3, mode="a")
)
higher_stands = ( higher_stands = cq.Sketch().push(cpu_stand_positions).circle(2.65 / 2, mode="a")
cq.Sketch().push(cpu_stand_positions).circle(2.65 / 2, mode="a")
)

View File

@ -1,12 +1,8 @@
import cadquery2 as cq import cadquery2 as cq
from cadquery2 import exporters from cadquery2 import exporters
cpu_stand_positions = [(0, 0), (23, 0), (23, 58), (0, 58)] cpu_stand_positions = [(0, 0), (23, 0), (23, 58), (0, 58)]
lower_stands = ( lower_stands = cq.Sketch().push(cpu_stand_positions).circle(3, mode="a")
cq.Sketch().push(cpu_stand_positions).circle(3, mode="a")
)
higher_stands = ( higher_stands = cq.Sketch().push(cpu_stand_positions).circle(2.65 / 2, mode="a")
cq.Sketch().push(cpu_stand_positions).circle(2.65 / 2, mode="a")
)

View File

@ -104,7 +104,7 @@ def model():
# USB inlet # USB inlet
.faces(">X") .faces(">X")
.workplane(centerOption="CenterOfBoundBox") .workplane(centerOption="CenterOfBoundBox")
# The position is arbitrary, based on the components # The position is arbitrary, based on the components
# available, keyboard height, cable length, etc. # available, keyboard height, cable length, etc.
.center(-height / 2 + shell_t + 60, -5) .center(-height / 2 + shell_t + 60, -5)
.placeSketch(usb_in) .placeSketch(usb_in)
@ -146,31 +146,31 @@ def model():
# 13 is 20-7 (screw thread length - threaded insert depth) # 13 is 20-7 (screw thread length - threaded insert depth)
.cutBlind(thickness - 13) .cutBlind(thickness - 13)
# CPU Stands (lower) # CPU Stands (lower)
# The -65, -40 is the position of the CPU, # The -65, -40 is the position of the CPU,
# and should be a parameter (TODO) # and should be a parameter (TODO)
.workplaneFromTagged("mid_height") .workplaneFromTagged("mid_height")
.workplane(offset=-thickness / 2, centerOption="CenterOfBoundBox") .workplane(offset=-thickness / 2, centerOption="CenterOfBoundBox")
.center (width/2 - 40, height/2 - 65) .center(width / 2 - 40, height / 2 - 65)
.placeSketch(cpu_holder.lower_stands) .placeSketch(cpu_holder.lower_stands)
.extrude(7) .extrude(7)
# CPU Stands (higher) # CPU Stands (higher)
.workplaneFromTagged("mid_height") .workplaneFromTagged("mid_height")
.workplane(offset=-thickness / 2, centerOption="CenterOfBoundBox") .workplane(offset=-thickness / 2, centerOption="CenterOfBoundBox")
.center (width/2 - 40, height/2 - 65) .center(width / 2 - 40, height / 2 - 65)
.placeSketch(cpu_holder.higher_stands) .placeSketch(cpu_holder.higher_stands)
.extrude(11) .extrude(11)
# Battery Stands (lower) # Battery Stands (lower)
# The +18, -55 is the position of the battery system, # The +18, -55 is the position of the battery system,
# and should be a parameter (TODO) # and should be a parameter (TODO)
.workplaneFromTagged("mid_height") .workplaneFromTagged("mid_height")
.workplane(offset=-thickness / 2, centerOption="CenterOfBoundBox") .workplane(offset=-thickness / 2, centerOption="CenterOfBoundBox")
.center (-width/2 + 18, height/2 - 55) .center(-width / 2 + 18, height / 2 - 55)
.placeSketch(battery_holder.lower_stands) .placeSketch(battery_holder.lower_stands)
.extrude(shell_t + 5) .extrude(shell_t + 5)
# Battery Stands (higher) # Battery Stands (higher)
.workplaneFromTagged("mid_height") .workplaneFromTagged("mid_height")
.workplane(offset=-thickness / 2, centerOption="CenterOfBoundBox") .workplane(offset=-thickness / 2, centerOption="CenterOfBoundBox")
.center (-width/2 + 18, height/2 - 55) .center(-width / 2 + 18, height / 2 - 55)
.placeSketch(battery_holder.higher_stands) .placeSketch(battery_holder.higher_stands)
.extrude(shell_t + 8) .extrude(shell_t + 8)
) )