From 246338fc18fec52771b4650c460ee35f219da5d5 Mon Sep 17 00:00:00 2001 From: Roberto Alsina Date: Sat, 23 Jul 2022 10:07:56 -0300 Subject: [PATCH] Start integrating the hinge --- monitor/hinge.py | 7 ++----- monitor/rear_mount.py | 15 ++++++++++++++- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/monitor/hinge.py b/monitor/hinge.py index aceb53a..0d184a4 100644 --- a/monitor/hinge.py +++ b/monitor/hinge.py @@ -11,9 +11,9 @@ screw_head_radius = 3.5 screw_radius = 1.5 hinge_s = 7.5 -hinge_t = 5 +hinge_t = ti_depth - 1 hinge_gap = screw_shaft - 2 * hinge_t - +# The side of the screw head hinge_profile_1 = ( cq.Sketch() .segment((0, 0), (0, hinge_s)) @@ -34,9 +34,6 @@ hinge_profile_2 = ( .assemble() ) -# TODO countersink -# TODO proper threaded insert depth sizing - hinge = ( cq.Workplane("bottom") .placeSketch(hinge_profile_1) diff --git a/monitor/rear_mount.py b/monitor/rear_mount.py index a171641..b2a4d42 100644 --- a/monitor/rear_mount.py +++ b/monitor/rear_mount.py @@ -10,6 +10,7 @@ screw_head_h = 2.5 screw_head_radius = 3.5 screw_radius = 1.5 +from hinge import hinge_profile_1, hinge_profile_2, hinge_t, hinge_gap, hinge_s reinforcement_height = 1 + 1 + ti_depth - shell_t @@ -29,16 +30,21 @@ back_reinforcement_outer = ( .fillet(2) ) +# FIXME: use counterbore holes function instead + screw_holes = cq.Sketch().rarray(width / 8, 0, 4, 1).circle(screw_radius, mode="a") screw_countersinks = ( cq.Sketch().rarray(width / 8, 0, 4, 1).circle(screw_head_radius, mode="a") ) +rear_mount_thickness = reinforcement_height + screw_head_h + shell_t + + rear_mount = ( # Basic filleted box shape cq.Workplane("bottom") .placeSketch(back_reinforcement_outer) - .extrude(reinforcement_height + screw_head_h + shell_t) + .extrude(rear_mount_thickness) .faces(">Y") .workplane(centerOption="CenterOfBoundBox") .placeSketch(back_reinforcement_cutout) @@ -51,6 +57,13 @@ rear_mount = ( .workplane(centerOption="CenterOfBoundBox") .placeSketch(screw_countersinks) .cutBlind(-screw_head_h) + # Hinge integration + .faces(">X") + .workplane(centerOption="CenterOfBoundBox") + .transformed(rotate=cq.Vector(0, 0, 90)) + .center(-hinge_s / 2, rear_mount_thickness / 2) + .placeSketch(hinge_profile_1) + .extrude(-hinge_t) ) exporters.export(rear_mount, "rear_mount.stl")