top of page

Laser-Cut Hexagonal Box Programmed in Python

This project uses Python scripts to generate parts for an acrylic box based on input parameters such as box dimensions, material thickness, and other relevant specifications. The program produces an SVG file that is converted to DXF format for use in laser-cutting the acrylic sheets. This enables easy customization and product variability.

hexbox2.jpeg
hexbox1.jpeg

My Role

Initial Designs

Working together with a teammate, we created several sketches of box geometries using specific input parameters. Additionally, I developed a hexagonal box layout as a visual aid for the design.

​

Coding

I programmed a Python application that produces an SVG file, taking into account the box's height, hexagon side length, material thickness, and text engraving.

​

Construction

After laser cutting the necessary pieces from a 1/4" thick transparent acrylic sheet, I assembled the hexagonal box using screws and nuts.

Team Members
Alex Ivan Ortega


Timeframe
2 weeks

 

Ideation

We select an idea and create a blueprint for the hexagonal box using Figma, incorporating all the necessary components that would require laser cutting.

hex_box_idea1.jpeg
hex_box_idea2.jpeg

Design 

Custom User Input

By inputting the height, bottom hexagon edge length, and material thickness, users have the ability to customize the size of the hexagonal box. Additionally, a string of text can be engraved on the front of the box. If a user inputs a value outside of the defined range, an error message will prompt the user to input a correct value within the range.

 

Python Program Steps

Our Python-programmed software follows a series of steps to generate an SVG file:

  • Obtain user input for height, bottom hexagon edge length, and material thickness in millimeters.

  • Generate vertex critical points.

  • Generate teeth joints based on user input.

  • Generate screw hole positions.

  • Convert millimeters to pixels.

  • Write SVG file.

​​

​Adaptive Parameters

Our algorithm ensures that each edge has an odd number of teeth and automatically resizes the finger joints based on the length of the hexagonal base edge. If a user requests fractal engraving, the rectangle will be rotated multiple times around its center. User-specified text will also be resized according to the size of the fractal engraving.


Conditions

  • Box height: within 30-150 mm

  • Bottom edge: within 30-100 mm

  • Thickness: within 2-5 mm

  • Maximum user-specified string: 25 characters

​​

Once the input parameters fall within the appropriate ranges, the hexagonal box will be generated automatically.

hex_box_sketch.jpeg

Software Output Examples

Input-Output 1


Height = 100 mm
Bottom-edge = 110 mm
Thickness = 4 mm
User-specified text = "Digital Manufacturing"

 

​

​

​


Input-Output 2


Height = 150 mm
Bottom-edge = 100 mm
Thickness = 3 mm
User-specified text = "Axel Ivan Ortega"

hex_box_software_outputs.jpeg
hex_box_software_outputs2.jpeg

Generate SVG file based on custom user inputs

hex_box_code_example.jpeg

Process Video

bottom of page