docs: Fix syntax error and deprecated string planes in types.md (#6332)

This commit is contained in:
Jonathan Tran
2025-04-15 13:42:24 -04:00
committed by GitHub
parent 599bd2d958
commit 941911ed30
4 changed files with 15 additions and 24 deletions

View File

@ -145,7 +145,7 @@ This helps keep your code neat and avoid unnecessary declarations.
Say you have a long pipeline of sketch functions, like this:
```norun
startSketchOn('XZ')
startSketchOn(XZ)
|> line(%, end = [3, 4])
|> line(%, end = [10, 10])
|> line(%, end = [-13, -14])
@ -160,7 +160,7 @@ means that `|> line(%, end = [3, 4])` and `|> line(end = [3, 4])` are equivalent
could be rewritten as
```norun
startSketchOn('XZ')
startSketchOn(XZ)
|> line(end = [3, 4])
|> line(end = [10, 10])
|> line(end = [-13, -14])
@ -182,7 +182,7 @@ The syntax for declaring a tag is `$myTag` you would use it in the following
way:
```norun
startSketchOn('XZ')
startSketchOn(XZ)
|> startProfileAt(origin, %)
|> angledLine(angle = 0, length = 191.26, tag = $rectangleSegmentA001)
|> angledLine(
@ -217,7 +217,7 @@ However if the code was written like this:
```norun
fn rect(origin) {
return startSketchOn('XZ')
return startSketchOn(XZ)
|> startProfileAt(origin, %)
|> angledLine(angle = 0, length = 191.26, tag = $rectangleSegmentA001)
|> angledLine(
@ -227,7 +227,7 @@ fn rect(origin) {
)
|> angledLine(
angle = segAng(rectangleSegmentA001),
length = -segLen(rectangleSegmentA001)
length = -segLen(rectangleSegmentA001),
tag = $rectangleSegmentC001,
)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
@ -247,7 +247,7 @@ For example the following code works.
```norun
fn rect(origin) {
return startSketchOn('XZ')
return startSketchOn(XZ)
|> startProfileAt(origin, %)
|> angledLine(angle = 0, length = 191.26, tag = $rectangleSegmentA001)
|> angledLine(
@ -257,7 +257,7 @@ fn rect(origin) {
)
|> angledLine(
angle = segAng(rectangleSegmentA001),
length = -segLen(rectangleSegmentA001)
length = -segLen(rectangleSegmentA001),
tag = $rectangleSegmentC001,
)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
@ -268,11 +268,8 @@ rect([0, 0])
myRect = rect([20, 0])
myRect
|> extrude(10, %)
|> fillet(
radius = 0.5,
tags = [myRect.tags.rectangleSegmentA001]
)
|> extrude(length = 10)
|> fillet(radius = 0.5, tags = [myRect.tags.rectangleSegmentA001])
```
See how we use the tag `rectangleSegmentA001` in the `fillet` function outside

View File

@ -94,11 +94,8 @@ rect([0, 0])
myRect = rect([20, 0])
myRect
|> extrude(10, %)
|> fillet(
radius = 0.5,
tags = [myRect.tags.rectangleSegmentA001]
)
|> extrude(length = 10)
|> fillet(radius = 0.5, tags = [myRect.tags.rectangleSegmentA001])
```
See how we use the tag `rectangleSegmentA001` in the `fillet` function outside

View File

@ -4498,7 +4498,7 @@ e
/// |> yLine(endAbsolute = 0)
/// |> close(%)
///
/// example = extrude(5, exampleSketch)
/// example = extrude(exampleSketch, length = 5)
/// ```
@(impl = std_rust)
export fn cos(num: number(rad)): number(_) {}"#;

View File

@ -122,11 +122,8 @@ export type string
/// myRect = rect([20, 0])
///
/// myRect
/// |> extrude(10, %)
/// |> fillet(
/// radius = 0.5,
/// tags = [myRect.tags.rectangleSegmentA001]
/// )
/// |> extrude(length = 10)
/// |> fillet(radius = 0.5, tags = [myRect.tags.rectangleSegmentA001])
/// ```
///
/// See how we use the tag `rectangleSegmentA001` in the `fillet` function outside