* Replace tag type with tagIdent and tagDecl Signed-off-by: Nick Cameron <nrc@ncameron.org> * Replace tagIdent with TaggedEdge and TaggedFace Signed-off-by: Nick Cameron <nrc@ncameron.org> --------- Signed-off-by: Nick Cameron <nrc@ncameron.org>
45 lines
69 KiB
Markdown
45 lines
69 KiB
Markdown
---
|
|
title: "segStartX"
|
|
subtitle: "Function in std::sketch"
|
|
excerpt: "Compute the starting point of the provided line segment along the 'x' axis."
|
|
layout: manual
|
|
---
|
|
|
|
Compute the starting point of the provided line segment along the 'x' axis.
|
|
|
|
```kcl
|
|
segStartX(@tag: TaggedEdge): number(Length)
|
|
```
|
|
|
|
|
|
|
|
### Arguments
|
|
|
|
| Name | Type | Description | Required |
|
|
|----------|------|-------------|----------|
|
|
| `tag` | [`TaggedEdge`](/docs/kcl-std/types/std-types-TaggedEdge) | The line segment being queried by its tag. | Yes |
|
|
|
|
### Returns
|
|
|
|
[`number(Length)`](/docs/kcl-std/types/std-types-number) - A number.
|
|
|
|
|
|
### Examples
|
|
|
|
```kcl
|
|
exampleSketch = startSketchOn(XZ)
|
|
|> startProfile(at = [0, 0])
|
|
|> line(end = [20, 0], tag = $thing)
|
|
|> line(end = [0, 5])
|
|
|> line(end = [20 - segStartX(thing), 0])
|
|
|> line(end = [-20, 10])
|
|
|> close()
|
|
|
|
example = extrude(exampleSketch, length = 5)
|
|
|
|
```
|
|
|
|

|
|
|
|
|