Browse Source

add spinner and changes to back panel

master
wes 3 months ago
parent
commit
e988233094
  1. 35
      modified_enclosure_back.py
  2. 20
      xmas_spinner.py

35
modified_enclosure_back.py

@ -14,28 +14,49 @@ from math import ceil, floor
Workplane = cqmore.extend(Workplane)
Workplane.addSvgPath = addSvgPath
screw_simple = False # Controls whether to not actually make the screw threads, saves time running it for testing
screw_length = 10 # FIXME need different ones for different holes
power_cable_screw = ButtonHeadScrew(
size="M3-0.5",
fastener_type="iso7380_1",
length=screw_length * MM,
simple=screw_simple,
)
width = 154
height = 182
height = 130
poop_chute_dist_from_side = 59
holes_plane = (
Workplane("XZ")
.workplane(offset=-2)
.center(85, height - 75)
.cylinder(8, 14 / 2)
.center(-20, 0)
.cylinder(8, 14 / 2)
.center(10, 20)
.center(20, height - 75)
.cylinder(8, 17 / 2)
.workplane(offset=-7)
.center(0, height - 165)
.circle(11.08 / 2.0)
.extrude(20)
)
hole_extruded_plane = (
Workplane("XZ")
.workplane(offset=-2)
.center(0, height - 110)
.move(20, 0)
.circle(11.08 / 1.4)
.extrude(-5)
)
cover_usb = (
Workplane("XZ").workplane(offset=-4.5).center(-4, height - 77).box(11, 5.3, 1.0)
)
result = cq.importers.importStep("/home/deck/Downloads/Backpanel_Part3.stp")
result = result.union(hole_extruded_plane)
result = result.cut(holes_plane)
result = result.union(cover_usb)
@ -79,6 +100,6 @@ cq.exporters.export(
)
try:
show_object(result_part1)
show_object(result)
except NameError:
pass

20
xmas_spinner.py

@ -16,7 +16,9 @@ Workplane = cqmore.extend(Workplane)
bearing_od = 22.0
bearing_or = bearing_od / 2.0
bearing_diameter = 8.0
bearing_diameter_rest = 8.8
bearing_radius = bearing_diameter / 2.0
bearing_radius_rest = bearing_diameter_rest / 2.0
bearing_thickness = 6.93
@ -26,12 +28,14 @@ y_offset = 18.9
spinner_base = (
Workplane()
.cylinder(10, 20)
.workplane(offset=-bearing_thickness + 2)
.cylinder(1.5, bearing_radius_rest)
.workplane(offset=-bearing_thickness)
.cylinder(10, bearing_radius)
.workplane(offset=4)
.cylinder(10, bearing_radius + 0.08)
.workplane(offset=3.224)
.rect(35, 35, forConstruction=True)
.vertices()
.cylinder(2, 10)
.cylinder(4, 10)
)
spinner = (
@ -52,10 +56,10 @@ spinner_split_top = (
tree.workplane(5)
.split(keepTop=True)
.workplane(offset=-10)
.move(-x_offset - 0.5, y_offset)
.cylinder(10, bearing_radius)
.move(-x_offset + 0.1, y_offset)
.cylinder(10, bearing_radius + 0.025)
.workplane(offset=-2.9)
.move(-x_offset - 0.5, y_offset)
.move(-x_offset + 0.1, y_offset)
.cylinder(10, bearing_radius + 3)
)
@ -87,6 +91,8 @@ cq.exporters.export(
cq.exporters.export(spinner_base, "/home/deck/model_files/xmas_spinner_base.stl")
try:
show_object(spinner_split_top)
show_object(spinner_base)
# show_object(spinner_split_top)
# show_object(spinner_split_bottom)
except NameError:
pass

Loading…
Cancel
Save