Infill Patterns and Shell Contours - 3D Printing Slice Data

Version 1.0.1 (5.38 KB) by Ben Martin
Functions to add a simple alternating rectilinear infill pattern and additional shell contours to outline slice data.
167 Downloads
Updated 9 May 2021

View License

The main function is add_features.
add_shell, add_infill and process_slice_data are supporting functions.
plot_slices is used to visualise the results.
It is recommended to use other functions to generation the slice outline data. (For example the function slice_stl_create_pa​th(triangles,slice_​height) created by Sunil Bhandari)

[xy_points] = add_features(contour_xy_points, shell_layers, shell_thickness, base_layers, base_infill_spacing, infill_spacing)

Inputs:
'contour_xy_points' is a cell array of x and y positions of contours of each slice
'shell_layers' is the number of layers to be added to form the shell
'shell_thickness' is the spacing between each of the shell layers
'base_layers' is the number of solid layers at the bottom of the part
'base_infill_spacing' is the spacing between infill lines for the base
'infill_spacing' is the spacing between infill lines for the rest of the part

'xy_points' is returned in the same format as 'contour_xy_points'

'xy_points' / 'contour_xy_points' format:
1 x n cell array where n is the number of slices
each cell contains rows of the x and y positions of each point of the contour of a single slice
x and y positions are seperated by a NaN, NaN row when the slice has multiple sections

Any questions please let me know.

Cite As

Ben Martin (2024). Infill Patterns and Shell Contours - 3D Printing Slice Data (https://www.mathworks.com/matlabcentral/fileexchange/91955-infill-patterns-and-shell-contours-3d-printing-slice-data), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2019b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Acknowledgements

Inspired by: slice_stl_create_path(triangles,slice_height)

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.0.1

Corrected description

1.0.0