Why aren't these two polyshape objects equal?
Ältere Kommentare anzeigen
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 Kommentar
Oleg Iupikov
am 31 Mär. 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.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Elementary Polygons finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!