Cannot load simple STL file
6 次查看(过去 30 天)
显示 更早的评论
Hi,
the STL file (uploaded as txt file) in the attachment, consisting of two juxtaposed cuboids of different size and having in total only 22 surfaces, fails at importGeometry. The geometry is very simple, and there are no tolerance problems to be seen (only coordinates with 120, 100 80 40 and 0 values)!
How to fix it?
Best regards
Urs
Cuboids;
Small Program:
model = createpde('structural','static-solid');
importGeometry(model,'...\cuboids.stl');
generateMesh(model);
figure(1)
pdegplot(model,'FaceLabels','on');
Error message:
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.EquationModel/importGeometry (line 60)
gm = pde.DiscreteGeometry(geofilename);
Error in Cuboid (line 14)
importGeometry(model,'....\cuboids.stl');
0 个评论
采纳的回答
Cris LaPierre
2020-12-9
The issue is the shared wall between your two cuboids. The inner volume must be completely open. This comes up all the time in 3D printing, as STL files are typically the accepted file format for this application. You can google around to find an STL repair service.
If you are creating the geometry yourself, see if you can't remove that shared face yourself.
I ran your stl through a service I've used in the past and found that, once repaired, your code works fine (attached, extension changed to txt)
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!