Filter löschen
Filter löschen

Getting an error message when trying to import .stl file

63 Ansichten (letzte 30 Tage)
Matheus Queiroz
Matheus Queiroz am 11 Sep. 2015
Beantwortet: mkassa am 13 Okt. 2020
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

Akzeptierte Antwort

Damian Sheehy
Damian Sheehy am 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

Weitere Antworten (2)

Brian Chen
Brian Chen am 27 Jan. 2017
I get this issue as well. Any progress?
  2 Kommentare
michio
michio am 27 Jan. 2017
Just to clarify, does the error messages not apply to your model defined in STL file that you are trying to import?
"Failed to create geometry, the input does not form a closed volume. This may be due to missing faces or gaps in the input.
Somayeh Mirzaee
Somayeh Mirzaee am 23 Jun. 2017
Hi, I have the same issue, any progress?

Melden Sie sich an, um zu kommentieren.


mkassa
mkassa am 13 Okt. 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');

Community Treasure Hunt

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

Start Hunting!

Translated by