virtual_knitting_machine.machine_components.carriage_system.Carriage_Side module
Module containing the Carriage_Side enumeration for knitting machine carriage positioning.
This module defines the two sides of a knitting machine that the carriage can be positioned on and provides utility methods for determining appropriate movement directions from each side.
- class Carriage_Side(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
Enum
Enumeration containing the two sides the machine carriage can be positioned on.
This enum provides methods for determining opposite sides and appropriate movement directions for continuing or reversing carriage movement from each side position.
- Left_Side = 'Left_Side'
- Right_Side = 'Right_Side'
- __str__()[source]
Return string representation of the carriage side.
- Returns:
String representation of the side value.
- Return type:
- __repr__()[source]
Return string representation of the carriage side.
- Returns:
String representation of the side value.
- Return type:
- opposite()[source]
Get the opposite side of the machine from this side.
- Returns:
The opposite side of this carriage side.
- Return type:
- reverse_direction()[source]
Get the direction that will reverse the carriage away from this side position.
- Returns:
Direction that will reverse the carriage from this side position.
- Return type:
- current_direction()[source]
Get the direction that will continue the carriage pass moving toward this side.
- Returns:
Direction that will continue the carriage pass moving in the current direction toward this side.
- Return type:
- __neg__()[source]
Get the opposite side using unary minus operator.
- Returns:
The opposite carriage side.
- Return type:
- __invert__()[source]
Get the opposite side using bitwise invert operator.
- Returns:
The opposite carriage side.
- Return type:
- classmethod __contains__(member)
Return True if member is a member of this enum raises TypeError if member is not an enum member
note: in 3.12 TypeError will no longer be raised, and True will also be returned if member is the value of a member in this enum
- classmethod __getitem__(name)
Return the member matching name.
- classmethod __iter__()
Return members in definition order.
- classmethod __len__()
Return the number of members (no aliases)