3D model · Printables

Customizable Slider Puzzle Generator (Print-In-Place)

Model details

Platform
Printables
Price
Free
License
CC-BY-NC-SA
Non-commercial use only, with credit; share remixes under the same license.
Formats
SCAD
  • 111 Likes
  • 561 Downloads
  • 5 Makes
  • 6 Comments
  • 2 942 Views

Author:kriswillcode

Published

Description

I tried to print a couple of different versions of this style of puzzle, but I had no luck… One puzzle fell apart while trying to solve it, while the others fused parts together. Despite attempts to adjust my flow rate and scale the model, I was having no luck. So, I decided to make my own version, but make it customizable via OpenSCAD!

The puzzle prints together as one frame and multiple squares. The squares are the parts that move, and the frame is the piece that restricts the squares. The number and size of the squares can be customized, and the frame will automatically size itself. The text and font of the squares can also be edited.

This design has a few features to make it easier to print. Elephant foot is less of an issue because the bottoms of the internal squares are chamfered. The gap between pieces can be changed depending on the accuracy of the printer. The height is directly related to the “overlap” of the squares, so even loose puzzles won't fall apart if the height is large enough.

Don't be afraid to experiment: if you break something or encounter an error, just re-download the file and start fresh!

Prerequisites

- Install OpenSCAD - Install BOSL for OpenSCAD Intro to OpenSCAD

When you open up the PuzzleGenerator.scad file, you'll see some code on the left of the screen and a rough preview on the right. The model will look incorrect: it'll be flat and won't have any text.

To see an accurate model visualization, simply press F6 . Do note that the model will take some time to render; on my machine, it can take between 10 and 30 seconds. Adding more squares or more complex fonts will increase the time.

If it looks good, use F7 to export the model as an STL file. Make sure to append .stl to the file name when saving the model.

Customization

All relevant variables are located at the top of the file. Change the necessary values, save the file ( CTRL + S ), re-render the model ( F6 ), and export it ( F7 ).

Variable Name Example Notes

cols Columns 3 Number of squares along the X axis

rows Rows 3 Number of squares along the Y axis

sqText Text for Squares … Content for each square in puzzle; see below for details

size Square Size 14 Side length of visible portion of each square

height Height 6 Height of puzzle; at least 4, but 6 is recommended

frame Frame Width 6 Width of frame; must be at least equal to height

inCham Square Chamfer 1 Size of chamfer applied to each internal square

ouCham Frame Chamfer 2 Size of outer frame chamfer; must be less than half of height

gap Tolerance 0.4 Gap between parts; start with nozzle size and experiment

textFont Text Font "Arial" Font for text; can append “:style=Bold” for variants

textSize Text Size 6 Size for text; reduce if more than one character per square

textDep Text Depth 1 How far to recess text; make negative to raise text

textRt Text Shift Right 0.3 Move text right; make negative to move left

textUp Text Shit Up 0.3 Move text up; make negative to move down

textDeg Text Rotate Degrees 45 Rotate text by a number of degrees

Font

Be careful with your font choice. Some fonts with fine details won't print well. Opt for bold, display fonts with no thin features. Adding “:style=Bold" to the font name really helps. Also, make sure textDep is a multiple of your layer height.

Tolerance

First, make sure your flow is dialed in. Your e-steps should be calibrated, and you should know the correct temperatures for your chosen filament. Try to reduce elephant foot as much as possible.

Start by setting gap to your nozzle size. Print a simple 2x2 puzzle with three squares and a height of 6. If the pieces feel loose, reduce the value by 0.05. If the pieces are too tight or fuse together, increase the value by 0.05. If the squares print successfully, but the pieces still feel “wobbly," consider increasing the height. The height dictates the “overlap” between the squares and can add stability to the puzzle.

Squares' Text

sqText is an array of strings for the puzzle.

Make sure each string is surrounded by double quotes and separated by a comma. If the string is set to false or there's not enough strings in the array, then those squares will not be added to the puzzle.

Multiple letters can be used (ex. “10”), but make sure to decrease textSize . Depending on the font, you may need to adjust textRt and textUp as well.

Breaking this array into multiple lines does not change the layout of the puzzle: you must adjust the cols and rows variables for correct sizing.

Be sure to include one “hole” in the puzzle by setting one element of the array to false . If you don't, your puzzle won't move.

Below are some examples of sqText with the column and row count. Pay close attention to the formatting in the sqText array and how it's represented in the rendered puzzle.

Printing

Tags

More like this

Similar models

Names are used only to indicate the source of a result. Polyzon is not affiliated with the listed sites.