diff --git a/out/ap_feet.stl b/out/ap_feet.stl new file mode 100644 index 0000000..85ab715 Binary files /dev/null and b/out/ap_feet.stl differ diff --git a/src/models/ap_feet.py b/src/models/ap_feet.py new file mode 100644 index 0000000..7396ff0 --- /dev/null +++ b/src/models/ap_feet.py @@ -0,0 +1,67 @@ +from pathlib import Path + +from build123d import ( + Align, + BuildPart, + BuildSketch, + GridLocations, + Kind, + Mode, + Rectangle, + export_stl, + extrude, + offset, +) + +block_width = 8 +block_height = 11 +block_depth = 13 + + +wall_thickness = 1.5 +beam_thickness = 2 + +frame_height = block_height + 107 +frame_width = block_width + 78.25 +frame_depth = 1.5 + +OUTPUT_DIR = Path("out") + + +def block(): + with BuildPart(): + with BuildSketch() as frame_plan: + perimeter = Rectangle(width=frame_width, height=frame_height) + offset( + perimeter, + -wall_thickness, + kind=Kind.INTERSECTION, + mode=Mode.SUBTRACT, + ) + + with BuildSketch() as blocks_plan: + with GridLocations( + frame_width, frame_height, 2, 2, align=(Align.CENTER, Align.CENTER) + ): + perimeter = Rectangle(width=block_width, height=block_height) + offset( + perimeter, + -wall_thickness, + kind=Kind.INTERSECTION, + mode=Mode.SUBTRACT, + ) + + blocks = extrude(blocks_plan, amount=block_depth) + frame = extrude(frame_plan, amount=frame_depth) + + return blocks + frame + + +def main(): + part = block() + + export_stl(part, OUTPUT_DIR / "ap_feet.stl") + + +if __name__ == "__main__": + main()