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

21 visualizzazioni (ultimi 30 giorni)
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.

Risposte (1)

chicken vector
chicken vector il 2 Giu 2023
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 Commenti
Arkaniva Sarkar
Arkaniva Sarkar il 2 Giu 2023
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 il 2 Giu 2023
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.

Accedi per commentare.

Prodotti


Release

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by