* Add degrees annotations to examples Signed-off-by: Nick Cameron <nrc@ncameron.org> * Fix a units bug with the modulo operation Signed-off-by: Nick Cameron <nrc@ncameron.org> --------- Signed-off-by: Nick Cameron <nrc@ncameron.org>
41 lines
51 KiB
Markdown
41 lines
51 KiB
Markdown
---
|
|
title: "profileStartX"
|
|
subtitle: "Function in std::sketch"
|
|
excerpt: "Extract the provided 2-dimensional sketch's profile's origin's 'x' value."
|
|
layout: manual
|
|
---
|
|
|
|
Extract the provided 2-dimensional sketch's profile's origin's 'x' value.
|
|
|
|
```kcl
|
|
profileStartX(@profile: Sketch): number(Length)
|
|
```
|
|
|
|
|
|
|
|
### Arguments
|
|
|
|
| Name | Type | Description | Required |
|
|
|----------|------|-------------|----------|
|
|
| `profile` | [`Sketch`](/docs/kcl-std/types/std-types-Sketch) | Profile whose start is being used. | Yes |
|
|
|
|
### Returns
|
|
|
|
[`number(Length)`](/docs/kcl-std/types/std-types-number) - A number.
|
|
|
|
|
|
### Examples
|
|
|
|
```kcl
|
|
sketch001 = startSketchOn(XY)
|
|
|> startProfile(at = [5, 2])
|
|
|> angledLine(angle = -26.6, length = 50)
|
|
|> angledLine(angle = 90deg, length = 50)
|
|
|> angledLine(angle = 30deg, endAbsoluteX = profileStartX(%))
|
|
|
|
```
|
|
|
|

|
|
|
|
|