From 10bac1c4ed3b98182d06124224d0cdd8cf99f29e Mon Sep 17 00:00:00 2001 From: Roberto Alsina Date: Sat, 23 Jul 2022 10:13:27 -0300 Subject: [PATCH] Start integrating the hinge (buggy) --- monitor/rear_mount.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/monitor/rear_mount.py b/monitor/rear_mount.py index b2a4d42..a5a6e4f 100644 --- a/monitor/rear_mount.py +++ b/monitor/rear_mount.py @@ -14,6 +14,9 @@ from hinge import hinge_profile_1, hinge_profile_2, hinge_t, hinge_gap, hinge_s reinforcement_height = 1 + 1 + ti_depth - shell_t +rear_mount_thickness = reinforcement_height + screw_head_h + shell_t +rear_mount_width = width / 2 + 2 * shell_t + back_reinforcement_cutout = ( cq.Sketch() .trapezoid(width / 2 + 1, 15 + 1, 90, mode="a") @@ -24,7 +27,7 @@ back_reinforcement_cutout = ( back_reinforcement_outer = ( cq.Sketch() - .trapezoid(width / 2 + 2 * shell_t, 15 + 2 * shell_t, 90, mode="a") + .trapezoid(rear_mount_width, 15 + 2 * shell_t, 90, mode="a") .reset() .vertices() .fillet(2) @@ -37,8 +40,6 @@ 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 @@ -59,11 +60,13 @@ rear_mount = ( .cutBlind(-screw_head_h) # Hinge integration .faces(">X") - .workplane(centerOption="CenterOfBoundBox") + .workplane(centerOption="CenterOfBoundBox", offset=-(rear_mount_width-22)/2) .transformed(rotate=cq.Vector(0, 0, 90)) .center(-hinge_s / 2, rear_mount_thickness / 2) .placeSketch(hinge_profile_1) .extrude(-hinge_t) -) + .workplane(offset=-hinge_gap) + .placeSketch(hinge_profile_2) + .extrude(hinge_t)) exporters.export(rear_mount, "rear_mount.stl")