slice_stl_create_pa​th(triangles,slice_​height)

slice stl files and create continuous contour along the slices
3.2K Downloads
Updated 13 May 2021

View License

This contains the matlab files to slice a stl file and create a continuous contour along which the machine can move for deposition for 3D printing.
The main file is slice_stl_create.m
The supporting functions are triangle_plane_intersection.m, read_binary_stl_file.m, orient_stl.m, rotate_stl.m and plot_slices.m.
The script stl_slice_and_plot.m is an example using the functions.

Cite As

Sunil Bhandari (2024). slice_stl_create_path(triangles,slice_height) (https://www.mathworks.com/matlabcentral/fileexchange/62113-slice_stl_create_path-triangles-slice_height), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2015b
Compatible with R2015b and later releases
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
4.0.30

updated to correct a bug that prevented displaying STL file in the GUI app

4.0.22

slicing app reported bug fixed

4.0.21

.

4.0.2

Updated plot_stl to correctly plot STL file. example_plot_stl added to show how to correctly use the file

4.0.1

error corrections to the gui

4.0

gui tool added

3.2.2.1

corrected files uploaded for version 3.2.2.0

3.2.2.0

updated so that the sliced paths move in same direction when possible

3.2.1.0

function to read ASCII stl files added

3.2.0.0

Function to rotate stl file added.

3.1.0.0

The stl file can now be oriented along x, y or z axis before slicing. The original configuration is assumed to be oriented along x axis.
function to orient the stl file along x,y or z axes added

3.0.0.0

Corrected code:
"new_line_plane_intersection" replaced with "triangle_plane_intersection"
STL fileread speed increased. Large stl files can be read in seconds.
bug with infinite loop corrected
code for improperly formed triangles uncommented

2.0.0.0

intersecting triangles with each slicing plane now calculated using binary search. Big O for this step changed from O(nk) to O(nlogk), where n is the number of triangles and k is the number of slicing planes.

1.0.0.0