Files
modeling-app/docs/kcl/lastSegX.md
Jess Frazelle 0d48dff151 dont escape the markdown shit (#4049)
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2024-09-30 12:39:24 -07:00

43 KiB

title, excerpt, layout
title excerpt layout
lastSegX Extract the 'x' axis value of the last line segment in the provided 2-d manual

Extract the 'x' axis value of the last line segment in the provided 2-d

sketch.

lastSegX(sketch: Sketch) -> number

Arguments

Name Type Description Required
sketch Sketch A sketch is a collection of paths. Yes

Returns

number

Examples

const exampleSketch = startSketchOn("XZ")
  |> startProfileAt([0, 0], %)
  |> line([5, 0], %)
  |> line([20, 5], %)
  |> line([lastSegX(%), 0], %)
  |> line([-15, 0], %)
  |> close(%)

const example = extrude(5, exampleSketch)

Rendered example of lastSegX 0