Union() operation adds hole to polyshape

2 views (last 30 days)
Matt J
Matt J on 17 Apr 2020
Answered: Matt J on 1 Jun 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 Comments
Jyotsna Talluri
Jyotsna Talluri on 24 Apr 2020
Seems to be a bug.I have brought this to the notice of our developers.They will look into it and investigate further

Sign in to comment.

Accepted Answer

Matt J
Matt J on 1 Jun 2020

More Answers (0)

Categories

Find more on Elementary Polygons in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!