Compare commits

...

12 Commits

Author SHA1 Message Date
e63bf5db11 Bump google-github-actions/auth from 2.1.2 to 2.1.3 (#2356)
* Bump google-github-actions/auth from 2.1.2 to 2.1.3

Bumps [google-github-actions/auth](https://github.com/google-github-actions/auth) from 2.1.2 to 2.1.3.
- [Release notes](https://github.com/google-github-actions/auth/releases)
- [Changelog](https://github.com/google-github-actions/auth/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google-github-actions/auth/compare/v2.1.2...v2.1.3)

---
updated-dependencies:
- dependency-name: google-github-actions/auth
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)

* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
2024-05-15 17:11:26 -07:00
863e4e206f Cut release v0.21.3 (#2360) 2024-05-15 16:46:56 -04:00
f1cd2355c6 remove math special no image (#2361) 2024-05-15 13:09:38 -07:00
164b675a86 Mock mode tests, ensure mock mode always works for std fns (#2359)
* add generated tests

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* fix patterns

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* fix import

Signed-off-by: Jess Frazelle <github@jessfraz.com>

---------

Signed-off-by: Jess Frazelle <github@jessfraz.com>
2024-05-15 17:17:29 +00:00
b1afe1c541 Filter hidden directories from list_projects function return (#2349) 2024-05-15 09:31:57 -07:00
26ef7218b2 Cut release v0.21.2 (#2358) 2024-05-15 09:21:52 -04:00
e5a4fb439c make edge helpers + more mock safe (#2357)
* make getPreviousAdjacentEdge mock safe

* make more functions mock safe
2024-05-15 18:38:30 +10:00
97ad66a358 Updating KCL examples on docs (#2355)
* updating KCL examples on docs

* update images and docs

Signed-off-by: Jess Frazelle <github@jessfraz.com>

---------

Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: Jess Frazelle <github@jessfraz.com>
2024-05-14 17:10:47 -07:00
26438270ff Bump gltf-json from 1.4.0 to 1.4.1 in /src/wasm-lib (#2343)
Bumps [gltf-json](https://github.com/gltf-rs/gltf) from 1.4.0 to 1.4.1.
- [Release notes](https://github.com/gltf-rs/gltf/releases)
- [Changelog](https://github.com/gltf-rs/gltf/blob/main/CHANGELOG.md)
- [Commits](https://github.com/gltf-rs/gltf/commits)

---
updated-dependencies:
- dependency-name: gltf-json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-13 16:26:42 -07:00
a0cfda6d7a Fix settings overflow by setting grid-template-rows (#2348) 2024-05-13 12:43:00 -04:00
58a62b8097 Ensure that onboarding buttons are visible, even on short viewports (#2324)
* Ensure onboarding buttons are visible on shorter screens

* Fix dismiss button hover styling

* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)

* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)

* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-13 11:50:33 -04:00
e2909c509f Bump syn from 2.0.61 to 2.0.63 in /src/wasm-lib (#2344)
Bumps [syn](https://github.com/dtolnay/syn) from 2.0.61 to 2.0.63.
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](https://github.com/dtolnay/syn/compare/2.0.61...2.0.63)

---
updated-dependencies:
- dependency-name: syn
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-13 10:45:44 -05:00
153 changed files with 1761 additions and 796 deletions

View File

@ -440,7 +440,7 @@ jobs:
cat last_download.json
- name: Authenticate to Google Cloud
uses: 'google-github-actions/auth@v2.1.2'
uses: 'google-github-actions/auth@v2.1.3'
with:
credentials_json: '${{ secrets.GOOGLE_CLOUD_DL_SA }}'

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -29,7 +29,7 @@
"unpublished": false,
"deprecated": false,
"examples": [
"const myVar = abs(-4)"
"const myAngle = -120\n\nconst sketch001 = startSketchOn('-XZ')\n |> startProfileAt([0, 0], %)\n |> line([8, 0], %)\n |> angledLine({ angle: abs(myAngle), length: 5 }, %)\n |> line([-5, 0], %)\n |> angledLine({ angle: myAngle, length: 5 }, %)\n |> close(%)\n\nconst baseExtrusion = extrude(5, sketch001)"
]
},
{
@ -1068,7 +1068,7 @@
"unpublished": false,
"deprecated": false,
"examples": [
"const part001 = startSketchOn('XY')\n |> startProfileAt([0, 0], %)\n |> line([1, 3.82], %, 'seg01')\n |> angledLineToX([\n -angleToMatchLengthX('seg01', 10, %),\n 5\n ], %)\n |> close(%)\n |> extrude(5, %)"
"const sketch001 = startSketchOn('-XZ')\n |> startProfileAt([0, 0], %)\n |> line([2, 5], %, 'seg01')\n |> angledLineToX([\n -angleToMatchLengthX('seg01', 7, %),\n 10\n ], %)\n |> close(%)\n\nconst extrusion = extrude(5, sketch001)"
]
},
{
@ -2074,7 +2074,7 @@
"unpublished": false,
"deprecated": false,
"examples": [
"const part001 = startSketchOn('XY')\n |> startProfileAt([0, 0], %)\n |> line([1, 3.82], %, 'seg01')\n |> angledLineToX([\n -angleToMatchLengthY('seg01', 10, %),\n 5\n ], %)\n |> close(%)\n |> extrude(5, %)"
"const sketch001 = startSketchOn('-XZ')\n |> startProfileAt([0, 0], %)\n |> line([1, 2], %, 'seg01')\n |> angledLine({\n angle: angleToMatchLengthY('seg01', 15, %),\n length: 5\n }, %)\n |> yLineTo(0, %)\n |> close(%)\n\nconst extrusion = extrude(5, sketch001)"
]
},
{
@ -4070,7 +4070,7 @@
"unpublished": false,
"deprecated": false,
"examples": [
"startSketchOn('XY')\n |> startProfileAt([0, 0], %)\n |> angledLine({ angle: 45, length: 10 }, %, \"edge1\")\n |> line([10, 10], %)\n |> line([0, 10], %)\n |> close(%, \"edge2\")\n |> extrude(10, %)"
"const exampleSketch = startSketchOn('-XZ')\n |> startProfileAt([0, 0], %)\n |> yLineTo(15, %)\n |> angledLine({ angle: 30, length: 15 }, %)\n |> line([8, -10], %)\n |> yLineTo(0, %)\n |> close(%)\n\nconst example = extrude(10, exampleSketch)"
]
},
{
@ -6066,7 +6066,7 @@
"unpublished": false,
"deprecated": false,
"examples": [
"startSketchOn('XZ')\n |> startProfileAt([0, 0], %)\n |> angledLineOfXLength({ angle: 45, length: 10 }, %, \"edge1\")\n |> line([10, 10], %)\n |> line([0, 10], %)\n |> close(%, \"edge2\")\n |> extrude(10, %)"
"const sketch001 = startSketchOn('XZ')\n |> startProfileAt([0, 0], %)\n |> angledLineOfXLength({ angle: 45, length: 10 }, %, \"edge1\")\n |> angledLineOfXLength({ angle: -15, length: 20 }, %, \"edge2\")\n |> line([0, -5], %)\n |> close(%, \"edge3\")\n\nconst extrusion = extrude(10, sketch001)"
]
},
{
@ -8062,7 +8062,7 @@
"unpublished": false,
"deprecated": false,
"examples": [
"startSketchOn('YZ')\n |> startProfileAt([0, 0], %)\n |> angledLineOfYLength({ angle: 45, length: 10 }, %, \"edge1\")\n |> line([10, 10], %)\n |> line([0, 10], %)\n |> close(%, \"edge2\")\n |> extrude(10, %)\n |> fillet({ radius: 2, tags: [\"edge1\"] }, %)"
"const exampleSketch = startSketchOn('XZ')\n |> startProfileAt([0, 0], %)\n |> line([10, 0], %)\n |> angledLineOfYLength({ angle: 45, length: 10 }, %)\n |> line([0, 10], %)\n |> angledLineOfYLength({ angle: 135, length: 10 }, %)\n |> line([-10, 0], %)\n |> line([0, -30], %)\n\nconst example = extrude(10, exampleSketch)"
]
},
{
@ -10048,7 +10048,7 @@
"unpublished": false,
"deprecated": false,
"examples": [
"const part001 = startSketchOn('XY')\n |> startProfileAt([0, 0], %)\n |> lineTo([2, 2], %, \"yo\")\n |> lineTo([3, 1], %)\n |> angledLineThatIntersects({\n angle: 180,\n intersectTag: 'yo',\n offset: 12\n }, %, \"yo2\")\n |> line([4, 0], %)\n |> close(%, \"yo3\")\n |> extrude(10, %)"
"const exampleSketch = startSketchOn('-XZ')\n |> startProfileAt([0, 0], %)\n |> lineTo([5, 10], %)\n |> lineTo([-10, 10], %, \"lineToIntersect\")\n |> lineTo([0, 20], %)\n |> angledLineThatIntersects({\n angle: 80,\n intersectTag: 'lineToIntersect',\n offset: 10\n }, %)\n |> close(%)\n\nconst example = extrude(10, exampleSketch)"
]
},
{
@ -12029,7 +12029,7 @@
"unpublished": false,
"deprecated": false,
"examples": [
"startSketchOn('XY')\n |> startProfileAt([0, 0], %)\n |> angledLineToX({ angle: 45, to: 10 }, %, \"edge1\")\n |> line([10, 10], %)\n |> line([0, 10], %)\n |> close(%, \"edge2\")\n |> extrude(10, %)\n |> fillet({ radius: 2, tags: [\"edge1\"] }, %)"
"const exampleSketch = startSketchOn('-XZ')\n |> startProfileAt([0, 0], %)\n |> angledLineToX({ angle: 30, to: 10 }, %)\n |> line([0, 10], %)\n |> line([-10, 0], %)\n |> close(%)\n\nconst example = extrude(10, exampleSketch)"
]
},
{
@ -14010,7 +14010,7 @@
"unpublished": false,
"deprecated": false,
"examples": [
"startSketchOn('XY')\n |> startProfileAt([0, 0], %)\n |> angledLineToY({ angle: 45, to: 10 }, %, \"edge1\")\n |> line([10, 10], %)\n |> line([0, 10], %)\n |> close(%, \"edge2\")\n |> extrude(10, %)"
"const exampleSketch = startSketchOn('-XZ')\n |> startProfileAt([0, 0], %)\n |> angledLineToY({ angle: 60, to: 20 }, %)\n |> line([-20, 0], %)\n |> angledLineToY({ angle: 70, to: 10 }, %)\n |> close(%)\n\nconst example = extrude(10, exampleSketch)"
]
},
{
@ -16038,7 +16038,7 @@
"unpublished": false,
"deprecated": false,
"examples": [
"startSketchOn('-YZ')\n |> startProfileAt([0, 0], %)\n |> arc({\n angle_start: 0,\n angle_end: 360,\n radius: 10\n }, %, \"edge1\")\n |> extrude(10, %)"
"const exampleSketch = startSketchOn('-XZ')\n |> startProfileAt([0, 0], %)\n |> line([10, 0], %)\n |> arc({\n angle_start: 0,\n angle_end: 280,\n radius: 16\n }, %)\n |> close(%)"
]
},
{
@ -18106,7 +18106,7 @@
"unpublished": false,
"deprecated": false,
"examples": [
"startSketchOn('XY')\n |> startProfileAt([0, 0], %)\n |> bezierCurve({\n to: [10, 10],\n control1: [5, 0],\n control2: [5, 10]\n }, %, \"edge1\")\n |> close(%)\n |> extrude(10, %)"
"const exampleSketch = startSketchOn('-XZ')\n |> startProfileAt([0, 0], %)\n |> line([0, 10], %)\n |> bezierCurve({\n to: [10, 10],\n control1: [5, 0],\n control2: [5, 10]\n }, %)\n |> lineTo([10, 0], %)\n |> close(%)\n\nconst example = extrude(10, exampleSketch)"
]
},
{
@ -20424,7 +20424,7 @@
"unpublished": false,
"deprecated": false,
"examples": [
"const circles = startSketchOn('XY')\n |> circle([5, 5], 1, %)\n |> patternLinear2d({\n axis: [1, 1],\n repetitions: 12,\n distance: 3\n }, %)\n\nconst rectangle = startSketchOn('XY')\n |> startProfileAt([0, 0], %)\n |> line([0, 50], %)\n |> line([50, 0], %)\n |> line([0, -50], %)\n |> close(%)\n |> hole(circles, %)"
"const exampleSketch = startSketchOn(\"-XZ\")\n |> circle([0, 0], 10, %)\n\nconst example = extrude(5, exampleSketch)"
]
},
{
@ -22381,7 +22381,7 @@
"deprecated": false,
"examples": [
"startSketchOn('XZ')\n |> startProfileAt([0, 0], %)\n |> line([10, 10], %)\n |> line([10, 0], %)\n |> close(%)\n |> extrude(10, %)",
"startSketchOn('YZ')\n |> startProfileAt([0, 0], %)\n |> line([10, 10], %)\n |> line([10, 0], %)\n |> close(%, \"edge1\")\n |> extrude(10, %)"
"const exampleSketch = startSketchOn('-XZ')\n |> startProfileAt([0, 0], %)\n |> line([10, 0], %)\n |> line([0, 10], %)\n |> close(%)\n\nconst example = extrude(10, exampleSketch)"
]
},
{
@ -25953,7 +25953,8 @@
"unpublished": false,
"deprecated": false,
"examples": [
"startSketchOn('XY')\n |> startProfileAt([0, 0], %)\n |> line([0, 10], %)\n |> line([10, 0], %)\n |> line([0, -10], %)\n |> close(%)\n |> extrude(5, %)"
"const example = startSketchOn('-XZ')\n |> startProfileAt([0, 0], %)\n |> line([10, 0], %)\n |> arc({\n angle_end: 0,\n angle_start: 120,\n radius: 5\n }, %)\n |> line([5, 0], %)\n |> line([0, 10], %)\n |> bezierCurve({\n control1: [-10, 0],\n control2: [2, 10],\n to: [-5, 10]\n }, %)\n |> line([-5, -2], %)\n |> close(%)\n |> extrude(10, %)",
"const exampleSketch = startSketchOn('-XZ')\n |> startProfileAt([-10, 0], %)\n |> arc({\n angle_end: -60,\n angle_start: 120,\n radius: 5\n }, %)\n |> line([10, 0], %)\n |> line([5, 0], %)\n |> bezierCurve({\n control1: [-3, 0],\n control2: [2, 10],\n to: [-5, 10]\n }, %)\n |> line([-4, 10], %)\n |> line([-5, -2], %)\n |> close(%)\n\nconst example = extrude(10, exampleSketch)"
]
},
{
@ -27516,7 +27517,7 @@
"unpublished": false,
"deprecated": false,
"examples": [
"const part001 = startSketchOn('XY')\n |> startProfileAt([0, 0], %)\n |> line([0, 10], %, \"thing\")\n |> line([10, 0], %)\n |> line([0, -10], %, \"thing2\")\n |> close(%)\n |> extrude(10, %)\n |> fillet({ radius: 2, tags: [\"thing\", \"thing2\"] }, %)"
"const width = 20\nconst length = 10\nconst thickness = 1\nconst filletRadius = 2\n\nconst mountingPlateSketch = startSketchOn(\"XY\")\n |> startProfileAt([-width / 2, -length / 2], %)\n |> lineTo([width / 2, -length / 2], %, 'edge1')\n |> lineTo([width / 2, length / 2], %, 'edge2')\n |> lineTo([-width / 2, length / 2], %, 'edge3')\n |> close(%, 'edge4')\n\nconst mountingPlate = extrude(thickness, mountingPlateSketch)\n |> fillet({\n radius: filletRadius,\n tags: [\n getNextAdjacentEdge('edge1', %),\n getNextAdjacentEdge('edge2', %),\n getNextAdjacentEdge('edge3', %),\n getNextAdjacentEdge('edge4', %)\n ]\n }, %)"
]
},
{
@ -28335,7 +28336,7 @@
"unpublished": false,
"deprecated": false,
"examples": [
"const box = startSketchOn('XY')\n |> startProfileAt([0, 0], %)\n |> line([0, 10], %)\n |> line([10, 0], %)\n |> line([0, -10], %, 'revolveAxis')\n |> close(%)\n |> extrude(10, %)\n\nconst sketch001 = startSketchOn('XY')\n |> startProfileAt([0, -10], %)\n |> line([0, -10], %)\n |> line([2, 0], %)\n |> line([0, 10], %)\n |> close(%)\n |> revolve({\n axis: getEdge('revolveAxis', box),\n angle: 90\n }, %)"
"const box = startSketchOn('XZ')\n |> startProfileAt([0, 0], %)\n |> line([0, 10], %, 'revolveAxis')\n |> line([10, 0], %)\n |> line([0, -10], %)\n |> close(%)\n |> extrude(10, %)\n\nconst revolution = startSketchOn('XZ')\n |> startProfileAt([-10, 0], %)\n |> line([0, 10], %)\n |> line([2, 0], %)\n |> line([0, -10], %)\n |> close(%)\n |> revolve({\n axis: getEdge('revolveAxis', box),\n angle: 90\n }, %)"
]
},
{
@ -29121,7 +29122,7 @@
"unpublished": false,
"deprecated": false,
"examples": [
"const part001 = startSketchOn('XY')\n |> startProfileAt([0, 0], %)\n |> line([0, 10], %, \"thing\")\n |> line([10, 0], %, \"thing1\")\n |> line([0, -10], %, \"thing2\")\n |> close(%, \"thing3\")\n |> extrude(10, %)\n |> fillet({\n radius: 2,\n tags: [getNextAdjacentEdge(\"thing3\", %)]\n }, %)"
"const exampleSketch = startSketchOn('XZ')\n |> startProfileAt([0, 0], %)\n |> line([10, 0], %)\n |> angledLine({ angle: 60, length: 10 }, %)\n |> angledLine({ angle: 120, length: 10 }, %)\n |> line([-10, 0], %)\n |> angledLine({ angle: 240, length: 10 }, %, 'referenceEdge')\n |> close(%)\n\nconst example = extrude(5, exampleSketch)\n |> fillet({\n radius: 3,\n tags: [\n getNextAdjacentEdge(\"referenceEdge\", %)\n ]\n }, %)"
]
},
{
@ -29907,7 +29908,7 @@
"unpublished": false,
"deprecated": false,
"examples": [
"const part001 = startSketchOn('XY')\n |> startProfileAt([0, 0], %)\n |> line([0, 10], %, \"thing\")\n |> line([10, 0], %)\n |> line([0, -10], %, \"thing2\")\n |> close(%)\n |> extrude(10, %)\n |> fillet({\n radius: 2,\n tags: [\"thing\", getOppositeEdge(\"thing\", %)]\n }, %)"
"const exampleSketch = startSketchOn('XZ')\n |> startProfileAt([0, 0], %)\n |> line([10, 0], %)\n |> angledLine({ angle: 60, length: 10 }, %)\n |> angledLine({ angle: 120, length: 10 }, %)\n |> line([-10, 0], %)\n |> angledLine({ angle: 240, length: 10 }, %, 'referenceEdge')\n |> close(%)\n\nconst example = extrude(5, exampleSketch)\n |> fillet({\n radius: 3,\n tags: [getOppositeEdge(\"referenceEdge\", %)]\n }, %)"
]
},
{
@ -30693,7 +30694,7 @@
"unpublished": false,
"deprecated": false,
"examples": [
"const part001 = startSketchOn('XY')\n |> startProfileAt([0, 0], %)\n |> line([0, 10], %, \"thing\")\n |> line([10, 0], %, \"thing1\")\n |> line([0, -10], %, \"thing2\")\n |> close(%, \"thing3\")\n |> extrude(10, %)\n |> fillet({\n radius: 2,\n tags: [getPreviousAdjacentEdge(\"thing3\", %)]\n }, %)"
"const exampleSketch = startSketchOn('XZ')\n |> startProfileAt([0, 0], %)\n |> line([10, 0], %)\n |> angledLine({ angle: 60, length: 10 }, %)\n |> angledLine({ angle: 120, length: 10 }, %)\n |> line([-10, 0], %)\n |> angledLine({ angle: 240, length: 10 }, %, 'referenceEdge')\n |> close(%)\n\nconst example = extrude(5, exampleSketch)\n |> fillet({\n radius: 3,\n tags: [\n getPreviousAdjacentEdge(\"referenceEdge\", %)\n ]\n }, %)"
]
},
{
@ -32254,7 +32255,7 @@
"unpublished": false,
"deprecated": false,
"examples": [
"const part001 = startSketchOn('XY')\n |> circle([5, 5], 10, %)\n |> extrude(10, %)\n |> helix({ revolutions: 16, angle_start: 0 }, %)"
"const part001 = startSketchOn('XY')\n |> circle([5, 5], 10, %)\n |> extrude(10, %)\n |> helix({\n angle_start: 0,\n ccw: true,\n revolutions: 16,\n angle_start: 0\n }, %)"
]
},
{
@ -36159,7 +36160,8 @@
"unpublished": false,
"deprecated": false,
"examples": [
"const square = startSketchOn('XY')\n |> startProfileAt([0, 0], %)\n |> line([0, 10], %)\n |> line([10, 0], %)\n |> line([0, -10], %)\n |> close(%)\n |> hole(circle([2, 2], .5, %), %)\n |> hole(circle([2, 8], .5, %), %)\n |> extrude(2, %)"
"const exampleSketch = startSketchOn('XY')\n |> startProfileAt([0, 0], %)\n |> line([0, 5], %)\n |> line([5, 0], %)\n |> line([0, -5], %)\n |> close(%)\n |> hole(circle([1, 1], .25, %), %)\n |> hole(circle([1, 4], .25, %), %)\n\nconst example = extrude(1, exampleSketch)",
"fn squareHoleSketch = () => {\n const squareSketch = startSketchOn('-XZ')\n |> startProfileAt([-1, -1], %)\n |> line([2, 0], %)\n |> line([0, 2], %)\n |> line([-2, 0], %)\n |> close(%)\n return squareSketch\n}\n\nconst exampleSketch = startSketchOn('-XZ')\n |> circle([0, 0], 3, %)\n |> hole(squareHoleSketch(), %)"
]
},
{
@ -37807,7 +37809,7 @@
"unpublished": false,
"deprecated": false,
"examples": [
"startSketchOn(\"YZ\")\n |> startProfileAt([0, 0], %)\n |> line([5, 0], %, \"thing\")\n |> line([5, 5], %)\n |> line([0, lastSegX(%)], %)\n |> close(%)\n |> extrude(5, %)"
"const exampleSketch = startSketchOn(\"-XZ\")\n |> startProfileAt([0, 0], %)\n |> line([5, 0], %)\n |> line([20, 5], %)\n |> line([0, lastSegX(%)], %)\n |> line([-15, 0], %)\n |> close(%)\n\nconst example = extrude(5, exampleSketch)"
]
},
{
@ -38796,7 +38798,7 @@
"unpublished": false,
"deprecated": false,
"examples": [
"startSketchOn(\"YZ\")\n |> startProfileAt([0, 0], %)\n |> line([5, 0], %, \"thing\")\n |> line([5, 5], %)\n |> line([0, lastSegY(%)], %)\n |> close(%)\n |> extrude(5, %)"
"const exampleSketch = startSketchOn(\"-XZ\")\n |> startProfileAt([0, 0], %)\n |> line([5, 0], %)\n |> line([20, 5], %)\n |> line([0, lastSegY(%)], %)\n |> line([-15, 0], %)\n |> close(%)\n\nconst example = extrude(5, exampleSketch)"
]
},
{
@ -40892,7 +40894,7 @@
"unpublished": false,
"deprecated": false,
"examples": [
"startSketchOn('-XY')\n |> startProfileAt([0, 0], %)\n |> line([10, 10], %)\n |> line([20, 10], %, \"edge1\")\n |> close(%, \"edge2\")\n |> extrude(10, %)"
"const exampleSketch = startSketchOn(\"-XZ\")\n |> startProfileAt([0, 0], %)\n |> line([10, 0], %)\n |> line([0, 10], %)\n |> line([-10, 0], %)\n |> close(%)\n\nconst example = extrude(5, exampleSketch)"
]
},
{
@ -42862,7 +42864,7 @@
"unpublished": false,
"deprecated": false,
"examples": [
"fn rectShape = (pos, w, l) => {\n const rr = startSketchOn('YZ')\n |> startProfileAt([pos[0] - (w / 2), pos[1] - (l / 2)], %)\n |> lineTo([pos[0] + w / 2, pos[1] - (l / 2)], %, \"edge1\")\n |> lineTo([pos[0] + w / 2, pos[1] + l / 2], %, \"edge2\")\n |> lineTo([pos[0] - (w / 2), pos[1] + l / 2], %, \"edge3\")\n |> close(%, \"edge4\")\n return rr\n}\n\n// Create the mounting plate extrusion, holes, and fillets\nconst part = rectShape([0, 0], 20, 20)\n |> extrude(10, %)"
"const exampleSketch = startSketchOn(\"-XZ\")\n |> startProfileAt([0, 0], %)\n |> lineTo([10, 0], %)\n |> lineTo([0, 10], %)\n |> lineTo([-10, 0], %)\n |> close(%)\n\nconst example = extrude(5, exampleSketch)"
]
},
{
@ -45067,7 +45069,7 @@
"unpublished": false,
"deprecated": false,
"examples": [
"const part = startSketchOn('XY')\n |> circle([0, 0], 2, %)\n |> patternCircular2d({\n center: [20, 20],\n repetitions: 12,\n arcDegrees: 210,\n rotateDuplicates: true\n }, %)\n |> extrude(1, %)"
"const exampleSketch = startSketchOn('-XZ')\n |> startProfileAt([.5, 25], %)\n |> line([0, 5], %)\n |> line([-1, 0], %)\n |> line([0, -5], %)\n |> close(%)\n |> patternCircular2d({\n center: [0, 0],\n repetitions: 12,\n arcDegrees: 360,\n rotateDuplicates: true\n }, %)\n\nconst example = extrude(1, exampleSketch)"
]
},
{
@ -46648,7 +46650,7 @@
"unpublished": false,
"deprecated": false,
"examples": [
"const part = startSketchOn('XY')\n |> startProfileAt([0, 0], %)\n |> line([0, 1], %)\n |> line([1, 0], %)\n |> line([0, -1], %)\n |> close(%)\n |> extrude(1, %)\n |> patternCircular3d({\n axis: [1, 1, 0],\n center: [10, 0, 10],\n repetitions: 10,\n arcDegrees: 360,\n rotateDuplicates: true\n }, %)"
"const exampleSketch = startSketchOn('-XZ')\n |> circle([0, 0], 1, %)\n\nconst example = extrude(-5, exampleSketch)\n |> patternCircular3d({\n axis: [1, -1, 0],\n center: [10, -20, 0],\n repetitions: 10,\n arcDegrees: 360,\n rotateDuplicates: true\n }, %)"
]
},
{
@ -49626,7 +49628,7 @@
"unpublished": false,
"deprecated": false,
"examples": [
"const part = startSketchOn('XY')\n |> circle([0, 0], 2, %)\n |> patternLinear2d({\n axis: [0, 1],\n repetitions: 12,\n distance: 2\n }, %)\n |> extrude(1, %)"
"const exampleSketch = startSketchOn('-XZ')\n |> circle([0, 0], 1, %)\n |> patternLinear2d({\n axis: [1, 0],\n repetitions: 6,\n distance: 4\n }, %)\n\nconst example = extrude(1, exampleSketch)"
]
},
{
@ -51191,7 +51193,7 @@
"unpublished": false,
"deprecated": false,
"examples": [
"const part = startSketchOn('XY')\n |> startProfileAt([0, 0], %)\n |> line([0, 1], %)\n |> line([1, 0], %)\n |> line([0, -1], %)\n |> close(%)\n |> extrude(1, %)\n |> patternLinear3d({\n axis: [1, 0, 1],\n repetitions: 3,\n distance: 6\n }, %)"
"const exampleSketch = startSketchOn('-XZ')\n |> startProfileAt([0, 0], %)\n |> line([0, 2], %)\n |> line([3, 1], %)\n |> line([0, -4], %)\n |> close(%)\n\nconst example = extrude(1, exampleSketch)\n |> patternLinear3d({\n axis: [1, 0, 1],\n repetitions: 6,\n distance: 6\n }, %)"
]
},
{
@ -54119,7 +54121,7 @@
"unpublished": false,
"deprecated": false,
"examples": [
"const part001 = startSketchOn('XY')\n |> startProfileAt([4.83, 12.56], %)\n |> line([15.1, 2.48], %)\n |> line([3.15, -9.85], %, 'seg01')\n |> line([-15.17, -4.1], %)\n |> angledLine([segAng('seg01', %), 12.35], %)\n |> line([-13.02, 10.03], %)\n |> close(%)\n |> extrude(4, %)"
"const exampleSketch = startSketchOn('-XZ')\n |> startProfileAt([0, 0], %)\n |> line([10, 0], %)\n |> line([5, 10], %, 'seg01')\n |> line([-10, 0], %)\n |> angledLine([segAng('seg01', %), 10], %)\n |> line([-10, 0], %)\n |> angledLine([segAng('seg01', %), -15], %)\n |> close(%)\n\nconst example = extrude(4, exampleSketch)"
]
},
{
@ -55116,7 +55118,7 @@
"unpublished": false,
"deprecated": false,
"examples": [
"startSketchOn(\"YZ\")\n |> startProfileAt([0, 0], %)\n |> line([5, 0], %, \"thing\")\n |> line([5, 5], %)\n |> line([segEndX(\"thing\", %), 5], %)\n |> close(%)\n |> extrude(5, %)"
"const exampleSketch = startSketchOn('-XZ')\n |> startProfileAt([0, 0], %)\n |> line([20, 0], %, \"thing\")\n |> line([0, 5], %)\n |> line([segEndX(\"thing\", %), 0], %)\n |> line([-20, 10], %)\n |> close(%)\n\nconst example = extrude(5, exampleSketch)"
]
},
{
@ -56113,7 +56115,7 @@
"unpublished": false,
"deprecated": false,
"examples": [
"startSketchOn(\"YZ\")\n |> startProfileAt([0, 0], %)\n |> line([5, 0], %, \"thing\")\n |> line([5, 5], %)\n |> line([segEndY(\"thing\", %), 5], %)\n |> close(%)\n |> extrude(5, %)"
"const exampleSketch = startSketchOn('-XZ')\n |> startProfileAt([0, 0], %)\n |> line([20, 0], %)\n |> line([0, 3], %, \"thing\")\n |> line([-10, 0], %)\n |> line([0, segEndY(\"thing\", %)], %)\n |> line([-10, 0], %)\n |> close(%)\n\nconst example = extrude(5, exampleSketch)"
]
},
{
@ -57110,7 +57112,7 @@
"unpublished": false,
"deprecated": false,
"examples": [
"startSketchOn(\"YZ\")\n |> startProfileAt([0, 0], %)\n |> line([5, 0], %, \"thing\")\n |> line([5, 5], %)\n |> line([0, segLen(\"thing\", %)], %)\n |> close(%)\n |> extrude(5, %)"
"const exampleSketch = startSketchOn(\"-XZ\")\n |> startProfileAt([0, 0], %)\n |> angledLine({ angle: 60, length: 10 }, %, \"thing\")\n |> tangentialArc({ offset: -120, radius: 5 }, %)\n |> angledLine({\n angle: -60,\n length: segLen(\"thing\", %)\n }, %)\n |> close(%)\n\nconst example = extrude(5, exampleSketch)"
]
},
{
@ -58485,7 +58487,9 @@
"unpublished": false,
"deprecated": false,
"examples": [
"startSketchOn('XY')\n |> startProfileAt([0, 0], %)\n |> line([10, 10], %)\n |> line([10, 0], %)\n |> close(%)\n |> extrude(10, %)"
"const exampleSketch = startSketchOn('-XZ')\n |> startProfileAt([0, 0], %)\n |> line([10, 0], %)\n |> line([0, 10], %)\n |> line([-10, 0], %)\n |> close(%)\n\nconst example = extrude(5, exampleSketch)",
"const exampleSketch = startSketchOn('-XZ')\n |> startProfileAt([10, 10], %)\n |> line([10, 0], %)\n |> line([0, 10], %)\n |> line([-10, 0], %)\n |> close(%)\n\nconst example = extrude(5, exampleSketch)",
"const exampleSketch = startSketchOn('-XZ')\n |> startProfileAt([-10, 23], %)\n |> line([10, 0], %)\n |> line([0, 10], %)\n |> line([-10, 0], %)\n |> close(%)\n\nconst example = extrude(5, exampleSketch)"
]
},
{
@ -59479,7 +59483,9 @@
"unpublished": false,
"deprecated": false,
"examples": [
"startSketchAt([0, 0])\n |> line([10, 10], %)\n |> line([20, 10], %, \"edge1\")\n |> close(%, \"edge2\")\n |> extrude(10, %)"
"const exampleSketch = startSketchAt([0, 0])\n |> line([10, 0], %)\n |> line([0, 10], %)\n |> line([-10, 0], %)\n |> close(%)\n\nconst example = extrude(5, exampleSketch)",
"const exampleSketch = startSketchAt([10, 10])\n |> line([10, 0], %)\n |> line([0, 10], %)\n |> line([-10, 0], %)\n |> close(%)\n\nconst example = extrude(5, exampleSketch)",
"const exampleSketch = startSketchAt([-10, 23])\n |> line([10, 0], %)\n |> line([0, 10], %)\n |> line([-10, 0], %)\n |> close(%)\n\nconst example = extrude(5, exampleSketch)"
]
},
{
@ -60752,8 +60758,9 @@
"unpublished": false,
"deprecated": false,
"examples": [
"startSketchOn('XY')\n |> startProfileAt([0, 0], %)\n |> line([10, 10], %)\n |> line([20, 10], %, \"edge1\")\n |> close(%, \"edge2\")\n |> extrude(10, %)",
"fn cube = (pos, scale) => {\n const sg = startSketchOn('XY')\n |> startProfileAt(pos, %)\n |> line([0, scale], %)\n |> line([scale, 0], %)\n |> line([0, -scale], %)\n |> close(%)\n |> extrude(scale, %)\n\n return sg\n}\n\nconst box = cube([0, 0], 20)\n\nconst part001 = startSketchOn(box, \"start\")\n |> startProfileAt([0, 0], %)\n |> line([10, 10], %)\n |> line([20, 10], %, \"edge1\")\n |> close(%)\n |> extrude(20, %)"
"const exampleSketch = startSketchOn(\"XY\")\n |> startProfileAt([0, 0], %)\n |> line([10, 0], %)\n |> line([0, 10], %)\n |> line([-10, 0], %)\n |> close(%)\n\nconst example = extrude(5, exampleSketch)\n\nconst exampleSketch002 = startSketchOn(example, 'end')\n |> startProfileAt([1, 1], %)\n |> line([8, 0], %)\n |> line([0, 8], %)\n |> line([-8, 0], %)\n |> close(%)\n\nconst example002 = extrude(5, exampleSketch002)\n\nconst exampleSketch003 = startSketchOn(example002, 'end')\n |> startProfileAt([2, 2], %)\n |> line([6, 0], %)\n |> line([0, 6], %)\n |> line([-6, 0], %)\n |> close(%)\n\nconst example003 = extrude(5, exampleSketch003)",
"const exampleSketch = startSketchOn(\"XY\")\n |> startProfileAt([0, 0], %)\n |> line([10, 0], %)\n |> line([0, 10], %, 'sketchingFace')\n |> line([-10, 0], %)\n |> close(%)\n\nconst example = extrude(10, exampleSketch)\n\nconst exampleSketch002 = startSketchOn(example, 'sketchingFace')\n |> startProfileAt([1, 1], %)\n |> line([8, 0], %)\n |> line([0, 8], %)\n |> line([-8, 0], %)\n |> close(%, 'sketchingFace002')\n\nconst example002 = extrude(10, exampleSketch002)\n\nconst exampleSketch003 = startSketchOn(example002, 'sketchingFace002')\n |> startProfileAt([-8, 12], %)\n |> line([0, 6], %)\n |> line([6, 0], %)\n |> line([0, -6], %)\n |> close(%)\n\nconst example003 = extrude(5, exampleSketch003)",
"const exampleSketch = startSketchOn('XY')\n |> startProfileAt([4, 12], %)\n |> line([2, 0], %)\n |> line([0, -6], %)\n |> line([4, -6], %)\n |> line([0, -6], %)\n |> line([-3.75, -4.5], %)\n |> line([0, -5.5], %)\n |> line([-2, 0], %)\n |> close(%)\n\nconst example = revolve({ axis: 'y', angle: 180 }, exampleSketch)\n\nconst exampleSketch002 = startSketchOn(example, 'end')\n |> startProfileAt([4.5, -5], %)\n |> line([0, 5], %)\n |> line([5, 0], %)\n |> line([0, -5], %)\n |> close(%)\n\nconst example002 = extrude(5, exampleSketch002)"
]
},
{
@ -62781,7 +62788,7 @@
"unpublished": false,
"deprecated": false,
"examples": [
"startSketchOn('-YZ')\n |> startProfileAt([0, 0], %)\n |> line([10, 10], %, \"edge1\")\n |> tangentialArc({ radius: 10, offset: 90 }, %, \"edge1\")\n |> close(%)\n |> extrude(10, %)"
"const exampleSketch = startSketchOn('-XZ')\n |> startProfileAt([0, 0], %)\n |> angledLine({ angle: 60, length: 10 }, %)\n |> tangentialArc({ radius: 10, offset: -120 }, %)\n |> angledLine({ angle: -60, length: 10 }, %)\n |> close(%)\n\nconst example = extrude(10, exampleSketch)"
]
},
{
@ -64751,7 +64758,7 @@
"unpublished": false,
"deprecated": false,
"examples": [
"startSketchOn('-YZ')\n |> startProfileAt([0, 0], %)\n |> line([10, 10], %, \"edge0\")\n |> tangentialArcTo([10, 0], %)\n |> close(%)\n |> extrude(10, %)"
"const exampleSketch = startSketchOn('-XZ')\n |> startProfileAt([0, 0], %)\n |> angledLine({ angle: 60, length: 10 }, %)\n |> tangentialArcTo([15, 15], %)\n |> line([10, -15], %)\n |> close(%)\n\nconst example = extrude(10, exampleSketch)"
]
},
{
@ -66805,7 +66812,7 @@
"unpublished": false,
"deprecated": false,
"examples": [
"startSketchOn('YZ')\n |> startProfileAt([0, 0], %)\n |> xLine(10, %)\n |> line([10, 10], %)\n |> close(%, \"edge1\")\n |> extrude(10, %)"
"const exampleSketch = startSketchOn('-XZ')\n |> startProfileAt([0, 0], %)\n |> xLine(15, %)\n |> angledLine({ angle: 80, length: 15 }, %)\n |> line([8, -10], %)\n |> xLine(10, %)\n |> angledLine({ angle: 120, length: 30 }, %)\n |> xLine(-15, %)\n |> close(%)\n\nconst example = extrude(10, exampleSketch)"
]
},
{
@ -68770,7 +68777,7 @@
"unpublished": false,
"deprecated": false,
"examples": [
"startSketchOn('XY')\n |> startProfileAt([0, 0], %)\n |> xLineTo(10, %, \"edge1\")\n |> line([10, 10], %)\n |> close(%, \"edge2\")\n |> extrude(10, %)"
"const exampleSketch = startSketchOn('-XZ')\n |> startProfileAt([0, 0], %)\n |> xLineTo(15, %)\n |> angledLine({ angle: 80, length: 15 }, %)\n |> line([8, -10], %)\n |> xLineTo(40, %)\n |> angledLine({ angle: 135, length: 30 }, %)\n |> xLineTo(10, %)\n |> close(%)\n\nconst example = extrude(10, exampleSketch)"
]
},
{
@ -70735,7 +70742,7 @@
"unpublished": false,
"deprecated": false,
"examples": [
"startSketchOn('XY')\n |> startProfileAt([0, 0], %)\n |> yLine(10, %)\n |> line([10, 10], %)\n |> close(%, \"edge1\")\n |> extrude(10, %)"
"const exampleSketch = startSketchOn('-XZ')\n |> startProfileAt([0, 0], %)\n |> yLine(15, %)\n |> angledLine({ angle: 30, length: 15 }, %)\n |> line([8, -10], %)\n |> yLine(-5, %)\n |> close(%)\n\nconst example = extrude(10, exampleSketch)"
]
},
{

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 45 KiB

View File

@ -1,6 +1,6 @@
{
"name": "untitled-app",
"version": "0.21.1",
"version": "0.21.3",
"private": true,
"dependencies": {
"@codemirror/autocomplete": "^6.16.0",

136
src-tauri/Cargo.lock generated
View File

@ -169,9 +169,9 @@ dependencies = [
[[package]]
name = "anyhow"
version = "1.0.82"
version = "1.0.83"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519"
checksum = "25bdb32cbbdce2b519a9cd7df3a678443100e265d5e25ca763b7572a5104f5f3"
dependencies = [
"backtrace",
]
@ -334,7 +334,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.60",
"syn 2.0.63",
]
[[package]]
@ -369,7 +369,7 @@ checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.60",
"syn 2.0.63",
]
[[package]]
@ -415,7 +415,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.60",
"syn 2.0.63",
]
[[package]]
@ -564,7 +564,7 @@ dependencies = [
"proc-macro-crate 3.1.0",
"proc-macro2",
"quote",
"syn 2.0.60",
"syn 2.0.63",
"syn_derive",
]
@ -873,7 +873,7 @@ dependencies = [
"heck 0.5.0",
"proc-macro2",
"quote",
"syn 2.0.60",
"syn 2.0.63",
]
[[package]]
@ -1075,7 +1075,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331"
dependencies = [
"quote",
"syn 2.0.60",
"syn 2.0.63",
]
[[package]]
@ -1085,7 +1085,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "edb49164822f3ee45b17acd4a208cfc1251410cf0cad9a833234c9890774dd9f"
dependencies = [
"quote",
"syn 2.0.60",
"syn 2.0.63",
]
[[package]]
@ -1109,7 +1109,7 @@ dependencies = [
"proc-macro2",
"quote",
"strsim 0.10.0",
"syn 2.0.60",
"syn 2.0.63",
]
[[package]]
@ -1120,7 +1120,7 @@ checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f"
dependencies = [
"darling_core",
"quote",
"syn 2.0.60",
"syn 2.0.63",
]
[[package]]
@ -1167,7 +1167,7 @@ checksum = "377af281d8f23663862a7c84623bc5dcf7f8c44b13c7496a590bdc157f941a43"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.60",
"syn 2.0.63",
"synstructure",
]
@ -1194,7 +1194,7 @@ dependencies = [
[[package]]
name = "derive-docs"
version = "0.1.17"
version = "0.1.18"
dependencies = [
"Inflector",
"convert_case 0.6.0",
@ -1204,7 +1204,7 @@ dependencies = [
"regex",
"serde",
"serde_tokenstream",
"syn 2.0.60",
"syn 2.0.63",
]
[[package]]
@ -1287,7 +1287,7 @@ checksum = "f2b99bf03862d7f545ebc28ddd33a665b50865f4dfd84031a393823879bd4c54"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.60",
"syn 2.0.63",
]
[[package]]
@ -1385,7 +1385,7 @@ checksum = "5c785274071b1b420972453b306eeca06acf4633829db4223b58a2a8c5953bc4"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.60",
"syn 2.0.63",
]
[[package]]
@ -1536,7 +1536,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.60",
"syn 2.0.63",
]
[[package]]
@ -1652,7 +1652,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.60",
"syn 2.0.63",
]
[[package]]
@ -1928,7 +1928,7 @@ dependencies = [
"proc-macro-error",
"proc-macro2",
"quote",
"syn 2.0.60",
"syn 2.0.63",
]
[[package]]
@ -1949,21 +1949,21 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
[[package]]
name = "gltf-derive"
version = "1.4.0"
version = "1.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "438ffe1a5540d75403feaf23636b164e816e93f6f03131674722b3886ce32a57"
checksum = "14070e711538afba5d6c807edb74bcb84e5dbb9211a3bf5dea0dfab5b24f4c51"
dependencies = [
"inflections",
"proc-macro2",
"quote",
"syn 2.0.60",
"syn 2.0.63",
]
[[package]]
name = "gltf-json"
version = "1.4.0"
version = "1.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "655951ba557f2bc69ea4b0799446bae281fa78efae6319968bdd2c3e9a06d8e1"
checksum = "e6176f9d60a7eab0a877e8e96548605dedbde9190a7ae1e80bbcc1c9af03ab14"
dependencies = [
"gltf-derive",
"serde",
@ -2031,7 +2031,7 @@ dependencies = [
"proc-macro-error",
"proc-macro2",
"quote",
"syn 2.0.60",
"syn 2.0.63",
]
[[package]]
@ -2536,7 +2536,7 @@ dependencies = [
[[package]]
name = "kcl-lib"
version = "0.1.54"
version = "0.1.55"
dependencies = [
"anyhow",
"approx",
@ -2640,7 +2640,7 @@ checksum = "0611fc9b9786175da21d895ffa0f65039e19c9111e94a41b7af999e3b95f045f"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.60",
"syn 2.0.63",
]
[[package]]
@ -3362,7 +3362,7 @@ dependencies = [
"regex",
"regex-syntax 0.7.5",
"structmeta 0.2.0",
"syn 2.0.60",
"syn 2.0.63",
]
[[package]]
@ -3376,7 +3376,7 @@ dependencies = [
"regex",
"regex-syntax 0.8.3",
"structmeta 0.3.0",
"syn 2.0.60",
"syn 2.0.63",
]
[[package]]
@ -3518,7 +3518,7 @@ dependencies = [
"phf_shared 0.11.2",
"proc-macro2",
"quote",
"syn 2.0.60",
"syn 2.0.63",
]
[[package]]
@ -3586,7 +3586,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.60",
"syn 2.0.63",
]
[[package]]
@ -4424,7 +4424,7 @@ dependencies = [
"proc-macro2",
"quote",
"serde_derive_internals",
"syn 2.0.60",
"syn 2.0.63",
]
[[package]]
@ -4509,9 +4509,9 @@ dependencies = [
[[package]]
name = "serde"
version = "1.0.200"
version = "1.0.201"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ddc6f9cc94d67c0e21aaf7eda3a010fd3af78ebf6e096aa6e2e13c79749cce4f"
checksum = "780f1cebed1629e4753a1a38a3c72d30b97ec044f0aef68cb26650a3c5cf363c"
dependencies = [
"serde_derive",
]
@ -4527,13 +4527,13 @@ dependencies = [
[[package]]
name = "serde_derive"
version = "1.0.200"
version = "1.0.201"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "856f046b9400cee3c8c94ed572ecdb752444c24528c035cd35882aad6f492bcb"
checksum = "c5e405930b9796f1c00bee880d03fc7e0bb4b9a11afc776885ffe84320da2865"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.60",
"syn 2.0.63",
]
[[package]]
@ -4544,7 +4544,7 @@ checksum = "330f01ce65a3a5fe59a60c82f3c9a024b573b8a6e875bd233fe5f934e71d54e3"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.60",
"syn 2.0.63",
]
[[package]]
@ -4577,7 +4577,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.60",
"syn 2.0.63",
]
[[package]]
@ -4598,7 +4598,7 @@ dependencies = [
"proc-macro2",
"quote",
"serde",
"syn 2.0.60",
"syn 2.0.63",
]
[[package]]
@ -4640,7 +4640,7 @@ dependencies = [
"darling",
"proc-macro2",
"quote",
"syn 2.0.60",
"syn 2.0.63",
]
[[package]]
@ -4908,7 +4908,7 @@ dependencies = [
"proc-macro2",
"quote",
"structmeta-derive 0.2.0",
"syn 2.0.60",
"syn 2.0.63",
]
[[package]]
@ -4920,7 +4920,7 @@ dependencies = [
"proc-macro2",
"quote",
"structmeta-derive 0.3.0",
"syn 2.0.60",
"syn 2.0.63",
]
[[package]]
@ -4931,7 +4931,7 @@ checksum = "a60bcaff7397072dca0017d1db428e30d5002e00b6847703e2e42005c95fbe00"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.60",
"syn 2.0.63",
]
[[package]]
@ -4942,7 +4942,7 @@ checksum = "152a0b65a590ff6c3da95cabe2353ee04e6167c896b28e3b14478c2636c922fc"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.60",
"syn 2.0.63",
]
[[package]]
@ -4964,7 +4964,7 @@ dependencies = [
"proc-macro2",
"quote",
"rustversion",
"syn 2.0.60",
"syn 2.0.63",
]
[[package]]
@ -4997,9 +4997,9 @@ dependencies = [
[[package]]
name = "syn"
version = "2.0.60"
version = "2.0.63"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3"
checksum = "bf5be731623ca1a1fb7d8be6f261a3be6d3e2337b8a1f97be944d020c8fcb704"
dependencies = [
"proc-macro2",
"quote",
@ -5015,7 +5015,7 @@ dependencies = [
"proc-macro-error",
"proc-macro2",
"quote",
"syn 2.0.60",
"syn 2.0.63",
]
[[package]]
@ -5032,7 +5032,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.60",
"syn 2.0.63",
]
[[package]]
@ -5249,7 +5249,7 @@ dependencies = [
"serde",
"serde_json",
"sha2",
"syn 2.0.60",
"syn 2.0.63",
"tauri-utils",
"thiserror",
"time",
@ -5267,7 +5267,7 @@ dependencies = [
"heck 0.4.1",
"proc-macro2",
"quote",
"syn 2.0.60",
"syn 2.0.63",
"tauri-codegen",
"tauri-utils",
]
@ -5602,22 +5602,22 @@ checksum = "8eaa81235c7058867fa8c0e7314f33dcce9c215f535d1913822a2b3f5e289f3c"
[[package]]
name = "thiserror"
version = "1.0.59"
version = "1.0.60"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f0126ad08bff79f29fc3ae6a55cc72352056dfff61e3ff8bb7129476d44b23aa"
checksum = "579e9083ca58dd9dcf91a9923bb9054071b9ebbd800b342194c9feb0ee89fc18"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
version = "1.0.59"
version = "1.0.60"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d1cd413b5d558b4c5bf3680e324a6fa5014e7b7c067a51e69dbdf47eb7148b66"
checksum = "e2470041c06ec3ac1ab38d0356a6119054dedaea53e12fbefc0de730a1c08524"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.60",
"syn 2.0.63",
]
[[package]]
@ -5706,7 +5706,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.60",
"syn 2.0.63",
]
[[package]]
@ -5895,7 +5895,7 @@ checksum = "84fd902d4e0b9a4b27f2f440108dc034e1758628a9b702f8ec61ad66355422fa"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.60",
"syn 2.0.63",
]
[[package]]
@ -5924,7 +5924,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.60",
"syn 2.0.63",
]
[[package]]
@ -6048,7 +6048,7 @@ dependencies = [
"Inflector",
"proc-macro2",
"quote",
"syn 2.0.60",
"syn 2.0.63",
"termcolor",
]
@ -6261,7 +6261,7 @@ dependencies = [
"proc-macro-error",
"proc-macro2",
"quote",
"syn 2.0.60",
"syn 2.0.63",
]
[[package]]
@ -6360,7 +6360,7 @@ dependencies = [
"once_cell",
"proc-macro2",
"quote",
"syn 2.0.60",
"syn 2.0.63",
"wasm-bindgen-shared",
]
@ -6394,7 +6394,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.60",
"syn 2.0.63",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
@ -6535,7 +6535,7 @@ checksum = "ac1345798ecd8122468840bcdf1b95e5dc6d2206c5e4b0eafa078d061f59c9bc"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.60",
"syn 2.0.63",
]
[[package]]
@ -6641,7 +6641,7 @@ checksum = "f6fc35f58ecd95a9b71c4f2329b911016e6bec66b3f2e6a4aad86bd2e99e2f9b"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.60",
"syn 2.0.63",
]
[[package]]
@ -6652,7 +6652,7 @@ checksum = "08990546bf4edef8f431fa6326e032865f27138718c587dc21bc0265bbcb57cc"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.60",
"syn 2.0.63",
]
[[package]]
@ -7094,7 +7094,7 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.60",
"syn 2.0.63",
]
[[package]]

View File

@ -74,5 +74,5 @@
}
},
"productName": "Zoo Modeling App",
"version": "0.21.1"
"version": "0.21.3"
}

View File

@ -13,11 +13,11 @@ export default function CodeEditor() {
<div className="fixed grid justify-end items-center inset-0 z-50 pointer-events-none">
<div
className={
'z-10 max-w-xl border border-chalkboard-50 dark:border-chalkboard-80 shadow-lg h-3/4 flex flex-col justify-center bg-chalkboard-10 dark:bg-chalkboard-90 p-8 rounded' +
'z-10 max-w-xl border border-chalkboard-50 dark:border-chalkboard-80 shadow-lg h-[75vh] flex flex-col justify-center bg-chalkboard-10 dark:bg-chalkboard-90 p-8 rounded' +
(buttonDownInStream ? '' : ' pointer-events-auto')
}
>
<section className="flex-1">
<section className="flex-1 overflow-y-auto">
<h2 className="text-3xl font-bold">
Editing code with <span className="text-primary">kcl</span>
</h2>

View File

@ -14,7 +14,7 @@ export default function InteractiveNumbers() {
<div className="fixed grid justify-end items-center inset-0 z-50 pointer-events-none">
<div
className={
'z-10 max-w-xl border border-chalkboard-50 dark:border-chalkboard-80 shadow-lg h-3/4 flex flex-col justify-center bg-chalkboard-10 dark:bg-chalkboard-90 p-8 rounded' +
'z-10 max-w-xl border border-chalkboard-50 dark:border-chalkboard-80 shadow-lg h-[75vh] flex flex-col justify-center bg-chalkboard-10 dark:bg-chalkboard-90 p-8 rounded' +
(buttonDownInStream ? '' : ' pointer-events-auto')
}
>

View File

@ -30,7 +30,7 @@ export default function ParametricModeling() {
<div className="fixed grid justify-end items-center inset-0 z-50 pointer-events-none">
<div
className={
'z-10 max-w-xl border border-chalkboard-50 dark:border-chalkboard-80 shadow-lg h-3/4 flex flex-col justify-center bg-chalkboard-10 dark:bg-chalkboard-90 p-8 rounded' +
'z-10 max-w-xl border border-chalkboard-50 dark:border-chalkboard-80 shadow-lg h-[75vh] flex flex-col justify-center bg-chalkboard-10 dark:bg-chalkboard-90 p-8 rounded' +
(buttonDownInStream ? '' : ' pointer-events-auto')
}
>

View File

@ -13,11 +13,11 @@ export default function Streaming() {
<div className="fixed grid justify-start items-center inset-0 z-50 pointer-events-none">
<div
className={
'max-w-xl border border-chalkboard-50 dark:border-chalkboard-80 shadow-lg h-3/4 flex flex-col justify-center bg-chalkboard-10 dark:bg-chalkboard-90 p-8 rounded' +
'max-w-xl border border-chalkboard-50 dark:border-chalkboard-80 shadow-lg h-[75vh] flex flex-col justify-center bg-chalkboard-10 dark:bg-chalkboard-90 p-8 rounded' +
(buttonDownInStream ? '' : ' pointer-events-auto')
}
>
<section className="flex-1">
<section className="flex-1 overflow-y-auto">
<h2 className="text-3xl font-bold">Streaming Video</h2>
<p className="my-4">
Historically, CAD programs run on your computer, so to run

View File

@ -146,7 +146,7 @@ export function OnboardingButtons({
onClick={dismiss}
iconStart={{
icon: 'close',
bgClassName: 'bg-destroy-80',
bgClassName: 'bg-destroy-80 group-hover:bg-destroy-80',
iconClassName: 'text-destroy-20 group-hover:text-destroy-10',
}}
className="hover:border-destroy-40 hover:bg-destroy-10/50 dark:hover:bg-destroy-80/50"

View File

@ -132,7 +132,10 @@ export const Settings = () => {
/>
<div
className="flex-1 grid items-stretch pl-4 pr-5 pb-5 gap-2 overflow-hidden"
style={{ gridTemplateColumns: 'auto 1fr' }}
style={{
gridTemplateColumns: 'auto 1fr',
gridTemplateRows: '1fr',
}}
>
<div className="flex w-32 flex-col gap-3 pr-2 py-1 border-0 border-r border-r-chalkboard-20 dark:border-r-chalkboard-90">
{Object.entries(context)

View File

@ -246,7 +246,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.61",
"syn 2.0.63",
]
[[package]]
@ -257,7 +257,7 @@ checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.61",
"syn 2.0.63",
]
[[package]]
@ -280,7 +280,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.61",
"syn 2.0.63",
]
[[package]]
@ -596,7 +596,7 @@ dependencies = [
"heck 0.5.0",
"proc-macro2",
"quote",
"syn 2.0.61",
"syn 2.0.63",
]
[[package]]
@ -846,7 +846,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.61",
"syn 2.0.63",
]
[[package]]
@ -870,7 +870,7 @@ dependencies = [
"proc-macro2",
"quote",
"strsim 0.10.0",
"syn 2.0.61",
"syn 2.0.63",
]
[[package]]
@ -881,7 +881,7 @@ checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f"
dependencies = [
"darling_core",
"quote",
"syn 2.0.61",
"syn 2.0.63",
]
[[package]]
@ -922,7 +922,7 @@ checksum = "377af281d8f23663862a7c84623bc5dcf7f8c44b13c7496a590bdc157f941a43"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.61",
"syn 2.0.63",
"synstructure 0.13.1",
]
@ -962,7 +962,7 @@ dependencies = [
[[package]]
name = "derive-docs"
version = "0.1.17"
version = "0.1.18"
dependencies = [
"Inflector",
"anyhow",
@ -976,7 +976,7 @@ dependencies = [
"rustfmt-wrapper",
"serde",
"serde_tokenstream",
"syn 2.0.61",
"syn 2.0.63",
]
[[package]]
@ -988,7 +988,7 @@ dependencies = [
"diesel_table_macro_syntax",
"proc-macro2",
"quote",
"syn 2.0.61",
"syn 2.0.63",
]
[[package]]
@ -997,7 +997,7 @@ version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc5557efc453706fed5e4fa85006fe9817c224c3f480a34c7e5959fd700921c5"
dependencies = [
"syn 2.0.61",
"syn 2.0.63",
]
[[package]]
@ -1026,7 +1026,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.61",
"syn 2.0.63",
]
[[package]]
@ -1108,7 +1108,7 @@ checksum = "03cdc46ec28bd728e67540c528013c6a10eb69a02eb31078a1bda695438cbfb8"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.61",
"syn 2.0.63",
]
[[package]]
@ -1325,7 +1325,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.61",
"syn 2.0.63",
]
[[package]]
@ -1429,21 +1429,21 @@ dependencies = [
[[package]]
name = "gltf-derive"
version = "1.4.0"
version = "1.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "438ffe1a5540d75403feaf23636b164e816e93f6f03131674722b3886ce32a57"
checksum = "14070e711538afba5d6c807edb74bcb84e5dbb9211a3bf5dea0dfab5b24f4c51"
dependencies = [
"inflections",
"proc-macro2",
"quote",
"syn 2.0.61",
"syn 2.0.63",
]
[[package]]
name = "gltf-json"
version = "1.4.0"
version = "1.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "655951ba557f2bc69ea4b0799446bae281fa78efae6319968bdd2c3e9a06d8e1"
checksum = "e6176f9d60a7eab0a877e8e96548605dedbde9190a7ae1e80bbcc1c9af03ab14"
dependencies = [
"gltf-derive",
"serde",
@ -1959,7 +1959,7 @@ dependencies = [
"pretty_assertions",
"proc-macro2",
"quote",
"syn 2.0.61",
"syn 2.0.63",
]
[[package]]
@ -2032,7 +2032,7 @@ checksum = "0611fc9b9786175da21d895ffa0f65039e19c9111e94a41b7af999e3b95f045f"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.61",
"syn 2.0.63",
]
[[package]]
@ -2083,7 +2083,7 @@ checksum = "385775cc9d5bf25579f3029824ca1a6e7ab1b7c338e972ec8e8fcefff801f353"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.61",
"syn 2.0.63",
]
[[package]]
@ -2457,7 +2457,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.61",
"syn 2.0.63",
]
[[package]]
@ -2614,7 +2614,7 @@ dependencies = [
"regex",
"regex-syntax 0.7.5",
"structmeta 0.2.0",
"syn 2.0.61",
"syn 2.0.63",
]
[[package]]
@ -2628,7 +2628,7 @@ dependencies = [
"regex",
"regex-syntax 0.8.2",
"structmeta 0.3.0",
"syn 2.0.61",
"syn 2.0.63",
]
[[package]]
@ -2694,7 +2694,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.61",
"syn 2.0.63",
]
[[package]]
@ -3443,7 +3443,7 @@ dependencies = [
"proc-macro2",
"quote",
"serde_derive_internals",
"syn 2.0.61",
"syn 2.0.63",
]
[[package]]
@ -3543,7 +3543,7 @@ checksum = "c5e405930b9796f1c00bee880d03fc7e0bb4b9a11afc776885ffe84320da2865"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.61",
"syn 2.0.63",
]
[[package]]
@ -3554,7 +3554,7 @@ checksum = "330f01ce65a3a5fe59a60c82f3c9a024b573b8a6e875bd233fe5f934e71d54e3"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.61",
"syn 2.0.63",
]
[[package]]
@ -3577,7 +3577,7 @@ checksum = "0b2e6b945e9d3df726b65d6ee24060aff8e3533d431f677a9695db04eff9dfdb"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.61",
"syn 2.0.63",
]
[[package]]
@ -3598,7 +3598,7 @@ dependencies = [
"proc-macro2",
"quote",
"serde",
"syn 2.0.61",
"syn 2.0.63",
]
[[package]]
@ -3773,7 +3773,7 @@ dependencies = [
"proc-macro2",
"quote",
"structmeta-derive 0.2.0",
"syn 2.0.61",
"syn 2.0.63",
]
[[package]]
@ -3785,7 +3785,7 @@ dependencies = [
"proc-macro2",
"quote",
"structmeta-derive 0.3.0",
"syn 2.0.61",
"syn 2.0.63",
]
[[package]]
@ -3796,7 +3796,7 @@ checksum = "a60bcaff7397072dca0017d1db428e30d5002e00b6847703e2e42005c95fbe00"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.61",
"syn 2.0.63",
]
[[package]]
@ -3807,7 +3807,7 @@ checksum = "152a0b65a590ff6c3da95cabe2353ee04e6167c896b28e3b14478c2636c922fc"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.61",
"syn 2.0.63",
]
[[package]]
@ -3879,9 +3879,9 @@ dependencies = [
[[package]]
name = "syn"
version = "2.0.61"
version = "2.0.63"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c993ed8ccba56ae856363b1845da7266a7cb78e1d146c8a32d54b45a8b831fc9"
checksum = "bf5be731623ca1a1fb7d8be6f261a3be6d3e2337b8a1f97be944d020c8fcb704"
dependencies = [
"proc-macro2",
"quote",
@ -3914,7 +3914,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.61",
"syn 2.0.63",
]
[[package]]
@ -4015,7 +4015,7 @@ checksum = "e2470041c06ec3ac1ab38d0356a6119054dedaea53e12fbefc0de730a1c08524"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.61",
"syn 2.0.63",
]
[[package]]
@ -4122,7 +4122,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.61",
"syn 2.0.63",
]
[[package]]
@ -4285,7 +4285,7 @@ checksum = "84fd902d4e0b9a4b27f2f440108dc034e1758628a9b702f8ec61ad66355422fa"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.61",
"syn 2.0.63",
]
[[package]]
@ -4313,7 +4313,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.61",
"syn 2.0.63",
]
[[package]]
@ -4390,7 +4390,7 @@ dependencies = [
"Inflector",
"proc-macro2",
"quote",
"syn 2.0.61",
"syn 2.0.63",
"termcolor",
]
@ -4586,7 +4586,7 @@ dependencies = [
"proc-macro-error",
"proc-macro2",
"quote",
"syn 2.0.61",
"syn 2.0.63",
]
[[package]]
@ -4662,7 +4662,7 @@ dependencies = [
"once_cell",
"proc-macro2",
"quote",
"syn 2.0.61",
"syn 2.0.63",
"wasm-bindgen-shared",
]
@ -4697,7 +4697,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.61",
"syn 2.0.63",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
@ -5269,7 +5269,7 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.61",
"syn 2.0.63",
]
[[package]]
@ -5289,7 +5289,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.61",
"syn 2.0.63",
]
[[package]]

View File

@ -1,7 +1,7 @@
[package]
name = "derive-docs"
description = "A tool for generating documentation from Rust derive macros"
version = "0.1.17"
version = "0.1.18"
edition = "2021"
license = "MIT"
repository = "https://github.com/KittyCAD/modeling-app"
@ -20,7 +20,7 @@ quote = "1"
regex = "1.10"
serde = { version = "1.0.201", features = ["derive"] }
serde_tokenstream = "0.2"
syn = { version = "2.0.61", features = ["full"] }
syn = { version = "2.0.63", features = ["full"] }
[dev-dependencies]
anyhow = "1.0.83"

View File

@ -738,6 +738,7 @@ fn generate_code_block_test(
tags: &[String],
) -> proc_macro2::TokenStream {
let test_name = format_ident!("serial_test_example_{}{}", fn_name, index);
let test_name_mock = format_ident!("test_mock_example_{}{}", fn_name, index);
let test_name_str = format!("serial_test_example_{}{}", fn_name, index);
// TODO: We ignore import for now, because the files don't exist and we just want
@ -749,6 +750,23 @@ fn generate_code_block_test(
};
quote! {
#[tokio::test(flavor = "multi_thread")]
#ignored
async fn #test_name_mock() {
let tokens = crate::token::lexer(#code_block).unwrap();
let parser = crate::parser::Parser::new(tokens);
let program = parser.ast().unwrap();
let ctx = crate::executor::ExecutorContext {
engine: std::sync::Arc::new(Box::new(crate::engine::conn_mock::EngineConnection::new().await.unwrap())),
fs: std::sync::Arc::new(crate::fs::FileManager::new()),
stdlib: std::sync::Arc::new(crate::std::StdLib::new()),
settings: Default::default(),
is_mock: true,
};
ctx.run(program, None).await.unwrap();
}
#[tokio::test(flavor = "multi_thread", worker_threads = 5)]
#ignored
async fn #test_name() {

View File

@ -1,5 +1,24 @@
#[cfg(test)]
mod test_examples_show {
#[tokio::test(flavor = "multi_thread")]
async fn test_mock_example_show0() {
let tokens = crate::token::lexer("This is another code block.\nyes sirrr.\nshow").unwrap();
let parser = crate::parser::Parser::new(tokens);
let program = parser.ast().unwrap();
let ctx = crate::executor::ExecutorContext {
engine: std::sync::Arc::new(Box::new(
crate::engine::conn_mock::EngineConnection::new()
.await
.unwrap(),
)),
fs: std::sync::Arc::new(crate::fs::FileManager::new()),
stdlib: std::sync::Arc::new(crate::std::StdLib::new()),
settings: Default::default(),
is_mock: true,
};
ctx.run(program, None).await.unwrap();
}
#[tokio::test(flavor = "multi_thread", worker_threads = 5)]
async fn serial_test_example_show0() {
let user_agent = concat!(env!("CARGO_PKG_NAME"), ".rs/", env!("CARGO_PKG_VERSION"),);
@ -71,6 +90,25 @@ mod test_examples_show {
);
}
#[tokio::test(flavor = "multi_thread")]
async fn test_mock_example_show1() {
let tokens = crate::token::lexer("This is code.\nIt does other shit.\nshow").unwrap();
let parser = crate::parser::Parser::new(tokens);
let program = parser.ast().unwrap();
let ctx = crate::executor::ExecutorContext {
engine: std::sync::Arc::new(Box::new(
crate::engine::conn_mock::EngineConnection::new()
.await
.unwrap(),
)),
fs: std::sync::Arc::new(crate::fs::FileManager::new()),
stdlib: std::sync::Arc::new(crate::std::StdLib::new()),
settings: Default::default(),
is_mock: true,
};
ctx.run(program, None).await.unwrap();
}
#[tokio::test(flavor = "multi_thread", worker_threads = 5)]
async fn serial_test_example_show1() {
let user_agent = concat!(env!("CARGO_PKG_NAME"), ".rs/", env!("CARGO_PKG_VERSION"),);

View File

@ -1,5 +1,24 @@
#[cfg(test)]
mod test_examples_show {
#[tokio::test(flavor = "multi_thread")]
async fn test_mock_example_show0() {
let tokens = crate::token::lexer("This is code.\nIt does other shit.\nshow").unwrap();
let parser = crate::parser::Parser::new(tokens);
let program = parser.ast().unwrap();
let ctx = crate::executor::ExecutorContext {
engine: std::sync::Arc::new(Box::new(
crate::engine::conn_mock::EngineConnection::new()
.await
.unwrap(),
)),
fs: std::sync::Arc::new(crate::fs::FileManager::new()),
stdlib: std::sync::Arc::new(crate::std::StdLib::new()),
settings: Default::default(),
is_mock: true,
};
ctx.run(program, None).await.unwrap();
}
#[tokio::test(flavor = "multi_thread", worker_threads = 5)]
async fn serial_test_example_show0() {
let user_agent = concat!(env!("CARGO_PKG_NAME"), ".rs/", env!("CARGO_PKG_VERSION"),);

View File

@ -1,5 +1,25 @@
#[cfg(test)]
mod test_examples_my_func {
#[tokio::test(flavor = "multi_thread")]
async fn test_mock_example_my_func0() {
let tokens =
crate::token::lexer("This is another code block.\nyes sirrr.\nmyFunc").unwrap();
let parser = crate::parser::Parser::new(tokens);
let program = parser.ast().unwrap();
let ctx = crate::executor::ExecutorContext {
engine: std::sync::Arc::new(Box::new(
crate::engine::conn_mock::EngineConnection::new()
.await
.unwrap(),
)),
fs: std::sync::Arc::new(crate::fs::FileManager::new()),
stdlib: std::sync::Arc::new(crate::std::StdLib::new()),
settings: Default::default(),
is_mock: true,
};
ctx.run(program, None).await.unwrap();
}
#[tokio::test(flavor = "multi_thread", worker_threads = 5)]
async fn serial_test_example_my_func0() {
let user_agent = concat!(env!("CARGO_PKG_NAME"), ".rs/", env!("CARGO_PKG_VERSION"),);
@ -72,6 +92,25 @@ mod test_examples_my_func {
);
}
#[tokio::test(flavor = "multi_thread")]
async fn test_mock_example_my_func1() {
let tokens = crate::token::lexer("This is code.\nIt does other shit.\nmyFunc").unwrap();
let parser = crate::parser::Parser::new(tokens);
let program = parser.ast().unwrap();
let ctx = crate::executor::ExecutorContext {
engine: std::sync::Arc::new(Box::new(
crate::engine::conn_mock::EngineConnection::new()
.await
.unwrap(),
)),
fs: std::sync::Arc::new(crate::fs::FileManager::new()),
stdlib: std::sync::Arc::new(crate::std::StdLib::new()),
settings: Default::default(),
is_mock: true,
};
ctx.run(program, None).await.unwrap();
}
#[tokio::test(flavor = "multi_thread", worker_threads = 5)]
async fn serial_test_example_my_func1() {
let user_agent = concat!(env!("CARGO_PKG_NAME"), ".rs/", env!("CARGO_PKG_VERSION"),);

View File

@ -1,5 +1,26 @@
#[cfg(test)]
mod test_examples_import {
#[tokio::test(flavor = "multi_thread")]
#[ignore]
async fn test_mock_example_import0() {
let tokens =
crate::token::lexer("This is another code block.\nyes sirrr.\nimport").unwrap();
let parser = crate::parser::Parser::new(tokens);
let program = parser.ast().unwrap();
let ctx = crate::executor::ExecutorContext {
engine: std::sync::Arc::new(Box::new(
crate::engine::conn_mock::EngineConnection::new()
.await
.unwrap(),
)),
fs: std::sync::Arc::new(crate::fs::FileManager::new()),
stdlib: std::sync::Arc::new(crate::std::StdLib::new()),
settings: Default::default(),
is_mock: true,
};
ctx.run(program, None).await.unwrap();
}
#[tokio::test(flavor = "multi_thread", worker_threads = 5)]
#[ignore]
async fn serial_test_example_import0() {
@ -73,6 +94,26 @@ mod test_examples_import {
);
}
#[tokio::test(flavor = "multi_thread")]
#[ignore]
async fn test_mock_example_import1() {
let tokens = crate::token::lexer("This is code.\nIt does other shit.\nimport").unwrap();
let parser = crate::parser::Parser::new(tokens);
let program = parser.ast().unwrap();
let ctx = crate::executor::ExecutorContext {
engine: std::sync::Arc::new(Box::new(
crate::engine::conn_mock::EngineConnection::new()
.await
.unwrap(),
)),
fs: std::sync::Arc::new(crate::fs::FileManager::new()),
stdlib: std::sync::Arc::new(crate::std::StdLib::new()),
settings: Default::default(),
is_mock: true,
};
ctx.run(program, None).await.unwrap();
}
#[tokio::test(flavor = "multi_thread", worker_threads = 5)]
#[ignore]
async fn serial_test_example_import1() {

View File

@ -1,5 +1,25 @@
#[cfg(test)]
mod test_examples_line_to {
#[tokio::test(flavor = "multi_thread")]
async fn test_mock_example_line_to0() {
let tokens =
crate::token::lexer("This is another code block.\nyes sirrr.\nlineTo").unwrap();
let parser = crate::parser::Parser::new(tokens);
let program = parser.ast().unwrap();
let ctx = crate::executor::ExecutorContext {
engine: std::sync::Arc::new(Box::new(
crate::engine::conn_mock::EngineConnection::new()
.await
.unwrap(),
)),
fs: std::sync::Arc::new(crate::fs::FileManager::new()),
stdlib: std::sync::Arc::new(crate::std::StdLib::new()),
settings: Default::default(),
is_mock: true,
};
ctx.run(program, None).await.unwrap();
}
#[tokio::test(flavor = "multi_thread", worker_threads = 5)]
async fn serial_test_example_line_to0() {
let user_agent = concat!(env!("CARGO_PKG_NAME"), ".rs/", env!("CARGO_PKG_VERSION"),);
@ -72,6 +92,25 @@ mod test_examples_line_to {
);
}
#[tokio::test(flavor = "multi_thread")]
async fn test_mock_example_line_to1() {
let tokens = crate::token::lexer("This is code.\nIt does other shit.\nlineTo").unwrap();
let parser = crate::parser::Parser::new(tokens);
let program = parser.ast().unwrap();
let ctx = crate::executor::ExecutorContext {
engine: std::sync::Arc::new(Box::new(
crate::engine::conn_mock::EngineConnection::new()
.await
.unwrap(),
)),
fs: std::sync::Arc::new(crate::fs::FileManager::new()),
stdlib: std::sync::Arc::new(crate::std::StdLib::new()),
settings: Default::default(),
is_mock: true,
};
ctx.run(program, None).await.unwrap();
}
#[tokio::test(flavor = "multi_thread", worker_threads = 5)]
async fn serial_test_example_line_to1() {
let user_agent = concat!(env!("CARGO_PKG_NAME"), ".rs/", env!("CARGO_PKG_VERSION"),);

View File

@ -1,5 +1,24 @@
#[cfg(test)]
mod test_examples_min {
#[tokio::test(flavor = "multi_thread")]
async fn test_mock_example_min0() {
let tokens = crate::token::lexer("This is another code block.\nyes sirrr.\nmin").unwrap();
let parser = crate::parser::Parser::new(tokens);
let program = parser.ast().unwrap();
let ctx = crate::executor::ExecutorContext {
engine: std::sync::Arc::new(Box::new(
crate::engine::conn_mock::EngineConnection::new()
.await
.unwrap(),
)),
fs: std::sync::Arc::new(crate::fs::FileManager::new()),
stdlib: std::sync::Arc::new(crate::std::StdLib::new()),
settings: Default::default(),
is_mock: true,
};
ctx.run(program, None).await.unwrap();
}
#[tokio::test(flavor = "multi_thread", worker_threads = 5)]
async fn serial_test_example_min0() {
let user_agent = concat!(env!("CARGO_PKG_NAME"), ".rs/", env!("CARGO_PKG_VERSION"),);
@ -71,6 +90,25 @@ mod test_examples_min {
);
}
#[tokio::test(flavor = "multi_thread")]
async fn test_mock_example_min1() {
let tokens = crate::token::lexer("This is code.\nIt does other shit.\nmin").unwrap();
let parser = crate::parser::Parser::new(tokens);
let program = parser.ast().unwrap();
let ctx = crate::executor::ExecutorContext {
engine: std::sync::Arc::new(Box::new(
crate::engine::conn_mock::EngineConnection::new()
.await
.unwrap(),
)),
fs: std::sync::Arc::new(crate::fs::FileManager::new()),
stdlib: std::sync::Arc::new(crate::std::StdLib::new()),
settings: Default::default(),
is_mock: true,
};
ctx.run(program, None).await.unwrap();
}
#[tokio::test(flavor = "multi_thread", worker_threads = 5)]
async fn serial_test_example_min1() {
let user_agent = concat!(env!("CARGO_PKG_NAME"), ".rs/", env!("CARGO_PKG_VERSION"),);

View File

@ -1,5 +1,24 @@
#[cfg(test)]
mod test_examples_show {
#[tokio::test(flavor = "multi_thread")]
async fn test_mock_example_show0() {
let tokens = crate::token::lexer("This is code.\nIt does other shit.\nshow").unwrap();
let parser = crate::parser::Parser::new(tokens);
let program = parser.ast().unwrap();
let ctx = crate::executor::ExecutorContext {
engine: std::sync::Arc::new(Box::new(
crate::engine::conn_mock::EngineConnection::new()
.await
.unwrap(),
)),
fs: std::sync::Arc::new(crate::fs::FileManager::new()),
stdlib: std::sync::Arc::new(crate::std::StdLib::new()),
settings: Default::default(),
is_mock: true,
};
ctx.run(program, None).await.unwrap();
}
#[tokio::test(flavor = "multi_thread", worker_threads = 5)]
async fn serial_test_example_show0() {
let user_agent = concat!(env!("CARGO_PKG_NAME"), ".rs/", env!("CARGO_PKG_VERSION"),);

View File

@ -1,5 +1,24 @@
#[cfg(test)]
mod test_examples_import {
#[tokio::test(flavor = "multi_thread")]
async fn test_mock_example_import0() {
let tokens = crate::token::lexer("This is code.\nIt does other shit.\nimport").unwrap();
let parser = crate::parser::Parser::new(tokens);
let program = parser.ast().unwrap();
let ctx = crate::executor::ExecutorContext {
engine: std::sync::Arc::new(Box::new(
crate::engine::conn_mock::EngineConnection::new()
.await
.unwrap(),
)),
fs: std::sync::Arc::new(crate::fs::FileManager::new()),
stdlib: std::sync::Arc::new(crate::std::StdLib::new()),
settings: Default::default(),
is_mock: true,
};
ctx.run(program, None).await.unwrap();
}
#[tokio::test(flavor = "multi_thread", worker_threads = 5)]
async fn serial_test_example_import0() {
let user_agent = concat!(env!("CARGO_PKG_NAME"), ".rs/", env!("CARGO_PKG_VERSION"),);

View File

@ -1,5 +1,24 @@
#[cfg(test)]
mod test_examples_import {
#[tokio::test(flavor = "multi_thread")]
async fn test_mock_example_import0() {
let tokens = crate::token::lexer("This is code.\nIt does other shit.\nimport").unwrap();
let parser = crate::parser::Parser::new(tokens);
let program = parser.ast().unwrap();
let ctx = crate::executor::ExecutorContext {
engine: std::sync::Arc::new(Box::new(
crate::engine::conn_mock::EngineConnection::new()
.await
.unwrap(),
)),
fs: std::sync::Arc::new(crate::fs::FileManager::new()),
stdlib: std::sync::Arc::new(crate::std::StdLib::new()),
settings: Default::default(),
is_mock: true,
};
ctx.run(program, None).await.unwrap();
}
#[tokio::test(flavor = "multi_thread", worker_threads = 5)]
async fn serial_test_example_import0() {
let user_agent = concat!(env!("CARGO_PKG_NAME"), ".rs/", env!("CARGO_PKG_VERSION"),);

View File

@ -1,5 +1,24 @@
#[cfg(test)]
mod test_examples_import {
#[tokio::test(flavor = "multi_thread")]
async fn test_mock_example_import0() {
let tokens = crate::token::lexer("This is code.\nIt does other shit.\nimport").unwrap();
let parser = crate::parser::Parser::new(tokens);
let program = parser.ast().unwrap();
let ctx = crate::executor::ExecutorContext {
engine: std::sync::Arc::new(Box::new(
crate::engine::conn_mock::EngineConnection::new()
.await
.unwrap(),
)),
fs: std::sync::Arc::new(crate::fs::FileManager::new()),
stdlib: std::sync::Arc::new(crate::std::StdLib::new()),
settings: Default::default(),
is_mock: true,
};
ctx.run(program, None).await.unwrap();
}
#[tokio::test(flavor = "multi_thread", worker_threads = 5)]
async fn serial_test_example_import0() {
let user_agent = concat!(env!("CARGO_PKG_NAME"), ".rs/", env!("CARGO_PKG_VERSION"),);

View File

@ -1,5 +1,24 @@
#[cfg(test)]
mod test_examples_show {
#[tokio::test(flavor = "multi_thread")]
async fn test_mock_example_show0() {
let tokens = crate::token::lexer("This is code.\nIt does other shit.\nshow").unwrap();
let parser = crate::parser::Parser::new(tokens);
let program = parser.ast().unwrap();
let ctx = crate::executor::ExecutorContext {
engine: std::sync::Arc::new(Box::new(
crate::engine::conn_mock::EngineConnection::new()
.await
.unwrap(),
)),
fs: std::sync::Arc::new(crate::fs::FileManager::new()),
stdlib: std::sync::Arc::new(crate::std::StdLib::new()),
settings: Default::default(),
is_mock: true,
};
ctx.run(program, None).await.unwrap();
}
#[tokio::test(flavor = "multi_thread", worker_threads = 5)]
async fn serial_test_example_show0() {
let user_agent = concat!(env!("CARGO_PKG_NAME"), ".rs/", env!("CARGO_PKG_VERSION"),);

View File

@ -15,7 +15,7 @@ databake = "0.1.7"
kcl-lib = { path = "../kcl" }
proc-macro2 = "1"
quote = "1"
syn = { version = "2.0.61", features = ["full"] }
syn = { version = "2.0.63", features = ["full"] }
[dev-dependencies]
pretty_assertions = "1.4.0"

View File

@ -19,11 +19,11 @@ chrono = "0.4.38"
clap = { version = "4.5.4", default-features = false, optional = true }
dashmap = "5.5.3"
databake = { version = "0.1.7", features = ["derive"] }
derive-docs = { version = "0.1.17", path = "../derive-docs" }
derive-docs = { version = "0.1.18", path = "../derive-docs" }
form_urlencoded = "1.2.1"
futures = { version = "0.3.30" }
git_rev = "0.1.0"
gltf-json = "1.4.0"
gltf-json = "1.4.1"
kittycad = { workspace = true, features = ["clap"] }
kittycad-execution-plan-macros = { workspace = true }
kittycad-execution-plan-traits = { workspace = true }

View File

@ -1413,7 +1413,7 @@ mod tests {
fs: Arc::new(crate::fs::FileManager::new()),
stdlib: Arc::new(crate::std::StdLib::new()),
settings: Default::default(),
is_mock: false,
is_mock: true,
};
let memory = ctx.run(program, None).await?;

View File

@ -124,8 +124,9 @@ impl Configuration {
let mut entries = tokio::fs::read_dir(main_dir).await?;
while let Some(e) = entries.next_entry().await? {
if !e.file_type().await?.is_dir() {
// We don't care it's not a directory.
if !e.file_type().await?.is_dir() || e.file_name().to_string_lossy().starts_with('.') {
// We don't care it's not a directory
// or it's a hidden directory.
continue;
}

View File

@ -29,13 +29,46 @@ pub async fn extrude(args: Args) -> Result<MemoryItem, KclError> {
/// Extrudes by a given amount.
///
/// ```no_run
/// startSketchOn('XY')
/// |> startProfileAt([0, 0], %)
/// |> line([0, 10], %)
/// |> line([10, 0], %)
/// |> line([0, -10], %)
/// |> close(%)
/// |> extrude(5, %)
/// const example = startSketchOn('-XZ')
/// |> startProfileAt([0, 0], %)
/// |> line([10, 0], %)
/// |> arc({
/// angle_end: 0,
/// angle_start: 120,
/// radius: 5,
/// }, %)
/// |> line([5, 0], %)
/// |> line([0, 10], %)
/// |> bezierCurve({
/// control1: [-10, 0],
/// control2: [2, 10],
/// to: [-5, 10],
/// }, %)
/// |> line([-5, -2], %)
/// |> close(%)
/// |> extrude(10, %)
/// ```
///
/// ```no_run
/// const exampleSketch = startSketchOn('-XZ')
/// |> startProfileAt([-10, 0], %)
/// |> arc({
/// angle_end: -60,
/// angle_start: 120,
/// radius: 5,
/// }, %)
/// |> line([10, 0], %)
/// |> line([5, 0], %)
/// |> bezierCurve({
/// control1: [-3, 0],
/// control2: [2, 10],
/// to: [-5, 10],
/// }, %)
/// |> line([-4, 10], %)
/// |> line([-5, -2], %)
/// |> close(%)
///
/// const example = extrude(10, exampleSketch)
/// ```
#[stdlib {
name = "extrude"

View File

@ -48,14 +48,28 @@ pub async fn fillet(args: Args) -> Result<MemoryItem, KclError> {
/// Create fillets on tagged paths.
///
/// ```no_run
/// const part001 = startSketchOn('XY')
/// |> startProfileAt([0,0], %)
/// |> line([0, 10], %, "thing")
/// |> line([10, 0], %)
/// |> line([0, -10], %, "thing2")
/// |> close(%)
/// |> extrude(10, %)
/// |> fillet({radius: 2, tags: ["thing", "thing2"]}, %)
/// const width = 20
/// const length = 10
/// const thickness = 1
/// const filletRadius = 2
///
/// const mountingPlateSketch = startSketchOn("XY")
/// |> startProfileAt([-width/2, -length/2], %)
/// |> lineTo([width/2, -length/2], %, 'edge1')
/// |> lineTo([width/2, length/2], %, 'edge2')
/// |> lineTo([-width/2, length/2], %, 'edge3')
/// |> close(%, 'edge4')
///
/// const mountingPlate = extrude(thickness, mountingPlateSketch)
/// |> fillet({
/// radius: filletRadius,
/// tags: [
/// getNextAdjacentEdge('edge1', %),
/// getNextAdjacentEdge('edge2', %),
/// getNextAdjacentEdge('edge3', %),
/// getNextAdjacentEdge('edge4', %)
/// ],
/// }, %)
/// ```
#[stdlib {
name = "fillet",
@ -130,19 +144,37 @@ pub async fn get_opposite_edge(args: Args) -> Result<MemoryItem, KclError> {
/// Get the opposite edge to the edge given.
///
/// ```no_run
/// const part001 = startSketchOn('XY')
/// |> startProfileAt([0,0], %)
/// |> line([0, 10], %, "thing")
/// |> line([10, 0], %)
/// |> line([0, -10], %, "thing2")
/// |> close(%)
/// |> extrude(10, %)
/// |> fillet({radius: 2, tags: ["thing", getOppositeEdge("thing", %)]}, %)
/// const exampleSketch = startSketchOn('XZ')
/// |> startProfileAt([0, 0], %)
/// |> line([10, 0], %)
/// |> angledLine({
/// angle: 60,
/// length: 10,
/// }, %)
/// |> angledLine({
/// angle: 120,
/// length: 10,
/// }, %)
/// |> line([-10, 0], %)
/// |> angledLine({
/// angle: 240,
/// length: 10,
/// }, %, 'referenceEdge')
/// |> close(%)
///
/// const example = extrude(5, exampleSketch)
/// |> fillet({
/// radius: 3,
/// tags: [getOppositeEdge("referenceEdge", %)],
/// }, %)
/// ```
#[stdlib {
name = "getOppositeEdge",
}]
async fn inner_get_opposite_edge(tag: String, extrude_group: Box<ExtrudeGroup>, args: Args) -> Result<Uuid, KclError> {
if args.ctx.is_mock {
return Ok(Uuid::new_v4());
}
let tagged_path = extrude_group
.sketch_group_values
.iter()
@ -199,14 +231,29 @@ pub async fn get_next_adjacent_edge(args: Args) -> Result<MemoryItem, KclError>
/// Get the next adjacent edge to the edge given.
///
/// ```no_run
/// const part001 = startSketchOn('XY')
/// |> startProfileAt([0,0], %)
/// |> line([0, 10], %, "thing")
/// |> line([10, 0], %, "thing1")
/// |> line([0, -10], %, "thing2")
/// |> close(%, "thing3")
/// |> extrude(10, %)
/// |> fillet({radius: 2, tags: [getNextAdjacentEdge("thing3", %)]}, %)
/// const exampleSketch = startSketchOn('XZ')
/// |> startProfileAt([0, 0], %)
/// |> line([10, 0], %)
/// |> angledLine({
/// angle: 60,
/// length: 10,
/// }, %)
/// |> angledLine({
/// angle: 120,
/// length: 10,
/// }, %)
/// |> line([-10, 0], %)
/// |> angledLine({
/// angle: 240,
/// length: 10,
/// }, %, 'referenceEdge')
/// |> close(%)
///
/// const example = extrude(5, exampleSketch)
/// |> fillet({
/// radius: 3,
/// tags: [getNextAdjacentEdge("referenceEdge", %)],
/// }, %)
/// ```
#[stdlib {
name = "getNextAdjacentEdge",
@ -216,6 +263,9 @@ async fn inner_get_next_adjacent_edge(
extrude_group: Box<ExtrudeGroup>,
args: Args,
) -> Result<Uuid, KclError> {
if args.ctx.is_mock {
return Ok(Uuid::new_v4());
}
let tagged_path = extrude_group
.sketch_group_values
.iter()
@ -277,14 +327,29 @@ pub async fn get_previous_adjacent_edge(args: Args) -> Result<MemoryItem, KclErr
/// Get the previous adjacent edge to the edge given.
///
/// ```no_run
/// const part001 = startSketchOn('XY')
/// |> startProfileAt([0,0], %)
/// |> line([0, 10], %, "thing")
/// |> line([10, 0], %, "thing1")
/// |> line([0, -10], %, "thing2")
/// |> close(%, "thing3")
/// |> extrude(10, %)
/// |> fillet({radius: 2, tags: [getPreviousAdjacentEdge("thing3", %)]}, %)
/// const exampleSketch = startSketchOn('XZ')
/// |> startProfileAt([0, 0], %)
/// |> line([10, 0], %)
/// |> angledLine({
/// angle: 60,
/// length: 10,
/// }, %)
/// |> angledLine({
/// angle: 120,
/// length: 10,
/// }, %)
/// |> line([-10, 0], %)
/// |> angledLine({
/// angle: 240,
/// length: 10,
/// }, %, 'referenceEdge')
/// |> close(%)
///
/// const example = extrude(5, exampleSketch)
/// |> fillet({
/// radius: 3,
/// tags: [getPreviousAdjacentEdge("referenceEdge", %)],
/// }, %)
/// ```
#[stdlib {
name = "getPreviousAdjacentEdge",
@ -294,6 +359,9 @@ async fn inner_get_previous_adjacent_edge(
extrude_group: Box<ExtrudeGroup>,
args: Args,
) -> Result<Uuid, KclError> {
if args.ctx.is_mock {
return Ok(Uuid::new_v4());
}
let tagged_path = extrude_group
.sketch_group_values
.iter()

View File

@ -41,9 +41,14 @@ pub async fn helix(args: Args) -> Result<MemoryItem, KclError> {
///
/// ```no_run
/// const part001 = startSketchOn('XY')
/// |> circle([5, 5], 10, %)
/// |> extrude(10, %)
/// |> helix({revolutions: 16, angle_start: 0}, %)
/// |> circle([5, 5], 10, %)
/// |> extrude(10, %)
/// |> helix({
/// angle_start: 0,
/// ccw: true,
/// revolutions: 16,
/// angle_start: 0
/// }, %)
/// ```
#[stdlib {
name = "helix",

View File

@ -268,6 +268,14 @@ async fn inner_import(
}
}
if args.ctx.is_mock {
return Ok(ImportedGeometry {
id: uuid::Uuid::new_v4(),
value: import_files.iter().map(|f| f.path.to_string()).collect(),
meta: vec![args.source_range.into()],
});
}
let id = uuid::Uuid::new_v4();
let resp = args
.send_modeling_cmd(

View File

@ -125,7 +125,23 @@ pub async fn abs(args: Args) -> Result<MemoryItem, KclError> {
/// Computes the absolute value of a number.
///
/// ```no_run
/// const myVar = abs(-4)
/// const myAngle = -120
///
/// const sketch001 = startSketchOn('-XZ')
/// |> startProfileAt([0, 0], %)
/// |> line([8, 0], %)
/// |> angledLine({
/// angle: abs(myAngle),
/// length: 5,
/// }, %)
/// |> line([-5, 0], %)
/// |> angledLine({
/// angle: myAngle,
/// length: 5,
/// }, %)
/// |> close(%)
///
/// const baseExtrusion = extrude(5, sketch001)
/// ```
#[stdlib {
name = "abs",

View File

@ -1077,10 +1077,9 @@ layout: manual
fn_docs.push_str(example);
fn_docs.push_str("\n```\n\n");
// If this is not a "math" or "utilities" function,
// If this is not a "utilities" function,
// we should add the image to the docs.
if !internal_fn.tags().contains(&"math".to_string())
&& !internal_fn.tags().contains(&"utilities".to_string())
if !internal_fn.tags().contains(&"utilities".to_string())
&& !internal_fn.tags().contains(&"norun".to_string())
{
// Get the path to this specific rust file.
@ -1101,6 +1100,8 @@ layout: manual
fn_name = "segment_length".to_string();
} else if fn_name.starts_with("seg_") {
fn_name = fn_name.replace("seg_", "segment_");
} else if fn_name.starts_with("log_") {
fn_name = fn_name.replace("log_", "log");
}
// Read the image file and encode as base64.

View File

@ -90,10 +90,15 @@ pub async fn pattern_linear_2d(args: Args) -> Result<MemoryItem, KclError> {
/// A linear pattern on a 2D sketch.
///
/// ```no_run
/// const part = startSketchOn('XY')
/// |> circle([0,0], 2, %)
/// |> patternLinear2d({axis: [0,1], repetitions: 12, distance: 2}, %)
/// |> extrude(1, %)
/// const exampleSketch = startSketchOn('-XZ')
/// |> circle([0, 0], 1, %)
/// |> patternLinear2d({
/// axis: [1, 0],
/// repetitions: 6,
/// distance: 4
/// }, %)
///
/// const example = extrude(1, exampleSketch)
/// ```
#[stdlib {
name = "patternLinear2d",
@ -108,6 +113,10 @@ async fn inner_pattern_linear_2d(
SketchGroupSet::SketchGroups(sketch_groups) => sketch_groups,
};
if args.ctx.is_mock {
return Ok(starting_sketch_groups);
}
let mut sketch_groups = Vec::new();
for sketch_group in starting_sketch_groups.iter() {
let geometries = pattern_linear(
@ -150,14 +159,19 @@ pub async fn pattern_linear_3d(args: Args) -> Result<MemoryItem, KclError> {
/// A linear pattern on a 3D model.
///
/// ```no_run
/// const part = startSketchOn('XY')
/// |> startProfileAt([0, 0], %)
/// |> line([0,1], %)
/// |> line([1, 0], %)
/// |> line([0, -1], %)
/// |> close(%)
/// |> extrude(1, %)
/// |> patternLinear3d({axis: [1, 0, 1], repetitions: 3, distance: 6}, %)
/// const exampleSketch = startSketchOn('-XZ')
/// |> startProfileAt([0, 0], %)
/// |> line([0, 2], %)
/// |> line([3, 1], %)
/// |> line([0, -4], %)
/// |> close(%)
///
/// const example = extrude(1, exampleSketch)
/// |> patternLinear3d({
/// axis: [1, 0, 1],
/// repetitions: 6,
/// distance: 6
/// }, %)
/// ```
#[stdlib {
name = "patternLinear3d",
@ -167,6 +181,10 @@ async fn inner_pattern_linear_3d(
extrude_group: Box<ExtrudeGroup>,
args: Args,
) -> Result<Vec<Box<ExtrudeGroup>>, KclError> {
if args.ctx.is_mock {
return Ok(vec![extrude_group.clone()]);
}
let geometries = pattern_linear(
LinearPattern::ThreeD(data),
Geometry::ExtrudeGroup(extrude_group),
@ -339,10 +357,20 @@ pub async fn pattern_circular_2d(args: Args) -> Result<MemoryItem, KclError> {
/// A circular pattern on a 2D sketch.
///
/// ```no_run
/// const part = startSketchOn('XY')
/// |> circle([0,0], 2, %)
/// |> patternCircular2d({center: [20, 20], repetitions: 12, arcDegrees: 210, rotateDuplicates: true}, %)
/// |> extrude(1, %)
/// const exampleSketch = startSketchOn('-XZ')
/// |> startProfileAt([.5, 25], %)
/// |> line([0, 5], %)
/// |> line([-1, 0], %)
/// |> line([0, -5], %)
/// |> close(%)
/// |> patternCircular2d({
/// center: [0, 0],
/// repetitions: 12,
/// arcDegrees: 360,
/// rotateDuplicates: true
/// }, %)
///
/// const example = extrude(1, exampleSketch)
/// ```
#[stdlib {
name = "patternCircular2d",
@ -352,6 +380,10 @@ async fn inner_pattern_circular_2d(
sketch_group: Box<SketchGroup>,
args: Args,
) -> Result<Vec<Box<SketchGroup>>, KclError> {
if args.ctx.is_mock {
return Ok(vec![sketch_group]);
}
let geometries = pattern_circular(
CircularPattern::TwoD(data),
Geometry::SketchGroup(sketch_group),
@ -380,14 +412,17 @@ pub async fn pattern_circular_3d(args: Args) -> Result<MemoryItem, KclError> {
/// A circular pattern on a 3D model.
///
/// ```no_run
/// const part = startSketchOn('XY')
/// |> startProfileAt([0, 0], %)
/// |> line([0,1], %)
/// |> line([1, 0], %)
/// |> line([0, -1], %)
/// |> close(%)
/// |> extrude(1, %)
/// |> patternCircular3d({axis: [1,1,0], center: [10, 0, 10], repetitions: 10, arcDegrees: 360, rotateDuplicates: true}, %)
/// const exampleSketch = startSketchOn('-XZ')
/// |> circle([0, 0], 1, %)
///
/// const example = extrude(-5, exampleSketch)
/// |> patternCircular3d({
/// axis: [1, -1, 0],
/// center: [10, -20, 0],
/// repetitions: 10,
/// arcDegrees: 360,
/// rotateDuplicates: true
/// }, %)
/// ```
#[stdlib {
name = "patternCircular3d",
@ -397,6 +432,10 @@ async fn inner_pattern_circular_3d(
extrude_group: Box<ExtrudeGroup>,
args: Args,
) -> Result<Vec<Box<ExtrudeGroup>>, KclError> {
if args.ctx.is_mock {
return Ok(vec![extrude_group]);
}
let geometries = pattern_circular(
CircularPattern::ThreeD(data),
Geometry::ExtrudeGroup(extrude_group),

Some files were not shown because too many files have changed in this diff Show More