This OpenSCAD script generates customizable 3D printable lightboxes with personalized multi-line text. You can create unique lightboxes by selecting from multiple fonts and adding multi-line text. Additionally, you have the option to include a hole for LED strips or to hang the lightbox on the wall, enhancing its functionality and aesthetic appeal.
To personalize your lightbox, please use the “Customize” button available on the MakerWorld website. Note that this feature is currently not supported in the Bambu Handy app.
Boost Me (for free)
Boosts really help me continue designing, so if you like my work, it's a great way to say thank you at no cost to you.
Parameters
- customText: The text to display on the lightbox. Use * to separate lines (e.g., "Home*Sweet*Home").
- part: Lid and box are generated separately, select the desired part and download the file. (Please note that if the size of the piece you are trying to export is larger than your printer's build plate, the file generation will fail. Make sure to adjust your design parameters accordingly to fit within your printer's build volume.)
Text Options:
-
- font: Choose your preferred font from the available options.
- textSize: Font size of the text.
- alignment: Align the text within the box.
- "left": Aligns text to the left.
- "center": Centers the text.
- fillGaps: When true, fills the gaps between lines of text. Useful when spacing or symbols leave large empty spaces.
- flatBase: When true, creates a flat base at the bottom of the text, helping the lightbox stand straight (useful for letters like "g" or "j").
Box Options:
- extrudeHeight: The total height of the lightbox.
- baseWidth: Thickness of the base layer.
- lidStep: Height of the connection between the lid and the box.
- nameLayerHeight: Height of the layer containing the text. Set to 0.8mm because painting tools in Bambu Studio won't go deeper than 0.4mm. Increasing this value may result in layers that don't receive the new color.
Color Options:
- fontColor: Color for the text layer (for visualization).
- boxColor: Color for the box layer (for visualization).
LED Hole Options:
- ledHoleRadius: Diameter of the hole for LED wiring.
- offsetXledHole / offsetYledHole: Horizontal and vertical offsets to adjust the position of the LED hole.
Hanging Hole Options:
- addHangingHole: When true, includes a hole for hanging the lightbox.
- hangingHoleLargeRadius: Radius of the larger part of the hanging hole (bottom circle).
- hangingHoleSmallRadius: Radius of the smaller part of the hanging hole (top circle).
- hangingHoleHeight: Total height of the hanging hole shape.
- hangingHoleHeightOffset: Offset to adjust the vertical position of the hanging hole.
Exporting 3MF:
- Customize your lightbox using the MakerWorld website.
- Configure all parameters to your preference.
- Press generate for each of the parts of the model “lid” and “box”.
- Export the model as an 3MF file, ready for 3D printing.
3D Printing:
- Load the 3MF file into Bambu Studio.
- If needed, use the paint bucket tools to apply colors to different parts of the model if your printer supports multi-color printing.
How to Run the Script Locally:
- Important: Running this script in the regular OpenSCAD version may cause warnings.
- Download and install the Development Snapshot version of OpenSCAD.
- Once installed, navigate to:
- Edit → Preferences → Features
- Enable the textmetrics feature by checking its box.
Notes:
- The nameLayerHeight is optimized for painting features in Bambu Studio.
- The text is designed to be face down to improve print quality; ensure you apply any color changes to the correct side.
- If using the fillGaps feature, it will fill empty spaces between lines for a more solid appearance.
- The flatBase option is useful for text that includes descending characters like "g" or "j" to ensure the lightbox stands upright.
Version Control
- v2. Added option to add a border around the text, wall customization, hanger customization options
- v1. Initial version
Comment & Rating (198)