kcl

segAng

Compute the angle (in degrees) of the provided line segment.

segAng(tag: TagIdentifier) -> number

Arguments

NameTypeDescriptionRequired
tagTagIdentifierYes

Returns

number

Examples

exampleSketch = startSketchOn('XZ')
  |> startProfileAt([0, 0], %)
  |> line([10, 0], %)
  |> line([5, 10], %, $seg01)
  |> line([-10, 0], %)
  |> angledLine([segAng(seg01), 10], %)
  |> line([-10, 0], %)
  |> angledLine([segAng(seg01), -15], %)
  |> close(%)

example = extrude(4, exampleSketch)

Rendered example of segAng 0