Why aren't these two polyshape objects equal?
Afficher commentaires plus anciens
The attached .mat file contains two polyshape objects which, according to the following, are not equal
load pgons
isequal(pi,p)
However, isn't that contradicted by the following?
isequal(pi,intersect(p,p))
isequal(pi.Vertices,p.Vertices)
For some reason, the intersection of a polyshape with itself gives rise to a different polyshape, but i can't see it in the vertex data or any of the other non-Hidden properties. What is the explanation for this?
1 commentaire
Oleg Iupikov
le 31 Mar 2021
If we debug the isequal method of polyshape class, we can see that the following condition is true:

For pi the SimplifyState = 1, and p.SimplifyState = -1. However, this property is private one. In the comment we see:
properties (Access = private)
%To indicate polyshape's simplification state
%-1: unknown 0: not simplified 1: simplified
SimplifyState
However, I'm not sure what does it mean. Maybe something to do with how those shapes were generated.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Elementary Polygons dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!