geomeppy icon indicating copy to clipboard operation
geomeppy copied to clipboard

Suggestion to change code in match_idf_surfaces function

Open katsuya0719 opened this issue 4 years ago • 3 comments

I was testing intersect_match function using simple 2 boxes stacking vertically which has adjscency between roof and floor. However, all the outside boundary condition set to outside which implies this API is not working properly. After investigation, I found that if I change following code to suggestion code in match_idf_surfaces, the problem is fixed.
I understand intension in original code but suggestion code could widen the case which caught by this if sentence.
What do you think about this revision and if you have some intension to keep original code, I would like to know. Original code. if almostequal(s.coords, reversed(m.coords)):.

Suggestion code. if almostequal(sorted(s.coords),sorted(m.coords)):

katsuya0719 avatar Jul 07 '20 10:07 katsuya0719

Happy to take a PR with a test case. Thanks for the suggestion.

jamiebull1 avatar Jul 07 '20 13:07 jamiebull1

This new update is available on which version of geomeppy? My version is 0.11.8. The problem is still there.

Lantonshen avatar Sep 16 '20 18:09 Lantonshen

Great fix @katsuya0719

JoLo90 avatar Apr 23 '21 15:04 JoLo90