46 lines
86 KiB
Markdown
46 lines
86 KiB
Markdown
---
|
|
title: "angledLine"
|
|
excerpt: "Draw a line segment relative to the current origin using the polar"
|
|
layout: manual
|
|
---
|
|
|
|
Draw a line segment relative to the current origin using the polar
|
|
|
|
measure of some angle and distance.
|
|
|
|
```js
|
|
angledLine(data: AngledLineData, sketch: Sketch, tag?: TagDeclarator) -> Sketch
|
|
```
|
|
|
|
|
|
### Arguments
|
|
|
|
| Name | Type | Description | Required |
|
|
|----------|------|-------------|----------|
|
|
| `data` | [`AngledLineData`](/docs/kcl/types/AngledLineData) | Data to draw an angled line. | Yes |
|
|
| `sketch` | [`Sketch`](/docs/kcl/types/Sketch) | A sketch is a collection of paths. | Yes |
|
|
| `tag` | [`TagDeclarator`](/docs/kcl/types#tag-declaration) | | No |
|
|
|
|
### Returns
|
|
|
|
[`Sketch`](/docs/kcl/types/Sketch) - A sketch is a collection of paths.
|
|
|
|
|
|
### Examples
|
|
|
|
```js
|
|
exampleSketch = startSketchOn('XZ')
|
|
|> startProfileAt([0, 0], %)
|
|
|> yLineTo(15, %)
|
|
|> angledLine({ angle = 30, length = 15 }, %)
|
|
|> line(end = [8, -10])
|
|
|> yLineTo(0, %)
|
|
|> close()
|
|
|
|
example = extrude(exampleSketch, length = 10)
|
|
```
|
|
|
|

|
|
|
|
|