GDandT Basics (cross-cutting/tolerancing/gdandt-basics)
Use when the task is the geometric dimensioning and tolerancing
fundamentals behind an ASME Y14.5 drawing: reading a feature control
frame, establishing the datum reference frame, telling a form,
orientation, position, profile, or runout tolerance apart, applying
the material condition modifiers (MMC, LMC, RFS), and computing the
bonus tolerance that becomes available when a feature departs from its
maximum material condition size. This leaf is the foundation for the
tolerancing pack; it is distinct from
cross-cutting/tolerancing/position-tolerance-calc (which runs the full
position verification with virtual condition), from
cross-cutting/tolerancing/tolerance-stackup (which sums tolerance
contributions across an assembly), and from
cross-cutting/tolerancing/datum-reference-frames (which builds and
evaluates datum reference frames in detail).
Domain quick reference
- Feature control frame: the drawing symbol that carries the
tolerance. It reads, in order: geometric characteristic symbol,
tolerance value (diameter symbol when the zone is cylindrical),
optional material condition modifier, then up to three datum
references. Example: position | diameter 0.5 (M) | A | B (M) | C.
- Geometric characteristic categories: form tolerances (flatness,
straightness, circularity, cylindricity) control shape alone and
carry no datum; orientation tolerances (perpendicularity,
parallelism, angularity) control orientation relative to a datum
reference frame; position controls location relative to the true
position; profile controls a boundary offset from the true profile;
runout controls coaxiality relative to a datum axis.
- Tolerance zone types: flatness is two parallel planes; circularity
is an annulus between two concentric circles; cylindricity is the
annular space between two coaxial cylinders; position is a
cylindrical zone, expressed as a diameter, about the true position;
perpendicularity, parallelism, and angularity are planes or
cylinders oriented to the datum frame.
- Datum reference frame: the ordered set of datum features (primary,
secondary, tertiary) that locates and orients the tolerance zones.
The frame is read left to right in the feature control frame.
- Material condition modifiers, applied to the tolerance in the frame:
M means maximum material condition (MMC), the most material the
feature can have (smallest hole, largest pin); L means least
material condition (LMC), the least material (largest hole,
smallest pin); S, or no modifier at all, means regardless of feature
size (RFS).
- Bonus tolerance at MMC: the stated tolerance applies at the MMC
size; any departure of the actual feature size from the MMC size
adds bonus. For a hole (MMC = smallest size) the bonus is
actual - mmc; for a pin (MMC = largest size) the bonus is
mmc - actual. Total tolerance = stated tolerance + bonus.
- LMC bonus works in the opposite direction: for a hole the bonus is
lmc - actual, for a pin it is actual - lmc.
- Zero tolerance at MMC is legitimate: a position callout of
diameter 0 (M) means the feature must sit exactly at true position
when at MMC, and every unit of departure from MMC becomes the
available tolerance.
Workflow
- Read the feature control frame off the drawing and parse it with
parse_feature_control_frame; the result carries the symbol, the
tolerance value, the diameter flag, the modifier, and the datum
list.
- Identify the tolerance category with tolerance_category (form,
orientation, location, profile, or runout) and the zone shape with
tolerance_zone_type.
- Read the material condition modifier with
material_condition_modifier and explain it with
modifier_meaning (MMC, LMC, or RFS default).
- From the size limits and the part type, derive the boundary sizes
with mmc_size and lmc_size.
- When the modifier is M, compute the bonus tolerance with
bonus_tolerance_at_mmc from the actual feature size, and the total
budget with total_tolerance_at_mmc.
- For an LMC callout, use bonus_tolerance_at_lmc instead.
- Assemble the full interpretation with
interpret_feature_control_frame, which includes the bonus and total
tolerance whenever the modifier is M and the sizes are supplied.
- Confirm the deterministic checks with the contract test
scripts/test_gdandt_basics.py.
Worked example
Interpret the feature control frame "position | diameter 0.5 (M) | A |
B | C" for a hole with size limits 10.0 to 10.3 mm:
- parse_feature_control_frame returns symbol "position", tolerance
0.5, diameter True, modifier "M", and datums A, B, C in order.
- tolerance_category is "location"; tolerance_zone_type is the
cylindrical zone of diameter 0.5 about the true position.
- modifier_meaning("M") is "maximum material condition (MMC): the
stated tolerance applies at the MMC size and grows with departure
from MMC".
- mmc_size((10.0, 10.3), "hole") is 10.0; the bonus is zero when the
hole measures 10.0 and grows as the hole grows.
- If the actual hole measures 10.3, bonus_tolerance_at_mmc gives
10.3 - 10.0 = 0.3 and total_tolerance_at_mmc gives
0.5 + 0.3 = 0.8; the acceptance zone diameter is 0.8 at that size.
- A hole measuring 9.9 is below MMC, violates the size limits, and
the logic raises ValueError rather than returning a negative bonus.
A second example: "flatness | 0.2" is a form tolerance, so
tolerance_category returns "form", the zone is two parallel planes
0.2 apart, and parse_feature_control_frame raises if a datum is added,
because form tolerances reference no datum.
Pitfalls
- Adding a datum to a form tolerance callout: parse_feature_control_frame
raises, because form tolerances reference no datum.
- Reading the zone as a cylinder for every symbol: only location
tolerances such as position with the diameter flag get a cylindrical
zone; "flatness | 0.2" is two parallel planes 0.2 apart.
- Forgetting that MMC bonus grows with departure from MMC: the bonus is
zero at the MMC size (10.0 for a hole with limits 10.0-10.3) and grows
as the feature departs toward LMC.
- Passing a size outside the size limits: a hole at 9.9 is below MMC and
violates the limits, so the logic raises ValueError instead of
returning a negative bonus.
- Applying the MMC bonus machinery to an LMC callout (or assuming a
bonus under RFS): LMC callouts use bonus_tolerance_at_lmc, and the
RFS default grants no bonus at all.
- Treating the stated tolerance as the zone at every size: with the M
modifier the acceptance zone is stated tolerance plus bonus (0.5 + 0.3
= 0.8 for a 10.3 hole), so the zone grows with the feature.
Related leaves
- cross-cutting/tolerancing/position-tolerance-calc: full position
verification, deviation from true position, virtual condition, and
the acceptance verdict.
- cross-cutting/tolerancing/tolerance-stackup: summing tolerance
contributions across an assembly.
- cross-cutting/tolerancing/datum-reference-frames: datum reference
frame construction and evaluation in detail.
Behavior contract (gate 3)
Run the deterministic contract test (stdlib unittest, offline):
python3 scripts/test_gdandt_basics.py
The test covers feature control frame parsing (symbol, tolerance,
diameter flag, modifier, datums), category and zone classification,
modifier meanings, MMC and LMC bonus tolerance including size-limit
violations, boundary sizes, total tolerance at MMC, zero tolerance at
MMC, the full frame interpreter, and invalid-input edge cases.
Compliance
- Standards referenced, not reproduced: ASME Y14.5 is proprietary
(ASME); the feature control frame structure, the tolerance
categories, the MMC/LMC/RFS modifiers, and the bonus tolerance rule
are common GD&T methodology, name and paraphrase only per
standards-map.yaml.
- compliance: STANDARDS-REF, gated: false (reference-only listing).
1---2name: gdandt-basics3description: Use when the task is GD&T fundamentals: feature control frames, datum reference frames, form tolerances such as flatness, straightness, circularity, and cylindricity, orientation tolerances such as perpendicularity, parallelism, and angularity, position tolerance, profile, runout, or material condition and bonus tolerance on drawings. Interpret geometric dimensioning and tolerancing callouts per ASME Y14.5: parse a feature control frame into its symbol, tolerance, and datum references, identify the tolerance zone type and whether the callout is a form, orientation, position, profile, or runout tolerance, apply the material condition modifiers MMC, LMC, and RFS, and compute the bonus tolerance and the total tolerance when the feature departs from its maximum material condition size. Produce the callout summary with zone, category, modifier meaning, and any bonus. Trigger: feature control frame, GD&T, MMC, LMC, RFS, bonus tolerance, datum reference frame, flatness, perpendicularity, position tolerance.4license: Apache-2.05---6# GDandT Basics (cross-cutting/tolerancing/gdandt-basics)78Use when the task is the geometric dimensioning and tolerancing9fundamentals behind an ASME Y14.5 drawing: reading a feature control10frame, establishing the datum reference frame, telling a form,11orientation, position, profile, or runout tolerance apart, applying12the material condition modifiers (MMC, LMC, RFS), and computing the13bonus tolerance that becomes available when a feature departs from its14maximum material condition size. This leaf is the foundation for the15tolerancing pack; it is distinct from16cross-cutting/tolerancing/position-tolerance-calc (which runs the full17position verification with virtual condition), from18cross-cutting/tolerancing/tolerance-stackup (which sums tolerance19contributions across an assembly), and from20cross-cutting/tolerancing/datum-reference-frames (which builds and21evaluates datum reference frames in detail).2223## Domain quick reference2425- Feature control frame: the drawing symbol that carries the26 tolerance. It reads, in order: geometric characteristic symbol,27 tolerance value (diameter symbol when the zone is cylindrical),28 optional material condition modifier, then up to three datum29 references. Example: position | diameter 0.5 (M) | A | B (M) | C.30- Geometric characteristic categories: form tolerances (flatness,31 straightness, circularity, cylindricity) control shape alone and32 carry no datum; orientation tolerances (perpendicularity,33 parallelism, angularity) control orientation relative to a datum34 reference frame; position controls location relative to the true35 position; profile controls a boundary offset from the true profile;36 runout controls coaxiality relative to a datum axis.37- Tolerance zone types: flatness is two parallel planes; circularity38 is an annulus between two concentric circles; cylindricity is the39 annular space between two coaxial cylinders; position is a40 cylindrical zone, expressed as a diameter, about the true position;41 perpendicularity, parallelism, and angularity are planes or42 cylinders oriented to the datum frame.43- Datum reference frame: the ordered set of datum features (primary,44 secondary, tertiary) that locates and orients the tolerance zones.45 The frame is read left to right in the feature control frame.46- Material condition modifiers, applied to the tolerance in the frame:47 M means maximum material condition (MMC), the most material the48 feature can have (smallest hole, largest pin); L means least49 material condition (LMC), the least material (largest hole,50 smallest pin); S, or no modifier at all, means regardless of feature51 size (RFS).52- Bonus tolerance at MMC: the stated tolerance applies at the MMC53 size; any departure of the actual feature size from the MMC size54 adds bonus. For a hole (MMC = smallest size) the bonus is55 actual - mmc; for a pin (MMC = largest size) the bonus is56 mmc - actual. Total tolerance = stated tolerance + bonus.57- LMC bonus works in the opposite direction: for a hole the bonus is58 lmc - actual, for a pin it is actual - lmc.59- Zero tolerance at MMC is legitimate: a position callout of60 diameter 0 (M) means the feature must sit exactly at true position61 when at MMC, and every unit of departure from MMC becomes the62 available tolerance.6364## Workflow65661. Read the feature control frame off the drawing and parse it with67 parse_feature_control_frame; the result carries the symbol, the68 tolerance value, the diameter flag, the modifier, and the datum69 list.702. Identify the tolerance category with tolerance_category (form,71 orientation, location, profile, or runout) and the zone shape with72 tolerance_zone_type.733. Read the material condition modifier with74 material_condition_modifier and explain it with75 modifier_meaning (MMC, LMC, or RFS default).764. From the size limits and the part type, derive the boundary sizes77 with mmc_size and lmc_size.785. When the modifier is M, compute the bonus tolerance with79 bonus_tolerance_at_mmc from the actual feature size, and the total80 budget with total_tolerance_at_mmc.816. For an LMC callout, use bonus_tolerance_at_lmc instead.827. Assemble the full interpretation with83 interpret_feature_control_frame, which includes the bonus and total84 tolerance whenever the modifier is M and the sizes are supplied.858. Confirm the deterministic checks with the contract test86 scripts/test_gdandt_basics.py.8788## Worked example8990Interpret the feature control frame "position | diameter 0.5 (M) | A |91B | C" for a hole with size limits 10.0 to 10.3 mm:9293- parse_feature_control_frame returns symbol "position", tolerance94 0.5, diameter True, modifier "M", and datums A, B, C in order.95- tolerance_category is "location"; tolerance_zone_type is the96 cylindrical zone of diameter 0.5 about the true position.97- modifier_meaning("M") is "maximum material condition (MMC): the98 stated tolerance applies at the MMC size and grows with departure99 from MMC".100- mmc_size((10.0, 10.3), "hole") is 10.0; the bonus is zero when the101 hole measures 10.0 and grows as the hole grows.102- If the actual hole measures 10.3, bonus_tolerance_at_mmc gives103 10.3 - 10.0 = 0.3 and total_tolerance_at_mmc gives104 0.5 + 0.3 = 0.8; the acceptance zone diameter is 0.8 at that size.105- A hole measuring 9.9 is below MMC, violates the size limits, and106 the logic raises ValueError rather than returning a negative bonus.107108A second example: "flatness | 0.2" is a form tolerance, so109tolerance_category returns "form", the zone is two parallel planes1100.2 apart, and parse_feature_control_frame raises if a datum is added,111because form tolerances reference no datum.112113## Pitfalls114115- Adding a datum to a form tolerance callout: parse_feature_control_frame116 raises, because form tolerances reference no datum.117- Reading the zone as a cylinder for every symbol: only location118 tolerances such as position with the diameter flag get a cylindrical119 zone; "flatness | 0.2" is two parallel planes 0.2 apart.120- Forgetting that MMC bonus grows with departure from MMC: the bonus is121 zero at the MMC size (10.0 for a hole with limits 10.0-10.3) and grows122 as the feature departs toward LMC.123- Passing a size outside the size limits: a hole at 9.9 is below MMC and124 violates the limits, so the logic raises ValueError instead of125 returning a negative bonus.126- Applying the MMC bonus machinery to an LMC callout (or assuming a127 bonus under RFS): LMC callouts use bonus_tolerance_at_lmc, and the128 RFS default grants no bonus at all.129- Treating the stated tolerance as the zone at every size: with the M130 modifier the acceptance zone is stated tolerance plus bonus (0.5 + 0.3131 = 0.8 for a 10.3 hole), so the zone grows with the feature.132133## Related leaves134135- cross-cutting/tolerancing/position-tolerance-calc: full position136 verification, deviation from true position, virtual condition, and137 the acceptance verdict.138- cross-cutting/tolerancing/tolerance-stackup: summing tolerance139 contributions across an assembly.140- cross-cutting/tolerancing/datum-reference-frames: datum reference141 frame construction and evaluation in detail.142143## Behavior contract (gate 3)144145Run the deterministic contract test (stdlib unittest, offline):146147 python3 scripts/test_gdandt_basics.py148149The test covers feature control frame parsing (symbol, tolerance,150diameter flag, modifier, datums), category and zone classification,151modifier meanings, MMC and LMC bonus tolerance including size-limit152violations, boundary sizes, total tolerance at MMC, zero tolerance at153MMC, the full frame interpreter, and invalid-input edge cases.154155## Compliance156157- Standards referenced, not reproduced: ASME Y14.5 is proprietary158 (ASME); the feature control frame structure, the tolerance159 categories, the MMC/LMC/RFS modifiers, and the bonus tolerance rule160 are common GD&T methodology, name and paraphrase only per161 standards-map.yaml.162- compliance: STANDARDS-REF, gated: false (reference-only listing).