Skip to content

Shaft line

ShaftLine

ShaftLine(path, width, mode=Mode.ADD)

Bases: BaseSketchObject

Creates a shaft line to use in dimensions annotation

Parameters:

Name Type Description Default
path Wire | Edge

Shaft path

required
width float

Shaft width

required
mode Mode

combination mode. Defaults to Mode.ADD

ADD
Source code in src/bd_beams_and_bars/helpers/shaft_line.py
def __init__(
    self,
    path: Wire | Edge,
    width: float,
    mode: Mode = Mode.ADD,
):
    # Create a perpendicular line to sweep the tail path
    shaft_pen = path.perpendicular_line(width, 0)
    shaft = sweep(shaft_pen, path, mode=Mode.PRIVATE)

    super().__init__(shaft, rotation=0, align=None, mode=mode)