필터 지우기
필터 지우기

How to improve plotting speed of large STL models using patch?

조회 수: 12 (최근 30일)
Arkaniva Sarkar
Arkaniva Sarkar 2023년 6월 2일
댓글: chicken vector 2023년 6월 2일
I am developing an application in appdesigner where I'm dealing with large STL models with more than 1 million faces in each model. However, when I'm trying to plot one or more models together using Patch, it takes quite a long time to plot. Is there any method to increase the speed of plotting?
I'm using a system with i7 8th gen processor and Nvidia MX150 2GB graphics card.

답변 (1개)

chicken vector
chicken vector 2023년 6월 2일
To really help you would be convenient to see what you are dealing with and what have you tried, but one thing I can say for sure, MATLAB is not very good when dealing with rendered images, and the best way to achieve high rendering speeds is to change programming language.
If you really ahve to do this on MATLAB you can try this FEX function that reads STL files and gives you the output as patches in MATLAB.
To speed things up you can build your database in a .mat file with all the patch outputs of your STL models.
  댓글 수: 2
Arkaniva Sarkar
Arkaniva Sarkar 2023년 6월 2일
Reading the STL doesn't take time, but plotting does. I'm using the following code to plot:
for i = 1:length(full_path_of_stl_models) %array containing full path of the stl models
TR = stlread(full_path_of_stl_models(i)) %reading stl
plt(i) = patch('Faces',TR.ConnectivityList,'Vertices',TR.Points) %plotting
end
% where, size(TR.ConnectivityList,1) is always greater than 1000000
chicken vector
chicken vector 2023년 6월 2일
Maybe someone else will be able to help you more but Matlab is not built for this so, in the end, I don't think you can obtain what you are looking for. Good luck nontheless.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 STL (STereoLithography)에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by