Compare commits
220 Commits
jtran/fix-
...
achalmers/
Author | SHA1 | Date | |
---|---|---|---|
cbca63c6e0 | |||
b3cd5ef3ba | |||
a094995730 | |||
46b4b01d23 | |||
4d1eaf9381 | |||
df3668adc8 | |||
270781d5cd | |||
96b93f8d51 | |||
59b1c414f0 | |||
fd07b8cff5 | |||
21efb2c0bd | |||
30029a63a1 | |||
9f5003cafc | |||
5232e1d40a | |||
23c25c2b50 | |||
50273c0edc | |||
8a03bf50e3 | |||
7500ef0065 | |||
099c48cd63 | |||
f35cd3ef26 | |||
695c432d1e | |||
2835665a6a | |||
45707d2974 | |||
b2e1d21d45 | |||
b98f5605b6 | |||
c050e03df1 | |||
b6fa4325f0 | |||
0804aecc63 | |||
3dfc2c86e1 | |||
71647ede29 | |||
cd679f4be3 | |||
18d87b99bd | |||
70a2202877 | |||
f5c9f84ae9 | |||
71f701dec7 | |||
bffbed1d42 | |||
9f60ed8e75 | |||
57b366b2d0 | |||
6f3f5dbda9 | |||
8dd25715fb | |||
834f7133d8 | |||
8c5662e458 | |||
f37fc357af | |||
e27e9ecc63 | |||
78b42ea191 | |||
5d02a27122 | |||
49d52ce94b | |||
a572d7b0db | |||
1f405b9327 | |||
0874891dd0 | |||
59d0e079a1 | |||
b9862baed0 | |||
592c5259c6 | |||
950f5cebfd | |||
4c0ea136e0 | |||
81c0035adc | |||
c68e5d7774 | |||
ed8a0e4aaa | |||
322f398049 | |||
bc4d254297 | |||
10b7a772bf | |||
86ba586318 | |||
cc313afb89 | |||
d0c8311e41 | |||
28311d160a | |||
162856064b | |||
652f82e8c3 | |||
d4d9bf6c7f | |||
0e9d37c0a0 | |||
9c18060d73 | |||
e2be66b024 | |||
1bb372b642 | |||
627fbda671 | |||
74bdb72edc | |||
a9182bf357 | |||
5f14023404 | |||
9a3ac64603 | |||
67e60cb832 | |||
110037df79 | |||
30b1dae38a | |||
f20fc5b467 | |||
1bfc3a0a3c | |||
f6e975db84 | |||
b82eec85fd | |||
5dc4213295 | |||
61807e7629 | |||
357bbffce5 | |||
6ac9c49773 | |||
020497cde2 | |||
688852a5df | |||
6c635bd70d | |||
1c0a38a1e2 | |||
019cb815f9 | |||
c8653beae7 | |||
9ea3cb51ba | |||
e0de0493ab | |||
11cac0c30e | |||
4de50edf5a | |||
bebace193d | |||
f4d5578faf | |||
fed922cfb8 | |||
2b7325655b | |||
d3b02b8c5b | |||
9008fb636f | |||
eb4048cd16 | |||
c30b161e95 | |||
0e68d03612 | |||
95fd14eedc | |||
3c367426c6 | |||
a277cce636 | |||
df86c93a04 | |||
8aabac0be7 | |||
138728a95d | |||
9a92e7d642 | |||
efedc8de58 | |||
f7ee248a26 | |||
336f4f27ba | |||
e1f128d64a | |||
f858a611f1 | |||
6ce270c0d0 | |||
30ac0e4f48 | |||
8f90c352fe | |||
bc6f0fceca | |||
5c830a4ed4 | |||
8a9d50226f | |||
8397405998 | |||
f5b8298735 | |||
25ad603502 | |||
86349375d0 | |||
56d861f2cc | |||
3e8ee3ffc4 | |||
a44516bc7e | |||
ce62fe67cf | |||
763a1b6628 | |||
3281e62e6b | |||
f1a458f124 | |||
229433126d | |||
b962b5fcb3 | |||
428d125139 | |||
cffeb52b4b | |||
e0ef10e7bb | |||
7095ce2377 | |||
5b207d7d1a | |||
2fac213c58 | |||
2f72a8ef14 | |||
27ce9f8aa4 | |||
b0426e3f94 | |||
d707c66e53 | |||
f8f44743fa | |||
f262eda12a | |||
9e1136195a | |||
4ff07ddaee | |||
1e565379a7 | |||
76e34ac4da | |||
4cd427bf91 | |||
f321ecdff0 | |||
d114ab798c | |||
69fec37107 | |||
8ca8c49cc3 | |||
b25fc302fd | |||
648b37c1dd | |||
18e5da5ca4 | |||
46524cda10 | |||
4585671a5d | |||
e7203b9e7a | |||
ab375f4b92 | |||
04ed6f52ee | |||
2332338ca1 | |||
41b97de3d1 | |||
8ef31a0be1 | |||
3adb42b5f2 | |||
20016b101e | |||
8d9dbf36c3 | |||
440704ed9f | |||
2261217a5d | |||
10da986649 | |||
10789d9c3c | |||
67cc4f5835 | |||
2692f2b73a | |||
965cb18059 | |||
a022b8ef6c | |||
4d24bf7c94 | |||
9a537da183 | |||
df81b76b8b | |||
ac3f7ab712 | |||
dac91d3b79 | |||
0698432abf | |||
0592d3b5da | |||
31e4d60045 | |||
c0817b00e4 | |||
4ea1d16fb6 | |||
d049bf33e8 | |||
7b11047d07 | |||
412e9568f2 | |||
9be208e5e1 | |||
842ef5ede9 | |||
3f855d7bad | |||
0a1a6e50cf | |||
d4e955289c | |||
c147a219f4 | |||
38513a1e25 | |||
c0c5c790ca | |||
8b60f75220 | |||
f91ad4331f | |||
59103a2118 | |||
9737c2550a | |||
bf9d01a8dd | |||
702e322f90 | |||
e82830754d | |||
7806377a5a | |||
859afa2fd8 | |||
0a5f3093fc | |||
b65f7939f6 | |||
c35dea5e07 | |||
fc66d4745f | |||
b313d26c2a | |||
00b94ead62 | |||
0531ea1ce9 | |||
5f9a4887c1 | |||
da7dfa16d8 |
@ -1,3 +1,3 @@
|
|||||||
[codespell]
|
[codespell]
|
||||||
ignore-words-list: crate,everytime,inout,co-ordinate,ot,nwo,atleast,ue,afterall
|
ignore-words-list: crate,everytime,inout,co-ordinate,ot,nwo,atleast,ue,afterall,ser
|
||||||
skip: **/target,node_modules,build,dist,./out,**/Cargo.lock,./docs/kcl/*.md,.yarn.lock,**/yarn.lock,./openapi/*.json,./packages/codemirror-lang-kcl/test/all.test.ts,tsconfig.tsbuildinfo
|
skip: **/target,node_modules,build,dist,./out,**/Cargo.lock,./docs/kcl/*.md,.yarn.lock,**/yarn.lock,./openapi/*.json,./packages/codemirror-lang-kcl/test/all.test.ts,tsconfig.tsbuildinfo
|
||||||
|
@ -2,8 +2,8 @@ NODE_ENV=development
|
|||||||
DEV=true
|
DEV=true
|
||||||
VITE_KC_API_WS_MODELING_URL=wss://api.dev.zoo.dev/ws/modeling/commands
|
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_API_BASE_URL=https://api.dev.zoo.dev
|
||||||
BASE_URL=https://api.dev.zoo.dev
|
|
||||||
VITE_KC_SITE_BASE_URL=https://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_SKIP_AUTH=false
|
||||||
VITE_KC_CONNECTION_TIMEOUT_MS=5000
|
VITE_KC_CONNECTION_TIMEOUT_MS=5000
|
||||||
# ONLY add your token in .env.development.local if you want to skip auth, otherwise this token takes precedence!
|
# ONLY add your token in .env.development.local if you want to skip auth, otherwise this token takes precedence!
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
|
NODE_ENV=production
|
||||||
VITE_KC_API_WS_MODELING_URL=wss://api.zoo.dev/ws/modeling/commands
|
VITE_KC_API_WS_MODELING_URL=wss://api.zoo.dev/ws/modeling/commands
|
||||||
VITE_KC_API_BASE_URL=https://api.zoo.dev
|
VITE_KC_API_BASE_URL=https://api.zoo.dev
|
||||||
VITE_KC_SITE_BASE_URL=https://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_SKIP_AUTH=false
|
||||||
VITE_KC_CONNECTION_TIMEOUT_MS=15000
|
VITE_KC_CONNECTION_TIMEOUT_MS=15000
|
||||||
|
23
.eslintrc
23
.eslintrc
@ -6,21 +6,36 @@
|
|||||||
"plugins": [
|
"plugins": [
|
||||||
"css-modules",
|
"css-modules",
|
||||||
"jest",
|
"jest",
|
||||||
|
"jsx-a11y",
|
||||||
"react",
|
"react",
|
||||||
|
"react-hooks",
|
||||||
"suggest-no-throw",
|
"suggest-no-throw",
|
||||||
|
"testing-library",
|
||||||
"@typescript-eslint"
|
"@typescript-eslint"
|
||||||
],
|
],
|
||||||
"extends": [
|
"extends": [
|
||||||
"plugin:css-modules/recommended"
|
"plugin:css-modules/recommended",
|
||||||
|
"plugin:jsx-a11y/recommended",
|
||||||
|
"plugin:react-hooks/recommended"
|
||||||
],
|
],
|
||||||
"rules": {
|
"rules": {
|
||||||
"@typescript-eslint/no-floating-promises": "error",
|
"@typescript-eslint/no-floating-promises": "error",
|
||||||
"@typescript-eslint/no-misused-promises": "error",
|
"@typescript-eslint/no-misused-promises": "error",
|
||||||
|
"jsx-a11y/click-events-have-key-events": "off",
|
||||||
|
"jsx-a11y/no-autofocus": "off",
|
||||||
|
"jsx-a11y/no-noninteractive-element-interactions": "off",
|
||||||
"no-restricted-globals": [
|
"no-restricted-globals": [
|
||||||
"error",
|
"error",
|
||||||
{
|
{
|
||||||
"name": "isNaN",
|
"name": "isNaN",
|
||||||
"message": "Use Number.isNaN() instead."
|
"message": "Use Number.isNaN() instead."
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"no-restricted-syntax": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
"selector": "CallExpression[callee.object.name='Array'][callee.property.name='isArray']",
|
||||||
|
"message": "Use isArray() in lib/utils.ts instead of Array.isArray()."
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"semi": [
|
"semi": [
|
||||||
@ -33,6 +48,9 @@
|
|||||||
"overrides": [
|
"overrides": [
|
||||||
{
|
{
|
||||||
"files": ["e2e/**/*.ts"], // Update the pattern based on your file structure
|
"files": ["e2e/**/*.ts"], // Update the pattern based on your file structure
|
||||||
|
"extends": [
|
||||||
|
"plugin:testing-library/react"
|
||||||
|
],
|
||||||
"rules": {
|
"rules": {
|
||||||
"suggest-no-throw/suggest-no-throw": "off",
|
"suggest-no-throw/suggest-no-throw": "off",
|
||||||
"testing-library/prefer-screen-queries": "off",
|
"testing-library/prefer-screen-queries": "off",
|
||||||
@ -41,6 +59,9 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"files": ["src/**/*.test.ts"],
|
"files": ["src/**/*.test.ts"],
|
||||||
|
"extends": [
|
||||||
|
"plugin:testing-library/react"
|
||||||
|
],
|
||||||
"rules": {
|
"rules": {
|
||||||
"suggest-no-throw/suggest-no-throw": "off",
|
"suggest-no-throw/suggest-no-throw": "off",
|
||||||
}
|
}
|
||||||
|
13
.gitattributes
vendored
Normal file
13
.gitattributes
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# Set default behavior to automatically normalize line endings.
|
||||||
|
* text=auto
|
||||||
|
|
||||||
|
# Force batch scripts to always use CRLF line endings so that if a repo is accessed
|
||||||
|
# in Windows via a file share from Linux, the scripts will work.
|
||||||
|
*.{cmd,[cC][mM][dD]} text working-tree-encoding=UTF-16LE eol=CRLF
|
||||||
|
*.{bat,[bB][aA][tT]} text working-tree-encoding=UTF-16LE eol=CRLF
|
||||||
|
*.{ics,[iI][cC][sS]} text working-tree-encoding=UTF-16LE eol=CRLF
|
||||||
|
*.{ps1,[iP][sS][1]} text working-tree-encoding=UTF-16LE eol=CRLF
|
||||||
|
|
||||||
|
# Force bash scripts to always use LF line endings so that if a repo is accessed
|
||||||
|
# in Unix via a file share from Windows, the scripts will work.
|
||||||
|
*.sh text eol=lfol=lf
|
17
.github/dependabot.yml
vendored
17
.github/dependabot.yml
vendored
@ -6,23 +6,29 @@
|
|||||||
version: 2
|
version: 2
|
||||||
updates:
|
updates:
|
||||||
- package-ecosystem: 'npm' # See documentation for possible values
|
- package-ecosystem: 'npm' # See documentation for possible values
|
||||||
directory: '/' # Location of package manifests
|
directories:
|
||||||
|
- '/'
|
||||||
|
- '/packages/codemirror-lang-kcl/'
|
||||||
|
- '/packages/codemirror-lsp-client/'
|
||||||
schedule:
|
schedule:
|
||||||
interval: 'weekly'
|
interval: weekly
|
||||||
|
day: monday
|
||||||
reviewers:
|
reviewers:
|
||||||
- franknoirot
|
- franknoirot
|
||||||
- irev-dev
|
- irev-dev
|
||||||
- package-ecosystem: 'github-actions' # See documentation for possible values
|
- package-ecosystem: 'github-actions' # See documentation for possible values
|
||||||
directory: '/' # Location of package manifests
|
directory: '/' # Location of package manifests
|
||||||
schedule:
|
schedule:
|
||||||
interval: 'weekly'
|
interval: weekly
|
||||||
|
day: monday
|
||||||
reviewers:
|
reviewers:
|
||||||
- adamchalmers
|
- adamchalmers
|
||||||
- jessfraz
|
- jessfraz
|
||||||
- package-ecosystem: 'cargo' # See documentation for possible values
|
- package-ecosystem: 'cargo' # See documentation for possible values
|
||||||
directory: '/src/wasm-lib/' # Location of package manifests
|
directory: '/src/wasm-lib/' # Location of package manifests
|
||||||
schedule:
|
schedule:
|
||||||
interval: 'weekly'
|
interval: weekly
|
||||||
|
day: monday
|
||||||
reviewers:
|
reviewers:
|
||||||
- adamchalmers
|
- adamchalmers
|
||||||
- jessfraz
|
- jessfraz
|
||||||
@ -30,3 +36,6 @@ updates:
|
|||||||
serde-dependencies:
|
serde-dependencies:
|
||||||
patterns:
|
patterns:
|
||||||
- "serde*"
|
- "serde*"
|
||||||
|
wasm-bindgen-deps:
|
||||||
|
patterns:
|
||||||
|
- "wasm-bindgen*"
|
||||||
|
2
.github/workflows/build-and-store-wasm.yml
vendored
2
.github/workflows/build-and-store-wasm.yml
vendored
@ -27,7 +27,7 @@ jobs:
|
|||||||
|
|
||||||
|
|
||||||
# Upload the WASM bundle as an artifact
|
# Upload the WASM bundle as an artifact
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: wasm-bundle
|
name: wasm-bundle
|
||||||
path: src/wasm-lib/pkg
|
path: src/wasm-lib/pkg
|
||||||
|
24
.github/workflows/build-apps.yml
vendored
24
.github/workflows/build-apps.yml
vendored
@ -126,9 +126,13 @@ jobs:
|
|||||||
node-version-file: '.nvmrc'
|
node-version-file: '.nvmrc'
|
||||||
cache: 'yarn' # Set this to npm, yarn or pnpm.
|
cache: 'yarn' # Set this to npm, yarn or pnpm.
|
||||||
|
|
||||||
- run: yarn install
|
- name: yarn install
|
||||||
|
# Windows is picky sometimes and fails on fetch. Step takes about ~30s
|
||||||
- run: yarn tronb:vite
|
uses: nick-fields/retry@v3.0.0
|
||||||
|
with:
|
||||||
|
timeout_minutes: 2
|
||||||
|
max_attempts: 3
|
||||||
|
command: yarn install
|
||||||
|
|
||||||
- name: Prepare certificate and variables (Windows only)
|
- name: Prepare certificate and variables (Windows only)
|
||||||
if: ${{ (env.IS_RELEASE == 'true' || env.IS_NIGHTLY == 'true') && matrix.os == 'windows-2022' }}
|
if: ${{ (env.IS_RELEASE == 'true' || env.IS_NIGHTLY == 'true') && matrix.os == 'windows-2022' }}
|
||||||
@ -159,8 +163,8 @@ jobs:
|
|||||||
- name: Build the app (debug)
|
- name: Build the app (debug)
|
||||||
if: ${{ env.IS_RELEASE == 'false' && env.IS_NIGHTLY == 'false' }}
|
if: ${{ env.IS_RELEASE == 'false' && env.IS_NIGHTLY == 'false' }}
|
||||||
# electron-builder doesn't have a concept of release vs debug,
|
# electron-builder doesn't have a concept of release vs debug,
|
||||||
# this is just not doing any codesign or release yml generation
|
# this is just not doing any codesign or release yml generation, and points to dev infra
|
||||||
run: yarn electron-builder --config
|
run: yarn tronb:package:dev
|
||||||
|
|
||||||
- name: Build the app (release)
|
- name: Build the app (release)
|
||||||
if: ${{ env.IS_RELEASE == 'true' || env.IS_NIGHTLY == 'true' }}
|
if: ${{ env.IS_RELEASE == 'true' || env.IS_NIGHTLY == 'true' }}
|
||||||
@ -179,7 +183,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
timeout_minutes: 10
|
timeout_minutes: 10
|
||||||
max_attempts: 3
|
max_attempts: 3
|
||||||
command: yarn electron-builder --config --publish always
|
command: yarn tronb:package:prod
|
||||||
|
|
||||||
- name: List artifacts in out/
|
- name: List artifacts in out/
|
||||||
run: ls -R out
|
run: ls -R out
|
||||||
@ -240,7 +244,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
timeout_minutes: 10
|
timeout_minutes: 10
|
||||||
max_attempts: 3
|
max_attempts: 3
|
||||||
command: yarn electron-builder --config --publish always
|
command: yarn tronb:package:prod
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
if: ${{ env.IS_RELEASE == 'true' }}
|
if: ${{ env.IS_RELEASE == 'true' }}
|
||||||
@ -384,19 +388,19 @@ jobs:
|
|||||||
|
|
||||||
- name: Authenticate to Google Cloud
|
- name: Authenticate to Google Cloud
|
||||||
if: ${{ env.IS_NIGHTLY == 'true' }}
|
if: ${{ env.IS_NIGHTLY == 'true' }}
|
||||||
uses: 'google-github-actions/auth@v2.1.7'
|
uses: 'google-github-actions/auth@v2.1.8'
|
||||||
with:
|
with:
|
||||||
credentials_json: '${{ secrets.GOOGLE_CLOUD_DL_SA }}'
|
credentials_json: '${{ secrets.GOOGLE_CLOUD_DL_SA }}'
|
||||||
|
|
||||||
- name: Set up Google Cloud SDK
|
- name: Set up Google Cloud SDK
|
||||||
if: ${{ env.IS_NIGHTLY == 'true' }}
|
if: ${{ env.IS_NIGHTLY == 'true' }}
|
||||||
uses: google-github-actions/setup-gcloud@v2.1.2
|
uses: google-github-actions/setup-gcloud@v2.1.4
|
||||||
with:
|
with:
|
||||||
project_id: ${{ env.GOOGLE_CLOUD_PROJECT_ID }}
|
project_id: ${{ env.GOOGLE_CLOUD_PROJECT_ID }}
|
||||||
|
|
||||||
- name: Upload nightly files to public bucket
|
- name: Upload nightly files to public bucket
|
||||||
if: ${{ env.IS_NIGHTLY == 'true' }}
|
if: ${{ env.IS_NIGHTLY == 'true' }}
|
||||||
uses: google-github-actions/upload-cloud-storage@v2.2.1
|
uses: google-github-actions/upload-cloud-storage@v2.2.2
|
||||||
with:
|
with:
|
||||||
path: out
|
path: out
|
||||||
glob: '*'
|
glob: '*'
|
||||||
|
44
.github/workflows/cargo-bench.yml
vendored
44
.github/workflows/cargo-bench.yml
vendored
@ -1,44 +0,0 @@
|
|||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
paths:
|
|
||||||
- '**.rs'
|
|
||||||
- '**/Cargo.toml'
|
|
||||||
- '**/Cargo.lock'
|
|
||||||
- '**/rust-toolchain.toml'
|
|
||||||
- .github/workflows/cargo-bench.yml
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- '**.rs'
|
|
||||||
- '**/Cargo.toml'
|
|
||||||
- '**/Cargo.lock'
|
|
||||||
- '**/rust-toolchain.toml'
|
|
||||||
- .github/workflows/cargo-bench.yml
|
|
||||||
workflow_dispatch:
|
|
||||||
permissions: read-all
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
name: cargo bench
|
|
||||||
jobs:
|
|
||||||
cargo-bench:
|
|
||||||
name: Benchmark with iai
|
|
||||||
runs-on: ubuntu-latest-8-cores
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
cargo install cargo-criterion
|
|
||||||
sudo apt update
|
|
||||||
sudo apt install -y valgrind
|
|
||||||
- name: Rust Cache
|
|
||||||
uses: Swatinem/rust-cache@v2.6.1
|
|
||||||
- name: Benchmark kcl library
|
|
||||||
shell: bash
|
|
||||||
run: |-
|
|
||||||
cd src/wasm-lib/kcl; cargo bench --all-features -- iai
|
|
||||||
env:
|
|
||||||
KITTYCAD_API_TOKEN: ${{secrets.KITTYCAD_API_TOKEN}}
|
|
||||||
|
|
32
.github/workflows/codemirror-lang-kcl.yml
vendored
Normal file
32
.github/workflows/codemirror-lang-kcl.yml
vendored
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
name: CodeMirror Lang KCL
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
yarn-unit-test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version-file: '.nvmrc'
|
||||||
|
cache: 'yarn'
|
||||||
|
|
||||||
|
- run: yarn install
|
||||||
|
working-directory: packages/codemirror-lang-kcl
|
||||||
|
|
||||||
|
- run: yarn tsc
|
||||||
|
working-directory: packages/codemirror-lang-kcl
|
||||||
|
|
||||||
|
- name: run unit tests
|
||||||
|
run: yarn test
|
||||||
|
working-directory: packages/codemirror-lang-kcl
|
21
.github/workflows/e2e-tests.yml
vendored
21
.github/workflows/e2e-tests.yml
vendored
@ -3,7 +3,6 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches: [ main ]
|
branches: [ main ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ main ]
|
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||||
@ -46,7 +45,15 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
needs: check-rust-changes
|
needs: check-rust-changes
|
||||||
steps:
|
steps:
|
||||||
|
- uses: actions/create-github-app-token@v1
|
||||||
|
id: app-token
|
||||||
|
with:
|
||||||
|
app-id: ${{ secrets.MODELING_APP_GH_APP_ID }}
|
||||||
|
private-key: ${{ secrets.MODELING_APP_GH_APP_PRIVATE_KEY }}
|
||||||
|
owner: ${{ github.repository_owner }}
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
token: ${{ steps.app-token.outputs.token }}
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version-file: '.nvmrc'
|
node-version-file: '.nvmrc'
|
||||||
@ -123,9 +130,9 @@ jobs:
|
|||||||
if: steps.download-wasm.outcome == 'failure'
|
if: steps.download-wasm.outcome == 'failure'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: yarn build:wasm
|
run: yarn build:wasm
|
||||||
- name: build electron
|
- name: build web
|
||||||
shell: bash
|
shell: bash
|
||||||
run: yarn tron:package
|
run: yarn tronb:vite:dev
|
||||||
- name: Run ubuntu/chrome snapshots
|
- name: Run ubuntu/chrome snapshots
|
||||||
if: ${{ matrix.os == 'namespace-profile-ubuntu-8-cores' && matrix.shardIndex == 1 }}
|
if: ${{ matrix.os == 'namespace-profile-ubuntu-8-cores' && matrix.shardIndex == 1 }}
|
||||||
shell: bash
|
shell: bash
|
||||||
@ -153,11 +160,11 @@ jobs:
|
|||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
run: rm -r test-results
|
run: rm -r test-results
|
||||||
- name: check for changes
|
- name: check for changes
|
||||||
if: ${{ matrix.os == 'namespace-profile-ubuntu-8-cores' && matrix.shardIndex == 1 }}
|
if: ${{ matrix.os == 'namespace-profile-ubuntu-8-cores' && matrix.shardIndex == 1 && github.ref != 'refs/heads/main' }}
|
||||||
shell: bash
|
shell: bash
|
||||||
id: git-check
|
id: git-check
|
||||||
run: |
|
run: |
|
||||||
git add .
|
git add e2e/playwright/snapshot-tests.spec.ts-snapshots
|
||||||
if git status | grep -q "Changes to be committed"
|
if git status | grep -q "Changes to be committed"
|
||||||
then echo "modified=true" >> $GITHUB_OUTPUT
|
then echo "modified=true" >> $GITHUB_OUTPUT
|
||||||
else echo "modified=false" >> $GITHUB_OUTPUT
|
else echo "modified=false" >> $GITHUB_OUTPUT
|
||||||
@ -166,14 +173,14 @@ jobs:
|
|||||||
if: steps.git-check.outputs.modified == 'true'
|
if: steps.git-check.outputs.modified == 'true'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
git add .
|
git add e2e/playwright/snapshot-tests.spec.ts-snapshots
|
||||||
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
git config --local user.name "github-actions[bot]"
|
git config --local user.name "github-actions[bot]"
|
||||||
git remote set-url origin https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
|
git remote set-url origin https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
|
||||||
git fetch origin
|
git fetch origin
|
||||||
echo ${{ github.head_ref }}
|
echo ${{ github.head_ref }}
|
||||||
git checkout ${{ github.head_ref }}
|
git checkout ${{ github.head_ref }}
|
||||||
git commit -am "A snapshot a day keeps the bugs away! 📷🐛 (OS: ${{matrix.os}})" || true
|
git commit -m "A snapshot a day keeps the bugs away! 📷🐛 (OS: ${{matrix.os}})" || true
|
||||||
git push
|
git push
|
||||||
git push origin ${{ github.head_ref }}
|
git push origin ${{ github.head_ref }}
|
||||||
# only upload artifacts if there's actually changes
|
# only upload artifacts if there's actually changes
|
||||||
|
6
.github/workflows/publish-apps-release.yml
vendored
6
.github/workflows/publish-apps-release.yml
vendored
@ -108,17 +108,17 @@ jobs:
|
|||||||
run: yarn files:set-notes
|
run: yarn files:set-notes
|
||||||
|
|
||||||
- name: Authenticate to Google Cloud
|
- name: Authenticate to Google Cloud
|
||||||
uses: 'google-github-actions/auth@v2.1.7'
|
uses: 'google-github-actions/auth@v2.1.8'
|
||||||
with:
|
with:
|
||||||
credentials_json: '${{ secrets.GOOGLE_CLOUD_DL_SA }}'
|
credentials_json: '${{ secrets.GOOGLE_CLOUD_DL_SA }}'
|
||||||
|
|
||||||
- name: Set up Google Cloud SDK
|
- name: Set up Google Cloud SDK
|
||||||
uses: google-github-actions/setup-gcloud@v2.1.2
|
uses: google-github-actions/setup-gcloud@v2.1.4
|
||||||
with:
|
with:
|
||||||
project_id: ${{ env.GOOGLE_CLOUD_PROJECT_ID }}
|
project_id: ${{ env.GOOGLE_CLOUD_PROJECT_ID }}
|
||||||
|
|
||||||
- name: Upload release files to public bucket
|
- name: Upload release files to public bucket
|
||||||
uses: google-github-actions/upload-cloud-storage@v2.2.1
|
uses: google-github-actions/upload-cloud-storage@v2.2.2
|
||||||
with:
|
with:
|
||||||
path: out
|
path: out
|
||||||
glob: '*'
|
glob: '*'
|
||||||
|
6
.gitignore
vendored
6
.gitignore
vendored
@ -25,6 +25,7 @@ yarn-error.log*
|
|||||||
|
|
||||||
.idea
|
.idea
|
||||||
.vscode
|
.vscode
|
||||||
|
.helix
|
||||||
src/wasm-lib/.idea
|
src/wasm-lib/.idea
|
||||||
src/wasm-lib/.vscode
|
src/wasm-lib/.vscode
|
||||||
|
|
||||||
@ -40,11 +41,14 @@ e2e/playwright/playwright-secrets.env
|
|||||||
e2e/playwright/temp1.png
|
e2e/playwright/temp1.png
|
||||||
e2e/playwright/temp2.png
|
e2e/playwright/temp2.png
|
||||||
e2e/playwright/temp3.png
|
e2e/playwright/temp3.png
|
||||||
|
# this will be overridden for specific directories
|
||||||
|
e2e/playwright/**/*.png
|
||||||
# exports from snapshot-tests.spec.ts "exports of each format should work"
|
# exports from snapshot-tests.spec.ts "exports of each format should work"
|
||||||
e2e/playwright/export-snapshots/*
|
e2e/playwright/export-snapshots/*
|
||||||
!e2e/playwright/export-snapshots/*.png
|
!e2e/playwright/export-snapshots/*.png
|
||||||
|
!e2e/playwright/snapshot-tests.spec.ts-snapshots/*.png
|
||||||
|
|
||||||
|
/kcl-samples
|
||||||
/test-results/
|
/test-results/
|
||||||
/playwright-report/
|
/playwright-report/
|
||||||
/blob-report/
|
/blob-report/
|
||||||
|
2
.helix/config.toml
Normal file
2
.helix/config.toml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
[editor]
|
||||||
|
auto-format = true
|
10
.helix/languages.toml
Normal file
10
.helix/languages.toml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
[language-server.eslint]
|
||||||
|
args = ["--stdio"]
|
||||||
|
command = "vscode-eslint-language-server"
|
||||||
|
|
||||||
|
[[language]]
|
||||||
|
name = "typescript"
|
||||||
|
auto-format = true
|
||||||
|
formatter = { command = "node_modules/.bin/prettier", args = ["--parser", "typescript"] }
|
||||||
|
language-servers = [ { name = "eslint", only-features = [ "diagnostics" ] }, "typescript-language-server" ]
|
||||||
|
|
@ -101,7 +101,7 @@ This will start the application and hot-reload on changes.
|
|||||||
|
|
||||||
Devtools can be opened with the usual Cmd-Opt-I (Mac) or Ctrl-Shift-I (Linux and Windows).
|
Devtools can be opened with the usual Cmd-Opt-I (Mac) or Ctrl-Shift-I (Linux and Windows).
|
||||||
|
|
||||||
To build, run `yarn tron:package`.
|
To build with electron-builder, run `yarn tronb:package:dev` (or `yarn tronb:package:prod` to point to the .env.production variables)
|
||||||
|
|
||||||
## Checking out commits / Bisecting
|
## Checking out commits / Bisecting
|
||||||
|
|
||||||
|
15
docs/kcl/HALF_TURN.md
Normal file
15
docs/kcl/HALF_TURN.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
title: "HALF_TURN"
|
||||||
|
excerpt: ""
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```js
|
||||||
|
HALF_TURN: number(deg) = 180deg
|
||||||
|
```
|
||||||
|
|
||||||
|
|
@ -24,5 +24,3 @@ once fixed in engine will just start working here with no language changes.
|
|||||||
chamfer cases work currently.
|
chamfer cases work currently.
|
||||||
|
|
||||||
- **Appearance**: Changing the appearance on a loft does not work.
|
- **Appearance**: Changing the appearance on a loft does not work.
|
||||||
|
|
||||||
- **Helix**: Currently sweeping a helix does not work.
|
|
||||||
|
15
docs/kcl/QUARTER_TURN.md
Normal file
15
docs/kcl/QUARTER_TURN.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
title: "QUARTER_TURN"
|
||||||
|
excerpt: ""
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```js
|
||||||
|
QUARTER_TURN: number(deg) = 90deg
|
||||||
|
```
|
||||||
|
|
||||||
|
|
15
docs/kcl/THREE_QUARTER_TURN.md
Normal file
15
docs/kcl/THREE_QUARTER_TURN.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
title: "THREE_QUARTER_TURN"
|
||||||
|
excerpt: ""
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```js
|
||||||
|
THREE_QUARTER_TURN: number(deg) = 270deg
|
||||||
|
```
|
||||||
|
|
||||||
|
|
15
docs/kcl/ZERO.md
Normal file
15
docs/kcl/ZERO.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
title: "ZERO"
|
||||||
|
excerpt: ""
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```js
|
||||||
|
ZERO: number = 0
|
||||||
|
```
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -22,7 +22,7 @@ assert(data: bool, message: string) -> ()
|
|||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
`()`
|
`()`
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
|
@ -24,7 +24,7 @@ assertEqual(left: number, right: number, epsilon: number, message: string) -> ()
|
|||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
`()`
|
`()`
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
|
@ -23,7 +23,7 @@ assertGreaterThan(left: number, right: number, message: string) -> ()
|
|||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
`()`
|
`()`
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
|
@ -23,7 +23,7 @@ assertGreaterThanOrEq(left: number, right: number, message: string) -> ()
|
|||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
`()`
|
`()`
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
|
@ -23,7 +23,7 @@ assertLessThan(left: number, right: number, message: string) -> ()
|
|||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
`()`
|
`()`
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
|
@ -23,7 +23,7 @@ assertLessThanOrEq(left: number, right: number, message: string) -> ()
|
|||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
`()`
|
`()`
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -26,7 +26,7 @@ cm() -> number
|
|||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
`number`
|
`number`
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
|
32
docs/kcl/const_E.md
Normal file
32
docs/kcl/const_E.md
Normal file
File diff suppressed because one or more lines are too long
15
docs/kcl/const_HALF_TURN.md
Normal file
15
docs/kcl/const_HALF_TURN.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
title: "HALF_TURN"
|
||||||
|
excerpt: ""
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```js
|
||||||
|
HALF_TURN: number(deg) = 180deg
|
||||||
|
```
|
||||||
|
|
||||||
|
|
28
docs/kcl/const_PI.md
Normal file
28
docs/kcl/const_PI.md
Normal file
File diff suppressed because one or more lines are too long
15
docs/kcl/const_QUARTER_TURN.md
Normal file
15
docs/kcl/const_QUARTER_TURN.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
title: "QUARTER_TURN"
|
||||||
|
excerpt: ""
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```js
|
||||||
|
QUARTER_TURN: number(deg) = 90deg
|
||||||
|
```
|
||||||
|
|
||||||
|
|
32
docs/kcl/const_TAU.md
Normal file
32
docs/kcl/const_TAU.md
Normal file
File diff suppressed because one or more lines are too long
15
docs/kcl/const_THREE_QUARTER_TURN.md
Normal file
15
docs/kcl/const_THREE_QUARTER_TURN.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
title: "THREE_QUARTER_TURN"
|
||||||
|
excerpt: ""
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```js
|
||||||
|
THREE_QUARTER_TURN: number(deg) = 270deg
|
||||||
|
```
|
||||||
|
|
||||||
|
|
15
docs/kcl/const_ZERO.md
Normal file
15
docs/kcl/const_ZERO.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
title: "ZERO"
|
||||||
|
excerpt: ""
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```js
|
||||||
|
ZERO: number = 0
|
||||||
|
```
|
||||||
|
|
||||||
|
|
32
docs/kcl/const_const_std-math-E.md
Normal file
32
docs/kcl/const_const_std-math-E.md
Normal file
File diff suppressed because one or more lines are too long
28
docs/kcl/const_const_std-math-PI.md
Normal file
28
docs/kcl/const_const_std-math-PI.md
Normal file
File diff suppressed because one or more lines are too long
32
docs/kcl/const_const_std-math-TAU.md
Normal file
32
docs/kcl/const_const_std-math-TAU.md
Normal file
File diff suppressed because one or more lines are too long
15
docs/kcl/const_const_std-prelude-HALF_TURN.md
Normal file
15
docs/kcl/const_const_std-prelude-HALF_TURN.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
title: "std::prelude::HALF_TURN"
|
||||||
|
excerpt: ""
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```js
|
||||||
|
std::prelude::HALF_TURN: number(deg) = 180deg
|
||||||
|
```
|
||||||
|
|
||||||
|
|
15
docs/kcl/const_const_std-prelude-QUARTER_TURN.md
Normal file
15
docs/kcl/const_const_std-prelude-QUARTER_TURN.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
title: "std::prelude::QUARTER_TURN"
|
||||||
|
excerpt: ""
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```js
|
||||||
|
std::prelude::QUARTER_TURN: number(deg) = 90deg
|
||||||
|
```
|
||||||
|
|
||||||
|
|
15
docs/kcl/const_const_std-prelude-THREE_QUARTER_TURN.md
Normal file
15
docs/kcl/const_const_std-prelude-THREE_QUARTER_TURN.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
title: "std::prelude::THREE_QUARTER_TURN"
|
||||||
|
excerpt: ""
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```js
|
||||||
|
std::prelude::THREE_QUARTER_TURN: number(deg) = 270deg
|
||||||
|
```
|
||||||
|
|
||||||
|
|
15
docs/kcl/const_const_std-prelude-ZERO.md
Normal file
15
docs/kcl/const_const_std-prelude-ZERO.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
title: "std::prelude::ZERO"
|
||||||
|
excerpt: ""
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```js
|
||||||
|
std::prelude::ZERO: number = 0
|
||||||
|
```
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -26,7 +26,7 @@ ft() -> number
|
|||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
`number`
|
`number`
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -26,7 +26,7 @@ inch() -> number
|
|||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
`number`
|
`number`
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
|
@ -9,113 +9,117 @@ layout: manual
|
|||||||
* [Types](kcl/types)
|
* [Types](kcl/types)
|
||||||
* [Modules](kcl/modules)
|
* [Modules](kcl/modules)
|
||||||
* [Known Issues](kcl/KNOWN-ISSUES)
|
* [Known Issues](kcl/KNOWN-ISSUES)
|
||||||
* [`abs`](kcl/abs)
|
* **`std`**
|
||||||
* [`acos`](kcl/acos)
|
* [`abs`](kcl/abs)
|
||||||
* [`angleToMatchLengthX`](kcl/angleToMatchLengthX)
|
* [`acos`](kcl/acos)
|
||||||
* [`angleToMatchLengthY`](kcl/angleToMatchLengthY)
|
* [`angleToMatchLengthX`](kcl/angleToMatchLengthX)
|
||||||
* [`angledLine`](kcl/angledLine)
|
* [`angleToMatchLengthY`](kcl/angleToMatchLengthY)
|
||||||
* [`angledLineOfXLength`](kcl/angledLineOfXLength)
|
* [`angledLine`](kcl/angledLine)
|
||||||
* [`angledLineOfYLength`](kcl/angledLineOfYLength)
|
* [`angledLineOfXLength`](kcl/angledLineOfXLength)
|
||||||
* [`angledLineThatIntersects`](kcl/angledLineThatIntersects)
|
* [`angledLineOfYLength`](kcl/angledLineOfYLength)
|
||||||
* [`angledLineToX`](kcl/angledLineToX)
|
* [`angledLineThatIntersects`](kcl/angledLineThatIntersects)
|
||||||
* [`angledLineToY`](kcl/angledLineToY)
|
* [`angledLineToX`](kcl/angledLineToX)
|
||||||
* [`appearance`](kcl/appearance)
|
* [`angledLineToY`](kcl/angledLineToY)
|
||||||
* [`arc`](kcl/arc)
|
* [`appearance`](kcl/appearance)
|
||||||
* [`arcTo`](kcl/arcTo)
|
* [`arc`](kcl/arc)
|
||||||
* [`asin`](kcl/asin)
|
* [`arcTo`](kcl/arcTo)
|
||||||
* [`assert`](kcl/assert)
|
* [`asin`](kcl/asin)
|
||||||
* [`assertEqual`](kcl/assertEqual)
|
* [`assert`](kcl/assert)
|
||||||
* [`assertGreaterThan`](kcl/assertGreaterThan)
|
* [`assertEqual`](kcl/assertEqual)
|
||||||
* [`assertGreaterThanOrEq`](kcl/assertGreaterThanOrEq)
|
* [`assertGreaterThan`](kcl/assertGreaterThan)
|
||||||
* [`assertLessThan`](kcl/assertLessThan)
|
* [`assertGreaterThanOrEq`](kcl/assertGreaterThanOrEq)
|
||||||
* [`assertLessThanOrEq`](kcl/assertLessThanOrEq)
|
* [`assertLessThan`](kcl/assertLessThan)
|
||||||
* [`atan`](kcl/atan)
|
* [`assertLessThanOrEq`](kcl/assertLessThanOrEq)
|
||||||
* [`atan2`](kcl/atan2)
|
* [`atan`](kcl/atan)
|
||||||
* [`bezierCurve`](kcl/bezierCurve)
|
* [`atan2`](kcl/atan2)
|
||||||
* [`ceil`](kcl/ceil)
|
* [`bezierCurve`](kcl/bezierCurve)
|
||||||
* [`chamfer`](kcl/chamfer)
|
* [`ceil`](kcl/ceil)
|
||||||
* [`circle`](kcl/circle)
|
* [`chamfer`](kcl/chamfer)
|
||||||
* [`circleThreePoint`](kcl/circleThreePoint)
|
* [`circle`](kcl/circle)
|
||||||
* [`close`](kcl/close)
|
* [`circleThreePoint`](kcl/circleThreePoint)
|
||||||
* [`cm`](kcl/cm)
|
* [`close`](kcl/close)
|
||||||
* [`cos`](kcl/cos)
|
* [`cm`](kcl/cm)
|
||||||
* [`e`](kcl/e)
|
* [`extrude`](kcl/extrude)
|
||||||
* [`extrude`](kcl/extrude)
|
* [`fillet`](kcl/fillet)
|
||||||
* [`fillet`](kcl/fillet)
|
* [`floor`](kcl/floor)
|
||||||
* [`floor`](kcl/floor)
|
* [`ft`](kcl/ft)
|
||||||
* [`ft`](kcl/ft)
|
* [`getNextAdjacentEdge`](kcl/getNextAdjacentEdge)
|
||||||
* [`getNextAdjacentEdge`](kcl/getNextAdjacentEdge)
|
* [`getOppositeEdge`](kcl/getOppositeEdge)
|
||||||
* [`getOppositeEdge`](kcl/getOppositeEdge)
|
* [`getPreviousAdjacentEdge`](kcl/getPreviousAdjacentEdge)
|
||||||
* [`getPreviousAdjacentEdge`](kcl/getPreviousAdjacentEdge)
|
* [`helix`](kcl/helix)
|
||||||
* [`helix`](kcl/helix)
|
* [`helixRevolutions`](kcl/helixRevolutions)
|
||||||
* [`helixRevolutions`](kcl/helixRevolutions)
|
* [`hole`](kcl/hole)
|
||||||
* [`hole`](kcl/hole)
|
* [`hollow`](kcl/hollow)
|
||||||
* [`hollow`](kcl/hollow)
|
* [`inch`](kcl/inch)
|
||||||
* [`import`](kcl/import)
|
* [`lastSegX`](kcl/lastSegX)
|
||||||
* [`inch`](kcl/inch)
|
* [`lastSegY`](kcl/lastSegY)
|
||||||
* [`int`](kcl/int)
|
* [`legAngX`](kcl/legAngX)
|
||||||
* [`lastSegX`](kcl/lastSegX)
|
* [`legAngY`](kcl/legAngY)
|
||||||
* [`lastSegY`](kcl/lastSegY)
|
* [`legLen`](kcl/legLen)
|
||||||
* [`legAngX`](kcl/legAngX)
|
* [`line`](kcl/line)
|
||||||
* [`legAngY`](kcl/legAngY)
|
* [`ln`](kcl/ln)
|
||||||
* [`legLen`](kcl/legLen)
|
* [`loft`](kcl/loft)
|
||||||
* [`line`](kcl/line)
|
* [`log`](kcl/log)
|
||||||
* [`lineTo`](kcl/lineTo)
|
* [`log10`](kcl/log10)
|
||||||
* [`ln`](kcl/ln)
|
* [`log2`](kcl/log2)
|
||||||
* [`loft`](kcl/loft)
|
* [`m`](kcl/m)
|
||||||
* [`log`](kcl/log)
|
* [`map`](kcl/map)
|
||||||
* [`log10`](kcl/log10)
|
* [`max`](kcl/max)
|
||||||
* [`log2`](kcl/log2)
|
* [`min`](kcl/min)
|
||||||
* [`m`](kcl/m)
|
* [`mirror2d`](kcl/mirror2d)
|
||||||
* [`map`](kcl/map)
|
* [`mm`](kcl/mm)
|
||||||
* [`max`](kcl/max)
|
* [`offsetPlane`](kcl/offsetPlane)
|
||||||
* [`min`](kcl/min)
|
* [`patternCircular2d`](kcl/patternCircular2d)
|
||||||
* [`mirror2d`](kcl/mirror2d)
|
* [`patternCircular3d`](kcl/patternCircular3d)
|
||||||
* [`mm`](kcl/mm)
|
* [`patternLinear2d`](kcl/patternLinear2d)
|
||||||
* [`offsetPlane`](kcl/offsetPlane)
|
* [`patternLinear3d`](kcl/patternLinear3d)
|
||||||
* [`patternCircular2d`](kcl/patternCircular2d)
|
* [`patternTransform`](kcl/patternTransform)
|
||||||
* [`patternCircular3d`](kcl/patternCircular3d)
|
* [`patternTransform2d`](kcl/patternTransform2d)
|
||||||
* [`patternLinear2d`](kcl/patternLinear2d)
|
* [`polar`](kcl/polar)
|
||||||
* [`patternLinear3d`](kcl/patternLinear3d)
|
* [`polygon`](kcl/polygon)
|
||||||
* [`patternTransform`](kcl/patternTransform)
|
* [`pop`](kcl/pop)
|
||||||
* [`patternTransform2d`](kcl/patternTransform2d)
|
* [`pow`](kcl/pow)
|
||||||
* [`pi`](kcl/pi)
|
* [`profileStart`](kcl/profileStart)
|
||||||
* [`polar`](kcl/polar)
|
* [`profileStartX`](kcl/profileStartX)
|
||||||
* [`polygon`](kcl/polygon)
|
* [`profileStartY`](kcl/profileStartY)
|
||||||
* [`pop`](kcl/pop)
|
* [`push`](kcl/push)
|
||||||
* [`pow`](kcl/pow)
|
* [`reduce`](kcl/reduce)
|
||||||
* [`profileStart`](kcl/profileStart)
|
* [`rem`](kcl/rem)
|
||||||
* [`profileStartX`](kcl/profileStartX)
|
* [`revolve`](kcl/revolve)
|
||||||
* [`profileStartY`](kcl/profileStartY)
|
* [`round`](kcl/round)
|
||||||
* [`push`](kcl/push)
|
* [`segAng`](kcl/segAng)
|
||||||
* [`reduce`](kcl/reduce)
|
* [`segEnd`](kcl/segEnd)
|
||||||
* [`rem`](kcl/rem)
|
* [`segEndX`](kcl/segEndX)
|
||||||
* [`revolve`](kcl/revolve)
|
* [`segEndY`](kcl/segEndY)
|
||||||
* [`round`](kcl/round)
|
* [`segLen`](kcl/segLen)
|
||||||
* [`segAng`](kcl/segAng)
|
* [`segStart`](kcl/segStart)
|
||||||
* [`segEnd`](kcl/segEnd)
|
* [`segStartX`](kcl/segStartX)
|
||||||
* [`segEndX`](kcl/segEndX)
|
* [`segStartY`](kcl/segStartY)
|
||||||
* [`segEndY`](kcl/segEndY)
|
* [`shell`](kcl/shell)
|
||||||
* [`segLen`](kcl/segLen)
|
* [`sqrt`](kcl/sqrt)
|
||||||
* [`segStart`](kcl/segStart)
|
* [`startProfileAt`](kcl/startProfileAt)
|
||||||
* [`segStartX`](kcl/segStartX)
|
* [`startSketchOn`](kcl/startSketchOn)
|
||||||
* [`segStartY`](kcl/segStartY)
|
* [`sweep`](kcl/sweep)
|
||||||
* [`shell`](kcl/shell)
|
* [`tangentToEnd`](kcl/tangentToEnd)
|
||||||
* [`sin`](kcl/sin)
|
* [`tangentialArc`](kcl/tangentialArc)
|
||||||
* [`sqrt`](kcl/sqrt)
|
* [`tangentialArcTo`](kcl/tangentialArcTo)
|
||||||
* [`startProfileAt`](kcl/startProfileAt)
|
* [`tangentialArcToRelative`](kcl/tangentialArcToRelative)
|
||||||
* [`startSketchOn`](kcl/startSketchOn)
|
* [`toDegrees`](kcl/toDegrees)
|
||||||
* [`sweep`](kcl/sweep)
|
* [`toRadians`](kcl/toRadians)
|
||||||
* [`tan`](kcl/tan)
|
* [`xLine`](kcl/xLine)
|
||||||
* [`tangentToEnd`](kcl/tangentToEnd)
|
* [`xLineTo`](kcl/xLineTo)
|
||||||
* [`tangentialArc`](kcl/tangentialArc)
|
* [`yLine`](kcl/yLine)
|
||||||
* [`tangentialArcTo`](kcl/tangentialArcTo)
|
* [`yLineTo`](kcl/yLineTo)
|
||||||
* [`tangentialArcToRelative`](kcl/tangentialArcToRelative)
|
* [`yd`](kcl/yd)
|
||||||
* [`tau`](kcl/tau)
|
* **`std::math`**
|
||||||
* [`toDegrees`](kcl/toDegrees)
|
* [`E`](kcl/const_std-math-E)
|
||||||
* [`toRadians`](kcl/toRadians)
|
* [`PI`](kcl/const_std-math-PI)
|
||||||
* [`xLine`](kcl/xLine)
|
* [`TAU`](kcl/const_std-math-TAU)
|
||||||
* [`xLineTo`](kcl/xLineTo)
|
* [`cos`](kcl/std-math-cos)
|
||||||
* [`yLine`](kcl/yLine)
|
* [`sin`](kcl/std-math-sin)
|
||||||
* [`yLineTo`](kcl/yLineTo)
|
* [`tan`](kcl/std-math-tan)
|
||||||
* [`yd`](kcl/yd)
|
* **`std::prelude`**
|
||||||
|
* [`HALF_TURN`](kcl/const_std-prelude-HALF_TURN)
|
||||||
|
* [`QUARTER_TURN`](kcl/const_std-prelude-QUARTER_TURN)
|
||||||
|
* [`THREE_QUARTER_TURN`](kcl/const_std-prelude-THREE_QUARTER_TURN)
|
||||||
|
* [`ZERO`](kcl/const_std-prelude-ZERO)
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -26,7 +26,7 @@ legAngX(hypotenuse: number, leg: number) -> number
|
|||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
`number`
|
`number`
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
|
@ -26,7 +26,7 @@ legAngY(hypotenuse: number, leg: number) -> number
|
|||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
`number`
|
`number`
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
|
@ -26,7 +26,7 @@ legLen(hypotenuse: number, leg: number) -> number
|
|||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
`number`
|
`number`
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -26,7 +26,7 @@ m() -> number
|
|||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
`number`
|
`number`
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
|
@ -22,7 +22,7 @@ map(array: [KclValue], map_fn: FunctionParam) -> [KclValue]
|
|||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
[`[KclValue]`](/docs/kcl/types/KclValue)
|
[`[KclValue]`](/docs/kcl/types/KclValue)
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -26,7 +26,7 @@ mm() -> number
|
|||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
`number`
|
`number`
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
|
@ -57,3 +57,55 @@ Imported symbols can be renamed for convenience or to avoid name collisions.
|
|||||||
```
|
```
|
||||||
import increment as inc, decrement as dec from "util.kcl"
|
import increment as inc, decrement as dec from "util.kcl"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Importing files from other CAD systems
|
||||||
|
|
||||||
|
`import` can also be used to import files from other CAD systems. The format of the statement is the
|
||||||
|
same as for KCL files. You can only import the whole file, not items from it. E.g.,
|
||||||
|
|
||||||
|
```
|
||||||
|
import "tests/inputs/cube.obj"
|
||||||
|
|
||||||
|
// Use `cube` just like a KCL object.
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
import "tests/inputs/cube-2.sldprt" as cube
|
||||||
|
|
||||||
|
// Use `cube` just like a KCL object.
|
||||||
|
```
|
||||||
|
|
||||||
|
You can make the file format explicit using a format attribute (useful if using a different
|
||||||
|
extension), e.g.,
|
||||||
|
|
||||||
|
```
|
||||||
|
@(format = obj)
|
||||||
|
import "tests/inputs/cube"
|
||||||
|
```
|
||||||
|
|
||||||
|
For formats lacking unit data (such as STL, OBJ, or PLY files), the default
|
||||||
|
unit of measurement is millimeters. Alternatively you may specify the unit
|
||||||
|
by using an attirbute. Likewise, you can also specify a coordinate system. E.g.,
|
||||||
|
|
||||||
|
```
|
||||||
|
@(unitLength = ft, coords = opengl)
|
||||||
|
import "tests/inputs/cube.obj"
|
||||||
|
```
|
||||||
|
|
||||||
|
When importing a GLTF file, the bin file will be imported as well.
|
||||||
|
|
||||||
|
Import paths are relative to the current project directory. Imports currently only work when
|
||||||
|
using the native Modeling App, not in the browser.
|
||||||
|
|
||||||
|
### Supported values
|
||||||
|
|
||||||
|
File formats: `fbx`, `gltf`/`glb`, `obj`+, `ply`+, `sldprt`, `step`/`stp`, `stl`+. (Those marked with a
|
||||||
|
'+' support customising the length unit and coordinate system).
|
||||||
|
|
||||||
|
Length units: `mm` (the default), `cm`, `m`, `inch`, `ft`, `yd`.
|
||||||
|
|
||||||
|
Coordinate systems:
|
||||||
|
|
||||||
|
- `zoo` (the default), forward: -Y, up: +Z, handedness: right
|
||||||
|
- `opengl`, forward: +Z, up: +Y, handedness: right
|
||||||
|
- `vulkan`, forward: +Z, up: -Y, handedness: left
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user