File Exchange

image thumbnail

【Light Version 】Matlab STL GUI slice program

version 3.0.0.0 (28.3 KB) by Yong Da
Transform 3D STL file (StereoLithography) into 2D series BMP files.

12 Downloads

Updated 16 Nov 2017

View License

DIY 自製 Matlab STL GUI 轉檔slice程式
為了紀念母親節,第一次自行設計Matlab GUI程式,STL轉擋切圖,破天荒免費分享給有需要的人XD,主要跟3D列印有相關的人可能會使用。
https://www.youtube.com/watch?v=L-PJxcc50V8


【To commemorate Mother's Day 】
● This is my first time to build Matlab GUI and run stand alone program.
● Can use ImageJ to aid design of 3D structure.
●STL file can be produced via Solidworks etc.
==【Install】==============================
1. Read Slicing_project.m file w/ matlab.
2. Run it/F5.
Enjoy it.
========================================
GUI troubleshooting ========================
[step 1] Open GUIDE under ("new/App/GUIDE").
[step 2] Open 'Slicing_project.fig' file under GUIDE manager.
[step 3] Right click on the panel, select "send to back" button.
[step 4] fix all front panel.
※ following are step-by-step illustrations via figure.
[url] https://drive.google.com/open?id=17UydcjT_9Vo-Cu8xZLv6wOO4D96gjMfO

Cite As

Yong Da (2019). 【Light Version 】Matlab STL GUI slice program (https://www.mathworks.com/matlabcentral/fileexchange/62926-light-version-matlab-stl-gui-slice-program), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (20)

Shen DU

got it

deru jian

awesome project! thanks a lot!

Yong Da

Thank you very much

AJ Geiger

Very interesting Great submission! I like how you incorporated the GUI to Transform 3D STL. I just uploaded a GUI toolbox package check it out. Over the weekend I will be adding a slider and button. Hope you like it!

Yong Da

About this issue. Sometimes will happen due to the different version. To fix this. You can follow following illustration:
GUI troubleshooting ========================
[step 1] Open GUIDE under ("new/App/GUIDE").
[step 2] Open 'Slicing_project.fig' file under GUIDE manager.
[step 3] Right click on the panel, select "send to back" button.
[step 4] fix all front panel.
※ following are step-by-step illustrations via figure.
[url] https://drive.google.com/open?id=17UydcjT_9Vo-Cu8xZLv6wOO4D96gjMfO

Kyle Rose

Yong,

I would love to use the GUI you created. I watched the video and it seems to be perfect for what I am doing. However, I cannot load STL files properly. I am using matlab2017a. The read stl part of the GUI does not have the select and load file buttons that appear in the video. Is there any fix for this issue?
Thanks,
Kyle

Yong Da

That is array of mesh vertex coordinate.
Which as follow:
vertex 1.850000e-001 1.500000e-001 8.000000e-002
vertex 1.844683e-001 1.439223e-001 8.000000e-002
vertex 2.196165e-001 1.426830e-001 8.000000e-002
.
.
.

thanks,Undefined function or variable;"VVV”,what is VVV?

Yong Da

Here are some reference talk about stl file:
【An Enhanced Slicing Algorithm Using Nearest. Distance Analysis for Layer Manufacturing】
https://www.researchgate.net/publication/224983269_An_enhanced_slicing_algorithm_using_nearest_distance_analysis_for_layer_manufacturing
【Utilizing Topological Information to Increase Scan Vector Generation Efficiency】
https://sffsymposium.engr.utexas.edu/Manuscripts/1991/1991-04-Rock.pdf
【Slicing of CAD models in color STL format】
http://www.sciencedirect.com/science/article/pii/S0166361505001065

Hello, do you have any papers on this subject? If yes, can I get a connection?

Yong Da

Please also check the stl file is correct. The STL file format should as following for ASCII code:

solid dfilename
facet normal 0.000000e+000 0.000000e+000 1.000000e+000
outer loop
vertex 1.850000e-001 1.500000e-001 8.000000e-002
vertex 1.844683e-001 1.439223e-001 8.000000e-002
vertex 2.196165e-001 1.426830e-001 8.000000e-002
endloop
endfacet
facet normal 0.000000e+000 0.000000e+000 1.000000e+000
outer loop
vertex 1.500000e-001 1.150000e-001 8.000000e-002
vertex 1.573170e-001 8.038348e-002 8.000000e-002
vertex 1.560777e-001 1.155317e-001 8.000000e-002
endloop
endfacet
:
:
:
endsolid

Yong Da

Not really sure what kind of reason will cause these problems. I haven't saw this situation before. You can check your manipulation as cover. I guess might be resulted from scale or pixel issue. Thanks.

Attempted to access slic_2(0,1); index must be a positive integer or logical.

Error in slic_save_v2 (line 108)
slic_2(uint16((f_4(1)*n+f_1(1))+1),uint16((f_4(2)*n+f_1(2)))+1)=1;

Error in Slicing_project>slicing_Callback (line 301)
slic_save_v2(handles.v_number,new_VV,Zp_1(kk),kk,mode,area_mode,height,width);

Error in gui_mainfcn (line 96)
feval(varargin{:});

Error in Slicing_project (line 42)
gui_mainfcn(gui_State, varargin{:});

Error in @(hObject,eventdata)Slicing_project('slicing_Callback',hObject,eventdata,guidata(hObject))


Error while evaluating uicontrol Callback

hello ,Can't slice, can only display grid? why?

chen

Yong Da

I just discovery this GUI issue may be caused from the blocking of panel icon. This can be solved by just right click on the panel icon and select "Send to Back". Thanks.

Yong Da

For GUI issue. This is happen in later version. You can use 2011 or 2010 version. Or you can download the standalone executable program on the Youtube and install 'MCRInstaller.exe' program of 2011 version. Hope these information can help you, thanks.

Yong Da

You also can use the script 'Scaffold_slicing.m' for manipulation.

Yong,
I'd really like to use your script. It is just what I am looking for. But I am having some trouble getting it to work. The UI figure that opens for me does not have buttons to select and load the file. The scale and rotate buttons are also missing. I think this might be because I am using a more recent version of Matlab. Or maybe it's a problem with the uploaded file. Do you have any suggestions?
Thanks,
Curtis

Updates

3.0.0.0

update x-y-z- axial indicate

3.0.0.0

Add GUI troubleshooting illustration.

3.0.0.0

change cover

3.0.0.0

Update cover

3.0.0.0

Change

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

Inspired by: CAD2MATDEMO.M, stlread