Dennis Gunia 9eff018e8e add gitignore
2025-09-11 21:57:28 +02:00
2025-09-11 21:57:16 +02:00
2025-09-11 21:57:16 +02:00
2025-09-11 21:57:16 +02:00
2025-09-11 21:57:16 +02:00
2025-09-11 21:57:28 +02:00
2025-09-11 21:57:16 +02:00
2025-09-11 21:57:16 +02:00
2025-09-11 21:57:16 +02:00

Parametric Split-Flap Flap Generator

This is a parametric flap generator for my 3d printed split-flap display. You can use it to easily generate your own flaps and print them with the multi-material printer of your choice.

The generator uses a .scad file as a template. The configuration is done in a yaml file. You can find more information in the "Config" section.

Prequisites

The script is requires:

  • OpenSCAD
  • Python3

Installation

  1. Clone this repository
git clone 
  1. Install openSCAD on your system
sudo apt install openscad
  1. run
./generator.py <path-to-config>

You can find an example config in ./configs/

Config

The config is stored in a yaml format and contains the following sections:

globals

Contains all global settings defining the dimensions of a single flap. You can change these values to fit your specific project:

dimensions drawing

defaults

This object contains all default values for a flap. These can be overwritten for each flap. If a specific property is not defined on a flap, this default setting is used.

  • font: Font used for text
  • font_size: Default font size
  • font_y_scale: Stretches font on y axis
  • svg_scale: Scale for svg
  • string: default text. Rcommended to use ' ', even for svg.
  • svg: absolute path to svg file. If empty, the text is generated. This can also be r path relative to the location of scad_file

flaps

Array of each flap. you can specify each of the above mentioned parameters per flap. Every parameter set here overwerites the default parameters.

For example:

flaps:
  - string: "A"
  - string: "B"
  - string: "C"
  - svg: "C:\\\\Users\\\\DG\\\\Downloads\\\\calendar-blank-icon.svg"
    svg_scale: 0.8

output_path

This is the string to the output directory. The .stl files are stored here.

scad_path

Absolute path to the OpenSCAD executable on your system. For linux you can get it by running which openscad

scad_file

Absolute path to the OpenSCAD file used to generate the mesh. Examples located in ./templates/

Printing results

All files are stored in the directory specified by output_path.

  • The *_a.stl file contains the flap itself. This should be printed in black.
  • The *_b.stl files contains the text or graphics. It should be printed in the foreground color.

If you use Orca Slicer or Bambu Studio, you can drag both files simultaneously into the slice. It will group them, which makes handling easier. You still have to manually select the fillaments for both parts (foregournd and background).

Generate 3mf from stl files

I am working on a way to combine the stl files into one 3mf file. This requires you to install the Orca slicer from https://orca-slicer.com/#download

You need to specify it in the config under combine.orca_slicer_exec.

The settings are made under the combinesection in the config file.

  • enable: enables combining the files
  • orca_slicer_exec: path to the orca slider executable (NOTE: this only works on linux and mac.)
  • fillament: map of fillament settings to use. You can keep those settings. They only force orca to treat them as two different fillaments. You can change them later manually.
Description
No description provided
Readme 57 KiB
Languages
Python 61.2%
OpenSCAD 38.8%