필터 지우기
필터 지우기

trimesh not working with 2D triangulation object

조회 수: 2 (최근 30일)
Ian Townend
Ian Townend 2023년 4월 13일
댓글: Ian Townend 2023년 4월 21일
%Tri is a triangulation object of a 2D mesh
trimesh(Tri) %throws error "The triangulation must reside in 3D space."
%However the following code works
pts = Tri.Points;
tria = Tri.ConnectivityList;
trimesh(tria,pts(:,1),pts(:,2),'Color','k')
%note the use of 'Color' as a Name-Value argument, Neither 'FaceColor' or
%'EdgeColor' work with this call, returning:
% Error using plot
% Unrecognized property FaceColor for class Line.
%or
% Error using plot
% Unrecognized property EdgeColor for class Line.
  댓글 수: 2
Matt J
Matt J 2023년 4월 13일
편집: Matt J 2023년 4월 13일
Since Tri is not posted, we cannot run the code or examine its inputs.
Ian Townend
Ian Townend 2023년 4월 14일
%attached file includes Tri object
load('trimesh_input.mat')
trimesh(Tri)
Error using trimesh
The triangulation must reside in 3D space.

댓글을 달려면 로그인하십시오.

답변 (1개)

Srija Kethiri
Srija Kethiri 2023년 4월 21일
Hi Ian,
The function ‘trimesh’ has an issue working with the 2D triangulation object. This issue is under investigation, and it might get fixed in the future releases.
  댓글 수: 1
Ian Townend
Ian Townend 2023년 4월 21일
Thanks for the feedback. The explicit workaround I noted in my original submission, means that trimesh can be used - its just not as elegant.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Triangulation Representation에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by