Position Tolerance Calculation (cross-cutting/tolerancing/position-tolerance-calc)
Use when the task is the GD&T position tolerance check for a hole or
pin feature: radial deviation from the true position, required zone
diameter, MMC bonus tolerance, virtual condition boundary, and the
acceptance verdict.
Domain quick reference
- A position tolerance callout defines a cylindrical zone, expressed
as a diameter, around the true position of the feature; the actual
feature center must lie inside the zone.
- Radial deviation of the actual center from the true position:
d = sqrt((x_a - x_t)^2 + (y_a - y_t)^2), any consistent length
unit (mm, inch).
- Required zone diameter: D_zone = 2 * d, the smallest cylinder
centered on the true position that contains the actual center.
- MMC bonus tolerance for a hole: the MMC size is the smallest hole
(most material); bonus = actual_size - mmc_size, zero at MMC and
growing as the hole grows.
- Total tolerance: T_total = stated_tolerance + bonus.
- Virtual condition, the fixed worst-case boundary for the mating
part: hole VC = mmc_size - stated_tolerance; pin VC = mmc_size +
stated_tolerance. The stated tolerance only, never the bonus.
- Acceptance verdict: 2 * d <= stated_tolerance + bonus. The maximum
allowed center offset is (stated_tolerance + bonus) / 2.
Workflow
- Collect the true position coordinates, the measured actual center,
the stated tolerance diameter, the actual feature size, the MMC
size, and the part type (hole or pin).
- Compute the deviation with positional_deviation.
- Compute the required zone diameter with position_zone_diameter.
- Apply the MMC modifier with mmc_bonus (zero when the actual size
equals MMC).
- Sum the stated tolerance and the bonus with
total_position_tolerance.
- Derive the mating boundary with virtual_condition.
- Decide with position_verdict and report the allowed offset with
max_center_offset before gating the verification.
Pitfalls
- Forgetting that the position tolerance is a diameter: the deviation
is a radius, so compare 2 * d, not d, against the stated tolerance.
- Applying the bonus to the wrong feature: the hole gains bonus as it
grows (material removed), while a pin gains bonus as it shrinks;
the size direction differs by part type.
- Using an actual size below MMC: a hole smaller than its MMC size
violates the size limits, the bonus would be negative, and the
logic raises ValueError.
- Confusing the virtual condition with the bonus boundary: the VC
uses the stated tolerance only, so it is a fixed boundary for the
mating part, not the growing acceptance zone.
- Checking only one boundary: the tolerance zone and the virtual
condition are separate limits and both must be satisfied.
Behavior contract (gate 3)
The deviation, zone diameter, bonus, total tolerance, virtual
condition, and verdict logic is exercised by the gate 3 contract test:
scripts/test_position_tolerance_calc.py against
scripts/position_tolerance_calc_logic.py (stdlib unittest, offline).
Run:
python3 scripts/test_position_tolerance_calc.py
Compliance
- Standards referenced, not reproduced: ASME Y14.5 is proprietary
(ASME); the position tolerance method, the MMC bonus rule, and the
virtual condition formulas are common GD&T methodology, name and
paraphrase only per standards-map.yaml.
- compliance: STANDARDS-REF, gated: false (reference-only listing).
1---2name: position-tolerance-calc3description: Use when you must compute the position tolerance verification for a hole or pin feature controlled by a true position callout per ASME Y14.5: calculate the radial deviation of the actual feature center from the true position, convert the deviation into the cylindrical zone diameter that contains the actual center, apply the maximum material condition bonus tolerance from the actual feature size, derive the virtual condition boundary for the mating part, and decide whether the feature is acceptable. Produces the deviation, the required zone diameter, the bonus tolerance, the total tolerance, the virtual condition, and the acceptance verdict that gate the GD&T verification. Trigger: position tolerance, true position, MMC, bonus tolerance, virtual condition, feature control frame.4license: Apache-2.05---6# Position Tolerance Calculation (cross-cutting/tolerancing/position-tolerance-calc)78Use when the task is the GD&T position tolerance check for a hole or9pin feature: radial deviation from the true position, required zone10diameter, MMC bonus tolerance, virtual condition boundary, and the11acceptance verdict.1213## Domain quick reference1415- A position tolerance callout defines a cylindrical zone, expressed16 as a diameter, around the true position of the feature; the actual17 feature center must lie inside the zone.18- Radial deviation of the actual center from the true position:19 d = sqrt((x_a - x_t)^2 + (y_a - y_t)^2), any consistent length20 unit (mm, inch).21- Required zone diameter: D_zone = 2 * d, the smallest cylinder22 centered on the true position that contains the actual center.23- MMC bonus tolerance for a hole: the MMC size is the smallest hole24 (most material); bonus = actual_size - mmc_size, zero at MMC and25 growing as the hole grows.26- Total tolerance: T_total = stated_tolerance + bonus.27- Virtual condition, the fixed worst-case boundary for the mating28 part: hole VC = mmc_size - stated_tolerance; pin VC = mmc_size +29 stated_tolerance. The stated tolerance only, never the bonus.30- Acceptance verdict: 2 * d <= stated_tolerance + bonus. The maximum31 allowed center offset is (stated_tolerance + bonus) / 2.3233## Workflow34351. Collect the true position coordinates, the measured actual center,36 the stated tolerance diameter, the actual feature size, the MMC37 size, and the part type (hole or pin).382. Compute the deviation with positional_deviation.393. Compute the required zone diameter with position_zone_diameter.404. Apply the MMC modifier with mmc_bonus (zero when the actual size41 equals MMC).425. Sum the stated tolerance and the bonus with43 total_position_tolerance.446. Derive the mating boundary with virtual_condition.457. Decide with position_verdict and report the allowed offset with46 max_center_offset before gating the verification.4748## Pitfalls4950- Forgetting that the position tolerance is a diameter: the deviation51 is a radius, so compare 2 * d, not d, against the stated tolerance.52- Applying the bonus to the wrong feature: the hole gains bonus as it53 grows (material removed), while a pin gains bonus as it shrinks;54 the size direction differs by part type.55- Using an actual size below MMC: a hole smaller than its MMC size56 violates the size limits, the bonus would be negative, and the57 logic raises ValueError.58- Confusing the virtual condition with the bonus boundary: the VC59 uses the stated tolerance only, so it is a fixed boundary for the60 mating part, not the growing acceptance zone.61- Checking only one boundary: the tolerance zone and the virtual62 condition are separate limits and both must be satisfied.6364## Behavior contract (gate 3)6566The deviation, zone diameter, bonus, total tolerance, virtual67condition, and verdict logic is exercised by the gate 3 contract test:68scripts/test_position_tolerance_calc.py against69scripts/position_tolerance_calc_logic.py (stdlib unittest, offline).70Run:71python3 scripts/test_position_tolerance_calc.py7273## Compliance7475- Standards referenced, not reproduced: ASME Y14.5 is proprietary76 (ASME); the position tolerance method, the MMC bonus rule, and the77 virtual condition formulas are common GD&T methodology, name and78 paraphrase only per standards-map.yaml.79- compliance: STANDARDS-REF, gated: false (reference-only listing).