Previous: ``` startProfileAt([x, y], %) startProfileAt([x, y], sketch001) ``` New: ``` startProfile(%, at = [x, y]) startProfile(sketch001, at = [x, y]) ```
48 lines
79 KiB
Markdown
48 lines
79 KiB
Markdown
---
|
|
title: "angleToMatchLengthX"
|
|
excerpt: "Returns the angle to match the given length for x."
|
|
layout: manual
|
|
---
|
|
|
|
Returns the angle to match the given length for x.
|
|
|
|
|
|
|
|
```js
|
|
angleToMatchLengthX(
|
|
tag: TagIdentifier,
|
|
to: number,
|
|
sketch: Sketch,
|
|
): number
|
|
```
|
|
|
|
|
|
### Arguments
|
|
|
|
| Name | Type | Description | Required |
|
|
|----------|------|-------------|----------|
|
|
| [`tag`](/docs/kcl/types/tag) | [`TagIdentifier`](/docs/kcl/types#tag-identifier) | | Yes |
|
|
| `to` | [`number`](/docs/kcl/types/number) | | Yes |
|
|
| `sketch` | [`Sketch`](/docs/kcl/types/Sketch) | | Yes |
|
|
|
|
### Returns
|
|
|
|
[`number`](/docs/kcl/types/number)
|
|
|
|
|
|
### Examples
|
|
|
|
```js
|
|
sketch001 = startSketchOn(XZ)
|
|
|> startProfile(at = [0, 0])
|
|
|> line(end = [2, 5], tag = $seg01)
|
|
|> angledLine(angle = -angleToMatchLengthX(seg01, 7, %), endAbsoluteX = 10)
|
|
|> close()
|
|
|
|
extrusion = extrude(sketch001, length = 5)
|
|
```
|
|
|
|

|
|
|
|
|