MechanismLigament2d¶
- class wpilib.MechanismLigament2d¶
Bases:
MechanismObject2d
Ligament node on a Mechanism2d.
A ligament can have its length changed (like an elevator) or angle changed, like an arm.
@see Mechanism2d
- getAngle() float ¶
Get the ligament’s angle relative to its parent.
- Returns:
the angle
- getColor() wpilib._wpilib.Color8Bit ¶
Get the ligament color.
- Returns:
the color of the line
- getLength() float ¶
Get the ligament length.
- Returns:
the line length
- getLineWeight() float ¶
Get the line thickness.
- Returns:
the line thickness
- setAngle(angle: degrees) None ¶
Set the ligament’s angle relative to its parent.
- Parameters:
angle – the angle
- setColor(color: wpilib._wpilib.Color8Bit) None ¶
Set the ligament color.
- Parameters:
color – the color of the line
- setLength(length: float) None ¶
Set the ligament’s length.
- Parameters:
length – the line length
- setLineWeight(lineWidth: float) None ¶
Set the line thickness.
- Parameters:
lineWidth – the line thickness