from @vicdoval's script here: https://github.com/nortikin/sverchok/issues/3802#issuecomment-753004985