Skip to content

BillOfMaterialRow

BillOfMaterialRow represents a single line item in a bill of materials that was interpreted from the engineering drawing. The model stores the position number, part number, designation, quantity required, and unit weight so you can reliably map a callout to the physical part it references. It also captures the material options listed for the row, preserving the context of the original table. With this structured record you can rebuild the BOM programmatically, compare it against enterprise resource planning data, or feed it into procurement workflows. Use each row to validate that all components are accounted for, highlight revisions between drawing versions, and automate change notifications when the documented composition of an assembly evolves.

When a row lists a fastener, such as a press-in nut PEM CLS-M4-2, a weld nut DIN 929 M12 or a screw ISO 4762 M6x20, fastener carries its structured description: the kind of fastener, designation, standard, manufacturer, thread and length. It is the same FastenerSpecification a fastener callout on the drawing carries, so the row and the callout for the same part can be matched field by field. The reader fills it from the row's designation, part number and standard columns; it is null for every other row.

Bases: BaseModel

Represents a single row in a bill of material (BOM) table.

PARAMETER DESCRIPTION
position

Position Number of the part on the assembly, defined using position bubbles.

TYPE: str | None DEFAULT: None

part_number

Part Number of the parts listed in the bill of material.

TYPE: str | None DEFAULT: None

designation

Designation/Title of the part listed in the bill of material.

TYPE: str | None DEFAULT: None

material_options

List of possible MaterialCombinations

TYPE: list[MaterialCombination] DEFAULT: <dynamic>

quantity

Physical quantity in the string format of Pint.

TYPE: Quantity | None DEFAULT: None

unit_weight

Unit Weight of the parts listed in the bill of material.

TYPE: Quantity | None DEFAULT: None

fastener

The fastener the row lists (e.g. a press-in nut PEM CLS-M4-2, a weld nut DIN 929 M12 or a screw ISO 4762 M6x20), when its designation, part number or standard reads as one. None for every other row.

TYPE: FastenerSpecification | None DEFAULT: None

Source code in werk24/models/v2/models.py
class BillOfMaterialRow(BaseModel):
    """
    Represents a single row in a bill of material (BOM) table.
    """

    model_config = ConfigDict(arbitrary_types_allowed=True)

    position: Optional[str] = Field(
        None,
        description="Position Number of the part on the assembly, defined using position bubbles.",
    )
    part_number: Optional[str] = Field(
        None,
        description="Part Number of the parts listed in the bill of material.",
    )
    designation: Optional[str] = Field(
        None,
        description="Designation/Title of the part listed in the bill of material.",
    )
    material_options: list[MaterialCombination] = Field(
        default_factory=list,
        description="List of possible MaterialCombinations",
    )
    quantity: Optional[Quantity] = Field(
        None, description="Physical quantity in the string format of Pint."
    )
    unit_weight: Optional[Quantity] = Field(
        None, description="Unit Weight of the parts listed in the bill of material."
    )
    fastener: Optional[FastenerSpecification] = Field(
        None,
        description=(
            "The fastener the row lists (e.g. a press-in nut `PEM CLS-M4-2`, "
            "a weld nut `DIN 929 M12` or a screw `ISO 4762 M6x20`), when its "
            "designation, part number or standard reads as one. None for "
            "every other row."
        ),
    )