Skip to content

Measurements & Fit Classes

sewpat.measurements

Ease-adjusted garment measurements derived from body measurements and fit class.

This module provides dataclasses for garment measurements (with ease already applied), distribution helpers that split waist and hip shortfall into darts and side-seam intakes, and factory functions that combine a :class:~sewpat.person.Person with a :class:~sewpat.fitclass.FitClass to produce construction-ready measurements.

BlouseMeasurements(bust: float, waist: float, hip: float, hip_depth: float, bust_depth: float, neck_size: float, bust_span: float, shoulder_width: float, back_length: float, front_length: float, bust_width: float, waist_width: float, hip_width: float, armscye_depth: float, back_width: float, armscye_width: float, chest_width: float, gender: Gender = Gender.FEMALE) dataclass

Ease-adjusted measurements for blouse / top construction.

All values are in mm (the project's internal unit). Build via :func:make_top_measurements from a :class:~sewpat.person.BalancedPerson and a :class:~sewpat.fitclass.FitClass.

Attributes:

Name Type Description
bust float

BrU — Brustumfang (bust circumference).

waist float

TaU — Taillenumfang (waist circumference).

hip float

HüU — Hüftumfang (hip circumference).

hip_depth float

HüT — Hüfttiefe (hip depth).

bust_depth float

BrT — Brusttiefe (bust depth).

neck_size float

HlB — Halslochbreite (neck hole width).

bust_span float

BrPA — Brustpunktabstand (bust point distance).

shoulder_width float

SuB — Schulterbreite (shoulder width, with ease).

back_length float

RüL — Rückenlänge (back length).

front_length float

VL — Vorderlänge (front length).

bust_width float

BrW — Brustbreite fertig (half-width, with ease).

waist_width float

TaW — Taillenweite fertig (half-width, with ease).

hip_width float

HüW — Hüftweite fertig (half-width, with ease).

armscye_depth float

AlT — Armlochtiefe (armhole depth, with ease).

back_width float

RüB — Rückenbreite (back width, with ease).

armscye_width float

ArD — Armdurchmesser (arm diameter, with ease).

chest_width float

BrB — Brustbreite (chest width, with ease).

gender Gender

Used for gender-specific construction formulas.

__post_init__() -> None

Validate that back + armscye + chest widths sum to bust_width / 2.

TrouserMeasurements(waist: float, hip: float, body_rise: float, waist_width: float, hip_width: float, hip_depth: float | None = None, inseam: float | None = None, sTaH: float | None = None, knee_height: float | None = None, front_trouser_width: float | None = None, gender: Gender = Gender.FEMALE) dataclass

Ease-adjusted measurements for trouser construction.

All values are in mm (the project's internal unit).

Attributes:

Name Type Description
waist float

TaU — Taillenumfang (waist circumference, with ease).

hip float

HüU — Hüftumfang (hip circumference, with ease).

body_rise float

SiH — Sitzhöhe (body rise, with ease).

waist_width float

TaW — Taillenweite fertig (finished waist half-width).

hip_width float

HüW — Hüftweite fertig (finished hip half-width).

hip_depth float | None

HüT — Hüfttiefe (hip depth; optional).

inseam float | None

SrH — Schritthöhe (inside leg length; optional).

sTaH float | None

Combined rise + inseam for children (optional).

knee_height float | None

Kniehöhe (knee height, derived if not given).

front_trouser_width float | None

vHoB — Vorderhosenbreite (defaults to 25 % of hip_width).

gender Gender

Used for gender-specific construction formulas.

__post_init__() -> None

Derive front_trouser_width and knee_height when not explicitly set.

TrouserEase(body_rise_ease: float = 0.0, inseam_ease: float = 0.0, hip_ease: float = 0.0, waist_ease: float = 0.0) dataclass

Explicit ease additions for trouser construction.

Used when no fit-class PK table entry is available for the garment type (e.g. children's shorts, sportswear). All values in mm.

Attributes:

Name Type Description
body_rise_ease float

Added to body rise (SiH).

inseam_ease float

Added to inside-leg length (SrH).

hip_ease float

Added to hip circumference (HüU).

GarmentConfig(length: float, seam_allowance: float = 1 * CM, hem_width: float | None = None, shoulder_gather: float = 1 * CM, armscye_fit: float = 0.0, waist_dart_back_tip: float = 16 * CM, waist_dart_front_tip: float = 12 * CM, side_seam_intake_max: float = 2 * CM) dataclass

Pure garment-design choices — independent of body measurements and fit.

Attributes:

Name Type Description
length float

Modell-Länge (MoL) — finished garment length (hem to nape).

seam_allowance float

Nahtzugabe — seam allowance width added to all seams.

hem_width float | None

Saumweite (SaW) — hem width (optional; used for trousers).

shoulder_gather float

Schulter-Weite — gather/ease added to the shoulder seam length. Lengthens the shoulder seam on both pieces so fabric can be eased or gathered at the sleeve head.

armscye_fit float

Controls how tightly the front armscye fits around the upper arm. Range 0–1 cm: 0 = regular fit, 1 = tight fit. Shifts the front armscye shoulder point inward, reducing the armhole circumference.

waist_dart_back_tip float

Distance from the waist dart centre to its lower (hem-side) tip on the back piece. Range: 13–16 cm.

waist_dart_front_tip float

Distance from the waist dart centre to its lower (hem-side) tip on the front piece.

side_seam_intake_max float

Maximum side-seam intake per side used when distributing the waist shortfall. Default 2 cm (fitted/waisted-dart block). Set to 0–1 cm for a casual block where shaping is achieved by the side seam alone, without waist darts.

__post_init__() -> None

Validate armscye_fit and waist_dart_back_tip are within permitted ranges.

TrouserConfig(length: float, seam_allowance: float = 1 * CM, hem_width: float | None = None, shoulder_gather: float = 1 * CM, armscye_fit: float = 0.0, waist_dart_back_tip: float = 16 * CM, waist_dart_front_tip: float = 12 * CM, side_seam_intake_max: float = 2 * CM, front_trouser_ease: float | None = None) dataclass

Bases: GarmentConfig

Garment-design choices specific to trousers.

Attributes:

Name Type Description
front_trouser_ease float | None

Zugabe vordere Hosenbreite (ZuvHoB).

HipDistribution(front_hip_width: float, back_hip_width: float, total_hip_width: float, hip_shortfall: float) dataclass

Result of the hip excess / shortfall (Fehlbetrag) calculation.

All values are in the project's internal unit (mm).

Attributes:

Name Type Description
front_hip_width float

Distance from center-front to side-seam at hip level.

back_hip_width float

Distance from side-seam to center-back at hip level.

total_hip_width float

Total hip width on the pattern (= front + back).

hip_shortfall float

Hip excess = total_hip_width − hip_width / 2.

WaistDistribution(front_waist_width: float, back_waist_width: float, total_waist_width: float, hip_shortfall: float, side_seam_intake: float, front_dart_width: float, back_dart_width: float, remainder: float) dataclass

Result of the waist-dart hip_shortfall (Ausfallbetrag) calculation.

All values are in the project's internal unit (mm).

Attributes:

Name Type Description
front_waist_width float

Distance from center-front to side-seam at waist level.

back_waist_width float

Distance from side-seam to center-back at waist level.

total_waist_width float

Total waist width on the pattern (= front + back).

hip_shortfall float

Waist excess = total_waist_width − waist_width / 2.

side_seam_intake float

Side-seam take-in per side (clamped to 0–2 cm).

front_dart_width float

Front waist dart intake (clamped to 1–3 cm).

back_dart_width float

Back waist dart intake (clamped to 2–4 cm).

remainder float

Undistributed excess after clamping (0 if perfectly distributed).

make_top_measurements(person: BalancedPerson, fit_class: FitClass) -> BlouseMeasurements

Build ease-included top measurements from a balanced person and fit class.

Parameters:

Name Type Description Default
person BalancedPerson

A :class:~sewpat.person.BalancedPerson — use :meth:~sewpat.person.PersonAnalyser.get_balanced_person to obtain one.

required
fit_class FitClass

:class:~sewpat.fitclass.FitClass providing all ease values.

required

make_measurements_trouser(person: Person, ease: TrouserEase, balance: BalanceAdjustments | None = None) -> TrouserMeasurements

Build ease-included trouser measurements.

Parameters:

Name Type Description Default
person Person

Body measurements.

required
ease TrouserEase

:class:TrouserEase with trouser-specific ease additions.

required
balance BalanceAdjustments | None

Optional front/back length corrections.

None

calculate_hip_distribution(meas: BlouseMeasurements, pt_hip_cf: Point, pt_hip_sf: Point, pt_hip_sb: Point, pt_hip_cb: Point) -> HipDistribution

Calculate the hip excess / shortfall at the hip line.

Parameters:

Name Type Description Default
meas BlouseMeasurements

Blouse measurements (ease already included).

required
pt_hip_cf Point

Intersection of center-front with hip line.

required
pt_hip_sf Point

Intersection of side-front with hip line.

required
pt_hip_sb Point

Intersection of side-back with hip line.

required
pt_hip_cb Point

Intersection of center-back with hip line.

required

Returns:

Type Description
HipDistribution

class:HipDistribution with all computed values.

calculate_waist_distribution(meas: BlouseMeasurements, pt_waist_cf: Point, pt_waist_sf: Point, pt_waist_sb: Point, pt_waist_cb: Point, side_seam_intake_max: float = 2.0 * CM) -> WaistDistribution

Calculate how the waist hip_shortfall (Ausfallbetrag) is distributed to darts.

Measures the pattern distances at the waist line, computes the total excess over the finished waist measurement, and splits it between the two side seams and the front / back waist darts using rule-based clamping.

Parameters:

Name Type Description Default
meas BlouseMeasurements

Blouse measurements (ease already included).

required
pt_waist_cf Point

Intersection of center-front with waist line.

required
pt_waist_sf Point

Intersection of side-front with waist line.

required
pt_waist_sb Point

Intersection of side-back with waist line.

required
pt_waist_cb Point

Intersection of center-back with waist line.

required
side_seam_intake_max float

Maximum side-seam intake per side (clamped upper bound). Default 2 cm (waisted/fitted block). Pass a smaller value (0–1 cm) for a casual block where no waist darts are used and shaping comes from the side seam only.

2.0 * CM

Returns:

Type Description
WaistDistribution

class:WaistDistribution with all computed values.

sewpat.fitclass

Fit class (Passformklasse) — single source of truth for garment ease.

The :class:FitClass wraps a single integer pk in the range 0–12 that encodes how tightly a garment fits the body. All ease values are read from src/sewpat/data/fitclass.csv (multi-index: pk × ease field × lo/hi).

Default values are the upper bound (hi) of the published range. Any field may be overridden at construction time; the value must lie within the published [lo, hi] range or a :class:ValueError is raised.

bust_point_ease (ZuBrA) is derived as a construction offset and is included in the table; bust_width_ease is never stored — it is always derived as 2 × (back_width_ease + armscye_width_ease + chest_width_ease).

Only PK 4 is populated with real values. All other PKs raise :class:KeyError until the full Mueller & Sohn table is digitised.

Typical PK ranges

0–3 Swimwear, underwear, bodysuits 4–7 Blouses, light dresses, fitted tops 8–11 Jackets, structured coats 12 Heavy coats

Source: Mueller & Sohn, Rundschau / Modenähen drafting system.

FitClass(pk: int, back_width_ease: float | None = None, armscye_width_ease: float | None = None, chest_width_ease: float | None = None, armscye_depth_ease: float | None = None, waist_ease: float | None = None, hip_ease: float | None = None, bust_point_ease: float | None = None, shoulder_width_ease: float | None = None) dataclass

Fit class — single source of truth for ease and construction offsets.

Pass only pk to use upper-bound defaults for all ease fields. Override individual fields as needed; each must lie within the published range for the given PK or a :class:ValueError is raised.

bust_width_ease is always derived and cannot be set directly.

Parameters:

Name Type Description Default
pk int

Integer 0–12 describing garment fit tightness.

required
back_width_ease float | None

RüB — override in mm.

None
armscye_width_ease float | None

ArD — override in mm.

None
chest_width_ease float | None

BrB — override in mm.

None
armscye_depth_ease float | None

AlT — override in mm.

None
waist_ease float | None

TaU — override in mm.

None
hip_ease float | None

HüU — override in mm.

None
bust_point_ease float | None

ZuBrA — override in mm.

None
shoulder_width_ease float | None

ScB — override in mm.

None

Examples::

fc = FitClass(pk=4)                         # all upper-bound defaults
fc = FitClass(pk=4, back_width_ease=0.7*CM) # override one field
fc.back_width_ease                          # → resolved value (mm)
fc.bust_width_ease                          # → always derived

Initialise FitClass from pk with optional per-field ease overrides.

armscye_depth_ease: float property

AlT — Armlochtiefe-Zugabe (override or table hi).

armscye_width_ease: float property

ArD — Armdurchmesser-Zugabe (override or table hi).

back_width_ease: float property

RüB — Rückenbreite-Zugabe (override or table hi).

bust_point_ease: float property

ZuBrA — Zugabe Brustpunktabstand (override or table hi).

bust_width_ease: float property

BrW-Zugabe — always derived: 2 × (back + armscye_width + chest).

chest_width_ease: float property

BrB — Brustbreite-Zugabe (override or table hi).

hip_ease: float property

HüU — Hüftumfang-Zugabe (override or table hi).

shoulder_width_ease: float property

ScB — Schulterbreite-Zugabe (override or table hi).

waist_ease: float property

TaU — Taillenumfang-Zugabe (override or table hi).

__post_init__() -> None

Validate pk and resolve ease fields from the table.

range(field_name: str) -> _Range

Return the published [lo, hi] range for field_name at this PK.

Parameters:

Name Type Description Default
field_name str

One of the names in :data:EASE_FIELDS.

required

Raises:

Type Description
KeyError

if field_name is not a recognised ease field.