virtual_knitting_machine.machine_components.needles.Sheet_Identifier module
Module containing the Sheet_Identifier class for identifying sheets at a given gauge.
- class Sheet_Identifier(sheet, gauge)[source]
Bases:
objectClass used to identify sheets at a given gauge.
- needle(is_front, position_in_sheet, machine_state, is_slider=False)[source]
Gets a needle within the sheet with specified position
- Parameters:
is_front (bool) – True if needle is on front bed.
position_in_sheet (bool) – The position within the sheet.
machine_state (Knitting_Machine_State) – The state of the machine to get the needle from.
is_slider (bool,) – True if needle is a slider. Defaults to False.
- Returns:
The needle in the machine state at the given sheet position.
- Return type:
- __eq__(other)[source]
- Parameters:
other (Sheet_Identifier | int) – The other sheet identifier to compare to.
- Returns:
True if the two sheets are identical. False otherwise. If a Sheet Identifier is given, both the sheet and gauge must match. If an integer is given, only the sheet needs to match.
- Return type: