Skip to content

Commit 57e5fc8

Browse files
Update KCL docs (#560)
YOYO NEW KCL DOCS!! Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 11d4f2d commit 57e5fc8

File tree

7 files changed

+79
-257
lines changed

7 files changed

+79
-257
lines changed

content/pages/docs/kcl-std/getCommonEdge.md renamed to content/pages/docs/kcl-std/functions/std-sketch-getCommonEdge.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ layout: manual
88
Get the shared edge between two faces.
99

1010
```kcl
11-
getCommonEdge(faces: [TagIdentifier]): Uuid
11+
getCommonEdge(faces: [tag; 2]): Edge
1212
```
1313

1414

@@ -17,29 +17,28 @@ getCommonEdge(faces: [TagIdentifier]): Uuid
1717

1818
| Name | Type | Description | Required |
1919
|----------|------|-------------|----------|
20-
| `faces` | [`[TagIdentifier]`](/docs/kcl-lang/types#TagIdentifier) | The tags of the faces you want to find the common edge between | Yes |
20+
| `faces` | `[tag; 2]` | The tags of the faces you want to find the common edge between. | Yes |
2121

2222
### Returns
2323

24-
`Uuid`
24+
[`Edge`](/docs/kcl-std/types/std-types-Edge) - An edge of a solid.
2525

2626

2727
### Examples
2828

2929
```kcl
3030
// Get an edge shared between two faces, created after a chamfer.
3131
32-
3332
scale = 20
3433
part001 = startSketchOn(XY)
35-
|> startProfile(at = [0, 0])
36-
|> line(end = [0, scale])
37-
|> line(end = [scale, 0])
38-
|> line(end = [0, -scale])
39-
|> close(tag = $line0)
40-
|> extrude(length = 20, tagEnd = $end0)
41-
// We tag the chamfer to reference it later.
42-
|> chamfer(length = 10, tags = [getOppositeEdge(line0)], tag = $chamfer0)
34+
|> startProfile(at = [0, 0])
35+
|> line(end = [0, scale])
36+
|> line(end = [scale, 0])
37+
|> line(end = [0, -scale])
38+
|> close(tag = $line0)
39+
|> extrude(length = 20, tagEnd = $end0)
40+
// We tag the chamfer to reference it later.
41+
|> chamfer(length = 10, tags = [getOppositeEdge(line0)], tag = $chamfer0)
4342
4443
// Get the shared edge between the chamfer and the extrusion.
4544
commonEdge = getCommonEdge(faces = [chamfer0, end0])

content/pages/docs/kcl-std/getNextAdjacentEdge.md renamed to content/pages/docs/kcl-std/functions/std-sketch-getNextAdjacentEdge.md

Lines changed: 20 additions & 7 deletions
Large diffs are not rendered by default.

content/pages/docs/kcl-std/getOppositeEdge.md renamed to content/pages/docs/kcl-std/functions/std-sketch-getOppositeEdge.md

Lines changed: 20 additions & 7 deletions
Large diffs are not rendered by default.

content/pages/docs/kcl-std/getPreviousAdjacentEdge.md renamed to content/pages/docs/kcl-std/functions/std-sketch-getPreviousAdjacentEdge.md

Lines changed: 20 additions & 7 deletions
Large diffs are not rendered by default.

content/pages/docs/kcl-std/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ layout: manual
5656
* [`circleThreePoint`](/docs/kcl-std/circleThreePoint)
5757
* [`close`](/docs/kcl-std/close)
5858
* [`extrude`](/docs/kcl-std/extrude)
59-
* [`getCommonEdge`](/docs/kcl-std/getCommonEdge)
60-
* [`getNextAdjacentEdge`](/docs/kcl-std/getNextAdjacentEdge)
61-
* [`getOppositeEdge`](/docs/kcl-std/getOppositeEdge)
62-
* [`getPreviousAdjacentEdge`](/docs/kcl-std/getPreviousAdjacentEdge)
59+
* [`getCommonEdge`](/docs/kcl-std/functions/std-sketch-getCommonEdge)
60+
* [`getNextAdjacentEdge`](/docs/kcl-std/functions/std-sketch-getNextAdjacentEdge)
61+
* [`getOppositeEdge`](/docs/kcl-std/functions/std-sketch-getOppositeEdge)
62+
* [`getPreviousAdjacentEdge`](/docs/kcl-std/functions/std-sketch-getPreviousAdjacentEdge)
6363
* [`involuteCircular`](/docs/kcl-std/involuteCircular)
6464
* [`lastSegX`](/docs/kcl-std/lastSegX)
6565
* [`lastSegY`](/docs/kcl-std/lastSegY)

content/pages/docs/kcl-std/modules/std-sketch.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ This module contains functions for creating and manipulating sketches, and makin
2020
* [`circleThreePoint`](/docs/kcl-std/circleThreePoint)
2121
* [`close`](/docs/kcl-std/close)
2222
* [`extrude`](/docs/kcl-std/extrude)
23-
* [`getCommonEdge`](/docs/kcl-std/getCommonEdge)
24-
* [`getNextAdjacentEdge`](/docs/kcl-std/getNextAdjacentEdge)
25-
* [`getOppositeEdge`](/docs/kcl-std/getOppositeEdge)
26-
* [`getPreviousAdjacentEdge`](/docs/kcl-std/getPreviousAdjacentEdge)
23+
* [`getCommonEdge`](/docs/kcl-std/functions/std-sketch-getCommonEdge)
24+
* [`getNextAdjacentEdge`](/docs/kcl-std/functions/std-sketch-getNextAdjacentEdge)
25+
* [`getOppositeEdge`](/docs/kcl-std/functions/std-sketch-getOppositeEdge)
26+
* [`getPreviousAdjacentEdge`](/docs/kcl-std/functions/std-sketch-getPreviousAdjacentEdge)
2727
* [`involuteCircular`](/docs/kcl-std/involuteCircular)
2828
* [`lastSegX`](/docs/kcl-std/lastSegX)
2929
* [`lastSegY`](/docs/kcl-std/lastSegY)

content/pages/docs/kcl-std/std.json

Lines changed: 0 additions & 216 deletions
Original file line numberDiff line numberDiff line change
@@ -79822,222 +79822,6 @@
7982279822
]
7982379823
]
7982479824
},
79825-
{
79826-
"name": "getCommonEdge",
79827-
"summary": "Get the shared edge between two faces.",
79828-
"description": "",
79829-
"tags": [
79830-
"sketch"
79831-
],
79832-
"args": [
79833-
{
79834-
"name": "faces",
79835-
"type": "[TagIdentifier]",
79836-
"schema": {
79837-
"$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema",
79838-
"title": "Array_of_TagIdentifier",
79839-
"type": "array",
79840-
"items": {
79841-
"$ref": "#/components/schemas/TagIdentifier"
79842-
},
79843-
"definitions": {
79844-
"TagIdentifier": {
79845-
"type": "object",
79846-
"required": [
79847-
"value"
79848-
],
79849-
"properties": {
79850-
"value": {
79851-
"type": "string"
79852-
}
79853-
}
79854-
}
79855-
}
79856-
},
79857-
"required": true,
79858-
"includeInSnippet": true,
79859-
"description": "The tags of the faces you want to find the common edge between",
79860-
"labelRequired": true
79861-
}
79862-
],
79863-
"returnValue": {
79864-
"name": "",
79865-
"type": "Uuid",
79866-
"schema": {
79867-
"$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema",
79868-
"title": "Uuid",
79869-
"type": "string",
79870-
"format": "uuid"
79871-
},
79872-
"required": true,
79873-
"includeInSnippet": true,
79874-
"labelRequired": true
79875-
},
79876-
"unpublished": false,
79877-
"deprecated": false,
79878-
"examples": [
79879-
[
79880-
"// Get an edge shared between two faces, created after a chamfer.\n\n\nscale = 20\npart001 = startSketchOn(XY)\n |> startProfile(at = [0, 0])\n |> line(end = [0, scale])\n |> line(end = [scale, 0])\n |> line(end = [0, -scale])\n |> close(tag = $line0)\n |> extrude(length = 20, tagEnd = $end0)\n // We tag the chamfer to reference it later.\n |> chamfer(length = 10, tags = [getOppositeEdge(line0)], tag = $chamfer0)\n\n// Get the shared edge between the chamfer and the extrusion.\ncommonEdge = getCommonEdge(faces = [chamfer0, end0])\n\n// Chamfer the shared edge.\n// TODO: uncomment this when ssi for fillets lands\n// chamfer(part001, length = 5, tags = [commonEdge])",
79881-
false
79882-
]
79883-
]
79884-
},
79885-
{
79886-
"name": "getNextAdjacentEdge",
79887-
"summary": "Get the next adjacent edge to the edge given.",
79888-
"description": "",
79889-
"tags": [
79890-
"sketch"
79891-
],
79892-
"args": [
79893-
{
79894-
"name": "edge",
79895-
"type": "TagIdentifier",
79896-
"schema": {
79897-
"$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema",
79898-
"title": "TagIdentifier",
79899-
"type": "object",
79900-
"required": [
79901-
"value"
79902-
],
79903-
"properties": {
79904-
"value": {
79905-
"type": "string"
79906-
}
79907-
}
79908-
},
79909-
"required": true,
79910-
"includeInSnippet": true,
79911-
"description": "The tag of the edge you want to find the next adjacent edge of.",
79912-
"labelRequired": false
79913-
}
79914-
],
79915-
"returnValue": {
79916-
"name": "",
79917-
"type": "Uuid",
79918-
"schema": {
79919-
"$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema",
79920-
"title": "Uuid",
79921-
"type": "string",
79922-
"format": "uuid"
79923-
},
79924-
"required": true,
79925-
"includeInSnippet": true,
79926-
"labelRequired": true
79927-
},
79928-
"unpublished": false,
79929-
"deprecated": false,
79930-
"examples": [
79931-
[
79932-
"exampleSketch = startSketchOn(XZ)\n |> startProfile(at = [0, 0])\n |> line(end = [10, 0])\n |> angledLine(angle = 60, length = 10)\n |> angledLine(angle = 120, length = 10)\n |> line(end = [-10, 0])\n |> angledLine(angle = 240, length = 10, tag = $referenceEdge)\n |> close()\n\nexample = extrude(exampleSketch, length = 5)\n |> fillet(radius = 3, tags = [getNextAdjacentEdge(referenceEdge)])",
79933-
false
79934-
]
79935-
]
79936-
},
79937-
{
79938-
"name": "getOppositeEdge",
79939-
"summary": "Get the opposite edge to the edge given.",
79940-
"description": "",
79941-
"tags": [
79942-
"sketch"
79943-
],
79944-
"args": [
79945-
{
79946-
"name": "edge",
79947-
"type": "TagIdentifier",
79948-
"schema": {
79949-
"$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema",
79950-
"title": "TagIdentifier",
79951-
"type": "object",
79952-
"required": [
79953-
"value"
79954-
],
79955-
"properties": {
79956-
"value": {
79957-
"type": "string"
79958-
}
79959-
}
79960-
},
79961-
"required": true,
79962-
"includeInSnippet": true,
79963-
"description": "The tag of the edge you want to find the opposite edge of.",
79964-
"labelRequired": false
79965-
}
79966-
],
79967-
"returnValue": {
79968-
"name": "",
79969-
"type": "Uuid",
79970-
"schema": {
79971-
"$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema",
79972-
"title": "Uuid",
79973-
"type": "string",
79974-
"format": "uuid"
79975-
},
79976-
"required": true,
79977-
"includeInSnippet": true,
79978-
"labelRequired": true
79979-
},
79980-
"unpublished": false,
79981-
"deprecated": false,
79982-
"examples": [
79983-
[
79984-
"exampleSketch = startSketchOn(XZ)\n |> startProfile(at = [0, 0])\n |> line(end = [10, 0])\n |> angledLine(angle = 60, length = 10)\n |> angledLine(angle = 120, length = 10)\n |> line(end = [-10, 0])\n |> angledLine(angle = 240, length = 10, tag = $referenceEdge)\n |> close()\n\nexample = extrude(exampleSketch, length = 5)\n |> fillet(radius = 3, tags = [getOppositeEdge(referenceEdge)])",
79985-
false
79986-
]
79987-
]
79988-
},
79989-
{
79990-
"name": "getPreviousAdjacentEdge",
79991-
"summary": "Get the previous adjacent edge to the edge given.",
79992-
"description": "",
79993-
"tags": [
79994-
"sketch"
79995-
],
79996-
"args": [
79997-
{
79998-
"name": "edge",
79999-
"type": "TagIdentifier",
80000-
"schema": {
80001-
"$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema",
80002-
"title": "TagIdentifier",
80003-
"type": "object",
80004-
"required": [
80005-
"value"
80006-
],
80007-
"properties": {
80008-
"value": {
80009-
"type": "string"
80010-
}
80011-
}
80012-
},
80013-
"required": true,
80014-
"includeInSnippet": true,
80015-
"description": "The tag of the edge you want to find the previous adjacent edge of.",
80016-
"labelRequired": false
80017-
}
80018-
],
80019-
"returnValue": {
80020-
"name": "",
80021-
"type": "Uuid",
80022-
"schema": {
80023-
"$schema": "https://spec.openapis.org/oas/3.0/schema/2019-04-02#/definitions/Schema",
80024-
"title": "Uuid",
80025-
"type": "string",
80026-
"format": "uuid"
80027-
},
80028-
"required": true,
80029-
"includeInSnippet": true,
80030-
"labelRequired": true
80031-
},
80032-
"unpublished": false,
80033-
"deprecated": false,
80034-
"examples": [
80035-
[
80036-
"exampleSketch = startSketchOn(XZ)\n |> startProfile(at = [0, 0])\n |> line(end = [10, 0])\n |> angledLine(angle = 60, length = 10)\n |> angledLine(angle = 120, length = 10)\n |> line(end = [-10, 0])\n |> angledLine(angle = 240, length = 10, tag = $referenceEdge)\n |> close()\n\nexample = extrude(exampleSketch, length = 5)\n |> fillet(radius = 3, tags = [getPreviousAdjacentEdge(referenceEdge)])",
80037-
false
80038-
]
80039-
]
80040-
},
8004179825
{
8004279826
"name": "involuteCircular",
8004379827
"summary": "Extend the current sketch with a new involute circular curve.",

0 commit comments

Comments
 (0)