* Deprecate startSketchAt() stdlib function * Remove uses of startSketchAt() from the doc tests * Update docs
68 lines
331 KiB
Markdown
68 lines
331 KiB
Markdown
---
|
|
title: "startSketchAt"
|
|
excerpt: "Start a new 2-dimensional sketch at a given point on the 'XY' plane."
|
|
layout: manual
|
|
---
|
|
|
|
**WARNING:** This function is deprecated.
|
|
|
|
Start a new 2-dimensional sketch at a given point on the 'XY' plane.
|
|
|
|
|
|
|
|
```js
|
|
startSketchAt(data: [number]) -> Sketch
|
|
```
|
|
|
|
|
|
### Arguments
|
|
|
|
| Name | Type | Description | Required |
|
|
|----------|------|-------------|----------|
|
|
| `data` | `[number]` | | Yes |
|
|
|
|
### Returns
|
|
|
|
[`Sketch`](/docs/kcl/types/Sketch) - A sketch is a collection of paths.
|
|
|
|
|
|
### Examples
|
|
|
|
```js
|
|
exampleSketch = startSketchAt([0, 0])
|
|
|> line([10, 0], %)
|
|
|> line([0, 10], %)
|
|
|> line([-10, 0], %)
|
|
|> close(%)
|
|
|
|
example = extrude(5, exampleSketch)
|
|
```
|
|
|
|

|
|
|
|
```js
|
|
exampleSketch = startSketchAt([10, 10])
|
|
|> line([10, 0], %)
|
|
|> line([0, 10], %)
|
|
|> line([-10, 0], %)
|
|
|> close(%)
|
|
|
|
example = extrude(5, exampleSketch)
|
|
```
|
|
|
|

|
|
|
|
```js
|
|
exampleSketch = startSketchAt([-10, 23])
|
|
|> line([10, 0], %)
|
|
|> line([0, 10], %)
|
|
|> line([-10, 0], %)
|
|
|> close(%)
|
|
|
|
example = extrude(5, exampleSketch)
|
|
```
|
|
|
|

|
|
|
|
|