How to create volume out of surfaces?
13 ビュー (過去 30 日間)
古いコメントを表示

I got these two surfaces from isosurface plot, thus I have all the coordinates of these surfaces. I would like to fill in between the two surface to create a 3d solid part. How can I do that?
0 件のコメント
回答 (2 件)
darova
2021 年 6 月 7 日
Your object looks symmetrical. Try manually to create surface
p1 = isosurface(...);
p2 = isosurface(...);
v1 = p1.vertices;
v2 = p2.vertices;
ix1 = v1(:,3) > (max(v1(:,3))-0.05); % find z coord of boundary
ix2 = v2(:,3) > (max(v2(:,3))-0.05); % find z coord of boundary
[t1,r1] = cart2pol(v1(:,1),v1(:,2)); % extract data first contour
[t2,r2] = cart2pol(v2(:,1),v2(:,2)); % extract data second contour
ind1 = sort(t1); % order points counter clockwise
ind2 = sort(t2); % order points counter clockwise
% data can be of different size. Interpolate data to make the same size
r22 = interp1(t2,r2,t1); % make two contours same size as second one
x1 = v1(:,1);
y1 = v1(:,2);
z1 = v1(:,3);
[x2,y2] = pol2cart(t1,r22); % second contour
z2 = z1;
% create data for surface
X = [x1(:) x2(:)];
Y = [y1(:) y2(:)];
Z = [z1(:) z2(:)];
surf(X,Y,Z)
6 件のコメント
DGM
2025 年 7 月 11 日
Here are two examples of using isosurface() and isocaps() to assemble a closed triangulated surface describing a solid.
If the expectation is that the representation is somehow supposed to be a solid, then one needs to ask what's meant by "fill with solid", and why that's necessary. The given examples are sufficient to establish a solid model for the PDE toolbox tools. At that point, you can mesh it however you want. If all you need to do is feed it to CAD/CAM software, then all you need is a closed surface.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Surface and Mesh Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

