Orange 3 Heatmap clustering under the hood
It appears the widget uses hierarchical clustering. I guess the metric is Euclidean distance by default and there doesn't seem to be a way to specify another one (except by using Distances widget and connecting it into the Distance Map widget).

I don't think it is possible to export the widget's workflow as pure code, but you can look at what the widget does in the source code (seems pretty low-level, though). What you can do, however, is select subsets of data (can be saved with Save Data widget) for further analysis if that's of any help.