56 lines
1.8 KiB
Python
56 lines
1.8 KiB
Python
#!/usr/bin/env python3
|
|
|
|
# Copyright (C) 2025 Thomas Kolb (cfr34k)
|
|
# This model is licensed under CC BY-SA 4.0. To view a copy of this license,
|
|
# visit https://creativecommons.org/licenses/by-sa/4.0/
|
|
|
|
from build123d import *
|
|
|
|
from bd_warehouse.thread import IsoThread, Thread
|
|
|
|
from math import sin, cos, tan, pi, acos
|
|
|
|
ALIGN_BOTTOM = (Align.CENTER, Align.CENTER, Align.MIN)
|
|
ALIGN_TOP = (Align.CENTER, Align.CENTER, Align.MAX)
|
|
|
|
plug_clip_d = 62.5
|
|
plug_clip_offset = 11.5
|
|
plug_clip_l = 3.0
|
|
plug_l = 25
|
|
|
|
plug_notch_w = 3
|
|
plug_notch_offset = 3
|
|
plug_notch_depth = plug_l - plug_notch_offset
|
|
|
|
adapter_inner_d = 61.5
|
|
adapter_outer_d = 65
|
|
plug_wall_t = (adapter_outer_d - adapter_inner_d) / 2
|
|
adapter_l = 30
|
|
|
|
transition_l = 5
|
|
|
|
thread_inner_d = 61
|
|
thread_depth = 4
|
|
thread_outer_d = thread_inner_d + 2*thread_depth
|
|
thread_wall_t = 2
|
|
thread_shell_d = thread_outer_d + 2*thread_wall_t
|
|
|
|
thread_l = 50
|
|
|
|
thread_steepness = 12.0
|
|
|
|
thread_shell = Pos(Z=adapter_l) * (Cylinder(thread_shell_d/2, thread_l, align=ALIGN_BOTTOM) \
|
|
- Cylinder(thread_outer_d/2, thread_l, align=ALIGN_BOTTOM))
|
|
|
|
thread = Pos(Z=adapter_l) * Thread(apex_radius=thread_inner_d/2, apex_width=3, root_radius=thread_outer_d/2, root_width=thread_steepness-4, pitch=thread_steepness, length=thread_l, end_finishes=['fade', 'fade'], hand='left', align=ALIGN_BOTTOM)
|
|
|
|
duct = Cylinder(adapter_inner_d/2, adapter_l, align=ALIGN_BOTTOM)
|
|
|
|
adapter = Cylinder(adapter_outer_d/2, adapter_l, align=ALIGN_BOTTOM) \
|
|
- Pos(Z=plug_clip_offset) * Cylinder(plug_clip_d/2, plug_clip_l, align=ALIGN_BOTTOM) \
|
|
|
|
transition_cone = Pos(Z=adapter_l) * Cone(adapter_outer_d/2, thread_shell_d/2, transition_l, align=ALIGN_TOP)
|
|
|
|
device = adapter + transition_cone - duct + thread_shell + thread
|
|
|
|
show_object(device, "device", options={"alpha":0.0, "color": (192, 192, 192)})
|