Compare commits
2 Commits
jtran/upda
...
kurt-plane
Author | SHA1 | Date | |
---|---|---|---|
327cea7d73 | |||
3b7f301961 |
5
.github/workflows/e2e-tests.yml
vendored
@ -285,7 +285,8 @@ jobs:
|
||||
# TODO: enable namespace-profile-windows-latest once available
|
||||
os:
|
||||
- "runs-on=${{ github.run_id }}/family=i7ie.2xlarge/image=ubuntu22-full-x64"
|
||||
- namespace-profile-macos-8-cores
|
||||
# TODO: renable this when macoOS runner seem more stable
|
||||
# - namespace-profile-macos-6-cores
|
||||
- windows-latest-8-cores
|
||||
shardIndex: [1, 2, 3, 4]
|
||||
shardTotal: [4]
|
||||
@ -295,7 +296,7 @@ jobs:
|
||||
isScheduled:
|
||||
- ${{ github.event_name == 'schedule' }}
|
||||
exclude:
|
||||
- os: namespace-profile-macos-8-cores
|
||||
- os: namespace-profile-macos-6-cores
|
||||
isScheduled: true
|
||||
- os: windows-latest-8-cores
|
||||
isScheduled: true
|
||||
|
@ -74,7 +74,7 @@ layout: manual
|
||||
* [`map`](kcl/map)
|
||||
* [`max`](kcl/max)
|
||||
* [`min`](kcl/min)
|
||||
* [`offsetPlane`](kcl/offsetPlane)
|
||||
* [`offsetPlane`](kcl/std-offsetPlane)
|
||||
* [`patternCircular2d`](kcl/patternCircular2d)
|
||||
* [`patternCircular3d`](kcl/patternCircular3d)
|
||||
* [`patternLinear2d`](kcl/patternLinear2d)
|
||||
|
@ -9,7 +9,7 @@ Extract the provided 2-dimensional sketch's profile's origin value.
|
||||
|
||||
|
||||
```js
|
||||
profileStart(profile: Sketch): [number]
|
||||
profileStart(sketch: Sketch): [number]
|
||||
```
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@ profileStart(profile: Sketch): [number]
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `profile` | [`Sketch`](/docs/kcl/types/Sketch) | Profile whose start is being used | Yes |
|
||||
| `sketch` | [`Sketch`](/docs/kcl/types/Sketch) | | Yes |
|
||||
|
||||
### Returns
|
||||
|
||||
|
@ -9,7 +9,7 @@ Extract the provided 2-dimensional sketch's profile's origin's 'x' value.
|
||||
|
||||
|
||||
```js
|
||||
profileStartX(profile: Sketch): number
|
||||
profileStartX(sketch: Sketch): number
|
||||
```
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@ profileStartX(profile: Sketch): number
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `profile` | [`Sketch`](/docs/kcl/types/Sketch) | Profile whose start is being used | Yes |
|
||||
| `sketch` | [`Sketch`](/docs/kcl/types/Sketch) | | Yes |
|
||||
|
||||
### Returns
|
||||
|
||||
|
@ -9,7 +9,7 @@ Extract the provided 2-dimensional sketch's profile's origin's 'y' value.
|
||||
|
||||
|
||||
```js
|
||||
profileStartY(profile: Sketch): number
|
||||
profileStartY(sketch: Sketch): number
|
||||
```
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@ profileStartY(profile: Sketch): number
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `profile` | [`Sketch`](/docs/kcl/types/Sketch) | Profile whose start is being used | Yes |
|
||||
| `sketch` | [`Sketch`](/docs/kcl/types/Sketch) | | Yes |
|
||||
|
||||
### Returns
|
||||
|
||||
|
122
docs/kcl/std-offsetPlane.md
Normal file
2293
docs/kcl/std.json
@ -29,11 +29,11 @@ test.describe('Electron app header tests', () => {
|
||||
test(
|
||||
'User settings has correct shortcut',
|
||||
{ tag: '@electron' },
|
||||
async ({ page, toolbar }, testInfo) => {
|
||||
async ({ page }, testInfo) => {
|
||||
await page.setBodyDimensions({ width: 1200, height: 500 })
|
||||
|
||||
// Open the user sidebar menu.
|
||||
await toolbar.userSidebarButton.click()
|
||||
await page.getByTestId('user-sidebar-toggle').click()
|
||||
|
||||
// No space after "User settings" since it's textContent.
|
||||
const text =
|
||||
|
@ -1,53 +0,0 @@
|
||||
import { expect, test } from '@e2e/playwright/zoo-test'
|
||||
|
||||
// test file is for testing auth functionality
|
||||
test.describe('Authentication tests', () => {
|
||||
test(
|
||||
`The user can sign out and back in`,
|
||||
{ tag: ['@electron'] },
|
||||
async ({ page, homePage, signInPage, toolbar, tronApp }) => {
|
||||
if (!tronApp) {
|
||||
fail()
|
||||
}
|
||||
|
||||
await page.setBodyDimensions({ width: 1000, height: 500 })
|
||||
await homePage.projectSection.waitFor()
|
||||
|
||||
await test.step('Click on sign out and expect sign in page', async () => {
|
||||
await toolbar.userSidebarButton.click()
|
||||
await toolbar.signOutButton.click()
|
||||
await expect(signInPage.signInButton).toBeVisible()
|
||||
})
|
||||
|
||||
await test.step('Click on sign in and cancel, click again and expect different code', async () => {
|
||||
await signInPage.signInButton.click()
|
||||
await expect(signInPage.userCode).toBeVisible()
|
||||
const firstUserCode = await signInPage.userCode.textContent()
|
||||
await signInPage.cancelSignInButton.click()
|
||||
await expect(signInPage.signInButton).toBeVisible()
|
||||
|
||||
await signInPage.signInButton.click()
|
||||
await expect(signInPage.userCode).toBeVisible()
|
||||
const secondUserCode = await signInPage.userCode.textContent()
|
||||
expect(secondUserCode).not.toEqual(firstUserCode)
|
||||
})
|
||||
|
||||
await test.step('Press back button and remain on home page', async () => {
|
||||
await page.goBack()
|
||||
await expect(homePage.projectSection).not.toBeVisible()
|
||||
await expect(signInPage.signInButton).toBeVisible()
|
||||
})
|
||||
|
||||
await test.step('Sign in, activate, and expect home page', async () => {
|
||||
await signInPage.signInButton.click()
|
||||
await expect(signInPage.userCode).toBeVisible()
|
||||
const userCode = await signInPage.userCode.textContent()
|
||||
expect(userCode).not.toBeNull()
|
||||
await signInPage.verifyAndConfirmAuth(userCode!)
|
||||
|
||||
// Longer timeout than usual here for the wait on home page
|
||||
await expect(homePage.projectSection).toBeVisible({ timeout: 10000 })
|
||||
})
|
||||
}
|
||||
)
|
||||
})
|
@ -18,7 +18,6 @@ import type { Settings } from '@rust/kcl-lib/bindings/Settings'
|
||||
import { CmdBarFixture } from '@e2e/playwright/fixtures/cmdBarFixture'
|
||||
import { EditorFixture } from '@e2e/playwright/fixtures/editorFixture'
|
||||
import { HomePageFixture } from '@e2e/playwright/fixtures/homePageFixture'
|
||||
import { SignInPageFixture } from '@e2e/playwright/fixtures/signInPageFixture'
|
||||
import { SceneFixture } from '@e2e/playwright/fixtures/sceneFixture'
|
||||
import { ToolbarFixture } from '@e2e/playwright/fixtures/toolbarFixture'
|
||||
|
||||
@ -67,7 +66,6 @@ export interface Fixtures {
|
||||
toolbar: ToolbarFixture
|
||||
scene: SceneFixture
|
||||
homePage: HomePageFixture
|
||||
signInPage: SignInPageFixture
|
||||
}
|
||||
|
||||
export class ElectronZoo {
|
||||
@ -389,9 +387,6 @@ const fixturesBasedOnProcessEnvPlatform = {
|
||||
homePage: async ({ page }: { page: Page }, use: FnUse) => {
|
||||
await use(new HomePageFixture(page))
|
||||
},
|
||||
signInPage: async ({ page }: { page: Page }, use: FnUse) => {
|
||||
await use(new SignInPageFixture(page))
|
||||
},
|
||||
}
|
||||
|
||||
if (process.env.PLATFORM === 'web') {
|
||||
|
@ -1,48 +0,0 @@
|
||||
import type { Locator, Page } from '@playwright/test'
|
||||
import { secrets } from '@e2e/playwright/secrets'
|
||||
|
||||
export class SignInPageFixture {
|
||||
public page: Page
|
||||
|
||||
signInButton!: Locator
|
||||
cancelSignInButton!: Locator
|
||||
userCode!: Locator
|
||||
|
||||
apiBaseUrl!: string
|
||||
|
||||
constructor(page: Page) {
|
||||
this.page = page
|
||||
|
||||
this.signInButton = this.page.getByTestId('sign-in-button')
|
||||
this.cancelSignInButton = this.page.getByTestId('cancel-sign-in-button')
|
||||
this.userCode = this.page.getByTestId('sign-in-user-code')
|
||||
|
||||
// TODO: set this thru env var
|
||||
this.apiBaseUrl = 'https://api.dev.zoo.dev'
|
||||
}
|
||||
|
||||
async verifyAndConfirmAuth(userCode: string) {
|
||||
// Device flow: stolen from the tauri days
|
||||
// https://github.com/KittyCAD/modeling-app/blob/d916c7987452e480719004e6d11fd2e595c7d0eb/e2e/tauri/specs/app.spec.ts#L19
|
||||
const headers = {
|
||||
Authorization: `Bearer ${secrets.token}`,
|
||||
Accept: 'application/json',
|
||||
'Content-Type': 'application/json',
|
||||
}
|
||||
const verifyUrl = `${this.apiBaseUrl}/oauth2/device/verify?user_code=${userCode}`
|
||||
console.log(`GET ${verifyUrl}`)
|
||||
const vr = await fetch(verifyUrl, { headers })
|
||||
console.log(vr.status)
|
||||
|
||||
// Device flow: confirm
|
||||
const confirmUrl = `${this.apiBaseUrl}/oauth2/device/confirm`
|
||||
const data = JSON.stringify({ user_code: userCode })
|
||||
console.log(`POST ${confirmUrl} ${data}`)
|
||||
const cr = await fetch(confirmUrl, {
|
||||
headers,
|
||||
method: 'POST',
|
||||
body: data,
|
||||
})
|
||||
console.log(cr.status)
|
||||
}
|
||||
}
|
@ -46,9 +46,6 @@ export class ToolbarFixture {
|
||||
gizmo!: Locator
|
||||
gizmoDisabled!: Locator
|
||||
loadButton!: Locator
|
||||
/** User button for the user sidebar menu */
|
||||
userSidebarButton!: Locator
|
||||
signOutButton!: Locator
|
||||
|
||||
constructor(page: Page) {
|
||||
this.page = page
|
||||
@ -85,9 +82,6 @@ export class ToolbarFixture {
|
||||
// element or two different elements can represent these states.
|
||||
this.gizmo = page.getByTestId('gizmo')
|
||||
this.gizmoDisabled = page.getByTestId('gizmo-disabled')
|
||||
|
||||
this.userSidebarButton = page.getByTestId('user-sidebar-toggle')
|
||||
this.signOutButton = page.getByTestId('user-sidebar-sign-out')
|
||||
}
|
||||
|
||||
get logoLink() {
|
||||
|
@ -409,7 +409,11 @@ test.describe('Native file menu', { tag: ['@electron'] }, () => {
|
||||
)
|
||||
.toBe(true)
|
||||
})
|
||||
test('Home.Help.Report a bug', async ({ tronApp, cmdBar, page }) => {
|
||||
test('Home.Help.Refresh and report a bug', async ({
|
||||
tronApp,
|
||||
cmdBar,
|
||||
page,
|
||||
}) => {
|
||||
if (!tronApp) fail()
|
||||
// Run electron snippet to find the Menu!
|
||||
await page.waitForTimeout(100) // wait for createModelingPageMenu() to run
|
||||
@ -420,8 +424,9 @@ test.describe('Native file menu', { tag: ['@electron'] }, () => {
|
||||
if (!app || !app.applicationMenu) {
|
||||
return false
|
||||
}
|
||||
const menu =
|
||||
app.applicationMenu.getMenuItemById('Help.Report a bug')
|
||||
const menu = app.applicationMenu.getMenuItemById(
|
||||
'Help.Refresh and report a bug'
|
||||
)
|
||||
if (!menu) return false
|
||||
menu.click()
|
||||
return true
|
||||
@ -2286,7 +2291,7 @@ test.describe('Native file menu', { tag: ['@electron'] }, () => {
|
||||
if (!menu) fail()
|
||||
})
|
||||
})
|
||||
test('Modeling.Help.Report a bug', async ({
|
||||
test('Modeling.Help.Refresh and report a bug', async ({
|
||||
tronApp,
|
||||
cmdBar,
|
||||
page,
|
||||
@ -2310,8 +2315,9 @@ test.describe('Native file menu', { tag: ['@electron'] }, () => {
|
||||
async () =>
|
||||
await tronApp.electron.evaluate(async ({ app }) => {
|
||||
if (!app || !app.applicationMenu) return false
|
||||
const menu =
|
||||
app.applicationMenu.getMenuItemById('Help.Report a bug')
|
||||
const menu = app.applicationMenu.getMenuItemById(
|
||||
'Help.Refresh and report a bug'
|
||||
)
|
||||
if (!menu) return false
|
||||
menu.click()
|
||||
return true
|
||||
|
@ -331,7 +331,6 @@ test.describe('Onboarding tests', () => {
|
||||
test('Avatar text updates depending on image load success', async ({
|
||||
context,
|
||||
page,
|
||||
toolbar,
|
||||
homePage,
|
||||
tronApp,
|
||||
}) => {
|
||||
@ -363,7 +362,7 @@ test.describe('Onboarding tests', () => {
|
||||
await homePage.goToModelingScene()
|
||||
|
||||
// Test that the text in this step is correct
|
||||
const avatarLocator = toolbar.userSidebarButton.locator('img')
|
||||
const avatarLocator = page.getByTestId('user-sidebar-toggle').locator('img')
|
||||
const onboardingOverlayLocator = page
|
||||
.getByTestId('onboarding-content')
|
||||
.locator('div')
|
||||
@ -405,7 +404,6 @@ test.describe('Onboarding tests', () => {
|
||||
test("Avatar text doesn't mention avatar when no avatar", async ({
|
||||
context,
|
||||
page,
|
||||
toolbar,
|
||||
homePage,
|
||||
tronApp,
|
||||
}) => {
|
||||
@ -437,7 +435,7 @@ test.describe('Onboarding tests', () => {
|
||||
await homePage.goToModelingScene()
|
||||
|
||||
// Test that the text in this step is correct
|
||||
const sidebar = toolbar.userSidebarButton
|
||||
const sidebar = page.getByTestId('user-sidebar-toggle')
|
||||
const avatar = sidebar.locator('img')
|
||||
const onboardingOverlayLocator = page
|
||||
.getByTestId('onboarding-content')
|
||||
@ -466,7 +464,6 @@ test.describe('Onboarding tests', () => {
|
||||
test('Restarting onboarding on desktop takes one attempt', async ({
|
||||
context,
|
||||
page,
|
||||
toolbar,
|
||||
tronApp,
|
||||
}) => {
|
||||
test.fixme(orRunWhenFullSuiteEnabled())
|
||||
@ -505,7 +502,7 @@ test('Restarting onboarding on desktop takes one attempt', async ({
|
||||
.filter({ hasText: 'Tutorial Project 00' })
|
||||
const tutorialModalText = page.getByText('Welcome to Design Studio!')
|
||||
const tutorialDismissButton = page.getByRole('button', { name: 'Dismiss' })
|
||||
const userMenuButton = toolbar.userSidebarButton
|
||||
const userMenuButton = page.getByTestId('user-sidebar-toggle')
|
||||
const userMenuSettingsButton = page.getByRole('button', {
|
||||
name: 'User settings',
|
||||
})
|
||||
|
@ -400,6 +400,11 @@ test(
|
||||
await expect(page.getByText('broken-code')).toBeVisible()
|
||||
await page.getByText('broken-code').click()
|
||||
|
||||
// Gotcha: You can not use scene.settled() since the KCL code is going to fail
|
||||
await expect(
|
||||
page.getByTestId('model-state-indicator-playing')
|
||||
).toBeAttached()
|
||||
|
||||
// Gotcha: Scroll to the text content in code mirror because CodeMirror lazy loads DOM content
|
||||
await editor.scrollToText(
|
||||
"|> line(end = [0, wallMountL], tag = 'outerEdge')"
|
||||
@ -774,9 +779,7 @@ test.describe(`Project management commands`, () => {
|
||||
// Constants and locators
|
||||
const projectHomeLink = page.getByTestId('project-link')
|
||||
const commandButton = page.getByRole('button', { name: 'Commands' })
|
||||
const commandOption = page.getByRole('option', {
|
||||
name: 'rename project',
|
||||
})
|
||||
const commandOption = page.getByRole('option', { name: 'rename project' })
|
||||
const projectNameOption = page.getByRole('option', { name: projectName })
|
||||
const projectRenamedName = `untitled`
|
||||
// const projectMenuButton = page.getByTestId('project-sidebar-toggle')
|
||||
@ -836,9 +839,7 @@ test.describe(`Project management commands`, () => {
|
||||
// Constants and locators
|
||||
const projectHomeLink = page.getByTestId('project-link')
|
||||
const commandButton = page.getByRole('button', { name: 'Commands' })
|
||||
const commandOption = page.getByRole('option', {
|
||||
name: 'delete project',
|
||||
})
|
||||
const commandOption = page.getByRole('option', { name: 'delete project' })
|
||||
const projectNameOption = page.getByRole('option', { name: projectName })
|
||||
const commandWarning = page.getByText('Are you sure you want to delete?')
|
||||
const commandSubmitButton = page.getByRole('button', {
|
||||
@ -890,9 +891,7 @@ test.describe(`Project management commands`, () => {
|
||||
// Constants and locators
|
||||
const projectHomeLink = page.getByTestId('project-link')
|
||||
const commandButton = page.getByRole('button', { name: 'Commands' })
|
||||
const commandOption = page.getByRole('option', {
|
||||
name: 'rename project',
|
||||
})
|
||||
const commandOption = page.getByRole('option', { name: 'rename project' })
|
||||
const projectNameOption = page.getByRole('option', { name: projectName })
|
||||
const projectRenamedName = `untitled`
|
||||
const commandContinueButton = page.getByRole('button', {
|
||||
@ -948,9 +947,7 @@ test.describe(`Project management commands`, () => {
|
||||
// Constants and locators
|
||||
const projectHomeLink = page.getByTestId('project-link')
|
||||
const commandButton = page.getByRole('button', { name: 'Commands' })
|
||||
const commandOption = page.getByRole('option', {
|
||||
name: 'delete project',
|
||||
})
|
||||
const commandOption = page.getByRole('option', { name: 'delete project' })
|
||||
const projectNameOption = page.getByRole('option', { name: projectName })
|
||||
const commandWarning = page.getByText('Are you sure you want to delete?')
|
||||
const commandSubmitButton = page.getByRole('button', {
|
||||
@ -1965,13 +1962,13 @@ test(
|
||||
test(
|
||||
'Settings persist across restarts',
|
||||
{ tag: '@electron' },
|
||||
async ({ page, toolbar }, testInfo) => {
|
||||
async ({ page, scene, cmdBar }, testInfo) => {
|
||||
await test.step('We can change a user setting like theme', async () => {
|
||||
await page.setBodyDimensions({ width: 1200, height: 500 })
|
||||
|
||||
page.on('console', console.log)
|
||||
|
||||
await toolbar.userSidebarButton.click()
|
||||
await page.getByTestId('user-sidebar-toggle').click()
|
||||
|
||||
await page.getByTestId('user-settings').click()
|
||||
|
||||
@ -1998,7 +1995,7 @@ test(
|
||||
test(
|
||||
'Original project name persist after onboarding',
|
||||
{ tag: '@electron' },
|
||||
async ({ page, toolbar }, testInfo) => {
|
||||
async ({ page }, testInfo) => {
|
||||
test.fixme(orRunWhenFullSuiteEnabled())
|
||||
await page.setBodyDimensions({ width: 1200, height: 500 })
|
||||
|
||||
@ -2010,7 +2007,7 @@ test(
|
||||
})
|
||||
|
||||
await test.step('Should go through onboarding', async () => {
|
||||
await toolbar.userSidebarButton.click()
|
||||
await page.getByTestId('user-sidebar-toggle').click()
|
||||
await page.getByTestId('user-settings').click()
|
||||
await page.getByRole('button', { name: 'Replay Onboarding' }).click()
|
||||
|
||||
|
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 56 KiB |
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 57 KiB |
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 47 KiB |
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 47 KiB |
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 58 KiB |
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 69 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 75 KiB |
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 59 KiB |
Before Width: | Height: | Size: 134 KiB After Width: | Height: | Size: 134 KiB |
Before Width: | Height: | Size: 117 KiB After Width: | Height: | Size: 117 KiB |
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 66 KiB |
Before Width: | Height: | Size: 69 KiB After Width: | Height: | Size: 69 KiB |
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 65 KiB |
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 67 KiB |
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 68 KiB |
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 64 KiB |
@ -36,6 +36,7 @@ export const headerMasks = (page: Page) => [
|
||||
]
|
||||
|
||||
export const networkingMasks = (page: Page) => [
|
||||
page.getByTestId('model-state-indicator'),
|
||||
page.getByTestId('network-toggle'),
|
||||
]
|
||||
|
||||
@ -84,6 +85,12 @@ async function waitForPageLoadWithRetry(page: Page) {
|
||||
await expect(async () => {
|
||||
await page.goto('/')
|
||||
const errorMessage = 'App failed to load - 🔃 Retrying ...'
|
||||
await expect(
|
||||
page.getByTestId('model-state-indicator-playing'),
|
||||
errorMessage
|
||||
).toBeAttached({
|
||||
timeout: 20_000,
|
||||
})
|
||||
|
||||
await expect(
|
||||
page.getByRole('button', { name: 'sketch Start Sketch' }),
|
||||
@ -96,6 +103,11 @@ async function waitForPageLoadWithRetry(page: Page) {
|
||||
|
||||
// lee: This needs to be replaced by scene.settled() eventually.
|
||||
async function waitForPageLoad(page: Page) {
|
||||
// wait for all spinners to be gone
|
||||
await expect(page.getByTestId('model-state-indicator-playing')).toBeVisible({
|
||||
timeout: 20_000,
|
||||
})
|
||||
|
||||
await expect(page.getByRole('button', { name: 'Start Sketch' })).toBeEnabled({
|
||||
timeout: 20_000,
|
||||
})
|
||||
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 85 KiB After Width: | Height: | Size: 84 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
@ -6,7 +6,7 @@ uses-engine = { max-threads = 4 }
|
||||
after-engine = { max-threads = 12 }
|
||||
|
||||
[profile.default]
|
||||
slow-timeout = { period = "90s", terminate-after = 1 }
|
||||
slow-timeout = { period = "180s", terminate-after = 1 }
|
||||
|
||||
[profile.ci]
|
||||
slow-timeout = { period = "50s", terminate-after = 5 }
|
||||
|
20
rust/Cargo.lock
generated
@ -1792,7 +1792,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "kcl-bumper"
|
||||
version = "0.1.63"
|
||||
version = "0.1.62"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"clap",
|
||||
@ -1803,7 +1803,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "kcl-derive-docs"
|
||||
version = "0.1.63"
|
||||
version = "0.1.62"
|
||||
dependencies = [
|
||||
"Inflector",
|
||||
"anyhow",
|
||||
@ -1822,7 +1822,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "kcl-directory-test-macro"
|
||||
version = "0.1.63"
|
||||
version = "0.1.62"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@ -1831,7 +1831,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "kcl-language-server"
|
||||
version = "0.2.63"
|
||||
version = "0.2.62"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"clap",
|
||||
@ -1852,7 +1852,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "kcl-language-server-release"
|
||||
version = "0.1.63"
|
||||
version = "0.1.62"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"clap",
|
||||
@ -1872,7 +1872,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "kcl-lib"
|
||||
version = "0.2.63"
|
||||
version = "0.2.62"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"approx 0.5.1",
|
||||
@ -1943,7 +1943,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "kcl-python-bindings"
|
||||
version = "0.3.63"
|
||||
version = "0.3.62"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"kcl-lib",
|
||||
@ -1958,7 +1958,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "kcl-test-server"
|
||||
version = "0.1.63"
|
||||
version = "0.1.62"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"hyper 0.14.32",
|
||||
@ -1971,7 +1971,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "kcl-to-core"
|
||||
version = "0.1.63"
|
||||
version = "0.1.62"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
@ -1985,7 +1985,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "kcl-wasm-lib"
|
||||
version = "0.1.63"
|
||||
version = "0.1.62"
|
||||
dependencies = [
|
||||
"bson",
|
||||
"console_error_panic_hook",
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
[package]
|
||||
name = "kcl-bumper"
|
||||
version = "0.1.63"
|
||||
version = "0.1.62"
|
||||
edition = "2021"
|
||||
repository = "https://github.com/KittyCAD/modeling-api"
|
||||
rust-version = "1.76"
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "kcl-derive-docs"
|
||||
description = "A tool for generating documentation from Rust derive macros"
|
||||
version = "0.1.63"
|
||||
version = "0.1.62"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
repository = "https://github.com/KittyCAD/modeling-app"
|
||||
|
@ -6,11 +6,12 @@
|
||||
mod tests;
|
||||
mod unbox;
|
||||
|
||||
use std::collections::HashMap;
|
||||
use std::{collections::HashMap, fs};
|
||||
|
||||
use convert_case::Casing;
|
||||
use inflector::{cases::camelcase::to_camel_case, Inflector};
|
||||
use once_cell::sync::Lazy;
|
||||
use proc_macro2::Span;
|
||||
use quote::{format_ident, quote, quote_spanned, ToTokens};
|
||||
use regex::Regex;
|
||||
use serde::Deserialize;
|
||||
@ -21,6 +22,16 @@ use syn::{
|
||||
};
|
||||
use unbox::unbox;
|
||||
|
||||
#[proc_macro_attribute]
|
||||
pub fn stdlib(attr: proc_macro::TokenStream, item: proc_macro::TokenStream) -> proc_macro::TokenStream {
|
||||
do_output(do_stdlib(attr.into(), item.into()))
|
||||
}
|
||||
|
||||
#[proc_macro_attribute]
|
||||
pub fn for_each_std_mod(_attr: proc_macro::TokenStream, item: proc_macro::TokenStream) -> proc_macro::TokenStream {
|
||||
do_for_each_std_mod(item.into()).into()
|
||||
}
|
||||
|
||||
/// Describes an argument of a stdlib function.
|
||||
#[derive(Deserialize, Debug)]
|
||||
struct ArgMetadata {
|
||||
@ -73,11 +84,6 @@ struct StdlibMetadata {
|
||||
args: HashMap<String, ArgMetadata>,
|
||||
}
|
||||
|
||||
#[proc_macro_attribute]
|
||||
pub fn stdlib(attr: proc_macro::TokenStream, item: proc_macro::TokenStream) -> proc_macro::TokenStream {
|
||||
do_output(do_stdlib(attr.into(), item.into()))
|
||||
}
|
||||
|
||||
fn do_stdlib(
|
||||
attr: proc_macro2::TokenStream,
|
||||
item: proc_macro2::TokenStream,
|
||||
@ -86,6 +92,31 @@ fn do_stdlib(
|
||||
do_stdlib_inner(metadata, attr, item)
|
||||
}
|
||||
|
||||
fn do_for_each_std_mod(item: proc_macro2::TokenStream) -> proc_macro2::TokenStream {
|
||||
let item: syn::ItemFn = syn::parse2(item.clone()).unwrap();
|
||||
let mut result = proc_macro2::TokenStream::new();
|
||||
for name in fs::read_dir("kcl-lib/std").unwrap().filter_map(|e| {
|
||||
let e = e.unwrap();
|
||||
let filename = e.file_name();
|
||||
filename.to_str().unwrap().strip_suffix(".kcl").map(str::to_owned)
|
||||
}) {
|
||||
let mut item = item.clone();
|
||||
item.sig.ident = syn::Ident::new(&format!("{}_{}", item.sig.ident, name), Span::call_site());
|
||||
let stmts = &item.block.stmts;
|
||||
//let name = format!("\"{name}\"");
|
||||
let block = quote! {
|
||||
{
|
||||
const STD_MOD_NAME: &str = #name;
|
||||
#(#stmts)*
|
||||
}
|
||||
};
|
||||
item.block = Box::new(syn::parse2(block).unwrap());
|
||||
result.extend(Some(item.into_token_stream()));
|
||||
}
|
||||
|
||||
result
|
||||
}
|
||||
|
||||
fn do_output(res: Result<(proc_macro2::TokenStream, Vec<Error>), Error>) -> proc_macro::TokenStream {
|
||||
match res {
|
||||
Err(err) => err.to_compile_error().into(),
|
||||
@ -671,6 +702,7 @@ fn normalize_comment_string(s: String) -> Vec<String> {
|
||||
|
||||
/// Represent an item without concern for its body which may (or may not)
|
||||
/// contain syntax errors.
|
||||
#[derive(Clone)]
|
||||
struct ItemFnForSignature {
|
||||
pub attrs: Vec<Attribute>,
|
||||
pub vis: Visibility,
|
||||
|
@ -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.63"
|
||||
version = "0.1.62"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
repository = "https://github.com/KittyCAD/modeling-app"
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "kcl-language-server-release"
|
||||
version = "0.1.63"
|
||||
version = "0.1.62"
|
||||
edition = "2021"
|
||||
authors = ["KittyCAD Inc <kcl@kittycad.io>"]
|
||||
publish = false
|
||||
|
@ -2,7 +2,7 @@
|
||||
name = "kcl-language-server"
|
||||
description = "A language server for KCL."
|
||||
authors = ["KittyCAD Inc <kcl@kittycad.io>"]
|
||||
version = "0.2.63"
|
||||
version = "0.2.62"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "kcl-lib"
|
||||
description = "KittyCAD Language implementation and tools"
|
||||
version = "0.2.63"
|
||||
version = "0.2.62"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
repository = "https://github.com/KittyCAD/modeling-app"
|
||||
|
@ -19,30 +19,6 @@ We've built a lot of tooling to make contributing to KCL easier. If you are inte
|
||||
11. Run `just redo-kcl-stdlib-docs` to generate new Markdown documentation for your function that will be used [to generate docs on our website](https://zoo.dev/docs/kcl).
|
||||
12. Create a PR in GitHub.
|
||||
|
||||
## Making a Simulation Test
|
||||
|
||||
If you have KCL code that you want to test, simulation tests are the preferred way to do that.
|
||||
|
||||
Make a new sim test. Replace `foo_bar` with the snake case name of your test. The name needs to be unique.
|
||||
|
||||
```shell
|
||||
just new-sim-test foo_bar
|
||||
```
|
||||
|
||||
It will show the commands it ran, including the path to a new file `foo_bar/input.kcl`. Edit that with your KCL. If you need additional KCL files to import, include them in this directory.
|
||||
|
||||
Then run it.
|
||||
|
||||
```shell
|
||||
just overwrite-sim-test foo_bar
|
||||
```
|
||||
|
||||
The above should create a bunch of output files in the same directory.
|
||||
|
||||
Make sure you actually look at them. Specifically, if there's an `execution_error.snap`, it means the execution failed. Depending on the test, this may be what you expect. But if it's not, delete the snap file and run it again.
|
||||
|
||||
When it looks good, commit all the files, including `input.kcl`, generated output files in the test directory, and changes to `simulation_tests.rs`.
|
||||
|
||||
## Bumping the version
|
||||
|
||||
If you bump the version of kcl-lib and push it to crates, be sure to update the repos we own that use it as well. These are:
|
||||
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 46 KiB |
@ -61,8 +61,10 @@ impl CollectionVisitor {
|
||||
format!("std::{}::", self.name)
|
||||
};
|
||||
let mut dd = match var.kind {
|
||||
VariableKind::Fn => DocData::Fn(FnData::from_ast(var, qual_name, preferred_prefix)),
|
||||
VariableKind::Const => DocData::Const(ConstData::from_ast(var, qual_name, preferred_prefix)),
|
||||
VariableKind::Fn => DocData::Fn(FnData::from_ast(var, qual_name, preferred_prefix, name)),
|
||||
VariableKind::Const => {
|
||||
DocData::Const(ConstData::from_ast(var, qual_name, preferred_prefix, name))
|
||||
}
|
||||
};
|
||||
|
||||
dd.with_meta(&var.outer_attrs);
|
||||
@ -79,7 +81,7 @@ impl CollectionVisitor {
|
||||
} else {
|
||||
format!("std::{}::", self.name)
|
||||
};
|
||||
let mut dd = DocData::Ty(TyData::from_ast(ty, qual_name, preferred_prefix));
|
||||
let mut dd = DocData::Ty(TyData::from_ast(ty, qual_name, preferred_prefix, name));
|
||||
|
||||
dd.with_meta(&ty.outer_attrs);
|
||||
for a in &ty.outer_attrs {
|
||||
@ -114,6 +116,16 @@ impl DocData {
|
||||
}
|
||||
}
|
||||
|
||||
/// The name of the module in which the item is declared, e.g., `sketch`
|
||||
#[allow(dead_code)]
|
||||
pub fn module_name(&self) -> &str {
|
||||
match self {
|
||||
DocData::Fn(f) => &f.module_name,
|
||||
DocData::Const(c) => &c.module_name,
|
||||
DocData::Ty(t) => &t.module_name,
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn file_name(&self) -> String {
|
||||
match self {
|
||||
@ -132,6 +144,7 @@ impl DocData {
|
||||
}
|
||||
}
|
||||
|
||||
/// The path to the module through which the item is accessed, e.g., `std::sketch`
|
||||
#[allow(dead_code)]
|
||||
pub fn mod_name(&self) -> String {
|
||||
let q = match self {
|
||||
@ -217,6 +230,8 @@ pub struct ConstData {
|
||||
/// Code examples.
|
||||
/// These are tested and we know they compile and execute.
|
||||
pub examples: Vec<(String, ExampleProperties)>,
|
||||
|
||||
pub module_name: String,
|
||||
}
|
||||
|
||||
impl ConstData {
|
||||
@ -224,6 +239,7 @@ impl ConstData {
|
||||
var: &crate::parsing::ast::types::VariableDeclaration,
|
||||
mut qual_name: String,
|
||||
preferred_prefix: &str,
|
||||
module_name: &str,
|
||||
) -> Self {
|
||||
assert_eq!(var.kind, crate::parsing::ast::types::VariableKind::Const);
|
||||
|
||||
@ -263,6 +279,7 @@ impl ConstData {
|
||||
summary: None,
|
||||
description: None,
|
||||
examples: Vec::new(),
|
||||
module_name: module_name.to_owned(),
|
||||
}
|
||||
}
|
||||
|
||||
@ -334,6 +351,8 @@ pub struct FnData {
|
||||
pub examples: Vec<(String, ExampleProperties)>,
|
||||
#[allow(dead_code)]
|
||||
pub referenced_types: Vec<String>,
|
||||
|
||||
pub module_name: String,
|
||||
}
|
||||
|
||||
impl FnData {
|
||||
@ -341,6 +360,7 @@ impl FnData {
|
||||
var: &crate::parsing::ast::types::VariableDeclaration,
|
||||
mut qual_name: String,
|
||||
preferred_prefix: &str,
|
||||
module_name: &str,
|
||||
) -> Self {
|
||||
assert_eq!(var.kind, crate::parsing::ast::types::VariableKind::Fn);
|
||||
let crate::parsing::ast::types::Expr::FunctionExpression(expr) = &var.declaration.init else {
|
||||
@ -375,6 +395,7 @@ impl FnData {
|
||||
description: None,
|
||||
examples: Vec::new(),
|
||||
referenced_types: referenced_types.into_iter().collect(),
|
||||
module_name: module_name.to_owned(),
|
||||
}
|
||||
}
|
||||
|
||||
@ -654,6 +675,8 @@ pub struct TyData {
|
||||
pub examples: Vec<(String, ExampleProperties)>,
|
||||
#[allow(dead_code)]
|
||||
pub referenced_types: Vec<String>,
|
||||
|
||||
pub module_name: String,
|
||||
}
|
||||
|
||||
impl TyData {
|
||||
@ -661,6 +684,7 @@ impl TyData {
|
||||
ty: &crate::parsing::ast::types::TypeDeclaration,
|
||||
mut qual_name: String,
|
||||
preferred_prefix: &str,
|
||||
module_name: &str,
|
||||
) -> Self {
|
||||
let name = ty.name.name.clone();
|
||||
qual_name.push_str(&name);
|
||||
@ -684,6 +708,7 @@ impl TyData {
|
||||
description: None,
|
||||
examples: Vec::new(),
|
||||
referenced_types: referenced_types.into_iter().collect(),
|
||||
module_name: module_name.to_owned(),
|
||||
}
|
||||
}
|
||||
|
||||
@ -1009,6 +1034,8 @@ fn collect_type_names_from_primitive(ty: &PrimitiveType) -> String {
|
||||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use kcl_derive_docs::for_each_std_mod;
|
||||
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
@ -1047,18 +1074,28 @@ mod test {
|
||||
);
|
||||
}
|
||||
|
||||
#[tokio::test(flavor = "multi_thread", worker_threads = 5)]
|
||||
async fn test_examples() -> miette::Result<()> {
|
||||
#[for_each_std_mod]
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
async fn test_examples() {
|
||||
let std = walk_prelude();
|
||||
let mut errs = Vec::new();
|
||||
for d in std {
|
||||
if d.module_name() != STD_MOD_NAME {
|
||||
continue;
|
||||
}
|
||||
|
||||
for (i, eg) in d.examples().enumerate() {
|
||||
let result = match crate::test_server::execute_and_snapshot(eg, None).await {
|
||||
Err(crate::errors::ExecError::Kcl(e)) => {
|
||||
return Err(miette::Report::new(crate::errors::Report {
|
||||
error: e.error,
|
||||
filename: format!("{}{i}", d.name()),
|
||||
kcl_source: eg.to_string(),
|
||||
}));
|
||||
errs.push(
|
||||
miette::Report::new(crate::errors::Report {
|
||||
error: e.error,
|
||||
filename: format!("{}{i}", d.name()),
|
||||
kcl_source: eg.to_string(),
|
||||
})
|
||||
.to_string(),
|
||||
);
|
||||
continue;
|
||||
}
|
||||
Err(other_err) => panic!("{}", other_err),
|
||||
Ok(img) => img,
|
||||
@ -1071,6 +1108,8 @@ mod test {
|
||||
}
|
||||
}
|
||||
|
||||
Ok(())
|
||||
if !errs.is_empty() {
|
||||
panic!("{}", errs.join("\n\n"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1142,9 +1142,6 @@ impl Node<UnaryExpression> {
|
||||
}
|
||||
KclValue::Plane { value } => {
|
||||
let mut plane = value.clone();
|
||||
plane.z_axis.x *= -1.0;
|
||||
plane.z_axis.y *= -1.0;
|
||||
plane.z_axis.z *= -1.0;
|
||||
|
||||
plane.value = PlaneType::Uninit;
|
||||
plane.id = exec_state.next_uuid();
|
||||
@ -2649,7 +2646,15 @@ p2 = -p
|
||||
.get_from("p2", result.mem_env, SourceRange::default(), 0)
|
||||
.unwrap()
|
||||
{
|
||||
KclValue::Plane { value } => assert_eq!(value.z_axis.z, -1.0),
|
||||
KclValue::Plane { value } => {
|
||||
// The negation implementation only changes the plane type to Uninit
|
||||
// and updates the id, but doesn't actually negate any vectors
|
||||
assert_eq!(value.value, PlaneType::Uninit);
|
||||
|
||||
// Calculate z-axis as cross product to verify it's still the same direction
|
||||
let z_axis = value.x_axis.cross(&value.y_axis);
|
||||
assert_eq!(z_axis.z, 1.0)
|
||||
},
|
||||
_ => unreachable!(),
|
||||
}
|
||||
}
|
||||
|
@ -262,14 +262,15 @@ pub struct Plane {
|
||||
pub x_axis: Point3d,
|
||||
/// What should the plane's Y axis be?
|
||||
pub y_axis: Point3d,
|
||||
/// The z-axis (normal).
|
||||
pub z_axis: Point3d,
|
||||
#[serde(skip)]
|
||||
pub meta: Vec<Metadata>,
|
||||
}
|
||||
|
||||
impl Plane {
|
||||
pub(crate) fn into_plane_data(self) -> PlaneData {
|
||||
crate::log::log(format!("planeTEST!!"));
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
web_sys::console::log_1(&format!("foo=").into());
|
||||
if self.origin.is_zero() {
|
||||
match self {
|
||||
Self {
|
||||
@ -296,13 +297,6 @@ impl Plane {
|
||||
z: 0.0,
|
||||
units: UnitLen::Mm,
|
||||
},
|
||||
z_axis:
|
||||
Point3d {
|
||||
x: 0.0,
|
||||
y: 0.0,
|
||||
z: 1.0,
|
||||
units: UnitLen::Mm,
|
||||
},
|
||||
..
|
||||
} => return PlaneData::XY,
|
||||
Self {
|
||||
@ -315,7 +309,7 @@ impl Plane {
|
||||
},
|
||||
x_axis:
|
||||
Point3d {
|
||||
x: 1.0,
|
||||
x: -1.0,
|
||||
y: 0.0,
|
||||
z: 0.0,
|
||||
units: UnitLen::Mm,
|
||||
@ -327,13 +321,6 @@ impl Plane {
|
||||
z: 0.0,
|
||||
units: UnitLen::Mm,
|
||||
},
|
||||
z_axis:
|
||||
Point3d {
|
||||
x: 0.0,
|
||||
y: 0.0,
|
||||
z: -1.0,
|
||||
units: UnitLen::Mm,
|
||||
},
|
||||
..
|
||||
} => return PlaneData::NegXY,
|
||||
Self {
|
||||
@ -358,13 +345,6 @@ impl Plane {
|
||||
z: 1.0,
|
||||
units: UnitLen::Mm,
|
||||
},
|
||||
z_axis:
|
||||
Point3d {
|
||||
x: 0.0,
|
||||
y: -1.0,
|
||||
z: 0.0,
|
||||
units: UnitLen::Mm,
|
||||
},
|
||||
..
|
||||
} => return PlaneData::XZ,
|
||||
Self {
|
||||
@ -377,7 +357,7 @@ impl Plane {
|
||||
},
|
||||
x_axis:
|
||||
Point3d {
|
||||
x: 1.0,
|
||||
x: -1.0,
|
||||
y: 0.0,
|
||||
z: 0.0,
|
||||
units: UnitLen::Mm,
|
||||
@ -389,13 +369,6 @@ impl Plane {
|
||||
z: 1.0,
|
||||
units: UnitLen::Mm,
|
||||
},
|
||||
z_axis:
|
||||
Point3d {
|
||||
x: 0.0,
|
||||
y: 1.0,
|
||||
z: 0.0,
|
||||
units: UnitLen::Mm,
|
||||
},
|
||||
..
|
||||
} => return PlaneData::NegXZ,
|
||||
Self {
|
||||
@ -420,13 +393,6 @@ impl Plane {
|
||||
z: 1.0,
|
||||
units: UnitLen::Mm,
|
||||
},
|
||||
z_axis:
|
||||
Point3d {
|
||||
x: 1.0,
|
||||
y: 0.0,
|
||||
z: 0.0,
|
||||
units: UnitLen::Mm,
|
||||
},
|
||||
..
|
||||
} => return PlaneData::YZ,
|
||||
Self {
|
||||
@ -440,7 +406,7 @@ impl Plane {
|
||||
x_axis:
|
||||
Point3d {
|
||||
x: 0.0,
|
||||
y: 1.0,
|
||||
y: -1.0,
|
||||
z: 0.0,
|
||||
units: UnitLen::Mm,
|
||||
},
|
||||
@ -451,13 +417,6 @@ impl Plane {
|
||||
z: 1.0,
|
||||
units: UnitLen::Mm,
|
||||
},
|
||||
z_axis:
|
||||
Point3d {
|
||||
x: -1.0,
|
||||
y: 0.0,
|
||||
z: 0.0,
|
||||
units: UnitLen::Mm,
|
||||
},
|
||||
..
|
||||
} => return PlaneData::NegYZ,
|
||||
_ => {}
|
||||
@ -468,12 +427,13 @@ impl Plane {
|
||||
origin: self.origin,
|
||||
x_axis: self.x_axis,
|
||||
y_axis: self.y_axis,
|
||||
z_axis: self.z_axis,
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn from_plane_data(value: PlaneData, exec_state: &mut ExecState) -> Self {
|
||||
let id = exec_state.next_uuid();
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
web_sys::console::log_1(&format!("value: {:?}", value).into());
|
||||
match value {
|
||||
PlaneData::XY => Plane {
|
||||
id,
|
||||
@ -481,7 +441,6 @@ impl Plane {
|
||||
origin: Point3d::new(0.0, 0.0, 0.0, UnitLen::Mm),
|
||||
x_axis: Point3d::new(1.0, 0.0, 0.0, UnitLen::Mm),
|
||||
y_axis: Point3d::new(0.0, 1.0, 0.0, UnitLen::Mm),
|
||||
z_axis: Point3d::new(0.0, 0.0, 1.0, UnitLen::Mm),
|
||||
value: PlaneType::XY,
|
||||
meta: vec![],
|
||||
},
|
||||
@ -489,10 +448,9 @@ impl Plane {
|
||||
id,
|
||||
artifact_id: id.into(),
|
||||
origin: Point3d::new(0.0, 0.0, 0.0, UnitLen::Mm),
|
||||
x_axis: Point3d::new(1.0, 0.0, 0.0, UnitLen::Mm),
|
||||
x_axis: Point3d::new(-1.0, 0.0, 0.0, UnitLen::Mm),
|
||||
y_axis: Point3d::new(0.0, 1.0, 0.0, UnitLen::Mm),
|
||||
z_axis: Point3d::new(0.0, 0.0, -1.0, UnitLen::Mm),
|
||||
value: PlaneType::XY,
|
||||
value: PlaneType::NegXY,
|
||||
meta: vec![],
|
||||
},
|
||||
PlaneData::XZ => Plane {
|
||||
@ -501,7 +459,6 @@ impl Plane {
|
||||
origin: Point3d::new(0.0, 0.0, 0.0, UnitLen::Mm),
|
||||
x_axis: Point3d::new(1.0, 0.0, 0.0, UnitLen::Mm),
|
||||
y_axis: Point3d::new(0.0, 0.0, 1.0, UnitLen::Mm),
|
||||
z_axis: Point3d::new(0.0, -1.0, 0.0, UnitLen::Mm),
|
||||
value: PlaneType::XZ,
|
||||
meta: vec![],
|
||||
},
|
||||
@ -511,8 +468,7 @@ impl Plane {
|
||||
origin: Point3d::new(0.0, 0.0, 0.0, UnitLen::Mm),
|
||||
x_axis: Point3d::new(-1.0, 0.0, 0.0, UnitLen::Mm),
|
||||
y_axis: Point3d::new(0.0, 0.0, 1.0, UnitLen::Mm),
|
||||
z_axis: Point3d::new(0.0, 1.0, 0.0, UnitLen::Mm),
|
||||
value: PlaneType::XZ,
|
||||
value: PlaneType::NegXZ,
|
||||
meta: vec![],
|
||||
},
|
||||
PlaneData::YZ => Plane {
|
||||
@ -521,7 +477,6 @@ impl Plane {
|
||||
origin: Point3d::new(0.0, 0.0, 0.0, UnitLen::Mm),
|
||||
x_axis: Point3d::new(0.0, 1.0, 0.0, UnitLen::Mm),
|
||||
y_axis: Point3d::new(0.0, 0.0, 1.0, UnitLen::Mm),
|
||||
z_axis: Point3d::new(1.0, 0.0, 0.0, UnitLen::Mm),
|
||||
value: PlaneType::YZ,
|
||||
meta: vec![],
|
||||
},
|
||||
@ -529,17 +484,15 @@ impl Plane {
|
||||
id,
|
||||
artifact_id: id.into(),
|
||||
origin: Point3d::new(0.0, 0.0, 0.0, UnitLen::Mm),
|
||||
x_axis: Point3d::new(0.0, 1.0, 0.0, UnitLen::Mm),
|
||||
x_axis: Point3d::new(0.0, -1.0, 0.0, UnitLen::Mm),
|
||||
y_axis: Point3d::new(0.0, 0.0, 1.0, UnitLen::Mm),
|
||||
z_axis: Point3d::new(-1.0, 0.0, 0.0, UnitLen::Mm),
|
||||
value: PlaneType::YZ,
|
||||
value: PlaneType::NegYZ,
|
||||
meta: vec![],
|
||||
},
|
||||
PlaneData::Plane {
|
||||
origin,
|
||||
x_axis,
|
||||
y_axis,
|
||||
z_axis,
|
||||
} => {
|
||||
let id = exec_state.next_uuid();
|
||||
Plane {
|
||||
@ -548,7 +501,6 @@ impl Plane {
|
||||
origin,
|
||||
x_axis,
|
||||
y_axis,
|
||||
z_axis,
|
||||
value: PlaneType::Custom,
|
||||
meta: vec![],
|
||||
}
|
||||
@ -594,12 +546,21 @@ pub enum PlaneType {
|
||||
#[serde(rename = "XY", alias = "xy")]
|
||||
#[display("XY")]
|
||||
XY,
|
||||
#[serde(rename = "-XY", alias = "-xy")]
|
||||
#[display("-XY")]
|
||||
NegXY,
|
||||
#[serde(rename = "XZ", alias = "xz")]
|
||||
#[display("XZ")]
|
||||
XZ,
|
||||
#[serde(rename = "-XZ", alias = "-xz")]
|
||||
#[display("-XZ")]
|
||||
NegXZ,
|
||||
#[serde(rename = "YZ", alias = "yz")]
|
||||
#[display("YZ")]
|
||||
YZ,
|
||||
#[serde(rename = "-YZ", alias = "-yz")]
|
||||
#[display("-YZ")]
|
||||
NegYZ,
|
||||
/// A custom plane.
|
||||
#[display("Custom")]
|
||||
Custom,
|
||||
@ -656,8 +617,12 @@ impl Sketch {
|
||||
adjust_camera: false,
|
||||
planar_normal: if let SketchSurface::Plane(plane) = &self.on {
|
||||
// We pass in the normal for the plane here.
|
||||
Some(plane.z_axis.into())
|
||||
let z_axis = Some(plane.x_axis.cross(&plane.y_axis).into());
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
web_sys::console::log_1(&format!("plane normal geo: {:?}, x_axis: {:?}, y_axis: {:?}", z_axis, plane.x_axis, plane.y_axis).into());
|
||||
z_axis
|
||||
} else {
|
||||
crate::log::log(format!("no Plane normal"));
|
||||
None
|
||||
},
|
||||
}),
|
||||
@ -702,7 +667,7 @@ impl SketchSurface {
|
||||
}
|
||||
pub(crate) fn z_axis(&self) -> Point3d {
|
||||
match self {
|
||||
SketchSurface::Plane(plane) => plane.z_axis,
|
||||
SketchSurface::Plane(plane) => plane.x_axis.cross(&plane.y_axis),
|
||||
SketchSurface::Face(face) => face.z_axis,
|
||||
}
|
||||
}
|
||||
@ -929,6 +894,16 @@ impl Point3d {
|
||||
pub const fn is_zero(&self) -> bool {
|
||||
self.x == 0.0 && self.y == 0.0 && self.z == 0.0
|
||||
}
|
||||
|
||||
/// Calculate the cross product of this vector with another
|
||||
pub fn cross(&self, other: &Self) -> Self {
|
||||
Self {
|
||||
x: self.y * other.z - self.z * other.y,
|
||||
y: self.z * other.x - self.x * other.z,
|
||||
z: self.x * other.y - self.y * other.x,
|
||||
units: self.units,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<[TyF64; 3]> for Point3d {
|
||||
|
@ -1820,6 +1820,18 @@ const bracket = startSketchOn(XY)
|
||||
parse_execute(ast).await.unwrap();
|
||||
}
|
||||
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
async fn test_bad_arg_count_std() {
|
||||
let ast = "startSketchOn(XY)
|
||||
|> startProfileAt([0, 0], %)
|
||||
|> profileStartX()";
|
||||
assert!(parse_execute(ast)
|
||||
.await
|
||||
.unwrap_err()
|
||||
.message()
|
||||
.contains("Expected a sketch argument"));
|
||||
}
|
||||
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
async fn test_unary_operator_not_succeeds() {
|
||||
let ast = r#"
|
||||
|
@ -1043,10 +1043,6 @@ impl KclValue {
|
||||
.get("yAxis")
|
||||
.and_then(Point3d::from_kcl_val)
|
||||
.ok_or(CoercionError::from(self))?;
|
||||
let z_axis = value
|
||||
.get("zAxis")
|
||||
.and_then(Point3d::from_kcl_val)
|
||||
.ok_or(CoercionError::from(self))?;
|
||||
|
||||
let id = exec_state.mod_local.id_generator.next_uuid();
|
||||
let plane = Plane {
|
||||
@ -1055,7 +1051,6 @@ impl KclValue {
|
||||
origin,
|
||||
x_axis,
|
||||
y_axis,
|
||||
z_axis,
|
||||
value: super::PlaneType::Uninit,
|
||||
meta: meta.clone(),
|
||||
};
|
||||
|
@ -43,5 +43,5 @@ async fn main() {
|
||||
.await
|
||||
.unwrap();
|
||||
let mut exec_state = ExecState::new(&ctx);
|
||||
ctx.run(&program, &mut exec_state).await.unwrap();
|
||||
ctx.run(&program, &mut exec_state).await.map_err(|e| e.error).unwrap();
|
||||
}
|
||||
|
@ -2074,7 +2074,6 @@ fn possible_operands(i: &mut TokenSlice) -> PResult<Expr> {
|
||||
member_expression.map(Box::new).map(Expr::MemberExpression),
|
||||
literal.map(Expr::Literal),
|
||||
fn_call.map(Box::new).map(Expr::CallExpression),
|
||||
fn_call_kw.map(Box::new).map(Expr::CallExpressionKw),
|
||||
name.map(Box::new).map(Expr::Name),
|
||||
binary_expr_in_parens.map(Box::new).map(Expr::BinaryExpression),
|
||||
unnecessarily_bracketed,
|
||||
@ -3255,14 +3254,6 @@ mod tests {
|
||||
assert_eq!(err.message, "Unexpected end of file. The compiler expected )");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn kw_call_as_operand() {
|
||||
let tokens = crate::parsing::token::lex("f(x = 1)", ModuleId::default()).unwrap();
|
||||
let tokens = tokens.as_slice();
|
||||
let op = operand.parse(tokens).unwrap();
|
||||
println!("{op:#?}");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn weird_program_just_a_pipe() {
|
||||
let tokens = crate::parsing::token::lex("|", ModuleId::default()).unwrap();
|
||||
@ -5398,7 +5389,6 @@ my14 = 4 ^ 2 - 3 ^ 2 * 2
|
||||
bar = x,
|
||||
)"#
|
||||
);
|
||||
snapshot_test!(kw_function_in_binary_op, r#"val = f(x = 1) + 1"#);
|
||||
}
|
||||
|
||||
#[allow(unused)]
|
||||
|
@ -1,99 +0,0 @@
|
||||
---
|
||||
source: kcl-lib/src/parsing/parser.rs
|
||||
expression: actual
|
||||
---
|
||||
{
|
||||
"body": [
|
||||
{
|
||||
"commentStart": 0,
|
||||
"declaration": {
|
||||
"commentStart": 0,
|
||||
"end": 18,
|
||||
"id": {
|
||||
"commentStart": 0,
|
||||
"end": 3,
|
||||
"name": "val",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
"commentStart": 6,
|
||||
"end": 18,
|
||||
"left": {
|
||||
"arguments": [
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"commentStart": 8,
|
||||
"end": 9,
|
||||
"name": "x",
|
||||
"start": 8,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"commentStart": 12,
|
||||
"end": 13,
|
||||
"raw": "1",
|
||||
"start": 12,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 1.0,
|
||||
"suffix": "None"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"abs_path": false,
|
||||
"commentStart": 6,
|
||||
"end": 7,
|
||||
"name": {
|
||||
"commentStart": 6,
|
||||
"end": 7,
|
||||
"name": "f",
|
||||
"start": 6,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 6,
|
||||
"type": "Name"
|
||||
},
|
||||
"commentStart": 6,
|
||||
"end": 14,
|
||||
"start": 6,
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": null
|
||||
},
|
||||
"operator": "+",
|
||||
"right": {
|
||||
"commentStart": 17,
|
||||
"end": 18,
|
||||
"raw": "1",
|
||||
"start": 17,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
"value": 1.0,
|
||||
"suffix": "None"
|
||||
}
|
||||
},
|
||||
"start": 6,
|
||||
"type": "BinaryExpression",
|
||||
"type": "BinaryExpression"
|
||||
},
|
||||
"start": 0,
|
||||
"type": "VariableDeclarator"
|
||||
},
|
||||
"end": 18,
|
||||
"kind": "const",
|
||||
"start": 0,
|
||||
"type": "VariableDeclaration",
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"commentStart": 0,
|
||||
"end": 18,
|
||||
"start": 0
|
||||
}
|
@ -675,6 +675,28 @@ impl Args {
|
||||
Ok((sketches, sketch))
|
||||
}
|
||||
|
||||
pub(crate) fn get_sketch(&self, exec_state: &mut ExecState) -> Result<Sketch, KclError> {
|
||||
let Some(arg0) = self.args.first() else {
|
||||
return Err(KclError::Semantic(KclErrorDetails {
|
||||
message: "Expected a sketch argument".to_owned(),
|
||||
source_ranges: vec![self.source_range],
|
||||
}));
|
||||
};
|
||||
let sarg = arg0
|
||||
.value
|
||||
.coerce(&RuntimeType::Primitive(PrimitiveType::Sketch), exec_state)
|
||||
.map_err(|_| {
|
||||
KclError::Type(KclErrorDetails {
|
||||
message: format!("Expected a sketch, found {}", arg0.value.human_friendly_type()),
|
||||
source_ranges: vec![self.source_range],
|
||||
})
|
||||
})?;
|
||||
match sarg {
|
||||
KclValue::Sketch { value } => Ok(*value),
|
||||
_ => unreachable!(),
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn get_data<'a, T>(&'a self) -> Result<T, KclError>
|
||||
where
|
||||
T: FromArgs<'a>,
|
||||
@ -686,6 +708,49 @@ impl Args {
|
||||
FromArgs::from_args(self, 0)
|
||||
}
|
||||
|
||||
pub(crate) fn get_length_and_solid(&self, exec_state: &mut ExecState) -> Result<(TyF64, Box<Solid>), KclError> {
|
||||
let Some(arg0) = self.args.first() else {
|
||||
return Err(KclError::Semantic(KclErrorDetails {
|
||||
message: "Expected a `number(Length)` for first argument".to_owned(),
|
||||
source_ranges: vec![self.source_range],
|
||||
}));
|
||||
};
|
||||
let val0 = arg0.value.coerce(&RuntimeType::length(), exec_state).map_err(|_| {
|
||||
KclError::Type(KclErrorDetails {
|
||||
message: format!(
|
||||
"Expected a `number(Length)` for first argument, found {}",
|
||||
arg0.value.human_friendly_type()
|
||||
),
|
||||
source_ranges: vec![self.source_range],
|
||||
})
|
||||
})?;
|
||||
let data = TyF64::from_kcl_val(&val0).unwrap();
|
||||
|
||||
let Some(arg1) = self.args.get(1) else {
|
||||
return Err(KclError::Semantic(KclErrorDetails {
|
||||
message: "Expected a solid for second argument".to_owned(),
|
||||
source_ranges: vec![self.source_range],
|
||||
}));
|
||||
};
|
||||
let sarg = arg1
|
||||
.value
|
||||
.coerce(&RuntimeType::Primitive(PrimitiveType::Solid), exec_state)
|
||||
.map_err(|_| {
|
||||
KclError::Type(KclErrorDetails {
|
||||
message: format!(
|
||||
"Expected a solid for second argument, found {}",
|
||||
arg1.value.human_friendly_type()
|
||||
),
|
||||
source_ranges: vec![self.source_range],
|
||||
})
|
||||
})?;
|
||||
let solid = match sarg {
|
||||
KclValue::Solid { value } => value,
|
||||
_ => unreachable!(),
|
||||
};
|
||||
Ok((data, solid))
|
||||
}
|
||||
|
||||
pub(crate) fn get_tag_to_number_sketch(&self) -> Result<(TagIdentifier, TyF64, Sketch), KclError> {
|
||||
FromArgs::from_args(self, 0)
|
||||
}
|
||||
@ -967,7 +1032,26 @@ impl<'a> FromKclValue<'a> for crate::execution::PlaneType {
|
||||
"Custom" => Self::Custom,
|
||||
_ => return None,
|
||||
};
|
||||
Some(plane_type)
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
web_sys::console::log_1(&format!("PlaneData::from_kcl_val with string: {}", arg.as_str()?).into());
|
||||
|
||||
return match plane_type {
|
||||
Self::XY => {
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
web_sys::console::log_1(&format!("PlaneData::from_kcl_val matching XY").into());
|
||||
Some(Self::XY)
|
||||
},
|
||||
Self::NegXY => {
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
web_sys::console::log_1(&format!("PlaneData::from_kcl_val matching -XY").into());
|
||||
Some(Self::NegXY)
|
||||
},
|
||||
Self::XZ => Some(Self::XZ),
|
||||
Self::NegXZ => Some(Self::NegXZ),
|
||||
Self::YZ => Some(Self::YZ),
|
||||
Self::NegYZ => Some(Self::NegYZ),
|
||||
_ => None,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@ -1083,18 +1167,30 @@ impl<'a> FromKclValue<'a> for super::sketch::PlaneData {
|
||||
fn from_kcl_val(arg: &'a KclValue) -> Option<Self> {
|
||||
// Case 0: actual plane
|
||||
if let KclValue::Plane { value } = arg {
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
web_sys::console::log_1(&format!("PlaneData::from_kcl_val with plane: {:?}", value).into());
|
||||
return Some(Self::Plane {
|
||||
origin: value.origin,
|
||||
x_axis: value.x_axis,
|
||||
y_axis: value.y_axis,
|
||||
z_axis: value.z_axis,
|
||||
});
|
||||
}
|
||||
// Case 1: predefined plane
|
||||
if let Some(s) = arg.as_str() {
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
web_sys::console::log_1(&format!("PlaneData::from_kcl_val with string: {}", s).into());
|
||||
|
||||
return match s {
|
||||
"XY" | "xy" => Some(Self::XY),
|
||||
"-XY" | "-xy" => Some(Self::NegXY),
|
||||
"XY" | "xy" => {
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
web_sys::console::log_1(&format!("PlaneData::from_kcl_val matching XY").into());
|
||||
Some(Self::XY)
|
||||
},
|
||||
"-XY" | "-xy" => {
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
web_sys::console::log_1(&format!("PlaneData::from_kcl_val matching -XY").into());
|
||||
Some(Self::NegXY)
|
||||
},
|
||||
"XZ" | "xz" => Some(Self::XZ),
|
||||
"-XZ" | "-xz" => Some(Self::NegXZ),
|
||||
"YZ" | "yz" => Some(Self::YZ),
|
||||
@ -1102,18 +1198,18 @@ impl<'a> FromKclValue<'a> for super::sketch::PlaneData {
|
||||
_ => None,
|
||||
};
|
||||
}
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
web_sys::console::log_1(&format!("PlaneData::from_kcl_val with object: {:?}", arg).into());
|
||||
// Case 2: custom plane
|
||||
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 y_axis = plane.get("yAxis").and_then(FromKclValue::from_kcl_val)?;
|
||||
let z_axis = plane.get("zAxis").and_then(FromKclValue::from_kcl_val)?;
|
||||
Some(Self::Plane {
|
||||
origin,
|
||||
x_axis,
|
||||
y_axis,
|
||||
z_axis,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -107,7 +107,6 @@ lazy_static! {
|
||||
Box::new(crate::std::shell::Hollow),
|
||||
Box::new(crate::std::sweep::Sweep),
|
||||
Box::new(crate::std::loft::Loft),
|
||||
Box::new(crate::std::planes::OffsetPlane),
|
||||
Box::new(crate::std::math::Acos),
|
||||
Box::new(crate::std::math::Asin),
|
||||
Box::new(crate::std::math::Atan),
|
||||
@ -205,6 +204,10 @@ pub(crate) fn std_fn(path: &str, fn_name: &str) -> (crate::std::StdFn, StdFnProp
|
||||
|e, a| Box::pin(crate::std::revolve::revolve(e, a)),
|
||||
StdFnProps::default("std::revolve").include_in_feature_tree(),
|
||||
),
|
||||
("prelude", "offsetPlane") => (
|
||||
|e, a| Box::pin(crate::std::planes::offset_plane(e, a)),
|
||||
StdFnProps::default("std::offsetPlane").include_in_feature_tree(),
|
||||
),
|
||||
_ => unreachable!(),
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
//! Standard library plane helpers.
|
||||
|
||||
use kcl_derive_docs::stdlib;
|
||||
use kcmc::{each_cmd as mcmd, length_unit::LengthUnit, shared::Color, ModelingCmd};
|
||||
use kittycad_modeling_cmds as kcmc;
|
||||
|
||||
@ -19,98 +18,6 @@ pub async fn offset_plane(exec_state: &mut ExecState, args: Args) -> Result<KclV
|
||||
Ok(KclValue::Plane { value: Box::new(plane) })
|
||||
}
|
||||
|
||||
/// Offset a plane by a distance along its normal.
|
||||
///
|
||||
/// For example, if you offset the 'XZ' plane by 10, the new plane will be parallel to the 'XZ'
|
||||
/// plane and 10 units away from it.
|
||||
///
|
||||
/// ```no_run
|
||||
/// // Loft a square and a circle on the `XY` plane using offset.
|
||||
/// squareSketch = startSketchOn('XY')
|
||||
/// |> startProfileAt([-100, 200], %)
|
||||
/// |> line(end = [200, 0])
|
||||
/// |> line(end = [0, -200])
|
||||
/// |> line(end = [-200, 0])
|
||||
/// |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||
/// |> close()
|
||||
///
|
||||
/// circleSketch = startSketchOn(offsetPlane('XY', offset = 150))
|
||||
/// |> circle( center = [0, 100], radius = 50 )
|
||||
///
|
||||
/// loft([squareSketch, circleSketch])
|
||||
/// ```
|
||||
///
|
||||
/// ```no_run
|
||||
/// // Loft a square and a circle on the `XZ` plane using offset.
|
||||
/// squareSketch = startSketchOn('XZ')
|
||||
/// |> startProfileAt([-100, 200], %)
|
||||
/// |> line(end = [200, 0])
|
||||
/// |> line(end = [0, -200])
|
||||
/// |> line(end = [-200, 0])
|
||||
/// |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||
/// |> close()
|
||||
///
|
||||
/// circleSketch = startSketchOn(offsetPlane('XZ', offset = 150))
|
||||
/// |> circle( center = [0, 100], radius = 50 )
|
||||
///
|
||||
/// loft([squareSketch, circleSketch])
|
||||
/// ```
|
||||
///
|
||||
/// ```no_run
|
||||
/// // Loft a square and a circle on the `YZ` plane using offset.
|
||||
/// squareSketch = startSketchOn('YZ')
|
||||
/// |> startProfileAt([-100, 200], %)
|
||||
/// |> line(end = [200, 0])
|
||||
/// |> line(end = [0, -200])
|
||||
/// |> line(end = [-200, 0])
|
||||
/// |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||
/// |> close()
|
||||
///
|
||||
/// circleSketch = startSketchOn(offsetPlane('YZ', offset = 150))
|
||||
/// |> circle( center = [0, 100], radius = 50 )
|
||||
///
|
||||
/// loft([squareSketch, circleSketch])
|
||||
/// ```
|
||||
///
|
||||
/// ```no_run
|
||||
/// // Loft a square and a circle on the `-XZ` plane using offset.
|
||||
/// squareSketch = startSketchOn('-XZ')
|
||||
/// |> startProfileAt([-100, 200], %)
|
||||
/// |> line(end = [200, 0])
|
||||
/// |> line(end = [0, -200])
|
||||
/// |> line(end = [-200, 0])
|
||||
/// |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||
/// |> close()
|
||||
///
|
||||
/// circleSketch = startSketchOn(offsetPlane('-XZ', offset = -150))
|
||||
/// |> circle( center = [0, 100], radius = 50 )
|
||||
///
|
||||
/// loft([squareSketch, circleSketch])
|
||||
/// ```
|
||||
/// ```no_run
|
||||
/// // A circle on the XY plane
|
||||
/// startSketchOn("XY")
|
||||
/// |> startProfileAt([0, 0], %)
|
||||
/// |> circle( radius = 10, center = [0, 0] )
|
||||
///
|
||||
/// // Triangle on the plane 4 units above
|
||||
/// startSketchOn(offsetPlane("XY", offset = 4))
|
||||
/// |> startProfileAt([0, 0], %)
|
||||
/// |> line(end = [10, 0])
|
||||
/// |> line(end = [0, 10])
|
||||
/// |> close()
|
||||
/// ```
|
||||
|
||||
#[stdlib {
|
||||
name = "offsetPlane",
|
||||
feature_tree_operation = true,
|
||||
keywords = true,
|
||||
unlabeled_first = true,
|
||||
args = {
|
||||
plane = { docs = "The plane (e.g. XY) which this new plane is created from." },
|
||||
offset = { docs = "Distance from the standard plane this new plane will be created at." },
|
||||
}
|
||||
}]
|
||||
async fn inner_offset_plane(
|
||||
plane: PlaneData,
|
||||
offset: TyF64,
|
||||
@ -122,7 +29,10 @@ async fn inner_offset_plane(
|
||||
// standard planes themselves.
|
||||
plane.value = PlaneType::Custom;
|
||||
|
||||
plane.origin += plane.z_axis * offset.to_length_units(plane.origin.units);
|
||||
// Calculate z_axis as the cross product of x_axis and y_axis
|
||||
let z_axis = plane.x_axis.cross(&plane.y_axis);
|
||||
|
||||
plane.origin += z_axis * offset.to_length_units(plane.origin.units);
|
||||
make_offset_plane_in_engine(&plane, exec_state, args).await?;
|
||||
|
||||
Ok(plane)
|
||||
|
@ -247,10 +247,9 @@ async fn inner_shell(
|
||||
|
||||
/// Make the inside of a 3D object hollow.
|
||||
pub async fn hollow(exec_state: &mut ExecState, args: Args) -> Result<KclValue, KclError> {
|
||||
let solid = args.get_unlabeled_kw_arg_typed("solid", &RuntimeType::solid(), exec_state)?;
|
||||
let thickness: TyF64 = args.get_kw_arg_typed("thickness", &RuntimeType::length(), exec_state)?;
|
||||
let (thickness, solid) = args.get_length_and_solid(exec_state)?;
|
||||
|
||||
let value = inner_hollow(solid, thickness, exec_state, args).await?;
|
||||
let value = inner_hollow(thickness, solid, exec_state, args).await?;
|
||||
Ok(KclValue::Solid { value })
|
||||
}
|
||||
|
||||
@ -268,7 +267,7 @@ pub async fn hollow(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
|
||||
/// |> line(end = [-24, 0])
|
||||
/// |> close()
|
||||
/// |> extrude(length = 6)
|
||||
/// |> hollow(thickness = 0.25)
|
||||
/// |> hollow (0.25, %)
|
||||
/// ```
|
||||
///
|
||||
/// ```no_run
|
||||
@ -280,7 +279,7 @@ pub async fn hollow(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
|
||||
/// |> line(end = [-24, 0])
|
||||
/// |> close()
|
||||
/// |> extrude(length = 6)
|
||||
/// |> hollow(thickness = 0.5)
|
||||
/// |> hollow (0.5, %)
|
||||
/// ```
|
||||
///
|
||||
/// ```no_run
|
||||
@ -302,21 +301,15 @@ pub async fn hollow(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
|
||||
/// |> circle( center = [size / 2, -size / 2], radius = 25 )
|
||||
/// |> extrude(length = 50)
|
||||
///
|
||||
/// hollow(case, thickness = 0.5)
|
||||
/// hollow(0.5, case)
|
||||
/// ```
|
||||
#[stdlib {
|
||||
name = "hollow",
|
||||
feature_tree_operation = true,
|
||||
keywords = true,
|
||||
unlabeled_first = true,
|
||||
args = {
|
||||
solid = { docs = "Which solid to shell out" },
|
||||
thickness = {docs = "The thickness of the shell" },
|
||||
}
|
||||
}]
|
||||
async fn inner_hollow(
|
||||
solid: Box<Solid>,
|
||||
thickness: TyF64,
|
||||
solid: Box<Solid>,
|
||||
exec_state: &mut ExecState,
|
||||
args: Args,
|
||||
) -> Result<Box<Solid>, KclError> {
|
||||
|
@ -13,6 +13,7 @@ use schemars::JsonSchema;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use super::utils::{point_to_len_unit, point_to_mm, untype_point, untyped_point_to_mm};
|
||||
use crate::log;
|
||||
use crate::{
|
||||
errors::{KclError, KclErrorDetails},
|
||||
execution::{
|
||||
@ -960,9 +961,6 @@ pub enum PlaneData {
|
||||
/// What should the plane’s Y axis be?
|
||||
#[serde(rename = "yAxis")]
|
||||
y_axis: Point3d,
|
||||
/// The z-axis (normal).
|
||||
#[serde(rename = "zAxis")]
|
||||
z_axis: Point3d,
|
||||
},
|
||||
}
|
||||
|
||||
@ -973,6 +971,15 @@ pub async fn start_sketch_on(exec_state: &mut ExecState, args: Args) -> Result<K
|
||||
&RuntimeType::Union(vec![RuntimeType::solid(), RuntimeType::plane()]),
|
||||
exec_state,
|
||||
)?;
|
||||
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
if let SketchData::PlaneOrientation(plane_data) = &data {
|
||||
web_sys::console::log_1(&format!("start_sketch_on called with plane_data={:?}", plane_data).into());
|
||||
}
|
||||
// log out args
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
web_sys::console::log_1(&format!("start_sketch_on called with args={:?}", args).into());
|
||||
|
||||
let face = args.get_kw_arg_opt("face")?;
|
||||
|
||||
match inner_start_sketch_on(data, face, exec_state, &args).await? {
|
||||
@ -1171,8 +1178,13 @@ async fn inner_start_sketch_on(
|
||||
exec_state: &mut ExecState,
|
||||
args: &Args,
|
||||
) -> Result<SketchSurface, KclError> {
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
web_sys::console::log_1(&format!("inner_start_sketch_on with plane_or_solid={:?}", plane_or_solid).into());
|
||||
|
||||
match plane_or_solid {
|
||||
SketchData::PlaneOrientation(plane_data) => {
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
web_sys::console::log_1(&format!("inner_start_sketch_on PlaneOrientation case with plane_data={:?}", plane_data).into());
|
||||
let plane = make_sketch_plane_from_orientation(plane_data, exec_state, args).await?;
|
||||
Ok(SketchSurface::Plane(plane))
|
||||
}
|
||||
@ -1241,40 +1253,46 @@ async fn make_sketch_plane_from_orientation(
|
||||
exec_state: &mut ExecState,
|
||||
args: &Args,
|
||||
) -> Result<Box<Plane>, KclError> {
|
||||
let plane = Plane::from_plane_data(data.clone(), exec_state);
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
web_sys::console::log_1(&format!("make_sketch_plane_from_orientation called with data={:?}", data).into());
|
||||
|
||||
let mut plane = Plane::from_plane_data(data.clone(), exec_state);
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
web_sys::console::log_1(&format!("After from_plane_data: plane.x_axis={:?}, plane type={:?}", plane.x_axis, plane.value).into());
|
||||
|
||||
// Create the plane on the fly.
|
||||
let clobber = false;
|
||||
let size = LengthUnit(60.0);
|
||||
let hide = Some(true);
|
||||
|
||||
match data {
|
||||
PlaneData::XY | PlaneData::NegXY | PlaneData::XZ | PlaneData::NegXZ | PlaneData::YZ | PlaneData::NegYZ => {
|
||||
// TODO: ignoring the default planes here since we already created them, breaks the
|
||||
// front end for the feature tree which is stupid and we should fix it.
|
||||
let x_axis = match data {
|
||||
PlaneData::NegXY => Point3d::new(-1.0, 0.0, 0.0, UnitLen::Mm),
|
||||
PlaneData::NegXZ => Point3d::new(-1.0, 0.0, 0.0, UnitLen::Mm),
|
||||
PlaneData::NegYZ => Point3d::new(0.0, -1.0, 0.0, UnitLen::Mm),
|
||||
_ => plane.x_axis,
|
||||
};
|
||||
// Use the x_axis directly from the plane object created by from_plane_data
|
||||
// No need to recompute it here as it's already correctly set based on the plane type
|
||||
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
web_sys::console::log_1(&format!("Before modeling cmd: data={:?}, plane.x_axis={:?}", data, plane.x_axis).into());
|
||||
|
||||
args.batch_modeling_cmd(
|
||||
plane.id,
|
||||
ModelingCmd::from(mcmd::MakePlane {
|
||||
clobber,
|
||||
origin: plane.origin.into(),
|
||||
size,
|
||||
x_axis: x_axis.into(),
|
||||
x_axis: plane.x_axis.into(),
|
||||
y_axis: plane.y_axis.into(),
|
||||
hide,
|
||||
}),
|
||||
)
|
||||
.await?;
|
||||
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
web_sys::console::log_1(&format!("After modeling cmd: plane.x_axis={:?}", plane.x_axis).into());
|
||||
}
|
||||
PlaneData::Plane {
|
||||
origin,
|
||||
x_axis,
|
||||
y_axis,
|
||||
z_axis: _,
|
||||
} => {
|
||||
args.batch_modeling_cmd(
|
||||
plane.id,
|
||||
@ -1291,6 +1309,8 @@ async fn make_sketch_plane_from_orientation(
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
web_sys::console::log_1(&format!("Returning plane with x_axis={:?}", plane.x_axis).into());
|
||||
Ok(Box::new(plane))
|
||||
}
|
||||
|
||||
@ -1384,8 +1404,16 @@ pub(crate) async fn inner_start_profile_at(
|
||||
adjust_camera: false,
|
||||
planar_normal: if let SketchSurface::Plane(plane) = &sketch_surface {
|
||||
// We pass in the normal for the plane here.
|
||||
Some(plane.z_axis.into())
|
||||
let z_axis = Some(plane.x_axis.cross(&plane.y_axis).into());
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
web_sys::console::log_1(&format!("Calculating planar_normal: plane.x_axis={:?}, plane.y_axis={:?}, z_axis={:?}",
|
||||
plane.x_axis, plane.y_axis, z_axis).into());
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
web_sys::console::log_1(&format!("plane normal sketch: {:?}, x_axis: {:?}, y_axis: {:?}", z_axis, plane.x_axis, plane.y_axis).into());
|
||||
z_axis
|
||||
} else {
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
web_sys::console::log_1(&format!("no Plane normal").into());
|
||||
None
|
||||
},
|
||||
}),
|
||||
@ -1454,7 +1482,7 @@ pub(crate) async fn inner_start_profile_at(
|
||||
|
||||
/// Returns the X component of the sketch profile start point.
|
||||
pub async fn profile_start_x(exec_state: &mut ExecState, args: Args) -> Result<KclValue, KclError> {
|
||||
let sketch: Sketch = args.get_unlabeled_kw_arg_typed("sketch", &RuntimeType::sketch(), exec_state)?;
|
||||
let sketch: Sketch = args.get_sketch(exec_state)?;
|
||||
let ty = sketch.units.into();
|
||||
let x = inner_profile_start_x(sketch)?;
|
||||
Ok(args.make_user_val_from_f64_with_type(TyF64::new(x, ty)))
|
||||
@ -1471,20 +1499,15 @@ pub async fn profile_start_x(exec_state: &mut ExecState, args: Args) -> Result<K
|
||||
/// |> angledLine(angle = 30, endAbsoluteX = profileStartX(%))
|
||||
/// ```
|
||||
#[stdlib {
|
||||
name = "profileStartX",
|
||||
keywords = true,
|
||||
unlabeled_first = true,
|
||||
args = {
|
||||
profile = {docs = "Profile whose start is being used"},
|
||||
}
|
||||
name = "profileStartX"
|
||||
}]
|
||||
pub(crate) fn inner_profile_start_x(profile: Sketch) -> Result<f64, KclError> {
|
||||
Ok(profile.start.to[0])
|
||||
pub(crate) fn inner_profile_start_x(sketch: Sketch) -> Result<f64, KclError> {
|
||||
Ok(sketch.start.to[0])
|
||||
}
|
||||
|
||||
/// Returns the Y component of the sketch profile start point.
|
||||
pub async fn profile_start_y(exec_state: &mut ExecState, args: Args) -> Result<KclValue, KclError> {
|
||||
let sketch: Sketch = args.get_unlabeled_kw_arg_typed("sketch", &RuntimeType::sketch(), exec_state)?;
|
||||
let sketch: Sketch = args.get_sketch(exec_state)?;
|
||||
let ty = sketch.units.into();
|
||||
let x = inner_profile_start_y(sketch)?;
|
||||
Ok(args.make_user_val_from_f64_with_type(TyF64::new(x, ty)))
|
||||
@ -1500,20 +1523,15 @@ pub async fn profile_start_y(exec_state: &mut ExecState, args: Args) -> Result<K
|
||||
/// |> angledLine(angle = 30, endAbsoluteY = profileStartY(%))
|
||||
/// ```
|
||||
#[stdlib {
|
||||
name = "profileStartY",
|
||||
keywords = true,
|
||||
unlabeled_first = true,
|
||||
args = {
|
||||
profile = {docs = "Profile whose start is being used"},
|
||||
}
|
||||
name = "profileStartY"
|
||||
}]
|
||||
pub(crate) fn inner_profile_start_y(profile: Sketch) -> Result<f64, KclError> {
|
||||
Ok(profile.start.to[1])
|
||||
pub(crate) fn inner_profile_start_y(sketch: Sketch) -> Result<f64, KclError> {
|
||||
Ok(sketch.start.to[1])
|
||||
}
|
||||
|
||||
/// Returns the sketch profile start point.
|
||||
pub async fn profile_start(exec_state: &mut ExecState, args: Args) -> Result<KclValue, KclError> {
|
||||
let sketch: Sketch = args.get_unlabeled_kw_arg_typed("sketch", &RuntimeType::sketch(), exec_state)?;
|
||||
let sketch: Sketch = args.get_sketch(exec_state)?;
|
||||
let ty = sketch.units.into();
|
||||
let point = inner_profile_start(sketch)?;
|
||||
Ok(KclValue::from_point2d(point, ty, args.into()))
|
||||
@ -1532,15 +1550,10 @@ pub async fn profile_start(exec_state: &mut ExecState, args: Args) -> Result<Kcl
|
||||
/// |> extrude(length = 20)
|
||||
/// ```
|
||||
#[stdlib {
|
||||
name = "profileStart",
|
||||
keywords = true,
|
||||
unlabeled_first = true,
|
||||
args = {
|
||||
profile = {docs = "Profile whose start is being used"},
|
||||
}
|
||||
name = "profileStart"
|
||||
}]
|
||||
pub(crate) fn inner_profile_start(profile: Sketch) -> Result<[f64; 2], KclError> {
|
||||
Ok(profile.start.to)
|
||||
pub(crate) fn inner_profile_start(sketch: Sketch) -> Result<[f64; 2], KclError> {
|
||||
Ok(sketch.start.to)
|
||||
}
|
||||
|
||||
/// Close the current sketch.
|
||||
|
@ -449,3 +449,93 @@ export fn toRadians(@num: number(rad)): number(rad) {
|
||||
export fn toDegrees(@num: number(deg)): number(deg) {
|
||||
return num
|
||||
}
|
||||
|
||||
/// Offset a plane by a distance along its normal.
|
||||
///
|
||||
/// For example, if you offset the `XZ` plane by 10, the new plane will be parallel to the `XZ`
|
||||
/// plane and 10 units away from it.
|
||||
///
|
||||
/// ```
|
||||
/// // Loft a square and a circle on the `XY` plane using offset.
|
||||
/// squareSketch = startSketchOn(XY)
|
||||
/// |> startProfileAt([-100, 200], %)
|
||||
/// |> line(end = [200, 0])
|
||||
/// |> line(end = [0, -200])
|
||||
/// |> line(end = [-200, 0])
|
||||
/// |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||
/// |> close()
|
||||
///
|
||||
/// circleSketch = startSketchOn(offsetPlane(XY, offset = 150))
|
||||
/// |> circle( center = [0, 100], radius = 50 )
|
||||
///
|
||||
/// loft([squareSketch, circleSketch])
|
||||
/// ```
|
||||
///
|
||||
/// ```
|
||||
/// // Loft a square and a circle on the `XZ` plane using offset.
|
||||
/// squareSketch = startSketchOn(XZ)
|
||||
/// |> startProfileAt([-100, 200], %)
|
||||
/// |> line(end = [200, 0])
|
||||
/// |> line(end = [0, -200])
|
||||
/// |> line(end = [-200, 0])
|
||||
/// |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||
/// |> close()
|
||||
///
|
||||
/// circleSketch = startSketchOn(offsetPlane(XZ, offset = 150))
|
||||
/// |> circle( center = [0, 100], radius = 50 )
|
||||
///
|
||||
/// loft([squareSketch, circleSketch])
|
||||
/// ```
|
||||
///
|
||||
/// ```
|
||||
/// // Loft a square and a circle on the `YZ` plane using offset.
|
||||
/// squareSketch = startSketchOn(YZ)
|
||||
/// |> startProfileAt([-100, 200], %)
|
||||
/// |> line(end = [200, 0])
|
||||
/// |> line(end = [0, -200])
|
||||
/// |> line(end = [-200, 0])
|
||||
/// |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||
/// |> close()
|
||||
///
|
||||
/// circleSketch = startSketchOn(offsetPlane(YZ, offset = 150))
|
||||
/// |> circle( center = [0, 100], radius = 50 )
|
||||
///
|
||||
/// loft([squareSketch, circleSketch])
|
||||
/// ```
|
||||
///
|
||||
/// ```
|
||||
/// // Loft a square and a circle on the `-XZ` plane using offset.
|
||||
/// squareSketch = startSketchOn(-XZ)
|
||||
/// |> startProfileAt([-100, 200], %)
|
||||
/// |> line(end = [200, 0])
|
||||
/// |> line(end = [0, -200])
|
||||
/// |> line(end = [-200, 0])
|
||||
/// |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|
||||
/// |> close()
|
||||
///
|
||||
/// circleSketch = startSketchOn(offsetPlane(-XZ, offset = 150))
|
||||
/// |> circle(center = [0, 100], radius = 50)
|
||||
///
|
||||
/// loft([squareSketch, circleSketch])
|
||||
/// ```
|
||||
///
|
||||
/// ```
|
||||
/// // A circle on the XY plane
|
||||
/// startSketchOn(XY)
|
||||
/// |> startProfileAt([0, 0], %)
|
||||
/// |> circle( radius = 10, center = [0, 0] )
|
||||
///
|
||||
/// // Triangle on the plane 4 units above
|
||||
/// startSketchOn(offsetPlane(XY, offset = 4))
|
||||
/// |> startProfileAt([0, 0], %)
|
||||
/// |> line(end = [10, 0])
|
||||
/// |> line(end = [0, 10])
|
||||
/// |> close()
|
||||
/// ```
|
||||
@(impl = std_rust)
|
||||
export fn offsetPlane(
|
||||
/// The plane (e.g. `XY`) which this new plane is created from.
|
||||
@plane: Plane,
|
||||
/// Distance from the standard plane this new plane will be created at.
|
||||
offset: number(Length),
|
||||
): Plane {}
|
||||
|
@ -184,7 +184,7 @@ description: Artifact commands artifact_graph_example_code_no_3d.kcl
|
||||
"z": 0.0
|
||||
},
|
||||
"x_axis": {
|
||||
"x": -1.0,
|
||||
"x": 1.0,
|
||||
"y": 0.0,
|
||||
"z": 0.0
|
||||
},
|
||||
|
@ -303,7 +303,7 @@ description: Variables in memory after executing artifact_graph_example_code_no_
|
||||
}
|
||||
},
|
||||
"xAxis": {
|
||||
"x": -1.0,
|
||||
"x": 1.0,
|
||||
"y": 0.0,
|
||||
"z": 0.0,
|
||||
"units": {
|
||||
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 38 KiB |
@ -4,6 +4,15 @@ description: Operations executed artifact_graph_example_code_offset_planes.kcl
|
||||
---
|
||||
[
|
||||
{
|
||||
"type": "KclStdLibCall",
|
||||
"name": "offsetPlane",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "String",
|
||||
"value": "XY"
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
"labeledArgs": {
|
||||
"offset": {
|
||||
"value": {
|
||||
@ -22,18 +31,18 @@ description: Operations executed artifact_graph_example_code_offset_planes.kcl
|
||||
"sourceRange": []
|
||||
}
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "KclStdLibCall",
|
||||
"name": "offsetPlane",
|
||||
"sourceRange": [],
|
||||
"type": "StdLibCall",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "String",
|
||||
"value": "XY"
|
||||
"value": "XZ"
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
},
|
||||
{
|
||||
},
|
||||
"labeledArgs": {
|
||||
"offset": {
|
||||
"value": {
|
||||
@ -52,18 +61,18 @@ description: Operations executed artifact_graph_example_code_offset_planes.kcl
|
||||
"sourceRange": []
|
||||
}
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "KclStdLibCall",
|
||||
"name": "offsetPlane",
|
||||
"sourceRange": [],
|
||||
"type": "StdLibCall",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "String",
|
||||
"value": "XZ"
|
||||
"value": "YZ"
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
},
|
||||
{
|
||||
},
|
||||
"labeledArgs": {
|
||||
"offset": {
|
||||
"value": {
|
||||
@ -82,16 +91,7 @@ description: Operations executed artifact_graph_example_code_offset_planes.kcl
|
||||
"sourceRange": []
|
||||
}
|
||||
},
|
||||
"name": "offsetPlane",
|
||||
"sourceRange": [],
|
||||
"type": "StdLibCall",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "String",
|
||||
"value": "YZ"
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"labeledArgs": {
|
||||
|
@ -20,13 +20,20 @@ description: Result of parsing crazy_multi_profile.kcl
|
||||
"init": {
|
||||
"arguments": [
|
||||
{
|
||||
"abs_path": false,
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"raw": "'XZ'",
|
||||
"name": {
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"name": "XZ",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 0,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": "XZ"
|
||||
"type": "Name",
|
||||
"type": "Name"
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
@ -2561,13 +2568,28 @@ description: Result of parsing crazy_multi_profile.kcl
|
||||
"init": {
|
||||
"arguments": [
|
||||
{
|
||||
"argument": {
|
||||
"abs_path": false,
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"name": {
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"name": "XZ",
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"path": [],
|
||||
"start": 0,
|
||||
"type": "Name",
|
||||
"type": "Name"
|
||||
},
|
||||
"commentStart": 0,
|
||||
"end": 0,
|
||||
"raw": "'-XZ'",
|
||||
"operator": "-",
|
||||
"start": 0,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": "-XZ"
|
||||
"type": "UnaryExpression",
|
||||
"type": "UnaryExpression"
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
|
@ -1,4 +1,4 @@
|
||||
sketch001 = startSketchOn('XZ')
|
||||
sketch001 = startSketchOn(XZ)
|
||||
profile001 = startProfileAt([6.71, -3.66], sketch001)
|
||||
|> line(end = [2.65, 9.02], tag = $seg02)
|
||||
|> line(end = [3.73, -9.36], tag = $seg01)
|
||||
@ -28,7 +28,7 @@ profile006 = startProfileAt([9.65, 3.82], sketch002)
|
||||
|> close()
|
||||
revolve001 = revolve(profile004, angle = 45, axis = getNextAdjacentEdge(seg01))
|
||||
extrude002 = extrude(profile006, length = 4)
|
||||
sketch003 = startSketchOn('-XZ')
|
||||
sketch003 = startSketchOn(-XZ)
|
||||
profile007 = startProfileAt([4.8, 7.55], sketch003)
|
||||
|> line(end = [7.39, 2.58])
|
||||
|> line(end = [7.02, -2.85])
|
||||
|
@ -765,7 +765,7 @@ description: Variables in memory after executing crazy_multi_profile.kcl
|
||||
}
|
||||
},
|
||||
"xAxis": {
|
||||
"x": -1.0,
|
||||
"x": 1.0,
|
||||
"y": 0.0,
|
||||
"z": 0.0,
|
||||
"units": {
|
||||
@ -2756,7 +2756,7 @@ description: Variables in memory after executing crazy_multi_profile.kcl
|
||||
}
|
||||
},
|
||||
"xAxis": {
|
||||
"x": -1.0,
|
||||
"x": 1.0,
|
||||
"y": 0.0,
|
||||
"z": 0.0,
|
||||
"units": {
|
||||
@ -2902,7 +2902,7 @@ description: Variables in memory after executing crazy_multi_profile.kcl
|
||||
}
|
||||
},
|
||||
"xAxis": {
|
||||
"x": -1.0,
|
||||
"x": 1.0,
|
||||
"y": 0.0,
|
||||
"z": 0.0,
|
||||
"units": {
|
||||
@ -3048,7 +3048,7 @@ description: Variables in memory after executing crazy_multi_profile.kcl
|
||||
}
|
||||
},
|
||||
"xAxis": {
|
||||
"x": -1.0,
|
||||
"x": 1.0,
|
||||
"y": 0.0,
|
||||
"z": 0.0,
|
||||
"units": {
|
||||
@ -3143,7 +3143,7 @@ description: Variables in memory after executing crazy_multi_profile.kcl
|
||||
}
|
||||
},
|
||||
"xAxis": {
|
||||
"x": -1.0,
|
||||
"x": 1.0,
|
||||
"y": 0.0,
|
||||
"z": 0.0,
|
||||
"units": {
|
||||
@ -3314,7 +3314,7 @@ description: Variables in memory after executing crazy_multi_profile.kcl
|
||||
}
|
||||
},
|
||||
"xAxis": {
|
||||
"x": -1.0,
|
||||
"x": 1.0,
|
||||
"y": 0.0,
|
||||
"z": 0.0,
|
||||
"units": {
|
||||
@ -3867,7 +3867,7 @@ description: Variables in memory after executing crazy_multi_profile.kcl
|
||||
}
|
||||
},
|
||||
"xAxis": {
|
||||
"x": -1.0,
|
||||
"x": 1.0,
|
||||
"y": 0.0,
|
||||
"z": 0.0,
|
||||
"units": {
|
||||
@ -4234,7 +4234,7 @@ description: Variables in memory after executing crazy_multi_profile.kcl
|
||||
}
|
||||
},
|
||||
"xAxis": {
|
||||
"x": -1.0,
|
||||
"x": 1.0,
|
||||
"y": 0.0,
|
||||
"z": 0.0,
|
||||
"units": {
|
||||
|
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 55 KiB |
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 71 KiB |
@ -40,7 +40,7 @@ description: Artifact commands 80-20-rail.kcl
|
||||
"z": 0.0
|
||||
},
|
||||
"x_axis": {
|
||||
"x": -1.0,
|
||||
"x": 1.0,
|
||||
"y": 0.0,
|
||||
"z": 0.0
|
||||
},
|
||||
|
@ -371,198 +371,198 @@ flowchart LR
|
||||
2 --- 67
|
||||
2 ---- 72
|
||||
2 --- 68
|
||||
3 --- 73
|
||||
3 --- 139
|
||||
3 --- 140
|
||||
4 --- 74
|
||||
4 --- 141
|
||||
4 --- 142
|
||||
5 --- 75
|
||||
5 --- 143
|
||||
5 --- 144
|
||||
6 --- 76
|
||||
6 --- 145
|
||||
6 --- 146
|
||||
7 --- 77
|
||||
7 --- 147
|
||||
7 --- 148
|
||||
8 --- 78
|
||||
8 --- 149
|
||||
8 --- 150
|
||||
9 --- 79
|
||||
9 --- 151
|
||||
9 --- 152
|
||||
10 --- 80
|
||||
10 --- 153
|
||||
10 --- 154
|
||||
11 --- 81
|
||||
11 --- 155
|
||||
11 --- 156
|
||||
12 --- 82
|
||||
12 --- 157
|
||||
12 --- 158
|
||||
13 --- 83
|
||||
13 --- 159
|
||||
13 --- 160
|
||||
14 --- 84
|
||||
14 --- 161
|
||||
14 --- 162
|
||||
15 --- 85
|
||||
15 --- 163
|
||||
15 --- 164
|
||||
16 --- 86
|
||||
16 --- 165
|
||||
16 --- 166
|
||||
17 --- 87
|
||||
17 --- 167
|
||||
17 --- 168
|
||||
18 --- 88
|
||||
18 --- 169
|
||||
18 --- 170
|
||||
19 --- 89
|
||||
19 --- 171
|
||||
19 --- 172
|
||||
20 --- 90
|
||||
20 --- 173
|
||||
20 --- 174
|
||||
21 --- 91
|
||||
21 --- 175
|
||||
21 --- 176
|
||||
22 --- 92
|
||||
22 --- 177
|
||||
22 --- 178
|
||||
23 --- 93
|
||||
23 --- 179
|
||||
23 --- 180
|
||||
24 --- 94
|
||||
24 --- 181
|
||||
24 --- 182
|
||||
25 --- 95
|
||||
25 --- 183
|
||||
25 --- 184
|
||||
26 --- 96
|
||||
26 --- 185
|
||||
26 --- 186
|
||||
27 --- 97
|
||||
27 --- 187
|
||||
27 --- 188
|
||||
28 --- 98
|
||||
28 --- 189
|
||||
28 --- 190
|
||||
29 --- 99
|
||||
29 --- 191
|
||||
29 --- 192
|
||||
30 --- 100
|
||||
30 --- 193
|
||||
30 --- 194
|
||||
31 --- 101
|
||||
31 --- 195
|
||||
31 --- 196
|
||||
32 --- 102
|
||||
32 --- 197
|
||||
32 --- 198
|
||||
33 --- 103
|
||||
33 --- 199
|
||||
33 --- 200
|
||||
34 --- 104
|
||||
34 --- 201
|
||||
34 --- 202
|
||||
35 --- 105
|
||||
35 --- 203
|
||||
35 --- 204
|
||||
36 --- 106
|
||||
36 --- 205
|
||||
36 --- 206
|
||||
37 --- 107
|
||||
37 --- 207
|
||||
37 --- 208
|
||||
38 --- 108
|
||||
38 --- 209
|
||||
38 --- 210
|
||||
39 --- 109
|
||||
39 --- 211
|
||||
39 --- 212
|
||||
40 --- 110
|
||||
40 --- 213
|
||||
40 --- 214
|
||||
41 --- 111
|
||||
41 --- 215
|
||||
41 --- 216
|
||||
42 --- 112
|
||||
42 --- 217
|
||||
42 --- 218
|
||||
43 --- 113
|
||||
43 --- 219
|
||||
43 --- 220
|
||||
44 --- 114
|
||||
44 --- 221
|
||||
44 --- 222
|
||||
45 --- 115
|
||||
45 --- 223
|
||||
45 --- 224
|
||||
46 --- 116
|
||||
46 --- 225
|
||||
46 --- 226
|
||||
47 --- 117
|
||||
47 --- 227
|
||||
47 --- 228
|
||||
48 --- 118
|
||||
48 --- 229
|
||||
48 --- 230
|
||||
49 --- 119
|
||||
49 --- 231
|
||||
49 --- 232
|
||||
50 --- 120
|
||||
50 --- 233
|
||||
50 --- 234
|
||||
51 --- 121
|
||||
51 --- 235
|
||||
51 --- 236
|
||||
52 --- 122
|
||||
52 --- 237
|
||||
52 --- 238
|
||||
53 --- 123
|
||||
53 --- 239
|
||||
53 --- 240
|
||||
54 --- 124
|
||||
54 --- 241
|
||||
54 --- 242
|
||||
55 --- 125
|
||||
55 --- 243
|
||||
55 --- 244
|
||||
56 --- 126
|
||||
56 --- 245
|
||||
56 --- 246
|
||||
57 --- 127
|
||||
57 --- 247
|
||||
57 --- 248
|
||||
58 --- 128
|
||||
58 --- 249
|
||||
58 --- 250
|
||||
59 --- 129
|
||||
59 --- 251
|
||||
59 --- 252
|
||||
60 --- 130
|
||||
60 --- 253
|
||||
60 --- 254
|
||||
61 --- 131
|
||||
61 --- 255
|
||||
61 --- 256
|
||||
62 --- 132
|
||||
62 --- 257
|
||||
62 --- 258
|
||||
63 --- 133
|
||||
63 --- 259
|
||||
63 --- 260
|
||||
64 --- 134
|
||||
64 --- 261
|
||||
64 --- 262
|
||||
65 --- 135
|
||||
65 --- 263
|
||||
65 --- 264
|
||||
66 --- 136
|
||||
66 --- 265
|
||||
66 --- 266
|
||||
3 --- 136
|
||||
3 --- 265
|
||||
3 --- 266
|
||||
4 --- 135
|
||||
4 --- 263
|
||||
4 --- 264
|
||||
5 --- 134
|
||||
5 --- 261
|
||||
5 --- 262
|
||||
6 --- 133
|
||||
6 --- 259
|
||||
6 --- 260
|
||||
7 --- 132
|
||||
7 --- 257
|
||||
7 --- 258
|
||||
8 --- 131
|
||||
8 --- 255
|
||||
8 --- 256
|
||||
9 --- 130
|
||||
9 --- 253
|
||||
9 --- 254
|
||||
10 --- 129
|
||||
10 --- 251
|
||||
10 --- 252
|
||||
11 --- 128
|
||||
11 --- 249
|
||||
11 --- 250
|
||||
12 --- 127
|
||||
12 --- 247
|
||||
12 --- 248
|
||||
13 --- 126
|
||||
13 --- 245
|
||||
13 --- 246
|
||||
14 --- 125
|
||||
14 --- 243
|
||||
14 --- 244
|
||||
15 --- 124
|
||||
15 --- 241
|
||||
15 --- 242
|
||||
16 --- 123
|
||||
16 --- 239
|
||||
16 --- 240
|
||||
17 --- 122
|
||||
17 --- 237
|
||||
17 --- 238
|
||||
18 --- 121
|
||||
18 --- 235
|
||||
18 --- 236
|
||||
19 --- 120
|
||||
19 --- 233
|
||||
19 --- 234
|
||||
20 --- 119
|
||||
20 --- 231
|
||||
20 --- 232
|
||||
21 --- 118
|
||||
21 --- 229
|
||||
21 --- 230
|
||||
22 --- 117
|
||||
22 --- 227
|
||||
22 --- 228
|
||||
23 --- 116
|
||||
23 --- 225
|
||||
23 --- 226
|
||||
24 --- 115
|
||||
24 --- 223
|
||||
24 --- 224
|
||||
25 --- 114
|
||||
25 --- 221
|
||||
25 --- 222
|
||||
26 --- 113
|
||||
26 --- 219
|
||||
26 --- 220
|
||||
27 --- 112
|
||||
27 --- 217
|
||||
27 --- 218
|
||||
28 --- 111
|
||||
28 --- 215
|
||||
28 --- 216
|
||||
29 --- 110
|
||||
29 --- 213
|
||||
29 --- 214
|
||||
30 --- 109
|
||||
30 --- 211
|
||||
30 --- 212
|
||||
31 --- 108
|
||||
31 --- 209
|
||||
31 --- 210
|
||||
32 --- 107
|
||||
32 --- 207
|
||||
32 --- 208
|
||||
33 --- 106
|
||||
33 --- 205
|
||||
33 --- 206
|
||||
34 --- 105
|
||||
34 --- 203
|
||||
34 --- 204
|
||||
35 --- 104
|
||||
35 --- 201
|
||||
35 --- 202
|
||||
36 --- 103
|
||||
36 --- 199
|
||||
36 --- 200
|
||||
37 --- 102
|
||||
37 --- 197
|
||||
37 --- 198
|
||||
38 --- 101
|
||||
38 --- 195
|
||||
38 --- 196
|
||||
39 --- 100
|
||||
39 --- 193
|
||||
39 --- 194
|
||||
40 --- 99
|
||||
40 --- 191
|
||||
40 --- 192
|
||||
41 --- 98
|
||||
41 --- 189
|
||||
41 --- 190
|
||||
42 --- 97
|
||||
42 --- 187
|
||||
42 --- 188
|
||||
43 --- 96
|
||||
43 --- 185
|
||||
43 --- 186
|
||||
44 --- 95
|
||||
44 --- 183
|
||||
44 --- 184
|
||||
45 --- 94
|
||||
45 --- 181
|
||||
45 --- 182
|
||||
46 --- 93
|
||||
46 --- 179
|
||||
46 --- 180
|
||||
47 --- 92
|
||||
47 --- 177
|
||||
47 --- 178
|
||||
48 --- 91
|
||||
48 --- 175
|
||||
48 --- 176
|
||||
49 --- 90
|
||||
49 --- 173
|
||||
49 --- 174
|
||||
50 --- 89
|
||||
50 --- 171
|
||||
50 --- 172
|
||||
51 --- 88
|
||||
51 --- 169
|
||||
51 --- 170
|
||||
52 --- 87
|
||||
52 --- 167
|
||||
52 --- 168
|
||||
53 --- 86
|
||||
53 --- 165
|
||||
53 --- 166
|
||||
54 --- 85
|
||||
54 --- 163
|
||||
54 --- 164
|
||||
55 --- 84
|
||||
55 --- 161
|
||||
55 --- 162
|
||||
56 --- 83
|
||||
56 --- 159
|
||||
56 --- 160
|
||||
57 --- 82
|
||||
57 --- 157
|
||||
57 --- 158
|
||||
58 --- 81
|
||||
58 --- 155
|
||||
58 --- 156
|
||||
59 --- 80
|
||||
59 --- 153
|
||||
59 --- 154
|
||||
60 --- 79
|
||||
60 --- 151
|
||||
60 --- 152
|
||||
61 --- 78
|
||||
61 --- 149
|
||||
61 --- 150
|
||||
62 --- 77
|
||||
62 --- 147
|
||||
62 --- 148
|
||||
63 --- 76
|
||||
63 --- 145
|
||||
63 --- 146
|
||||
64 --- 75
|
||||
64 --- 143
|
||||
64 --- 144
|
||||
65 --- 74
|
||||
65 --- 141
|
||||
65 --- 142
|
||||
66 --- 73
|
||||
66 --- 139
|
||||
66 --- 140
|
||||
69 --- 70
|
||||
69 --- 71
|
||||
72 --- 73
|
||||
@ -759,36 +759,36 @@ flowchart LR
|
||||
72 --- 264
|
||||
72 --- 265
|
||||
72 --- 266
|
||||
152 <--x 267
|
||||
154 <--x 268
|
||||
156 <--x 269
|
||||
158 <--x 270
|
||||
184 <--x 271
|
||||
186 <--x 272
|
||||
188 <--x 273
|
||||
190 <--x 274
|
||||
216 <--x 275
|
||||
218 <--x 276
|
||||
220 <--x 277
|
||||
222 <--x 278
|
||||
248 <--x 279
|
||||
250 <--x 280
|
||||
252 <--x 281
|
||||
254 <--x 282
|
||||
148 <--x 283
|
||||
150 <--x 284
|
||||
160 <--x 285
|
||||
162 <--x 286
|
||||
180 <--x 287
|
||||
182 <--x 288
|
||||
192 <--x 289
|
||||
194 <--x 290
|
||||
212 <--x 291
|
||||
214 <--x 292
|
||||
224 <--x 293
|
||||
226 <--x 294
|
||||
244 <--x 295
|
||||
246 <--x 296
|
||||
256 <--x 297
|
||||
258 <--x 298
|
||||
254 <--x 267
|
||||
252 <--x 268
|
||||
250 <--x 269
|
||||
248 <--x 270
|
||||
222 <--x 271
|
||||
220 <--x 272
|
||||
218 <--x 273
|
||||
216 <--x 274
|
||||
190 <--x 275
|
||||
188 <--x 276
|
||||
186 <--x 277
|
||||
184 <--x 278
|
||||
158 <--x 279
|
||||
156 <--x 280
|
||||
154 <--x 281
|
||||
152 <--x 282
|
||||
258 <--x 283
|
||||
256 <--x 284
|
||||
246 <--x 285
|
||||
244 <--x 286
|
||||
226 <--x 287
|
||||
224 <--x 288
|
||||
214 <--x 289
|
||||
212 <--x 290
|
||||
194 <--x 291
|
||||
192 <--x 292
|
||||
182 <--x 293
|
||||
180 <--x 294
|
||||
162 <--x 295
|
||||
160 <--x 296
|
||||
150 <--x 297
|
||||
148 <--x 298
|
||||
```
|
||||
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
@ -757,6 +757,15 @@ description: Operations executed axial-fan.kcl
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "KclStdLibCall",
|
||||
"name": "offsetPlane",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
"labeledArgs": {
|
||||
"offset": {
|
||||
"value": {
|
||||
@ -775,16 +784,7 @@ description: Operations executed axial-fan.kcl
|
||||
"sourceRange": []
|
||||
}
|
||||
},
|
||||
"name": "offsetPlane",
|
||||
"sourceRange": [],
|
||||
"type": "StdLibCall",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"labeledArgs": {
|
||||
@ -883,6 +883,15 @@ description: Operations executed axial-fan.kcl
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "KclStdLibCall",
|
||||
"name": "offsetPlane",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
"labeledArgs": {
|
||||
"offset": {
|
||||
"value": {
|
||||
@ -901,16 +910,7 @@ description: Operations executed axial-fan.kcl
|
||||
"sourceRange": []
|
||||
}
|
||||
},
|
||||
"name": "offsetPlane",
|
||||
"sourceRange": [],
|
||||
"type": "StdLibCall",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"labeledArgs": {
|
||||
@ -1088,6 +1088,15 @@ description: Operations executed axial-fan.kcl
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "KclStdLibCall",
|
||||
"name": "offsetPlane",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
"labeledArgs": {
|
||||
"offset": {
|
||||
"value": {
|
||||
@ -1106,16 +1115,7 @@ description: Operations executed axial-fan.kcl
|
||||
"sourceRange": []
|
||||
}
|
||||
},
|
||||
"name": "offsetPlane",
|
||||
"sourceRange": [],
|
||||
"type": "StdLibCall",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"labeledArgs": {
|
||||
@ -1583,6 +1583,15 @@ description: Operations executed axial-fan.kcl
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "KclStdLibCall",
|
||||
"name": "offsetPlane",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
"labeledArgs": {
|
||||
"offset": {
|
||||
"value": {
|
||||
@ -1601,16 +1610,7 @@ description: Operations executed axial-fan.kcl
|
||||
"sourceRange": []
|
||||
}
|
||||
},
|
||||
"name": "offsetPlane",
|
||||
"sourceRange": [],
|
||||
"type": "StdLibCall",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"labeledArgs": {
|
||||
@ -2078,6 +2078,15 @@ description: Operations executed axial-fan.kcl
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "KclStdLibCall",
|
||||
"name": "offsetPlane",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
"labeledArgs": {
|
||||
"offset": {
|
||||
"value": {
|
||||
@ -2096,16 +2105,7 @@ description: Operations executed axial-fan.kcl
|
||||
"sourceRange": []
|
||||
}
|
||||
},
|
||||
"name": "offsetPlane",
|
||||
"sourceRange": [],
|
||||
"type": "StdLibCall",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"labeledArgs": {
|
||||
|
@ -4,6 +4,15 @@ description: Operations executed ball-bearing.kcl
|
||||
---
|
||||
[
|
||||
{
|
||||
"type": "KclStdLibCall",
|
||||
"name": "offsetPlane",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
"labeledArgs": {
|
||||
"offset": {
|
||||
"value": {
|
||||
@ -22,16 +31,7 @@ description: Operations executed ball-bearing.kcl
|
||||
"sourceRange": []
|
||||
}
|
||||
},
|
||||
"name": "offsetPlane",
|
||||
"sourceRange": [],
|
||||
"type": "StdLibCall",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"labeledArgs": {
|
||||
@ -924,6 +924,15 @@ description: Operations executed ball-bearing.kcl
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "KclStdLibCall",
|
||||
"name": "offsetPlane",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
"labeledArgs": {
|
||||
"offset": {
|
||||
"value": {
|
||||
@ -942,16 +951,7 @@ description: Operations executed ball-bearing.kcl
|
||||
"sourceRange": []
|
||||
}
|
||||
},
|
||||
"name": "offsetPlane",
|
||||
"sourceRange": [],
|
||||
"type": "StdLibCall",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"labeledArgs": {
|
||||
|
@ -1995,8 +1995,8 @@ description: Artifact commands bench.kcl
|
||||
"adjust_camera": false,
|
||||
"planar_normal": {
|
||||
"x": -1.0,
|
||||
"y": -0.0,
|
||||
"z": -0.0
|
||||
"y": 0.0,
|
||||
"z": 0.0
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -2386,8 +2386,8 @@ description: Artifact commands bench.kcl
|
||||
"adjust_camera": false,
|
||||
"planar_normal": {
|
||||
"x": -1.0,
|
||||
"y": -0.0,
|
||||
"z": -0.0
|
||||
"y": 0.0,
|
||||
"z": 0.0
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -2837,8 +2837,8 @@ description: Artifact commands bench.kcl
|
||||
"adjust_camera": false,
|
||||
"planar_normal": {
|
||||
"x": -1.0,
|
||||
"y": -0.0,
|
||||
"z": -0.0
|
||||
"y": 0.0,
|
||||
"z": 0.0
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -3228,8 +3228,8 @@ description: Artifact commands bench.kcl
|
||||
"adjust_camera": false,
|
||||
"planar_normal": {
|
||||
"x": -1.0,
|
||||
"y": -0.0,
|
||||
"z": -0.0
|
||||
"y": 0.0,
|
||||
"z": 0.0
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -7458,8 +7458,8 @@ description: Artifact commands bench.kcl
|
||||
"adjust_camera": false,
|
||||
"planar_normal": {
|
||||
"x": -1.0,
|
||||
"y": -0.0,
|
||||
"z": -0.0
|
||||
"y": 0.0,
|
||||
"z": 0.0
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -7581,9 +7581,9 @@ description: Artifact commands bench.kcl
|
||||
"animated": false,
|
||||
"adjust_camera": false,
|
||||
"planar_normal": {
|
||||
"x": -0.0,
|
||||
"x": 0.0,
|
||||
"y": 1.0,
|
||||
"z": -0.0
|
||||
"z": 0.0
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -7951,8 +7951,8 @@ description: Artifact commands bench.kcl
|
||||
"adjust_camera": false,
|
||||
"planar_normal": {
|
||||
"x": -1.0,
|
||||
"y": -0.0,
|
||||
"z": -0.0
|
||||
"y": 0.0,
|
||||
"z": 0.0
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -8074,9 +8074,9 @@ description: Artifact commands bench.kcl
|
||||
"animated": false,
|
||||
"adjust_camera": false,
|
||||
"planar_normal": {
|
||||
"x": -0.0,
|
||||
"x": 0.0,
|
||||
"y": 1.0,
|
||||
"z": -0.0
|
||||
"z": 0.0
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -240,6 +240,15 @@ description: Operations executed bench.kcl
|
||||
"type": "GroupEnd"
|
||||
},
|
||||
{
|
||||
"type": "KclStdLibCall",
|
||||
"name": "offsetPlane",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
"labeledArgs": {
|
||||
"offset": {
|
||||
"value": {
|
||||
@ -258,16 +267,7 @@ description: Operations executed bench.kcl
|
||||
"sourceRange": []
|
||||
}
|
||||
},
|
||||
"name": "offsetPlane",
|
||||
"sourceRange": [],
|
||||
"type": "StdLibCall",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "GroupBegin",
|
||||
@ -506,6 +506,15 @@ description: Operations executed bench.kcl
|
||||
"type": "GroupEnd"
|
||||
},
|
||||
{
|
||||
"type": "KclStdLibCall",
|
||||
"name": "offsetPlane",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
"labeledArgs": {
|
||||
"offset": {
|
||||
"value": {
|
||||
@ -524,16 +533,7 @@ description: Operations executed bench.kcl
|
||||
"sourceRange": []
|
||||
}
|
||||
},
|
||||
"name": "offsetPlane",
|
||||
"sourceRange": [],
|
||||
"type": "StdLibCall",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "GroupBegin",
|
||||
@ -772,6 +772,15 @@ description: Operations executed bench.kcl
|
||||
"type": "GroupEnd"
|
||||
},
|
||||
{
|
||||
"type": "KclStdLibCall",
|
||||
"name": "offsetPlane",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
"labeledArgs": {
|
||||
"offset": {
|
||||
"value": {
|
||||
@ -790,16 +799,7 @@ description: Operations executed bench.kcl
|
||||
"sourceRange": []
|
||||
}
|
||||
},
|
||||
"name": "offsetPlane",
|
||||
"sourceRange": [],
|
||||
"type": "StdLibCall",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "GroupBegin",
|
||||
@ -950,6 +950,15 @@ description: Operations executed bench.kcl
|
||||
"type": "GroupEnd"
|
||||
},
|
||||
{
|
||||
"type": "KclStdLibCall",
|
||||
"name": "offsetPlane",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
"labeledArgs": {
|
||||
"offset": {
|
||||
"value": {
|
||||
@ -968,16 +977,7 @@ description: Operations executed bench.kcl
|
||||
"sourceRange": []
|
||||
}
|
||||
},
|
||||
"name": "offsetPlane",
|
||||
"sourceRange": [],
|
||||
"type": "StdLibCall",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "GroupBegin",
|
||||
@ -1080,6 +1080,15 @@ description: Operations executed bench.kcl
|
||||
"type": "GroupEnd"
|
||||
},
|
||||
{
|
||||
"type": "KclStdLibCall",
|
||||
"name": "offsetPlane",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
"labeledArgs": {
|
||||
"offset": {
|
||||
"value": {
|
||||
@ -1098,16 +1107,7 @@ description: Operations executed bench.kcl
|
||||
"sourceRange": []
|
||||
}
|
||||
},
|
||||
"name": "offsetPlane",
|
||||
"sourceRange": [],
|
||||
"type": "StdLibCall",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "GroupBegin",
|
||||
@ -1219,6 +1219,15 @@ description: Operations executed bench.kcl
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "KclStdLibCall",
|
||||
"name": "offsetPlane",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
"labeledArgs": {
|
||||
"offset": {
|
||||
"value": {
|
||||
@ -1237,16 +1246,7 @@ description: Operations executed bench.kcl
|
||||
"sourceRange": []
|
||||
}
|
||||
},
|
||||
"name": "offsetPlane",
|
||||
"sourceRange": [],
|
||||
"type": "StdLibCall",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "GroupBegin",
|
||||
@ -1282,6 +1282,15 @@ description: Operations executed bench.kcl
|
||||
"type": "GroupEnd"
|
||||
},
|
||||
{
|
||||
"type": "KclStdLibCall",
|
||||
"name": "offsetPlane",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
"labeledArgs": {
|
||||
"offset": {
|
||||
"value": {
|
||||
@ -1300,16 +1309,7 @@ description: Operations executed bench.kcl
|
||||
"sourceRange": []
|
||||
}
|
||||
},
|
||||
"name": "offsetPlane",
|
||||
"sourceRange": [],
|
||||
"type": "StdLibCall",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "GroupBegin",
|
||||
@ -1388,6 +1388,15 @@ description: Operations executed bench.kcl
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "KclStdLibCall",
|
||||
"name": "offsetPlane",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
"labeledArgs": {
|
||||
"offset": {
|
||||
"value": {
|
||||
@ -1406,16 +1415,7 @@ description: Operations executed bench.kcl
|
||||
"sourceRange": []
|
||||
}
|
||||
},
|
||||
"name": "offsetPlane",
|
||||
"sourceRange": [],
|
||||
"type": "StdLibCall",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "GroupBegin",
|
||||
@ -1451,6 +1451,15 @@ description: Operations executed bench.kcl
|
||||
"type": "GroupEnd"
|
||||
},
|
||||
{
|
||||
"type": "KclStdLibCall",
|
||||
"name": "offsetPlane",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
"labeledArgs": {
|
||||
"offset": {
|
||||
"value": {
|
||||
@ -1469,16 +1478,7 @@ description: Operations executed bench.kcl
|
||||
"sourceRange": []
|
||||
}
|
||||
},
|
||||
"name": "offsetPlane",
|
||||
"sourceRange": [],
|
||||
"type": "StdLibCall",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "GroupBegin",
|
||||
|
@ -1608,9 +1608,9 @@ description: Artifact commands color-cube.kcl
|
||||
"animated": false,
|
||||
"adjust_camera": false,
|
||||
"planar_normal": {
|
||||
"x": -0.0,
|
||||
"x": 0.0,
|
||||
"y": 1.0,
|
||||
"z": -0.0
|
||||
"z": 0.0
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -1727,9 +1727,9 @@ description: Artifact commands color-cube.kcl
|
||||
"animated": false,
|
||||
"adjust_camera": false,
|
||||
"planar_normal": {
|
||||
"x": -0.0,
|
||||
"x": 0.0,
|
||||
"y": 1.0,
|
||||
"z": -0.0
|
||||
"z": 0.0
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -4,6 +4,15 @@ description: Operations executed color-cube.kcl
|
||||
---
|
||||
[
|
||||
{
|
||||
"type": "KclStdLibCall",
|
||||
"name": "offsetPlane",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
"labeledArgs": {
|
||||
"offset": {
|
||||
"value": {
|
||||
@ -22,18 +31,18 @@ description: Operations executed color-cube.kcl
|
||||
"sourceRange": []
|
||||
}
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "KclStdLibCall",
|
||||
"name": "offsetPlane",
|
||||
"sourceRange": [],
|
||||
"type": "StdLibCall",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
},
|
||||
{
|
||||
},
|
||||
"labeledArgs": {
|
||||
"offset": {
|
||||
"value": {
|
||||
@ -52,18 +61,18 @@ description: Operations executed color-cube.kcl
|
||||
"sourceRange": []
|
||||
}
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "KclStdLibCall",
|
||||
"name": "offsetPlane",
|
||||
"sourceRange": [],
|
||||
"type": "StdLibCall",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
},
|
||||
{
|
||||
},
|
||||
"labeledArgs": {
|
||||
"offset": {
|
||||
"value": {
|
||||
@ -82,18 +91,18 @@ description: Operations executed color-cube.kcl
|
||||
"sourceRange": []
|
||||
}
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "KclStdLibCall",
|
||||
"name": "offsetPlane",
|
||||
"sourceRange": [],
|
||||
"type": "StdLibCall",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
},
|
||||
{
|
||||
},
|
||||
"labeledArgs": {
|
||||
"offset": {
|
||||
"value": {
|
||||
@ -112,18 +121,18 @@ description: Operations executed color-cube.kcl
|
||||
"sourceRange": []
|
||||
}
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "KclStdLibCall",
|
||||
"name": "offsetPlane",
|
||||
"sourceRange": [],
|
||||
"type": "StdLibCall",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
},
|
||||
{
|
||||
},
|
||||
"labeledArgs": {
|
||||
"offset": {
|
||||
"value": {
|
||||
@ -142,18 +151,18 @@ description: Operations executed color-cube.kcl
|
||||
"sourceRange": []
|
||||
}
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "KclStdLibCall",
|
||||
"name": "offsetPlane",
|
||||
"sourceRange": [],
|
||||
"type": "StdLibCall",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
},
|
||||
{
|
||||
},
|
||||
"labeledArgs": {
|
||||
"offset": {
|
||||
"value": {
|
||||
@ -172,16 +181,7 @@ description: Operations executed color-cube.kcl
|
||||
"sourceRange": []
|
||||
}
|
||||
},
|
||||
"name": "offsetPlane",
|
||||
"sourceRange": [],
|
||||
"type": "StdLibCall",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "GroupBegin",
|
||||
|
@ -153,9 +153,9 @@ description: Variables in memory after executing color-cube.kcl
|
||||
}
|
||||
},
|
||||
"zAxis": {
|
||||
"x": -0.0,
|
||||
"x": 0.0,
|
||||
"y": 1.0,
|
||||
"z": -0.0,
|
||||
"z": 0.0,
|
||||
"units": {
|
||||
"type": "Mm"
|
||||
}
|
||||
|
@ -34,6 +34,15 @@ description: Operations executed cycloidal-gear.kcl
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "KclStdLibCall",
|
||||
"name": "offsetPlane",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
"labeledArgs": {
|
||||
"offset": {
|
||||
"value": {
|
||||
@ -52,16 +61,7 @@ description: Operations executed cycloidal-gear.kcl
|
||||
"sourceRange": []
|
||||
}
|
||||
},
|
||||
"name": "offsetPlane",
|
||||
"sourceRange": [],
|
||||
"type": "StdLibCall",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"labeledArgs": {
|
||||
@ -267,6 +267,15 @@ description: Operations executed cycloidal-gear.kcl
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "KclStdLibCall",
|
||||
"name": "offsetPlane",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
"labeledArgs": {
|
||||
"offset": {
|
||||
"value": {
|
||||
@ -285,16 +294,7 @@ description: Operations executed cycloidal-gear.kcl
|
||||
"sourceRange": []
|
||||
}
|
||||
},
|
||||
"name": "offsetPlane",
|
||||
"sourceRange": [],
|
||||
"type": "StdLibCall",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"labeledArgs": {
|
||||
@ -500,6 +500,15 @@ description: Operations executed cycloidal-gear.kcl
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "KclStdLibCall",
|
||||
"name": "offsetPlane",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
"labeledArgs": {
|
||||
"offset": {
|
||||
"value": {
|
||||
@ -518,16 +527,7 @@ description: Operations executed cycloidal-gear.kcl
|
||||
"sourceRange": []
|
||||
}
|
||||
},
|
||||
"name": "offsetPlane",
|
||||
"sourceRange": [],
|
||||
"type": "StdLibCall",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"labeledArgs": {
|
||||
|
@ -98,6 +98,15 @@ description: Operations executed dual-basin-utility-sink.kcl
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "KclStdLibCall",
|
||||
"name": "offsetPlane",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
"labeledArgs": {
|
||||
"offset": {
|
||||
"value": {
|
||||
@ -116,16 +125,7 @@ description: Operations executed dual-basin-utility-sink.kcl
|
||||
"sourceRange": []
|
||||
}
|
||||
},
|
||||
"name": "offsetPlane",
|
||||
"sourceRange": [],
|
||||
"type": "StdLibCall",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"labeledArgs": {
|
||||
@ -253,6 +253,15 @@ description: Operations executed dual-basin-utility-sink.kcl
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "KclStdLibCall",
|
||||
"name": "offsetPlane",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
"labeledArgs": {
|
||||
"offset": {
|
||||
"value": {
|
||||
@ -271,16 +280,7 @@ description: Operations executed dual-basin-utility-sink.kcl
|
||||
"sourceRange": []
|
||||
}
|
||||
},
|
||||
"name": "offsetPlane",
|
||||
"sourceRange": [],
|
||||
"type": "StdLibCall",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"labeledArgs": {
|
||||
@ -365,6 +365,15 @@ description: Operations executed dual-basin-utility-sink.kcl
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "KclStdLibCall",
|
||||
"name": "offsetPlane",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
"labeledArgs": {
|
||||
"offset": {
|
||||
"value": {
|
||||
@ -383,16 +392,7 @@ description: Operations executed dual-basin-utility-sink.kcl
|
||||
"sourceRange": []
|
||||
}
|
||||
},
|
||||
"name": "offsetPlane",
|
||||
"sourceRange": [],
|
||||
"type": "StdLibCall",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"labeledArgs": {
|
||||
@ -496,6 +496,15 @@ description: Operations executed dual-basin-utility-sink.kcl
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "KclStdLibCall",
|
||||
"name": "offsetPlane",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
"labeledArgs": {
|
||||
"offset": {
|
||||
"value": {
|
||||
@ -514,16 +523,7 @@ description: Operations executed dual-basin-utility-sink.kcl
|
||||
"sourceRange": []
|
||||
}
|
||||
},
|
||||
"name": "offsetPlane",
|
||||
"sourceRange": [],
|
||||
"type": "StdLibCall",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"labeledArgs": {
|
||||
@ -705,6 +705,15 @@ description: Operations executed dual-basin-utility-sink.kcl
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "KclStdLibCall",
|
||||
"name": "offsetPlane",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
"labeledArgs": {
|
||||
"offset": {
|
||||
"value": {
|
||||
@ -723,16 +732,7 @@ description: Operations executed dual-basin-utility-sink.kcl
|
||||
"sourceRange": []
|
||||
}
|
||||
},
|
||||
"name": "offsetPlane",
|
||||
"sourceRange": [],
|
||||
"type": "StdLibCall",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"labeledArgs": {
|
||||
@ -860,6 +860,15 @@ description: Operations executed dual-basin-utility-sink.kcl
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "KclStdLibCall",
|
||||
"name": "offsetPlane",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
"labeledArgs": {
|
||||
"offset": {
|
||||
"value": {
|
||||
@ -878,16 +887,7 @@ description: Operations executed dual-basin-utility-sink.kcl
|
||||
"sourceRange": []
|
||||
}
|
||||
},
|
||||
"name": "offsetPlane",
|
||||
"sourceRange": [],
|
||||
"type": "StdLibCall",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"labeledArgs": {
|
||||
|
@ -501,6 +501,15 @@ description: Operations executed food-service-spatula.kcl
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "KclStdLibCall",
|
||||
"name": "offsetPlane",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
"labeledArgs": {
|
||||
"offset": {
|
||||
"value": {
|
||||
@ -519,16 +528,7 @@ description: Operations executed food-service-spatula.kcl
|
||||
"sourceRange": []
|
||||
}
|
||||
},
|
||||
"name": "offsetPlane",
|
||||
"sourceRange": [],
|
||||
"type": "StdLibCall",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"labeledArgs": {
|
||||
|
@ -494,6 +494,15 @@ description: Operations executed french-press.kcl
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "KclStdLibCall",
|
||||
"name": "offsetPlane",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
"labeledArgs": {
|
||||
"offset": {
|
||||
"value": {
|
||||
@ -512,16 +521,7 @@ description: Operations executed french-press.kcl
|
||||
"sourceRange": []
|
||||
}
|
||||
},
|
||||
"name": "offsetPlane",
|
||||
"sourceRange": [],
|
||||
"type": "StdLibCall",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"labeledArgs": {
|
||||
@ -845,6 +845,15 @@ description: Operations executed french-press.kcl
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "KclStdLibCall",
|
||||
"name": "offsetPlane",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
"labeledArgs": {
|
||||
"offset": {
|
||||
"value": {
|
||||
@ -863,16 +872,7 @@ description: Operations executed french-press.kcl
|
||||
"sourceRange": []
|
||||
}
|
||||
},
|
||||
"name": "offsetPlane",
|
||||
"sourceRange": [],
|
||||
"type": "StdLibCall",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"labeledArgs": {
|
||||
@ -1320,6 +1320,15 @@ description: Operations executed french-press.kcl
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"type": "KclStdLibCall",
|
||||
"name": "offsetPlane",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
},
|
||||
"labeledArgs": {
|
||||
"offset": {
|
||||
"value": {
|
||||
@ -1338,16 +1347,7 @@ description: Operations executed french-press.kcl
|
||||
"sourceRange": []
|
||||
}
|
||||
},
|
||||
"name": "offsetPlane",
|
||||
"sourceRange": [],
|
||||
"type": "StdLibCall",
|
||||
"unlabeledArg": {
|
||||
"value": {
|
||||
"type": "Plane",
|
||||
"artifact_id": "[uuid]"
|
||||
},
|
||||
"sourceRange": []
|
||||
}
|
||||
"sourceRange": []
|
||||
},
|
||||
{
|
||||
"labeledArgs": {
|
||||
|