kcl

angledLine

Draw a line segment relative to the current origin using the polar measure of some angle and distance.

angledLine(
  sketch: Sketch,
  angle: number,
  length?: number,
  lengthX?: number,
  lengthY?: number,
  endAbsoluteX?: number,
  endAbsoluteY?: number,
  tag?: TagDeclarator,
): Sketch

Arguments

NameTypeDescriptionRequired
sketchSketchWhich sketch should this path be added to?Yes
anglenumberWhich angle should the line be drawn at?Yes
lengthnumberDraw the line this distance along the given angle. Only one of length, lengthX, lengthY, endAbsoluteX, endAbsoluteY can be given.No
lengthXnumberDraw the line this distance along the X axis. Only one of length, lengthX, lengthY, endAbsoluteX, endAbsoluteY can be given.No
lengthYnumberDraw the line this distance along the Y axis. Only one of length, lengthX, lengthY, endAbsoluteX, endAbsoluteY can be given.No
endAbsoluteXnumberDraw the line along the given angle until it reaches this point along the X axis. Only one of length, lengthX, lengthY, endAbsoluteX, endAbsoluteY can be given.No
endAbsoluteYnumberDraw the line along the given angle until it reaches this point along the Y axis. Only one of length, lengthX, lengthY, endAbsoluteX, endAbsoluteY can be given.No
tagTagDeclaratorCreate a new tag which refers to this lineNo

Returns

Sketch

Examples

exampleSketch = startSketchOn(XZ)
  |> startProfileAt([0, 0], %)
  |> yLine(endAbsolute = 15)
  |> angledLine(angle = 30, length = 15)
  |> line(end = [8, -10])
  |> yLine(endAbsolute = 0)
  |> close()

example = extrude(exampleSketch, length = 10)

Rendered example of angledLine 0