Simpler rear mount

This commit is contained in:
Roberto Alsina 2022-07-24 15:05:31 -03:00
parent c2caea9039
commit 0f90755ed2

View File

@ -14,8 +14,7 @@ from hinge import hinge_profile_1, hinge_profile_2, hinge_t, hinge_gap, hinge_w
reinforcement_height = 1 + 1 + ti_depth - shell_t reinforcement_height = 1 + 1 + ti_depth - shell_t
rear_mount_thickness = reinforcement_height + screw_head_h + shell_t rear_mount_width = width / 2
rear_mount_width = width / 2 + 2 * shell_t
back_reinforcement_cutout = ( back_reinforcement_cutout = (
cq.Sketch() cq.Sketch()
@ -45,11 +44,7 @@ rear_mount = (
# Basic filleted box shape # Basic filleted box shape
cq.Workplane("bottom") cq.Workplane("bottom")
.placeSketch(back_reinforcement_outer) .placeSketch(back_reinforcement_outer)
.extrude(rear_mount_thickness) .extrude(screw_head_h + shell_t)
.faces(">Y")
.workplane(centerOption="CenterOfBoundBox")
.placeSketch(back_reinforcement_cutout)
.cutBlind(-reinforcement_height)
.faces("<Y") .faces("<Y")
.workplane(centerOption="CenterOfBoundBox") .workplane(centerOption="CenterOfBoundBox")
.placeSketch(screw_holes) .placeSketch(screw_holes)
@ -62,7 +57,7 @@ rear_mount = (
.faces(">X") .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)) .transformed(rotate=cq.Vector(0, 0, 90))
.center(-hinge_w / 2, rear_mount_thickness / 2) .center(-hinge_w / 2, 0)
.tag("hingeplane") .tag("hingeplane")
.placeSketch(hinge_profile_1) .placeSketch(hinge_profile_1)
.extrude(-hinge_t) .extrude(-hinge_t)