A path planning algorithm for industrial processes under velocity constraints with an application to additive manufacturing