Effacer les filtres
Effacer les filtres

trimesh not working with 2D triangulation object

2 vues (au cours des 30 derniers jours)
Ian Townend
Ian Townend le 13 Avr 2023
Commenté : Ian Townend le 21 Avr 2023
%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 commentaires
Matt J
Matt J le 13 Avr 2023
Modifié(e) : Matt J le 13 Avr 2023
Since Tri is not posted, we cannot run the code or examine its inputs.
Ian Townend
Ian Townend le 14 Avr 2023
%attached file includes Tri object
load('trimesh_input.mat')
trimesh(Tri)
Error using trimesh
The triangulation must reside in 3D space.

Connectez-vous pour commenter.

Réponses (1)

Srija Kethiri
Srija Kethiri le 21 Avr 2023
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 commentaire
Ian Townend
Ian Townend le 21 Avr 2023
Thanks for the feedback. The explicit workaround I noted in my original submission, means that trimesh can be used - its just not as elegant.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Triangulation Representation dans Help Center et File Exchange

Produits


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by