upxo.material.processing module
processing.py
A material’s processing history, modeled as an ordered sequence of typed
steps – replaces the old, flat ProcessingCondition (a single
ht/pro/app/appLoc snapshot with no way to represent a
multi-step route). Texture is history- and sequence-dependent, so knowing
which step happened and in what order – not just “some processing
happened” – is what downstream consumers like tcVf_twinned_fcc need.
- class upxo.material.processing.ProcessingStep(step_type: str, params: Dict[str, ~typing.Any]=<factory>, notes: str = '')[source]
Bases:
objectOne step in a material’s processing route.
- Parameters:
step_type (str) –
What kind of step this is. Soft-validated against KNOWN_PROCESSING_STEP_TYPES at construction time – an unrecognized value warns but is still accepted.
This validates itself here, in __post_init__, rather than relying on MaterialRegistry’s known_values mechanism (registry.py): that mechanism only checks direct fields of a registered category’s own top-level instance (e.g. MaterialIdentity.name) via getattr, and can’t reach into a ProcessingRoute’s nested steps list to validate each step’s step_type individually.
params (dict) – Step-specific parameters (e.g. reduction ratio, temperature).
notes (str) – Free-text notes.
- class upxo.material.processing.ProcessingRoute(steps: List[ProcessingStep] = <factory>)[source]
Bases:
objectA material’s processing history as an ordered sequence of steps.
Replaces the old, flat
ProcessingCondition. Order matters – texture depends on which step happened, and in what sequence, not just which step types occurred somewhere in the material’s history.- steps: List[ProcessingStep]
- append_step(step_type: str, **params: Any) None[source]
Append a new
ProcessingStep(step_type, params)to the route.
- property last_deformation_step: ProcessingStep | None
The most recent step whose type is one of the four deformation routes (rolling_symmetric/rolling_asymmetric/extrusion/forging), skipping non-deformation steps (heat_treatment, machining, …) that may follow it. Returns
Noneif the route has no deformation step at all.This is what
tcVf_twinned_fcc’s processing-route -> texture-model mapping (admin/twinnedFccGui/texIntegration/tcVf_scoping.md §3.2) is meant to call.