proper mounting pillars for hinged lid
This commit is contained in:
parent
21faab26d0
commit
2d53b8f006
@ -25,7 +25,7 @@ hinge_width = 25
|
||||
thickness = 43
|
||||
|
||||
|
||||
mounting_pillar_positions = [(x, -y) for x, y in mounting_pillar_positions[:-2]]
|
||||
mounting_pillar_positions = [(x, -y) for x, y in mounting_pillar_positions]
|
||||
mounting_pillars = (
|
||||
cq.Sketch()
|
||||
.push(mounting_pillar_positions)
|
||||
@ -48,6 +48,7 @@ def model():
|
||||
# Hollow box
|
||||
.workplane(offset=-thickness / 2)
|
||||
.box(width, height, thickness)
|
||||
.tag("base")
|
||||
.edges("|X and >Z and <Y")
|
||||
.fillet(10)
|
||||
.edges("|X and >Z and >Y")
|
||||
@ -63,7 +64,11 @@ def model():
|
||||
# Outer surface of the hinge
|
||||
.workplaneFromTagged("rightSide")
|
||||
.placeSketch(cq.Sketch().circle(hinge_radius))
|
||||
.extrude(-width)
|
||||
.extrude(-hinge_width)
|
||||
.workplaneFromTagged("rightSide")
|
||||
.workplane(offset=-width + hinge_width)
|
||||
.placeSketch(cq.Sketch().circle(hinge_radius))
|
||||
.extrude(-hinge_width)
|
||||
# Cut middle section between the hinges
|
||||
.workplaneFromTagged("rightSide")
|
||||
.workplane(offset=-hinge_width)
|
||||
@ -82,10 +87,22 @@ def model():
|
||||
)
|
||||
)
|
||||
.cutBlind(-width + 2 * hinge_width - 1)
|
||||
# Pillars to attach to base
|
||||
.workplaneFromTagged("base")
|
||||
.workplane(
|
||||
centerOption="CenterOfBoundBox", offset=model_thickness - thickness / 2
|
||||
)
|
||||
.center(-width / 2, height / 2 - shell_t)
|
||||
.placeSketch(mounting_pillars)
|
||||
.extrude(10)
|
||||
# Hole for screws
|
||||
.workplaneFromTagged("rightSide")
|
||||
.placeSketch(cq.Sketch().circle(screw_radius))
|
||||
.cutBlind(-width)
|
||||
.cutBlind(-hinge_width)
|
||||
.workplaneFromTagged("rightSide")
|
||||
.workplane(offset=-width + hinge_width)
|
||||
.placeSketch(cq.Sketch().circle(screw_radius))
|
||||
.cutBlind(-hinge_width)
|
||||
# Holes for rings & screw heads
|
||||
.workplaneFromTagged("rightSide")
|
||||
.placeSketch(cq.Sketch().circle(ring_radius))
|
||||
@ -231,14 +248,6 @@ def model():
|
||||
.cutBlind(-1000)
|
||||
)
|
||||
|
||||
model = (
|
||||
model.faces(">Z")
|
||||
.workplane(offset=-model_thickness)
|
||||
.center(-width, height)
|
||||
.placeSketch(mounting_pillars)
|
||||
.extrude(10)
|
||||
)
|
||||
|
||||
return model
|
||||
|
||||
|
||||
|
Binary file not shown.
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 102 KiB After Width: | Height: | Size: 120 KiB |
Loading…
Reference in New Issue
Block a user