Union() operation adds hole to polyshape

10 vues (au cours des 30 derniers jours)
Matt J
Matt J le 17 Avr 2020
Réponse apportée : Matt J le 1 Juin 2020
I have attached a file containing a vector of 11 polyshape objects
>> load('polyshape_vector.mat')
>> whos pgon
Name Size Bytes Class Attributes
pgon 1x11 3080 polyshape
When these polyshapes are plotted, they form an agglomeration of triangles which, to the eye at least, has 2 holes
>> plot(pgon)
However, when I plot the union of this polyshape vector, a 3rd hole forms (this is in R2018a). It defies my intuition that taking the union of a collection of polygons could introduce more holes. Can anyone think why this might occur?
>> plot(union(pgon))
  5 commentaires
Jyotsna Talluri
Jyotsna Talluri le 24 Avr 2020
Seems to be a bug.I have brought this to the notice of our developers.They will look into it and investigate further
Matt J
Matt J le 29 Avr 2020
Thank you!

Connectez-vous pour commenter.

Réponse acceptée

Matt J
Matt J le 1 Juin 2020

Plus de réponses (0)

Catégories

En savoir plus sur Elementary Polygons dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by