This MATLAB code helps you to realize a 3d object with stacked laser cut plates:
- Extract the intersection of a 3d STL object and a cut plane, visualize, and export the results as PDF.
- Create 3d meshed parts from 2d parts, assemble the plates into a 3d construction, and visualize.
The example provided with the code is a Porsche 917K racecar.
First take the STL file, define cut planes, and visualize the contours (with the provided MATLAB tool).
Then export the contour as PDF (with the provided MATLAB tool).
With a vector graphic tool, edit, simplify, and improve the contour. Export the results as bitmap raster, which each layer represents its own file. Bitmap format is used for compatibly, simplicity, and robustness.
Transform the bitmap raster into a full 3d construction (with the provided MATLAB tool).
With a vector graphic tool, edit the final version for laser cutting.
With some patience (and some glue), assemble the model!
The example model is a Porsche 917K, one of the most iconic racecar ever produced. As a typical racecar from the end of 60s, many versions were produced. The version used for the sliced model is the car used by Team Salzburg in Le Mans 1970 (winner, car 23).
The sliced model is at the 1:24 scale. The model contains 2x18=36 parts and the plate thickness is 4mm. Of course, the model car be scaled to be smaller. A larger model will probably look too coarse.
For the technical details about the workflow and the MATLAB code, please read matlab_slicer/README.txt.
I have used MATLAB since it has many functions for meshing and image handling. Moreover, this code is a quick and dirty personal project. However, tell me if you are interested by a Python implementation. Then, I might make a version using numpy/matplotlib, opencv/shapely, and triangle/openmesh.
Thomas Guillod - GitHub Profile
- This MATLAB source code is licensed under the BSD License, see LICENSE.md.
- The Porsche 917K model is licensed under the Creative Commons — CC BY 4.0.
Thomas Guillod (2022). laser_cut_matlab_slicer (https://github.com/otvam/laser_cut_matlab_slicer), GitHub. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!