46 lines
80 KiB
Markdown
46 lines
80 KiB
Markdown
---
|
|
title: "planes::xAxis"
|
|
subtitle: "Function in std::planes"
|
|
excerpt: "Find X axis of a plane."
|
|
layout: manual
|
|
---
|
|
|
|
Find X axis of a plane.
|
|
|
|
```kcl
|
|
planes::xAxis(@plane: Plane): Point3d
|
|
```
|
|
|
|
|
|
|
|
### Arguments
|
|
|
|
| Name | Type | Description | Required |
|
|
|----------|------|-------------|----------|
|
|
| `plane` | [`Plane`](/docs/kcl-std/types/std-types-Plane) | The solid whose face is being queried. | Yes |
|
|
|
|
### Returns
|
|
|
|
[`Point3d`](/docs/kcl-std/types/std-types-Point3d) - A point in three dimensional space.
|
|
|
|
|
|
### Examples
|
|
|
|
```kcl
|
|
mySolid = startSketchOn(XZ)
|
|
|> polygon(numSides = 3, radius = 1, center = [3, 2])
|
|
|> extrude(length = 5)
|
|
|
|
target = planeOf(mySolid, face = END)
|
|
|
|
xTarget = planes::xAxis(target)
|
|
assert(xTarget[0], isEqualTo = 1)
|
|
assert(xTarget[1], isEqualTo = 0)
|
|
assert(xTarget[2], isEqualTo = 0)
|
|
|
|
```
|
|
|
|

|
|
|
|
|