* The minimize() function, which solves a least-squares problem, is only needed for sharp remesh mode, but was being calculated for smooth and blocks modes as well. Disabling this calculation when it's not needed gives a big performance boost.