[Closed] How to find inner contour of an object?
Sure, the algorithm is the same, but it is not implemented in the current code since it was not requested.
With some optimizations it is now 5 times faster. I think we can still squeeze that lemon to get a bit more of juice.
108ms
173ms
A new version, 2X faster than the previous one (post 45) and 10X faster than first version (post 38).
Unfortunatly the performance isn’t the same across all Max versions.
MAX 2014 / 2015 / 2016
time:62ms heap:412320L (scene 1)
time:97ms heap:587080L (scene 2)
MAX 2017
time:80ms heap:416004L (scene 1)
time:126ms heap:529708L (scene 2)
MAX 2018 / 2019 / 2020
time:49ms heap:415920L (scene 1)
time:74ms heap:529424L (scene 2)
MAX 2021 / 2022
time:110ms heap:425240L (scene 1)
time:176ms heap:534988L (scene 2)
time:62ms
time:97ms
Its a custom algorithm based on shapes intersections.
I think the differences are due to array/bitarray access and iterators, but I haven’t measured them so I can’t really tell.