How to customize rectangular face meshing for 3D model?

Dear all,
I have a 3D model, and I want to get the coordinates of points on the surface by my wishes like the picture of the cylinder below.
So my concerns here are:
- How do I change from triangle meshing to rectangular meshing?
- With the small diameter, how can I change the size of the rectangular to get more density data?

7 comentarios

darova
darova el 30 de Abr. de 2020
What format of data do you have? MATLAB don't have built-in function to convert triangular mesh to rectangular
Son Bui
Son Bui el 30 de Abr. de 2020
Dear Darova,
I have a SolidWorks part. Would you suggest me any ideas?
Thank a lot!
darova
darova el 30 de Abr. de 2020
First of all you need to export your model as .stl format. Use stlread to import it to MATLAB
Son Bui
Son Bui el 2 de Mayo de 2020
Thank you, I have export this model to *.stl and import it to Matlab using importGeometry. Everything looks fine but I want to you mesh my model's surface as the picture in my question above.
darova
darova el 2 de Mayo de 2020
Can you attach your data? Maybe you can just interpolate it
Son Bui
Son Bui el 3 de Mayo de 2020
For sure, here you are
darova
darova el 3 de Mayo de 2020
whoa. Can't read. It'' too large. Do you have smaller sample file?

Iniciar sesión para comentar.

Respuestas (1)

darova
darova el 3 de Mayo de 2020
If model is simple it can be created in MATLAB
t = linspace(0,2*pi,30);
z = linspace(0,10,20);
[x,y] = pol2cart(t,1);
[X,Z] = meshgrid(x,z);
[Y,~] = meshgrid(y,z);
h(1) = surf(X,Y,Z); % bottom cylinder
h(2) = surface(X/2,Y/2,Z/2+10); % top cylinder
r = linspace(0,1,10);
[T,R] = meshgrid(t,r);
[X,Y] = pol2cart(T,R);
[X1,Y1] = pol2cart(T,R/2+0.5);
h(3) = surface(X,Y,X*0); % bottom circle
h(4) = surface(X1,Y1,X1*0+10); % middle ring
h(5) = surface(X/2,Y/2,X*0+15); % top circle
set(h,'facecolor','b')
light
axis vis3d

1 comentario

Son Bui
Son Bui el 6 de Mayo de 2020
Thank you so much for attending! Although it's not my needed, I feel thankful with your comment.

Iniciar sesión para comentar.

Etiquetas

Preguntada:

el 30 de Abr. de 2020

Comentada:

el 6 de Mayo de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by