kcl →
lastSegX
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
exampleSketch = startSketchOn("XZ")
|> startProfileAt([0, 0], %)
|> line([5, 0], %)
|> line([20, 5], %)
|> line([lastSegX(%), 0], %)
|> line([-15, 0], %)
|> close(%)
example = extrude(5, exampleSketch)