フィルターのクリア

Trouble triangulating a surface

3 ビュー (過去 30 日間)
David Winthrop
David Winthrop 2019 年 12 月 5 日
コメント済み: darova 2019 年 12 月 5 日
I have attached a text file with the data I am discussing.
I need to triangulate this data so that I can write the triangulation to an stl file using stlwrite (from the file exchange). The problem is that this sequence produces triangles that are NOT in the plane for seemingly no reason. As can be seen, all of the points are in a circle. How can I triangulate this surface without the wierd out of plane triangles appearing??
>> D = importdata('Endcap.txt');
>> TRI = delaunay(D(:,1),D(:,2),D(:,3));
>> trisurf(TRI,D(:,1),D(:,2),D(:,3))
>> hold on
>> plot3(D(:,1),D(:,2),D(:,3),'*r')
Note that I expected something like this:
>> surf([D(:,1),repmat(mean(D(:,1)),length(D),1)],[D(:,2),repmat(mean(D(:,2)),length(D),1)],[D(:,3),repmat(mean(D(:,3)),length(D),1)])
  3 件のコメント
David Winthrop
David Winthrop 2019 年 12 月 5 日
編集済み: David Winthrop 2019 年 12 月 5 日
Thank you but this didn't do the trick.
For example:
>> Du = unique(D,'rows');
>> TRI = alphaShape(Du(:,1),Du(:,2),Du(:,3));
>> trisurf(TRI.Points,Du(:,1),Du(:,2),Du(:,3))
Error using patch
Value must be of numeric type and greater than 1
Error in trisurf (line 91)
h = patch('faces',trids,'vertices',[x(:) y(:) z(:)],'facevertexcdata',c(:),...
darova
darova 2019 年 12 月 5 日
I don't have alphaShape
Try
plot(TRI)
see HELP

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeDelaunay Triangulation についてさらに検索

タグ

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by