David Jourdan, Pierre-Alexandre Hugron, Camille Schreck, Jonàs Martínez, and Sylvain Lefebvre
This repository contains the implementation associated with the paper "Shrink & Morph: 3D-printed self-shaping shells actuated by a shape memory effect"
Installation can be done using standard CMake routines. On a typical Linux/macOS machine, the following should work:
git clone --recursive https://github.com/DavidJourdan/shrink-morph
cd shrink-morph
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j $(nproc)
Provided that you have the necessary graphics packages installed (if not the case, see here) CMake will download the required dependencies and compile the executable.
These libraries can downloaded for better performance:
- OR-Tools: the path where the downloaded archive has been extracted should be specified in the
${ORTOOLS_PATH}
variable inCMakeLists.txt
. - MKL Pardiso
From the command line, specify which mesh file (stored in /data/
) should be opened. For example with beetle.obj
simply run
build/shrink_morph beetle
For those who prefer to use a command-line version of a the app, use the shrink_morph_cli
executable:
build/shrink_morph_cli mesh wD width nFmin
with mesh
the name of the input mesh, wD
the smoothing factor (0 by default), width
the width of the flattened plate in mm, and nFmin
the minimum number of faces in the input mesh (it gets iteratively subdivided until reaching this value). For example, to generate the same results as the hat
model in the paper, type:
build/shrink_morph_cli hat 0.1 100 10000
To generate the final gcode files, use the togcode.py script. Its inputs are the .path file generated by the app, the name of your printer (only a few have been tested, use with caution!) and optionally the name of the output file, here is an example:
python togcode/togcode.py data/input_file.path Creality_K1_Max -o output_file.gcode
To generate SVG files showing the trajectories similar to Figure 7 in the paper, run the plot-layer.py
script:
cd ../data/
python plot-layer.py 1
python plot-layer.py 10