Why aren't these two polyshape objects equal?
古いコメントを表示
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 件のコメント
Oleg Iupikov
2021 年 3 月 31 日
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.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Elementary Polygons についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!