some optimization in construct mesh, findHoles and scaleToUnitLength