getting this error with stlwrite

15 views (last 30 days)
P Kamal Kumar
P Kamal Kumar on 30 Nov 2019
code:
clc;
clear all;
model = createpde;
importGeometry(model,'ag455.stl');
pdegplot( model,'FaceLabels',"on");
u = generateMesh(model)
stlwrite(u,'mesh.stl','binary')
Error using stlwrite (line 25)
Input argument must be a triangulation object.
  2 Comments
Adam Danz
Adam Danz on 17 Feb 2020
See the examples in the stlwrite documentation.
Note how the inputs are constructed.

Sign in to comment.

Answers (1)

Rami Ali Al-Khulaidi
Rami Ali Al-Khulaidi on 7 Oct 2021
To save it using stlwrite, I should get triangulation from stlread.....
u=stlread('ag455.stl');
stlwrite(u,'mesh.stl','binary')

Tags

Community Treasure Hunt

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

Start Hunting!