Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KCL samples missing const keyword, don't work in Zoo Modeling App #262

Open
spoon16 opened this issue Oct 7, 2024 · 1 comment
Open

Comments

@spoon16
Copy link

spoon16 commented Oct 7, 2024

Missing const keywords from many of the code samples in the docs which means they don't work in the modeling app when copy and pasted.

For example see https://zoo.dev/docs/kcl/shell

This code (from the shell docs) doesn't work without modification when pasted into the Modeling App.

// Shell a sketch on face object on the end face.
size = 100
case = startSketchOn('XY')
  |> startProfileAt([-size, -size], %)
  |> line([2 * size, 0], %)
  |> line([0, 2 * size], %)
  |> tangentialArcTo([-size, size], %)
  |> close(%)
  |> extrude(65, %)

thing1 = startSketchOn(case, 'end')
  |> circle({
       center: [-size / 2, -size / 2],
       radius: 25
     }, %)
  |> extrude(50, %)

thing2 = startSketchOn(case, 'end')
  |> circle({
       center: [size / 2, -size / 2],
       radius: 25
     }, %)
  |> extrude(50, %)

// We put "thing1" in the shell function to shell the end face of the object.
shell({ faces: ['end'], thickness: 5 }, thing1)
@franknoirot
Copy link
Contributor

Thanks for filing @spoon16, we recently made those keywords optional in this PR but should have done a new version release of the app before we updated the docs! We're working to release v0.25.6 now, which once you receive that auto-update should allow you to use these new iterations of the KCL samples (and we actually added a command to be able to import samples directly without having to copy/paste).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants