Make lid decorative cover work better
This commit is contained in:
parent
c9e36a5a08
commit
05aaee6ee9
Binary file not shown.
@ -68,18 +68,8 @@ def model():
|
||||
|
||||
def decorative_cover():
|
||||
model = cq.Workplane("XY").box(10, height, 1).edges("|Z").fillet(1)
|
||||
vent = hex_vents(size=6, width=width * 0.9, height=height * 0.9)[0]
|
||||
vent = hex_vents(size=6, width=width * 0.9, height=height * 0.9, density=0.775)[0]
|
||||
|
||||
model = extrude_shape2(
|
||||
model=model,
|
||||
face=">Z",
|
||||
w=width,
|
||||
h=height,
|
||||
x_offset=0.05 * width,
|
||||
y_offset=0.05 * height,
|
||||
hole=vent,
|
||||
depth=-1,
|
||||
)
|
||||
model = extrude_shape2(
|
||||
model=model,
|
||||
face=">Z",
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -32,7 +32,7 @@ def extrude_shape2(*, model, face, w, h, x_offset, y_offset, hole, depth):
|
||||
)
|
||||
|
||||
|
||||
def hex_vents(*, size, width, height):
|
||||
def hex_vents(*, size, width, height, density=0.85):
|
||||
# size is radius of the hexagon
|
||||
# Information about how this works:
|
||||
# https://www.redblobgames.com/grids/hexagons/
|
||||
@ -66,7 +66,7 @@ def hex_vents(*, size, width, height):
|
||||
{
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"shape": cq.Sketch().push(vent_positions).regularPolygon(size * 0.85, 6),
|
||||
"shape": cq.Sketch().push(vent_positions).regularPolygon(size * density, 6),
|
||||
}
|
||||
]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user