Compare commits

...

17 Commits

Author SHA1 Message Date
6f86102b54 Fix the offsetPlane lint 2025-07-03 14:20:41 -05:00
052ebaee9b WIP 2025-07-03 13:54:21 -05:00
a948ab23cc Update snapshot tests 2025-07-03 12:26:24 -05:00
38275760e3 Fix Z axes 2025-07-03 12:04:37 -05:00
61cae3026e KCL: Track Z axis of planes
KCL should track which way a plane is facing. If it only tracks a plane's
X and Y axes, it could identify two separate planes (overlapping
perfectly in space, but one plane's "up" is the other's down).

This is helpful for knowing which way to extrude on a given plane, or
which way to cut "into" a given solid.
2025-07-03 11:28:49 -05:00
df6256266c [Chore] All api urls are now using the helper function (#7672)
* fix: logging information about the login

* chore: improving the withBaseURL workflow

* chore: moving VITE_KC_API_BASE_URL to the helper function

* fix: env to helper function api base url

* chore: fixing another api base url

* chore: shortlinks with base api helper function

* chore: prompt edit with base helper function

* fix: auto fmt

* fix: withAPIBaseURL for all urls

* fix: AI caught my typo, RIP

* fix: expected

* fix: renaming this so it is less specific to environment

---------

Co-authored-by: Jace Browning <jacebrowning@gmail.com>
2025-07-03 13:54:03 +00:00
e5d082f441 [Chore] Removing old confusing BASE_URL environment variable. (#7678)
chore: this is deprecated, we should be using the VITE_KC_*_BASE_URL workflows
2025-07-02 22:51:01 +00:00
d4d3e179b1 Update test data (#7674) 2025-07-02 15:04:03 -07:00
4f4c44e7c7 KCL: Getter for axes of planes (#7662)
## Goal

Currently, there's no way in KCL to get fields of a plane, e.g. the underlying X axis, Y axis or origin.

This would be useful for geometry calculations in KCL. It would help KCL users write transformations between planes for rotating geometry.

For example, this enables

```kcl
export fn crossProduct(@vectors) {
  a = vectors[0]
  b = vectors[1]
  x = a[1] * b[2] - (a[2] * b[1])
  y = a[2] * b[0] - (a[0] * b[2])
  z = a[0] * b[1] - (a[1] * b[0])
  return [x, y, z]
}

export fn normalOf(@plane) {
  return crossProduct([plane.xAxis, plane.yAxis])
}
```

## Implementation

My goal was just to enable a simple getter for planes, like `myPlane.xAxis` and yAxis and origins. That's nearly what happened, except I discovered that there's two ways to represent a plane: either `KclValue::Plane` or `KclValue::Object` with the right fields.

No matter which format your plane is represented as, it should behave consistently when you get its properties. Those properties should be returned as `[number; 3]` because that is how KCL represents points.

Unfortunately we actually require planes-as-objects to be defined with axes like `myPlane = { xAxis = { x = 1, y = 0, z = 0 }, ...}`, but that's a mistake in my opinion. So if you do use that representation of a plane, it should still return a [number; 3]. This required some futzing around so that we let you access object fields .x and .y as [0] and [1], which is weird, but whatever, I think it's good.

This PR is tested via planestuff.kcl which has a Rust unit test.

Part of the hole efforts, see https://github.com/KittyCAD/modeling-app/discussions/7543
2025-07-02 16:24:26 +00:00
1b75020686 Remove unused code to skip auth (#7280) 2025-07-02 14:49:34 +00:00
fba62dab98 Add parsing arrays and objects as binary operands (#7661)
* Add parsing arrays and objects as binary operands

* Add sim test showing the error message
2025-07-01 23:33:36 +00:00
a85a534d6b Release KCL 84 (#7653) 2025-07-01 15:15:35 -04:00
6ddbb7a31d Fix unknown property error message on sketches and solids (#7632)
* Fix unknown property error message on sketches and solids

* Add suggestion for common case

* Move test code in file to avoid conflict
2025-07-01 18:37:01 +00:00
051bb0589e KCL: rectangle function (#7616)
* KCL test for rectangle

* Rectangle function

* Rectangle helper tests

* Rectangle helper

* Fix clippy lints

* Update docs

* fmt

* Fix bug

* fmt

* Fix doc comments

* Update generated docs

---------

Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
2025-07-01 14:26:04 -04:00
7f9851ae28 [Chore]: Added url-checker, updated circular-deps, documented new static analysis .txt pattern (#7442)
* fix: ignoring url checker files

* fix: url checker

* fix: auto fmt and cleanup

* fix: moving the bash scripts and known files into the scripts repo

* fix: removed all url_results and made it be all in memory

* fix: fixed the newline issue

* fix: url checking as a step to the static analysis

* fix: removed old code

* chore: writing documentation on our static checker pattern

* fix: updating the docs more to be clearer

* fix: copy and paste without understanding requirements of ci cd dependencies? do i need all of these?

* fix: updating

* fix: I thought this got in?

* Update CONTRIBUTING.md

Co-authored-by: Jace Browning <jacebrowning@gmail.com>

---------

Co-authored-by: Jace Browning <jacebrowning@gmail.com>
2025-07-01 13:01:42 -05:00
fbcbb341e2 KCL: Add planeOf function to stdlib (#7643)
Gets the plane a face lies on, if any.

Closes #7642
2025-07-01 17:42:12 +00:00
4a080d1583 Bump @types/node from 22.15.32 to 24.0.3 in /packages/codemirror-lsp-client in the major group (#7490)
Bump @types/node in /packages/codemirror-lsp-client in the major group

Bumps the major group in /packages/codemirror-lsp-client with 1 update: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node).


Updates `@types/node` from 22.15.32 to 24.0.3
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-version: 24.0.3
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
2025-07-01 12:01:45 -04:00
249 changed files with 92725 additions and 73013 deletions

View File

@ -7,7 +7,6 @@ VITE_KC_API_WS_MODELING_URL=wss://api.dev.zoo.dev/ws/modeling/commands
VITE_KC_API_BASE_URL=https://api.dev.zoo.dev
VITE_KC_SITE_BASE_URL=https://dev.zoo.dev
VITE_KC_SITE_APP_URL=https://app.dev.zoo.dev
VITE_KC_SKIP_AUTH=false
VITE_KC_CONNECTION_TIMEOUT_MS=5000
#VITE_WASM_URL="optional way of overriding the wasm url, particular for unit tests which need this if you running not on the default 3000 port"
#VITE_KC_DEV_TOKEN="optional token to skip auth in the app"

View File

@ -3,5 +3,4 @@ VITE_KC_API_WS_MODELING_URL=wss://api.zoo.dev/ws/modeling/commands
VITE_KC_API_BASE_URL=https://api.zoo.dev
VITE_KC_SITE_BASE_URL=https://zoo.dev
VITE_KC_SITE_APP_URL=https://app.zoo.dev
VITE_KC_SKIP_AUTH=false
VITE_KC_CONNECTION_TIMEOUT_MS=15000

View File

@ -120,6 +120,36 @@ jobs:
- run: npm run circular-deps:diff
npm-url-checker:
runs-on: ubuntu-latest
needs: npm-build-wasm
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
- run: npm install
- name: Download all artifacts
uses: actions/download-artifact@v4
- name: Copy prepared wasm
run: |
ls -R prepared-wasm
cp prepared-wasm/kcl_wasm_lib_bg.wasm public
mkdir rust/kcl-wasm-lib/pkg
cp prepared-wasm/kcl_wasm_lib* rust/kcl-wasm-lib/pkg
- name: Copy prepared ts-rs bindings
run: |
ls -R prepared-ts-rs-bindings
mkdir rust/kcl-lib/bindings
cp -r prepared-ts-rs-bindings/* rust/kcl-lib/bindings/
- run: npm run url-checker:diff
python-codespell:
runs-on: ubuntu-22.04
steps:

2
.gitignore vendored
View File

@ -87,4 +87,4 @@ venv
.vscode-test
.biome/
.million
.million

View File

@ -235,6 +235,47 @@ To display logging (to the terminal or console) set `ZOO_LOG=1`. This will log s
To enable memory metrics, build with `--features dhat-heap`.
## Running scripts
There are multiple scripts under the folder path `./scripts` which can be used in various settings.
### Pattern for a static file, npm run commands, and CI-CD checks
If you want to implement a static checker follow this pattern. Two static checkers we have are circular dependency checks in our typescript code and url checker to see if any hard coded URL is the typescript application 404s. We have a set of known files in `./scripts/known/*.txt` which is the baseline.
If you improve the baseline, run the overwrite command and commit the new smaller baseline. Try not to make the baseline bigger, the CI CD will complain.
These baselines are to hold us to higher standards and help implement automated testing against the repository
#### Output result to stdout
- `npm run circular-deps`
- `npm run url-checker`
- create a `<name>.sh` file that will run the static checker then output the result to `stdout`
#### Overwrite result to known .txt file on disk
If the application needs to overwrite the known file on disk use this pattern. This known .txt file will be source controlled as the baseline
- `npm run circular-deps:overwrite`
- `npm run url-checker:overwrite`
#### Diff baseline and current
These commands will write a /tmp/ file on disk and compare it to the known file in the repository. This command will also be used in the CI CD pipeline for automated checks
- create a `diff-<name>.sh` file that is the script to diff your tmp file to the baseline
e.g. `diff-url-checker.sh`
```bash
#!/bin/bash
set -euo pipefail
npm run url-checker > /tmp/urls.txt
diff --ignore-blank-lines -w /tmp/urls.txt ./scripts/known/urls.txt
```
- `npm run circular-deps:diff`
- `npm run url-checker:diff`
## Proposing changes
Before you submit a contribution PR to this repo, please ensure that:

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -67,10 +67,12 @@ layout: manual
* [`patternCircular2d`](/docs/kcl-std/functions/std-sketch-patternCircular2d)
* [`patternLinear2d`](/docs/kcl-std/functions/std-sketch-patternLinear2d)
* [`patternTransform2d`](/docs/kcl-std/functions/std-sketch-patternTransform2d)
* [`planeOf`](/docs/kcl-std/functions/std-sketch-planeOf)
* [`polygon`](/docs/kcl-std/functions/std-sketch-polygon)
* [`profileStart`](/docs/kcl-std/functions/std-sketch-profileStart)
* [`profileStartX`](/docs/kcl-std/functions/std-sketch-profileStartX)
* [`profileStartY`](/docs/kcl-std/functions/std-sketch-profileStartY)
* [`rectangle`](/docs/kcl-std/functions/std-sketch-rectangle)
* [`revolve`](/docs/kcl-std/functions/std-sketch-revolve)
* [`segAng`](/docs/kcl-std/functions/std-sketch-segAng)
* [`segEnd`](/docs/kcl-std/functions/std-sketch-segEnd)

View File

@ -32,10 +32,12 @@ This module contains functions for creating and manipulating sketches, and makin
* [`patternCircular2d`](/docs/kcl-std/functions/std-sketch-patternCircular2d)
* [`patternLinear2d`](/docs/kcl-std/functions/std-sketch-patternLinear2d)
* [`patternTransform2d`](/docs/kcl-std/functions/std-sketch-patternTransform2d)
* [`planeOf`](/docs/kcl-std/functions/std-sketch-planeOf)
* [`polygon`](/docs/kcl-std/functions/std-sketch-polygon)
* [`profileStart`](/docs/kcl-std/functions/std-sketch-profileStart)
* [`profileStartX`](/docs/kcl-std/functions/std-sketch-profileStartX)
* [`profileStartY`](/docs/kcl-std/functions/std-sketch-profileStartY)
* [`rectangle`](/docs/kcl-std/functions/std-sketch-rectangle)
* [`revolve`](/docs/kcl-std/functions/std-sketch-revolve)
* [`segAng`](/docs/kcl-std/functions/std-sketch-segAng)
* [`segEnd`](/docs/kcl-std/functions/std-sketch-segEnd)

View File

@ -26,6 +26,8 @@ myXY = {
```
Any object with appropriate `origin`, `xAxis`, and `yAxis` fields can be used as a plane.
The plane's Z axis (i.e. which way is "up") will be the cross product X x Y. In other words,
KCL planes follow the right-hand rule.

View File

@ -573,7 +573,7 @@ sketch_001 = startSketchOn(XY)
await expect(page.locator('.cm-lint-marker-info')).toBeVisible()
// error in guter
// error in gutter
await expect(page.locator('.cm-lint-marker-info').first()).toBeVisible()
// error text on hover

2
interface.d.ts vendored
View File

@ -72,14 +72,12 @@ export interface IElectronAPI {
}
process: {
env: {
BASE_URL: string
IS_PLAYWRIGHT: string
VITE_KC_DEV_TOKEN: string
VITE_KC_API_WS_MODELING_URL: string
VITE_KC_API_BASE_URL: string
VITE_KC_SITE_BASE_URL: string
VITE_KC_SITE_APP_URL: string
VITE_KC_SKIP_AUTH: string
VITE_KC_CONNECTION_TIMEOUT_MS: string
VITE_KC_DEV_TOKEN: string
NODE_ENV: string

View File

@ -110,8 +110,11 @@
"remove-importmeta": "sed -i 's/import.meta.url/window.location.origin/g' \"./rust/kcl-wasm-lib/pkg/kcl_wasm_lib.js\"; sed -i '' 's/import.meta.url/window.location.origin/g' \"./rust/kcl-wasm-lib/pkg/kcl_wasm_lib.js\" || echo \"sed for both mac and linux\"",
"lint-fix": "eslint --fix --ext .ts --ext .tsx src e2e packages/codemirror-lsp-client/src rust/kcl-language-server/client/src",
"lint": "eslint --max-warnings 0 --ext .ts --ext .tsx src e2e packages/codemirror-lsp-client/src rust/kcl-language-server/client/src",
"url-checker":"./scripts/url-checker.sh",
"url-checker:overwrite":"npm run url-checker > scripts/known/urls.txt",
"url-checker:diff":"./scripts/diff-url-checker.sh",
"circular-deps": "dpdm --no-warning --no-tree -T --skip-dynamic-imports=circular src/index.tsx",
"circular-deps:overwrite": "npm run circular-deps | sed '$d' | grep -v '^npm run' > known-circular.txt",
"circular-deps:overwrite": "npm run circular-deps | sed '$d' | grep -v '^npm run' > scripts/known/circular.txt",
"circular-deps:diff": "./scripts/diff-circular-deps.sh",
"circular-deps:diff:nodejs": "npm run circular-deps:diff || node ./scripts/diff.js",
"files:set-version": "echo \"$(jq --arg v \"$VERSION\" '.version=$v' package.json --indent 2)\" > package.json",

View File

@ -29,7 +29,7 @@
"vscode-uri": "^3.1.0"
},
"devDependencies": {
"@types/node": "^22.14.1",
"@types/node": "^24.0.7",
"ts-node": "^10.9.2"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

After

Width:  |  Height:  |  Size: 84 KiB

20
rust/Cargo.lock generated
View File

@ -1814,7 +1814,7 @@ dependencies = [
[[package]]
name = "kcl-bumper"
version = "0.1.83"
version = "0.1.84"
dependencies = [
"anyhow",
"clap",
@ -1825,7 +1825,7 @@ dependencies = [
[[package]]
name = "kcl-derive-docs"
version = "0.1.83"
version = "0.1.84"
dependencies = [
"proc-macro2",
"quote",
@ -1834,7 +1834,7 @@ dependencies = [
[[package]]
name = "kcl-directory-test-macro"
version = "0.1.83"
version = "0.1.84"
dependencies = [
"convert_case",
"proc-macro2",
@ -1844,7 +1844,7 @@ dependencies = [
[[package]]
name = "kcl-language-server"
version = "0.2.83"
version = "0.2.84"
dependencies = [
"anyhow",
"clap",
@ -1865,7 +1865,7 @@ dependencies = [
[[package]]
name = "kcl-language-server-release"
version = "0.1.83"
version = "0.1.84"
dependencies = [
"anyhow",
"clap",
@ -1885,7 +1885,7 @@ dependencies = [
[[package]]
name = "kcl-lib"
version = "0.2.83"
version = "0.2.84"
dependencies = [
"anyhow",
"approx 0.5.1",
@ -1962,7 +1962,7 @@ dependencies = [
[[package]]
name = "kcl-python-bindings"
version = "0.3.83"
version = "0.3.84"
dependencies = [
"anyhow",
"kcl-lib",
@ -1977,7 +1977,7 @@ dependencies = [
[[package]]
name = "kcl-test-server"
version = "0.1.83"
version = "0.1.84"
dependencies = [
"anyhow",
"hyper 0.14.32",
@ -1990,7 +1990,7 @@ dependencies = [
[[package]]
name = "kcl-to-core"
version = "0.1.83"
version = "0.1.84"
dependencies = [
"anyhow",
"async-trait",
@ -2004,7 +2004,7 @@ dependencies = [
[[package]]
name = "kcl-wasm-lib"
version = "0.1.83"
version = "0.1.84"
dependencies = [
"anyhow",
"bson",

View File

@ -8,6 +8,9 @@ lint:
# Ensure we can build without extra feature flags.
cargo clippy -p kcl-lib --all-targets -- -D warnings
lint-fix:
cargo clippy --workspace --all-targets --all-features --fix
# Run the stdlib docs generation
redo-kcl-stdlib-docs-no-imgs:
EXPECTORATE=overwrite {{cnr}} {{kcl_lib_flags}} docs::gen_std_tests::test_generate_stdlib

View File

@ -1,7 +1,7 @@
[package]
name = "kcl-bumper"
version = "0.1.83"
version = "0.1.84"
edition = "2021"
repository = "https://github.com/KittyCAD/modeling-api"
rust-version = "1.76"

View File

@ -1,7 +1,7 @@
[package]
name = "kcl-derive-docs"
description = "A tool for generating documentation from Rust derive macros"
version = "0.1.83"
version = "0.1.84"
edition = "2021"
license = "MIT"
repository = "https://github.com/KittyCAD/modeling-app"

View File

@ -97,8 +97,11 @@ pub const TEST_NAMES: &[&str] = &[
"std-offsetPlane-2",
"std-offsetPlane-3",
"std-offsetPlane-4",
"std-sketch-planeOf-0",
"std-sketch-circle-0",
"std-sketch-circle-1",
"std-sketch-rectangle-0",
"std-sketch-rectangle-1",
"std-sketch-patternTransform2d-0",
"std-sketch-revolve-0",
"std-sketch-revolve-1",

View File

@ -1,7 +1,7 @@
[package]
name = "kcl-directory-test-macro"
description = "A tool for generating tests from a directory of kcl files"
version = "0.1.83"
version = "0.1.84"
edition = "2021"
license = "MIT"
repository = "https://github.com/KittyCAD/modeling-app"

View File

@ -1,6 +1,6 @@
[package]
name = "kcl-language-server-release"
version = "0.1.83"
version = "0.1.84"
edition = "2021"
authors = ["KittyCAD Inc <kcl@kittycad.io>"]
publish = false

View File

@ -2,7 +2,7 @@
name = "kcl-language-server"
description = "A language server for KCL."
authors = ["KittyCAD Inc <kcl@kittycad.io>"]
version = "0.2.83"
version = "0.2.84"
edition = "2021"
license = "MIT"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

View File

@ -1,7 +1,7 @@
[package]
name = "kcl-lib"
description = "KittyCAD Language implementation and tools"
version = "0.2.83"
version = "0.2.84"
edition = "2024"
license = "MIT"
repository = "https://github.com/KittyCAD/modeling-app"

View File

@ -10,71 +10,76 @@ DATA;
NAMED_UNIT(*)
SI_UNIT($, .METRE.)
);
#2 = UNCERTAINTY_MEASURE_WITH_UNIT(0.00001, #1, 'DISTANCE_ACCURACY_VALUE', $);
#3 = (
#2 = (
NAMED_UNIT(*)
PLANE_ANGLE_UNIT()
SI_UNIT($, .RADIAN.)
);
#3 = UNCERTAINTY_MEASURE_WITH_UNIT(0.00001, #1, 'DISTANCE_ACCURACY_VALUE', $);
#4 = (
GEOMETRIC_REPRESENTATION_CONTEXT(3)
GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#2))
GLOBAL_UNIT_ASSIGNED_CONTEXT((#1))
GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#3))
GLOBAL_UNIT_ASSIGNED_CONTEXT((#1, #2))
REPRESENTATION_CONTEXT('', '3D')
);
#4 = CARTESIAN_POINT('NONE', (0.015, -0.01, -0.005));
#5 = VERTEX_POINT('NONE', #4);
#6 = CARTESIAN_POINT('NONE', (0.015, 0, -0.005));
#7 = VERTEX_POINT('NONE', #6);
#8 = DIRECTION('NONE', (1, 0, -0));
#9 = DIRECTION('NONE', (0, 1, 0));
#10 = CARTESIAN_POINT('NONE', (0.005, -0.01, -0.005));
#11 = AXIS2_PLACEMENT_3D('NONE', #10, #9, #8);
#12 = CIRCLE('NONE', #11, 0.01);
#13 = DIRECTION('NONE', (0, 1, 0));
#14 = VECTOR('NONE', #13, 1);
#15 = CARTESIAN_POINT('NONE', (0.015, -0.01, -0.005));
#16 = LINE('NONE', #15, #14);
#17 = DIRECTION('NONE', (1, 0, -0));
#18 = DIRECTION('NONE', (0, 1, 0));
#19 = CARTESIAN_POINT('NONE', (0.005, 0, -0.005));
#20 = AXIS2_PLACEMENT_3D('NONE', #19, #18, #17);
#21 = CIRCLE('NONE', #20, 0.01);
#22 = EDGE_CURVE('NONE', #5, #5, #12, .T.);
#23 = EDGE_CURVE('NONE', #5, #7, #16, .T.);
#24 = EDGE_CURVE('NONE', #7, #7, #21, .T.);
#25 = CARTESIAN_POINT('NONE', (0.005, -0.005, -0.005));
#26 = DIRECTION('NONE', (0, 1, 0));
#27 = DIRECTION('NONE', (1, 0, -0));
#28 = AXIS2_PLACEMENT_3D('NONE', #25, #26, #27);
#29 = CYLINDRICAL_SURFACE('NONE', #28, 0.01);
#30 = CARTESIAN_POINT('NONE', (0, -0.01, -0));
#31 = DIRECTION('NONE', (0, 1, 0));
#32 = AXIS2_PLACEMENT_3D('NONE', #30, #31, $);
#33 = PLANE('NONE', #32);
#34 = CARTESIAN_POINT('NONE', (0, 0, -0));
#35 = DIRECTION('NONE', (0, 1, 0));
#36 = AXIS2_PLACEMENT_3D('NONE', #34, #35, $);
#37 = PLANE('NONE', #36);
#38 = ORIENTED_EDGE('NONE', *, *, #22, .T.);
#39 = ORIENTED_EDGE('NONE', *, *, #24, .F.);
#40 = EDGE_LOOP('NONE', (#38));
#41 = FACE_BOUND('NONE', #40, .T.);
#42 = EDGE_LOOP('NONE', (#39));
#43 = FACE_BOUND('NONE', #42, .T.);
#44 = ADVANCED_FACE('NONE', (#41, #43), #29, .T.);
#45 = ORIENTED_EDGE('NONE', *, *, #22, .F.);
#46 = EDGE_LOOP('NONE', (#45));
#47 = FACE_BOUND('NONE', #46, .T.);
#48 = ADVANCED_FACE('NONE', (#47), #33, .F.);
#49 = ORIENTED_EDGE('NONE', *, *, #24, .T.);
#50 = EDGE_LOOP('NONE', (#49));
#51 = FACE_BOUND('NONE', #50, .T.);
#52 = ADVANCED_FACE('NONE', (#51), #37, .T.);
#53 = CLOSED_SHELL('NONE', (#44, #48, #52));
#54 = MANIFOLD_SOLID_BREP('NONE', #53);
#55 = APPLICATION_CONTEXT('configuration controlled 3D design of mechanical parts and assemblies');
#56 = PRODUCT_DEFINITION_CONTEXT('part definition', #55, 'design');
#57 = PRODUCT('UNIDENTIFIED_PRODUCT', 'NONE', $, ());
#58 = PRODUCT_DEFINITION_FORMATION('', $, #57);
#59 = PRODUCT_DEFINITION('design', $, #58, #56);
#60 = PRODUCT_DEFINITION_SHAPE('NONE', $, #59);
#61 = ADVANCED_BREP_SHAPE_REPRESENTATION('NONE', (#54), #3);
#62 = SHAPE_DEFINITION_REPRESENTATION(#60, #61);
#5 = CARTESIAN_POINT('NONE', (0.015, -0.01, -0.005));
#6 = VERTEX_POINT('NONE', #5);
#7 = CARTESIAN_POINT('NONE', (0.015, 0, -0.005));
#8 = VERTEX_POINT('NONE', #7);
#9 = DIRECTION('NONE', (1, 0, -0));
#10 = DIRECTION('NONE', (0, 1, 0));
#11 = CARTESIAN_POINT('NONE', (0.005, -0.01, -0.005));
#12 = AXIS2_PLACEMENT_3D('NONE', #11, #10, #9);
#13 = CIRCLE('NONE', #12, 0.01);
#14 = DIRECTION('NONE', (0, 1, 0));
#15 = VECTOR('NONE', #14, 1);
#16 = CARTESIAN_POINT('NONE', (0.015, -0.01, -0.005));
#17 = LINE('NONE', #16, #15);
#18 = DIRECTION('NONE', (1, 0, -0));
#19 = DIRECTION('NONE', (0, 1, 0));
#20 = CARTESIAN_POINT('NONE', (0.005, 0, -0.005));
#21 = AXIS2_PLACEMENT_3D('NONE', #20, #19, #18);
#22 = CIRCLE('NONE', #21, 0.01);
#23 = EDGE_CURVE('NONE', #6, #6, #13, .T.);
#24 = EDGE_CURVE('NONE', #6, #8, #17, .T.);
#25 = EDGE_CURVE('NONE', #8, #8, #22, .T.);
#26 = CARTESIAN_POINT('NONE', (0.005, -0.005, -0.005));
#27 = DIRECTION('NONE', (0, 1, 0));
#28 = DIRECTION('NONE', (1, 0, -0));
#29 = AXIS2_PLACEMENT_3D('NONE', #26, #27, #28);
#30 = CYLINDRICAL_SURFACE('NONE', #29, 0.01);
#31 = CARTESIAN_POINT('NONE', (0, -0.01, -0));
#32 = DIRECTION('NONE', (0, 1, 0));
#33 = AXIS2_PLACEMENT_3D('NONE', #31, #32, $);
#34 = PLANE('NONE', #33);
#35 = CARTESIAN_POINT('NONE', (0, 0, -0));
#36 = DIRECTION('NONE', (0, 1, 0));
#37 = AXIS2_PLACEMENT_3D('NONE', #35, #36, $);
#38 = PLANE('NONE', #37);
#39 = ORIENTED_EDGE('NONE', *, *, #23, .T.);
#40 = ORIENTED_EDGE('NONE', *, *, #25, .F.);
#41 = EDGE_LOOP('NONE', (#39));
#42 = FACE_BOUND('NONE', #41, .T.);
#43 = EDGE_LOOP('NONE', (#40));
#44 = FACE_BOUND('NONE', #43, .T.);
#45 = ADVANCED_FACE('NONE', (#42, #44), #30, .T.);
#46 = ORIENTED_EDGE('NONE', *, *, #23, .F.);
#47 = EDGE_LOOP('NONE', (#46));
#48 = FACE_BOUND('NONE', #47, .T.);
#49 = ADVANCED_FACE('NONE', (#48), #34, .F.);
#50 = ORIENTED_EDGE('NONE', *, *, #25, .T.);
#51 = EDGE_LOOP('NONE', (#50));
#52 = FACE_BOUND('NONE', #51, .T.);
#53 = ADVANCED_FACE('NONE', (#52), #38, .T.);
#54 = CLOSED_SHELL('NONE', (#45, #49, #53));
#55 = MANIFOLD_SOLID_BREP('NONE', #54);
#56 = APPLICATION_CONTEXT('configuration controlled 3D design of mechanical parts and assemblies');
#57 = PRODUCT_DEFINITION_CONTEXT('part definition', #56, 'design');
#58 = PRODUCT('UNIDENTIFIED_PRODUCT', 'NONE', $, ());
#59 = PRODUCT_DEFINITION_FORMATION('', $, #58);
#60 = PRODUCT_DEFINITION('design', $, #59, #57);
#61 = PRODUCT_DEFINITION_SHAPE('NONE', $, #60);
#62 = ADVANCED_BREP_SHAPE_REPRESENTATION('NONE', (#55), #4);
#63 = SHAPE_DEFINITION_REPRESENTATION(#61, #62);
ENDSEC;
END-ISO-10303-21;

View File

@ -49,38 +49,61 @@ lazy_static::lazy_static! {
pub static ref GRID_SCALE_TEXT_OBJECT_ID: uuid::Uuid = uuid::Uuid::parse_str("10782f33-f588-4668-8bcd-040502d26590").unwrap();
pub static ref DEFAULT_PLANE_INFO: IndexMap<PlaneName, PlaneInfo> = IndexMap::from([
(PlaneName::Xy,PlaneInfo{
origin: Point3d::new(0.0, 0.0, 0.0, UnitLen::Mm),
x_axis: Point3d::new(1.0, 0.0, 0.0, UnitLen::Unknown),
y_axis: Point3d::new(0.0, 1.0, 0.0, UnitLen::Unknown),
}),
(PlaneName::NegXy,
PlaneInfo{
origin: Point3d::new(0.0, 0.0, 0.0, UnitLen::Mm),
x_axis: Point3d::new(-1.0, 0.0, 0.0, UnitLen::Unknown),
y_axis: Point3d::new(0.0, 1.0, 0.0, UnitLen::Unknown),
}),
(PlaneName::Xz, PlaneInfo{
origin: Point3d::new(0.0, 0.0, 0.0, UnitLen::Mm),
x_axis: Point3d::new(1.0, 0.0, 0.0, UnitLen::Unknown),
y_axis: Point3d::new(0.0, 0.0, 1.0, UnitLen::Unknown),
}),
(PlaneName::NegXz, PlaneInfo{
origin: Point3d::new(0.0, 0.0, 0.0, UnitLen::Mm),
x_axis: Point3d::new(-1.0, 0.0, 0.0, UnitLen::Unknown),
y_axis: Point3d::new(0.0, 0.0, 1.0, UnitLen::Unknown),
}),
(PlaneName::Yz, PlaneInfo{
origin: Point3d::new(0.0, 0.0, 0.0, UnitLen::Mm),
x_axis: Point3d::new(0.0, 1.0, 0.0, UnitLen::Unknown),
y_axis: Point3d::new(0.0, 0.0, 1.0, UnitLen::Unknown),
}),
(PlaneName::NegYz, PlaneInfo{
origin: Point3d::new(0.0, 0.0, 0.0, UnitLen::Mm),
x_axis: Point3d::new(0.0, -1.0, 0.0, UnitLen::Unknown),
y_axis: Point3d::new(0.0, 0.0, 1.0, UnitLen::Unknown),
}),
]);
(
PlaneName::Xy,
PlaneInfo {
origin: Point3d::new(0.0, 0.0, 0.0, UnitLen::Mm),
x_axis: Point3d::new(1.0, 0.0, 0.0, UnitLen::Unknown),
y_axis: Point3d::new(0.0, 1.0, 0.0, UnitLen::Unknown),
z_axis: Point3d::new(0.0, 0.0, 1.0, UnitLen::Unknown),
},
),
(
PlaneName::NegXy,
PlaneInfo {
origin: Point3d::new( 0.0, 0.0, 0.0, UnitLen::Mm),
x_axis: Point3d::new(-1.0, 0.0, 0.0, UnitLen::Unknown),
y_axis: Point3d::new( 0.0, 1.0, 0.0, UnitLen::Unknown),
z_axis: Point3d::new( 0.0, 0.0, -1.0, UnitLen::Unknown),
},
),
(
PlaneName::Xz,
PlaneInfo {
origin: Point3d::new(0.0, 0.0, 0.0, UnitLen::Mm),
x_axis: Point3d::new(1.0, 0.0, 0.0, UnitLen::Unknown),
y_axis: Point3d::new(0.0, 0.0, 1.0, UnitLen::Unknown),
z_axis: Point3d::new(0.0, -1.0, 0.0, UnitLen::Unknown),
},
),
(
PlaneName::NegXz,
PlaneInfo {
origin: Point3d::new( 0.0, 0.0, 0.0, UnitLen::Mm),
x_axis: Point3d::new(-1.0, 0.0, 0.0, UnitLen::Unknown),
y_axis: Point3d::new( 0.0, 0.0, 1.0, UnitLen::Unknown),
z_axis: Point3d::new( 0.0, 1.0, 0.0, UnitLen::Unknown),
},
),
(
PlaneName::Yz,
PlaneInfo {
origin: Point3d::new(0.0, 0.0, 0.0, UnitLen::Mm),
x_axis: Point3d::new(0.0, 1.0, 0.0, UnitLen::Unknown),
y_axis: Point3d::new(0.0, 0.0, 1.0, UnitLen::Unknown),
z_axis: Point3d::new(1.0, 0.0, 0.0, UnitLen::Unknown),
},
),
(
PlaneName::NegYz,
PlaneInfo {
origin: Point3d::new( 0.0, 0.0, 0.0, UnitLen::Mm),
x_axis: Point3d::new( 0.0, -1.0, 0.0, UnitLen::Unknown),
y_axis: Point3d::new( 0.0, 0.0, 1.0, UnitLen::Unknown),
z_axis: Point3d::new(-1.0, 0.0, 0.0, UnitLen::Unknown),
},
),
]);
}
#[derive(Default, Debug)]

View File

@ -226,10 +226,7 @@ impl From<&KclValue> for OpKclValue {
match value {
KclValue::Uuid { value, .. } => Self::Uuid { value: *value },
KclValue::Bool { value, .. } => Self::Bool { value: *value },
KclValue::Number { value, ty, .. } => Self::Number {
value: *value,
ty: ty.clone(),
},
KclValue::Number { value, ty, .. } => Self::Number { value: *value, ty: *ty },
KclValue::String { value, .. } => Self::String { value: value.clone() },
KclValue::Tuple { value, .. } | KclValue::HomArray { value, .. } => {
let value = value.iter().map(Self::from).collect();

View File

@ -864,6 +864,9 @@ impl BinaryPart {
BinaryPart::CallExpressionKw(call_expression) => call_expression.execute(exec_state, ctx).await,
BinaryPart::UnaryExpression(unary_expression) => unary_expression.get_result(exec_state, ctx).await,
BinaryPart::MemberExpression(member_expression) => member_expression.get_result(exec_state, ctx).await,
BinaryPart::ArrayExpression(e) => e.execute(exec_state, ctx).await,
BinaryPart::ArrayRangeExpression(e) => e.execute(exec_state, ctx).await,
BinaryPart::ObjectExpression(e) => e.execute(exec_state, ctx).await,
BinaryPart::IfExpression(e) => e.get_result(exec_state, ctx).await,
BinaryPart::AscribedExpression(e) => e.get_result(exec_state, ctx).await,
}
@ -991,6 +994,39 @@ impl Node<MemberExpression> {
// Check the property and object match -- e.g. ints for arrays, strs for objects.
match (object, property, self.computed) {
(KclValue::Plane { value: plane }, Property::String(property), false) => match property.as_str() {
"yAxis" => {
let (p, u) = plane.info.y_axis.as_3_dims();
Ok(KclValue::array_from_point3d(
p,
NumericType::Known(crate::exec::UnitType::Length(u)),
vec![meta],
))
}
"xAxis" => {
let (p, u) = plane.info.x_axis.as_3_dims();
Ok(KclValue::array_from_point3d(
p,
NumericType::Known(crate::exec::UnitType::Length(u)),
vec![meta],
))
}
"origin" => {
let (p, u) = plane.info.origin.as_3_dims();
Ok(KclValue::array_from_point3d(
p,
NumericType::Known(crate::exec::UnitType::Length(u)),
vec![meta],
))
}
other => Err(KclError::new_undefined_value(
KclErrorDetails::new(
format!("Property '{other}' not found in plane"),
vec![self.clone().into()],
),
None,
)),
},
(KclValue::Object { value: map, meta: _ }, Property::String(property), false) => {
if let Some(value) = map.get(&property) {
Ok(value.to_owned())
@ -1010,7 +1046,22 @@ impl Node<MemberExpression> {
vec![self.clone().into()],
)))
}
(KclValue::Object { .. }, p, _) => {
(KclValue::Object { value: map, .. }, p @ Property::UInt(i), _) => {
if i == 0
&& let Some(value) = map.get("x")
{
return Ok(value.to_owned());
}
if i == 1
&& let Some(value) = map.get("y")
{
return Ok(value.to_owned());
}
if i == 2
&& let Some(value) = map.get("z")
{
return Ok(value.to_owned());
}
let t = p.type_name();
let article = article_for(t);
Err(KclError::new_semantic(KclErrorDetails::new(
@ -1046,6 +1097,16 @@ impl Node<MemberExpression> {
(KclValue::Solid { value }, Property::String(prop), false) if prop == "sketch" => Ok(KclValue::Sketch {
value: Box::new(value.sketch),
}),
(geometry @ KclValue::Solid { .. }, Property::String(prop), false) if prop == "tags" => {
// This is a common mistake.
Err(KclError::new_semantic(KclErrorDetails::new(
format!(
"Property `{prop}` not found on {}. You can get a solid's tags through its sketch, as in, `exampleSolid.sketch.tags`.",
geometry.human_friendly_type()
),
vec![self.clone().into()],
)))
}
(KclValue::Sketch { value: sk }, Property::String(prop), false) if prop == "tags" => Ok(KclValue::Object {
meta: vec![Metadata {
source_range: SourceRange::from(self.clone()),
@ -1056,6 +1117,12 @@ impl Node<MemberExpression> {
.map(|(k, tag)| (k.to_owned(), KclValue::TagIdentifier(Box::new(tag.to_owned()))))
.collect(),
}),
(geometry @ (KclValue::Sketch { .. } | KclValue::Solid { .. }), Property::String(property), false) => {
Err(KclError::new_semantic(KclErrorDetails::new(
format!("Property `{property}` not found on {}", geometry.human_friendly_type()),
vec![self.clone().into()],
)))
}
(being_indexed, _, _) => Err(KclError::new_semantic(KclErrorDetails::new(
format!(
"Only arrays can be indexed, but you're trying to index {}",
@ -1297,7 +1364,7 @@ impl Node<UnaryExpression> {
Ok(KclValue::Number {
value: -value,
meta,
ty: ty.clone(),
ty: *ty,
})
}
KclValue::Plane { value } => {
@ -1329,7 +1396,7 @@ impl Node<UnaryExpression> {
.map(|v| match v {
KclValue::Number { value, ty, meta } => Ok(KclValue::Number {
value: *value * -1.0,
ty: ty.clone(),
ty: *ty,
meta: meta.clone(),
}),
_ => Err(err()),
@ -1350,7 +1417,7 @@ impl Node<UnaryExpression> {
.map(|v| match v {
KclValue::Number { value, ty, meta } => Ok(KclValue::Number {
value: *value * -1.0,
ty: ty.clone(),
ty: *ty,
meta: meta.clone(),
}),
_ => Err(err()),
@ -1544,7 +1611,7 @@ impl Node<ArrayRangeExpression> {
.into_iter()
.map(|num| KclValue::Number {
value: num as f64,
ty: start_ty.clone(),
ty: start_ty,
meta: meta.clone(),
})
.collect(),
@ -2186,4 +2253,12 @@ y = x[0mm + 1]
"#;
parse_execute(ast).await.unwrap_err();
}
#[tokio::test(flavor = "multi_thread")]
async fn getting_property_of_plane() {
// let ast = include_str!("../../tests/inputs/planestuff.kcl");
let ast = std::fs::read_to_string("tests/inputs/planestuff.kcl").unwrap();
parse_execute(&ast).await.unwrap();
}
}

View File

@ -299,6 +299,8 @@ pub struct PlaneInfo {
pub x_axis: Point3d,
/// What should the plane's Y axis be?
pub y_axis: Point3d,
/// What should the plane's Z axis be?
pub z_axis: Point3d,
}
impl PlaneInfo {
@ -327,6 +329,7 @@ impl PlaneInfo {
z: 0.0,
units: _,
},
z_axis: _,
} => return PlaneData::XY,
Self {
origin:
@ -350,6 +353,7 @@ impl PlaneInfo {
z: 0.0,
units: _,
},
z_axis: _,
} => return PlaneData::NegXY,
Self {
origin:
@ -373,6 +377,7 @@ impl PlaneInfo {
z: 1.0,
units: _,
},
z_axis: _,
} => return PlaneData::XZ,
Self {
origin:
@ -396,6 +401,7 @@ impl PlaneInfo {
z: 1.0,
units: _,
},
z_axis: _,
} => return PlaneData::NegXZ,
Self {
origin:
@ -419,6 +425,7 @@ impl PlaneInfo {
z: 1.0,
units: _,
},
z_axis: _,
} => return PlaneData::YZ,
Self {
origin:
@ -442,6 +449,7 @@ impl PlaneInfo {
z: 1.0,
units: _,
},
z_axis: _,
} => return PlaneData::NegYZ,
_ => {}
}
@ -451,6 +459,7 @@ impl PlaneInfo {
origin: self.origin,
x_axis: self.x_axis,
y_axis: self.y_axis,
z_axis: self.z_axis,
})
}
}
@ -921,6 +930,12 @@ impl Point3d {
units: UnitLen::Unknown,
}
}
pub fn as_3_dims(&self) -> ([f64; 3], UnitLen) {
let p = [self.x, self.y, self.z];
let u = self.units;
(p, u)
}
}
impl From<[TyF64; 3]> for Point3d {
@ -939,6 +954,7 @@ impl From<Point3d> for Point3D {
Self { x: p.x, y: p.y, z: p.z }
}
}
impl From<Point3d> for kittycad_modeling_cmds::shared::Point3d<LengthUnit> {
fn from(p: Point3d) -> Self {
Self {
@ -1004,12 +1020,12 @@ pub struct BasePath {
impl BasePath {
pub fn get_to(&self) -> [TyF64; 2] {
let ty: NumericType = self.units.into();
[TyF64::new(self.to[0], ty.clone()), TyF64::new(self.to[1], ty)]
[TyF64::new(self.to[0], ty), TyF64::new(self.to[1], ty)]
}
pub fn get_from(&self) -> [TyF64; 2] {
let ty: NumericType = self.units.into();
[TyF64::new(self.from[0], ty.clone()), TyF64::new(self.from[1], ty)]
[TyF64::new(self.from[0], ty), TyF64::new(self.from[1], ty)]
}
}
@ -1030,7 +1046,7 @@ pub struct GeoMeta {
#[ts(export)]
#[serde(tag = "type")]
pub enum Path {
/// A path that goes to a point.
/// A straight line which ends at the given point.
ToPoint {
#[serde(flatten)]
base: BasePath,
@ -1225,14 +1241,14 @@ impl Path {
pub fn get_from(&self) -> [TyF64; 2] {
let p = &self.get_base().from;
let ty: NumericType = self.get_base().units.into();
[TyF64::new(p[0], ty.clone()), TyF64::new(p[1], ty)]
[TyF64::new(p[0], ty), TyF64::new(p[1], ty)]
}
/// Where does this path segment end?
pub fn get_to(&self) -> [TyF64; 2] {
let p = &self.get_base().to;
let ty: NumericType = self.get_base().units.into();
[TyF64::new(p[0], ty.clone()), TyF64::new(p[1], ty)]
[TyF64::new(p[0], ty), TyF64::new(p[1], ty)]
}
/// The path segment start point and its type.

View File

@ -415,15 +415,16 @@ impl KclValue {
/// Put the point into a KCL value.
pub fn from_point2d(p: [f64; 2], ty: NumericType, meta: Vec<Metadata>) -> Self {
let [x, y] = p;
Self::Tuple {
value: vec![
Self::Number {
value: p[0],
value: x,
meta: meta.clone(),
ty: ty.clone(),
ty,
},
Self::Number {
value: p[1],
value: y,
meta: meta.clone(),
ty,
},
@ -432,6 +433,56 @@ impl KclValue {
}
}
/// Put the point into a KCL value.
pub fn from_point3d(p: [f64; 3], ty: NumericType, meta: Vec<Metadata>) -> Self {
let [x, y, z] = p;
Self::Tuple {
value: vec![
Self::Number {
value: x,
meta: meta.clone(),
ty,
},
Self::Number {
value: y,
meta: meta.clone(),
ty,
},
Self::Number {
value: z,
meta: meta.clone(),
ty,
},
],
meta,
}
}
/// Put the point into a KCL point.
pub fn array_from_point3d(p: [f64; 3], ty: NumericType, meta: Vec<Metadata>) -> Self {
let [x, y, z] = p;
Self::HomArray {
value: vec![
Self::Number {
value: x,
meta: meta.clone(),
ty,
},
Self::Number {
value: y,
meta: meta.clone(),
ty,
},
Self::Number {
value: z,
meta: meta.clone(),
ty,
},
],
ty: ty.into(),
}
}
pub(crate) fn as_usize(&self) -> Option<usize> {
match self {
KclValue::Number { value, .. } => crate::try_f64_to_usize(*value),
@ -448,7 +499,7 @@ impl KclValue {
pub fn as_int_with_ty(&self) -> Option<(i64, NumericType)> {
match self {
KclValue::Number { value, ty, .. } => crate::try_f64_to_i64(*value).map(|i| (i, ty.clone())),
KclValue::Number { value, ty, .. } => crate::try_f64_to_i64(*value).map(|i| (i, *ty)),
_ => None,
}
}
@ -562,7 +613,7 @@ impl KclValue {
pub fn as_ty_f64(&self) -> Option<TyF64> {
match self {
KclValue::Number { value, ty, .. } => Some(TyF64::new(*value, ty.clone())),
KclValue::Number { value, ty, .. } => Some(TyF64::new(*value, *ty)),
_ => None,
}
}

View File

@ -460,7 +460,7 @@ impl fmt::Display for PrimitiveType {
}
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, ts_rs::TS, JsonSchema)]
#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, ts_rs::TS, JsonSchema)]
#[ts(export)]
#[serde(tag = "type")]
pub enum NumericType {
@ -575,7 +575,7 @@ impl NumericType {
match (&ty, &i.ty) {
(Any, Default { .. }) if i.n == 0.0 => {}
(Any, t) => {
ty = t.clone();
ty = *t;
}
(_, Unknown) | (Default { .. }, Default { .. }) => return (result, Unknown),
@ -598,7 +598,7 @@ impl NumericType {
}
if ty == Any && !input.is_empty() {
ty = input[0].ty.clone();
ty = input[0].ty;
}
(result, ty)
@ -722,7 +722,7 @@ impl NumericType {
if ty.subtype(self) {
return Ok(KclValue::Number {
value: *value,
ty: ty.clone(),
ty: *ty,
meta: meta.clone(),
});
}
@ -736,7 +736,7 @@ impl NumericType {
(Any, _) => Ok(KclValue::Number {
value: *value,
ty: self.clone(),
ty: *self,
meta: meta.clone(),
}),
@ -744,7 +744,7 @@ impl NumericType {
// means accept any number rather than force the current default.
(_, Default { .. }) => Ok(KclValue::Number {
value: *value,
ty: ty.clone(),
ty: *ty,
meta: meta.clone(),
}),
@ -1182,6 +1182,7 @@ impl KclValue {
.get("yAxis")
.and_then(Point3d::from_kcl_val)
.ok_or(CoercionError::from(self))?;
let z_axis = x_axis.axes_cross_product(&y_axis);
if value.get("zAxis").is_some() {
exec_state.warn(CompilationError::err(
@ -1198,6 +1199,7 @@ impl KclValue {
origin,
x_axis: x_axis.normalize(),
y_axis: y_axis.normalize(),
z_axis: z_axis.normalize(),
},
value: super::PlaneType::Uninit,
meta: meta.clone(),
@ -1491,7 +1493,7 @@ impl KclValue {
pub fn principal_type(&self) -> Option<RuntimeType> {
match self {
KclValue::Bool { .. } => Some(RuntimeType::Primitive(PrimitiveType::Boolean)),
KclValue::Number { ty, .. } => Some(RuntimeType::Primitive(PrimitiveType::Number(ty.clone()))),
KclValue::Number { ty, .. } => Some(RuntimeType::Primitive(PrimitiveType::Number(*ty))),
KclValue::String { .. } => Some(RuntimeType::Primitive(PrimitiveType::String)),
KclValue::Object { value, .. } => {
let properties = value

View File

@ -212,21 +212,29 @@ pub fn common(
origin,
x_axis: x_vec,
y_axis: y_vec,
z_axis: x_vec.axes_cross_product(&y_vec),
};
let plane_equal_excluding_z = |plane: &&PlaneInfo, plane_info: &PlaneInfo| {
plane.origin == plane_info.origin && plane.x_axis == plane_info.x_axis && plane.y_axis == plane_info.y_axis
};
// Return early if we have a default plane.
if let Some((name, _)) = DEFAULT_PLANE_INFO.iter().find(|(_, plane)| **plane == plane_info) {
if let Some((name, _)) = DEFAULT_PLANE_INFO
.iter()
.find(|(_, plane)| plane_equal_excluding_z(plane, &plane_info))
{
return Ok(Some((call_source_range, *name, 0.0)));
}
let normalized_plane_info = normalize_plane_info(&plane_info);
println!("normalized plane info: {:?}", normalized_plane_info);
println!("normalized plane info: {:#?}", normalized_plane_info);
// Check our default planes.
let Some((matched_plane_name, _)) = DEFAULT_PLANE_INFO
.iter()
.find(|(_, plane)| **plane == normalized_plane_info)
.find(|(_, plane)| plane_equal_excluding_z(plane, &normalized_plane_info))
else {
return Ok(None);
};
@ -271,6 +279,7 @@ mod tests {
use super::{Z0003, lint_should_be_offset_plane};
use crate::lint::rule::{test_finding, test_no_finding};
// Both axes here are normalized.
test_finding!(
z0003_bad_sketch_on,
lint_should_be_offset_plane,
@ -287,6 +296,30 @@ startSketchOn({
Some("offsetPlane(XZ, offset = -14.3)".to_string())
);
// This test uses a Y axis that isn't normalized, to check the normalization code doesn't
// stop this lint from firing.
test_finding!(
z0003_bad_sketch_on_not_normalized_axes,
lint_should_be_offset_plane,
Z0003,
"\
a1 = startSketchOn({
origin = { x = 0, y = 0, z = 0 },
xAxis = { x = 1, y = 0, z = 0 },
yAxis = { x = 0, y = 12, z = 0 },
})
|> startProfile(at = [0, 0])
|> line(end = [100.0, 0])
|> yLine(length = -100.0)
|> xLine(length = -100.0)
|> yLine(length = 100.0)
|> close()
|> extrude(length = 3.14)
",
"custom plane in startSketchOn; offsetPlane from XY would work here",
Some("offsetPlane(XY, offset = 12)".to_string())
);
test_no_finding!(
z0003_good_sketch_on,
lint_should_be_offset_plane,

View File

@ -149,6 +149,9 @@ impl BinaryPart {
BinaryPart::UnaryExpression(unary_expression) => {
unary_expression.get_hover_value_for_position(pos, code, opts)
}
BinaryPart::ArrayExpression(e) => e.get_hover_value_for_position(pos, code, opts),
BinaryPart::ArrayRangeExpression(e) => e.get_hover_value_for_position(pos, code, opts),
BinaryPart::ObjectExpression(e) => e.get_hover_value_for_position(pos, code, opts),
BinaryPart::IfExpression(e) => e.get_hover_value_for_position(pos, code, opts),
BinaryPart::AscribedExpression(e) => e.expr.get_hover_value_for_position(pos, code, opts),
BinaryPart::MemberExpression(member_expression) => {

View File

@ -161,6 +161,9 @@ impl BinaryPart {
BinaryPart::CallExpressionKw(ce) => ce.compute_digest(),
BinaryPart::UnaryExpression(ue) => ue.compute_digest(),
BinaryPart::MemberExpression(me) => me.compute_digest(),
BinaryPart::ArrayExpression(e) => e.compute_digest(),
BinaryPart::ArrayRangeExpression(e) => e.compute_digest(),
BinaryPart::ObjectExpression(e) => e.compute_digest(),
BinaryPart::IfExpression(e) => e.compute_digest(),
BinaryPart::AscribedExpression(e) => e.compute_digest(),
}

View File

@ -51,6 +51,9 @@ impl BinaryPart {
BinaryPart::CallExpressionKw(call_expression) => call_expression.module_id,
BinaryPart::UnaryExpression(unary_expression) => unary_expression.module_id,
BinaryPart::MemberExpression(member_expression) => member_expression.module_id,
BinaryPart::ArrayExpression(e) => e.module_id,
BinaryPart::ArrayRangeExpression(e) => e.module_id,
BinaryPart::ObjectExpression(e) => e.module_id,
BinaryPart::IfExpression(e) => e.module_id,
BinaryPart::AscribedExpression(e) => e.module_id,
}

View File

@ -1214,6 +1214,9 @@ impl From<&BinaryPart> for Expr {
BinaryPart::CallExpressionKw(call_expression) => Expr::CallExpressionKw(call_expression.clone()),
BinaryPart::UnaryExpression(unary_expression) => Expr::UnaryExpression(unary_expression.clone()),
BinaryPart::MemberExpression(member_expression) => Expr::MemberExpression(member_expression.clone()),
BinaryPart::ArrayExpression(e) => Expr::ArrayExpression(e.clone()),
BinaryPart::ArrayRangeExpression(e) => Expr::ArrayRangeExpression(e.clone()),
BinaryPart::ObjectExpression(e) => Expr::ObjectExpression(e.clone()),
BinaryPart::IfExpression(e) => Expr::IfExpression(e.clone()),
BinaryPart::AscribedExpression(e) => Expr::AscribedExpression(e.clone()),
}
@ -1281,6 +1284,9 @@ pub enum BinaryPart {
CallExpressionKw(BoxNode<CallExpressionKw>),
UnaryExpression(BoxNode<UnaryExpression>),
MemberExpression(BoxNode<MemberExpression>),
ArrayExpression(BoxNode<ArrayExpression>),
ArrayRangeExpression(BoxNode<ArrayRangeExpression>),
ObjectExpression(BoxNode<ObjectExpression>),
IfExpression(BoxNode<IfExpression>),
AscribedExpression(BoxNode<AscribedExpression>),
}
@ -1307,6 +1313,9 @@ impl BinaryPart {
BinaryPart::CallExpressionKw(call_expression) => call_expression.get_constraint_level(),
BinaryPart::UnaryExpression(unary_expression) => unary_expression.get_constraint_level(),
BinaryPart::MemberExpression(member_expression) => member_expression.get_constraint_level(),
BinaryPart::ArrayExpression(e) => e.get_constraint_level(),
BinaryPart::ArrayRangeExpression(e) => e.get_constraint_level(),
BinaryPart::ObjectExpression(e) => e.get_constraint_level(),
BinaryPart::IfExpression(e) => e.get_constraint_level(),
BinaryPart::AscribedExpression(e) => e.expr.get_constraint_level(),
}
@ -1320,6 +1329,9 @@ impl BinaryPart {
BinaryPart::CallExpressionKw(call_expression) => call_expression.replace_value(source_range, new_value),
BinaryPart::UnaryExpression(unary_expression) => unary_expression.replace_value(source_range, new_value),
BinaryPart::MemberExpression(_) => {}
BinaryPart::ArrayExpression(e) => e.replace_value(source_range, new_value),
BinaryPart::ArrayRangeExpression(e) => e.replace_value(source_range, new_value),
BinaryPart::ObjectExpression(e) => e.replace_value(source_range, new_value),
BinaryPart::IfExpression(e) => e.replace_value(source_range, new_value),
BinaryPart::AscribedExpression(e) => e.expr.replace_value(source_range, new_value),
}
@ -1333,6 +1345,9 @@ impl BinaryPart {
BinaryPart::CallExpressionKw(call_expression) => call_expression.start,
BinaryPart::UnaryExpression(unary_expression) => unary_expression.start,
BinaryPart::MemberExpression(member_expression) => member_expression.start,
BinaryPart::ArrayExpression(e) => e.start,
BinaryPart::ArrayRangeExpression(e) => e.start,
BinaryPart::ObjectExpression(e) => e.start,
BinaryPart::IfExpression(e) => e.start,
BinaryPart::AscribedExpression(e) => e.start,
}
@ -1346,6 +1361,9 @@ impl BinaryPart {
BinaryPart::CallExpressionKw(call_expression) => call_expression.end,
BinaryPart::UnaryExpression(unary_expression) => unary_expression.end,
BinaryPart::MemberExpression(member_expression) => member_expression.end,
BinaryPart::ArrayExpression(e) => e.end,
BinaryPart::ArrayRangeExpression(e) => e.end,
BinaryPart::ObjectExpression(e) => e.end,
BinaryPart::IfExpression(e) => e.end,
BinaryPart::AscribedExpression(e) => e.end,
}
@ -1360,6 +1378,9 @@ impl BinaryPart {
BinaryPart::CallExpressionKw(call_expression) => call_expression.rename_identifiers(old_name, new_name),
BinaryPart::UnaryExpression(unary_expression) => unary_expression.rename_identifiers(old_name, new_name),
BinaryPart::MemberExpression(member_expression) => member_expression.rename_identifiers(old_name, new_name),
BinaryPart::ArrayExpression(e) => e.rename_identifiers(old_name, new_name),
BinaryPart::ArrayRangeExpression(e) => e.rename_identifiers(old_name, new_name),
BinaryPart::ObjectExpression(e) => e.rename_identifiers(old_name, new_name),
BinaryPart::IfExpression(if_expression) => if_expression.rename_identifiers(old_name, new_name),
BinaryPart::AscribedExpression(e) => e.expr.rename_identifiers(old_name, new_name),
}

View File

@ -624,9 +624,6 @@ fn operand(i: &mut TokenSlice) -> ModalResult<BinaryPart> {
Expr::FunctionExpression(_)
| Expr::PipeExpression(_)
| Expr::PipeSubstitution(_)
| Expr::ArrayExpression(_)
| Expr::ArrayRangeExpression(_)
| Expr::ObjectExpression(_)
| Expr::LabelledExpression(..) => return Err(CompilationError::fatal(source_range, TODO_783)),
Expr::None(_) => {
return Err(CompilationError::fatal(
@ -652,6 +649,9 @@ fn operand(i: &mut TokenSlice) -> ModalResult<BinaryPart> {
Expr::BinaryExpression(x) => BinaryPart::BinaryExpression(x),
Expr::CallExpressionKw(x) => BinaryPart::CallExpressionKw(x),
Expr::MemberExpression(x) => BinaryPart::MemberExpression(x),
Expr::ArrayExpression(x) => BinaryPart::ArrayExpression(x),
Expr::ArrayRangeExpression(x) => BinaryPart::ArrayRangeExpression(x),
Expr::ObjectExpression(x) => BinaryPart::ObjectExpression(x),
Expr::IfExpression(x) => BinaryPart::IfExpression(x),
Expr::AscribedExpression(x) => BinaryPart::AscribedExpression(x),
};
@ -2115,6 +2115,8 @@ fn possible_operands(i: &mut TokenSlice) -> ModalResult<Expr> {
literal.map(Expr::Literal),
fn_call_kw.map(Box::new).map(Expr::CallExpressionKw),
name.map(Box::new).map(Expr::Name),
array,
object.map(Box::new).map(Expr::ObjectExpression),
binary_expr_in_parens.map(Box::new).map(Expr::BinaryExpression),
unnecessarily_bracketed,
))
@ -3398,6 +3400,27 @@ mod tests {
operand.parse(tokens).unwrap();
}
#[test]
fn parse_binary_operator_on_array() {
let tokens = crate::parsing::token::lex("[0] + 1", ModuleId::default()).unwrap();
let tokens = tokens.as_slice();
binary_expression.parse(tokens).unwrap();
}
#[test]
fn parse_binary_operator_on_object() {
let tokens = crate::parsing::token::lex("{ a = 1 } + 2", ModuleId::default()).unwrap();
let tokens = tokens.as_slice();
binary_expression.parse(tokens).unwrap();
}
#[test]
fn parse_call_array_operator() {
let tokens = crate::parsing::token::lex("f([0] + 1)", ModuleId::default()).unwrap();
let tokens = tokens.as_slice();
fn_call_kw.parse(tokens).unwrap();
}
#[test]
fn weird_program_just_a_pipe() {
let tokens = crate::parsing::token::lex("|", ModuleId::default()).unwrap();

View File

@ -779,6 +779,27 @@ mod add_lots {
super::execute(TEST_NAME, false).await
}
}
mod add_arrays {
const TEST_NAME: &str = "add_arrays";
/// Test parsing KCL.
#[test]
fn parse() {
super::parse(TEST_NAME)
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[tokio::test(flavor = "multi_thread")]
async fn unparse() {
super::unparse(TEST_NAME).await
}
/// Test that KCL is executed correctly.
#[tokio::test(flavor = "multi_thread")]
async fn kcl_test_execute() {
super::execute(TEST_NAME, false).await
}
}
mod argument_error {
//! The argument error points to the problematic argument in the call site,
//! not the function definition that the variable points to.
@ -887,6 +908,27 @@ mod invalid_index_fractional {
super::execute(TEST_NAME, false).await
}
}
mod property_access_not_found_on_solid {
const TEST_NAME: &str = "property_access_not_found_on_solid";
/// Test parsing KCL.
#[test]
fn parse() {
super::parse(TEST_NAME)
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[tokio::test(flavor = "multi_thread")]
async fn unparse() {
super::unparse(TEST_NAME).await
}
/// Test that KCL is executed correctly.
#[tokio::test(flavor = "multi_thread")]
async fn kcl_test_execute() {
super::execute(TEST_NAME, true).await
}
}
mod invalid_member_object {
const TEST_NAME: &str = "invalid_member_object";
@ -3632,3 +3674,66 @@ mod non_english_identifiers {
super::execute(TEST_NAME, true).await
}
}
mod rect {
const TEST_NAME: &str = "rect";
/// Test parsing KCL.
#[test]
fn parse() {
super::parse(TEST_NAME)
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[tokio::test(flavor = "multi_thread")]
async fn unparse() {
super::unparse(TEST_NAME).await
}
/// Test that KCL is executed correctly.
#[tokio::test(flavor = "multi_thread")]
async fn kcl_test_execute() {
super::execute(TEST_NAME, true).await
}
}
mod rect_helper {
const TEST_NAME: &str = "rect_helper";
/// Test parsing KCL.
#[test]
fn parse() {
super::parse(TEST_NAME)
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[tokio::test(flavor = "multi_thread")]
async fn unparse() {
super::unparse(TEST_NAME).await
}
/// Test that KCL is executed correctly.
#[tokio::test(flavor = "multi_thread")]
async fn kcl_test_execute() {
super::execute(TEST_NAME, true).await
}
}
mod plane_of {
const TEST_NAME: &str = "plane_of";
/// Test parsing KCL.
#[test]
fn parse() {
super::parse(TEST_NAME)
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[tokio::test(flavor = "multi_thread")]
async fn unparse() {
super::unparse(TEST_NAME).await
}
/// Test that KCL is executed correctly.
#[tokio::test(flavor = "multi_thread")]
async fn kcl_test_execute() {
super::execute(TEST_NAME, true).await
}
}

View File

@ -340,12 +340,12 @@ impl Args {
let x = KclValue::Number {
value: p[0],
meta: vec![meta],
ty: ty.clone(),
ty,
};
let y = KclValue::Number {
value: p[1],
meta: vec![meta],
ty: ty.clone(),
ty,
};
let ty = RuntimeType::Primitive(PrimitiveType::Number(ty));
@ -674,6 +674,7 @@ impl<'a> FromKclValue<'a> for super::sketch::PlaneData {
origin: value.info.origin,
x_axis: value.info.x_axis,
y_axis: value.info.y_axis,
z_axis: value.info.z_axis,
}));
}
// Case 1: predefined plane
@ -692,9 +693,15 @@ impl<'a> FromKclValue<'a> for super::sketch::PlaneData {
let obj = arg.as_object()?;
let_field_of!(obj, plane, &KclObjectFields);
let origin = plane.get("origin").and_then(FromKclValue::from_kcl_val)?;
let x_axis = plane.get("xAxis").and_then(FromKclValue::from_kcl_val)?;
let x_axis: crate::execution::Point3d = plane.get("xAxis").and_then(FromKclValue::from_kcl_val)?;
let y_axis = plane.get("yAxis").and_then(FromKclValue::from_kcl_val)?;
Some(Self::Plane(PlaneInfo { origin, x_axis, y_axis }))
let z_axis = x_axis.axes_cross_product(&y_axis);
Some(Self::Plane(PlaneInfo {
origin,
x_axis,
y_axis,
z_axis,
}))
}
}
@ -1038,7 +1045,7 @@ impl<'a> FromKclValue<'a> for u64 {
impl<'a> FromKclValue<'a> for TyF64 {
fn from_kcl_val(arg: &'a KclValue) -> Option<Self> {
match arg {
KclValue::Number { value, ty, .. } => Some(TyF64::new(*value, ty.clone())),
KclValue::Number { value, ty, .. } => Some(TyF64::new(*value, *ty)),
_ => None,
}
}

View File

@ -256,6 +256,14 @@ pub(crate) fn std_fn(path: &str, fn_name: &str) -> (crate::std::StdFn, StdFnProp
|e, a| Box::pin(crate::std::shapes::circle(e, a)),
StdFnProps::default("std::sketch::circle"),
),
("sketch", "rectangle") => (
|e, a| Box::pin(crate::std::shapes::rectangle(e, a)),
StdFnProps::default("std::sketch::rectangle"),
),
("sketch", "planeOf") => (
|e, a| Box::pin(crate::std::planes::plane_of(e, a)),
StdFnProps::default("std::sketch::planeOf"),
),
("sketch", "extrude") => (
|e, a| Box::pin(crate::std::extrude::extrude(e, a)),
StdFnProps::default("std::sketch::extrude").include_in_feature_tree(),

View File

@ -408,7 +408,7 @@ impl GeometryTrait for Sketch {
exec_state: &mut ExecState,
) -> Result<[TyF64; 3], KclError> {
let [x, y] = array_to_point2d(val, source_ranges, exec_state)?;
let ty = x.ty.clone();
let ty = x.ty;
Ok([x, y, TyF64::new(0.0, ty)])
}

View File

@ -1,15 +1,136 @@
//! Standard library plane helpers.
use kcmc::{ModelingCmd, each_cmd as mcmd, length_unit::LengthUnit, shared::Color};
use kittycad_modeling_cmds as kcmc;
use kittycad_modeling_cmds::{self as kcmc, ok_response::OkModelingCmdResponse, websocket::OkWebSocketResponseData};
use super::{args::TyF64, sketch::PlaneData};
use super::{
args::TyF64,
sketch::{FaceTag, PlaneData},
};
use crate::{
errors::KclError,
execution::{ExecState, KclValue, ModelingCmdMeta, Plane, PlaneType, types::RuntimeType},
UnitLen,
errors::{KclError, KclErrorDetails},
execution::{ExecState, KclValue, Metadata, ModelingCmdMeta, Plane, PlaneType, types::RuntimeType},
std::Args,
};
/// Find the plane of a given face.
pub async fn plane_of(exec_state: &mut ExecState, args: Args) -> Result<KclValue, KclError> {
let solid = args.get_unlabeled_kw_arg("solid", &RuntimeType::solid(), exec_state)?;
let face = args.get_kw_arg("face", &RuntimeType::tagged_face(), exec_state)?;
inner_plane_of(solid, face, exec_state, &args)
.await
.map(Box::new)
.map(|value| KclValue::Plane { value })
}
async fn inner_plane_of(
solid: crate::execution::Solid,
face: FaceTag,
exec_state: &mut ExecState,
args: &Args,
) -> Result<Plane, KclError> {
// Support mock execution
// Return an arbitrary (incorrect) plane and a non-fatal error.
if args.ctx.no_engine_commands().await {
let plane_id = exec_state.id_generator().next_uuid();
exec_state.err(crate::CompilationError {
source_range: args.source_range,
message: "The engine isn't available, so returning an arbitrary incorrect plane".to_owned(),
suggestion: None,
severity: crate::errors::Severity::Error,
tag: crate::errors::Tag::None,
});
return Ok(Plane {
artifact_id: plane_id.into(),
id: plane_id,
// Engine doesn't know about the ID we created, so set this to Uninit.
value: PlaneType::Uninit,
info: crate::execution::PlaneInfo {
origin: Default::default(),
x_axis: Default::default(),
y_axis: Default::default(),
z_axis: Default::default(),
},
meta: vec![Metadata {
source_range: args.source_range,
}],
});
}
// Query the engine to learn what plane, if any, this face is on.
let face_id = face.get_face_id(&solid, exec_state, args, true).await?;
let meta = args.into();
let cmd = ModelingCmd::FaceIsPlanar(mcmd::FaceIsPlanar { object_id: face_id });
let plane_resp = exec_state.send_modeling_cmd(meta, cmd).await?;
let OkWebSocketResponseData::Modeling {
modeling_response: OkModelingCmdResponse::FaceIsPlanar(planar),
} = plane_resp
else {
return Err(KclError::new_semantic(KclErrorDetails::new(
format!(
"Engine returned invalid response, it should have returned FaceIsPlanar but it returned {plane_resp:#?}"
),
vec![args.source_range],
)));
};
// Destructure engine's response to check if the face was on a plane.
let not_planar: Result<_, KclError> = Err(KclError::new_semantic(KclErrorDetails::new(
"The face you provided doesn't lie on any plane. It might be curved.".to_owned(),
vec![args.source_range],
)));
let Some(x_axis) = planar.x_axis else { return not_planar };
let Some(y_axis) = planar.y_axis else { return not_planar };
let Some(z_axis) = planar.z_axis else { return not_planar };
let Some(origin) = planar.origin else { return not_planar };
// Engine always returns measurements in mm.
let engine_units = UnitLen::Mm;
let x_axis = crate::execution::Point3d {
x: x_axis.x,
y: x_axis.y,
z: x_axis.z,
units: engine_units,
};
let y_axis = crate::execution::Point3d {
x: y_axis.x,
y: y_axis.y,
z: y_axis.z,
units: engine_units,
};
let z_axis = crate::execution::Point3d {
x: z_axis.x,
y: z_axis.y,
z: z_axis.z,
units: engine_units,
};
let origin = crate::execution::Point3d {
x: origin.x.0,
y: origin.y.0,
z: origin.z.0,
units: engine_units,
};
// Engine doesn't send back an ID, so let's just make a new plane ID.
let plane_id = exec_state.id_generator().next_uuid();
Ok(Plane {
artifact_id: plane_id.into(),
id: plane_id,
// Engine doesn't know about the ID we created, so set this to Uninit.
value: PlaneType::Uninit,
info: crate::execution::PlaneInfo {
origin,
x_axis,
y_axis,
z_axis,
},
meta: vec![Metadata {
source_range: args.source_range,
}],
})
}
/// Offset a plane by a distance along its normal.
pub async fn offset_plane(exec_state: &mut ExecState, args: Args) -> Result<KclValue, KclError> {
let std_plane = args.get_unlabeled_kw_arg("plane", &RuntimeType::plane(), exec_state)?;

View File

@ -18,7 +18,7 @@ pub async fn segment_end(exec_state: &mut ExecState, args: Args) -> Result<KclVa
let tag: TagIdentifier = args.get_unlabeled_kw_arg("tag", &RuntimeType::tagged_edge(), exec_state)?;
let pt = inner_segment_end(&tag, exec_state, args.clone())?;
args.make_kcl_val_from_point([pt[0].n, pt[1].n], pt[0].ty.clone())
args.make_kcl_val_from_point([pt[0].n, pt[1].n], pt[0].ty)
}
fn inner_segment_end(tag: &TagIdentifier, exec_state: &mut ExecState, args: Args) -> Result<[TyF64; 2], KclError> {
@ -31,7 +31,7 @@ fn inner_segment_end(tag: &TagIdentifier, exec_state: &mut ExecState, args: Args
})?;
let (p, ty) = path.end_point_components();
// Docs generation isn't smart enough to handle ([f64; 2], NumericType).
let point = [TyF64::new(p[0], ty.clone()), TyF64::new(p[1], ty)];
let point = [TyF64::new(p[0], ty), TyF64::new(p[1], ty)];
Ok(point)
}
@ -81,7 +81,7 @@ pub async fn segment_start(exec_state: &mut ExecState, args: Args) -> Result<Kcl
let tag: TagIdentifier = args.get_unlabeled_kw_arg("tag", &RuntimeType::tagged_edge(), exec_state)?;
let pt = inner_segment_start(&tag, exec_state, args.clone())?;
args.make_kcl_val_from_point([pt[0].n, pt[1].n], pt[0].ty.clone())
args.make_kcl_val_from_point([pt[0].n, pt[1].n], pt[0].ty)
}
fn inner_segment_start(tag: &TagIdentifier, exec_state: &mut ExecState, args: Args) -> Result<[TyF64; 2], KclError> {
@ -94,7 +94,7 @@ fn inner_segment_start(tag: &TagIdentifier, exec_state: &mut ExecState, args: Ar
})?;
let (p, ty) = path.start_point_components();
// Docs generation isn't smart enough to handle ([f64; 2], NumericType).
let point = [TyF64::new(p[0], ty.clone()), TyF64::new(p[1], ty)];
let point = [TyF64::new(p[0], ty), TyF64::new(p[1], ty)];
Ok(point)
}

View File

@ -38,6 +38,119 @@ pub enum SketchOrSurface {
Sketch(Box<Sketch>),
}
/// Sketch a rectangle.
pub async fn rectangle(exec_state: &mut ExecState, args: Args) -> Result<KclValue, KclError> {
let sketch_or_surface =
args.get_unlabeled_kw_arg("sketchOrSurface", &RuntimeType::sketch_or_surface(), exec_state)?;
let center = args.get_kw_arg_opt("center", &RuntimeType::point2d(), exec_state)?;
let corner = args.get_kw_arg_opt("corner", &RuntimeType::point2d(), exec_state)?;
let width: TyF64 = args.get_kw_arg("width", &RuntimeType::length(), exec_state)?;
let height: TyF64 = args.get_kw_arg("height", &RuntimeType::length(), exec_state)?;
inner_rectangle(sketch_or_surface, center, corner, width, height, exec_state, args)
.await
.map(Box::new)
.map(|value| KclValue::Sketch { value })
}
async fn inner_rectangle(
sketch_or_surface: SketchOrSurface,
center: Option<[TyF64; 2]>,
corner: Option<[TyF64; 2]>,
width: TyF64,
height: TyF64,
exec_state: &mut ExecState,
args: Args,
) -> Result<Sketch, KclError> {
let sketch_surface = match sketch_or_surface {
SketchOrSurface::SketchSurface(surface) => surface,
SketchOrSurface::Sketch(s) => s.on,
};
// Find the corner in the negative quadrant
let (ty, corner) = match (center, corner) {
(Some(center), None) => (
center[0].ty,
[center[0].n - width.n / 2.0, center[1].n - height.n / 2.0],
),
(None, Some(corner)) => (corner[0].ty, [corner[0].n, corner[1].n]),
(None, None) => {
return Err(KclError::new_semantic(KclErrorDetails::new(
"You must supply either `corner` or `center` arguments, but not both".to_string(),
vec![args.source_range],
)));
}
(Some(_), Some(_)) => {
return Err(KclError::new_semantic(KclErrorDetails::new(
"You must supply either `corner` or `center` arguments, but not both".to_string(),
vec![args.source_range],
)));
}
};
let units = ty.expect_length();
let corner_t = [TyF64::new(corner[0], ty), TyF64::new(corner[1], ty)];
// Start the sketch then draw the 4 lines.
let sketch =
crate::std::sketch::inner_start_profile(sketch_surface, corner_t, None, exec_state, args.clone()).await?;
let sketch_id = sketch.id;
let deltas = [[width.n, 0.0], [0.0, height.n], [-width.n, 0.0], [0.0, -height.n]];
let ids = [
exec_state.next_uuid(),
exec_state.next_uuid(),
exec_state.next_uuid(),
exec_state.next_uuid(),
];
for (id, delta) in ids.iter().copied().zip(deltas) {
exec_state
.batch_modeling_cmd(
ModelingCmdMeta::from_args_id(&args, id),
ModelingCmd::from(mcmd::ExtendPath {
path: sketch.id.into(),
segment: PathSegment::Line {
end: KPoint2d::from(untyped_point_to_mm(delta, units))
.with_z(0.0)
.map(LengthUnit),
relative: true,
},
}),
)
.await?;
}
exec_state
.batch_modeling_cmd(
ModelingCmdMeta::from_args_id(&args, sketch_id),
ModelingCmd::from(mcmd::ClosePath { path_id: sketch.id }),
)
.await?;
// Update the sketch in KCL memory.
let mut new_sketch = sketch.clone();
fn add(a: [f64; 2], b: [f64; 2]) -> [f64; 2] {
[a[0] + b[0], a[1] + b[1]]
}
let a = (corner, add(corner, deltas[0]));
let b = (a.1, add(a.1, deltas[1]));
let c = (b.1, add(b.1, deltas[2]));
let d = (c.1, add(c.1, deltas[3]));
for (id, (from, to)) in ids.into_iter().zip([a, b, c, d]) {
let current_path = Path::ToPoint {
base: BasePath {
from,
to,
tag: None,
units,
geo_meta: GeoMeta {
id,
metadata: args.source_range.into(),
},
},
};
new_sketch.paths.push(current_path);
}
Ok(new_sketch)
}
/// Sketch a circle.
pub async fn circle(exec_state: &mut ExecState, args: Args) -> Result<KclValue, KclError> {
let sketch_or_surface =
@ -71,7 +184,7 @@ async fn inner_circle(
let radius = get_radius(radius, diameter, args.source_range)?;
let from = [center_u[0] + radius.to_length_units(units), center_u[1]];
let from_t = [TyF64::new(from[0], ty.clone()), TyF64::new(from[1], ty)];
let from_t = [TyF64::new(from[0], ty), TyF64::new(from[1], ty)];
let sketch =
crate::std::sketch::inner_start_profile(sketch_surface, from_t, None, exec_state, args.clone()).await?;
@ -156,7 +269,7 @@ async fn inner_circle_three_point(
exec_state: &mut ExecState,
args: Args,
) -> Result<Sketch, KclError> {
let ty = p1[0].ty.clone();
let ty = p1[0].ty;
let units = ty.expect_length();
let p1 = point_to_len_unit(p1, units);
@ -172,10 +285,7 @@ async fn inner_circle_three_point(
SketchOrSurface::Sketch(group) => group.on,
};
let from = [
TyF64::new(center[0] + radius, ty.clone()),
TyF64::new(center[1], ty.clone()),
];
let from = [TyF64::new(center[0] + radius, ty), TyF64::new(center[1], ty)];
let sketch =
crate::std::sketch::inner_start_profile(sketch_surface, from.clone(), None, exec_state, args.clone()).await?;

View File

@ -599,7 +599,7 @@ async fn inner_angled_line_of_x_length(
}
let to = get_y_component(Angle::from_degrees(angle_degrees), length.n);
let to = [TyF64::new(to[0], length.ty.clone()), TyF64::new(to[1], length.ty)];
let to = [TyF64::new(to[0], length.ty), TyF64::new(to[1], length.ty)];
let new_sketch = straight_line(StraightLineParams::relative(to, sketch, tag), exec_state, args).await?;
@ -666,7 +666,7 @@ async fn inner_angled_line_of_y_length(
}
let to = get_x_component(Angle::from_degrees(angle_degrees), length.n);
let to = [TyF64::new(to[0], length.ty.clone()), TyF64::new(to[1], length.ty)];
let to = [TyF64::new(to[0], length.ty), TyF64::new(to[1], length.ty)];
let new_sketch = straight_line(StraightLineParams::relative(to, sketch, tag), exec_state, args).await?;

View File

@ -363,6 +363,9 @@ impl BinaryPart {
BinaryPart::MemberExpression(member_expression) => {
member_expression.recast(options, indentation_level, ctxt)
}
BinaryPart::ArrayExpression(e) => e.recast(options, indentation_level, ctxt),
BinaryPart::ArrayRangeExpression(e) => e.recast(options, indentation_level, ctxt),
BinaryPart::ObjectExpression(e) => e.recast(options, indentation_level, ctxt),
BinaryPart::IfExpression(e) => e.recast(options, indentation_level, ExprContext::Other),
BinaryPart::AscribedExpression(e) => e.recast(options, indentation_level, ExprContext::Other),
}
@ -745,6 +748,9 @@ impl UnaryExpression {
BinaryPart::Literal(_)
| BinaryPart::Name(_)
| BinaryPart::MemberExpression(_)
| BinaryPart::ArrayExpression(_)
| BinaryPart::ArrayRangeExpression(_)
| BinaryPart::ObjectExpression(_)
| BinaryPart::IfExpression(_)
| BinaryPart::AscribedExpression(_)
| BinaryPart::CallExpressionKw(_) => {

View File

@ -220,6 +220,9 @@ impl<'tree> From<&'tree types::BinaryPart> for Node<'tree> {
types::BinaryPart::CallExpressionKw(ce) => ce.as_ref().into(),
types::BinaryPart::UnaryExpression(ue) => ue.as_ref().into(),
types::BinaryPart::MemberExpression(me) => me.as_ref().into(),
types::BinaryPart::ArrayExpression(e) => e.as_ref().into(),
types::BinaryPart::ArrayRangeExpression(e) => e.as_ref().into(),
types::BinaryPart::ObjectExpression(e) => e.as_ref().into(),
types::BinaryPart::IfExpression(e) => e.as_ref().into(),
types::BinaryPart::AscribedExpression(e) => e.as_ref().into(),
}

View File

@ -234,6 +234,39 @@ export fn startProfile(
tag?: TagDecl,
): Sketch {}
/// Sketch a rectangle.
///
/// ```
/// exampleSketch = startSketchOn(-XZ)
/// |> rectangle(center = [0, 0], width = 10, height = 5)
// |> extrude(length = 2)
/// ```
///
/// ```
/// exampleSketch = startSketchOn(-XZ)
/// |> rectangle(corner = [0, 0], width = 10, height = 5)
// |> extrude(length = 2)
/// ```
@(impl = std_rust)
export fn rectangle(
/// Sketch to extend, or plane or surface to sketch on.
@sketchOrSurface: Sketch | Plane | Face,
/// Rectangle's width along X axis.
width: number(Length),
/// Rectangle's height along Y axis.
height: number(Length),
/// The center of the rectangle.
/// Incompatible with `corner`.
@(snippetArray = ["0", "0"])
center?: Point2d,
/// The corner of the rectangle.
/// Incompatible with `center`.
/// This will be the corner which is most negative on
/// both X and Y axes.
@(snippetArray = ["0", "0"])
corner?: Point2d,
): Sketch {}
/// Construct a 2-dimensional circle, of the specified radius, centered at
/// the provided (x, y) origin point.
///
@ -1941,3 +1974,24 @@ export fn subtract2d(
/// The shape(s) which should be cut out of the sketch.
tool: [Sketch; 1+],
): Sketch {}
/// Find the plane a face lies on.
/// Returns an error if the face doesn't lie on any plane (for example, the curved face of a cylinder)
///```kcl
/// triangle = startSketchOn(XY)
/// |> polygon(radius = 3, numSides = 3, center = [0, 0])
/// |> extrude(length = 2)
///
/// // Find the plane of the triangle's top face.
/// topPlane = planeOf(triangle, face = END)
///
/// // Create a new plane, 10 units above the triangle's top face.
/// startSketchOn(offsetPlane(topPlane, offset = 10))
/// ```
@(impl = std_rust)
export fn planeOf(
/// The solid whose face is being queried.
@solid: Solid,
/// Find the plane which this face lies on.
face: TaggedFace,
): Plane {}

View File

@ -210,6 +210,8 @@ export type fn
/// ```
///
/// Any object with appropriate `origin`, `xAxis`, and `yAxis` fields can be used as a plane.
/// The plane's Z axis (i.e. which way is "up") will be the cross product X x Y. In other words,
/// KCL planes follow the right-hand rule.
@(impl = std_rust)
export type Plane

View File

@ -0,0 +1,18 @@
---
source: kcl-lib/src/simulation_tests.rs
description: Artifact commands add_arrays.kcl
---
{
"rust/kcl-lib/tests/add_arrays/input.kcl": [],
"std::appearance": [],
"std::array": [],
"std::math": [],
"std::prelude": [],
"std::sketch": [],
"std::solid": [],
"std::sweep": [],
"std::transform": [],
"std::turns": [],
"std::types": [],
"std::units": []
}

View File

@ -0,0 +1,6 @@
---
source: kcl-lib/src/simulation_tests.rs
description: Artifact graph flowchart add_arrays.kcl
extension: md
snapshot_kind: binary
---

View File

@ -0,0 +1,3 @@
```mermaid
flowchart LR
```

View File

@ -0,0 +1,106 @@
---
source: kcl-lib/src/simulation_tests.rs
description: Result of parsing add_arrays.kcl
---
{
"Ok": {
"body": [
{
"commentStart": 0,
"declaration": {
"commentStart": 0,
"end": 0,
"id": {
"commentStart": 0,
"end": 0,
"moduleId": 0,
"name": "answer",
"start": 0,
"type": "Identifier"
},
"init": {
"commentStart": 0,
"end": 0,
"left": {
"commentStart": 0,
"elements": [
{
"commentStart": 0,
"end": 0,
"moduleId": 0,
"raw": "0",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
},
{
"commentStart": 0,
"end": 0,
"moduleId": 0,
"raw": "1",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 1.0,
"suffix": "None"
}
}
],
"end": 0,
"moduleId": 0,
"start": 0,
"type": "ArrayExpression",
"type": "ArrayExpression"
},
"moduleId": 0,
"operator": "+",
"right": {
"commentStart": 0,
"elements": [
{
"commentStart": 0,
"end": 0,
"moduleId": 0,
"raw": "2",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
}
],
"end": 0,
"moduleId": 0,
"start": 0,
"type": "ArrayExpression",
"type": "ArrayExpression"
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"moduleId": 0,
"start": 0,
"type": "VariableDeclarator"
},
"end": 0,
"kind": "const",
"moduleId": 0,
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
}
],
"commentStart": 0,
"end": 0,
"moduleId": 0,
"start": 0
}
}

View File

@ -0,0 +1,12 @@
---
source: kcl-lib/src/simulation_tests.rs
description: Error from executing add_arrays.kcl
---
KCL Semantic error
× semantic: Expected a number, but found an array of `number`, `number`
╭────
1 │ answer = [0, 1] + [2]
· ───┬──
· ╰── tests/add_arrays/input.kcl
╰────

View File

@ -0,0 +1 @@
answer = [0, 1] + [2]

View File

@ -0,0 +1,96 @@
---
source: kcl-lib/src/simulation_tests.rs
description: Operations executed add_arrays.kcl
---
{
"rust/kcl-lib/tests/add_arrays/input.kcl": [],
"std::appearance": [],
"std::array": [],
"std::math": [
{
"type": "VariableDeclaration",
"name": "PI",
"value": {
"type": "Number",
"value": 3.141592653589793,
"ty": {
"type": "Unknown"
}
},
"visibility": "export",
"nodePath": {
"steps": []
},
"sourceRange": []
},
{
"type": "VariableDeclaration",
"name": "E",
"value": {
"type": "Number",
"value": 2.718281828459045,
"ty": {
"type": "Known",
"type": "Count"
}
},
"visibility": "export",
"nodePath": {
"steps": []
},
"sourceRange": []
},
{
"type": "VariableDeclaration",
"name": "TAU",
"value": {
"type": "Number",
"value": 6.283185307179586,
"ty": {
"type": "Known",
"type": "Count"
}
},
"visibility": "export",
"nodePath": {
"steps": []
},
"sourceRange": []
}
],
"std::prelude": [
{
"type": "VariableDeclaration",
"name": "START",
"value": {
"type": "String",
"value": "start"
},
"visibility": "export",
"nodePath": {
"steps": []
},
"sourceRange": []
},
{
"type": "VariableDeclaration",
"name": "END",
"value": {
"type": "String",
"value": "end"
},
"visibility": "export",
"nodePath": {
"steps": []
},
"sourceRange": []
}
],
"std::sketch": [],
"std::solid": [],
"std::sweep": [],
"std::transform": [],
"std::turns": [],
"std::types": [],
"std::units": []
}

View File

@ -0,0 +1,5 @@
---
source: kcl-lib/src/simulation_tests.rs
description: Result of unparsing add_arrays.kcl
---
answer = [0, 1] + [2]

View File

@ -214,6 +214,14 @@ description: Variables in memory after executing angled_line.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {

View File

@ -195,6 +195,14 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -581,6 +589,14 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -836,6 +852,14 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -1167,6 +1191,14 @@ description: Variables in memory after executing artifact_graph_example_code1.kc
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {

View File

@ -169,6 +169,14 @@ description: Variables in memory after executing artifact_graph_example_code_no_
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -312,6 +320,14 @@ description: Variables in memory after executing artifact_graph_example_code_no_
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {

View File

@ -32,6 +32,14 @@ description: Variables in memory after executing artifact_graph_example_code_off
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
}
},
@ -64,6 +72,14 @@ description: Variables in memory after executing artifact_graph_example_code_off
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
}
},
@ -96,6 +112,14 @@ description: Variables in memory after executing artifact_graph_example_code_off
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
}
},
@ -153,6 +177,14 @@ description: Variables in memory after executing artifact_graph_example_code_off
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {

View File

@ -155,6 +155,14 @@ description: Variables in memory after executing artifact_graph_sketch_on_face_e
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -477,6 +485,14 @@ description: Variables in memory after executing artifact_graph_sketch_on_face_e
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -978,6 +994,14 @@ description: Variables in memory after executing artifact_graph_sketch_on_face_e
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -1650,6 +1674,14 @@ description: Variables in memory after executing artifact_graph_sketch_on_face_e
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -1933,6 +1965,14 @@ description: Variables in memory after executing artifact_graph_sketch_on_face_e
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -2220,6 +2260,14 @@ description: Variables in memory after executing artifact_graph_sketch_on_face_e
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -2679,6 +2727,14 @@ description: Variables in memory after executing artifact_graph_sketch_on_face_e
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -3316,6 +3372,14 @@ description: Variables in memory after executing artifact_graph_sketch_on_face_e
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {

View File

@ -190,6 +190,14 @@ description: Variables in memory after executing basic_fillet_cube_close_opposit
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {

View File

@ -176,6 +176,14 @@ description: Variables in memory after executing basic_fillet_cube_end.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {

View File

@ -204,6 +204,14 @@ description: Variables in memory after executing basic_fillet_cube_next_adjacent
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {

View File

@ -204,6 +204,14 @@ description: Variables in memory after executing basic_fillet_cube_previous_adja
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {

View File

@ -176,6 +176,14 @@ description: Variables in memory after executing basic_fillet_cube_start.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {

View File

@ -76,6 +76,14 @@ description: Variables in memory after executing basic_revolve_circle.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {

View File

@ -82,6 +82,14 @@ description: Variables in memory after executing circle_three_point.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {

View File

@ -169,6 +169,14 @@ description: Variables in memory after executing crazy_multi_profile.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -509,6 +517,14 @@ description: Variables in memory after executing crazy_multi_profile.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -768,6 +784,14 @@ description: Variables in memory after executing crazy_multi_profile.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -934,6 +958,14 @@ description: Variables in memory after executing crazy_multi_profile.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -1201,6 +1233,14 @@ description: Variables in memory after executing crazy_multi_profile.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -1568,6 +1608,14 @@ description: Variables in memory after executing crazy_multi_profile.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -1915,6 +1963,14 @@ description: Variables in memory after executing crazy_multi_profile.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -2205,6 +2261,14 @@ description: Variables in memory after executing crazy_multi_profile.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -2546,6 +2610,14 @@ description: Variables in memory after executing crazy_multi_profile.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -2692,6 +2764,14 @@ description: Variables in memory after executing crazy_multi_profile.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -2830,6 +2910,14 @@ description: Variables in memory after executing crazy_multi_profile.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -2968,6 +3056,14 @@ description: Variables in memory after executing crazy_multi_profile.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -3055,6 +3151,14 @@ description: Variables in memory after executing crazy_multi_profile.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -3219,6 +3323,14 @@ description: Variables in memory after executing crazy_multi_profile.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -3535,6 +3647,14 @@ description: Variables in memory after executing crazy_multi_profile.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -3754,6 +3874,14 @@ description: Variables in memory after executing crazy_multi_profile.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -3828,6 +3956,14 @@ description: Variables in memory after executing crazy_multi_profile.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
}
},
@ -4017,6 +4153,14 @@ description: Variables in memory after executing crazy_multi_profile.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -4095,6 +4239,14 @@ description: Variables in memory after executing crazy_multi_profile.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
}
}

View File

@ -171,6 +171,14 @@ description: Variables in memory after executing cube.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {

View File

@ -217,6 +217,14 @@ description: Variables in memory after executing fillet-and-shell.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -609,6 +617,14 @@ description: Variables in memory after executing fillet-and-shell.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {

View File

@ -93,6 +93,14 @@ description: Variables in memory after executing flush_batch_on_end.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -219,6 +227,14 @@ description: Variables in memory after executing flush_batch_on_end.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -339,6 +355,14 @@ description: Variables in memory after executing flush_batch_on_end.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -447,6 +471,14 @@ description: Variables in memory after executing flush_batch_on_end.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -509,6 +541,14 @@ description: Variables in memory after executing flush_batch_on_end.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
}
}

View File

@ -152,6 +152,14 @@ description: Variables in memory after executing function_sketch.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {

View File

@ -152,6 +152,14 @@ description: Variables in memory after executing function_sketch_with_position.k
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {

View File

@ -83,6 +83,14 @@ description: Variables in memory after executing helix_simple.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {

View File

@ -573,6 +573,14 @@ description: Variables in memory after executing i_shape.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -1414,6 +1422,14 @@ description: Variables in memory after executing i_shape.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -1688,6 +1704,14 @@ description: Variables in memory after executing i_shape.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {

View File

@ -80,6 +80,14 @@ description: Variables in memory after executing import_whole_simple.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {

View File

@ -80,6 +80,14 @@ description: Variables in memory after executing import_whole_transitive_import.
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {

View File

@ -0,0 +1,60 @@
// There are 3 ways to define a plane in KCL, according to https://zoo.dev/docs/kcl-std/types/std-types-Plane
// - A default plane
// - Modifying a default plane e.g. via offsetPlane
// - Defining your own struct
// This file tests they all work equivalently.
// Define a plane using struct representation.
myPlane = {
origin = { x = 0, y = 0, z = 0 },
xAxis = { x = 1, y = 0, z = 0 },
yAxis = { x = 0, y = 1, z = 0 },
}
// Prove we can get its axes and origin.
ax = myPlane.xAxis
assert(ax[0], isEqualTo = 1)
assert(ax[1], isEqualTo = 0)
assert(ax[2], isEqualTo = 0)
ay = myPlane.yAxis
assert(ay[0], isEqualTo = 0)
assert(ay[1], isEqualTo = 1)
assert(ay[2], isEqualTo = 0)
aorigin = myPlane.origin
assert(aorigin[0], isEqualTo = 0)
assert(aorigin[1], isEqualTo = 0)
assert(aorigin[2], isEqualTo = 0)
// Define a plane using standard planes.
myOtherPlane = XY
// Prove we can get its axes and origin.
axOther = myOtherPlane.xAxis
assert(axOther[0], isEqualTo = 1)
assert(axOther[1], isEqualTo = 0)
assert(axOther[2], isEqualTo = 0)
ayOther = myOtherPlane.yAxis
assert(ayOther[0], isEqualTo = 0)
assert(ayOther[1], isEqualTo = 1)
assert(ayOther[2], isEqualTo = 0)
aoriginOther = myOtherPlane.origin
assert(aoriginOther[0], isEqualTo = 0)
assert(aoriginOther[1], isEqualTo = 0)
assert(aoriginOther[2], isEqualTo = 0)
// Define a plane using a plane-modifying function like offsetPlane.
myAlternatePlane = offsetPlane(XY, offset = 0)
// Prove we can get its axes and origin.
axAlternate = myAlternatePlane.xAxis
assert(axAlternate[0], isEqualTo = 1)
assert(axAlternate[1], isEqualTo = 0)
assert(axAlternate[2], isEqualTo = 0)
ayAlternate = myAlternatePlane.yAxis
assert(ayAlternate[0], isEqualTo = 0)
assert(ayAlternate[1], isEqualTo = 1)
assert(ayAlternate[2], isEqualTo = 0)
aoriginAlternate = myAlternatePlane.origin
assert(aoriginAlternate[0], isEqualTo = 0)
assert(aoriginAlternate[1], isEqualTo = 0)
assert(aoriginAlternate[2], isEqualTo = 0)

View File

@ -152,6 +152,14 @@ description: Variables in memory after executing intersect_cubes.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -332,6 +340,14 @@ description: Variables in memory after executing intersect_cubes.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -512,6 +528,14 @@ description: Variables in memory after executing intersect_cubes.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {

View File

@ -376,6 +376,14 @@ description: Variables in memory after executing involute_circular_units.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {

File diff suppressed because it is too large Load Diff

View File

@ -152,6 +152,14 @@ description: Variables in memory after executing ball-joint-rod-end.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -362,6 +370,14 @@ description: Variables in memory after executing ball-joint-rod-end.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -426,6 +442,14 @@ description: Variables in memory after executing ball-joint-rod-end.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
}
},
@ -515,6 +539,14 @@ description: Variables in memory after executing ball-joint-rod-end.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -711,6 +743,14 @@ description: Variables in memory after executing ball-joint-rod-end.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
}
},
@ -818,6 +858,14 @@ description: Variables in memory after executing ball-joint-rod-end.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -905,6 +953,14 @@ description: Variables in memory after executing ball-joint-rod-end.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -1087,6 +1143,14 @@ description: Variables in memory after executing ball-joint-rod-end.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -1290,6 +1354,14 @@ description: Variables in memory after executing ball-joint-rod-end.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -1354,6 +1426,14 @@ description: Variables in memory after executing ball-joint-rod-end.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
}
},
@ -1442,6 +1522,14 @@ description: Variables in memory after executing ball-joint-rod-end.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
}
},
@ -1474,6 +1562,14 @@ description: Variables in memory after executing ball-joint-rod-end.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
}
},
@ -1709,6 +1805,14 @@ description: Variables in memory after executing ball-joint-rod-end.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -1977,6 +2081,14 @@ description: Variables in memory after executing ball-joint-rod-end.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -2245,6 +2357,14 @@ description: Variables in memory after executing ball-joint-rod-end.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -2513,6 +2633,14 @@ description: Variables in memory after executing ball-joint-rod-end.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -2644,6 +2772,14 @@ description: Variables in memory after executing ball-joint-rod-end.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -3043,6 +3179,14 @@ description: Variables in memory after executing ball-joint-rod-end.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": -1.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -3398,6 +3542,14 @@ description: Variables in memory after executing ball-joint-rod-end.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": -1.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -3670,6 +3822,14 @@ description: Variables in memory after executing ball-joint-rod-end.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -3890,6 +4050,14 @@ description: Variables in memory after executing ball-joint-rod-end.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -3956,6 +4124,14 @@ description: Variables in memory after executing ball-joint-rod-end.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
}
},
@ -3988,6 +4164,14 @@ description: Variables in memory after executing ball-joint-rod-end.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": -1.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
}
},

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

After

Width:  |  Height:  |  Size: 84 KiB

View File

@ -349,6 +349,14 @@ description: Variables in memory after executing bone-plate.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -457,6 +465,14 @@ description: Variables in memory after executing bone-plate.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -565,6 +581,14 @@ description: Variables in memory after executing bone-plate.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -673,6 +697,14 @@ description: Variables in memory after executing bone-plate.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -781,6 +813,14 @@ description: Variables in memory after executing bone-plate.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -889,6 +929,14 @@ description: Variables in memory after executing bone-plate.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -997,6 +1045,14 @@ description: Variables in memory after executing bone-plate.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -1105,6 +1161,14 @@ description: Variables in memory after executing bone-plate.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -1727,6 +1791,14 @@ description: Variables in memory after executing bone-plate.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -2376,6 +2448,14 @@ description: Variables in memory after executing bone-plate.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {

View File

@ -131,6 +131,14 @@ description: Variables in memory after executing bottle.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -384,6 +392,14 @@ description: Variables in memory after executing bottle.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -647,6 +663,14 @@ description: Variables in memory after executing bottle.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -599,59 +599,17 @@ flowchart LR
438["SweepEdge Adjacent"]
439["Plane<br>[482, 499, 6]"]
456["Sweep Revolve<br>[1502, 1531, 6]"]
457[Wall]
%% face_code_ref=Missing NodePath
458[Wall]
%% face_code_ref=Missing NodePath
459[Wall]
%% face_code_ref=Missing NodePath
460[Wall]
%% face_code_ref=Missing NodePath
461[Wall]
%% face_code_ref=Missing NodePath
462[Wall]
%% face_code_ref=Missing NodePath
463[Wall]
%% face_code_ref=Missing NodePath
464[Wall]
%% face_code_ref=Missing NodePath
465[Wall]
%% face_code_ref=Missing NodePath
466[Wall]
%% face_code_ref=Missing NodePath
467[Wall]
%% face_code_ref=Missing NodePath
468[Wall]
%% face_code_ref=Missing NodePath
469[Wall]
%% face_code_ref=Missing NodePath
470[Wall]
%% face_code_ref=Missing NodePath
471["SweepEdge Adjacent"]
472["SweepEdge Adjacent"]
473["SweepEdge Adjacent"]
474["SweepEdge Adjacent"]
475["SweepEdge Adjacent"]
476["SweepEdge Adjacent"]
477["SweepEdge Adjacent"]
478["SweepEdge Adjacent"]
479["SweepEdge Adjacent"]
480["SweepEdge Adjacent"]
481["SweepEdge Adjacent"]
482["SweepEdge Adjacent"]
483["SweepEdge Adjacent"]
484["SweepEdge Adjacent"]
485["StartSketchOnFace<br>[635, 669, 1]"]
486["StartSketchOnFace<br>[912, 951, 1]"]
487["StartSketchOnFace<br>[1254, 1288, 1]"]
488["StartSketchOnFace<br>[792, 824, 3]"]
489["StartSketchOnFace<br>[974, 1010, 3]"]
490["StartSketchOnFace<br>[1417, 1451, 3]"]
491["StartSketchOnFace<br>[1561, 1600, 3]"]
492["StartSketchOnFace<br>[1751, 1789, 3]"]
493["StartSketchOnFace<br>[2055, 2089, 3]"]
494["StartSketchOnFace<br>[2389, 2423, 3]"]
495["StartSketchOnFace<br>[2877, 2915, 3]"]
457["StartSketchOnFace<br>[635, 669, 1]"]
458["StartSketchOnFace<br>[912, 951, 1]"]
459["StartSketchOnFace<br>[1254, 1288, 1]"]
460["StartSketchOnFace<br>[792, 824, 3]"]
461["StartSketchOnFace<br>[974, 1010, 3]"]
462["StartSketchOnFace<br>[1417, 1451, 3]"]
463["StartSketchOnFace<br>[1561, 1600, 3]"]
464["StartSketchOnFace<br>[1751, 1789, 3]"]
465["StartSketchOnFace<br>[2055, 2089, 3]"]
466["StartSketchOnFace<br>[2389, 2423, 3]"]
467["StartSketchOnFace<br>[2877, 2915, 3]"]
1 --- 2
1 --- 5
2 --- 3
@ -676,8 +634,8 @@ flowchart LR
11 --- 17
11 --- 37
38 <--x 11
11 <--x 485
11 <--x 487
11 <--x 457
11 <--x 459
14 --- 15
14 --- 16
14 ---- 20
@ -698,7 +656,7 @@ flowchart LR
24 <--x 23
23 --- 26
27 <--x 23
23 <--x 486
23 <--x 458
26 --- 27
26 --- 28
26 ---- 29
@ -1121,13 +1079,13 @@ flowchart LR
286 <--x 210
287 <--x 210
288 <--x 210
210 <--x 490
210 <--x 493
210 <--x 494
210 <--x 462
210 <--x 465
210 <--x 466
212 <--x 211
211 --- 214
215 <--x 211
211 <--x 488
211 <--x 460
214 --- 215
214 --- 216
214 ---- 217
@ -1143,7 +1101,7 @@ flowchart LR
220 <--x 219
219 --- 222
223 <--x 219
219 <--x 489
219 <--x 461
222 --- 223
222 --- 224
222 ---- 225
@ -1169,7 +1127,7 @@ flowchart LR
237 --- 240
239 <--x 238
238 --- 241
238 <--x 491
238 <--x 463
241 --- 242
241 --- 243
241 ---- 244
@ -1193,8 +1151,8 @@ flowchart LR
311 <--x 247
312 <--x 247
313 <--x 247
247 <--x 492
247 <--x 495
247 <--x 464
247 <--x 467
250 --- 251
250 --- 252
250 ---- 253
@ -1616,102 +1574,4 @@ flowchart LR
440 --- 454
440 --- 455
440 ---- 456
456 <--x 441
441 --- 457
441 --- 471
456 <--x 442
442 --- 458
442 --- 472
456 <--x 443
443 --- 459
443 --- 473
456 <--x 444
444 --- 460
444 --- 474
456 <--x 445
445 --- 461
445 --- 475
456 <--x 446
446 --- 462
446 --- 476
456 <--x 447
447 --- 463
447 --- 477
456 <--x 448
448 --- 464
448 --- 478
456 <--x 449
449 --- 465
449 --- 479
456 <--x 450
450 --- 466
450 --- 480
456 <--x 451
451 --- 467
451 --- 481
456 <--x 452
452 --- 468
452 --- 482
456 <--x 453
453 --- 469
453 --- 483
456 <--x 454
454 --- 470
454 --- 484
456 --- 457
456 --- 458
456 --- 459
456 --- 460
456 --- 461
456 --- 462
456 --- 463
456 --- 464
456 --- 465
456 --- 466
456 --- 467
456 --- 468
456 --- 469
456 --- 470
456 --- 471
456 --- 472
456 --- 473
456 --- 474
456 --- 475
456 --- 476
456 --- 477
456 --- 478
456 --- 479
456 --- 480
456 --- 481
456 --- 482
456 --- 483
456 --- 484
457 --- 471
484 <--x 457
471 <--x 458
458 --- 472
472 <--x 459
459 --- 473
473 <--x 460
460 --- 474
474 <--x 461
461 --- 475
475 <--x 462
462 --- 476
476 <--x 463
463 --- 477
477 <--x 464
464 --- 478
478 <--x 465
465 --- 479
479 <--x 466
466 --- 480
480 <--x 467
467 --- 481
481 <--x 468
468 --- 482
482 <--x 469
469 --- 483
483 <--x 470
470 --- 484
```

View File

@ -114,6 +114,14 @@ description: Variables in memory after executing clock.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -208,6 +216,14 @@ description: Variables in memory after executing clock.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
}
},
@ -417,6 +433,14 @@ description: Variables in memory after executing clock.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -669,6 +693,14 @@ description: Variables in memory after executing clock.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -1896,6 +1928,14 @@ description: Variables in memory after executing clock.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -2092,6 +2132,14 @@ description: Variables in memory after executing clock.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -2347,6 +2395,14 @@ description: Variables in memory after executing clock.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -2707,6 +2763,14 @@ description: Variables in memory after executing clock.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -3021,6 +3085,14 @@ description: Variables in memory after executing clock.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -3118,6 +3190,14 @@ description: Variables in memory after executing clock.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -3358,6 +3438,14 @@ description: Variables in memory after executing clock.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -3455,6 +3543,14 @@ description: Variables in memory after executing clock.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -3685,6 +3781,14 @@ description: Variables in memory after executing clock.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -3783,6 +3887,14 @@ description: Variables in memory after executing clock.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
}
},
@ -3815,6 +3927,14 @@ description: Variables in memory after executing clock.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
}
},

View File

@ -207,226 +207,11 @@ description: Variables in memory after executing cold-plate.kcl
"units": {
"type": "Unknown"
}
}
},
"start": {
"from": [
2.6875,
1.25
],
"to": [
2.6875,
1.25
],
"units": {
"type": "Inches"
},
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Inches"
}
},
"height": 10.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"units": {
"type": "Inches"
},
"sectional": false
}
},
{
"type": "Solid",
"value": {
"type": "Solid",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": null,
"type": "extrudeArc"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": null,
"type": "extrudeArc"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
2.6875,
1.25
],
"p1": [
2.6875,
1.25
],
"p2": [
3.0,
1.15625
],
"p3": [
3.3125,
1.25
],
"tag": null,
"to": [
3.3125,
1.25
],
"type": "ArcThreePoint",
"units": {
"type": "Inches"
}
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
3.3125,
1.25
],
"tag": null,
"to": [
3.3125,
0.625
],
"type": "ToPoint",
"units": {
"type": "Inches"
}
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
3.3125,
0.625
],
"p1": [
3.3125,
0.625
],
"p2": [
3.0,
0.9375
],
"p3": [
2.6875,
0.625
],
"tag": null,
"to": [
2.6875,
0.625
],
"type": "ArcThreePoint",
"units": {
"type": "Inches"
}
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
2.6875,
0.625
],
"tag": null,
"to": [
2.6875,
1.25
],
"type": "ToPoint",
"units": {
"type": "Inches"
}
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
2.6875,
1.25
],
"tag": null,
"to": [
2.6875,
1.25
],
"type": "ToPoint",
"units": {
"type": "Inches"
}
}
],
"on": {
"artifactId": "[uuid]",
"id": "[uuid]",
"origin": {
"x": 0.0,
"zAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Mm"
}
},
"type": "plane",
"value": "YZ",
"xAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
},
"yAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
@ -653,6 +438,14 @@ description: Variables in memory after executing cold-plate.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -876,6 +669,245 @@ description: Variables in memory after executing cold-plate.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
"from": [
2.6875,
1.25
],
"to": [
2.6875,
1.25
],
"units": {
"type": "Inches"
},
"tag": null,
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
}
},
"artifactId": "[uuid]",
"originalId": "[uuid]",
"units": {
"type": "Inches"
}
},
"height": 10.0,
"startCapId": "[uuid]",
"endCapId": "[uuid]",
"units": {
"type": "Inches"
},
"sectional": false
}
},
{
"type": "Solid",
"value": {
"type": "Solid",
"id": "[uuid]",
"artifactId": "[uuid]",
"value": [
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": null,
"type": "extrudeArc"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": null,
"type": "extrudeArc"
},
{
"faceId": "[uuid]",
"id": "[uuid]",
"sourceRange": [],
"tag": null,
"type": "extrudePlane"
}
],
"sketch": {
"type": "Sketch",
"id": "[uuid]",
"paths": [
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
2.6875,
1.25
],
"p1": [
2.6875,
1.25
],
"p2": [
3.0,
1.15625
],
"p3": [
3.3125,
1.25
],
"tag": null,
"to": [
3.3125,
1.25
],
"type": "ArcThreePoint",
"units": {
"type": "Inches"
}
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
3.3125,
1.25
],
"tag": null,
"to": [
3.3125,
0.625
],
"type": "ToPoint",
"units": {
"type": "Inches"
}
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
3.3125,
0.625
],
"p1": [
3.3125,
0.625
],
"p2": [
3.0,
0.9375
],
"p3": [
2.6875,
0.625
],
"tag": null,
"to": [
2.6875,
0.625
],
"type": "ArcThreePoint",
"units": {
"type": "Inches"
}
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
2.6875,
0.625
],
"tag": null,
"to": [
2.6875,
1.25
],
"type": "ToPoint",
"units": {
"type": "Inches"
}
},
{
"__geoMeta": {
"id": "[uuid]",
"sourceRange": []
},
"from": [
2.6875,
1.25
],
"tag": null,
"to": [
2.6875,
1.25
],
"type": "ToPoint",
"units": {
"type": "Inches"
}
}
],
"on": {
"artifactId": "[uuid]",
"id": "[uuid]",
"origin": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Mm"
}
},
"type": "plane",
"value": "YZ",
"xAxis": {
"x": 0.0,
"y": 1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
},
"yAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -1281,6 +1313,14 @@ description: Variables in memory after executing cold-plate.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -1552,6 +1592,14 @@ description: Variables in memory after executing cold-plate.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -1732,6 +1780,14 @@ description: Variables in memory after executing cold-plate.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {

View File

@ -32,6 +32,14 @@ description: Variables in memory after executing color-cube.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
}
},
@ -77,6 +85,14 @@ description: Variables in memory after executing color-cube.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
}
},
@ -135,6 +151,14 @@ description: Variables in memory after executing color-cube.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
}
},
@ -167,6 +191,14 @@ description: Variables in memory after executing color-cube.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
}
},
@ -229,6 +261,14 @@ description: Variables in memory after executing color-cube.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
}
},
@ -261,6 +301,14 @@ description: Variables in memory after executing color-cube.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
}
}

View File

@ -141,6 +141,14 @@ description: Variables in memory after executing counterdrilled-weldment.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -412,6 +420,14 @@ description: Variables in memory after executing counterdrilled-weldment.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 1.0,
"y": 0.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -667,6 +683,14 @@ description: Variables in memory after executing counterdrilled-weldment.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -952,6 +976,14 @@ description: Variables in memory after executing counterdrilled-weldment.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {

View File

@ -347,6 +347,14 @@ description: Variables in memory after executing countersunk-plate.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {

View File

@ -324,6 +324,14 @@ description: Variables in memory after executing curtain-wall-anchor-plate.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -802,6 +810,14 @@ description: Variables in memory after executing curtain-wall-anchor-plate.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -1244,6 +1260,14 @@ description: Variables in memory after executing curtain-wall-anchor-plate.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -1602,6 +1626,14 @@ description: Variables in memory after executing curtain-wall-anchor-plate.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -1965,6 +1997,14 @@ description: Variables in memory after executing curtain-wall-anchor-plate.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -2137,6 +2177,14 @@ description: Variables in memory after executing curtain-wall-anchor-plate.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
}
},
@ -2280,6 +2328,14 @@ description: Variables in memory after executing curtain-wall-anchor-plate.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -2481,6 +2537,14 @@ description: Variables in memory after executing curtain-wall-anchor-plate.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -2690,6 +2754,14 @@ description: Variables in memory after executing curtain-wall-anchor-plate.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {

View File

@ -176,6 +176,14 @@ description: Variables in memory after executing dodecahedron.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -356,6 +364,14 @@ description: Variables in memory after executing dodecahedron.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -536,6 +552,14 @@ description: Variables in memory after executing dodecahedron.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -716,6 +740,14 @@ description: Variables in memory after executing dodecahedron.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -896,6 +928,14 @@ description: Variables in memory after executing dodecahedron.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -1076,6 +1116,14 @@ description: Variables in memory after executing dodecahedron.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -1256,6 +1304,14 @@ description: Variables in memory after executing dodecahedron.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -1436,6 +1492,14 @@ description: Variables in memory after executing dodecahedron.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -1616,6 +1680,14 @@ description: Variables in memory after executing dodecahedron.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -1796,6 +1868,14 @@ description: Variables in memory after executing dodecahedron.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -1976,6 +2056,14 @@ description: Variables in memory after executing dodecahedron.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -2156,6 +2244,14 @@ description: Variables in memory after executing dodecahedron.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {

View File

@ -223,6 +223,14 @@ description: Variables in memory after executing enclosure.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -570,6 +578,14 @@ description: Variables in memory after executing enclosure.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -1128,6 +1144,14 @@ description: Variables in memory after executing enclosure.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -1644,6 +1668,14 @@ description: Variables in memory after executing enclosure.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -1847,6 +1879,14 @@ description: Variables in memory after executing enclosure.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -2261,6 +2301,14 @@ description: Variables in memory after executing enclosure.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {

View File

@ -194,6 +194,14 @@ description: Variables in memory after executing engine-valve.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -466,6 +474,14 @@ description: Variables in memory after executing engine-valve.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -838,6 +854,14 @@ description: Variables in memory after executing engine-valve.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -1310,6 +1334,14 @@ description: Variables in memory after executing engine-valve.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -1882,6 +1914,14 @@ description: Variables in memory after executing engine-valve.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -2554,6 +2594,14 @@ description: Variables in memory after executing engine-valve.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -3354,6 +3402,14 @@ description: Variables in memory after executing engine-valve.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -3975,6 +4031,14 @@ description: Variables in memory after executing engine-valve.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -4058,6 +4122,14 @@ description: Variables in memory after executing engine-valve.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
}
},
@ -4277,6 +4349,14 @@ description: Variables in memory after executing engine-valve.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": -1.0,
"z": 0.0,
"units": {
"type": "Unknown"
}
}
},
"start": {
@ -4422,6 +4502,14 @@ description: Variables in memory after executing engine-valve.kcl
"units": {
"type": "Unknown"
}
},
"zAxis": {
"x": 0.0,
"y": 0.0,
"z": 1.0,
"units": {
"type": "Unknown"
}
}
},
"start": {

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