* 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>
47 lines
97 KiB
Markdown
47 lines
97 KiB
Markdown
---
|
|
title: "getOppositeEdge"
|
|
subtitle: "Function in std::sketch"
|
|
excerpt: "Get the opposite edge to the edge given."
|
|
layout: manual
|
|
---
|
|
|
|
Get the opposite edge to the edge given.
|
|
|
|
```kcl
|
|
getOppositeEdge(@edge: tag): Edge
|
|
```
|
|
|
|
|
|
|
|
### Arguments
|
|
|
|
| Name | Type | Description | Required |
|
|
|----------|------|-------------|----------|
|
|
| `edge` | [`tag`](/docs/kcl-std/types/std-types-tag) | The tag of the edge you want to find the opposite edge of. | Yes |
|
|
|
|
### Returns
|
|
|
|
[`Edge`](/docs/kcl-std/types/std-types-Edge) - An edge of a solid.
|
|
|
|
|
|
### Examples
|
|
|
|
```kcl
|
|
exampleSketch = startSketchOn(XZ)
|
|
|> startProfile(at = [0, 0])
|
|
|> line(end = [10, 0])
|
|
|> angledLine(angle = 60deg, length = 10)
|
|
|> angledLine(angle = 120deg, length = 10)
|
|
|> line(end = [-10, 0])
|
|
|> angledLine(angle = 240deg, length = 10, tag = $referenceEdge)
|
|
|> close()
|
|
|
|
example = extrude(exampleSketch, length = 5)
|
|
|> fillet(radius = 3, tags = [getOppositeEdge(referenceEdge)])
|
|
|
|
```
|
|
|
|

|
|
|
|
|