Cutting bars into desired lengths