diff --git a/notebook_nueva/lid.py b/notebook_nueva/lid.py index 01011e4..df5d416 100644 --- a/notebook_nueva/lid.py +++ b/notebook_nueva/lid.py @@ -2,7 +2,7 @@ import cadquery as cq from cadquery import exporters from modelo import mounting_pillar_positions, shell_t, width -from utils import hex_vents, punch_hole +from utils import hex_vents, punch_hole, extrude_shape2 # Dimensions for countersunk M4 screws m4_top = 9 @@ -66,10 +66,40 @@ def model(): return 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] + + 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", + w=width, + h=height, + x_offset=0.05 * width, + y_offset=0.05 * height, + hole=vent, + depth=3, + ) + return model + + if __name__ == "__main__": model = model() exporters.export(model, "lid.stl") + cover = decorative_cover() + exporters.export(cover, "lid_cover.stl") + exporters.export( model, "lid.svg", diff --git a/notebook_nueva/lid_cover.stl b/notebook_nueva/lid_cover.stl new file mode 100644 index 0000000..cc2d0a7 Binary files /dev/null and b/notebook_nueva/lid_cover.stl differ