=0.70, not 2x par slow.\nmy_rough = dict(rpm=8000, feed=480, depth=2.0)\nmy_finish = dict(rpm=10000, feed=350, depth=1.0)\nrg = cut_gauges(**my_rough)\nfg = cut_gauges(**my_finish)\noverload = (rg['load'] > 95) or (fg['load'] > 95)\nfinish_score = fg['finish']\ncut_time = rg['time'] + fg['time']\nprint(f\"rough load={rg['load']}% finish load={fg['load']}% finish_score={finish_score} time={cut_time:.1f}\")","label":"3 — Your turn: tune rough + finish"},{"code":"np.random.seed(2202)\npar_time = 33.4\nproblems = []\nif overload:\n bad = 'rough' if rg['load']>95 else 'finish'\n d = my_rough['depth'] if bad=='rough' else my_finish['depth']\n problems.append(f'OVERLOAD: peak spindle load on {bad} pass (depth={d}). Force scales with depth - reduce depth_per_pass to <= 2.5 mm.')\nif finish_score < 0.70:\n problems.append(f'POOR_FINISH: finish_score {finish_score} (target 0.70). Lower finishing feed or raise rpm - finish improves as feed/rpm drops.')\nif max(rg['deflection'], fg['deflection']) > 0.05:\n problems.append('CHATTER: tool is bending - reduce feed or depth on the heavy pass.')\nif cut_time > 2.0*par_time:\n problems.append(f'SLOW: cut_time {cut_time:.0f} = {cut_time/par_time:.1f}x par - raise depth on the rough pass (finish there is not graded).')\n\nif not overload and finish_score >= 0.70 and cut_time <= 2.0*par_time and max(rg['deflection'],fg['deflection'])<=0.05:\n print(f'PASS - no overload, finish_score {finish_score} >= 0.70, time {cut_time:.0f}<=2x par. '\n 'depth_per_pass most directly drives spindle load.')\nelse:\n print('FAIL - ' + ' '.join(problems[:2]))","label":"4 — Autograder (seed 2202)"}],"intro":"Cut gauges are pure functions of the parameters (force ∝ feed×depth×material; finish ∝ feed/rpm). Tune the three numbers and run.","key":"manufacturing/process-parameters","kind":"python","title":"Process parameters"}">
PYTHON · NUMPY · IN-BROWSER
Process parameters
Cut gauges are pure functions of the parameters (force ∝ feed×depth×material; finish ∝ feed/rpm). Tune the three numbers and run.