How can I find the max and min "diameters" of an unregular shape (like a circle)? The min diameter should be penpendicular to max one

This version takes less than a minute for your 26 curves as the sliders are set now. It will be more accurate if the values are increased, though can take much, much longer! As before, the white 'X’s are the area centroids for each curve, not used for anything.


max_min_2019Sep25a.gh (82.3 KB)

I’m sure the performance can be improved but not so sure I’m motivated to do so. For example, low precision slider settings can quickly approximate the max “diameter”, followed by a high res “search” in a narrow range around it. Or find a better algorithm, such as what I used before(?), but better has to be proven with benchmarks.

‘Crv Test 1’ and ‘Crv Test 2’ are copies of the same curve so in theory, all four curves should produce the same values for max/min. At the settings used in this file, they can be off by a few hundredths or thousandths.

The ‘Steps’ slider in particular has a dramatic effect on both precision (BETTER!) and speed (much slower). Try 360, for example, which creates parallel planes rotated every half degree.

1 Like