Closed-Loop Tool Path Planning For Non-Planar Additive Manufacturing And Sensor-Based Inspection On Stationary And Moving Freeform Objects