Start integrating the hinge

This commit is contained in:
Roberto Alsina 2022-07-23 10:07:56 -03:00
parent f42566d13a
commit 246338fc18
2 changed files with 16 additions and 6 deletions

View File

@ -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)

View File

@ -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")