From 5dd7b5578fa787b01405995657d4f18267162dc4 Mon Sep 17 00:00:00 2001 From: Roberto Alsina Date: Sat, 23 Jul 2022 16:12:56 -0300 Subject: [PATCH] tweaks --- monitor/case.py | 4 +--- monitor/hinge.py | 6 +++--- monitor/lower_arm.py | 8 ++------ monitor/rear_mount.py | 10 ++++++---- monitor/upper_arm.py | 4 ++-- 5 files changed, 14 insertions(+), 18 deletions(-) diff --git a/monitor/case.py b/monitor/case.py index 905ad19..609cb76 100644 --- a/monitor/case.py +++ b/monitor/case.py @@ -11,9 +11,7 @@ board_cutout = ( cq.Sketch().trapezoid(55, 50, 90, mode="a").reset().vertices("Y") # Add hinge that connects to the monitor - .workplane( - centerOption="CenterOfBoundBox", offset=(hinge_gap - arm_width) / 2 - ) + .workplane(centerOption="CenterOfBoundBox", offset=(hinge_gap - arm_width) / 2) .center(0, arm_length / 2 + (outer_monitor_hinge - inner_monitor_hinge)) .placeSketch(monitor_hinge_shape) .extrude(-hinge_gap) .center(0, -(arm_length + outer_tripod_hinge)) # Undo previous offset + new offset - .workplane( - offset=-(hinge_gap - arm_width - tripod_hinge_width + arm_width) / 2 - ) + .workplane(offset=-(hinge_gap - arm_width - tripod_hinge_width + arm_width) / 2) # Add hinge that connects to the tripod .placeSketch(tripod_hinge_shape) .extrude(-tripod_hinge_width) diff --git a/monitor/rear_mount.py b/monitor/rear_mount.py index 3a76785..76ce802 100644 --- a/monitor/rear_mount.py +++ b/monitor/rear_mount.py @@ -60,14 +60,16 @@ rear_mount = ( .cutBlind(-screw_head_h) # Hinge integration .faces(">X") - .workplane(centerOption="CenterOfBoundBox", offset=-(rear_mount_width-20)/2) + .workplane(centerOption="CenterOfBoundBox", offset=-(rear_mount_width - 20) / 2) .transformed(rotate=cq.Vector(0, 0, 90)) - .center(-hinge_w / 2, rear_mount_thickness / 2).tag("hingeplane") + .center(-hinge_w / 2, rear_mount_thickness / 2) + .tag("hingeplane") .placeSketch(hinge_profile_1) .extrude(-hinge_t) .workplaneFromTagged("hingeplane") .workplane(offset=-hinge_t - hinge_gap) .placeSketch(hinge_profile_2) - .extrude(-hinge_t)) + .extrude(-hinge_t) +) -exporters.export(rear_mount, "rear_mount.stl") \ No newline at end of file +exporters.export(rear_mount, "rear_mount.stl") diff --git a/monitor/upper_arm.py b/monitor/upper_arm.py index 89b8152..012cfda 100644 --- a/monitor/upper_arm.py +++ b/monitor/upper_arm.py @@ -21,7 +21,7 @@ elbow_hinge_shape = ( arm_length = 150 arm_width = hinge_gap -lower_arm = ( +upper_arm = ( cq.Workplane("XY") .rect(hinge_w, hinge_gap) .extrude(arm_length) @@ -51,4 +51,4 @@ lower_arm = ( .extrude(-(2 * hinge_t + hinge_gap)) ) -exporters.export(lower_arm, "upper_arm.stl") +exporters.export(upper_arm, "upper_arm.stl")