4.0) and (gap < SMALLEST_TOOL_D) # REACH\n\ndefects = {\n 'thin_wall': is_thin_wall(WALL),\n 'no_draft': is_no_draft(DRAFT_DEG),\n 'sharp_internal_corner': is_sharp_corner(FILLET_R),\n 'unreachable_internal_feature': is_unreachable(RIB_DEPTH, RIB_GAP),\n}\nfor name, hit in defects.items():\n print(f'{name:32s} {\"DEFECT\" if hit else \"ok\"}')","label":"2 — Geometric defect tests (reach / form / survive)"},{"code":"# Tag at least 3 distinct defects. Each entry: (defect_class, reason_class).\n# Valid defect_class values are the keys of `defects`. Distractors are NOT valid:\nDISTRACTORS = {'wrong_color', 'not_symmetric', 'part_too_heavy', 'hole_too_small'}\n\n# reason_class must match the test each defect fails: 'survive' | 'form' | 'reach'\nREASON_OF = {\n 'thin_wall': 'survive', 'no_draft': 'form',\n 'sharp_internal_corner': 'reach', 'unreachable_internal_feature': 'reach',\n}\n\n# EDIT THIS LIST — tag the features you think a tool will fight:\nmy_tags = [\n ('thin_wall', 'survive'),\n ('no_draft', 'form'),\n ('sharp_internal_corner', 'reach'),\n]\nprint('you tagged:', [t[0] for t in my_tags])","label":"3 — Your turn: tag the defects"},{"code":"# Deterministic grader: >= 3 distinct TRUE defects, each with the right reason,\n# and ZERO distractor tags accepted.\ncorrect, seen, problems = 0, set(), []\nfor cls, reason in my_tags:\n if cls in DISTRACTORS:\n problems.append(f'\"{cls}\" is a distractor, not a manufacturability defect — color/symmetry never decide whether a tool can reach or form the part.')\n continue\n if cls not in defects:\n problems.append(f'\"{cls}\" is not a recognized feature. Tag a real geometric defect.')\n continue\n if not defects[cls]:\n problems.append(f'{cls} is present but its test passes — it is not actually a defect.')\n continue\n if reason != REASON_OF[cls]:\n problems.append(f'{cls} is real, but reason \"{reason}\" is wrong — it fails the {REASON_OF[cls].upper()} test.')\n continue\n if cls not in seen:\n seen.add(cls); correct += 1\n\nif correct >= 3 and not problems:\n print(f'PASS - {correct}/3 defects correctly tagged and reasoned. '\n 'You found thin wall (survive), no draft (form), sharp corner (reach). '\n 'Carry these names forward; Lesson 1.3 is where you fix them.')\nelse:\n print(f'FAIL - {correct}/3 correct. ' + ' '.join(problems[:2] if problems else\n [f'Only {correct} distinct true defects tagged. Run Draft check on the barrel and section the rib pocket to find more.']))","label":"4 — Autograder (seed 1101)"}],"intro":"The full Bench runs the WebGL inspector; here you re-implement its deterministic geometry tests in numpy — measure each feature, classify the defect, and tag it.","key":"manufacturing/what-manufacturable-means","kind":"python","title":"What \"manufacturable\" means"}">
PYTHON · NUMPY · IN-BROWSER

What "manufacturable" means

The full Bench runs the WebGL inspector; here you re-implement its deterministic geometry tests in numpy — measure each feature, classify the defect, and tag it.