Function inner_angled_line_that_intersects

Source
pub async fn inner_angled_line_that_intersects(
    sketch: Sketch,
    angle: TyF64,
    intersect_tag: TagIdentifier,
    offset: Option<TyF64>,
    tag: Option<Node<TagDeclarator>>,
    exec_state: &mut ExecState,
    args: Args,
) -> Result<Sketch, KclError>
Expand description

Draw an angled line from the current origin, constructing a line segment such that the newly created line intersects the desired target line segment.

exampleSketch = startSketchOn(XZ)
  |> startProfile(at = [0, 0])
  |> line(endAbsolute = [5, 10])
  |> line(endAbsolute = [-10, 10], tag = $lineToIntersect)
  |> line(endAbsolute = [0, 20])
  |> angledLineThatIntersects(
       angle = 80,
       intersectTag = lineToIntersect,
       offset = 10,
     )
  |> close()

example = extrude(exampleSketch, length = 10)