43 KiB
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)