Browse Source

adding organizer and pot knobx and carlson amp updates

master
wes 2 weeks ago
parent
commit
747e242c81
  1. 9
      carlson_amp_enclosure.py
  2. 30
      carlson_amp_probe.py
  3. 135
      organizer.py
  4. 30
      potentiometer_knobs.py

9
carlson_amp_enclosure.py

@ -25,6 +25,10 @@ switch_radius = switch_diameter / 2.0
gland_diameter = 16.0
gland_radius = gland_diameter / 2.0
gland_shim = (
Workplane().cylinder(2.5, gland_radius + 3).cylinder(3, gland_radius, combine="cut")
)
screw_length = 10
top_screw = CounterSunkScrew(
size="M2.5-0.45",
@ -267,8 +271,11 @@ bottom = bottom.cut(gland_hole)
cq.exporters.export(bottom, "/home/deck/model_files/carlon_probe_amp_enclosure_box.stl")
cq.exporters.export(top, "/home/deck/model_files/carlon_probe_amp_enclosure_lid.stl")
cq.exporters.export(
gland_shim, "/home/deck/model_files/carlson_amp_cable_gland_shim.stl"
)
try:
show_object(bottom)
show_object(gland_shim)
except NameError:
pass

30
carlson_amp_probe.py

@ -26,6 +26,13 @@ gland_or = gland_od / 2.0
gland_id = 16
gland_ir = gland_id / 2.0
probe_tip_cover = (
Workplane()
.cylinder(15, coax_radius + 0.1)
.workplane(offset=1)
.cylinder(15, coax_radius - 0.6, combine="cut")
)
full_probe = Workplane()
full_probe = full_probe.cylinder(
@ -67,15 +74,36 @@ cable_end_cap = (
.sphere(2.5, combine="cut")
)
probe_end_cap_inner_cut = (
Workplane()
.workplane(offset=-3)
.cylinder(3, probe_radius + wall_width)
.cylinder(3, probe_radius - 1.0, combine="cut")
)
probe_end_cap_inner_fitting = (
probe_end_cap.workplane(offset=-25)
.split(keepBottom=True)
.cut(probe_end_cap_inner_cut)
)
cq.exporters.export(
cable_end_cap, "/home/deck/model_files/carlson_probe_cable_end_cap.stl"
)
cq.exporters.export(
probe_end_cap, "/home/deck/model_files/carlson_probe_probe_end_cap.stl"
)
cq.exporters.export(
probe_tip_cover, "/home/deck/model_files/carlson_probe_probe_tip_cover.stl"
)
cq.exporters.export(
probe_end_cap_inner_fitting,
"/home/deck/model_files/carlons_probe_end_cap_inner_fitting.stl",
)
try:
# show_object(probe_end_cap)
show_object(cable_end_cap)
# show_object(cable_end_cap)
# show_object(probe_tip_cover)
show_object(probe_end_cap_inner_fitting)
except NameError:
pass

135
organizer.py

@ -0,0 +1,135 @@
from cadquery import exporters
from cq_warehouse.extensions import Workplane
import cadquery as cq
magnet_diameter = 5.0
magnet_radius = magnet_diameter / 2.0
prong_width = 20.0
prong_dist = 224.75 - prong_width
prong_height = 23.5
prong_thickness = 7.7
wall_thickness = 4.7
depth = 128
width = 245
height = 133
magnet_buffer_space = -0.6
result = Workplane()
result = result.box(
width + wall_thickness, depth + wall_thickness, height + wall_thickness
)
result = (
result.workplane(offset=0)
.move(wall_thickness, 0)
.box(
width + wall_thickness,
depth - wall_thickness,
height - wall_thickness,
combine="cut",
)
)
result = (
result.workplane(offset=wall_thickness)
.move(width / 2.0 - magnet_diameter, 0)
.box(
magnet_diameter + magnet_buffer_space + 1.5,
depth,
height + wall_thickness * 2,
combine="cut",
)
)
result = (
result.workplane(offset=-(height / 2.0) + 1.5)
.move(
width / 2.0 - wall_thickness + (magnet_buffer_space / 2.0),
-(depth / 2.0) + wall_thickness,
)
.line(0, depth - wall_thickness * 2)
.vertices()
.cylinder(6.5, magnet_radius, combine="cut")
)
door_side_magnet_cut_left = (
Workplane("XZ")
.workplane(offset=depth / 2.0)
.move(
width / 2.0 - wall_thickness + (magnet_buffer_space / 2.0),
-depth / 2.0 + wall_thickness + 6,
)
.cylinder(3, magnet_radius)
)
door_side_magnet_cut_right = (
Workplane("XZ")
.workplane(offset=-(depth / 2.0))
.move(
width / 2.0 - wall_thickness + (magnet_buffer_space / 2.0),
-depth / 2.0 + wall_thickness + 6,
)
.cylinder(3, magnet_radius)
)
result = result.cut(door_side_magnet_cut_left)
result = result.cut(door_side_magnet_cut_right)
door_side_magnet_cut_left_top = (
Workplane("XZ")
.workplane(offset=depth / 2.0)
.move(
width / 2.0 - wall_thickness + (magnet_buffer_space / 2.0),
depth / 2.0 - wall_thickness - 5,
)
.cylinder(3, magnet_radius)
)
door_side_magnet_cut_right_top = (
Workplane("XZ")
.workplane(offset=-(depth / 2.0))
.move(
width / 2.0 - wall_thickness + (magnet_buffer_space / 2.0),
depth / 2.0 - wall_thickness - 5,
)
.cylinder(3, magnet_radius)
)
result = result.cut(door_side_magnet_cut_left_top)
result = result.cut(door_side_magnet_cut_right_top)
scope_slots = (
Workplane("ZX")
.workplane(offset=(height / 2.0))
.move(depth / 2.0 - wall_thickness, -(width / 2.0) + 18)
.line(0, prong_dist)
.vertices()
.box(prong_thickness, prong_width, wall_thickness * 3)
)
result = result.cut(scope_slots)
feet_cut = (
Workplane("ZX")
.workplane(offset=-depth / 2.0 - 2)
.move(0, 0)
.rect(height - wall_thickness * 6, width - wall_thickness * 6)
.vertices()
.cylinder(2, 5)
)
result = result.cut(feet_cut)
## Doors
door = Workplane()
door = door.box(wall_thickness, (depth + wall_thickness), height + wall_thickness)
cq.exporters.export(result, "/home/deck/model_files/organizer.stl")
cq.exporters.export(door, "/home/deck/model_files/organizer_door.stl")
try:
show_object(result)
except NameError:
pass

30
potentiometer_knobs.py

@ -0,0 +1,30 @@
from cadquery import exporters
from cq_warehouse.extensions import Workplane
from cq_warehouse.fastener import *
from cq_warehouse.thread import *
from svg_path import addSvgPath
from svgpathtools import svg2paths
from cqmore.polygon import regularPolygon
import cadquery as cq
import cqmore
Workplane = cqmore.extend(Workplane)
Workplane.addSvgPath = addSvgPath
pot_knob = cq.importers.importStep("/home/deck/Downloads/pot_knob.step")
gain_result = Workplane()
probe_result = Workplane()
gain_result = gain_result.workplane(offset=13.7).center(0, -2).text("AUDIO", 3.5, 2)
gain_result = pot_knob.cut(gain_result)
probe_result = probe_result.workplane(offset=13.7).center(0, -2).text("PROBE", 3.5, 2)
probe_result = pot_knob.cut(probe_result)
cq.exporters.export(gain_result, "/home/deck/model_files/pot_knob_gain.stl")
cq.exporters.export(probe_result, "/home/deck/model_files/pot_knob_probe.stl")
try:
show_object(gain_result)
except NameError:
pass
Loading…
Cancel
Save