Getting an error message when trying to import .stl file
11 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Matheus Queiroz
le 11 Sep 2015
Déplacé(e) : DGM
le 15 Juil 2025
Dear users,
I'm a Ph.D. student in Brazil/Canada researching in the domain of flow separation and I would like to ask you a question about the following error I get when I try to import a geometry with .stl extension. Hope so you can help me.
Error using pde.DiscreteGeometry
Failed to create geometry, the input does not form a closed volume. This may be due to missing faces or gaps in the input.
Error in pde.PDEModel/importGeometry (line 160) gm = pde.DiscreteGeometry(geofilename);
Thank you very much.
Matheus de Queiroz
0 commentaires
Réponse acceptée
Damian Sheehy
le 27 Jan 2017
The geometry may well have tiny gaps along an edge where two adjacent curved surfaces intersect. It may not be obvious when looking at the geometry in the parent CAD system unless it provides tools for querying and healing geometry defects. We occasionally see this problem when CAD geometry is imported from one system into another and the STL is then generated from the latter. Different CAD systems use different tolerances in their surface intersection algorithms. When the geometry is exchanged faces may not be stitched together properly, giving rise to gaps. The PDE toolbox will error if these gaps are detected on import.
If you email the STL file to me together with and any info on translation history then we can investigate; though at this point we cannot heal geometry with defects like this. email: firstname dot lastname at mathworks dot com
3 commentaires
Somayeh Mirzaee
le 23 Juin 2017
Déplacé(e) : DGM
le 15 Juil 2025
Hi, I have the same issue, any progress?
Plus de réponses (1)
mkassa
le 13 Oct 2020
Switching from m to mm worked for me :
[F,V] = stlread('old_file_name.stl');
stlwrite('new_file_name.stl',F,V*1000)
model = createpde();
importGeometry(model,'new_file name.stl');
0 commentaires
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!