diff --git a/notebook_nueva/hinged_lid.py b/notebook_nueva/hinged_lid.py index a5694d5..25740c7 100644 --- a/notebook_nueva/hinged_lid.py +++ b/notebook_nueva/hinged_lid.py @@ -1,6 +1,8 @@ import cadquery as cq from cadquery import exporters +import screen_pillars + from modelo import ( height, mounting_pillar_positions, @@ -11,8 +13,9 @@ from modelo import ( shell_t, ) +from screen_mount import height_bottom + import keyboard -import screen_mount hinge_radius = 5.5 screw_radius = 1.5 # M3 @@ -21,6 +24,16 @@ hinge_offset = max(p[1] for p in mounting_pillar_positions) + 6 hinge_width = 25 thickness = 43 + +mounting_pillar_positions = [(x, -y) for x, y in mounting_pillar_positions[:-2]] +mounting_pillars = ( + cq.Sketch() + .push(mounting_pillar_positions) + .trapezoid(-12, 12, 90, mode="a") + .circle(ti_radius, mode="s") + .clean() +) + # This is a constant used to control how far back the hinges go # when open. It's arbitrary and can be adjusted experimentally # printing small samples @@ -218,6 +231,14 @@ def model(): .cutBlind(-1000) ) + model = ( + model.faces(">Z") + .workplane() + .center(-width / 2, height_bottom - height / 2 - shell_t) + .placeSketch(mounting_pillars) + .extrude(10) + ) + return model diff --git a/notebook_nueva/hinged_lid.stl b/notebook_nueva/hinged_lid.stl index ce878f6..d6621a5 100644 Binary files a/notebook_nueva/hinged_lid.stl and b/notebook_nueva/hinged_lid.stl differ diff --git a/notebook_nueva/hinged_lid.svg b/notebook_nueva/hinged_lid.svg index 72d083a..8cb9150 100644 --- a/notebook_nueva/hinged_lid.svg +++ b/notebook_nueva/hinged_lid.svg @@ -6,7 +6,7 @@ height="240.0" > - + @@ -150,6 +150,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -236,6 +266,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +